First of all, i take no credit for this. Thanks to nibras_reeza for this tweak! I've tested this for SGA and I can feel an even better performance boost though i'm already using Grif_07's CM7.1 Kang Beta 2! You can go to the original thread here - Get more RAM and faster responses by disabling verify-bytecode!. I've added some instructions that would be more applicable for Ace.
You'll need:
Terminal Emulator
CWM
Root Explorer or File Expert (or any file manager that has root access)
This tweak will give a performance boost in deodexed ROMs as much as odexing system & data apps. This is an alternative for odexing.
1) Open Terminal Emulator on phone or adb shell from PC and type the following.
Code:
su
setprop dalvik.vm.verify-bytecode false
setprop dalvik.vm.dexopt-flags v=n,o=v
reboot recovery
2) Wipe both caches and reboot system
3) Open root explorer, go to /system/ and edit build.prop in R/W mode then add these lines:
Code:
dalvik.vm.verify-bytecode = false
dalvik.vm.dexopt-flags=v=n,o=v
If lines starting with dalvik.vm.verify-bytecode or dalvik.vm.dexopt-flags exist already, please modify them as above. Note that there might be two entries for dalvik.vm.dexopt-flags; remove the second one.
4) After saving build.prop, reboot to recovery then wipe both caches again.
5) Reboot system. Done.
nibras_reeza said:
Advantages:
More free RAM.
Faster launch for system & user apps during the second launch.
Gives as much as of a performance boost as ODEX without odexing. Themer friendly.
Smoother app switching.
Disadvantages:
Might break some apps.
You can read more information about this on here and here.
Click to expand...
Click to collapse
To undo this tweak,
Type the following in Teminal Emulator.
Code:
su
setprop dalvik.vm.verify-bytecode true
reboot recovery
Then wipe both caches then reboot.
Anyone can comment on this tweak? I don't know about it, but it sounds a little bit extreme on the phone :S
Just did everything as described. Nothing bad happened. Improvements have not yet seen it.
AlterJack said:
Anyone can comment on this tweak? I don't know about it, but it sounds a little bit extreme on the phone :S
Click to expand...
Click to collapse
Yup, requires a bit of experience in Android tweaking.. but i can say my phone's definitely faster
Done, can't see any changes, hope Ill see em soon
After the application of this method arises a problem: SGA freezes after extract and reinsert the SD.
Already, four people can attest.
Lovetz said:
After the application of this method arises a problem: SGA freezes after extract and reinsert the SD.
Already, four people can attest.
Click to expand...
Click to collapse
uh oh. i did not try to extract/reinsert SD yet.
but can reboot solve the problem?
mundixx said:
uh oh. i did not try to extract/reinsert SD yet.
but can reboot solve the problem?
Click to expand...
Click to collapse
yeah reboot cures freeze, but only once, next time u extract/reinsert your SD, phone will freeze again, undoing this by using comand from first post, and replacing prop file with original made thing's worse, all apps after rebooting force closed. Reinstalling rom cured all problems.
ak1t said:
yeah reboot cures freeze, but only once, next time u extract/reinsert your SD, phone will freeze again, undoing this by using comand from first post, and replacing prop file with original made thing's worse, all apps after rebooting force closed. Reinstalling rom cured all problems.
Click to expand...
Click to collapse
when you applied the code or restore the build.prop, did you clear both caches? that way, the system rebuilds it and prevents the force closes
mundixx said:
when you applied the code or restore the build.prop, did you clear both caches? that way, the system rebuilds it and prevents the force closes
Click to expand...
Click to collapse
sure I cleared them
mundixx said:
First of all, i take no credit for this. Thanks to nibras_reeza for this tweak! I've tested this for SGA and I can feel an even better performance boost though i'm already using Grif_07's CM7.1 Kang Beta 2! You can go to the original thread here - Get more RAM and faster responses by disabling verify-bytecode!. I've added some instructions that would be more applicable for Ace.
You'll need:
Terminal Emulator
CWM
Root Explorer or File Expert (or any file manager that has root access)
This tweak will give a performance boost in deodexed ROMs as much as odexing system & data apps. This is an alternative for odexing.
1) Open Terminal Emulator on phone or adb shell from PC and type the following.
Code:
su
setprop dalvik.vm.verify-bytecode false
setprop dalvik.vm.dexopt-flags v=n,o=v
reboot recovery
2) Wipe both caches and reboot system
3) Open root explorer, go to /system/ and edit build.prop in R/W mode then add these lines:
Code:
dalvik.vm.verify-bytecode = false
dalvik.vm.dexopt-flags=v=n,o=v
If lines starting with dalvik.vm.verify-bytecode or dalvik.vm.dexopt-flags exist already, please modify them as above. Note that there might be two entries for dalvik.vm.dexopt-flags; remove the second one.
4) After saving build.prop, reboot to recovery then wipe both caches again.
5) Reboot system. Done.
To undo this tweak,
Type the following in Teminal Emulator.
Code:
su
setprop dalvik.vm.verify-bytecode true
reboot recovery
Then wipe both caches then reboot.
Click to expand...
Click to collapse
Need Help I don't understand what i should edit for the line "dalvik.vm.dexopt-flags=v=n,o=v"
actually on my Build.prop it's "dalvik.vm.dexopt-flags=m=y"
so do I need to replace by v=n ? o=v ? both ? or need to times dalvik.vm.dexopt-flags with v=n and second one with o=v ? I'm confused :S
can U help me :S
Related
[SCRIPT] No-lag solution to CM7/9 "low memory" notifications (STEP BY STEP,FIXED TB)
23/01/12 - Now with Titanium Backup support!
The Titanium Backup team is awesome. I contacted them and within 3 days they had a working fix. To make sure that titanium backup works properly all you need to do is download the latest version from the market, go into 'preferences' and select 'follow all symbolic links' in the 'Troubleshooting' section at the bottom. That's it. Now you'll be able to backup normally and then restore your apps in any other rom. Neat!
Click to expand...
Click to collapse
Okay, I've found a rather excellent solution to the low storage problem that plagues the CM7 and CM9 roms - without causing the lagginess of the ".nodatadata" approach. It's not my work but was posted by drefnel on the Cyanogenmod forum. It's very smart: instead of moving the whole of /datadata (fast yaffs2) to /data (slower ext4) and so introducing lag it keeps most apps' non-performance critical data on /data and moves performance critical sqlite databases and xml preference files to the fast /datadata.
Installing this fix is a two step process:
Phase 1 - some prep, takes around 10 minutes to complete. Only has to be done once.
Phase 2 - running the script whenever you've installed new apps and used them once or twice. this just involves hitting a shortcut on your home screen. boom!
The original guide can be found here we need to make a few alterations and I've done a step-by-step below:
Step by step guide
I take no responsibility if using these instructions messes up your phone. They worked for me and you should always be able to restore using the clockworkmod backup. But you can't say you haven't been warned.
Make sure you're running CM7 or TeamHacksung's CM9 or Onecosmic ICS.
This will NOT work on encrypted phones.
DO A NANDROID BACKUP BEFORE YOU BEGIN.
Phase 1 - (if you've already used the ".nodatadata" method then start at step 4)
1. Download Terminal Emulator
2. Open terminal emulator and then enter each of the following followed by return:
su
touch /datadata/.nodatadata
3. Reboot (this might take a while as the OS will be making changes to your filesystem).
4. Open terminal emulator and then enter each of the following followed by return:
su
rm /data/data/.nodatadata
5. Reboot into recovery, go to "mounts & storage" and then select "format datadata". Reboot normally.
6. Go to the market and download GScript Lite. Open it and close it again - this should create a folder called "gscript" in your sdcard. Unzip the file attached in this post and place the script in it in that folder.
7. Open up GScript Lite, press menu and add script. Click load file, select the script file, make sure that "needs SU" is selected and click save.
8. Run the script by tapping it. You should see GScript report its progress and finally the script should finish. Press close and gscript will crash out (can't have it all ).
Phase 2
Add a shortcut to this script on your desktop.
CM7 - long-press and hold a blank area of your home screen, select 'add shortcut', and then select 'gscript lite'. select the script you've just added.
CM9 - go into your app drawer, select the 'widgets' tab, find 'gscript lite', press and hold it and move it onto your home screen. select the script you've just added.
You should use the shortcut after you've installed new apps and used them a few times. There's no harm in not using the script for a while, all that will happen is that app may become a bit laggy until you use the script to move its data to /datadata.
That's it. Congratualtions!
You can flash new CM roms and the script will carry on working fine, but if you wipe data in recovery then you'll have to start from the beginning
You won't be able to easily go back to the original configuration or use the ".nodatadata" method (you'll need to Titanium Backup, wipe everything and then restore), but you'll never miss them.
Good luck
I hope this helps people out. We should find a way of better automating the steps to make it more noob friendly and maybe Team Hacksung and One Cosmic could incorporate it into their ROMs. (Essentially the script needs to be run periodically to make sure that the performance critical /data/data elements of new apps are copied across to /datadata - apart from that it's not too different from the ".nodatadata" approach).
Personally using the much simpler .nodatadata approach, i found that after a rom (cm9) install, most lag goes away after using it for a few hours, although I have heard the speed of the flash memory is not equal on all devices... so could be laggy for some regardles of usage.
Yup I've tried both and the script approach is definitely much quicker in my case. I'm going to see if I can simplify this procedure somewhat.
Sorry for being a noob.. I am not sure how to apply the script to my Android device... Should I use Terminal Emulator on my Galaxy S and type the script in there? Would you mind to guide me through the process? Thanks a lot
Now with a step-by-step guide.
Man you are awesome! Thanks for your guide!
Wouldn't it be an idea tu use scriptmanager (free or pro) instead of gscript? it can run scripts on boot.
Maybe later, when the standard kernel for cm9 will support init.d, it can be an init.d script?
And oh, I will put a link to this thread in the wiki, you can edit the wiki yourself also if you ask for acces.
seem like there is no one try on OneCosmic, and im going it a shot!
will report later~
Zatta said:
Wouldn't it be an idea tu use scriptmanager (free or pro) instead of gscript? it can run scripts on boot.
Maybe later, when the standard kernel for cm9 will support init.d, it can be an init.d script?
And oh, I will put a link to this thread in the wiki, you can edit the wiki yourself also if you ask for acces.
Click to expand...
Click to collapse
Good points. The reason I chose GScript was its user friendliness and simplicity. There are define advantages in running this script at boot. (I'd much prefer to have things run automatically before the GUI appears (as in init.d) rather than clog up GUI boottime as Script Manager would require.)
The phenomenal uptime I get with Android means that I don't reboot very often. Ideally we'd want something that monitored the data/data folder and ran the script on the appearance of new folders. I'm not sure how you'd automate that without resorting to Tasker. Maybe init.d is the best we can do when it's supported. In the meantime a GScript shortcut on the desktop that I hit once every couple of days feels like the best option so far!
Sent from my GT-I9000 using XDA App
Code124Y said:
seem like there is no one try on OneCosmic, and im going it a shot!
will report later~
Click to expand...
Click to collapse
Tested on OneCosmic and it working good for all but picture/gallery gone...
what i mean is it scan no photo nor any image on my phone~
using gallery+ giving me the same view(nothing in gallery)
but other then this 2 gallery, im try with quickpic also and yup it show pic~
but i want the original picture gallery from the 4.0.3... any help?
There are more advantages in scriptmanager. You are not bound to a specific location on the scared for example, with gscript it has to be in /sdcsrd/gscript folder. And you can make a widget with this script in it, making it a one-click operation but I believe that is a paid feature (and gscript can do something similar, no?)
On the other hand, it is as you say, a bit more complicated.
Also making it a init.d isn't a full solution. Every update from the ROM will wipe the /system/etc/init.d so the script needs to be reinstalled.
Maybe a cwm-flashable would be needed than, everybody here can flash. In that case also the initial commands could be run during flashing.
Taptalked u see
Zatta said:
...Maybe a cwm-flashable would be needed than, everybody here can flash. In that case also the initial commands could be run during flash
Click to expand...
Click to collapse
Yup, a flashable zip which runs initial commands and then appends on an init.d script seems like the way to go. Once the CM9 kernel supports I'll learn how to make these (essentially lazy, me)
BTW, making a one click operation from GScript is easy. Just add the GScript shortcut to your home screen and it will prompt you which script you want to run on click (remember that shortcuts are now grouped with widgets in ICS)
Sent by airmail.
Code124Y said:
Tested on OneCosmic and it working good for all but picture/gallery gone...
what i mean is it scan no photo nor any image on my phone~
using gallery+ giving me the same view(nothing in gallery)
but other then this 2 gallery, im try with quickpic also and yup it show pic~
but i want the original picture gallery from the 4.0.3... any help?
Click to expand...
Click to collapse
Have you tried clearing the data for the gallery app? Worth a shot.
Sent by airmail.
revthanki said:
Have you tried clearing the data for the gallery app? Worth a shot.
Sent by airmail.
Click to expand...
Click to collapse
not needed already, becoz reboot seem to be fixed...
Samsung galaxy S GT-I9000 miui.us latest rom
I just have a question popped up in my mind, after applying this script,when I update my teamhacksung ROM in the future(i.e the future build15), will it causes any problem / break my phone?
leolee0209 said:
I just have a question popped up in my mind, after applying this script,when I update my teamhacksung ROM in the future(i.e the future build15), will it causes any problem / break my phone?
Click to expand...
Click to collapse
Absolutely shouldn't, as long as pawitp doesn't ask you to wipe data. If he does then you'll have to start again
Flash away!
Sent by airmail.
People, beware that this will break your TitaniumBackup, I was tested myself
Funnnny said:
People, beware that this will break your TitaniumBackup, I was tested myself
Click to expand...
Click to collapse
How do you mean? A bit more detail please. It really shouldn't, as Titanium Backup does respect symbolic links...
Sent by carrier pigeon.
mispost
10 char
Originally Posted by Funnnny<br />
People, beware that this will break your TitaniumBackup, I was tested myself
Click to expand...
Click to collapse
<br />
<br />
How do you mean? A bit more detail please. It really shouldn't, as Titanium Backup does respect symbolic links...<br />
<br />
<br />
Sent by carrier pigeon.
Click to expand...
Click to collapse
When I backup, wipe and restore, titaniumbackup just restore the symlink, not the actual data
Sent from my GT-I9000 using Tapatalk
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.
CyanogenMod's file manager seems to be stuck in safe mode, even though I have a rooted device and even have a modified kernel. I've not been able to figure out exactly what's happening. It says that only the accessible file systems are the storage volumes.
Anyone else have this problem, or does anyone know how to fix it?
RogueSly said:
CyanogenMod's file manager seems to be stuck in safe mode, even though I have a rooted device and even have a modified kernel. I've not been able to figure out exactly what's happening. It says that only the accessible file systems are the storage volumes.
Anyone else have this problem, or does anyone know how to fix it?
Click to expand...
Click to collapse
The default for the CM file manager is for root access to be turned off. With the file manager open go into settings and allow root access. Once you exit settings you'll have full access.
Nut_House said:
The default for the CM file manager is for root access to be turned off. With the file manager open go into settings and allow root access. Once you exit settings you'll have full access.
Click to expand...
Click to collapse
That's the problem. It won't allow root access, even though the phone has root access. The menu for the access mode is disabled.
RogueSly said:
That's the problem. It won't allow root access, even though the phone has root access. The menu for the access mode is disabled.
Click to expand...
Click to collapse
Have you tried clearing cache and Dalvik and fixing permissions? The other thing to try, if you haven't already, is downloading the latest nightly and performing a clean install rather than dirty flashing. Good luck.
If you accidentally refused root access the first time you have to go into the SU app and clear out the File manager permission and start over.
Nut_House said:
Have you tried clearing cache and Dalvik and fixing permissions? The other thing to try, if you haven't already, is downloading the latest nightly and performing a clean install rather than dirty flashing. Good luck.
Click to expand...
Click to collapse
I've already tried installing the latest nightly version and ran a permission fix on it, but end up with the same result. I'll try clearing cache, dalvik, and then fixing again.
gharlane00 said:
If you accidentally refused root access the first time you have to go into the SU app and clear out the File manager permission and start over.
Click to expand...
Click to collapse
The file manager doesn't have any permissions in SuperSU and never asks for any since it's not in root access mode. :\
Nut_House said:
Have you tried clearing cache and Dalvik and fixing permissions? The other thing to try, if you haven't already, is downloading the latest nightly and performing a clean install rather than dirty flashing. Good luck.
Click to expand...
Click to collapse
Yeah, still the same result. Clearing dalvik and cache didn't work.
Just grab es file explorer.
Sent from my SPH-L720 using xda app-developers app
RogueSly said:
Yeah, still the same result. Clearing dalvik and cache didn't work.
Click to expand...
Click to collapse
same problem.
tried to install supersu, reinstall busy box on bin and xbin, fix permissions, no luck, option still greyed out.
file manager always worked for me as root, both on cm-based ROMs and aosp.
this time it is not working with the combo saberMod and matrix on N4.
(i think this is a device-independent issue)
---------- Post added at 08:20 PM ---------- Previous post was at 08:07 PM ----------
After a lot of tentatives I solved it.
I am not 100% sure of which change made it though
I think it was by using ES root manager and resetting system as R/W.
Sent from my Nexus 4 using xda app-developers app
Alternate fix
I also had the same issue and resolved it by tapping the menu button on the top left corner. when you do this, another menu button appears in the top right corner. Hit that, then settings, and choose root mode. Took me a while to figure out!!!
solved...
Installing busy box should resolve the issue...
Sorry for bumping, I have busybox and su installed, init.d support as well, but Cyanogen's File manager still cannot access root (option is grayed out). I'm on a stock Prestigio rom. It worked previously, but I reflashed firmware and now it doesn't work on this new firmware. Any thoughts?
Hi terirem and everybody,
I had this issue recently and I've managed to fix it. This is what You should do:
Short run:
Type in rooted phone terminal:
su
am start com.cyanogenmod.filemanager.ics
done
Long run:
1. Of course You need rooted phone, I've installed also BusyBox but I am not sure if it's necessary.
2. Install Terminal application
3. Install (if it's not installed yet) and run cyanogenmod file manager then minimize it by pressing home button (make sure You don't do anything else on Your phone to don't kill file manager process, it needs to be alive for 4th point)
4. I will make all commands bold for easier reading. run your terminal app and type: top -n 1 (this command will list all your running applications just once).
5. Find cyanogenmod in last "name" column, mine has name: com.cyanogenmod.filemanager.ics (if you can't find it you can try the one I had for 7th step, should probably work)
6. Type: su You will be asked to give superuser permissions to terminal, agree. Now instead of $ an # should appear, this means all commands from now on have root privilage.
7. Now we will finally rerun filemanager again with superuser permissions, type: am start com.cyanogenmod.filemanager.ics (if you had different name of filemanager just write the one you got after am start)
8. Go to cyanogenmod filemanager general settings and change access mode to root (it should be finally available, if not make sure again You typed am start with root permissions in terminal, if still doesn't work then forget about point 9).
9. Give me a beer, or actually simple thanks is enough, I need to stop drinking.
My SuperSU is kept auto-granting and system storage is kept read-written, also I cleared the every caches.
The CM file manager is still not shown a root mode to me.
I have J-rummy’s ROM toolbox as an alternative root explorer, but sometimes is less readable than CM file manager.
There is a guy forgetting to let the system storage read-written to remind him.
I did this with CM file manager - make sure you have root access not just safe mode in general settings. When you open filemanger it is granted super U access and then you can edit and save without issues
CM Dev Settings
In Dev options is Root access set to Apps and ADB?
For anyone else still having this problem, just erase the File Manager data (Settings | Apps | File Manager | Storage | Clear Data) with SU turned on in developer options. Then press the hamburger icon in the top-right of the app, press the settings icon on the bottom, click on General settings and you will see Access Mode
bsevcenk said:
For anyone else still having this problem, just erase the File Manager data (Settings | Apps | File Manager | Storage | Clear Data) with SU turned on in developer options. Then press the hamburger icon in the top-right of the app, press the settings icon on the bottom, click on General settings and you will see Access Mode
Click to expand...
Click to collapse
I am on CM13, now with SuperSU installed since I couldn't get the root option there to work well with some other apps for some reason.
File Manager now doesn't show any option for 'safe mode' or otherwise at all in settings. I cleared the data. I started it as in the earlier post. Nothing.
In the Developer options root is allowed, although only for ADB (the apps option has gone).
passtim said:
I am on CM13, now with SuperSU installed since I couldn't get the root option there to work well with some other apps for some reason.
File Manager now doesn't show any option for 'safe mode' or otherwise at all in settings. I cleared the data. I started it as in the earlier post. Nothing.
In the Developer options root is allowed, although only for ADB (the apps option has gone).
Click to expand...
Click to collapse
same here for me.
I'm working on a fix for now.
EDIT
If you're on a systemless SuperSU, use a terminal or ADB shell to input the following lines:
Code:
su
mount -o remount,rw /system
ln -s /su/bin/su /system/xbin/su
id74em8 said:
same here for me.
I'm working on a fix for now.
EDIT
If you're on a systemless SuperSU, use a terminal or ADB shell to input the following lines:
Code:
su
mount -o remount,rw /system
ln -s /su/bin/su /system/xbin/su
Click to expand...
Click to collapse
Apologies, but I'm no expert at these things. What is a 'systemless' SuperSU?
Is making a link as you suggest safe?
DISCLAIMER: YOU AGREE TO TAKE FULL RESPONSIBILITY FOR YOUR DEVICE IF YOU PROCEED.
The original thread (http://forum.xda-developers.com/moto-g/general/mod-save-data-space-cache-partition-t2942765) was getting to cluttered up with development and testing so I decided to start a new thread with the "finished" product. The original thread will be renamed to Q&A/Development. We might even ask for the old thread to be closed down. (up to @Bert98, the thread's creator.)
Moto G's internal eMMC card has a ~600Mb partition called /cache, which is not used since the apps' cache is stored in /data, so the latter fills up and the first one stays empty.
Owning a 8Gb model, having 600Mb not available for storage really bugged me, because my phone's memory (/data partition) was always full because it's a 5.7Gb space shared between apps and microSD files.
Now, it may not work for you if:
a) you have A LOT of apps installed.
And by "a lot", I mean more than 90-100 apps, but if you have a 8Gb model, you probably don't
b) you're running ART (this is default in lollipop and newer)
Since ART uses a lot more space than dalvik, the space in the /cache partition probably won't be enough. When I was running ART, it used 1Gb more than dalvik.
Original post by @Bert98
Click to expand...
Click to collapse
This was tested on my moto g 16GB which is running RetailUS_4.4.4 kitkat with CWM recovery. The custom ROM procedure was tested on the same phone but with cm11 Nightly installed.
Prerequisites:
1. You must have "adb root" functioning. If you don't head to this thread: http://forum.xda-developers.com/showthread.php?t=1687590 and there is a free download link at the bottom of the post.
Download and install the apk on your phone. Open up adbd insecure (the new app) and grant it superuser rights PERMANENTLY. Check the box that says "enable insecure binary" and make sure to check the box
that says "enable at boot."
2. You must have a recovery that can accept adb shell commands.
3. Root Access Duh?!
4. A windows machine capable of running batch files.
5. A decent text editor, notepad will work but notepad++ is strongly recommended. (Only needed if you are using STOCK ROM procedure)
Please, please make a nandroid backup before you continue!!!!
Stock ROM procedure:
Read the directions very carefully and then read them again, before continuing.
1. Download the cachemover_v1.3.zip from: LINK REMOVED DUE TO SCRIPT ISSUES.
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover_Stock.bat
5. Follow the onscreen instructions until you get to the part where it says to edit a file.
6. About halfway through the script it will pull a file called "init.qcom.post_boot.sh" to the folder.
7. Open it with a TEXT editor and navigate to about line 487 (Might be different for 8gb model). Look here for a better understanding: https://www.dropbox.com/s/jr5lyl5s5i2jtpg/where to paste code.PNG?dl=0
8. Start a new line and paste this code in the file: (Refer to the image above for help)
Code:
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
9. Make sure to save the file in the same folder as the cachemover_Stock.bat
10. Press any key to continue on the script and let it do its thing.
11. It will reboot several times and land you on the home screen/lock screen.
12. If the script hangs after a reboot, you need to unlock the device to reestablish a connection with your computer.
13. There might be one or two force closes but once you close the notifications they will not come back.
Custom ROM procedure:
USE THIS FOR ROMS THAT DO NOT REMOUNT OR CHANGE PERMISSIONS OF /CACHE ON BOOT
1. Download the cachemover_v1.3.zip from: https://www.dropbox.com/s/bzj34g4q1s61ojz/cachemover_v1.3.zip?dl=0
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover.bat
5. Follow the onscreen instructions.
If anything goes wrong:
Go to recovery, wipe cache, then wipe dalvik-cache and reboot. This should get your device back to how it was.
(If you used STOCK ROM procedure)
The script made a backup of the "init.qcom.post_boot.sh" file to /sdcard/init_backup
You can restore the shell script to /system/etc/ via shell commands or by using a root browser. To restore permissions:
Code:
chmod 740 /system/etc/init.qcom.post_boot.sh
chown root:root /system/etc/init.qcom.post_boot.sh
Custom ROM procedure already has a restore script!
I am currently working on an auto restore script for stock and that will be relased soon, hopefully! :good:
Changelog:
v1.0 - First stable release. Does not work on STOCK ROM.
v1.1 - Added a restore script.
v1.3 - Added support for STOCK ROM. There are still a few bugs.
How it works?!?!
Coming soon...
Huge thanks to @Bert98 and @dd043
Hit the thanks button if it worked! I went through about 50 factory resets, and reflashed the ROM about 25 times, and put about 10 hours of work into this script! Really motivates me for future projects. :laugh:
Thanks for your help man and effort.
I encountered a problem, everything works up until my device boots in CWM to fix permissions, then just sits there doing not alot I don't even see the option in my CWM.
Any ideas? cheers
Sent from my XT1032 using XDA Free mobile app
When it reboots to cwm unplug the cable and replug it, if it hangs just type these commands manually from a command window.
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
reboot
If this does not work you may ned to go into mounts & storage in the cwm menu and click mount /cache. Then try the commands again.
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
You have a typo in the threads title. Just a heads up.
Vuciz said:
You have a typo in the threads title. Just a heads up.
Click to expand...
Click to collapse
Thanks for letting me know!
dd043 said:
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
Click to expand...
Click to collapse
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
skyguy126 said:
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
Click to expand...
Click to collapse
Yes I've tried your script, all went well but the result is the same. The script itself works nicely btw
Applications present before moving cache work perfectly, but I can't install anything new. I suspect it might be my device but before wiping everything I'd prefer feedback from others :fingers-crossed:.
I cannot install new apps as well. The mount command you showed me has the same effect too. I honestly don't know anymore, the sym link did not allow the install of new apps nor did the mount command you sent me. Correct me if I am wrong.
Edit: Going through all the init files on my phone to see which one remounts /cache at boot.
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
I don't see the mount cache command in CWM strange
I've managed to get back to normal, thanks for everyone's help though, I will keep and eye on the thread
Sent from my XT1032 using XDA Free mobile app
non-windows version?
Thanks for this tool. It's a great idea and our Motos really need it.
However, I have a problem - I do not own a windows license (os x and ubuntu user) and I would prefer not to spend $120 just to use it for this script. Pirating is out of the question for me.
I was wondering if there is any chance of having this script written for linux and/or mac. If impossible, is there a LEGAL way of running windows in a virtual machine? Something like a trial or similar?
If you know how just convert it to shell script for osx and Linux. I give you permission to do this but you may not take credit or rehost your creation.
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
skyguy126 said:
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
Click to expand...
Click to collapse
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
dd043 said:
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
Click to expand...
Click to collapse
How about making a simple apk that toggles this feature. Something like when you click the icon it doesn't even open but gives a little notification of success. Something like that. I myself am not experienced with apks but I can put together a shell script for the apk.
skyguy126 said:
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
Click to expand...
Click to collapse
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
Ill try it. I don't mind doing a bunch of resets because I am using my moto g as a test bench anyway. My daily driver is the OnePlus One
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
EDIT: Unfortunately it didn't work. I don't know if I modified the installd file correctly. The program I used is HxD.
Is there a way we can force dalvik to start after the directories are created. And change dalvik to create it in /cache.
How to fix always maxed CPU usage and its result, high battery drain.
Whats the reason?
This is due to some "program" that tries to log something, unfortunately, this process takes up all CPU capacities.
I have encountered this issue (after Nandroid Restore) and I thought it might by worth mentioning. It not only happens after Nandroid Restores, as my friend reported.
What you need to fix this:
You will need a rooted device, and a file explorer (root explorer)
Optional: Any terminal emulator, and busybox (just for diagnostics)
How to fix it:
Just start the explorer, and navigate to
Code:
/system/bin
and there search
Code:
logd
. Rename this to
Code:
logd.bak
and Restart
Optional diagnostics (or if method above doesnt change anything: Start your Terminal Emulatorand type this:
Code:
su
then
Code:
busybox top
This will give you all inforamtions about the running processes. If you see another process (very unlikely) that takes up much CPU capacity, and you dont need for ANYTHING (like that logd thingy) you can do same thing as above (just track its path)
Hope I helped you. Thanks
thanks for the guide, but is that comic sans?
Hey, this looks like the same procedure as with other phones to disable logd since it's part of Android, but I don't think this would work for those who develop Android apps and rely on Logcat for debugging. Otherwise thanks!
If you restore system image instead of system this does not happen. At least in my testing.
You can also recover from this by running flashall with -w removed.
Thanks for the tip too.
Sent from my Pixel using Tapatalk