Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,424 Members 35,931 Now Online
XDA Developers Android and Mobile Development Forum

modified: Installing & Run application on sdcard

Tip us?
 
tempo10
Old
(Last edited by tempo10; 24th December 2008 at 08:54 AM.)
#1  
Junior Member - OP
Thanks Meter 0
Posts: 29
Join Date: Mar 2007
Default modified: Installing & Run application on sdcard

WARNING: Proceed at your own risk, this may damage your phone and/or make it unstable. This is for advanced users only and should only be attempted by those who understand the risks of the following changes


Original post: http://www.androidin.net/thread-1099-1-1.html
AS usual, this is for those WITH ROOT ONLY

Preparation:
1. Installed JF RC30 V1.2 (only if you are using JF RC30 1.2 , this is not compatible with RC8)
2. Make a NANDROID backup (you may get everything back to normal if the phone screw up)
3. A MICRO-SD card with 2 partitions divided : (1) a fat-32 partition, (2) a ext2, you need a linux/mac to format the sdcard with ext2 partition
* the fat 32 will be mounted as sdcard and the ext2 will be mounted as /sd for application data, make your own decision for the size*
4. insert the sdcard with 2 partition on the phone
5. set the phone to aeroplane mode for safe



Procedure:
1. adb pull /system/etc/mountd.conf /*somewhere you may want to back it up*
2. rm -f /system/etc/mountd.conf
3. using the modified mountd.conf, adb push /*the path of modified mount.conf */mount.conf /system/etc/mountd.conf
4. adb pull /system/init.rc /*somewhere you may want to back it up*
5. rm -f /system/init.rc
6. using the modified init.rc, adb push /*the path of modified init.rc*/init.rc /system/init.rc
7. reboot
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot

Now, the phone will install and run everyone on /sd, still mounting /sdcard as usual. It is possible that to mount or unmount /sdcard by usb without everything screwed up. Beware that your sdcard will be used as part of system, removing the sdcard may freeze the phone. If the phone get freeze because of removing the sdcard, plug the sdcard again and soft reset.
It is also possible that copy the application data to another card. If you want to change the sdcard, switch the phone off, mounting the sdcard to computer directory, copy the /sd partition to another sdcard with ext2 partition

Back to normal:
1. rm -f /system/etc/mountd.conf
2. adb push /*the backup of mountd.conf* /system/etc/mountd.conf
3. rm -f /system/init.rc
4. adb push /*the backup of init.rc* /system/init.rc
5. busybox cp -a /sd/ /data/app
6. rm -r /sd/

Change of mountd.conf:
changing /dev/block/mmcblk0 to /dev/block/mmcblk0p1
change of init.rc:
adding
insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko
mknod /dev/mmcblk0p2 b 179 2 1000
mount ext2 /dev/mmcblk0p2 /sd noatime nodiratime
Attached Files
File Type: zip modified mountd & init.zip - [Click for QR Code] (592 Bytes, 2645 views)
 
UnkzDomain
Old
#2  
UnkzDomain's Avatar
Senior Member
Thanks Meter 4
Posts: 409
Join Date: Nov 2008
Location: Louisville
Any chance of this being simplified into the actual commands necessary for this!?

I'm a semi-noob at *nix stuff... I can format my SD card into 2 partitions, but I'm lost at step 4... What do we need to edit??
 
tempo10
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 29
Join Date: Mar 2007
Changed step 4...just adb pull the mount.conf for editing..open the file in text editor..find "mmcblk0" and change it "mmcblk0p1" ..save the .conf...del the original one..push the new one to the original directory..
 
xavier6303
Old
#4  
Senior Member
Thanks Meter 32
Posts: 408
Join Date: Feb 2007
Location: Tampa
Yay. Now hopefully we can get this in an update.zip to flash
At&t Galaxy Note 3
 
UnkzDomain
Old
#5  
UnkzDomain's Avatar
Senior Member
Thanks Meter 4
Posts: 409
Join Date: Nov 2008
Location: Louisville
Yeah, I'm putting off doing this until someone makes an update.zip which I definitely know how to apply and get rid of if I screw anything up
 
bhang
Old
#6  
bhang's Avatar
Senior Member
Thanks Meter 3
Posts: 441
Join Date: Aug 2006
Location: megalopolis
Question REPLACES the internal memory...?

So the internal memory isnt used?

kinda the same trick as the browser cache and market cache, just a bit more complex as its an entire filesystem your moving, which wouldnt let the sys see the internal, mem, please correct me if im reading it wrong, Im not a total noob at linux but no guru dev either...


bhang
http://www.geocities.com/sarabhanga/bhang.html
1 mtg3 stock
1 Moto Cliq rooted, pimped (bought opening day also)
2xHTC - DREAM - G1(1bronze,1black)
black, bought 10.22.08 opening day in the us CM6
bronze, cyanogen[out of use]
mytouch slide, bought 1st day of soft-launch, rooted running slideme5r1...for now{brand new one in box on hold for a bit
G2 pimped, many mods, screen rez, battery morphed, pershoots latest, looking to go to CM7 soon
 
jashsu
Old
#7  
jashsu's Avatar
Senior Member
Thanks Meter 12
Posts: 1,852
Join Date: Nov 2008
The internal memory is still used, just not for /data/app

Quote:
19.rm -r /data/app
20.ln -s /sd/app /data/app
It should probably be /sdcard/app. In any case, this is a fairly complex mod that is not suited for Linux newbies. I would advise against folks considering this mod unless they understand and can test each step before attempting.
 
neoobs
Old
#8  
Retired Moderator
Thanks Meter 10
Posts: 1,271
Join Date: Mar 2008
I agree and added a warning to the first post
 
Stericson
Old
(Last edited by Stericson; 24th December 2008 at 06:34 AM.)
#9  
Stericson's Avatar
Retired Senior Mod / Senior Recognized Developer - Godfather of Android Theming
Thanks Meter 381
Posts: 1,193
Join Date: Nov 2008
Ummm yea, so what happens when you mount your sdcard for storage? I expect the phone goes crazy?

This tutorial, if you could call it that,(no offense) is really badly written and this process seems too risky for what you gain considering that if we are patient google will come out with this themselves.

Stericson
 
jashsu
Old
#10  
jashsu's Avatar
Senior Member
Thanks Meter 12
Posts: 1,852
Join Date: Nov 2008
Quote:
Originally Posted by Stericson View Post
Ummm yea, so what happens when you mount your sdcard for storage? I expect the phone goes crazy?

This tutorial, if you could call it that,(no offense) is really badly written and this process seems too risky for what you gain considering that if we are patient google will come out with this themselves.

Stericson
The procedure calls for two partitions on the microsd, one FAT32, other EXT. Theoretically it should work with mounting for mass storage. However, I agree that it's a rather sloppy hack.

There is talk about a similar strategy being officially implemented by the Android team. Instead of two partitions, it would be loopback mounted to a file in the FAT32. That would also provide some encryption security. See here. It's just talk though. Won't be a reality for at least a few months.

Tags
apps on sd, root
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes