Post Reply

[Dev-request][HACK] Increase Internal Memory Size

13th February 2012, 11:12 AM   |  #1  
arunmcops's Avatar
OP Recognized Developer
Flag Bareilly
Thanks Meter: 630
 
976 posts
Join Date:Joined: Apr 2010
More
Galaxy 3 Devs , please take a look on this.
http://forum.xda-developers.com/show....php?t=1398797



Kernel needs to be patched for this. I am not having access to my PC so if any kernel dev can pull this off then it would be great.

Instructions:-

1-Add Ext4 kernel Modules

Compile the jbd2.ko and ext4.ko modules for the Kernel and put them into /lib/modules inside the ramdisk:

Code:
gandalf $ ls -l ./ramdisk/lib/modules/
totale 1304
-rw-r--r-- 1 root root 236116 11 dic 08.24 ext4.ko
-rw-r--r-- 1 root root 363932 11 dic 08.24 fsr.ko
-rw-r--r-- 1 root root 211200 11 dic 08.24 fsr_stl.ko
-rw-r--r-- 1 root root  58176 11 dic 08.24 jbd2.ko
-rw-r--r-- 1 root root 260568 11 dic 08.24 rfs_fat.ko
-rw-r--r-- 1 root root  90968 11 dic 08.24 rfs_glue.ko
-rw-r--r-- 1 root root  99532 11 dic 08.24 sec_param.ko
gandalf $
2- Patch init.rc file
Patch the init.rc file into the ramdisk to load these modules into the kernel immediately after the first boot stage of the firmware:

Code:
# insmod fsr/rfs modules
    insmod /lib/modules/fsr.ko
    insmod /lib/modules/fsr_stl.ko
    insmod /lib/modules/rfs_glue.ko
    insmod /lib/modules/rfs_fat.ko
    insmod /lib/modules/sec_param.ko
    insmod /lib/modules/jbd2.ko
    insmod /lib/modules/ext4.ko
3- Add busybox

Add a copy of busybox into /sbin.
We need it to mount ext4 filesystems on microSD later on.

Code:
gandalf $ ls -l ./ramdisk/sbin/
totale 2088
-rwxr-x--- 1 root root  117948 11 dic 08.18 adbd
-rwsr-xr-x 1 root root 2016700 11 dic 08.21 busybox
lrwxrwxrwx 1 root root       7 11 dic 08.18 ueventd -> ../init
(i686) gandalf ~ (i686) $
4- Patch init.rc again
Change the mount command for /data!

Original code:


Code:
    # Mounting of system/userdata is moved to 'on emmc' and 'on nand' sections
    # We chown/chmod /data again so because mount is run as root + defaults
        mount rfs /dev/stl6 /data nosuid nodev check=no
    chown system system /data
    chmod 0771 /data
Patched code:

Code:
    # Mounting of system/userdata is moved to 'on emmc' and 'on nand' sections
    # We chown/chmod /data again so because mount is run as root + defaults
        exec /sbin/busybox sh /init.data.sh
    chown system system /data
    chmod 0771 /data
5- Add init.data.sh file
Add an external shell file, used to mount microsd /data avoiding the Android Init Language used by init.rc.

Code:
gandalf $ cat ./ramdisk/init.data.sh 
#!/sbin/busybox sh
/sbin/busybox mount -o nosuid,nodev -t ext4 /dev/block/mmcblk0p2 /data || /sbin/busybox mount -o nosuid,nodev -t rfs /dev/stl7 /data
gandalf $
The Following 7 Users Say Thank You to arunmcops For This Useful Post: [ View ]
13th February 2012, 03:47 PM   |  #2  
tomsi191's Avatar
Senior Member
Flag Piraeus
Thanks Meter: 56
 
183 posts
Join Date:Joined: Jan 2012
More
nice...but it's only for stock ROMs and would probably cause the phone to run slower...
13th February 2012, 08:51 PM   |  #3  
M_247's Avatar
Senior Member
Thanks Meter: 124
 
296 posts
Join Date:Joined: Jan 2012
More
Great concept, particularly but with data to sd, you can put almost all files of app to sd...
Lots of space without increasing memory...

Yet a good concept...
13th February 2012, 11:38 PM   |  #4  
Senior Member
Thanks Meter: 8
 
139 posts
Join Date:Joined: Dec 2011
More
I actually like the implementation of this, but what happens when the SD card is removed?
13th February 2012, 11:42 PM   |  #5  
Member
Flag Saint Malo
Thanks Meter: 29
 
79 posts
Join Date:Joined: Apr 2011
More
"If I want to remove the microSD from the slot, FIRST I NEED TO SWITCH OFF THE PHONE!"
No SD, No Phone
14th February 2012, 01:07 AM   |  #6  
Senior Member
Thanks Meter: 8
 
139 posts
Join Date:Joined: Dec 2011
More
Quote:
Originally Posted by kylandomos

"If I want to remove the microSD from the slot, FIRST I NEED TO SWITCH OFF THE PHONE!"
No SD, No Phone

Yeah... pass.
14th February 2012, 05:17 PM   |  #7  
Senior Member
Thanks Meter: 8
 
151 posts
Join Date:Joined: Apr 2011
Doesn't Hybrid Data2Sd already do this?

If not, what is the difference between the two?
14th February 2012, 05:25 PM   |  #8  
arunmcops's Avatar
OP Recognized Developer
Flag Bareilly
Thanks Meter: 630
 
976 posts
Join Date:Joined: Apr 2010
More
Quote:
Originally Posted by maverickgenius

Doesn't Hybrid Data2Sd already do this?

If not, what is the difference between the two?

Initial app2sd scripts by apollo used to show ext4 space in task manager but currently no script does so. No idea what Hybrid Data2SD actually is.

Sent from my GT-I5800 using Tapatalk
14th February 2012, 06:19 PM   |  #9  
Senior Member
Thanks Meter: 18
 
113 posts
Join Date:Joined: Nov 2010
More
Quote:
Originally Posted by arunmcops

Initial app2sd scripts by apollo used to show ext4 space in task manager but currently no script does so. No idea what Hybrid Data2SD actually is.

Sent from my GT-I5800 using Tapatalk

even my wait is long to see a kernel/rom to actually show ext4 space in task manager.
G3MOD kernel 2.0(and lower version) supports this feature in the form of data2sd(not apps2sd or hybrid data2sd). But the developers of this kernel messed up the code and later versions of their kernel doesn't seems to support this.
7th April 2012, 06:11 PM   |  #10  
Member
Flag Oujda
Thanks Meter: 66
 
77 posts
Join Date:Joined: Mar 2012
More
how to compile a script
How to compile a script?

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes