frequent "cleaning memory (low memory)" warnings - G1 Android Development

I've been receiving frequent "cleaning memory (low memory)" warnings recently.
I'm on a rooted RC33 and I have all my caches and my apps (both app and app-private) moved to my sdcard and that partition has TONS of space.
I do have a lot of apps installed, but most are not constantly running background-type apps/services.
What can I do to resolve this? I am happy to post the output of various diagnostic things if anyone has suggestions.
Thanks

moving apps to flash won't have any effect low mem has to do with low ram not flash.
do u have dxtop installed? the latest ver stays in memory which means less mem for other apps

Have you installed aHome? I noticed the low memory warning too for the first time last night. I think the only thing new I installed was aHome.

I also have dxTop and found this in the release notes. Maybe this is what caused the msg to pop up.
"More memory released when the phone gets low on memory."

wimbet said:
Have you installed aHome? I noticed the low memory warning too for the first time last night. I think the only thing new I installed was aHome.
Click to expand...
Click to collapse
I do, but I decided not to use it as it was really slow. It is still installed, but it never comes up (shouldn't even run) as I set dxTop to my default home app.

wimbet said:
I also have dxTop and found this in the release notes. Maybe this is what caused the msg to pop up.
"More memory released when the phone gets low on memory."
Click to expand...
Click to collapse
Interesting. Maybe my phone was running low on memory all along and it is just that now dxTop is report it to me visually

if you have dxTop go to the setting of dxTop > menu >> dxTop uncheck what it says disabel persistance.
it eats all ur memory.. uncheckign that will run a lil slower when returnign to home but will have more memory for other apps

Nitro212 said:
if you have dxTop go to the setting of dxTop > menu >> dxTop uncheck what it says disabel persistance.
it eats all ur memory.. uncheckign that will run a lil slower when returnign to home but will have more memory for other apps
Click to expand...
Click to collapse
Oh, ok, I'll try that. Thanks.
I'm also getting the "low space" icon, which makes no sense because I have tons of space (all apps/caches moved to sdcard).
Code:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.2M 284.0K 100% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 1.0G 89.2M 887.8M 9% /system/sd
/dev/block/mtdblock5 74.8M 67.3M 7.5M 90% /data
/dev/block/mtdblock4 67.5M 2.7M 64.8M 4% /cache
/dev/block/mmcblk0p1 6.4G 4.8G 1.6G 75% /sdcard
#

what conditions trigger the "low on space" indicator?
<moving this specific question to a new thread (http://forum.xda-developers.com/showthread.php?p=3450296#post3450296) as it is somewhat unrelated>

xDtop claims they fixed it in the latest version. Don't see the message anymore.

Low memory means low RAM, not low flash or storage space. Completely different things.
mlevin said:
Oh, ok, I'll try that. Thanks.
I'm also getting the "low space" icon, which makes no sense because I have tons of space (all apps/caches moved to sdcard).
Code:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.2M 284.0K 100% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 1.0G 89.2M 887.8M 9% /system/sd
/dev/block/mtdblock5 74.8M 67.3M 7.5M 90% /data
/dev/block/mtdblock4 67.5M 2.7M 64.8M 4% /cache
/dev/block/mmcblk0p1 6.4G 4.8G 1.6G 75% /sdcard
#
Click to expand...
Click to collapse

idk, it seems that the two users that showed their df -h command output have an awful lot of data being used, many of my apps run all the time and i am only using 19% rather than the 90 and 91 in the previous posts. i have dxtop installed and have had it for a while and have NEVER gotten this problem.

what *specific* conditions trigger the "low on space" indicator?
I'm confused. I have my apps and caches moved to my sdcard but I am still getting the "low on space" indicator. Which directories/filesystems are causing it to think it is low on space? Can anyone explain why it would say I am low on space under these circumstances?
This is how my device looks at the moment (and I am currently getting the "low on space" indicator):
Code:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.2M 284.0K 100% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 1.0G 100.8M 876.2M 10% /system/sd
/dev/block/mtdblock5 74.8M 68.0M 6.8M 91% /data
/dev/block/mtdblock4 67.5M 2.7M 64.8M 4% /cache
/dev/block/mmcblk0p1 6.4G 4.8G 1.6G 75% /sdcard
#
The only one that seems a bit high is /data.
On there, I have:
Code:
# ls -l /data
ls -l /data
drwxrwxrwx 1 1000 1000 2048 Feb 6 23:10 anr
lrwxrwxrwx 1 0 0 14 Feb 7 05:38 app -> /system/sd/app
lrwxrwxrwx 1 0 0 22 Mar 2 22:24 app-private -> /system/sd/app-private
drwxrwx--x 1 1000 1000 2048 Feb 6 23:10 app-private.ORIGINAL
drwxrwx--x 1 1000 1000 2048 Mar 2 21:08 app.ORIGINAL
drwxrwx--x 1 1000 1000 2048 Feb 6 23:10 dalvik-cache
drwxrwx--x 1 1000 1000 2048 Feb 6 23:10 data
drwxrwx--x 1 2000 2000 2048 Feb 6 23:10 local
drwxrwx--- 1 0 0 2048 Feb 6 23:10 lost+found
drwxrwx--t 1 1000 9998 2048 Feb 6 23:10 misc
drwx------ 1 0 0 2048 Feb 6 23:10 property
drwxrwxr-x 1 1000 1000 2048 Feb 6 23:10 system
drwxr-xr-x 1 1000 1000 2048 Feb 11 13:32 tombstones
#
Code:
# busybox du -h -c /data | grep -v '/data/data/'
busybox du -h -c /data | grep -v '/data/data/'
2.0K /data/app.ORIGINAL
2.0K /data/tombstones
15.0K /data/system/location
691.5K /data/system
57.5K /data/anr
35.0M /data/dalvik-cache
4.0K /data/property
2.0K /data/app-private.ORIGINAL
28.6M /data/data
2.0K /data/local/tmp
4.0K /data/local
2.5K /data/misc/dhcp
8.0K /data/misc/wifi/sockets
10.5K /data/misc/wifi
6.0K /data/misc/hcid/00:17:E8:EA:E9:FF
8.0K /data/misc/hcid
31.5K /data/misc
2.0K /data/lost+found
64.4M /data
64.4M total
#
Does anything look amiss?
I'm on a rooted RC33 w/ JF1.41.
Thanks

Hmmm...
9.6M /data/data
3.5K /data/property
72.0K /data/anr
2.0K /data/lost+found
35.6M /data
35.6M total
I'm not sure... but this was my results. I have apps to sd too.

Hmm... I wonder if /data/data could/should be moved/symlinked as well...?
EDIT: Yeah, that seemed to help. The low space warning went away.

try moving dalvik-cache to free some space of the data thats what i did
Code:
# busybox du -h -c /data | grep -v '/data/data/'
busybox du -h -c /data | grep -v '/data/data/'
3.5K /data/property
4.3M /data/data
7.5K /data/local/bin
2.0K /data/local/mnt
1.2M /data/local/tmp
1.2M /data/local
2.0K /data/misc/wifi/sockets
4.5K /data/misc/wifi
2.0K /data/misc/hcid
2.5K /data/misc/dhcp
17.0K /data/misc
42.0K /data/anr
2.0K /data/lost+found
283.5K /data/system
2.0K /data/lost+found
5.8M /data
5.8M total
that folder grows pretty big.. now, im not sure if we are allow to move it to the sd? i moved mine.. have not gotten any problems errors yet.. but try movign it to your ext2 partition
Code:
busybox cp -a /data/dalvik-cache /system/sd/dalvik-cache
rm -rf /data/dalvik-cache
ln -s /system/sd/dalvik-cache /data/dalvik-cache
reboot
edit: wops did not read ur last post, wjhere u moved the whole data folder

this posting will be merged with your OLDER postings about the same thing.
Anymore X-posting or multiple thread openings about the same issue will be resulted to a closure of each thread and/or up to a temp ban.

Nitro212 said:
try moving dalvik-cache to free some space of the data thats what i did
Click to expand...
Click to collapse
Thanks for the tip -- I just did that (moved davlik-cache) and that seemed to help as well. I hope I'm all set for now.
Note to moderator: apologies for the violation of protocol. It won't happen again.

Related

HOWTO: Automated APPS to SD (EASY!!!!)

NOTE:
1. Must have a rooted phone
2. Must have two partitions on the sd card (fat32 for everything, and ext2 for "expanding" the phone's memory).
3. Must have Android SDK installed (so that adb will work)
Ok.. So I got sick of all the commands running back and forth. I found that I'm wiping my phone several times testing out new things and didn't want to continuously put in all these commands to get the apps to sd thing to work.
Therefore, I created a file to automatically do it for me!!! I just run this file with the usb connected to the phone, and let it run all the commands.
I've attached a file "tmp.zip". Download this file and extract it to your c:
The folder it extracts NEEDS to be at c:/tmp
After extracting, navigate to the folder and double click on "appsToSD1.bat". Follow the instructions and you'll be on your way.
I hope this helps!!!!
egyptianbman said:
NOTE:
1. Must have a rooted phone
2. Must have two partitions on the sd card (fat32 for everything, and ext2 for "expanding" the phone's memory).
3. Must have Android SDK installed (so that adb will work)
Ok.. So I got sick of all the commands running back and forth. I found that I'm wiping my phone several times testing out new things and didn't want to continuously put in all these commands to get the apps to sd thing to work.
Therefore, I created a file to automatically do it for me!!! I just run this file with the usb connected to the phone, and let it run all the commands.
I've attached a file "tmp.zip". Download this file and extract it to your c:
The folder it extracts NEEDS to be at c:/tmp
After extracting, navigate to the folder and double click on "appsToSD1.bat". Follow the instructions and you'll be on your way.
I hope this helps!!!!
Click to expand...
Click to collapse
EXCELLENT!!! I have already set my apps to sd... but I always welcome alternatives. Good work. I can't wait to try it out some time.
Thanks!
looking at the bat, it looks just like the commands from that other thread. Any1 game to try and share if it it works =]?
Nice, I might finally try this when I get home today...
Anyone try this out yet?
Just tried it
Failure, after last reboot i am stuck at the flashing android loader.
I did verify i was all the stuff the bat file said to look for
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.1M 456.0K 99% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/block/mtdblock5 74.8M 20.9M 53.8M 28% /data
/dev/block/mtdblock4 67.5M 1.1M 66.4M 2% /cache
/dev/block/mmcblk0p1 978.6M 4.0K 978.6M 0% /sdcard
is my card partitioned I did it through paragon, but It only shows the one partition here what am I doing wrong its a 2 gig card, Ill try if I can get my damn card partioned lol.
Thanks it worked for me.... ...but Im not sure if ext2 patitioon should be primary
http://forum.xda-developers.com/showthread.php?p=3483058#post3483058
...I made it primary and it worked...
$ df
/dev: 49520K total, 0K used, 49520K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 69120K total, 66180K used, 2940K available (block size 4096)
/system/modules: 1532K total, 1532K used, 0K available (block size 4096)
/system/xbin: 3172K total, 3172K used, 0K available (block size 4096)
/system/sd: 1033712K total, 5116K used, 1028596K available (block size 4096)
/data: 76544K total, 21760K used, 54784K available (block size 4096)
/cache: 69120K total, 1160K used, 67960K available (block size 4096)
/sdcard: 6172916K total, 588568K used, 5584348K available (block size 4096)
sdcard - 6GB
sd - 1GB
$ mount
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /sqlite_stmt_journals type tmpfs (rw,size=4096k)
/dev/block/mtdblock3 on /system type yaffs2 (ro)
/dev/block/loop0 on /system/modules type cramfs (ro)
/dev/block/loop1 on /system/xbin type cramfs (ro)
/dev/mmcblk0p2 on /system/sd type ext2 (rw,noatime,nodiratime,errors=continue)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
$ cd /data
$ ls -al
ls: can't open '.': Permission denied
$ su
# ls -al
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 .
drwxr-xr-x 12 0 0 0 Mar 18 17:31 ..
drwxrwxrwx 1 1000 1000 2048 Oct 5 07:41 anr
lrwxrwxrwx 1 0 0 14 Mar 18 17:30 app -> /system/sd/app
lrwxrwxrwx 1 0 0 22 Mar 18 17:30 app-private -> /system/sd/app-private
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 dalvik-cache
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 data
drwxrwx--x 1 2000 2000 2048 Oct 5 07:41 local
drwxrwx--- 1 0 0 2048 Oct 5 07:41 lost+found
drwxrwx--t 1 1000 9998 2048 Oct 5 07:41 misc
drwx------ 1 0 0 2048 Oct 5 07:41 property
drwxrwxr-x 1 1000 1000 2048 Oct 5 07:41 system
drwxr-xr-x 1 1000 1000 2048 Mar 15 12:15 tombstones
#
russenreaktor said:
Thanks it worked for me.... ...but Im not sure if ext2 patitioon should be primary
http://forum.xda-developers.com/showthread.php?p=3483058#post3483058
...I made it primary and it worked...
$ df
/dev: 49520K total, 0K used, 49520K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 69120K total, 66180K used, 2940K available (block size 4096)
/system/modules: 1532K total, 1532K used, 0K available (block size 4096)
/system/xbin: 3172K total, 3172K used, 0K available (block size 4096)
/system/sd: 1033712K total, 5116K used, 1028596K available (block size 4096)
/data: 76544K total, 21760K used, 54784K available (block size 4096)
/cache: 69120K total, 1160K used, 67960K available (block size 4096)
/sdcard: 6172916K total, 588568K used, 5584348K available (block size 4096)
sdcard - 6GB
sd - 1GB
$ mount
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /sqlite_stmt_journals type tmpfs (rw,size=4096k)
/dev/block/mtdblock3 on /system type yaffs2 (ro)
/dev/block/loop0 on /system/modules type cramfs (ro)
/dev/block/loop1 on /system/xbin type cramfs (ro)
/dev/mmcblk0p2 on /system/sd type ext2 (rw,noatime,nodiratime,errors=continue)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
$ cd /data
$ ls -al
ls: can't open '.': Permission denied
$ su
# ls -al
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 .
drwxr-xr-x 12 0 0 0 Mar 18 17:31 ..
drwxrwxrwx 1 1000 1000 2048 Oct 5 07:41 anr
lrwxrwxrwx 1 0 0 14 Mar 18 17:30 app -> /system/sd/app
lrwxrwxrwx 1 0 0 22 Mar 18 17:30 app-private -> /system/sd/app-private
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 dalvik-cache
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 data
drwxrwx--x 1 2000 2000 2048 Oct 5 07:41 local
drwxrwx--- 1 0 0 2048 Oct 5 07:41 lost+found
drwxrwx--t 1 1000 9998 2048 Oct 5 07:41 misc
drwx------ 1 0 0 2048 Oct 5 07:41 property
drwxrwxr-x 1 1000 1000 2048 Oct 5 07:41 system
drwxr-xr-x 1 1000 1000 2048 Mar 15 12:15 tombstones
#
Click to expand...
Click to collapse
Ive been struggling with this for three days, using paragon how exactly do you partition a card it says mines has been partitioned and showes the ext2 and the fat32 both as being primary but It wont show on busybox as my previous post above states, from there how do I go on to complete apps on sd card, it just aint working for me Im getting frustrated
Joeriginal said:
Ive been struggling with this for three days, using paragon how exactly do you partition a card it says mines has been partitioned and showes the ext2 and the fat32 both as being primary but It wont show on busybox as my previous post above states, from there how do I go on to complete apps on sd card, it just aint working for me Im getting frustrated
Click to expand...
Click to collapse
Since ext2 is a linux partition I would use a Live Ubunut CD to partition the card. This is the safest bet.
androidmonkey said:
Since ext2 is a linux partition I would use a Live Ubunut CD to partition the card. This is the safest bet.
Click to expand...
Click to collapse
I have read how people do it through paragon Id rather not download a 700mb file just to format my card, but thanks for the suggestion.
Joeriginal said:
I have read how people do it through paragon Id rather not download a 700mb file just to format my card, but thanks for the suggestion.
Click to expand...
Click to collapse
If you have a good net connection it will download in 10-15 minutes. Worth the time knowing that method works
Also, having a Live CD is a good troubleshooting tool for future issues.
androidmonkey said:
If you have a good net connection it will download in 10-15 minutes. Worth the time knowing that method works
Also, having a Live CD is a good troubleshooting tool for future issues.
Click to expand...
Click to collapse
Im at work on a dialup network if I start downloading I should finish by dinner time.....Friday.
Joeriginal said:
Im at work on a dialup network if I start downloading I should finish by dinner time.....Friday.
Click to expand...
Click to collapse
ah, i see.
Well there are many small linux distros. Puppy Linux is one, only 98MB
http://www.puppylinux.org/
androidmonkey said:
If you have a good net connection it will download in 10-15 minutes. Worth the time knowing that method works
Also, having a Live CD is a good troubleshooting tool for future issues.
Click to expand...
Click to collapse
Excellent points.
modem_over said:
Failure, after last reboot i am stuck at the flashing android loader.
I did verify i was all the stuff the bat file said to look for
Click to expand...
Click to collapse
More than likely because you didn't have the partitions on SD correct. READ THE NOTE FIRST!
I think you're going to have to clear the phone. You might even need to re-install an update.
Joeriginal said:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.1M 456.0K 99% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/block/mtdblock5 74.8M 20.9M 53.8M 28% /data
/dev/block/mtdblock4 67.5M 1.1M 66.4M 2% /cache
/dev/block/mmcblk0p1 978.6M 4.0K 978.6M 0% /sdcard
is my card partitioned I did it through paragon, but It only shows the one partition here what am I doing wrong its a 2 gig card, Ill try if I can get my damn card partioned lol.
Click to expand...
Click to collapse
Nope, I'm not seeing a "/system/sd" partition on your phone.
Don't know how easy using LiveCD Ubuntu is... but there's no way it's easier than Paragon Partitioner...
I dl'ed it, Personal Trial version.
Inserted my G1 via USB.
Create partition.
Select sd card.
Choose size.
DONE!
That's it. Voila. Sd card partitioned into 2 parts.
xdavidn88 said:
Don't know how easy using LiveCD Ubuntu is... but there's no way it's easier than Paragon Partitioner...
I dl'ed it, Personal Trial version.
Inserted my G1 via USB.
Create partition.
Select sd card.
Choose size.
DONE!
That's it. Voila. Sd card partitioned into 2 parts.
Click to expand...
Click to collapse
I ended up having to use Ubuntu. I'm not sure why, I installed Paragon on my work computer (new, running Vista x64) and it couldn't create the partitions correctly... kept on giving me some error. I think it had something to do with mounting... So I thought maybe it's because I was on an x64. Took it home to my laptop running Windows XP and had the same problem. I finally got tired of it and got Ubuntu who worked like a charm
egyptianbman said:
I finally got tired of it and got Ubuntu who worked like a charm
Click to expand...
Click to collapse
Yep, Ubuntu will work every time. Since EXT2 is a linux format, having Windows create it is a mixed bag. I tried creating windows partitions on my Mac awhile back and it was a disaster.

[Q] Where's the mount point for the root file system?

On my G1, I know that the internal flash memory is divided into several partitions used by the system. Running the busybox shell on a terminal emulator on the phone or through adb, I can run df and get the following:
Code:
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 48852 0 48852 0% /dev
tmpfs 48852 0 48852 0% /mnt/asec
/dev/block/mtdblock3 92160 89048 3112 97% /system
/dev/block/mtdblock5 91904 77792 14112 85% /data
/dev/block/loop0 4096 4096 0 100% /system/xbin
/dev/block/mtdblock4 30720 1160 29560 4% /cache
/dev/block/vold/179:1
15541688 12742232 2799456 82% /mnt/sdcard
/dev/block/vold/179:1
15541688 12742232 2799456 82% /mnt/secure/asec
But strangely there's no mount point for /, the root file system. Yet there are lot of other files and directories directly in the root file system, like init scripts. Could anyone explain to me how this is? Is the root file system hidden somehow from df?

DISCONTINUED [MOD][AD2SDX][ALPHA02] SD-EXT Mod[OCT-20]

BACKGROUND
After many time I stressful with Low Disk Space when Installing many Applications, or Slow Performance when Installing Data2sd or dalvik-cache to SD. I came up with some simple Idea to make my phone have big Internal Memory Storage, yet still robust in performance.
Click to expand...
Click to collapse
Introducing....
AD2SDX - AMARULLZ DATA TO SD-EXT
by amarullz [at] yahoo [dot] com
* Oct 20 2011 (ALPHA02) - Update Compatibility
* Oct 19 2011 (ALPHA01)
WHAT IS IT??
This mod will move all Internal Memory (data) into sd-ext, "but not like data2ext", this mod will maintain the performance, because it still place dalvik-cache and system application data in Internal Memory.
HOW IT WORK??
The script will do this in the first boot:
Move Mounting Internal Memory (/data) Into /sd-ext
Mount SDCard-Ext (mmcblk0p2) partition into /data
Create dalvik-cache directory in Internal Memory data (/sd-ext), and symlink it to mmcblk0p2 (/data)
Create data directory in mmcblk0p2 (/data) And symlink it into Internal Memory data (/sd-ext)
Create symlink of app, app-private, app_s and lib_s from mmcblk0p2 (/data) to Internal memory data (/sd-ext)
Create symlink for all non-symllink of Internal Memory data (/sd-ext) into mmcblk0p2 (/data)
After Initializing Setup (First Boot), reboot the system (Just reboot, don't go into recovery), the mod will automatically do this following:
Create data_s in Internal Memory data (/sd-ext)
Move All mmcblk0p2(/data)/data/com.htc* and com.android* into Internal Memory data(/sd-ext)/data_s
Create symlink all files/directory from Internal Memory data (/sd-ext)/data_s/* into mmcblk0p2(/data)/data/ So the System Application Data still read into Internal memory, but rest Application Data will read Into SDCard.
ILLUSTRATION
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
INSTALLATION
For now, use adb shell and Install it manually, I am android newbie , still unfamiliar with recovery zip installer.
Delete Any A2SD Script in /system/etc/init.d ( common name was 40a2sd )
Copy 40ad2sdx into /system/etc/init.d Don't forget to chmod 755/777 it
Reboot ( 2x optional )
INSTALLATION WITH ADB IN RECOVERY MODE
Code:
C:\>adb shell
# mount /system
# exit
C:\>adb push 40ad2sdx /system/etc/init.d/
C:\>adb shell
# cd /system/etc/init.d
# rm 40a2sd
# chmod 755 40ad2sdx
# cd /
# umount /system
# exit
C:\>
NOTE: the "rm 40a2sd" should be the name of app2sd init.d file.
NOTE
If you install it after clean flash you need to reboot your phone at the 1st boot to activate System App Data on Internal Memory.
CAUTION!!!
YOU SHOULD UNZIP AND MANUALY COPY THE FILE INTO /system/etc/init.d/ - THE ZIP FILE WASN'T AUTO INSTALLER THAT CAN BE RUN IN RECOVERY!!!!
WARNING!!!
THIS MOD ONLY IN TEST STAGE, ONLY ADVANCE USER I SUGGEST TO TRY THIS SCRIPT.
I DON'T TAKE ANY RESPONSIBILITY IF YOU BROKE/BOOTLOOPS YOUR SYSTEM/ROM/PHONE.​
TESTED-DEVICE / ROM
HTC Desire (Bravo)
- Cool3D RunnyMede Sense 3.5 v2, v3
- Cool3D AceS Sense 3.0 v3, v4
If You Already Test it and works,.. Please send me a feedback in your comment...
LOGS
Code:
VERSION 1.0 ALPHA02
===================
* Add framework_s into strict mmcblk0p2
* Add Create symlink for rest non-symlink files from mmcblk0p2 to mtdblock5 ( Hope will fix bootloop )
* Change loop method from `ls -d *` to `ls -a` ( may fix error on .systemapp and all file with dot name at first char )
VERSION 1.0 ALPHA01
===================
* Initial Release
* Support for clean flash or already running system
* com.android* and com.htc* set as System App Category
* dalvik-cache on Internal Memory
* add umount /sd-ext in first command
SCRIPT: ALPHA01
Code:
#!/system/bin/sh
#
# AMARULLZ DATA TO SD-EXT MOD FOR ANDROID ( AD2SDX )
# ==================================================
#
# by amarullz [at] yahoo [dot] com
# xda-developers : amarullz
# (c) 2011
# * Oct 19 (ALPHA01)
#
# Info: ~ For Changing Log
##
###
# Initializing
###
#-- SDCard Speed Fix
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]
then
/system/xbin/echo "8192" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
fi;
#-- Unmount /sd-ext if it already mounted
busybox umount /sd-ext;
#-- Mount /data and move it to /sd-ext
busybox mount /data;
busybox mount --move /data /sd-ext;
#-- Mount sd-ext to /data ( You Will Get 1GB/2GB Internal Memory :D )
busybox mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data;
busybox chown 1000:1000 /data;
busybox chmod 771 /data;
###[ SDEXT mmcblk0p2 STRICT ]###
# app, app_s, lib_s, app-private, data : should in /data (mmcblk0p2)
#
# ~ ALPHA02 - Add framework_s into (mmcblk0p2) strict
###
for i in framework_s app app_s lib_s app-private data;
do
#-- If Symlink in /data, delete it
if [ -h /data/$i ]
then
busybox rm /data/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /sd-ext/$i ]
then
busybox mv /sd-ext/$i /data/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /data/$i ]
then
busybox mkdir /data/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /data/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
done;
###[ INTERNAL mtdblock5 STRICT ]###
# For performance, dalvik-cache should be on /sd-ext
###
for i in dalvik-cache;
do
#-- If Symlink in /data, delete it
if [ -h /sd-ext/$i ]
then
busybox rm /sd-ext/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /data/$i ]
then
busybox mv /data/$i /sd-ext/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /sd-ext/$i ]
then
busybox mkdir /sd-ext/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
done;
###
# Now create symlink of the rest non Symlink Directories and Files on /sd-ext to /data
#
# ~ ALPHA02 - Fix ls to ls -a, it's ok, because we test -h for symlink
###
cd /sd-ext;
for i in `ls -a`;
do
if [ $i != ".." -a $i != "." ]
then
if [ ! -h /sd-ext/$i ]
then
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
fi;
fi;
done;
cd /;
###
# It should also need to create the rest non Symlink Directories and Files on /data to /sd-ext
# ~ ALPHA02 - Some Directory may be missing if we don't use it
###
cd /data;
for i in `ls -a`;
do
if [ $i != ".." -a $i != "." ]
then
if [ ! -h /data/$i ]
then
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
fi;
fi;
done;
cd /;
###
# Now Important Thing, is to move the com.htc* and com.android* data to /sd-ext (internal)
# For Good performance. So the system applications will run smooth.
#
# System application will read/write in Internal memory, and 3rd apps will run on sdcard
#
# Notice: Will be affected in 2nd boot :D, so Reboot the system after 1st boot...
###
#-- Prepare data_s in /sd-ext ( For system data )
if [ ! -d /sd-ext/data_s ]
then
busybox mkdir /sd-ext/data_s;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/data_s;
fi;
#-- Now Move All com.htc* and com.android* to Internal Memory
cd /data/data/;
for i in `ls -d com.htc* com.android*`;
do
#-- Only Non Symlink
if [ ! -h /data/data/$i ]
then
busybox mv /data/data/$i /sd-ext/data_s/;
fi;
done;
#-- Create Symlink of /data/data_s/* to /data/data/ (mmcblk0p2)
cd /sd-ext/data_s/
for i in `ls -d *`;
do
#-- Only If Symlink Not Exists
if [ ! -h /data/data/$i ]
then
busybox ln -s /sd-ext/data_s/$i /data/data/$i
fi;
done;
#-- Of Finished.... :D
INSTALL ZIP FROM RECOVERY?
Thanks to tezgomet -- Download Attachment by tezgomet >>
tezgomez said:
SD-EXT Mod - AMARULLZ DATA TO SD-EXT
from recovery
tested on BlissMod007_v03_a-STOCK
install rom and without rebooting install script
!!!WARNING!!!
INSTALL IT ON YOUR OWN RISK.
Click to expand...
Click to collapse
KNOW BUG
Titanium Backup - Restore the Application Data ( com.android*/com.htc* data )
NOT WORK ON YOUR ROM?, DON'T WORRY I WILL HELP YOU
This script (AD2SDX) alghoritm should be compatible in any android phone that support init.d, busybox and rooted, but it still depended on how the ROM place the files in your phone.
To make this script compatible with more ROM+PHONE, you can send me your file system information with this sh script (also available in attachment to download):
Code:
#!/bin/sh
echo "AD2SDX - Dump Logs...";
echo " by amarullz [at] yahoo [dot] com"
echo ""
echo "WARNING!!!"
echo "This script WILL dump an Informations About your Storages,"
echo "If you allow me to know your filesystem structures,"
echo "maybe I can help to improve AD2SDX Compatibility..."
echo ""
echo "This script WILL NOT dump any PHONE NUMBER, IMEI, DEVICE NAME"
echo "SERIAL NUMBER and ANY PERSONAL INFORMATIONS..."
echo ""
echo "But Please provide me your Device Name and ROM when you"
echo "submit it on AD2SDX Thread..."
echo ""
sleep 1
echo "Mounting data, sd-ext, and sdcard..."
mount /data
mount /sd-ext
mount /system
mount /sdcard
echo ""
echo "Dumping FileSystem..."
echo "DF" > /sdcard/ad2sdx-dump.txt
echo "==" >> /sdcard/ad2sdx-dump.txt
df >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "Dumping File List on data files..."
cd /data
echo "LIST /data" >> /sdcard/ad2sdx-dump.txt
echo "==========" >> /sdcard/ad2sdx-dump.txt
ls -la >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "Dumping File List on /sd-ext files..."
cd /sd-ext
echo "LIST /sd-ext" >> /sdcard/ad2sdx-dump.txt
echo "============" >> /sdcard/ad2sdx-dump.txt
ls -la >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "Dumping File List on /system files..."
cd /system
echo "LIST /system" >> /sdcard/ad2sdx-dump.txt
echo "============" >> /sdcard/ad2sdx-dump.txt
ls -la >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "Dumping File List on /system/etc/init.d files..."
cd /system/etc/init.d
echo "LIST init.d" >> /sdcard/ad2sdx-dump.txt
echo "===========" >> /sdcard/ad2sdx-dump.txt
ls -la >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo ""
echo "Finished... Thanks..."
HOW TO DUMP?
You should use adb, or Script Manager as root
Copy ad2sdx-dumpinfo.sh into your /sdcard/
(for ADB): Run "sh ad2sdx-dumpinfo.sh" in adb shell
Copy "/sdcard/ad2sdx-dump.txt" from your phone to your pc ( If you not trust me, you can review it before you send it to me )
Post comments + content of "/sdcard/ad2sdx-dump.txt" in this thread "use CODE or attachment"
COPY FILES WITH ADB
From PC to Phone
Code:
adb push c:\ad2sdx-dumpinfo.sh /sdcard/
From Phone to PC
Code:
adb pull /sdcard/ad2sdx-dump.txt c:\ad2sdx-dump.txt
SHELL
Code:
adb shell
* You are more advance than me about it ...
WARNING!!!
This script WILL dump an Informations About your Storages,
If you allow me to know your filesystem structures,
maybe I can help to improve AD2SDX Compatibility...
This script WILL NOT dump any PHONE NUMBER, IMEI, DEVICE NAME
SERIAL NUMBER and ANY PERSONAL INFORMATIONS...
USE IT YOUR OWN RISK!!!
But Please provide me your Device Name and ROM when you
submit it on AD2SDX Thread...​
EXAMPLE DUMP FILE
Code:
DF
==
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 206664 64 206600 0% /dev
tmpfs 206664 0 206664 0% /mnt/asec
tmpfs 206664 4 206660 0% /mnt/asec/download
tmpfs 206664 0 206664 0% /mnt/obb
tmpfs 8192 0 8192 0% /app-cache
/dev/block/mtdblock3 148480 124428 24052 84% /system
/dev/block/mtdblock5 294528 152336 142192 52% /sd-ext
/dev/block/mtdblock4 5120 1228 3892 24% /cache
/dev/block/mmcblk0p2 1968876 547236 1321624 29% /data
/dev/block/vold/179:1
13656560 4473152 9183408 33% /mnt/sdcard
/dev/block/vold/179:1
13656560 4473152 9183408 33% /mnt/secure/asec
LIST /data
==========
drwxrwx--x 13 1000 1000 4096 Oct 20 15:16 .
drwxr-xr-x 16 0 0 0 Oct 20 15:16 ..
-rwxrwxrwx 1 0 0 1069 Oct 20 08:17 99SuperCharger.sh
lrwxrwxrwx 1 0 0 13 Oct 20 07:49 DxDrm -> /sd-ext/DxDrm
-rw-rw-rw- 1 0 0 14 Oct 20 08:17 SuperChargerAdj
-rw-rw-rw- 1 0 0 34 Oct 20 08:17 SuperChargerMinfree
-rw-rw-rw- 1 0 0 4 Oct 20 08:17 SuperChargerOptions
drwxrwxr-x 2 1000 1000 4096 Oct 20 13:32 anr
drwxrwx--x 2 1000 1000 4096 Oct 20 08:05 app
drwxrwx--x 2 1000 1000 4096 Oct 20 07:50 app-private
drwxr-xr-x 2 0 0 12288 Oct 20 08:20 app_s
drwx------ 5 1000 1000 4096 Oct 20 15:52 backup
lrwxrwxrwx 1 0 0 9 Oct 20 07:49 d -> /sd-ext/d
lrwxrwxrwx 1 0 0 20 Oct 20 07:49 dalvik-cache -> /sd-ext/dalvik-cache
drwxrwx--x 59 1000 1000 12288 Oct 20 08:22 data
lrwxrwxrwx 1 0 0 14 Oct 20 08:07 data_s -> /sd-ext/data_s
lrwxrwxrwx 1 0 0 17 Oct 20 07:49 dontpanic -> /sd-ext/dontpanic
drwxr-xr-x 2 0 0 4096 Oct 20 07:40 framework_s
lrwxrwxrwx 1 0 0 13 Oct 20 07:49 hosts -> /sd-ext/hosts
lrwxrwxrwx 1 0 0 13 Oct 20 07:49 htcfs -> /sd-ext/htcfs
drwxr-xr-x 2 0 0 4096 Oct 20 07:40 lib_s
lrwxrwxrwx 1 0 0 13 Oct 20 07:49 local -> /sd-ext/local
drwxr-xr-x 2 0 0 16384 Oct 20 07:49 lost+found
lrwxrwxrwx 1 0 0 12 Oct 20 07:49 misc -> /sd-ext/misc
lrwxrwxrwx 1 0 0 16 Oct 20 07:49 property -> /sd-ext/property
drwx------ 3 1000 1000 4096 Oct 20 07:50 secure
drwxrwxr-x 9 1000 1000 4096 Oct 21 01:00 system
-rw-r--r-- 1 0 0 3107 Oct 20 15:16 zipalign.log
LIST /sd-ext
============
drwxrwx--x 1 1000 1000 2048 Oct 20 07:38 .
drwxr-xr-x 16 0 0 0 Oct 20 15:16 ..
lrwxrwxrwx 1 0 0 23 Oct 20 08:22 99SuperCharger.sh -> /data/99SuperCharger.sh
dr-xr-xr-x 1 0 0 2048 Oct 20 07:49 DxDrm
lrwxrwxrwx 1 0 0 21 Oct 20 08:22 SuperChargerAdj -> /data/SuperChargerAdj
lrwxrwxrwx 1 0 0 25 Oct 20 08:22 SuperChargerMinfree -> /data/SuperChargerMinfree
lrwxrwxrwx 1 0 0 25 Oct 20 08:22 SuperChargerOptions -> /data/SuperChargerOptions
lrwxrwxrwx 1 0 0 9 Oct 20 08:07 anr -> /data/anr
lrwxrwxrwx 1 0 0 9 Oct 20 07:49 app -> /data/app
lrwxrwxrwx 1 0 0 17 Oct 20 07:49 app-private -> /data/app-private
lrwxrwxrwx 1 0 0 11 Oct 20 07:49 app_s -> /data/app_s
lrwxrwxrwx 1 0 0 12 Oct 20 08:07 backup -> /data/backup
drwxr-xr-x 16 0 0 0 Jan 1 1970 d
drwxrwx--x 1 1000 1000 2048 Oct 20 07:49 dalvik-cache
lrwxrwxrwx 1 0 0 10 Oct 20 07:49 data -> /data/data
drwxrwxrwx 1 0 0 2048 Oct 20 07:49 data_s
drwxr-x--- 1 0 1007 2048 Oct 20 07:49 dontpanic
lrwxrwxrwx 1 0 0 11 Oct 20 07:49 drm -> /data/local
lrwxrwxrwx 1 0 0 17 Oct 20 07:49 framework_s -> /data/framework_s
-rw-r--r-- 1 0 0 708302 Aug 1 2008 hosts
drwxr-xr-x 16 0 0 0 Oct 20 15:16 htcfs
lrwxrwxrwx 1 0 0 11 Oct 20 07:49 lib_s -> /data/lib_s
drwxrwx--x 1 2000 2000 2048 Oct 20 07:49 local
drwxrwx--- 1 0 0 2048 Oct 20 07:49 lost+found
drwxrwx--t 1 1000 9998 2048 Oct 20 15:16 misc
drwx------ 1 0 0 2048 Oct 20 21:54 property
lrwxrwxrwx 1 0 0 12 Oct 20 08:07 secure -> /data/secure
lrwxrwxrwx 1 0 0 12 Oct 20 08:07 system -> /data/system
lrwxrwxrwx 1 0 0 18 Oct 20 08:07 zipalign.log -> /data/zipalign.log
LIST /system
============
drwxr-xr-x 1 0 0 2048 Oct 20 07:41 .
drwxr-xr-x 16 0 0 0 Oct 20 15:16 ..
lrwxrwxrwx 1 0 0 13 Oct 20 07:41 app -> /sd-ext/app_s
drwxr-xr-x 1 0 2000 2048 Oct 20 07:41 bin
-rw-r--r-- 1 0 0 7966 Oct 20 08:17 build.prop
-rw-r--r-- 1 0 0 7437 Oct 20 08:17 build.prop.unsuper
drwxr-xr-x 1 0 0 2048 Oct 20 07:40 customize
drwxr-xr-x 1 0 0 2048 Oct 20 07:41 etc
drwxr-xr-x 1 0 0 2048 Oct 20 07:40 fonts
lrwxrwxrwx 1 0 0 19 Oct 20 07:41 framework -> /sd-ext/framework_s
drwxr-xr-x 1 0 0 2048 Oct 20 07:47 lib
drwxr-xr-x 1 0 0 2048 Oct 20 07:40 lost+found
drwxr-xr-x 1 0 0 2048 Oct 20 07:41 media
drwxr-xr-x 1 0 0 2048 Oct 20 07:41 usr
drwxr-xr-x 1 0 2000 2048 Oct 20 07:41 xbin
LIST init.d
===========
drwxr-xr-x 1 0 2000 2048 Oct 20 07:47 .
drwxr-xr-x 1 0 0 2048 Oct 20 07:41 ..
-rwxr-xr-x 1 0 0 446 Oct 20 13:36 00aroc
-rwxr-xr-x 1 0 2000 1167 Aug 1 2008 02ramtweaks
-rwxrwxrwx 1 0 0 4151 Oct 20 07:47 40a2sd
-rwxr-xr-x 1 0 2000 1938 Aug 1 2008 77tweaks
-rwxr-xr-x 1 0 2000 1499 Aug 1 2008 97zipalign
-rwxrwxrwx 1 0 0 1097 Oct 20 08:17 99SuperCharger
-rwxr-xr-x 1 0 2000 176 Aug 1 2008 99complete
Great!!!
Working with Leo on HyperDroid-CM7-v5.3.0.
But weired behavior: Titanium Backup crashes after every app installation immediately.
Edit: After third reboot Titanium doesn't crash any more!
This script runs like hell....wow!
---------- Post added at 07:27 PM ---------- Previous post was at 06:36 PM ----------
Strange...Titanium only crashes if I try to install apps+data...but not if I only install apps.
Waiting to install, want to see a few more guinea pigs first
It mount only ext4 partition?...
Can you add support for ext2 or ext3 partitions?
Ok, I evaluate first on my sga with xm7.1
Nice to see you again amarullz.
EXT3,2 ??
You can edit this line:
Code:
busybox mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data;
busybox chown 1000:1000 /data;
busybox chmod 771 /data;
icke said:
Great!!!
Working with Leo on HyperDroid-CM7-v5.3.0.
But weired behavior: Titanium Backup crashes after every app installation immediately.
Edit: After third reboot Titanium doesn't crash any more!
This script runs like hell....wow!
---------- Post added at 07:27 PM ---------- Previous post was at 06:36 PM ----------
Strange...Titanium only crashes if I try to install apps+data...but not if I only install apps.
Click to expand...
Click to collapse
Ok, I will try, and look what Titanium Backup Do (may be the error occur when it remove/change com.android* or com.htc* data files)...
-- TIPS --
May Be try this: If you want to restore system applications data (com.android* & com.htc*), Do that in the first boot (clean flash), so the com.android* & com.htc* still in sdcard (not symlinked), after you reboot it, the mod will automatically move it to Internal Memory...
cause me bootloops
jukalo said:
cause me bootloops
Click to expand...
Click to collapse
What ROM & Device?... make sure you do the clean flash, then delete a2sd first
I am using a sense froyo rom 2.38 with kernel infinity on my device and I did a clean flash my device is wildfire even replace the ext4 to ext3 as you be explained in a above post and still the same problem
Hi Amarullz
To my understanding this is simply exchange the sd-ext becomes data partition and data partition now becomes sd-ext.
The script will move all sd-ext contents to data partition and data partition contents will mve to sd-ext. This will limit the size of sd-ext contents (not the size of sd-ext) max at data partition size. When the size of sd-ext contents is more than data partition size, the phone will not boot pass the splash screen or maybe bootloop.
Is there anyway we can mod the script to move only specific folders on sd-ext to data partition ? For example I have app_s, lib_s, frameworks_s and font_s but I want to move only app_s & lib_s to data partition and leave the rest on the sd-ext. I am totally a noob when it comes to scripting.
ckpv5 said:
Hi Amarullz
To my understanding this is simply exchange the sd-ext becomes data partition and data partition now becomes sd-ext.
The script will move all sd-ext contents to data partition and data partition contents will mve to sd-ext. This will limit the size of sd-ext contents (not the size of sd-ext) max at data partition size. When the size of sd-ext contents is more than data partition size, the phone will not boot pass the splash screen or maybe bootloop.
Is there anyway we can mod the script to move only specific folders on sd-ext to data partition ? For example I have app_s, lib_s, frameworks_s and font_s but I want to move only app_s & lib_s to data partition and leave the rest on the sd-ext. I am totally a noob when it comes to scripting.
Click to expand...
Click to collapse
No, I don't move all sd-ext data into /data partition. Actually:
1. Move "mount point" of /data to /sd-ext
2. Mount mmcblk0p2 (commonly mounted on /sd-ext) to /data
All Data remain on mmcblk0p2 but symlinked to /sd-ext for app2sd compatibility except for com.android*, com.htc* and dalvik-cache.
But I know it may not work on all device/rom yet ( still need to fix compatibility ), because something like this maybe happened:
My Script blacklisted "app, app_s, lib_s, app-private, data" in Internal Storage (will move it into mmcblk0p2), If ROM used another directory name, example for app_s is .systemapp, system won't boot, because /system/app symlinked to /sd-ext/.systemapp and there is no /sd-ext/.systemapp because the /sd-ext was originally (/data) [ /system/app should be pointed to /data/.systemapp or /sd-ext/.systemapp pointed to /data/.systemapp ] - Understand what I mean? .
This area on script will strict the "app, app_s, lib_s, app-private, data" into mmcblk0p2 ( in original data only symlink )
Code:
###
# app, app_s, lib_s, app-private, data : should in /data (mmcblk0p2)
###
for i in app app_s lib_s app-private data;
do
#-- If Symlink in /data, delete it
if [ -h /data/$i ]
then
busybox rm /data/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /sd-ext/$i ]
then
busybox mv /sd-ext/$i /data/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /data/$i ]
then
busybox mkdir /data/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /data/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
done;
And this area will strict "dalvik-cache" in Internal Memory
Code:
for i in dalvik-cache;
do
#-- If Symlink in /data, delete it
if [ -h /sd-ext/$i ]
then
busybox rm /sd-ext/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /data/$i ]
then
busybox mv /data/$i /sd-ext/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /sd-ext/$i ]
then
busybox mkdir /sd-ext/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
done;
You can modify this line for your needs:
for i in app app_s lib_s app-private data;
for i in dalvik-cache;
UPDATE ALPHA 02, WITH Compatibility Fix, Add strict framework_s into mmcblk0p2, + dot files fix (.systemapp)
492 free space on internal memory!
I tried this mod on RunnyMede V3 (with coolexes move dalvik to sd script) on a working system (didn't install from scratch) and it works.
Some "problems" I noticed:
- After restart had to resync everything, from contacts, Calendar to fb shortcuts in contacts
- All htc widgets on homescreens were gone (inclusive clock)
- the biggest one: there are no more shortcuts on lockscreen. Try to get them back from personalisation menu, no chance!
I think it should be tried with fresh install. Maybe if I'll find the time I'll try it.
Anyway. Thanks for the script and keep up the work!
flash it from recovery!!!!
Amarullz plz could you make it to flash it from recovery??? PLz it will be gourgeos!!!
Klewe said:
492 free space on internal memory!
I tried this mod on RunnyMede V3 (with coolexes move dalvik to sd script) on a working system (didn't install from scratch) and it works.
Some "problems" I noticed:
- After restart had to resync everything, from contacts, Calendar to fb shortcuts in contacts
- All htc widgets on homescreens were gone (inclusive clock)
- the biggest one: there are no more shortcuts on lockscreen. Try to get them back from personalisation menu, no chance!
I think it should be tried with fresh install. Maybe if I'll find the time I'll try it.
Anyway. Thanks for the script and keep up the work!
Click to expand...
Click to collapse
Try clean flash, I not test it on already running system yet.
About zip install on recovery... I will learn it first... cause I am newbie in Android
751 mb free space internal memory!!
On Blissy mod007 Rom fresh install with stock hboot i have 123 mb internal memory, then with root explorer i erase 40a2sd from system/etc/init.d and i copy you`re 40a2sdx and reboot.After reboot i have 751 mb free space on internal memory, but no icons on lockscreen and no widgets at all!!!
Appreciate a lot you`re work man!!!TNX a lot!!
blissmod007 v03--->774mb internal storage
I used to use data2w..
But i will give it a shot..
Sent from my HTC Desire using xda premium
SD-EXT Mod - AMARULLZ DATA TO SD-EXT
SD-EXT Mod - AMARULLZ DATA TO SD-EXT
from recovery
tested on BlissMod007_v03_a-STOCK
install rom and without rebooting install script
!!!WARNING!!!
INSTALL IT ON YOUR OWN RISK.
Hey,
this is a very nice and good script..much faster as data2ext with sense 3.5 roms..
i have only one problem..i get a wifi error with this script..(tried on 2 different roms...also the same if i change the file in rom.zip and flash it)
Maybe you have a tip for me..?!? (because its strange..not get this error with data2ext or a2sd)
otherwise really good work
with kind regards...Alex

[Q] Messed up Busybox

Hello,
I am unable to install busybox
it says that "it looks like the installation of busybox was not successful.." and asks to install in some other location.
I tried Xbin and Bin but it could not be installed properly.
All app which need root permission are working fine.
I tried to uninstall and re install ..re install using busybox installer.
Also I re-flash CM 10 beta 6 ( Format /System ) deleted xbin , bin directory and reflashed rom) but nothing works
Its confusing that even after deleting xbin, bin directory formatting /system reflashing CM10 yet busybox is not installing.
PS: Busybox was installed successfully on stock ROM it was for a brief period was installed successfully on CM 10 as well. But when I reflash my rom (due to some reason) and tried to install busybox since then I am having problems
Any help is appreciated.
Thanks!
Nikhil_android said:
Hello,
I am unable to install busybox
it says that "it looks like the installation of busybox was not successful.." and asks to install in some other location.
I tried Xbin and Bin but it could not be installed properly.
All app which need root permission are working fine.
I tried to uninstall and re install ..re install using busybox installer.
Also I re-flash CM 10 beta 6 ( Format /System ) deleted xbin , bin directory and reflashed rom) but nothing works
Its confusing that even after deleting xbin, bin directory formatting /system reflashing CM10 yet busybox is not installing.
PS: Busybox was installed successfully on stock ROM it was for a brief period was installed successfully on CM 10 as well. But when I reflash my rom (due to some reason) and tried to install busybox since then I am having problems
Any help is appreciated.
Thanks!
Click to expand...
Click to collapse
Htc? if so then: S-off?
Check the space on the /system partition.
Do you have read and write permissions for root on /system/xbin?
Deleting xbin and bin will make you unable to install busybox for sure.
What application are you using to install busybox?
Run the commands below on your phone or through adb.
Code:
su
df
chmod /system/xbin/
chown 0:0 /system/xbin/
ls -l /system
Post the output from the commands above here.
Lgrootnoob said:
Htc? if so then: S-off?
Check the space on the /system partition.
Do you have read and write permissions for root on /system/xbin?
Deleting xbin and bin will make you unable to install busybox for sure.
What application are you using to install busybox?
Run the commands below on your phone or through adb.
Code:
su
df
chmod /system/xbin/
chown 0:0 /system/xbin/
ls -l /system
Post the output from the commands above here.
Click to expand...
Click to collapse
Yes HTC - S-off rooted and running on CM10
I have tried busybox Stephen (Stericson) latest version
and when it was not getting installed I have trued busybox installer as well
while installing /system/xbin has R/W permission
I deleted files in xbin as coz I didnt know what to do .. I deleted only those files which were created by busybox and then I immediately flashed the ROM, but even after flashing (and wiping /system through cwm) those files were still there.
Here is the output:
/system/xbin mounted as R/W as usual
Code:
[email protected]:/ $ su
[email protected]:/ # df
Filesystem Size Used Free Blksize
/dev 206.4M 48K 206.4M 4096
/mnt/asec 206.4M 0K 206.4M 4096
/mnt/obb 206.4M 0K 206.4M 4096
/system 235.3M 229.6M 5.7M 4096
/cache 59M 2.3M 56.7M 4096
/data 554.1M 447.8M 106.4M 4096
/data/misc 150M 2.5M 147.5M 4096
/data/property 150M 2.5M 147.5M 4096
/data/radio 150M 2.5M 147.5M 4096
/storage/sdcard0 6.8G 4.7G 2.1G 4096
/mnt/secure/asec 6.8G 4.7G 2.1G 4096
/mnt/asec/com.startv.gumrah-1 4M 2.3M 1.7M 4096
[email protected]:/ # chmod /system/xbin/
Usage: chmod [OPTION] <MODE> <FILE>
-R, --recursive change files and directories recursively
--help display this help and exit
10|[email protected]:/ # chown 0:0 /system/xbin/
[email protected]:/ # ls -1 /system
ls: Unknown option '-1'. Aborting.
1|[email protected]:/ #
/system/xbin mounted as r/o purposely
Code:
[email protected]:/ $ su
[email protected]:/ # df
Filesystem Size Used Free Blksize
/dev 206.4M 48K 206.4M 4096
/mnt/asec 206.4M 0K 206.4M 4096
/mnt/obb 206.4M 0K 206.4M 4096
/system 235.3M 229.6M 5.7M 4096
/cache 59M 2.3M 56.7M 4096
/data 554.1M 447.5M 106.7M 4096
/data/misc 150M 2.5M 147.5M 4096
/data/property 150M 2.5M 147.5M 4096
/data/radio 150M 2.5M 147.5M 4096
/storage/sdcard0 6.8G 4.7G 2.1G 4096
/mnt/secure/asec 6.8G 4.7G 2.1G 4096
/mnt/asec/com.startv.gumrah-1 4M 2.3M 1.7M 4096
[email protected]:/ # chmod /system/xbin/
Usage: chmod [OPTION] <MODE> <FILE>
-R, --recursive change files and directories recursively
--help display this help and exit
10|[email protected]:/ # chown 0:0 /system/xbin/
Unable to chown /system/xbin/: Read-only file system
10|[email protected]:/ # ls -1 /system
ls: Unknown option '-1'. Aborting.
1|[email protected]:/ #
Thanks
Nikhil_android said:
Yes HTC - S-off rooted and running on CM10
I have tried busybox Stephen (Stericson) latest version
and when it was not getting installed I have trued busybox installer as well
while installing /system/xbin has R/W permission
I deleted files in xbin as coz I didnt know what to do .. I deleted only those files which were created by busybox and then I immediately flashed the ROM, but even after flashing (and wiping /system through cwm) those files were still there.
Here is the output:
/system/xbin mounted as R/W as usual
Code:
[email protected]:/ $ su
[email protected]:/ # df
Filesystem Size Used Free Blksize
/dev 206.4M 48K 206.4M 4096
/mnt/asec 206.4M 0K 206.4M 4096
/mnt/obb 206.4M 0K 206.4M 4096
/system 235.3M 229.6M 5.7M 4096
/cache 59M 2.3M 56.7M 4096
/data 554.1M 447.8M 106.4M 4096
/data/misc 150M 2.5M 147.5M 4096
/data/property 150M 2.5M 147.5M 4096
/data/radio 150M 2.5M 147.5M 4096
/storage/sdcard0 6.8G 4.7G 2.1G 4096
/mnt/secure/asec 6.8G 4.7G 2.1G 4096
/mnt/asec/com.startv.gumrah-1 4M 2.3M 1.7M 4096
[email protected]:/ # chmod /system/xbin/
Usage: chmod [OPTION] <MODE> <FILE>
-R, --recursive change files and directories recursively
--help display this help and exit
10|[email protected]:/ # chown 0:0 /system/xbin/
[email protected]:/ # ls -1 /system
ls: Unknown option '-1'. Aborting.
1|[email protected]:/ #
/system/xbin mounted as r/o purposely
Code:
[email protected]:/ $ su
[email protected]:/ # df
Filesystem Size Used Free Blksize
/dev 206.4M 48K 206.4M 4096
/mnt/asec 206.4M 0K 206.4M 4096
/mnt/obb 206.4M 0K 206.4M 4096
/system 235.3M 229.6M 5.7M 4096
/cache 59M 2.3M 56.7M 4096
/data 554.1M 447.5M 106.7M 4096
/data/misc 150M 2.5M 147.5M 4096
/data/property 150M 2.5M 147.5M 4096
/data/radio 150M 2.5M 147.5M 4096
/storage/sdcard0 6.8G 4.7G 2.1G 4096
/mnt/secure/asec 6.8G 4.7G 2.1G 4096
/mnt/asec/com.startv.gumrah-1 4M 2.3M 1.7M 4096
[email protected]:/ # chmod /system/xbin/
Usage: chmod [OPTION] <MODE> <FILE>
-R, --recursive change files and directories recursively
--help display this help and exit
10|[email protected]:/ # chown 0:0 /system/xbin/
Unable to chown /system/xbin/: Read-only file system
10|[email protected]:/ # ls -1 /system
ls: Unknown option '-1'. Aborting.
1|[email protected]:/ #
Thanks
Click to expand...
Click to collapse
Ok, it looks like your system partition does not have enough space on this rom.
Please remove some unneeded system apps with something like titanium backup to make /system space.
Looks like we are making progress.
Lgrootnoob said:
Ok, it looks like your system partition does not have enough space on this rom.
Please remove some unneeded system apps with something like titanium backup to make /system space.
Looks like we are making progress.
Click to expand...
Click to collapse
Done. It got installed successfully thanks
Nikhil_android said:
Done. It got installed successfully thanks
Click to expand...
Click to collapse
Glad to see it worked.
Please consider checking out my other work in my signature or donating to me.
Have a good day.

Space missing after DotOS installing

Recently I installed DotOS on my Samsung SM-J320F. All good but internal space was reduced. This phone have 8 GB but I receive this when I run df:
~ # ←[6ndf
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 696068 204 695864 0% /dev
tmpfs 696068 28 696040 0% /tmp
/dev/block/mmcblk0p27
5027508 4601436 409688 92% /data
/dev/block/mmcblk0p27
5027508 4601436 409688 92% /sdcard
/dev/block/mmcblk0p24
197472 276 193100 0% /cache
/dev/block/mmcblk1p1 24862304 13880880 10981424 56% /extSdCard
~ # ←[6n
Also Windows says I have only 4.79GB
How can I recover 3GB of space?
No one know to solve my problem ?

Categories

Resources