FORUMS
Remove All Ads from XDA

Forcing apps to move to storage

777 posts
Thanks Meter: 357
 
By arpruss, Senior Member on 27th June 2011, 12:20 AM
Post Reply Email Thread
I didn't see the mention of this on this forum, but if one has root one can force apps to move to internal storage (or SD if that's where one's device stores them), even if the developers didn't allow it. Just use adb shell or a terminal emulator and then do:
Code:
su
cd /data/app
ls
Now find the name of your app (app.name.apk, say). Then:
Code:
cp app.name.apk /sdcard
pm install -r -s /sdcard/app.name.apk
And if it works fine, you can clean up by deleting /sdcard/app.name.apk

Would be easy to make an app that does that. I like working with a command-line, so I made a little shell script: force-storage.sh:
Code:
mkdir /sdcard/tmp 2> /dev/null
for x in $* ; do
 echo Forcing $x to storage
 cp $x /sdcard/tmp
 pm install -r -s /sdcard/tmp/$x
done
Here is a list of the kinds of apps you shouldn't do this with.

My apologies if everyone already knows this.
 
 
27th June 2011, 12:27 AM |#2  
OP Senior Member
Thanks Meter: 357
 
Donate to Me
More
A bonus/downside (depending on how you think about it) is that the apps so moved won't automatically start on boot. Seems to work with Amazon App Store and Appslib (I didn't try with Market).

And of course (and I assume this is well-known) you can set all apps to install by default to sdcard / internal storage even without root:
Code:
pm setInstallLocation 2
(Do pm setInstallLocation 0 to return to the default.) I think there's an app that does that.
28th June 2011, 05:34 PM |#3  
OP Senior Member
Thanks Meter: 357
 
Donate to Me
More
As part of my learning how to program on Android, I made a little app to force-move apps to SD/internal-storage. Needs root. Be careful what apps you move--some won't work so well when moved.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes