[Discussion/Guide]Dalvik-Cache filling internal memory, possible fix - Honor 4x Guides, News, & Discussion

I've been having problem with Honor 4x(kirin 620) internal memory randomly filling without me even using phone. I realized it was dalvik-cache that was filling memory. It was taking like ~700MB after a month use.
I'm using ksrt12 rom AEX v4.6 for Honor 4X. There is a lot of free space in other partitions like /cust /cache /system so I did some searching and found similar discussion with an older/other device about moving dalvik-cache to /system partition and creating symlink to /data. This way you could free some space and put that wasted space in other partitions in some good use without re-partitioning your device.
Make dalvik-cache to take storage space form /cust and /cache
1. Make script like this and put it in /etc/init.d
Give it permissions 700 (rwx-------)
Code:
#!/system/bin/sh
mount -o remount,rw /cust
# If folders don't exist, create them
[ -d /cust/arm64 ] || mkdir /cust/arm64
[ -d /cache/arm ] || mkdir /cache/arm
# Making sure that dalvik-cache in /data is empty
rm -r /data/dalvik-cache/{arm64,arm}
mkdir /data/dalvik-cache/{arm64,arm}
# Set permissions
chmod 711 /cust/arm64 /cache/arm
# The part that actually does something useful
mount --bind,rw /cust/arm64 /data/dalvik-cache/arm64
mount --bind,rw /cache/arm /data/dalvik-cache/arm
2. Reboot to recovery and wipe dalvik-cache, cache and cust.
3. Reboot to system
4. Done!
If you want to wipe dalvik-cache you must wipe /cache and /cust

-deleted

updated thread to a bit easier solution

Related

wipe doesnt wipe

I am using cyanogen recovery, but when I wipe to factory reset from the boot, deletes messages, settings but no the applications, so after boot, I have to set it up like new but has icons and even broken icons from old apps unininstalled. Maybe I messed up the recovery, any suggestion to wipe whole thing?
Thanks in advance
To do a complete wipe, you'll need to format the ext partition. Wiping the phone's memory doesn't completely remove everything.
Can I do it from the phone? or do I have to do it on the PC
You can do it from your phone
In recovery, go to the console:
mount -o rw,remount /dev/block/mmcblk0p2 /system/sd
rm -r /system/sd/*
reboot
AdrianK said:
You can do it from your phone
In recovery, go to the console:
mount -o rw,remount /dev/block/mmcblk0p2 /system/sd
rm -r /system/sd/*
reboot
Click to expand...
Click to collapse
after the first line I get
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: Invalid argument
/#
I noticed that after a wipe, I still had loccy's modified browser. Does wiping only delete information that wasn't part of the original flash?
looks like I dont have mmcblk0p2 in block
rodeohat said:
after the first line I get
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: Invalid argument
/#
Click to expand...
Click to collapse
Epic fail on my part guys >< T
hat line should be
Code:
mount -o rw,remount /dev/block/mmcblk0p2 /system/sd
uansari1 said:
I noticed that after a wipe, I still had loccy's modified browser. Does wiping only delete information that wasn't part of the original flash?
Click to expand...
Click to collapse
Wiping only removes apps and settings (stuff in the /data/ partition of the nand, Launcher.apk resides in the /system/ partition) so launcher will not be affected.
sorry, I cant spot the difference. After I type:
mount -o rw,remount /dev/block/mmcblk0p2 /system/sd
I get
mouting /dev/block/mmcblk0p2 on system/sd failed: Invalid argument
I got it to work by typing:
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
altough it said that couldnt delete it because it was busy,
I rebooted it, wipe, installed the ROM and all apps were gone
Thanks for your help
One more piece of code to put it on my evernote for later
AdrianK said:
Epic fail on my part guys >< T
hat line should be
Code:
mount -o rw,remount /dev/block/mmcblk0p2 /system/sd
Wiping only removes apps and settings (stuff in the /data/ partition of the nand, Launcher.apk resides in the /system/ partition) so launcher will not be affected.
Click to expand...
Click to collapse
remount is only used on partitions that are already mounted, and I can't think of a reason why ext3 partition would be mounted in recovery .
after wipe:
Code:
busybox rm -rf /system/sd/*
Gary13579 said:
remount is only used on partitions that are already mounted, and I can't think of a reason why ext3 partition would be mounted in recovery .
Click to expand...
Click to collapse
Ugh, I copied and psted the old command then forgot to make the change removing remount!! *repeatedly bangs head against the wall*
Sorry for the confusion..but you seem to have sorted it out for your selves
uansari1 said:
I noticed that after a wipe, I still had loccy's modified browser. Does wiping only delete information that wasn't part of the original flash?
Click to expand...
Click to collapse
Wipe clears data and cache only!!!
It does not remove applications in /system/app nor in /system/sd/app
If you have internal apps, ie in /data, then those will disappear

NexusHD2-ICS-CM9 A2SD Discussion

How to increase the internal storage size for the NexusHD2-ICS-CM9 ROM.
May 17 updated:
Another choice. Don't need to flash anything.
Just install Link2SD app from the Google Play (a.k.a. Android Market).
Jan. 20:
Flash any of the A2SD scripts below when you install too many apps and the internal memory (i.e. data partition) is out of space.
Caution: Don't use any of them if you are not an advanced user. Otherwise you may have low volume, performance lag and other strange issues.
Installation guide for 40ad2sdx-a2Recovery.zip
Installation guide for Data2SD.
Installation guide for AD2SDX - AMARULLZ DATA TO SD-EXT.
This rom gets better by the hour! Thank you very much Tytung
Sent from my HD2 using XDA App
Thanks
Does the freeze issue related to A2SD ? My phone working and connected to GSM network but the touch screen is not working at all.
Thank you very much Tytung for the nice Rom !!!!
From the other thread:
manu44 said:
I have installed the Rom v1.1 by using the 40ext script to move the dalvik to sd card
and now i used it without the script
The DIfferemce is there
- No more apps lagging...Whatsapp used to take around 25 sec to show up when i was using my adtosd script
- No more screen lagging
- No more low sound issue
Click to expand...
Click to collapse
Of course you will get no more low sound issue, but since I have changed the read ahead SD speed to 2048 (not sure if thats the reason though) and changed the script that it copies all to SD card ext partition, I have a lot fewer lags than before, when the read ahead was 8mb and I used the unmodified Amarullz script (which leaves dalvik on internal).
Here are my posts for reference:
geenyous said:
Thanks tytung, will upload there next time.
Hmm, but I am using Amarullz script and still have ~300mb left.
Appears that it does the same as the app2sd script TyphooN is using, so every app you install still leaves a bit on internal but the majority goes to sd-ext. This would be about right as I have now 50mb less internal than with TyphooN (150mb partition compared to 200 now) and I had roughly 57mb free space on TyphooN internal with the same apps installed.
Anyone has an idea what to do besides uninstalling some apps?
Thx!
Click to expand...
Click to collapse
bobjbain said:
You can delete the stuff in the cache directory under /sd-ext/data_s/com.android.providers.downloads
...
That's bizarre, I don't know where it gets the 208m for /sd-ext when I have 2G ext4 partition on my card.
And why is /data 1G??
Anyway geenyous, in adb cd to /sd-ext/data_s/com.android.providers.downloads and issue a 'df *' that will tell you how much free space the system actually thinks you have in that directory.
HTH
Click to expand...
Click to collapse
This didn't work, that directory was almost empty...
uzi2 said:
http://forum.xda-developers.com/showpost.php?p=21216357&postcount=384
http://forum.xda-developers.com/showpost.php?p=21232738&postcount=438
http://forum.xda-developers.com/showpost.php?p=21233560&postcount=445
Click to expand...
Click to collapse
OK, just to report on the above Issue:
I have now reinstalled everything with the modified script posted by uzi2 above, now I have plenty of space (actually the internal sd-ext is empty, feels like bit of a waste) as all my stuff is on sd-ext4 (SD card), even dalvik cache. I can now install and update apps again. Just to make it clear for everyone: there is an sd-ext, which is located on NAND and there is sd-ext4 which is located on your SD card after you format it properly.
If you look at Amarullz script, you will see that per default, it will leave dalvik cache as well as system apps on sd-ext (internal). Now, this together with a 200mb system partition will lead to the sd-ext filling up as you install more apps which are considered system apps and consequently you will not be able to dl and update from market anymore. What uzi did, is remove the parts from the script that copy dalvik and those apps to sd-ext. Now, sd-ext is empty, no matter how many apps you install. Maybe it would be good to keep dalvik on sd-ext and only remove the "system apps move to sd-ext" part of the script? Dalvik was like 170mb of size last time I checked, is that constant or number of apps dependent? I must say I don't see any performance issue with dalvik on SD, but it just feels like a bit of a waste
Btw, I also changed the SD speed fix value to 2048 from ~8000 in the script as I think I can recall to have read that this would give the best performance.
Here is the code I am using atm (all the same like uzis except the SD speed):
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 "2048" > /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 - MODIFIED
###
for i in dalvik-cache tts_s app app_s lib_s plugins_s app-private framework_s weather_s 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;
###
# 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 /;
#-- Of Finished.... :D
And this is the part I would suggest maybe you could leave it in to get dalvik to sd-ext (internal):
Code:
###[ 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;
And this the part that should be removed:
Code:
###
# 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;
Or you could do it the other way around, leave system apps on sd-ext (internal) and move dalvik to SD card? Uzi2, as you say your script is tested, did you test this and what were your findings?
I have attached the script in a flashable zip the way I use it now, all on SD card as well as SD speed fix change for anyone that also runs into market install / update troubles.
You have to do a fresh install though, clearing dalvik with the modified script will not move it to SD card and you have to install it the tried way, i.e. flash ROM (kernel), boot, reboot, reboot into recovery, flash script, reboot, set up google account and restore apps. Putting it in right from the beginning gave me bootloops (factory wipe install).
EDIT: Ok, it is confirmed that Dalvik cache is app dependent, it now has a size of 187MB (compared to the 178 I saw before) and I have another 200mb of sd-ext4 left to install more apps. So it is very well possible, that after installing further apps, the 10% space threshold of sd-ext (internal) will be reached again and Market will quit dl / updating apps as it did before. So it looks like the only viable option will be to leave the second part of the script in, the one where all the system (and htc) apps get moved to internal. Looking at the script, it appears that you could put this part in and it will move the apps to internal even after all has been on SD card, can anyone with coding skills please confirm?
Best way to use this script
May i add, that the best possible method is to copy the script file to the ROM zip Before Flashing. This way i didn't encounter any crashes, low volume, whatsoever!
d33f said:
May i add, that the best possible method is to copy the script file to the ROM zip Before Flashing. This way i didn't encounter any crashes, low volume, whatsoever!
Click to expand...
Click to collapse
This is because, there is no need to fix permissions using this method.
Obviously there is no need to wipe dalvik-cache on a fresh install, but if you refrain from doing so on an update, you should not encounter problems.
Please remember to copy the script into init.d on every update.
d33f said:
May i add, that the best possible method is to copy the script file to the ROM zip Before Flashing. This way i didn't encounter any crashes, low volume, whatsoever!
Click to expand...
Click to collapse
I really hate to ruin the party here, especially as I am also a fan of easy solutions, but after I made a factory wipe (a state where most new users will come from when they change CWM partition) and put the script in an otherwise unmodified zip, I had bootloops. And not just one, several.
This then worked for me:
- Format SD card with one FAT32 partition (primary, 32kb block) and one ext4 partition (primary, 4kb block)
- Boot into CWM
- Flash ROM (& Flash Kernel)
- Reboot and don't touch anything
- Reboot into recovery
- Flash script
- Reboot into ROM
- Reboot into CWM and fix permissions
- Reboot into ROM and start setting up your phone
- Done
If you update your ROM, then do the following:
- Unzip script zip (not ROM!)
- Copy the script (called something like "10ad2sd" or "40ad2sdx") to system/etc/init.d/ in ROM zip with something like 7zip
- Boot to CWM
- Flash ROM (& Kernel)
- Done
Thank you for this
This solved all my storage issues. Especially on this new rom. Now I am not experiencing any bugs whatsoever.
geenyous said:
I really hate to ruin the party here, especially as I am also a fan of easy solutions, but after I made a factory wipe (a state where most new users will come from when they change CWM partition) and put the script in an otherwise unmodified zip, I had bootloops. And not just one, several.
Click to expand...
Click to collapse
Was it a bootloop? How long did you leave it, before deciding this?
It will also depend on which a2sd script you use, so just because you encounter problems doesn't mean it's universal.
Edit:Having read the FAQ, I think you may be using Amarullz RC02, whilst I am using Alpha02 (amended)
uzi2 said:
Was it a bootloop? How long did you leave it, before deciding this?
It will also depend on which a2sd script you use, so just because you encounter problems doesn't mean it's universal.
Click to expand...
Click to collapse
You know me, I am not screaming wolf just to get attention. I was using exactly the same script you posted and I never said it was universal. I waited 10 mins, 3 times in a row before I decided to reflash without the script. Took some 3-5 mins and the Set up screen was there. Whatever is the cause here, none of us seem to understand it, at least I don't and you have not posted the reason.
So lets just leave it as it is, if it works, fine, if not, then go the long way, as easy as that
geenyous said:
You know me, I am not screaming wolf just to get attention. I was using exactly the same script you posted and I never said it was universal. I waited 10 mins, 3 times in a row before I decided to reflash without the script. Took some 3-5 mins and the Set up screen was there. Whatever is the cause here, none of us seem to understand it, at least I don't and you have not posted the reason.
So lets just leave it as it is, if it works, fine, if not, then go the long way, as easy as that
Click to expand...
Click to collapse
Even so, 10mins may not be long enough for the ROM to load and the script to perform it's initial functions. You are confusing 2 different versions of the Amarullz script. You may not have read my Edit before replying.
Q !. What tipe of SD card should i use class 4 class 6 or class 10 for a2sd scripts ?
uzi2 said:
Even so, 10mins may not be long enough for the ROM to load and the script to perform it's initial functions. You are confusing 2 different versions of the Amarullz script. You may not have read my Edit before replying.
Click to expand...
Click to collapse
Yes, I have replied before you edited, but still I am using your script
I have never used the one I linked to, just took that from OP. Before using yours I also took the one from Amarullz thread, but the flashable one (added link to FAQ).
Anyhow, it may be that 10 mins are not enough, but I am sure as hell that any other second on this topic is wasted, so I am going to leave it here.
nueloc said:
Q !. What tipe of SD card should i use class 4 class 6 or class 10 for a2sd scripts ?
Click to expand...
Click to collapse
4 or 6 is best.
I've installed 40ad2sdx-a2Recovery.zip as it was said it should be installed, and my phone is going nuts..
EVERYTHING is so slow, even thoe SetCPU is configured correctly.. my phone acts like it's on 400MHz all the time!
Second thing, and the biggest thing are all those FCs.. almost every app is FC, and when I start it again, it SOMETIMES works ok..
Facebook is useless, Market sometimes, Quadrant is giving me <1000 results, Twitter is so slow I can't stand to load up a page, Gallery is working every second time..
And it all worked so darn fast before this App2SD patch..
Hey guys...I've got a problem with the latest ICS build ([15.Jan.2012] NexusHD2-ICS-4.0.3-CM9 V1.1). I'm using a T-Mobile HD2 with MAGLDR v1.13, and I can load ICS up successfully. Calling works and my signal reads full with 3G (with Wind Mobile), but I can't activate the wifi (switching on results in nothing, as if the system attempts to but can't), and 3G appears to be inaccessible with Google Accounts/browser even though it is configured correctly. I've tried wiping, re-installing (with 1024 MB ext4 partition), and putting initrd.gz in an update folder for updating...nothing appears to be working. Can anyone help? Much thanks in advance.
Cold-Tea said:
I've installed 40ad2sdx-a2Recovery.zip as it was said it should be installed, and my phone is going nuts..
EVERYTHING is so slow, even thoe SetCPU is configured correctly.. my phone acts like it's on 400MHz all the time!
Second thing, and the biggest thing are all those FCs.. almost every app is FC, and when I start it again, it SOMETIMES works ok..
Facebook is useless, Market sometimes, Quadrant is giving me <1000 results, Twitter is so slow I can't stand to load up a page, Gallery is working every second time..
And it all worked so darn fast before this App2SD patch..
Click to expand...
Click to collapse
As I understand it, 40a2sdx is Amarullz RC02, which is known to cause problems with this ROM. The Alpha02 is 40a2sd and should work well.
Edit: Sorry, I see that Alpha02 is also 40adsdx. The script I used is based on Alpha01 (40a2sd) - Sorry for the confusion.
The links are now correct in the FAQ
I got problems with touch screen.When i unlock my phone it acts like im still presing or scrolling,and its driving me crazy.When i type sms it presses button by itself,it scroll menu by itself.Even today,when i touch screen the screen get some purple colour,and when im not touching it its ok.Please help me
RyanGDI said:
Hey guys...I've got a problem with the latest ICS build ([15.Jan.2012] NexusHD2-ICS-4.0.3-CM9 V1.1). I'm using a T-Mobile HD2 with MAGLDR v1.13, and I can load ICS up successfully. Calling works and my signal reads full with 3G (with Wind Mobile), but I can't activate the wifi (switching on results in nothing, as if the system attempts to but can't), and 3G appears to be inaccessible with Google Accounts/browser even though it is configured correctly. I've tried wiping, re-installing (with 1024 MB ext4 partition), and putting initrd.gz in an update folder for updating...nothing appears to be working. Can anyone help? Much thanks in advance.
Click to expand...
Click to collapse
mare.djurdjev said:
I got problems with touch screen.When i unlock my phone it acts like im still presing or scrolling,and its driving me crazy.When i type sms it presses button by itself,it scroll menu by itself.Even today,when i touch screen the screen get some purple colour,and when im not touching it its ok.Please help me
Click to expand...
Click to collapse
Please state which version of A2sd you are using, how it is installed and why you think it is a2sd related. Otherwise the main thread may be more appropriate for your questions.
I'll forward this over to the main thread then...I actually don't know what the A2sd version is. x.x

[MOD][Share] Best AD2SDX Script (A2SD/EXT) - AMARULLZ DATA TO SD-EXT

What's up guys. So I've been doing some searching on A2SD/EXT scripts and I cam across this thread. So I decided to try it out on our N1. My results: Amazing. This has to be one of the best A2SD - SD-EXT scripts out there and I noticed that many N1 users know little about it. I am deciding to share it. Please note: I take no credit for creating this script, I just wanted to share it directly with N1 users.
What is it?
This is a flash-able zip file that installs an A2SD-EXT script. This is similar to DTAPPS2SD or any other script but much better. It stores apps and data on your SD-EXT partition and mounts the partition as /data. There are no downfalls to this script, such as the "running out of space" error when only half way used and no audio glitches that can be found with Darktremor's script. (More info on OP linked below.)
How to get it running?
Simple; just flash the zip in recovery. You must have an EXT partition already created on your SD card, obviously. No need to enter any commands in Terminal as it already runs by itself upon boot. I tested and it works with CM7, MIUI, and ICS roms. Been using it for a while with NO problems.
Why choose this script?
Again, simple. It allows for more memory to install apps and mounts all data as internal. There will be no "low mem." issues or low volume issues as found in DTAPPS2SD. Even though this mounts data, there is NO performance issues what so ever. You do not even need a fast card as mine is only class 4. I have been using it for over a month with no random reboots or freezes. Games and apps run just as fast with no lag/blackscreen for a couple seconds when launching apps. There is also no decrease in battery life, just in case anyone was questioning, as I am at 71% being off charger for 8hours medium/low use. Again, I am just sharing it because I see NO N1 users mention it. It is much better than any other ****: DTAPPS2SD Miui stock, iA2SD, S2E...
Download? Original Thread?!
Glad you asked. Here is both: http://forum.xda-developers.com/showthread.php?t=1310309
amarullz said:
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 >>
KNOW BUG
Titanium Backup - Restore the Application Data ( com.android*/com.htc* data )
Click to expand...
Click to collapse
If you install Sebastian Runnymede, it's already built-in, as well as amarulz's touch installer.
Sent from my Nexus One
So I entered that thread and then entered another thread where I could download a flashable zip of it. I downloaded the right script, I assume?
Oh, and thanks for sharing.
EDIT: If it mounts my sd-ext as /data, I'd have to wipe my original data partition before flashing this script, right?
Sent from my Nexus One using Tapatalk
Thanks a lot, I was using Link2SD (from market) but I had out of space soon...
Sent from my Galaxy Nexus using xda premium
Theshawty said:
So I entered that thread and then entered another thread where I could download a flashable zip of it. I downloaded the right script, I assume?
Oh, and thanks for sharing.
EDIT: If it mounts my sd-ext as /data, I'd have to wipe my original data partition before flashing this script, right?
Sent from my Nexus One using Tapatalk
Click to expand...
Click to collapse
The download ZIP link is all the way at the bottom of the post. Yes just flash it. As for wiping, no. I flashed this over a ROM that I was previously using and it worked just fine. I was using S2E for CM7, then flashed script, disabled/uninstalled S2E, and worked fine. I also flashed this over another ROM that had no previous A2sd script, just stock internal, and it worked fine as well.
script sounds great. i've a few questions:
1:
will all apps after flashing automatically will be installed on sd-ext? or do i have to flash the script several times when i installed news apps?
2:
is it possible to move the apps back to internal memory? or to uninstall the script?
thanks
heinz gruber said:
script sounds great. i've a few questions:
1:
will all apps after flashing automatically will be installed on sd-ext? or do i have to flash the script several times when i installed news apps?
2:
is it possible to move the apps back to internal memory? or to uninstall the script?
thanks
Click to expand...
Click to collapse
1 - After installing the script, apps will automatically be installed to the EXT partition. I would only recommend flashing the script again if you install an update to your ROM, but I am mostly sure that this is not necessary.
2 - The script itself does not have the ability to let the user choose which apps are installed on internal and which are installed on the EXT. This is because the script mounts the EXT to /data making your device think that /data internal is much larger.
Androidity3000 said:
1 - After installing the script, apps will automatically be installed to the EXT partition. I would only recommend flashing the script again if you install an update to your ROM, but I am mostly sure that this is not necessary.
2 - The script itself does not have the ability to let the user choose which apps are installed on internal and which are installed on the EXT. This is because the script mounts the EXT to /data making your device think that /data internal is much larger.
Click to expand...
Click to collapse
thanks for your answers.
already post some other in the main-thread of the script:
i'm using a nexus one with cm 7.2 and kgp700s kernel.
now i've created a ext part 4 with amon ra. but when i start titanium backup it only shows me the memory of my sd card and not oft the ext sd. is this because the partition isn't mounted correctly?
can i flash it when i already use the rom for a few days? read somewhere that it would be better to flash it right after flashing the rom.
heinz gruber said:
thanks for your answers.
already post some other in the main-thread of the script:
i'm using a nexus one with cm 7.2 and kgp700s kernel.
now i've created a ext part 4 with amon ra. but when i start titanium backup it only shows me the memory of my sd card and not oft the ext sd. is this because the partition isn't mounted correctly?
can i flash it when i already use the rom for a few days? read somewhere that it would be better to flash it right after flashing the rom.
Click to expand...
Click to collapse
It would be better to flash it with a fresh ROM but is NOT necessary. Your issue is not an issue but part of the script, if I understand you correctly. In Titaniumbackup, check how much internal says is available, not A2SD(EXT). It should be increased and should show the size of your ext partition.
Androidity3000 said:
It would be better to flash it with a fresh ROM but is NOT necessary. Your issue is not an issue but part of the script, if I understand you correctly. In Titaniumbackup, check how much internal says is available, not A2SD(EXT). It should be increased and should show the size of your ext partition.
Click to expand...
Click to collapse
thanks. will try it and give feedback.
I was just about to flash darktremor on my CM7.2 n1.
Then I saw the new featured page on "Mounts2SD - An All-in-one to sd-ext script"
Then I saw this thread.
Which option is the best? I am in urgent need of more /data space!
Darktremor is obviously classic. But I have no experience with it. Does it, or any others, have a UI? Can I view and edit the status of the partition easily from my phone?
sarshadd said:
I was just about to flash darktremor on my CM7.2 n1.
Then I saw the new featured page on "Mounts2SD - An All-in-one to sd-ext script"
Then I saw this thread.
Which option is the best? I am in urgent need of more /data space!
Darktremor is obviously classic. But I have no experience with it. Does it, or any others, have a UI? Can I view and edit the status of the partition easily from my phone?
Click to expand...
Click to collapse
I do not know greatly about M2SD, but I understand that the new ICS rom has incorporated it; so cannot give great feedback with that. DarkTremor does have a GUI (sort of) which is an app on the market (free - a2sd gui) which gives options to move either apps, data, dalvik, etc.. on the EXT. This script does not have a gui as far as I am concerned. I think that this script is easier because all you have to do is flash it once (not after install all ROM updates like DTA2SD). There are many problems with DTA2SD (which is why I said this is the best...) like low volume issues and low memory errors when device is only half way filled.
Bottom line: if you want simple, easy, reliable a2sd install this once and you're good. No questions. That's why my title is what it is...
How is it better than IA2SD in MeDroid 1.4.3 rom? IA2SD does a fairly good job with a nice GUI and just has to be run once when installing the rom for the first time.
Sent from my ASUS Transformer TF101
kiari62 said:
How is it better than IA2SD in MeDroid 1.4.3 rom? IA2SD does a fairly good job with a nice GUI and just has to be run once when installing the rom for the first time.
Sent from my ASUS Transformer TF101
Click to expand...
Click to collapse
I've used IA2SD and I liked it.
How does this compare? Screen shots? Is there a thread for this already with more information that you can point me to?
I've only used the version that comes with MeDroid. I attach a couple screenshots taken from my setup as today.
I don't know any other way to install it, sorry.
I just want to vocalize my thanks to the OP for bringing all this to light.
Simply EXACTLY what I have been looking for!
THANK YOU OP!!
How to enable swap after flashing this?
I am in MeDroid CM7.2, when using DT a2sd, the swap is enabled automatically
but with AD2SDX, the swap can not be enable itself
kykyky said:
How to enable swap after flashing this?
Click to expand...
Click to collapse
Why would you want to do this? Swap on SD is a terrible idea and a great way to wear down your card prematurely, possibly even more so than Data2SD.
What about stock ROM?
I am running nexus1 2.3 stock ROM (rooted). Is there any guide or instructions using which I can set up a working sd-ext partition on this stock ROM?
1) install 4ext recovery and make ext4 partition . Backup your sdcard before
2) install terminal emulator
type su
And a2sd
And yes. Yes. And the phone will reboot itself .
Now U have a working a2sd
Envoyé depuis mon Nexus One avec Tapatalk

Faster CM11

Hi,
Just to give a return about 2 tweaks I use on my phone running MrSteve555 v12.5 CM11 LBL ROM that gave me ~1500 more points on antutu (28340 reached). Antutu score is not important but my phone is significantly more responsive (and battery life probably improved too):
1- Qualcomm Optimized dalviq libs and executables from here : http://forum.xda-developers.com/showpost.php?p=53963337&postcount=1287
The right package is cwm-Qualcomm.Optimized.Dalvik-1+One-CAF.zip
Depending the cm11 you’ re runing you may have to modify this zip install because some libs can be located in an other place (ask your rom dev).
I added also these 2 lines in build.prop (Not sure it helps):
dalvik.vm.verify-bytecode=false
dalvik.vm.dexopt-flags=m=y,o=v,u=y
Then, wipe dalviq cache and restart
2- Now, an old tweak I used on my old motorola atrix runing cm7: disabling ext4 journal on the 3 partitions. On Atrix I never faced any corrupted datas in 2 years, I hope this will continue with my SP. But obviously it’s important to have a stable rom, any unexpected reboot may result in data corruption. It’s not a safe tweak in theory.
To do that I reboot recovery using TWRP. With it I can access the device with adb :
- umount /cache and /system and /data
- tune2fs -o journal_data_writeback /dev/block/mmcblk0p13
- tune2fs -O ^has_journal /dev/block/mmcblk0p13
- repeat this 2 commands with mmcblk0p14 (cache) and mmcblk0p15 (data)
- I also put this script in /system/etc/init.d but didn’t made any benchmark to see if it gives an improvment (it was on my atrix so I put it in my SP) :
#!/system/bin/sh
# Perfect Mounting
# Cut atime
for k in $(mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime,nodiratime $k
done;
# Ext4 tweaks
busybox mount -o remount,rw,noatime,nodiratime,errors=continue,barrier=0,nobh,delalloc,noauto_da_alloc,discard /system
busybox mount -o remount,rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=0,nobh,delalloc,noauto_da_alloc,discard /data
busybox mount -o remount,rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=0,nobh,delalloc,noauto_da_alloc,discard /cache
That's it. Have fun, or not ...

Check internal storage for errors

In case this helps anyone, these are the steps I took to check internal storage for errors:
In Android, get the mount points for /data and /system
Code:
$ su
$ grep /data /fstab.qcom
/dev/block/bootdevice/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr,inline_data wait,check,encryptable=/dev/block/bootdevice/by-name/metadata
$ grep /system /fstab.qcom
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait
Boot to recovery (TWRP)
Unmount /system, just to be safe
(You can use adb shell or the TWRP terminal)
Code:
umount /system
Check /system for errors using e2fsck (since it's an ext4 filesystem)
(The mount points are a little bit different in TWRP)
Code:
e2fsck -fv /dev/block/platform/soc.0/by-name/system
In TWRP, go to Mount, check System, uncheck everything else
Check /data for errors using fsck.f2fs (since it's an f2fs filesystem)
Code:
fsck.f2fs -f /dev/block/platform/soc.0/by-name/userdata
Reboot
Or, you could just use any old Terminal app, do:
su
touch /forcefsck
... and reboot.
Tomo123 said:
Or, you could just use any old Terminal app, do:
su
touch /forcefsck
... and reboot.
Click to expand...
Click to collapse
I read that but it didn't work for me. Have you tried it on a Moto G 2015?
Tomo123 said:
Or, you could just use any old Terminal app, do:
su
touch /forcefsck
... and reboot.
Click to expand...
Click to collapse
... isn't / still part of the initrd, and hence volatile? afaik android doesn't pivot_root

Categories

Resources