Go Back   xda-developers > HTC Dream: G1 > G1 Android Development


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 23rd December 2008, 09:27 PM
tempo10 tempo10 is offline
Junior Member
 
Join Date: Mar 2007
Posts: 23
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 (592 Bytes, 1083 views)

Last edited by tempo10; 24th December 2008 at 09:54 AM..
Reply With Quote
Sponsored Links

  #2  
Old 23rd December 2008, 11:30 PM
amgupt01's Avatar
amgupt01 amgupt01 is offline
Senior Member
 
Join Date: Nov 2008
Posts: 297
Default

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??
Reply With Quote

  #3  
Old 23rd December 2008, 11:50 PM
tempo10 tempo10 is offline
Junior Member
 
Join Date: Mar 2007
Posts: 23
Default

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..
Reply With Quote

  #4  
Old 24th December 2008, 12:12 AM
xavier6303 xavier6303 is offline
Senior Member
 
Join Date: Feb 2007
Location: Lancaster, PA
Posts: 231
Default

Yay. Now hopefully we can get this in an update.zip to flash
__________________
Bronze G1 -- cyanogen 4.2.7.1
Reply With Quote

  #5  
Old 24th December 2008, 12:28 AM
amgupt01's Avatar
amgupt01 amgupt01 is offline
Senior Member
 
Join Date: Nov 2008
Posts: 297
Default

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
Reply With Quote

  #6  
Old 24th December 2008, 05:39 AM
bhang's Avatar
bhang bhang is offline
Senior Member
 
Join Date: Aug 2006
Posts: 353
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

2xHTC - DREAM - G1(1bronze,1black)
black, bought 10.22.08 opening day in the us jf's roms only simple, bulletproof - for the wifey
jfs recovery

bronze, cyanogens bleeding edge, experimental, optimization is so last year roms
pimped 1.4 recovery, radio:26i, "danger" SPL


No whining!
Reply With Quote

  #7  
Old 24th December 2008, 05:58 AM
jashsu's Avatar
jashsu jashsu is offline
Senior Member
 
Join Date: Nov 2008
Posts: 1,724
Default

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.
Reply With Quote

  #8  
Old 24th December 2008, 06:29 AM
neoobs neoobs is offline
Moderator
 
Join Date: Mar 2008
Posts: 1,235
Default

I agree and added a warning to the first post
Reply With Quote

  #9  
Old 24th December 2008, 07:27 AM
Stericson Stericson is offline
Moderator
 
Join Date: Nov 2008
Posts: 916
Default

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 07:34 AM..
Reply With Quote

  #10  
Old 24th December 2008, 07:41 AM
jashsu's Avatar
jashsu jashsu is offline
Senior Member
 
Join Date: Nov 2008
Posts: 1,724
Default

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.
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:02 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.