[Howto] App2sd Step by step

Search This thread

wolfilein

Senior Member
Aug 31, 2010
223
53
a big part of this new tutorial is not from me, credits go to tot31

New version out !!


Now you can choose if you also want to move the dalvik cache an the /data/data directory to sd (if you have an slow sd-card this will be a bit laggy) (to use this you can now use the update funktion)

and i've added an update funktion and protectet the install function so now you can't install app2sd two times an brick your fimrware

and if this help you you can help/thanks me ;)

If You have an x10 mini (pro) go here :

http://xdaforums.com/showthread.php?t=804574



The leds on boot are Now working :





blue means:

no proplem with sd card booting normal

purple/voilet means
sdcard malfunktion booting with failsafe



.

How To : App2sd on Xperia X10i

Pre Installation.
Root the phone by using z4root ( http://xdaforums.com/showthread.php?t=833953 )

Step 1 : Preparing your micro SD Card.
Please refer to this link ( http://xdaforums.com/wiki/index...rd_partitioning ) on how to prepare your micro sd card.

For better performance I would advise that you use a Class 10 card instead of the original card that comes with the phone because the card is only Class 2 card. For more infomation on speed class rating of sd card please go here -> http://en.wikipedia.org/wiki/Secure_Digital

An excerpt taken from wikipedia :-
The following are the ratings of some currently available cards:
* Class 0 - These cards do not specify performance, which includes all legacy cards prior to class specifications.
* Class 2 - Minimum of 2 MB/s performance. Lowest speed for SDHC cards.
* Class 4 - Minimum of 4 MB/s performance.
* Class 6 - Minimum of 6 MB/s performance.
* Class 10 - Minimum of 10 MB/s performance.

Note : The recommended maximum size of ext2 partition is 1.4GB. I've tried 3GB before and ended up with unstable system and eventually crash the phone. So if you're really greedy since you've bought a 16GB or 32GB card to partition the ext2 more than the recommended size and if your phone is unstable, you've been warn but normaly 1.4 GB are enough

Step 2 : Download the related files.
1. App2sd : see attachment
2. adb shell : see attachment

Step 3 : Enabling USB Debugging mode on you phone.
Go to Settings -> Applications -> Development -> USB Debugging (check this option).

Step 4 : Installing App2sd.
Create a folder name adb in your pc and extract all the files from adb.zip into this folder.

Connect your phone to your pc and mount the sd card. Extract all the file from app2sd2.1.zip to the root of your sd card. Make sure to unmount the sd card before continue the next step.

In your pc open up a dos terminal box by typing cmd in the Search programs and files box.

Type

cd /adb

then type

adb shell

then type

sh /sdcard/app2sd.sh

you'll be presented by this screen...
+________________________________+
|********************************|
|*Welcome To wolfilein's App2sd *|
|*installing script *|
|********************************|
+------------------------------------------+

~this version should be go on any device ~

+___________________+
|********************|
|* Menu *|
|* *|
|*[0] install app2sd *|
|* *|
|*[2] exit *|
|********************|
+-------------------------+
[0]


now just press the enter key & wait.

Important : Make sure to set your phone screen timeout to the max because Superuser will ask for your permission to allow this script to run. If your screen goes blank, you can't see this prompt and the installation will fail.

after a while you'll get this..

busybox is /system/bin/busybox
rm failed for /etc/mount_sd.sh, No such file or directory
+________________________________+
|********************************|
| finished going reboot now |
|********************************|
+-----------------------------------------+


the both messages above doesn't mean that your installation has failed

Finally after a reboot, your phone is ready with app2sd. From now on when you install any applications it will save into your sd card.

Disclaimer : Do this at your own risk. I will not responsible if any injuries or damage occur to you or your phone ;)
 

Attachments

  • app2sd.zip
    978.6 KB · Views: 9,535
  • adb.zip
    784.1 KB · Views: 8,708
  • app2sd2.1.zip
    949.3 KB · Views: 9,833
Last edited:

seanswn

New member
Jan 25, 2010
4
0
Good, But can someone make a more detail guide on step by step to get this done.

Thank you
 

devein

Senior Member
May 31, 2008
83
10
if I understand this correctly, this script essentially creates link to sd card directory, where previously is a directory of apps.

nice trick, but without any failsafes.
I mean, if you remove sd card you are without /data/app/ directory at all!

there should be some failsafe...

method 1:

script at startup checking:
  • if there is a symbolic link to sdcard? (check attributes of /data/app/ )
  • if directory is a symbolic link and no data exists inside (for example specific directory/file is not existent) ->point the symbolic link to /data/app2/ directory.
to make it work,
/system/app2 directory should be created:
Code:
busybox cp -a /data/app /data/app2

instead of removing it in your script:
Code:
"rm -r /data/app "

also make some specified light flash on the phone, to warn user that old backup copy is used because of sd card malfunction (i've documented a way to do this in:

http://xdaforums.com/wiki/index.php?title=Xperia_X10#Leds_and_backglight
)

for example pink led:
Code:
echo 15 > /sys/class/leds/ledc:rgb1:red/brightness
echo 2 > /sys/class/leds/ledc:rgb1:green/brightness
echo 3 > /sys/class/leds/ledc:rgb1:blue/brightness

method 2:
even better way would be that sd card partition is mounted on every start on system OVER old /data/app/.

this works always in linux - you can mount over non-empty directory without a problem :D

so, if the sd card is not accessible - dont mount sd card apps directory and like in method 1, flash the led or something, and old apps directory would work without doing anything more :)

