Get a Complete Set of Logs with Andy Log

The importance of proper logging is undeniable. No, we’re not talking about lumberjack work. … more

Try Some Android Lollipop Applications on Your Device

Android 5.0 Lollipop has been officially announced and lucky users of Google Nexus 5 … more

AutoCon Manages Your Connections to Perserve Battery Life

As we’ve talked about in the past, battery life is still somewhat of a sore … more

How to Unlock and Root a Nexus Device – XDA TV

It is official–Google has released the Nexus 6 and the Nexus 9. The Nexus family … more
Post Reply

modified: Installing & Run application on sdcard

OP tempo10

23rd December 2008, 08:27 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
29 posts
Join Date:Joined: Mar 2007
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)
Last edited by tempo10; 24th December 2008 at 08:54 AM.
23rd December 2008, 10:30 PM   |  #2  
UnkzDomain's Avatar
Senior Member
Flag Louisville
Thanks Meter: 4
 
409 posts
Join Date:Joined: Nov 2008
More
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??
23rd December 2008, 10:50 PM   |  #3  
OP Junior Member
Thanks Meter: 0
 
29 posts
Join Date:Joined: 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..
23rd December 2008, 11:12 PM   |  #4  
Senior Member
Flag Tampa
Thanks Meter: 32
 
408 posts
Join Date:Joined: Feb 2007
Yay. Now hopefully we can get this in an update.zip to flash
23rd December 2008, 11:28 PM   |  #5  
UnkzDomain's Avatar
Senior Member
Flag Louisville
Thanks Meter: 4
 
409 posts
Join Date:Joined: Nov 2008
More
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
24th December 2008, 04:39 AM   |  #6  
bhang's Avatar
Senior Member
Flag megalopolis
Thanks Meter: 3
 
441 posts
Join Date:Joined: Aug 2006
More
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
24th December 2008, 04:58 AM   |  #7  
jashsu's Avatar
Senior Member
Thanks Meter: 13
 
1,852 posts
Join Date:Joined: 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.
24th December 2008, 05:29 AM   |  #8  
Retired Moderator
Thanks Meter: 10
 
1,271 posts
Join Date:Joined: Mar 2008
More
I agree and added a warning to the first post
24th December 2008, 06:27 AM   |  #9  
Stericson's Avatar
Retired Senior Mod / Senior Recognized Developer - Godfather of Android Theming
Thanks Meter: 382
 
1,193 posts
Join Date:Joined: 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
Last edited by Stericson; 24th December 2008 at 06:34 AM.
24th December 2008, 06:41 AM   |  #10  
jashsu's Avatar
Senior Member
Thanks Meter: 13
 
1,852 posts
Join Date:Joined: Nov 2008
Quote:
Originally Posted by Stericson

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.

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes