1. Download our Official Android App: Forums for Android!

Root Force App Install to Internal Memory?

Discussion in 'Android Devices' started by lexluthor, Jul 8, 2011.

  1. lexluthor

    lexluthor Android Expert
    Thread Starter
    Rank:
    None
    Points:
    283
    Posts:
    4,161
    Joined:
    May 15, 2010

    May 15, 2010
    4,161
    402
    283
    Long Island, NY
    Not sure if this is a root specific question, but I'll start here.

    Is there any way to force all apps to install to the internal memory? We have so much internal memory that I really don't want apps installed on the SD card.

    What's even more annoying is if I originally install and app and it goes to the SD card, by default, then I move the app to internal memory manually, if I then update the app, it goes back to the SD card.

    Is there a way to tell apps that support apps to App2SD and are coded to default to the SD card to still install to internal memory?
     

    Advertisement

  2. binary visions

    binary visions Android Expert
    Rank:
    None
    Points:
    413
    Posts:
    3,334
    Joined:
    May 14, 2010

    May 14, 2010
    3,334
    1,443
    413
    CM7 supports forcing all apps to install one place or another.

    Probably not exactly the answer you were looking for, but it's there.
     
    Airmaxx23 likes this.
  3. Airmaxx23

    Airmaxx23 Android Expert
    Rank:
    None
    Points:
    313
    Posts:
    3,142
    Joined:
    Jun 21, 2010

    Jun 21, 2010
    3,142
    1,039
    313
    Oh...I need to find this setting.:eek:

    Edit: Found it, thanks for the heads up.
     
  4. lexluthor

    lexluthor Android Expert
    Thread Starter
    Rank:
    None
    Points:
    283
    Posts:
    4,161
    Joined:
    May 15, 2010

    May 15, 2010
    4,161
    402
    283
    Long Island, NY
    No, not the answer. I should have mentioned I'm stock 2.3/rooted.

    But, if CM7 can do it, there must be a way.

    Surprised there's not an root app that can allow me to toggle the setting.

    Ok, someone can figure this out I'm sure.
     
  5. VoidedSaint

    VoidedSaint Resident Ninja
    Rank:
    None
    Points:
    423
    Posts:
    8,201
    Joined:
    Feb 10, 2010

    Feb 10, 2010
    8,201
    2,090
    423
    Male
    Virginia
    i have also heard of a different trick that uses paid apps on the sd card which is morally wrong and no one should do it, i personally havent tried this, because i dont want to so :p i take p3droids word on it
     
  6. bouchigo

    bouchigo Android Expert
    Rank:
    None
    Points:
    413
    Posts:
    3,756
    Joined:
    Aug 10, 2010

    Aug 10, 2010
    3,756
    1,026
    413
    Production Engineer Mngr.
    Stockton, CA
    I didn't even realize you had that option in CM7.......don't know that I will ever use it, but nice to know nonetheless :D
     
  7. binary visions

    binary visions Android Expert
    Rank:
    None
    Points:
    413
    Posts:
    3,334
    Joined:
    May 14, 2010

    May 14, 2010
    3,334
    1,443
    413
    That's not what he means. He means installing it from the market, copying the APK from /data/app to your SD card and then returning the app.
     
  8. VoidedSaint

    VoidedSaint Resident Ninja
    Rank:
    None
    Points:
    423
    Posts:
    8,201
    Joined:
    Feb 10, 2010

    Feb 10, 2010
    8,201
    2,090
    423
    Male
    Virginia
    yeah that same technique is being used on some paid apps, transfering it to sd card, copying that same data, and refunding the money in 15 mins
     
  9. bouchigo

    bouchigo Android Expert
    Rank:
    None
    Points:
    413
    Posts:
    3,756
    Joined:
    Aug 10, 2010

    Aug 10, 2010
    3,756
    1,026
    413
    Production Engineer Mngr.
    Stockton, CA
    Doesn't TiBu do that?
     
  10. lexluthor

    lexluthor Android Expert
    Thread Starter
    Rank:
    None
    Points:
    283
    Posts:
    4,161
    Joined:
    May 15, 2010

    May 15, 2010
    4,161
    402
    283
    Long Island, NY
    Back on track please?
     
  11. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,295
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,295
    23,674
    2,138
    Male
    space alien ;)
    Indy
    Lex,

    Don't think I have a concrete answer, but I have some background info that might shed a little more light on your issue / question.

    Beginning with Android 2.2 / Froyo, the AndroidManifest.xml for each app can contain an android:installLocation attribute in the manifest element that can have a value of either "preferExternal" or "auto".

    Here's the description (taken from App Install Location | Android Developers):

    If you declare "preferExternal", you request that your application be installed on the external storage, but the system does not guarantee that your application will be installed on the external storage. If the external storage is full, the system will install it on the internal storage. The user can also move your application between the two locations.

    If you declare "auto", you indicate that your application may be installed on the external storage, but you don't have a preference of install location. The system will decide where to install your application based on several factors. The user can also move your application between the two locations.


    (There's also a lot of other good / interesting information in the above linked page).

    Anyway, it seems to me that since the content of the AndroidManifest.xml file in the app's .apk controls where the app can be installed, it doesn't seem likely that you can dynamically modify the AndroidManifest.xml file's android:installLocation attribute's value, re-pack, and re-sign it just prior to being installed.

    Also, the Android package installer's APIs are no longer public (ref. Google, Android, and Private APIs. Al Sutton's Blog), so it must be that the CyanogenMod team has developed their own app installer to affect where an app eventually gets installed.

    Hope that helps a little.

    Cheers!
     
  12. lexluthor

    lexluthor Android Expert
    Thread Starter
    Rank:
    None
    Points:
    283
    Posts:
    4,161
    Joined:
    May 15, 2010

    May 15, 2010
    4,161
    402
    283
    Long Island, NY
    I just found this thread.
    [APP][Froyo][root] Move2SD Enabler - ex SetInstallLocation - xda-developers
    Seems like the main use is to force install to SD Card, but looks like it also has an option to force install to internal memory.

    Somewhere in the middle of the thread, there's a link to a beta version that works on gingerbread.

    Little scared to try it though.

    Thoughts?
     
  13. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,295
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,295
    23,674
    2,138
    Male
    space alien ;)
    Indy
    Says it for Froyo only (although I didn't read through each page of the thread to see if the OP got it to work for GB or if a GB user had any success with it).

    You're not on Froyo still are you, Lex?
     
  14. lexluthor

    lexluthor Android Expert
    Thread Starter
    Rank:
    None
    Points:
    283
    Posts:
    4,161
    Joined:
    May 15, 2010

    May 15, 2010
    4,161
    402
    283
    Long Island, NY
    I'm on gb.

    This post has a link to a beta version that should work for gb.
    xda-developers

    Not sure I really want to try it though.

    Do you all think this might work to allow me to install always to internal memory by default?
     
  15. lexluthor

    lexluthor Android Expert
    Thread Starter
    Rank:
    None
    Points:
    283
    Posts:
    4,161
    Joined:
    May 15, 2010

    May 15, 2010
    4,161
    402
    283
    Long Island, NY
    No one really figured this one out yet? Surprised there's not some easier way to do this. I hate having an app on internal memory and then when I upgrade, it goes to the SD Card and then I have to move it back.
     

Share This Page

Loading...