[PRJ] apps2sd discussion

Thanks! Worked like a charm, ref kevmueller and pvella. I stuck to kevmueller and the use of droidexp, but needed my titanium backup (also the apk)!

Sent from my S7
 
I've been playing round with this, and the way that we're currently doing it is only moving some of the directories in /data to /system/sd then bind mounting them.

What I've been wanting to do is, mount the entire data partition to the sd card. Now as I'm still playing round with roms, I've not been able to get it working by modifying the init.rc script as of yet.

But, I copied all of the content from /data to my partition, then mounted it right over the top, which worked!

I'm going to do a slightly modified set of scripts to do this correctly. But this means that the tablet will know that the new data partition is a lot larger than normal, instead of reporting the size of the original data partition.

~Ivy
 
And my first attempt at this caused a boot loop.

Not fun.

So far it does work manually, i.e. typing:

mount -t ext2 /dev/block/vold/179:2 /data/

after boot.

That works quite well. But haven't got the startup script working for that yet.

~
 
Has anyone had any problems with their apps2sd?

I had some issues earlier and have gone more conservative. Just moving the apps.
Ivy, you are very brave to move the whole data directory. I think this might be problematic without a recovery mode.

Sent from my Ideos S7
 
Pvella,

Well one can always restore the firmware =) It's more of a hack at the moment, and it's not really working and I'm not sure why.

For some reason now that I want to script it, it's failing to run the install-recovery.sh for some reason.

In dmesg i'm recieving:

init: cannot execve('/system/etc/install-recovery.sh'): No such file or directory

which is odd, as it's in /system/etc/ and called the right thing.

I have no idea right now =)

~Ivy
 
I had some problems with a media error I was getting, but I think this was from a bad app. I have refreshed my tablet and have everything moved again, but did not install some of the new media files and have had no problems.
 
I think if you try to run android 2.2 is better than find a way to app2sd because android 2.2 can store app in SD
 
We have it working. No need to wait for 2.2. :)

Sent from my Ideos S7
 
hi
I found a program that makes only a shortcut to the program to move it in internal memory program says Link2SD
sorry for my english
 
Hello everyone,

I recently bought a used Huawei based on what I saw in the S7 reviews: basically it is nice and it is (relatively) cheap. All I want is something to browse the web and read my books... all other features are bonuses. This is my first android device, was nervous about rooting it, but that went really smooth. Then I started reading this thread on apps2sd and thought it would be worth trying. I know some basic unix commands but have never done some of the commands listed in these steps such as :

mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system

and this:

mount -t ext2 /dev/block/vold/179:2 /system/sd

Anyhow, I've gone through all the steps and think it is working, but really dont know. I dont have enough apps right now to really know...
I got bit by the end of line characters in the files, although there is plenty of posts here to let people know what to do. I wanted to see if I can expand on this for other people that have trouble with this as well.

To show this end-of-line issue, I built example files from one of the scripts here. copy+paste the script into textpad and saving in UNIX format (example_UNIX.sh), and copy+paste into notepad and saving into windows file format (example_WINDOWS.sh)

then, I used the commands:
adb push example_WINDOWS.sh /sdcard/example_WINDOWS.sh
adb push example_UNIX.sh /sdcard/example_UNIX.sh

now, switch to the Huawei device and look at the files:
adb shell
su
cd sdcard

if you type 'busybox' with no other commands, you get a big list of available unix commands, and two of these commands can help see if you have end-of-line issues: vi and dos2unix
type: busybox vi example_UNIX.sh
and it should look like this:
# busybox vi example_UNIX.sh
busybox vi example_UNIX.sh
#!/system/bin/sh1;1H?[J
#
MYLOG=/data/install-recovery.log
echo "$(date) Starting install-recovery.sh" > $MYLOG
echo "$(date) Waiting SD to become ready..." >> $MYLOG
sleep 10
mount -t ext2 /dev/block/vold/179:2 /system/sd 1>>$MYLOG 2>>$MYLOG
mount -o bind /system/sd/app /data/app 1>>$MYLOG 2>>$MYLOG
# Hash this out if you haven't moved /data/data
mount -o bind /system/sd/data /data/data 1>>$MYLOG 2>>$MYLOG
# Hash this out if you haven't move /data/dalvik-cache
mount -o bind /system/sd/dalvik-cache /data/dalvik-cache 1>>$MYLOG 2>>$MYLOG
mount >> $MYLOG
echo "$(date) Finishing install-recovery.sh" >> $MYLOG
~

