How to install app as a system app? - Desire Themes and Apps

Hi, is there something i'm doing wrong, some wrong step?
1. Desire is S-OFF.
2. Mounted /system/app as r+w through Root Explorer.
3. Copied app to this directory (Google Earth, AutoSketch)
4. Made them 644 permissions. Rebooted.
5. Apps were installed, but they force close, no way to open them.
What could be the error from the above ?
Tnx

Can really see anything wrong here. Are the apps installed to begin with in data/app? If so, there is no need to change the permissions (even too the permissions might be correct, really don't know) also is there enough room on the system partition?
Last thing is that it might not work on Oxygen RC, no idea why but that was the first time I had FC after moving stuff to the system partition.

m4dm4n123 said:
Hi, is there something i'm doing wrong, some wrong step?
1. Desire is S-OFF.
2. Mounted /system/app as r+w through Root Explorer.
3. Copied app to this directory (Google Earth, AutoSketch)
4. Made them 644 permissions. Rebooted.
5. Apps were installed, but they force close, no way to open them.
What could be the error from the above ?
Tnx
Click to expand...
Click to collapse
try to clear Dalvik-cache after pushing apps.

Tried clearing Dalvik-Cache, same error.
Something from the logcat :
"[ 01-03 20:33:05.650 983:0x3d7 I/ActivityThread ]
Publishing provider com.google.earth.SuggestionProvider: com.google.earth.SearchSuggestion
[ 01-03 20:33:05.710 983:0x3d7 W/dalvikvm ]
Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lcom/google/earth/EarthActivity;.<clinit>
[ 01-03 20:33:05.710 983:0x3d7 W/dalvikvm ]
Class init failed in newInstance call (Lcom/google/earth/EarthActivity
[ 01-03 20:33:05.710 983:0x3d7 D/AndroidRuntime ]
Shutting down VM
[ 01-03 20:33:05.710 983:0x3d7 W/dalvikvm ]
threadid=1: thread exiting with uncaught exception (group=0x4001d7e8)"

Most simple way:
Install the apk the usual way ("run" the file)
Use "root explorer" to move the installed apk from /data/app to /system/app
Reboot...
Done!!!
Sent from my HTC Desire using XDA App

Tnx man, that did it. Uninstalled previous versions of apps in /system/app if they existed, moved some of the apps from the /data/app to the /system/app.
Rebooted to recovery , cleared Dalvik Cache (this is,i believe, a must because old apps files will remain), and that's that.

what do you gain by installing app as a system app and if is s-off needed?

Since I'm on Cyanogenmod, I have 125 MB unused space on 250 MB /system partition. /data partition is ultra small, and there is always a space problem with it.
Until Alpharev makes partition tables for PVT-4 Desires (/system=150MB, /data=200MB), this workaround will just have to do. I don't like it when "internal memory" is only 25MB free, and /system has plenty of space waiting.
S-OFF is definitely a must, because of r+w privileges on a /system partition.
P.S. I don't care about Anything2SD solutions, I like it clean and transparent.

Related

Moving apps to the /system/apps directory?

I have about 60mb free in the /system/apps and would like to move my apps that are on the /data/apps partition to the system memory... so that way I don't have to worry about memory going down on the apps i know I want to keep..
Currently running cyanogen 6.0. I tried using root explorer to move the apps to the system but when i install them they aren't actually in the /system/app...
Thanks,
-Nigel
If you're using root explorer you don't actually "install" them. You just move them to the /system/app/ dir. After you do that you'll probably have to change the permissions on the file. To do that:
long press the .apk
select permissions
select all of the boxes on the 'read' column (left column)
select the 'user' 'write' box (top middle)
uncheck the other 5 if needed
You'll most likely have to reboot afterwards and you might need to clear the cache/davlik in recovery if you're getting FC's
If they're still not showing up fix the uid apk permissions in recovery or terminal
Recovery:
other > fix uid mismatches
Terminal emulator:
Code:
su
fix_permissions
Get Titanium backup for root -> Under "Batch" operations you have an option to move apps to SD and vice versa. You can select apps that you would like to move and run it.
Thanks for the reply.
The above method worked perfectly fine!
I think my problem was that I didn't reboot or wipe the chache...lol I just expected everything to be updated and when I checked it it still didn't chnage I was a little confused.! Awesome. Just freed up about 40mb!
I have titanium backup but dont' want to install apps to the SD card... I don't see that as a benefit.. when there is space else where that will never get used. Where as the SD cardw will keep growing due to music and things like that..
thansk for the help!!
-Nigel

[GUIDE]Moving Dalvik-Cache to /Cache -Viewpad 7 Tested

Moving Dalvik-Cache to /cache
Notes:
If you want to move the Dalvik-Cache to /cache you will needed to the following:
1. A Viewpad7 or another branded device (such as: Cherry Mobile Superion, Commtiva Linx N700, Olivepad VT-100, Spice MI700, and Camangi FM600..........)
2. Already got the root permission (For running a set of command)
3. ADB or Terminal Emulator (For running the command)
4. Root Explorer(Optional - if you have a lot of patience for typing)
Steps
1. Build a file call "install-recovery.sh" into the /etc (Path: /etc/install-recovery.sh) With 711 Permission. (Or you can build it in your computer and put it in the sdcard then copy it using Root Explorer.
Code:
#!/system/bin/sh
chmod 771 /cache
2. Move your dalvik-cache and Create Symbolic Link
(You may experience some program FC (Force Close), but never mind)
Code:
mv /data/dalvik-cache /cache/dalvik-cache
ln -s /cache/dalvik-cache /data/dalvik-cache
You've done the action!
If you got a LOT of FC after move the dalvik-cache.
Please go to /(Root) to check the permission of the /cache it may be become 770.
Remarks:
I think it is able to do the same things to a SD Partition or A2SD.
However I have try it. (Because I still haven't install the Custom Recovery.)
If you have any problems. Please leave a message here.
If you want to forward this message. Please provide the source URL in your message.
DISCLAIMER: I cannot be held liable for anything you do to your Viewpad 7 (or equivalent device).
[DISCLAIMER Copy from lakehousetech thanks for your DISCLAIMER.]
Will this still works, after reboot ?
Yes It will be. The install-recovery.sh scripts will be automatically run everytime you boot up the viewpad 7
i found a more efficient method, moving dalvik chache to sd card partitions... using rom manager and link2sd..
wazzzuuuup2 said:
i found a more efficient method, moving dalvik chache to sd card partitions... using rom manager and link2sd..
Click to expand...
Click to collapse
Hah same here And it works great
Could either of you guys who are using ROM Manager/Link2SD provide instructions for how you set that up? Thanks!
Edit, a few days later. Disregard, figured it out on my own. For anyone else interested...
If you're one a Windows based machine, download this, and use it to create an ext2 partition on your SD card. Personally, I copied the contents of the SD over to my computer before I did so, then copied them back after I was done. With link2sd, you can just adjust all the "user" apps to link to the SD, and set it up so it does likewise on install of new apps. Very easy.

[Q] Insufficient Storage :-/ What to do

Hey Guys whenever i download any apps from market i get the error Install Unsuccessful .... Insufficient storage ...
What to do :-/
Rom Hell Fire v7.2
UOT Kitchen Flashed 1
Overclocked 729 Mhz
Wildfire
delete apps or move some to SD card? If your memory is full it's logical you can't add apps
Sounds to me that a2sd is not properly set up.
I been having some issues running out of storage internaly. and after some fiddeling around with a2sd it was ok. And how to do it is posted in this rom's explanation on how to install it.
ruymanca said:
The ROM takes about 10 minutes to start for the first time since the beginning makes for a facility, I recommend formatting the memory trageta do a clean install or possibly delete the folders: ANDROID, LOST DIR ANDROID as these folders SECURE conflicts created by data from the old roms
I recommend making partitions ie swap64mb ext512 and the rest as fat32 mind too expensive or necessarily recommend formatting the card will memory or possibly delete the folders in the same android, haer all the wipes, the Rom takes a few minutes to make first start since being installed all the extras on the first boot takes 3 to 5 minutes, once this echo this start and made ​​previous settings obligation is to do a reboot for full functionality telefeno
Installation of the rom:
1. reboot in recovery mode
2. we wipes all
3. selected to install update sip
4. restart the tlf
5. enter the terminal console and register the following:
his press enter
# a2sd cachesd or enter
the phone will reboot and have about 150 megs of free internal memory
Click to expand...
Click to collapse
nope dint workk :-/
Type "su" first (Without Quotes), then try the a2sd command.
Can u mention it Step by Step?
Hi all, i have same issue.
Yesterday i finally rootat my Wildfire and put Cyanogenmod 7.0.3.stable on it.
Its very nice!
BUT cant allways install apps from market. I have 87mb free on inside memory and 1,7gb in sdcard... So what is problem?
What i need to do? I can full wipe all my data from telefone if somone tell me how i can do this..
Can somone help?
Use dalvik wipe from xrecovery to clean ur phone data..
Sent from my U20i using XDA Premium App
try istalling darktremor a2sd script (need to be istalled from recovery if not already integrated into your rom) and download a2sdgui from market, it's a gui for the script mentioned earlier. into recovery you have to partition your sd card too (advanced) 1024mb ext and i suggest 64mb swap, then open the app I told you (a2sdgui) and move everything to ext, dalvik cache too.
I agree with the poster above.
if you have issues with a2sd, I recommend installing A2SDGUI from market. (I assume you already have darktremors a2sd script installed). I had darktremors script working fine, but after flashing a zip file, it was not working. So I installed the A2SDGUI from darktremor and fixed the script. Now it is working. Just search the market and install it. It is great. Now I have around 168 MB free after all the installed apps.
Hope this helps,
SOLUTION TO INSUFFICIENT STORAGE:
1. Use FROYO+ default apps2sd. It gives the option to force moving of 95% of the apps to sdcard. Even root is not necessary. You can move 95% of apps only after using the adb command "adb shell pm setInstallLocation 2". This command is not even needed in cm7. And this method uses the fat/fat32 partition of sdcard not the ext partition. Specifically apps will be installed to .android_secure folder in the root of sdcard.
2. This method includes creating ext partition on sdcard and using an app called "link2sd". This is a root only app. No scripts are needed. That app has option to even link individual apps to ext partition. Also links dalvik cache.
3. Creating ext + swap partition and using dtapps2sd script. Root is required. Also custom recovery is required for flashing the script. This might be the toughest one but it is pretty awesome. Moves apps , data, dalvik cache to ext partition. Everything can be done with commands from the terminal emulator. Or you can use the "a2sdgui" app for graphical user interface.
Sent from my HTC Wildfire using XDA App
The GUI for the script is much more user-friendly than emulator terminal. And you can undo everything you did if it's not as you tought faster than from terminal.
I am not aware of how Hell Fire works. But yes for Cyanogenmod 7 I know there is a issue downloading a large application from the market. It won't download. Problem is the space.
Fix for this is few steps:
1. In Terminal type the following commands.
2. su
3. mkdir /sdcard/download-cache
4. cd /cache
5. mv download download.bak
6. ln -s /sdcard/download-cache download
Done... Now Go to market and download anything you won't get such errors..
If It Helps Don't forget Press Thank Button.
Thanks a lot!
I just get my new sd-card( 16 Gb) and install darktremor a2sd script + a2sdgui.
Works just like it says!
No more thinking what program van install and what not....
Well I just installed the MOdd Again ... and I was done
Though i bought Samsung Galaxy ace as its my second time the Touch Panel doesn't work ... first in Tattoo and den in Wildfire
So ... Thanx a lot guys for Helping
DestinyAwaits said:
I am not aware of how Hell Fire works. But yes for Cyanogenmod 7 I know there is a issue downloading a large application from the market. It won't download. Problem is the space.
Fix for this is few steps:
1. In Terminal type the following commands.
2. su
3. mkdir /sdcard/download-cache
4. cd /cache
5. mv download download.bak
6. ln -s /sdcard/download-cache download
Done... Now Go to market and download anything you won't get such errors..
If It Helps Don't forget Press Thank Button.
Click to expand...
Click to collapse
Working perfectly fine for me Thanks!

[FIX][ROOT REQUIRED] Insufficient storage error on app update/install in play store

For those getting an insufficient storage error in the Google play store or when side loading, which only affects specific apps (not all apps, which has been discussed elsewhere) the following may work for you.
The error is caused by application data folders, which you will have to delete and then reinstall the app. Steps to fix are below:
1) Uninstall the app in the app manager
2) Using your favorite file explorer with root access navigate to /Data/app-lib/
3) Find the folder, which corresponds to the package you have having issues with (for instance com.adobe.reader-1 for adobe reader) and delete it
4) Reinstall from the android market
5) OPTIONAL - restore backup of your data from titanium backup.
Hopefully this will prevent you needing to reflash the ROM and format storage, which i was about to do before rooting around in the app-lib folder and noticing the folders for uninstalled apps that I could not re-install were still there.
Dav_prime said:
For those getting an insufficient storage error in the Google play store or when side loading, which only affects specific apps (not all apps, which has been discussed elsewhere) the following may work for you.
The error is caused by application data folders, which you will have to delete and then reinstall the app. Steps to fix are below:
1) Uninstall the app in the app manager
2) Using your favorite file explorer with root access navigate to /Data/app-lib/
3) Find the folder, which corresponds to the package you have having issues with (for instance com.adobe.reader-1 for adobe reader) and delete it
4) Reinstall from the android market
5) OPTIONAL - restore backup of your data from titanium backup.
Hopefully this will prevent you needing to reflash the ROM and format storage, which i was about to do before rooting around in the app-lib folder and noticing the folders for uninstalled apps that I could not re-install were still there.
Click to expand...
Click to collapse
Many thanks , cause i,ve tried everyhting, lucky patcher, clear devil-cache, system-cache, clear market , everything, but this solutions was the only one that works. Now i can install the app
The real problem is a permissions issue. There's a more elegant solution which doesn't involve deleting a folder nor deinstalling an app.
a) With your favorite terminal program navigate to /data/app-lib (/data, not /Data, case is very important). I do this from my Linux box, accessing the phone remotely with the help of SSHDroid.
b) Then, do an "ls -la" to see the files inside this directory along with their permissions. In my case, I see this:
Code:
/data/data/berserker.android.apps.sshdroid/home # cd /data/app-lib
/data/app-lib # ls -la
total 1089
drwxrwx--x 135 system system 8192 Mar 26 17:11 .
drwxrwx--x 25 system system 4096 Mar 26 22:55 ..
drwxr-xr-x 2 system system 4096 Feb 18 17:28 ND.filter-1
drwxr-xr-x 2 system system 4096 Mar 4 17:20 aolmo.WifiCrackWLAN-1
drwxr-xr-x 2 system system 4096 Mar 26 08:06 at.sapps.applauncherdashclockextension-1
drwxr-xr-x 2 system system 4096 Feb 26 19:18 berserker.android.apps.ftpdroid-1
drwxr-xr-x 2 system system 4096 Mar 10 08:25 berserker.android.apps.sshdroid-1
drwxr-xr-x 2 system system 4096 Mar 10 08:26 berserker.android.apps.webdroid-1
...
drwxr-xr-x 2 system system 4096 Mar 21 22:55 pl.baggus.barometr-1
drwxr-xr-x 2 system system 4096 Mar 16 21:08 robj.any.dash-1
drwxr-xr-x 2 system system 4096 Mar 8 16:21 ru.gloom.SMSExtension-1
drwxr-xr-x 2 system system 4096 Mar 2 19:10 stericson.busybox-2
As you can see, every folder belongs to system:system and has the "drwxr-xr-x" permissions. If, for whatever reason, the folder corresponding to the non-working app looked different, the fix is easy:
1) If it had a different user or group, run this command:
Code:
chown -R system:system [I]name.of.the.folder[/I]
2) If it had different permissions, run this command:
Code:
chmod -R 755 [I]name.of.the.folder[/I]
That's it!
Of course, if the problem lies inside a folder other than /data/app-lib, just navigate to the corresponding folder
Also...
MOD EDIT @gregbradley
XDA RULES
6. Do not post or request warez.
If a piece of software requires you to pay to use it, then pay for it. We do not accept warez nor do we permit members to request, post, promote or describe ways in which warez, cracks, serial codes or other means of avoiding payment, can be obtained or used. This is a site of developers, i.e. the sort of people who create such software. When you cheat a software developer, you cheat us as a community.
Click to expand...
Click to collapse
This may work for some people, usually when there is a .odex file left over from some previous processes. For me it did not work, which is why I had to do it the way I posted in the OP.
Just clear data
None of the above worked for me. I saw on another site to go in the App Manager (Settings > Apps) and "clear data" for the troubled app(s). This worked for me.
Dav_prime said:
For those getting an insufficient storage error in the Google play store or when side loading, which only affects specific apps (not all apps, which has been discussed elsewhere) the following may work for you.
The error is caused by application data folders, which you will have to delete and then reinstall the app. Steps to fix are below:
1) Uninstall the app in the app manager
2) Using your favorite file explorer with root access navigate to /Data/app-lib/
3) Find the folder, which corresponds to the package you have having issues with (for instance com.adobe.reader-1 for adobe reader) and delete it
4) Reinstall from the android market
5) OPTIONAL - restore backup of your data from titanium backup.
Hopefully this will prevent you needing to reflash the ROM and format storage, which i was about to do before rooting around in the app-lib folder and noticing the folders for uninstalled apps that I could not re-install were still there.
Click to expand...
Click to collapse
well.... there's a problem for me, i open up /data, but /app-lib is missing
terrybear2k said:
well.... there's a problem for me, i open up /data, but /app-lib is missing
Click to expand...
Click to collapse
Which /data directory are you in? Did you navigate up to root first?
Good looks! Gonna try this next time I get a 'insufficient storage' message.
Dav_prime said:
Which /data directory are you in? Did you navigate up to root first?
Click to expand...
Click to collapse
i guess its root, the content is different from my sdcard's, (eg. acct, app-cache, cache, config, data, dev) with es file explorer. but then i use sd-maid, i can see the contents inside "data". guess es stopped 1/2 of the support for browsing root folders?? weird... but still, when using sd-maid the app-lib still missing. i can see "anr, app, app-asec, app-private, audio"
Dav_prime said:
Which /data directory are you in? Did you navigate up to root first?
Click to expand...
Click to collapse
I also do not have /data/app-lib, and I'm certain I nav'd up to root first. any suggestions would be most welcome. I'm unable to install *any* new app, either from Play, or as a side-load.
tia, RA
rrtid54 said:
I also do not have /data/app-lib, and I'm certain I nav'd up to root first. any suggestions would be most welcome. I'm unable to install *any* new app, either from Play, or as a side-load.
tia, RA
Click to expand...
Click to collapse
found a fix that worked for me, and others here:
http://forum.xda-developers.com/showpost.php?p=32155340&postcount=12
Yeah there are a lot of causes for these errors so this may not be the fix you need.
I have the app-lib folder on my nexus4 running stock 4.4.
What devices and roms are you running?
Dav_prime said:
Yeah there are a lot of causes for these errors so this may not be the fix you need.
I have the app-lib folder on my nexus4 running stock 4.4.
What devices and roms are you running?
Click to expand...
Click to collapse
thanks for the reply. device is a VZW Galaxy S3, rooted but stock ROM, 4.1.2. 'link2sd' worked to correct the problem.
be well, RA
I recently started having this problem with hangouts and Google drive, and I can't find the corresponding folders in my app-lib folder. Anyone know where google stores those files?
cliffyb said:
I recently started having this problem with hangouts and Google drive, and I can't find the corresponding folders in my app-lib folder. Anyone know where google stores those files?
Click to expand...
Click to collapse
Look in /system/app
Sent from my Nexus 5 using XDA Free mobile app
jd1639 said:
Look in /system/app
Sent from my Nexus 5 using XDA Free mobile app
Click to expand...
Click to collapse
I found the hangouts apk in /system/app/ but deleting that just uninstalls hangouts, and attempting to reinstall just gives me the insufficient space message again
cliffyb said:
I found the hangouts apk in /system/app/ but deleting that just uninstalls hangouts, and attempting to reinstall just gives me the insufficient space message again
Click to expand...
Click to collapse
I would try flashing the cache.img from the factory image in fastboot
Sent from my Nexus 5 using XDA Free mobile app
edmann
OK, thanks dav_prime. /data/app-lib worked like a charm. I used root explorer and instead of fishing through things I deleted the whole file. Reinstalled from play store no error message.
Dav_prime said:
For those getting an insufficient storage error in the Google play store or when side loading, which only affects specific apps (not all apps, which has been discussed elsewhere) the following may work for you.
The error is caused by application data folders, which you will have to delete and then reinstall the app. Steps to fix are below:
1) Uninstall the app in the app manager
2) Using your favorite file explorer with root access navigate to /Data/app-lib/
3) Find the folder, which corresponds to the package you have having issues with (for instance com.adobe.reader-1 for adobe reader) and delete it
4) Reinstall from the android market
5) OPTIONAL - restore backup of your data from titanium backup.
Hopefully this will prevent you needing to reflash the ROM and format storage, which i was about to do before rooting around in the app-lib folder and noticing the folders for uninstalled apps that I could not re-install were still there.
Click to expand...
Click to collapse
Thanks!
Dav_prime said:
For those getting an insufficient storage error in the Google play store or when side loading, which only affects specific apps (not all apps, which has been discussed elsewhere) the following may work for you.
The error is caused by application data folders, which you will have to delete and then reinstall the app. Steps to fix are below:
1) Uninstall the app in the app manager
2) Using your favorite file explorer with root access navigate to /Data/app-lib/
3) Find the folder, which corresponds to the package you have having issues with (for instance com.adobe.reader-1 for adobe reader) and delete it
4) Reinstall from the android market
5) OPTIONAL - restore backup of your data from titanium backup.
Hopefully this will prevent you needing to reflash the ROM and format storage, which i was about to do before rooting around in the app-lib folder and noticing the folders for uninstalled apps that I could not re-install were still there.
Click to expand...
Click to collapse
Very Helpful! Thanks a lot!
--Rafael

[MOD][SCRIPT] Get More Storage by Relocating Dalvik Cache!

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.

Categories

Resources