Related
Why this tutorial?
I made this tutorial for the galaxy 3, but then some user reported me that it worked on another phone, so I post this thread here again.
I wanted a good odexed rom, but there isn't any here. So I tried to make my own odexed rom, but it wasn't so good. So I read something about re-odexing and tried it out. I modified it a little bit and I don't know all about re-odexing, so if someone know something better, pls post it here in the thread for everyone. English is also not my mother language, but I hope you'll understand me
What is a odexed and a deodexed rom?
When you look at a stock rom in the folder /system/app, you will see files with the ending .odex and the apks doesn't contains classes.dex files. When you look at a deodexed rom, you'll see that there are no .odex files and the apks contains classes.dex files. Basically every apk contains a classes.dex files. Then the dalvik virtual machine generates a dalvik cache based of the classes.dex file. When you load a app, it will be loaded from the the dalvik cache, not from the apk. Samsung built the odexed rom using a tool called dexopt-wrapper. This tool generates .odex files based from the classes.dex, that means it does the same job like the dalvik vm. The .odex files were pushed in the /system. The files are the replacement for the dalvik cache. Like I wrote above, apps are loading from the dalvik cache, not from apk or classes.dex file, so classes.dex are not needed anymore, so they are deleted in odexed roms. Deodexing using xUltimate means regenerating a classes.dex based from the .odex file, merging it into the apk and deleting .odex.
What are the advantages and disadvantages from a deodexed rom?
Advantages:
-All needed things are in one apk, so modding/theming is (better) possible
-Needs less space on /system
Disavantages:
-Needs more space on /data
-Is not so stable than a odexed rom
-Slower on first boot(because a odexed rom has already execute ready .odex files, a deodexed rom needs to generate dalvik cache)
What do I need to re-odex?
-A rooted phone
-A full NANDroid Backup
-More than 30 mb free space on /system
-ADB drivers for Option 1
-Titanium Backup Pro for Option 2
How can I re-odex a Rom?
There are 2 Options to do it, but only the first does a full re-odex.
Before doing anything make sure that you have a full NANDroid Backup because you'll propably get into a bootloop and I cant guarantee that it works on your device/rom.
Option 1 using dexopt-wrapper:
I used first the script from puppet13th, but I got into a bootloop. So Ive done some changes and tried it until it worked
Some users told me that you can re-odex the rom without being in CWM, so you can may skip Step 2, but you could get into a bootloop without Step 2, but you can try it out, there is no risk with a NANDroid backup
Step 1: Configure the script for your device:
The attached script is made for the galaxy 3, so you have to configure the script for your device. If you done it, pls upload it and post it here for other users.
Download the zip(link below) for your system and unzip it. Then go to the folder "odex" and then open there the file/script "odex" with your favourite text editor(I suggest Notepad++).
You only have to replace the $BOOTCLASSPATH. You can find the valid $BOOTCLASSPATH in /init.rc. Enter your $BOOTCLASSPATH after "BOOTCLASSPATH=" for example so(beginning from Line 8):
Code:
BOOTCLASSPATH=replace_this_with_your_bootclasspath
cd /system/framework
for filename replace_this_with_your_bootclasspath
In the line
Code:
for filename replace_this_with_your_bootclasspath
you must replace the ":" character between framework files with a space.
Step 2(optional): Reboot your phone into cwm recovery and get adb access there
For best results you should re-odex in the recovery menu. Some users told me that it also works in a running system, so you can also try it in a running system, but you must mount /system rw before.
So if you want to re-odex in the recovery menu, reboot into recovery and make sure you have adb access.
Step 3: Ensure /system & /data is mounted, Connect your phone and run reodex script
Make sure that /system and /data is mounted in rw mode(in recovery: go to mount & storages, in a running system:use root explorer) and connect your phone with your computer.
You already downloaded the re-odex script in step 1. Your computer will push it over adb with the needed binaries to your phone. The script will create odex files, will delete classe.dex from the apk/jar, will rezipalign your apks and will delete the dalvik cache.
For windows users: double click on odex.cmd
For linux users: open a terminal and navigate to the folder which contains the unzipped attachment and run
Code:
chmod +x reodex.sh
./reodex.sh
After its finished, simply reboot and enjoy your fully re-odexed rom.
Step 4 (optional) convert /data:
I dont know if there is a better option, but after a re-odex with Option 1, my phone didnt showed the right free space on /data. So I converted /data to a other filesystem and back and then it showed the right free space.
So check your free space and if its wrong, convert your filesystem if you kernel support that.
Option 2 using Titanium Backup Pro:
You need to have Titanium Backup pro for re-odexing.
Step 1:
Select Menu -> More -> integrate sys dalvik into rom and wait until its finished. Then you should have more space on /data. I had when I tried it before 105 and after 135 mb free space on /data and 0kb free space after it on /system, so its not all.
You can also undo it. Its good when you want to try out a new theme, so you can undo and redo it using TB Pro.
Simply select Menu -> More -> Undo sys dalvik integration
and you're done.
Option 1 vs. Option 2
-Option 1 does a full re-odex, you have full free space on /data(Option 2 does only re-odex the apps in /system/app, not the framework(/system/framework)
-Option 1 deletes classes.dex from apks and jars(against Option 2), so you have more space free on /system
-You can undo Option 2 fast, so theming/modding is also possible by undo, theme and redo it, you can also undo Option 1, its called deodexing, but its not so fast
Download Links
XDA gaves me only 500 Errors when uploading was done, so I uploaded it to min.us
Re-Odex Script for Windows
Re-Odex Script for Linux(probably doesnt work, I cant reupload because I dont have the file anymore)
Working on...
There are only phones in the list, which were reported as working by users. It can aso work on a phone which isnt in the list.
Samsung Galaxy 3(working with default script)
HTC Amaze 4G(no script attached)
HTC Evo 4G(script here)
Samsung Galaxy S2(script here)
Motorola Atrix(script here)
Nexus S (4G)(script here)
XPeria Ray(script here)
SGS 1 maybe(working script for ICS aokp here and a working script for 2.3.6 (XWJW5) here)
Wildfire S(script here)
Nexus 7(script here)
TF700T & TF300T(script here)
Xperia Ray GB REPACK4PDA_V7(script here)
Acer A510 and Asus Transformer Prime TF201(script here)
Credits
puppet13th for making orginal script
If I helped you, you can press the thanks button under the post.
Thanks very much! I can confirm this works on the HTC EVO 4G. I have attached my odex file. I had to upload it as a ".txt" file, be sure to remove the ".txt" from the "odex.txt" before using
Thanks, I will have a look and try this on my xperia play
Sent from my R800i using xda premium
Thanks a lot. This works on the Atrix.
Odex file attached.
working on Galaxy S II
edited odex file in attachments
Yup mines work on the evo 4G too thanks. Now I have a odex rom. would post the file but swagstr beat me to it. same path as mine.
Nice to see that it's worked without problems on all devices, which tried by users. If I forgot to mention: a g3 rom developer asked me, if he is allowed to publish a rom which was reodexed with my script.
And yes all secs are allowed to publish rom's which are reodexed with my script. You must not add me to the credits, but it would be great if you do it.
Anyway to individually re-odex .apks with this mod?
swagstr said:
Anyway to individually re-odex .apks with this mod?
Click to expand...
Click to collapse
Yes, in my reodex package is a folder odex, theres a binary "dexopt-wrapper": copy this to your phone and give it executeable rights and then run over adb or term-emulator:
Code:
dexopt-wrapper <input.apk> <output.odex> <$BOOTCLASSPATH>
Working on Sony neo v so should work on Xperia 2011 range
Reserved
Sent from my SGH-T989 using xda premium
Works great!
I'll upload my odex file for the Nexus S 4G
Edit: Here's my odex file for the Nexus S 4G (probably the same for Nexus S)
jr_718 said:
Reserved
Sent from my SGH-T989 using xda premium
Click to expand...
Click to collapse
For what reserved?
Hey, is there any way to do this on a PC? Like, place /system/app and /system/framework/ in specified folders then run the odex script and it can odex the apk's and jar's on the desktop?
fergie716 said:
Hey, is there any way to do this on a PC? Like, place /system/app and /system/framework/ in specified folders then run the odex script and it can odex the apk's and jar's on the desktop?
Click to expand...
Click to collapse
You need the android phone to execute dexopt-wrapper binary. But you can do that over adb. You can reodex all over adb and then pull the reodexed files, but you can also do a nandroid backup, reodex your rom and make then
Adb pull /system/app/
Adb pull /system/framework/
After that you have the files on the pc and you can restore your nandroid backup.
TearsDontFalls said:
You need the android phone to execute dexopt-wrapper binary. But you can do that over adb. You can reodex all over adb and then pull the reodexed files, but you can also do a nandroid backup, reodex your rom and make then
Adb pull /system/app/
Adb pull /system/framework/
After that you have the files on the pc and you can restore your nandroid backup.
Click to expand...
Click to collapse
I see.. Yea that makes sense.
Thank you!
Hmm....but its not a good to go option for ROM developers with no device.
Can anyone make bat script to do this without andro phone?(I m not good windows dev )
I mean the same way dsixdas kitchen de-odexes
Sent from my Micromax_A70 using Tapatalk 2 Beta-4
varun.chitre15 said:
Hmm....but its not a good to go option for ROM developers with no device.
Can anyone make bat script to do this without andro phone?(I m not good windows dev )
I mean the same way dsixdas kitchen de-odexes
Sent from my Micromax_A70 using Tapatalk 2 Beta-4
Click to expand...
Click to collapse
Rom developers without device? Okay, it might be possible to do that under linux and im pretty sure that the binarys should work under linux, but windows isnt possible.
TearsDontFalls said:
Rom developers without device? Okay, it might be possible to do that under linux and im pretty sure that the binarys should work under linux, but windows isnt possible.
Click to expand...
Click to collapse
TommyTomatoes had something going on maybe you could borrow his script and improve on it or work together.
Sent from my powered Shooter E3D with Infection of AnthraX Jamz by wolf.
.Elite_The_King. said:
TommyTomatoes had something going on maybe you could borrow his script and improve on it or work together.
Sent from my powered Shooter E3D with Infection of AnthraX Jamz by wolf.
Click to expand...
Click to collapse
Sorry, i dont understood anything. Whats tommytomatoes script about?
Here we go !
Starting point is from CyanogenMod Captivate forum and some improvement were added here and there. Credits are recalled and came from this thread : [SCRIPT][CM7/9] /datadata/ low storage notification lagless fix - init.d script.
Background :
CyanogenMod (CM) based roms on our I9000 (and brothers) uses a small and fast flash chip to store application datas. This make the rom smooth and sweet ... This chip is mounted as /datadata and is about 170Mo.
With a lot of apps (or apps storing lots of stuff there) we faced a "Low storage" notification and our phone becomes laggy.
The first idea was to move this /datadata to /data (about 2Go) whose have a lot of free space. This works but the phone became laggy.
Then some others devs think about moving back to /datadata frequently accessed files (sqlite database and xml preferences files). First as scripts part then as flashed zip file. The phone becames smoother but not like a "vanilla" CM rom. This is the 1103 datafix in thread linked previously.
An xda user suggested to let on /data only library files and move back all other stuff to /datadata. These lib files are only accessed (when used by users) in read mode so the ext4 /data partition is efficient in this way and phone becomes smoother as "vanilla" CM roms. This is the 2903 datafix I made and post in previously linked xda thread.
But with this latest datafix, applications cache are stored in /datadata and recent Google apps (like Chrome) fulfilled it quickly : the "Low storage" notification is back !
Next solution :
Like 2903 datafix, only libraries ("lib" and "libs" subdirectories) stay on /data by default.
BUT unlike it you could choose which apps will also store their cache in /data. And this is REVERSIBLE : if one of selected app becomes laggy you could move back its cache onto /datadata
How to use it :
Make a nandroid backup
Just grab the zip file and flash it in recovery
At reboot, it will revert previous datafix (if there is one) and apply this one. So first boot could take more time (5 minutes max) than "normal" boot.
It also creates a "datafix" directory in /data/local with two files : "move_cache.txt" and "skip_apps.txt".
Just edit the first file (root needed) to add apps whose cache will go back to /data at next boot :
Code:
com.android.chrome
org.mozilla.firefox_beta
will put Google Chrome and Firefox Beta cache on /data. All others apps cache will go to /datadata.
If you want Firefox cache to go back on /datadata, just remove its line in the file and reboot.
In the "skip_apps.txt" file, just put apps you want to fully stay on /data/data. If apps was previously moved to /datadata by the datafix it won't apply; you have to add its name in "skip_apps.txt" file after installing it and before rebooting the phone. On the other hand, if you remove the apps name from "skip_apps.txt" file all but libraries will be moved to /datadata at next reboot.
Requirements :
Samsung Galaxy S based phone (GT-I9000, Vibrant, Fascinate, Captivate, etc.)
CM based rom (including CM7/9, MIUI and maybe ao(k)sp etc.)
Kernel that supports init.d scripts (latest CM9 nightly support it)
Busybox installed
A fresh nandroid backup
FAQ :
Q : There is 2 zip files, who's the good one ?
A : It depends of your kernel. With stock CM9 kernel use the Datafix20120521. With others like Devil etc., use the SDatafi20120521. The only difference is between the script name : 30datafix or S30datafix. Some recent kernels add a "S" before the init.d script name. Why ? No idea !!!
Q : Will this wipe my phone ?
A : No, it should not delete any data on your phone. But as it's not tested with every phone xda user have it's a good idea to have a fresh nandroid backup
Q : Do I need to reflash the zip file ? When ?
A : The datafix will be erased each time you upgrade/change your rom (including Nightly Builds) or your kernel (many of them "clean" the init.d directory). But if you don't install lots of apps after upgrading you don't really need to install the datafix again : without full wipe, a nandroid restore or an Odin full installation te datafix will stay on.
Q : Is there something to do when backuping my apps ?
A : Nandroid should work without specific option; Titanium Backup users should tick the Preferences > Troubleshooting settings > Follow all symbolic links option. I don't use other backup apps ...
Q : Can I use this on Samsung based rom ?
A : No ! And it's irrelevant cause Samsung roms don't have the "Low storage" issue !
Q : I'm using Slim ICS rom, do I need some busybox fixer etc. ?
A : I don't use SlimICS but all commands in my script call busybox directly so it should work. Let me know if there is still a problem with this !
Q : Why do you change naming of the zip file ?
A : Cause I want ! And it's listed directly in chronological order in terminal (or recovery) in this way.
Q : How can I know which apps use most space on /datadata :
A : Just run as root (in adb or terminal) :
Code:
du -s /datadata/*|sort -n
Downloads :
Box : https://www.box.com/s/6783d86f3840c02db911
Dropbox : https://www.dropbox.com/sh/rwibb0r0fhhyvh6/KaoBoC1BtB
Please don't mirror this.
I put the shell script in attachement here. Just grab it on your sdcard, remove the ".txt" extension and you could run it using Scripter or equivalent (root needed). Please post here if something gone wrong when using it.
Donations :
As I spent some time (and coffee) for this (and april datafix for those following previous xda thread) I think about a donation button. Give me your advise on that please ...
Link for donations
But just a little "Thanks, it works great !" would be great !
Reserved.
(ten chars)
Thanks for this. I kept wondering why I would run out of storage all the time. Well, now I know and you fixed it!
Sent from my GT-P7510 using XDA Premium HD app
awesome using chrome was causing me FC every once in a while
Hi,
Nice work.
Something I don't understand - how should I choose which apps I have their cache go to the /data partition? Apps that I frequently access? Apps that take a lot of space?
Wendigogo I've previously had an old datafix posted that moved all the files to /data/data and I've only had issues when Chrome filled the cache so Ive ran your script but now /datadata is filled and everything is FC Chrome's cache seems to be in /data/data though
any ideas?
Er.. is my datadata folder meant to be empty after applying this patch ? Phone is definitely slower.. forgot to do a nandroid too argh.
As per the other fixes.. doubt this is reversible ?
Sent from my GT-I9000 using Tapatalk 2
Wendigogo said:
Q : Can I use this on Samsung based rom ?
A : No ! And it's irrelevant cause Samsung roms don't have the "Low storage" issue !
Click to expand...
Click to collapse
Just a stupid question.
Why Samsung Roms dont need it ?
How works the solution of Samsung?
Thanks!
Very good script. Whats your future plans for this?
It would be really good if this was made into an app that let u select the apps cache you want on /data or /datadata rather than having to edit a text document.
Sent from my GT-I9000 using XDA
I've flashed this and now my /datadata partition is empty...
Enviado desde mi GT-I9000 usando Tapatalk 2
Something went wrong for me too
I wasn't previously using datafix,flashed it and checked my /datadata a very little time after reboot that was 128Mb free.Seemed a lot of free space comparing to the only-libs 2903 version.For the same initial configuration/apps installed i usually get about 88Mb of free space after flashing 2903.
Just a little while later i noticed a datadata folder in /datadata and free space was now 66Mb...I reboot and /datadata ended full.
Note:Users of Devil or MnIcs get after each boot a user.log (+ a .bak of the previous boot) that describe among others things init.d process,it could help to paste it here
Seems to work for me... but can someone tell me what the following folders are for and if I need them or if they're remnants of some past datafix?
/data/data.new
/data/data2
Thanks.
TheeWolf said:
Hi,
Nice work.
Something I don't understand - how should I choose which apps I have their cache go to the /data partition? Apps that I frequently access? Apps that take a lot of space?
Click to expand...
Click to collapse
None would be the best choice.
Moving their cache out of /datadata can potentially make them laggy. However, some apps have massive caches (Flipboard, Chrome, Google Music, etc.); as such, these apps are unusable unless you do move their cache (or unless you have very few apps installed).
I wonder why so many people are having troubles. I'll give the script a try soon. It looks good! Thanks for your monumental contribution, Wendigogo.
Wendigogo said:
Donations :
As I spent some time (and coffee) for this (and april datafix for those following previous xda thread) I think about a donation button. Give me your advise on that please ...
But just a little "Thanks, it works great !" would be great !
Click to expand...
Click to collapse
My vote is that you SHOULD put up a donation button, I am happy to contribute to your coffee fund (so long as you don't drink Starbuck's ;-) But since you're French, you surely have better taste than that!)
After upgrade to ver.0521 from 0329, I have the following problems:
1. There is a data.new folder, I wonder if it can be removed.
2. new installed apps haven't been moved to datadata
3. removed apps haven't been removed from datadata
I'm on cm9 0520 with devil 0.56 kernel, busybox updated to 1.20.
By the way, the scripts run well under scripts manager.
curl66 said:
Just a stupid question.
Why Samsung Roms dont need it ?
How works the solution of Samsung?
Thanks!
Click to expand...
Click to collapse
I GUESS it is easy to manage across all devices for the cm team without having to write specific code for different devices.
basily said:
Seems to work for me... but can someone tell me what the following folders are for and if I need them or if they're remnants of some past datafix?
/data/data.new
/data/data2
Thanks.
Click to expand...
Click to collapse
+1. Why do we need those folders to be kept in data? But when I tried to delete data.new I got FC's for all of my apps. Seems that data.new has replaced data/data folder.
And one more. I wanted to move com.android.email to data/data completely and edited skip_apps.txt. But when I check datadata folder with Disk Usage app - com.android.email still remains there.
What have I done wrong?
Sent from my SGH-I897 using xda premium
I find that 0521 version uses busybox for copy /move /mkdir operation, which is different from old versions.
After 3 reboots /datadata is still empty...
Enviado desde mi GT-I9000 usando Tapatalk 2
I saw you guys were having trouble with space and I was having the same issue with my Motorola Triumph. This is just copied from my original thread at http://androidforums.com/triumph-al...-beta-cm9-cm10-w-google-now-instructions.html
Hello guys and gals. After spending hours trying to figure out what I could delete from the system to make room for Gapps on CM10, I even tried to resize partitions, I came to the conclusion that the Gapps will have to be stored elsewhere. So, I came up with a solution, by installing the apps to /data/Gapps and then symlinking the files to /system, and it worked. So since there are so many people trying to get Goggle Now on CM9, I figured I would make modified Gapps zips for both CM9 and CM10.
I need some feedback on this, but I did flash it and everything seems to be working. I'm sure this will help a bunch of other devices that have smaller system partitions also.
I don't think Google should have any issues with this as I haven't changed any files that where in the zip just moved them around and modified the updater-script.
Symlinked Gapps for ICS:
Right now, after install it uses 23.3MB and the bulk of the files are installed to /data/Gapps
I was able to install Google Now offline and then these gapps and have 8 MB free.
symlinked-gapps-ics-20120429-signed.zip
Symlinked Gapps for JB:
Right now, after install it frees up 0.1 MB and the bulk of the files are installed to /data/Gapps
symlinked-gapps-jb-20121011.zip
Enjoy!
Click to expand...
Click to collapse
Dalvik cache cleaner is a shell script which clears the Dalvik cache that can be used with Android Terminal Emulator.
Root and busybox is required, if you don't know what root and/or busybox is then do NOT bother using the script.
Place the shell script in the main directory.
With Android Terminal Emulator type:
su
sh /sdcard/Dalvik_cache_cleaner.sh
The process should be close to instant depending on how much files you have in the directory.
Download: http://caftp.3owl.com/Shell_Scripts/Dalvik_cache_cleaner/Dalvik_cache_cleaner.sh
It worked
~~~~~~~~~~~~~~~~~~~~~
Samsung galaxy s2
Rom: Jedi knight 6
kernel: Jedi kernel 2
~~~~~~~~~~~~~~~~~~~~~
And you thought celebrities weren't smart! =P
Is this also intended to run on every boot, ie via init.d
thebrainkafka said:
Is this also intended to run on every boot, ie via init.d
Click to expand...
Click to collapse
No, that would also waste too much time on boot then on a normal boot due to rebuilding the cache everytime.
When you uninstall an application, usually a dalvik cache file is left over wasting space.
But if you want you can use ROM Toolbox from JRUMMY APPS INC. in the Play Store.
There is a Scripter in that application that you can use for such thing but the problem is that when I tryed using the su binary in the shell script, there is an issue where the su binary in the shell script will just cut off the other parts of the script and only the su binary so your answer would be fat chance unfortunately. :/
Sent from my Sony Tablet S using xda premium
Issue fixed.
Is this the same as wiping dv cache through recovery. Also what will be the script for wiping cache? Will it be rm /cache?
Thanx!
The-Droidster said:
Is this the same as wiping dv cache through recovery. Also what will be the script for wiping cache? Will it be rm /cache?
Thanx!
Click to expand...
Click to collapse
Yes and the code is:
#!/system/bin/sh
rm /data/dalvik-cache/*
reboot
Click to expand...
Click to collapse
I'm not sure if /cache/ is really dalvik cache, on devices with OTA update support the OTA zip's will be stored their with other stuff but if you want I can give you the code for that.
On linux (That also means android) use 'chmod 755' for the permissions for the shell script.
I have tried adding 'su' but that fails has the terminal only executes the su binary so the rest of the script does not get executed.
Using the 'echo' binary to say out what it is doing is a fail has the terminal does not go anywhere due to the echo binary getting executed but it will not display output in the terminal anyway making the script not being executable.
Sent from my Sony Tablet S using xda premium
Man I am full with ideas.
I can create a shell script to do:
[OTA]
Remove OTA Update zip in cache
Copy OTA Update zip from cache to SDCard
[Files and Folders]
Remove LOST.DIR (That is just a useless folder )
Wipe SD Card
Wipe Zip files (useful for custom roms on your SD which you don't want anymore)
Well soon I should get more ideas so the OTA shell scripts will not be possible unless I get a rootable device with OTA functionallity (I do have a Sony Tablet S but I forgot to root it but I went and installed the firmware update without noticing) so it would be the Nexus 4 I would test it on in March.
The thing is that more shell scripts I create more pages I have to add to my website to give information about it, how to use it and the download link which can take around 10 Minutes just by editing the code, make backup and then upload via FTP.
Sent from my Sony Tablet S using xda premium
New shell scripts available which should be available tomorrow and if not a few days.
They are:
Aptoide Cleaner - I found out that the xml files are adding numbers to their file extensions so I built a script which can remove that problem real fast.
Take Out Bin - Removes all or at least most useless directories like LOST.DIR and LazyList, they are just a few.
ExtSD and USB Cleaner - Same has 'Take Out Bin' but it does it on the external SD Card while on USB, LOST.DIR will be erased has that should not be there.
-OLDER PROJECTS-
Dalvik Cache Cleaner - Read the first post.
Andro.Shell.Crash - This is good for developers has this does crash/lag/freeze the OS which can help a root exploit get in, of course there is different effects depending on the hardware and software, if the device is fast and has good hardware then it is possible that it may just lag and/or freeze but for older devices with older hardware can just crash.
NOTICE: The older projects are already out and available to download on my website.
I will be creating a forum about these shell scripts but I am not sure about the Aptoide one for many reasons.
I know that I am not suppose to be talking about this on a thread which has a different purpose but yeah, just an update.
EDIT: I uploaded and programmed the webpages from my tablet using WM FTP Client and DroidEdit Pro so that was a bit too early but all well, new thread(s) should come in tomorrow depending what will happen tomorrow (It is 03:30AM so it would count has today anyway).
Anyone can please guide me how to remove this script???
Thank you in advance
romelcool said:
Anyone can please guide me how to remove this script???
Thank you in advance
Click to expand...
Click to collapse
You just delete the shell script, you only use it in the Terminal Emulator so once you run it, it will wipe the dalvik cache so it will not do such thing in every boot.
Sent from my Nexus 4
Man I think you should create a script which are:
Auto clean of cache || Optimize App || Kill Media Process
If it's possible to you to create script with the list below that will be awesome ! ..
what is the code for auto cleaning cache every 30 minutes ? ..
and also auto optimize application every 24 hours ? ..
kill media process ?
I hope you could help me with this .. Thanks !
CoolApps said:
Download: http://caftp.3owl.com/Shell_Scripts/Dalvik_cache_cleaner/Dalvik_cache_cleaner.sh
Click to expand...
Click to collapse
Gone!
jidanni said:
Gone!
Click to expand...
Click to collapse
That's because I switched sites between 2012 - 2015. This thread was very inactive so I missed it out and didn't update the link with the new one.
The current server I use for it has some files that I'm aware of that are more often downloaded by users which means I ended up removing the shell scripts along with others that don't need to be there. I made a backup of everything before, by the way.
I don't feel that there's a need restore the file and plus, this thread's old.
Because of the sudden bumps of a thread that currently serves no purpose, something should be done about it to avoid further confusions.
Sent from my Nexus 4 using Tapatalk
Can you please tell me what your script did.
I made my own script that does
su -c 'find /data/data/*/cache/* -delete'
This one line saved me from installing multi-megabyte apps that do the same thing.
Is there anything more I should add to my script?
Now I can finally have enough room so Google Play can update apps again!
Thread closed at OP's request.
Dual Boot for SGSA
So many devices are getting Dual Boot capability nowadays.So i decided to do same for our beloved SGSA.
EDIT : Guide Updated. Using slow sdcard as /system and /data was bad idea. Now secondary ROM work at same speed as primary ROM since we aren't using external SD card anymore
Read first three posts carefully before doing anything
Highlights:
No lags, bugs.Both ROMs works almost same
Stable. Booting of ROM is based on kernel. So as long as you stay on a kernel it'll keep booting ROM for which it is designed without interference with another ROM.
ROM can be switched by changing Kernel.
Stock ROM fully supported. Now you can feel speed of CM ROM with stability of stock ROM
Click to expand...
Click to collapse
How to use this:
Well, steps are quite easy.Just follow them one by one and you won't get any troubles.But please follow steps one by one, don't take shortcuts.
On PC extract ROM which you want to install as secondary ROM.
You'll get following files/folders there : META-INF, system, boot.img
Delete META-INF and boot.img
Download appropriate META-INF_*.zip from downloads section.Extract it and move extracted META-INF folder to location from where we deleted META-INF.
Navigate to /system folder and move folder named app to parent folder (i.e. if app folder is located at C:\blah\system\app then move it to C:\blah\app)
Select three folders (META-INF, system, app) and compress them to zip format.Push this file to device.
All above steps are mentioned in below video
Download appropriate Kernel from Downloads sections.
Flash that kernel using Universal Kernel Flash Tool or by writing in terminal dd if=/sdcard/kernel.bin of=/dev/block/mmcblk0p15
Power off your device
Now reboot into recovery by holding VOL UP + HOME + POWER (don't take shortcut here )
Ignore any warnings recovery shows.
Install the zip file which you pushed before as you install normally (Do not use Wipe options)
Download appropriate GAPPS package from download section (Do not install normal gapps.To know reason, read third post)
Reboot it.That's all (Keep in mind, first boot always takes long time)
If WiFi don't work on secondary ROM then flash appropriate modules from Downloads section
Read "Things to keep in mind" in third post.
Click to expand...
Click to collapse
How to switch ROM:
Flash kernels provided here to boot secondary ROM.
Flash native kernel (which comes with ROM) to boot primary ROM. (If you're using CM based primary ROM then take backup of stock CM kernel before flashing another kernel.)
Click to expand...
Click to collapse
How to change ROM:
Boot up your primary ROM.
Navigate to /data
Delete folder : /data/secondary_data
Now flash secondary Kernel and flash secondary ROM as you would.
or you can use my App for doing this stuff...
Click to expand...
Click to collapse
Using DualBoot App:
After installing secondary ROM as mentioned above, you can use my Dual Boot app to switch easily between ROMs. Additionally you can also use it for other options like sharing installed apps, factory reset secondary ROM etc. It will automatically download required kernel (Read third post). App is easy to use, just install it as Normal apk. You can also share this app with secondary ROM as mentioned below.
Wipe data/factory Reset - Factory reset secondary ROM
Share Apps with Primary - Share all apps of primary ROM with secondary ROM. This will reduce space used by secondary ROM. Use this option with CAUTION because some apps like Play store can FC. So it is better to use custom share apps option.
Revert Share Apps with Primary - This will remove all installed apps of secondary ROM
Custom Share Apps - Best way to share installed apps on primary with secondary ROM. Share as much apps as possible to reduce storage usage by secondary ROM.
Clean UP - Removes all files used in DualBoot mode
And more to come...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
ROMs supported:
Primary ROM ----> Any ROM
Secondary ROM ----> All CM based ROM
Click to expand...
Click to collapse
Technical info:
--> Mounted /dev/block/mmcblk0p4 as /system
--> Since it is smaller (300 MB) in size we're symlinking /system/app folder of secondary rom to /data/app
--> Using /data partition for both /data & /cache of secondary ROM
Click to expand...
Click to collapse
Future Plans:
An App so things become more easy (done)
Kexec support in kernel (WIP)
Click to expand...
Click to collapse
Sources:
Kernel Sources : Checkout TeamCanjica's repo
DualBoot App : Github
Click to expand...
Click to collapse
I'm writing an app for this.Once it is completed it would be much easier to do this thing
As usual, i don't take any responsibility of bricked devices, nuclear wars etc...
Downloads & Changelog
Downloads:
EDIT:
Since Dev-Host removed all my files i've re uploaded them to mediafire (Link to folder below). Since all files are removed from my account DualBoot app won't be able to download kernels. So manually download them and put them on sd card as instructed.
META-INF:
CM 10.1 || CM 10.2 || CM 11 || MIUI || AOSP (KK) || Liquid Smooth 3.0
Click to expand...
Click to collapse
Kernel:
CM 10.1 || CM 10.2 || CM 11 || MIUI || AOSP (KK)
Click to expand...
Click to collapse
Modules:
CM 11
Click to expand...
Click to collapse
GAPPS:
CM 10.1 || CM 10.2 || CM 11
Click to expand...
Click to collapse
Download META_INF, Kernels, GApps:
Mediafire Folder
Click to expand...
Click to collapse
DualBoot Application:
DualBoot v1.22
Click to expand...
Click to collapse
Changelog:
27/04/14 ---> Fixed FC problem on CM11, Kernel with OC support (same as TC's last release)
21/02/14 ---> Liquid Smooth 3.0 Support
10/02/14 ---> AOSP (KK) Support, Fixed download links of stock kernels for CM10.2/11
05/02/14 ---> MIUI v5 Support
21/01/14 ---> DualBoot App released, Updated META-INF folder for latest CM10.2 to fix errors
08/01/14 ---> Fixed bug with CM11 which was preventing it from booting second time
06/01/14 ---> CM11 support
04/01/14 ---> No need for external SD card.Both ROMs work at same speed, no more lagginess
11/11/13 ---> Initial Release
Click to expand...
Click to collapse
DualBoot App Changelog:
27/04/14 ---> Unsupported device problem fixed, Updated all kernel links
12/02/14 ---> Fixed AOSP, Removed app folder share (use custom app share instead)
10/02/14 ---> AOSP (KK) Support, Fixed download links of stock kernels for CM10.2/11
05/02/14 ---> MIUI support. Allows user to flash unknown kernel to use any ROM as Primary ROM
21/01/14 ---> Initial Release
Click to expand...
Click to collapse
Pros, cons, Tips, Future Plans
FAQs:
Q. How can i factory reset second ROM?
A. Boot into primary ROM and go to /data/secondary_data using any explorer and delete following folders : cache, data
Click to expand...
Click to collapse
Q. How can i totally remove dual boot from my data partition?
A. Simple, just boot into primary ROM and delete /data/secondary_data folder.Now delete all contents of /cache folder.
Click to expand...
Click to collapse
Q. WiFi is not working on secondary ROM. What should i do?
A. Boot into secondary ROM's recovery and flash appropriate modules from downloads section
Click to expand...
Click to collapse
Things to keep in mind:
Wipe/data Factory reset from primary ROM will remove secondary ROM also.
Do not wipe cache partition after installing this mod (for both primary & secondary ROMs).
Don't touch anything other than install zip ( like wipe data/cache etc because they'll lead to unexpected results ) when using secondary ROM's recovery.
We're running out of space for /system partition in secondary ROM so please don't keep flashing random tweaks, mods which put files on /system partition.If it is emergency then use /preload partition and symlink them manually.
Do not install GAPPS for secondary ROM.Use only which i provided.
When CM based ROM is installed as secondary ROM then by default swap functionality is disabled on /preload (which TeamCanjica enabled).So stock ROM as primary ROM is compatible.
Ignore any warnings shown by secondary recovery.If you get any error then contact me.
Provided GAPPS are not full gapps it'll only install Play Store s that you can install other apps from market.
We have 2GB space in /data partition.I've been using this device for 9 months and it never took more than 1GB space on /data.But still if you're finding less storage then move some apps to sdcard.Still if you need more then contact me, we'll move some more files.
If you want to dual boot CM & stock ROM then it is necessary to install stock as primary because they're huge to be included on /cache partition.Although it is not impossible, if you're expert there, then you can create symlinks to make it work.But i won't support that way.So secondary ROM must be CM based.
Backup/Restore function won't work with secondary ROM
When wiping primary rom, it is impossible to save secondary rom unless you made backup.
Even though Dual Boot app downloads kernel automatically, it is advised that you download required kernels & manually and put them in proper folder ({internalsdcard}/DualBoot/) to avoid bad & corrupt downloads. In case if this happens & you phone don't boot up, don't worry, just flash stock kernel with odin & everything will be fine.
Click to expand...
Click to collapse
How to add Support for Unsupported ROM:
This tutorial will help you to add support for those ROMs which are based on already supported ROMs (like CM11, CM10.2 etc). This tutorial will teach you to create META-INF folder for particular ROM to avoid status 7 error. Please follow it carefully
Open META-INF\com\google\android\updater-script
Find and delete following code/ same code
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");
set_metadata("/tmp/backuptool.sh", "uid", 0, "gid", 0, "mode", 0755);
set_metadata("/tmp/backuptool.functions", "uid", 0, "gid", 0, "mode", 0644);
run_program("/tmp/backuptool.sh", "backup");
Now find
Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p3", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
& replace /dev/block/mmcblk0p3 with /dev/block/mmcblk0p4
Search for package_extract_dir("system", "/system"); & add this code after it
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/primary_data");
run_program("/sbin/busybox", "mkdir", "-p", "/primary_data/secondary_data/system");
delete_recursive("/primary_data/secondary_data/system");
package_extract_dir("app", "/primary_data/secondary_data/system");
symlink("/primary_data/secondary_data/system", "/system/app");
At the end of the script remove package_extract_file("boot.img", "/dev/block/mmcblk0p15"); or anything related to kernel flashing like write_raw_image etc.
Click to expand...
Click to collapse
Awesome...:good:
Wanted to try it but I have a 2gb memory card...
So I will have to Wait till my new memory card arrives:fingers-crossed:
i have a class 10 sd card..i ll try this as soon as i can..just a thing...AWESOME
Sent from my GT-I9070 using XDA Premium 4 mobile app
tried but not work. it just boot direct to recovery
wmfaiz said:
tried but not work. it just boot direct to recovery
Click to expand...
Click to collapse
Yep because you messed up with our param drivers.As i told before don't use any command like reboot recovery and don't use 4 way reboot (if your ROM supports) to enter recovery.This will keep you throwing into recovery.The solution is flash primary ROM's kernel then reboot normally.Use UKF to flash secondary kernel.Now power off your device and then use Hardware keys to enter recovery or if you've already installed secondary ROM then power on normally.
Our ramdisk is splitted on device tree/rootdir, device-common/rootdir, vendor/cm/rootdir and so... We went back to gzip kernel compression so you can easily unpack its boot.img
Sent from my GT-I9070 using xda app-developers app
frapeti said:
Our ramdisk is splitted on device tree/rootdir, device-common/rootdir, vendor/cm/rootdir and so... We went back to gzip kernel compression so you can easily unpack its boot.img
Sent from my GT-I9070 using xda app-developers app
Click to expand...
Click to collapse
Thanks.I'm waiting for next build because last build has lzma compressed zImage.
dual boot?
cool...
I was used dual boot on my old device Galaxy Tab 2, very useful for testing a new rom before become it that rom as primary rom for daily use
great work
Update
So as i told on FB group yesterday i managed to boot both ROMs directly from eMMC.
--> Now we don't need external sdcard.
--> Both ROMs works at same speed.
--> Stable, no bugs.
--> Easy to install.
For writing noob friendly guide it took longer time.So if i'd forgot to write anything or if you've any question feel free to post here.
But Before posting anything read first 3 posts carefully.
And yeah i'm also writing an app to do it easily.Once i'll do it, this will be much easier.
Sorry guys i've messed up my Debian partition so can't add support for CM11, CM10.1 now. I'll add links for them asap .
Till then enjoy CM10.2 and keep supporting me...:good:
Many thanks for your hardwork man! For achieving dual boot on our device and keep on simplify the method of doing it. It is also happy to see that there is another app under developing to make things more easier, i will definitely try this out once i finished my exam!
Thanks a lot man :thumbup:
I will use it when you will add CM 11 compatibility.
BOOTMGR said:
So as i told on FB group yesterday i managed to boot both ROMs directly from eMMC.
--> Now we don't need external sdcard.
--> Both ROMs works at same speed.
--> Stable, no bugs.
--> Easy to install.
For writing noob friendly guide it took longer time.So if i'd forgot to write anything or if you've any question feel free to post here.
But Before posting anything read first 3 posts carefully.
And yeah i'm also writing an app to do it easily.Once i'll do it, this will be much easier.
Sorry guys i've messed up my Debian partition so can't add support for CM11, CM10.1 now. I'll add links for them asap .
Till then enjoy CM10.2 and keep supporting me...:good:
Click to expand...
Click to collapse
OFFTOPIC
Did anybody tell you that you are AWESOME.
If you can debloat more and odex your harshjelly rom & put the odexes in preload folder and symlink them to /system, then probably you can save some space in /system partition and /data as dalvik cache wont be generated.
As you said there wont be any future updates, odexing is a fine option.
Just a thought. Can it be done ????
EDIT:
You can also remove apps like gmail hangouts etc as they are updated from time to time. You will save some space in /system
Again offtopic
Are you going to change your rom's name BOOTMGRjelly???
<O.T>
+1 to each thing in above post....
let me again tell u that you r really really AWESOME :angel: :laugh:
btw idea of debloating HJ is good ......personally i'm using heavily debloated HJ without any feature loss
BOOTMGR said:
ROMs supported:
Primary ROM ----> Any ROM
Secondary ROM ----> All CM based ROM
Click to expand...
Click to collapse
I assume Primary ROM must be 4.0 or higher and not GB?
Just installed CM 10.2 as You wrote, all works fine. Great work, really. Tnx for that.
I have a question: if is possible to make links from main ROM app and data to second ROM app and data to save space?
I mean: no install new app only use existing installation of applications and their data.
GT-I9070 ==> Tapatalk space
anantttt said:
OFFTOPIC
Did anybody tell you that you are AWESOME.
If you can debloat more and odex your harshjelly rom & put the odexes in preload folder and symlink them to /system, then probably you can save some space in /system partition and /data as dalvik cache wont be generated.
As you said there wont be any future updates, odexing is a fine option.
Just a thought. Can it be done ????
EDIT:
You can also remove apps like gmail hangouts etc as they are updated from time to time. You will save some space in /system
Again offtopic
Are you going to change your rom's name BOOTMGRjelly???
Click to expand...
Click to collapse
Yeah it can be fitted as secondary ROM by debloating.But still some users will ask for some features.We can even use symlinks and can place it as secondary ROM without debloating it but it'll raise complexities.So it is better to use it as secondary ROM.
Odexing and placing them on /preload i also nice idead.But still i'll prefer to use it as primary ROM...
BTW,HarshJelly seems better than BOOTMGRjelly...:silly:
purplepizza said:
I assume Primary ROM must be 4.0 or higher and not GB?
Click to expand...
Click to collapse
Yeah.No support for GB (i'll think about it.If there won't be much difference (except baseband) between GB and JB we can also do it.)
darcik said:
Just installed CM 10.2 as You wrote, all works fine. Great work, really. Tnx for that.
I have a question: if is possible to make links from main ROM app and data to second ROM app and data to save space?
I mean: no install new app only use existing installation of applications and their data.
GT-I9070 ==> Tapatalk space
Click to expand...
Click to collapse
Yesterday @Sami Kabir asked same question on FB group.Here is the answer.
Only apps can be shared between both ROMs not their data.The reason is that data of system apps and normal data apps both are stored under same folder (/data/data).So can't we share this folder? answer is no because namespace conflicts will arise there (Ex. package name for phone app is com.android.phone.It'll remain same for all android versions.It is possible that use have installed both ROMs of different API level.So if one phone app stores its data under /data/data then other won't be able to read it and you'll get FC)
Although it is possible to share apps between two apps.When i'll complete app, i'll provide an option for that....:good:
Cache partition
FAQs:
Q. How can i totally remove dual boot from my data partition?
A. Simple, just boot into primary ROM and delete /data/secondary_data folder
Click to expand...
Click to collapse
Do I need to also delete files from or format the cache partition?
Idk if this partition is used if is only one ROM, seems not if dual is using it.
CM11 Support
darcik said:
Do I need to also delete files from or format the cache partition?
Idk if this partition is used if is only one ROM, seems not if dual is using it.
Click to expand...
Click to collapse
Yeah i forgot to write, you also need to delete contents of /cache folder or format cache partition.
That partition is like placebo.It is only used when upgrading android (that means generating dalvik cache (actually that partition was used to store dalvik cache but later on dalvik cache was also moved to /data partition so its useless now except time of generation of dalvik cache)
@all:
Added CM11 support.
Links are up.
Method remains same.
I've checked way to share apps between ROMs (and thus storage use will be much less).
I'll let user to choose whether to share apps or not which will be possible through DualBoot app.