to check:
- does mounting over non-empty directory works also in android?
- what is the way to add startup script init in the system?
(possibly executed from sd card - when no card is visible, the script would not execute, right :p )
- why there is a 1.4GB limit ? is this a ext2 limit on android ?
 

zdzihu

Retired Recognized Developer
Sep 28, 2008
651
5,141
- does mounting over non-empty directory works also in android?
- what is the way to add startup script init in the system?
(possibly executed from sd card - when no card is visible, the script would not execute, right :p )
- why there is a 1.4GB limit ? is this a ext2 limit on android ?
1. Yes
2. exec your script from either /etc/mount_iso.sh or /system/drm/DxDrm/drm.sh
3. There is no such limit, rather an advised value
 

seanswn

New member
Jan 25, 2010
4
0
Can someone post something like the rooting instruction for App2SD?

Eg: Step 1 - Step 2

With all the links to apps required.

That would be a great thread for everyone !

Thank you
 

h.boushi1987

Senior Member
Mar 4, 2010
424
44
Cairo
I've done all steps but i dont know if it works or not how should i know .....
i installed so many games and app and still 350mb left in device memory

Sent from my X10i using the XDA mobile application powered by Tapatalk
 

androidfanboi

Senior Member
Sep 14, 2010
163
7
hmm

i just keep getting permission denied when it trys to apply apps2sd thru the app2sd.sh i rooted via the one click universal android root
 

androidfanboi

Senior Member
Sep 14, 2010
163
7
****

I did the commands in the end thru terminal on the device all went well apart from it could not locate busybox which was extracted as stated onto root of sd. The phone restarted and basically will not load past the sonyericsson swirly logo. checked on logcat and its crashing due to being unable to mount applog partition.
 

mbrad_26

Senior Member
Sep 15, 2010
237
5
Wigan
So the entire Sdcard need to be format as Ext2 or as mutch as u want , let say around 1 Or 2 GB?
Witch one need to be primary and witch need to be logical?
thx

Sent from my X10i using XDA App
 
Last edited:

wolfilein

Senior Member
Aug 31, 2010
223
53
yes you must make a
"second" patition with ext2 wich is a primary partition
 
Last edited:

mbrad_26

Senior Member
Sep 15, 2010
237
5
Wigan
I did the commands in the end thru terminal on the device all went well apart from it could not locate busybox which was extracted as stated onto root of sd. The phone restarted and basically will not load past the sonyericsson swirly logo. checked on logcat and its crashing due to being unable to mount applog partition.

