Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,730,490 Members 41,191 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
arunmcops
Old
#1  
arunmcops's Avatar
Recognized Developer - OP
Thanks Meter 629
Posts: 975
Join Date: Apr 2010
Location: Bareilly
Default [Dev-request][HACK] Increase Internal Memory Size

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 $


My Devices:
MicroMax Funbook- P300 (DEAD )
Samsung Galaxy 3 (Lost)
Karbonn A9+
Samsung Galaxy Tab 2 GT-P3100 (Stock Samsung JB)
Samsung Galaxy Tab 2 GT-P3110 (OmniRom)
Google Nexus 5
The Following 7 Users Say Thank You to arunmcops For This Useful Post: [ Click to Expand ]
 
tomsi191
Old
#2  
tomsi191's Avatar
Senior Member
Thanks Meter 56
Posts: 183
Join Date: Jan 2012
Location: Piraeus
nice...but it's only for stock ROMs and would probably cause the phone to run slower...
If i helped you, forget the thanks button just repay the favour to another member
-----------------------------------------------------
Check out my wallpaper pack
 
M_247
Old
#3  
M_247's Avatar
Senior Member
Thanks Meter 122
Posts: 293
Join Date: Jan 2012
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...
 
Spitlebug
Old
#4  
Senior Member
Thanks Meter 8
Posts: 139
Join Date: Dec 2011
I actually like the implementation of this, but what happens when the SD card is removed?
 
kylandomos
Old
#5  
Member
Thanks Meter 29
Posts: 79
Join Date: Apr 2011
Location: Saint Malo
"If I want to remove the microSD from the slot, FIRST I NEED TO SWITCH OFF THE PHONE!"
No SD, No Phone
 
Spitlebug
Old
#6  
Senior Member
Thanks Meter 8
Posts: 139
Join Date: Dec 2011
Quote:
Originally Posted by kylandomos View Post
"If I want to remove the microSD from the slot, FIRST I NEED TO SWITCH OFF THE PHONE!"
No SD, No Phone
Yeah... pass.
 
maverickgenius
Old
#7  
Senior Member
Thanks Meter 8
Posts: 151
Join Date: Apr 2011
Doesn't Hybrid Data2Sd already do this?

If not, what is the difference between the two?
 
arunmcops
Old
#8  
arunmcops's Avatar
Recognized Developer - OP
Thanks Meter 629
Posts: 975
Join Date: Apr 2010
Location: Bareilly
Quote:
Originally Posted by maverickgenius View Post
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


My Devices:
MicroMax Funbook- P300 (DEAD )
Samsung Galaxy 3 (Lost)
Karbonn A9+
Samsung Galaxy Tab 2 GT-P3100 (Stock Samsung JB)
Samsung Galaxy Tab 2 GT-P3110 (OmniRom)
Google Nexus 5
 
spikywits
Old
#9  
Senior Member
Thanks Meter 18
Posts: 112
Join Date: Nov 2010
Quote:
Originally Posted by arunmcops View Post
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.
 
Hamdiz
Old
#10  
Member
Thanks Meter 66
Posts: 68
Join Date: Mar 2012
Location: Oujda
Default how to compile a script

How to compile a script?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Hide Numbers on Your SMS and Call Logs with Reflection

How many times have you given your device to someone else in order to show them a … more

Implement Split View in Your LG G2 KitKat Rom with Automated Installer

Some of you may have remembered a story on the Portal a few weeks back … more

Cast Your Device Screen the Way it Was Meant to be with Second Screen

Not too long ago here on the XDA Portal, we covered how Google had made … more

Samsung Gear Live Unboxed the XDA Way – XDA Developer TV

XDA Developer TV Producer AdamOutleris known for his XDA Unboxingseries where … more