Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Step by Step installation - Windows on S7 with internal

and external SD cards


Apps2sd is for applications to sdcard installation for Android 2.1 using Windows on the
Australian and US Tablet (internal storage and SD card slot)
ONLY FOLLOW THESE INSTRUCTIONS IF YOU WANT THE APPS ON THE
INTERNAL CARD AND WILL HAVE A SD CARD ALWAYS INSERTED AT
BOOTUP.

Before you start you will need to perform the following pre-requisite steps:
 Pre-requisite software Installation (root phone and usb drivers installation
especially)

 Partition your internal SD card.

 Make the new partition a ext2 file system

 Create the following two files and have them on your sdcard. Use a notepad+
+ to create the files.

1) install-recovery.sh

#!/system/bin/sh
#
/system/etc/init-sd.sh&

2) init-sd.sh

#!/system/bin/sh
#
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:18 /system/sd 1>>$MYLOG 2>>$MYLOG
#mount -o bind /system/sd/app /data/app 1>>$MYLOG 2>>$MYLOG
#mount -o bind /system/sd/data /data/data 1>>$MYLOG 2>>$MYLOG
#mount -o bind /system/sd/dalvik-cache /data/dalvik-cache 1>>$MYLOG 2>>$MYLOG
mount >> $MYLOG
echo "$(date) Finishing install-recovery.sh" >> $MYLOG

Note:
A few of the lines are commented out on purpose to make it non-destructive. Also note that the
line that reads….
mount -t ext2 /dev/block/vold/179:18 /system/sd 1>>$MYLOG 2>>$MYLOG
could also be….
mount -t ext2 /dev/block/vold/179:2 /system/sd 1>>$MYLOG 2>>$MYLOG
for Australian users or anyone without an internal sdcard.

MODIFICATION STARTS HERE


Now the fun starts…..
Start a new DOS command window (Start->run CMD enter).
Enter the command:
C:>adb shell
You should now see the following, otherwise you have not installed the usb driver software
properly. Go back to the pre-requisite steps and complete those.
$ su
You should see the following prompt or you have not correctly rooted your phone. Go back
to the pre-requisite steps and root your phone.
#

Step 1 – Mounting your new partition.


The following will install the scripts and test that you have a working and valid partition for
apps2sd. This is non-destructive and low risk at this point.
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
# mkdir /system/sd

# mount -t ext2 /dev/block/vold/179:18 /system/sd (US users)


OR
# mount -t ext2 /dev/block/vold/179:2 /system/sd (Australian users)
# mount
At this point you should see your something like this….
mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock1 /system yaffs2 ro 0 0
/dev/block/mtdblock6 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock5 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block//vold/179:1 /sdcard2 vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid
=1015,fmask=0702,dmask=0702,allow_utime=0020,codep age=cp437,iocharset=iso8859-1,
shortname=mixed,utf8,flush 0 0
/dev/block//vold/179:17 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid
=1015,fmask=0702,dmask=0702,allow_utime=0020,codep age=cp437,iocharset=iso8859-1,
shortname=mixed,utf8,flush 0 0
/dev/block/vold/179:18 /system/sd ext2 rw,errors=continue 0 0
The last line might look like this
/dev/block/vold/179:2 /system/sd ext2 rw,errors=continue 0 0
Congratulations if this has worked so far. If you do not see this line, don’t panic, but you
have done something wrong; fix this before proceeding any further. Your machine will
operate as normal.

Step 2 – Auto mounting your new partition


We are going to just try and do this automatically now. Again this is not destructive at this
point. It will just test that your machine is able to auto-mount the apps2sd partition on your
device.
C:>adb shell
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
# busybox cp /sdcard/install-recovery.sh /system/etc
# busybox cp /sdcard/init-sd.sh /system/etc
#chmod 755 /system/etc/install-recovery.sh
# chmod 755 /system/etc/init-sd.sh
Reboot your machine. Then type the following commands on your PC when the S7 has
finished rebooting.
C:>adb shell
$ su
# mount
In the listing you should see one of the following lines….
/dev/block/vold/179:2 /system/sd ext2 rw,errors=continue 0 0
/dev/block/vold/179:18 /system/sd ext2 rw,errors=continue 0 0
If you do not see this line, don’t panic, but you have done something wrong; fix this before
proceeding any further. Your machine will operate as normal.

Step 3 – Moving your apps to sdcard

If step 1 or 2 did not proceed well, then DO NOT continue with this step or you will
DEFINITELY lose your apps and data.
Edit your init-sd.sh file and uncomment the following lines. You uncomment lines by removing the
‘#’ at the start of the line. You may have to do this back on your PC using Notepad++ and put them
on your sdcard.

Change #mount -o bind /system/sd/app /data/app 1>>$MYLOG 2>>$MYLOG


to mount -o bind /system/sd/app /data/app 1>>$MYLOG 2>>$MYLOG
The following can also be uncommented if you want more storage. It is not essential to move your
data and cache directories. You will get a lot more space available if you just uncomment the first
line, the next two lines MAY also cause more problems. If you are experiencing a lot of “Force
Close” errors, then try the apps2sd procedure without moving the cache and data.
Change….
#mount -o bind /system/sd/data /data/data 1>>$MYLOG 2>>$MYLOG
#mount -o bind /system/sd/dalvik-cache /data/dalvik-cache 1>>$MYLOG 2>>$MYLOG
To….
mount -o bind /system/sd/data /data/data 1>>$MYLOG 2>>$MYLOG
mount -o bind /system/sd/dalvik-cache /data/dalvik-cache 1>>$MYLOG 2>>$MYLOG

Save the file, and copy it to your sdcard, then run the following commands….
C:>adb shell
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
# cd /data/
# busybox tar -cvf /system/sd/app.tar app
# busybox tar -cvf /system/sd/data.tar data
# busybox tar -cvf /system/sd/dalvik-cache.tar dalvik-cache

# cd /system/sd
# busybox tar -xvf app.tar
# busybox tar -xvf data.tar
# busybox tar -xvf dalvik-cache.tar

Now we are going to copy the two files that we up on the sdcard to the system folders where
they need to be. Still in the console at the # sign enter (or copy and paste) the following two
commands.

# busybox cp /sdcard/install-recovery.sh /system/etc


# busybox cp /sdcard/init-sd.sh /system/etc

To make sure these files are in the correct location enter these two commands, if there are no
errors these files are in the correct spot.

# chmod 755 /system/etc/install-recovery.sh


# chmod 755 /system/etc/init-sd.sh

Next to clean up all the data we moved enter (or copy and paste) the following commands in
to the console.

#cd /data/app
#busybox rm -rf *

ONLY DO THE FOLLOWING COMMANDS IF YOU PLANNED TO MOVE THE DATA


AND CACHE AS WELL AS YOUR APPS.

#cd /data/data/
#busybox rm -rf *
#cd /data/dalvik-cache
#busybox rm -rf *

You may notice some things happening on your screen, don't worry. Just type this last
command in to the console.

#reboot

Now your tablet will reboot. You can disconnect it from the PC and if all went well you now
have all your applications on the sdcard.

All credit and thanks to the many contributors to this process, including the developers,
testers and documenters. You know who you are 

You might also like