The same story with me....:eek:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    a big part of this new tutorial is not from me, credits go to tot31

    New version out !!


    Now you can choose if you also want to move the dalvik cache an the /data/data directory to sd (if you have an slow sd-card this will be a bit laggy) (to use this you can now use the update funktion)

    and i've added an update funktion and protectet the install function so now you can't install app2sd two times an brick your fimrware

    and if this help you you can help/thanks me ;)

    If You have an x10 mini (pro) go here :

    http://xdaforums.com/showthread.php?t=804574



    The leds on boot are Now working :





    blue means:

    no proplem with sd card booting normal

    purple/voilet means
    sdcard malfunktion booting with failsafe



    .

    How To : App2sd on Xperia X10i

    Pre Installation.
    Root the phone by using z4root ( http://xdaforums.com/showthread.php?t=833953 )

    Step 1 : Preparing your micro SD Card.
    Please refer to this link ( http://xdaforums.com/wiki/index...rd_partitioning ) on how to prepare your micro sd card.

    For better performance I would advise that you use a Class 10 card instead of the original card that comes with the phone because the card is only Class 2 card. For more infomation on speed class rating of sd card please go here -> http://en.wikipedia.org/wiki/Secure_Digital

    An excerpt taken from wikipedia :-
    The following are the ratings of some currently available cards:
    * Class 0 - These cards do not specify performance, which includes all legacy cards prior to class specifications.
    * Class 2 - Minimum of 2 MB/s performance. Lowest speed for SDHC cards.
    * Class 4 - Minimum of 4 MB/s performance.
    * Class 6 - Minimum of 6 MB/s performance.
    * Class 10 - Minimum of 10 MB/s performance.

    Note : The recommended maximum size of ext2 partition is 1.4GB. I've tried 3GB before and ended up with unstable system and eventually crash the phone. So if you're really greedy since you've bought a 16GB or 32GB card to partition the ext2 more than the recommended size and if your phone is unstable, you've been warn but normaly 1.4 GB are enough

    Step 2 : Download the related files.
    1. App2sd : see attachment
    2. adb shell : see attachment

    Step 3 : Enabling USB Debugging mode on you phone.
    Go to Settings -> Applications -> Development -> USB Debugging (check this option).

    Step 4 : Installing App2sd.
    Create a folder name adb in your pc and extract all the files from adb.zip into this folder.

    Connect your phone to your pc and mount the sd card. Extract all the file from app2sd2.1.zip to the root of your sd card. Make sure to unmount the sd card before continue the next step.

    In your pc open up a dos terminal box by typing cmd in the Search programs and files box.

    Type

    cd /adb

    then type

    adb shell

    then type

    sh /sdcard/app2sd.sh

    you'll be presented by this screen...
    +________________________________+
    |********************************|
    |*Welcome To wolfilein's App2sd *|
    |*installing script *|
    |********************************|
    +------------------------------------------+

    ~this version should be go on any device ~

    +___________________+
    |********************|
    |* Menu *|
    |* *|
    |*[0] install app2sd *|
    |* *|
    |*[2] exit *|
    |********************|
    +-------------------------+
    [0]


    now just press the enter key & wait.

    Important : Make sure to set your phone screen timeout to the max because Superuser will ask for your permission to allow this script to run. If your screen goes blank, you can't see this prompt and the installation will fail.

    after a while you'll get this..

    busybox is /system/bin/busybox
    rm failed for /etc/mount_sd.sh, No such file or directory
    +________________________________+
    |********************************|
    | finished going reboot now |
    |********************************|
    +-----------------------------------------+


    the both messages above doesn't mean that your installation has failed

    Finally after a reboot, your phone is ready with app2sd. From now on when you install any applications it will save into your sd card.

    Disclaimer : Do this at your own risk. I will not responsible if any injuries or damage occur to you or your phone ;)
    3
    *NEWS*

    I'm Aktually working on a new version with brings the following updates:
    You also can decide to move the Dalvik-cache, update modus, a help to add this in custom roms, so you can decide with an setting if you want to use app2sd.

    but it won't give an android app because i haven't any java skills.
    2
    No need for card reader, just plug the phone and use parted
    1
    ok then you have no chance in the moment you onlx can try to flash back (see the thtread in the dev forum) an then install xrecovery because to install it you need root.

    if you already have installed it, press a key while booting and you ghet into
    1
    I did exactly what you told me. in the first page there's 3 files in the attachment (app2sd.zip, adb.zip, app2sd2.1.zip). i've try to extract app2sd.zip to the root of my sdcard but it falis. even if i extract app2sd2.1.zip. (which is I don't know which one do I have to use)
    here is what happened:
    View attachment 500006

    sh /sdcard/app2sd.sh

    There's supposed to be a space in between "sh" and "/sdcard".