[good luck getting out.... I think you hit escapekey then ':q', but I couldnt get it to execute everytime so I just hit ctrl-Z, ctrl-C and repeat til back at dos prompt :) ]

now, do the same to the windows file and you will see:
# busybox vi example_WINDOWS.sh
busybox vi example_WINDOWS.sh
#!/system/bin/sh^M1H?[J
# ^M
MYLOG=/data/install-recovery.log^M
echo "$(date) Starting install-recovery.sh" > $MYLOG^M
echo "$(date) Waiting SD to become ready..." >> $MYLOG^M
sleep 10^M
mount -t ext2 /dev/block/vold/179:2 /system/sd 1>>$MYLOG 2>>$MYLOG^M
mount -o bind /system/sd/app /data/app 1>>$MYLOG 2>>$MYLOG^M
# Hash this out if you haven't moved /data/data^M
mount -o bind /system/sd/data /data/data 1>>$MYLOG 2>>$MYLOG^M
# Hash this out if you haven't move /data/dalvik-cache^M
mount -o bind /system/sd/dalvik-cache /data/dalvik-cache 1>>$MYLOG 2>>$MYLOG^M
mount >> $MYLOG^M
echo "$(date) Finishing install-recovery.sh" >> $MYLOG^M
^M
~
~
~
~
~
~
~
~?[1;1H?[24;1H?[K- example_WINDOWS.sh 1/15 6%?[1;1H:q
?[24;1H?[K- example_WINDOWS.sh 1/15 6%?[1;1H?[24;1H?[K# pwd
pwd
/sdcard

see those ^Ms at the end of the lines? if you see those in your file, it isnt going to run correctly. luckily, busybox includes a command that should fix this: "dos2unix"

to remove the ^M, you can execute the command:
# busybox dos2unix example_WINDOWS.sh
busybox dos2unix example_WINDOWS.sh


and to check the file:
# busybox vi example_WINDOWS.sh
busybox vi example_WINDOWS.sh
#!/system/bin/sh1;1H?[J
#
MYLOG=/data/install-recovery.log
echo "$(date) Starting install-recovery.sh" > $MYLOG
echo "$(date) Waiting SD to become ready..." >> $MYLOG
sleep 10
mount -t ext2 /dev/block/vold/179:2 /system/sd 1>>$MYLOG 2>>$MYLOG
mount -o bind /system/sd/app /data/app 1>>$MYLOG 2>>$MYLOG
# Hash this out if you haven't moved /data/data
mount -o bind /system/sd/data /data/data 1>>$MYLOG 2>>$MYLOG
# Hash this out if you haven't move /data/dalvik-cache
mount -o bind /system/sd/dalvik-cache /data/dalvik-cache 1>>$MYLOG 2>>$MYLOG
mount >> $MYLOG
echo "$(date) Finishing install-recovery.sh" >> $MYLOG

now it should be ok to run.

hope that helps...

Now, I would like to ask my question where i might be stuck: is there a way to tell if everything has been done correctly from a windows PC?
one more thing I did that might be unnecessary: I decided to use the external card for this, instead of the internal card simply because if something goes wrong or if there is some long term reliability problems associated with this process, I can swap external cards and start again. I used the suggested 'Easeus All-In-One Partition Manager Software ' and created the partition.
In the /dev/block/vold directory, I have
179:17
179:16
179:2
179:1
179:0

and I am trying to use 179:2, I went through all the steps without seeing any real errors. what is the best way to check if it worked?

If I remove the SD card, put it back in the PC and examine it with that same partition manager program, what should I see? I dont see the files on the card when looking at the sdcard from the normal windows explorer either, so I might have missed a step. and thanks to everyone posting on this thread, it has helped me learn a lot about android already.
 
Best way to see if it works is to use Titanium backup. It will show your apps2sd partition and space used. Install some apps and then recheck.

Or use a linux machine which will load both partitions. windows will not sere the ext2 partition.

Sent from my Ideos S7
 
Back
Top