cyanogen 4.0.1: changing compcache settings without apps2sd - myTouch 3G, Magic Android Development

i thought that i would repost this in the magic forum as its obviously more relevant here, and i didn't want to slightly thread jack in the dream forum...
i'm currently using cyanogen 4.0.1 and would like to test out some compcache configuration settings to see how they work out, but i can't seem to get them to work...
i DO NOT have apps2sd setup, therefor the a2sd script that is included with the stock 4.0.1 cyanogen ROM seems to not work with userinit.sh and user.conf because the script is looking for these files in the root of the ext partition, which obviously i do not have...
i've attempted to edit the a2sd script to look for the two files in the root of my sdcard instead, by editing the following
Code:
# call a userinit.sh script if it's present on the sdcard
# otherwise just enable compcache with no backing swap
if [ -e /sdcard/userinit.sh ];
then
echo "--- Executing userinit.sh"
busybox chmod +x /sdcard/userinit.sh
/system/bin/sh /sdcard/userinit.sh;
else
modprobe ramzswap;
/system/bin/rzscontrol /dev/block/ramzswap0 --init
swapon /dev/block/ramzswap0
fi
the stock a2sd script was using the if variable
Code:
if [ -e /system/sd/userinit.sh ];
i also edited the userinit.sh file to look for the user.conf file in the /sdcard rather than /system/sd... i have pretty much no programming background, but from all this syntax that i changed, i didn't really find fault in it since it was just changing file directories due to the nature of the /system/sd not being available in my case...
the error that i get from compcache is as follows when i run the command
Code:
#sh /sdcard/userinit.sh -s
Code:
=== CompCache status ===
CompCache version 0.6+
Compcache enabled
CompCache: DiskSize 24452(system) 32768(user)
!!! Unable to set compcache cc_swappiness to user specific "28"
Current system value is "60"
=== CompCache status output ===
DiskSize: 24452 kB
## the rest of the output i assumed would not be needed for my question
if anybody could help me with this, i would appreciate it... i'm fairly certain the solution to my problem is simple, i just can't figure it out on my own as i'm learning everything from scratch... and this is on a mytouch 3G, which i also assume may have some relevance in the issue...
the config files that i am using are 1.4.1, and all i did as you can see from the output is attempt to change the disksize of compcache to 32, and swappiness to 28 using notepad++... i've also tried using it in administrator mode and that yielded the same results
UPDATE: i am being told the reason why this method isn't working is because the /sdcard is not mounted when the a2sd script runs, therefor rendering my changes to the code useless...
i personally believe that since the mytouch/magic have a higher RAM amount, that compcache settings should be configured accordingly, and they are not changed from the g1 settings when loading cyanogen's ROM by default... utilizing userinit.sh and user.conf is not possible without apps2sd, and i would like to experiement with compcache settings and backing swap without having an ext partition and relying on my sd card for processes that would indubitably be faster on the onboard RAM...
so the question is, how would i configure these settings? by editing the a2sd script to grab the userinit.sh and user.conf files from a different mounted directory, or editing cyanogen's ROM and changing the default settings to disksize, swappiness, and backing swap and then resigning the package?

Hello,
I think this can help you :
http://forum.xda-developers.com/showthread.php?t=542899
Edit : sorry ! i didn't see you have post in this thread too !
Scargoll.

bump... would like to know if anyone would help

bump, any suggestions would be nice

Anybody get this working without apps2sd yet?

I would also like to know if compcache settings can be modified without SD wear/a2sd on a mytouch. Any suggestions are greatly appreciated, been trying to fix this homescreen reload issue for a day now...

Related

Tweak Android for Performance, and increase battery by Saving Power Usage with Sysctl

Here I will post tweaks as I find them to optimize Android.
When echoing in the following sysctl settings they do not remain after reboot, so we can adb remount then create a sysctl.conf file on our pc's with these settings, then ./adb push sysctl.conf /etc/ then the kernel should apply the settings every reboot
For examples of a sysctl.conf use google: Sysctl.conf Examples
Open a Terminal and Execute these commands as root
Tweak virtual memory to conserve power when running on battery:
Code:
echo 0 > /proc/sys/vm/swappiness #can be ignored if you dont use swap
echo 0 > /proc/sys/vm/dirty_expire_centisecs #can be ignored if you dont use swap
echo 0 > /proc/sys/vm/dirty_writeback_centisecs #can be ignored if you dont use swap
echo 60 > /proc/sys/vm/dirty_background_ratio
echo 95 > /proc/sys/vm/dirty_ratio
Tweak virtual memory for running on Charger
Code:
echo 0 > /proc/sys/vm/swappiness #can be ignored if you dont use swap
echo 3000 > /proc/sys/vm/dirty_expire_centisecs #can be ignored if you dont use swap
echo 500 > /proc/sys/vm/dirty_writeback_centisecs #can be ignored if you dont use swap
echo 10 > /proc/sys/vm/dirty_background_ratio
echo 40 > /proc/sys/vm/dirty_ratio
Detecting apps/services that hog the battery/cpu:
Also while on battery, you should stop all applications that don't really stay idle when you're not using them, if you want to find which apps arent really staying idle you can:
Code:
strace -p $(pidof yourapp) # for all your running applications
ps aux | awk '{print$10,$11}' | sort -n # will list all running softs sorted by used cpu time
By default when Linux runs out of memory it goes through the process list and starts killing off processes that it thinks are using too much memory. This sysctl makes Linux kill the runaway process that made the system run out of memory instead, which is usually what you want.(this will also reduce cpu time and increase battery usage).
Code:
sysctl -w vm.oom_kill_allocating_task=1
Credit: ccpp0
vfs_cache_pressure to 10 , gives more mem to cache fs dentry and inode to save cpu
At the default value of vfs_cache_pressure = 100 the kernel will attempt to reclaim dentries and inodes at a "fair" rate with respect to pagecache and swapcache reclaim. Decreasing vfs_cache_pressure causes the kernel to prefer to retain dentry and inode caches. Increasing vfs_cache_pressure beyond 100 causes the kernel to prefer to reclaim dentries and inodes.
Code:
sysctl -w vm.vfs_cache_pressure=10
I'll be adding more tweaks for sysctl and basic cmd line tweaks as I find them, also these tweaks would be good integrated into roms, apps, and a power-save widget if anyone wants to get creative.
a few questions
do i enter this into the terminal emulator? also does this only need to be entered in one time? thank you in advance for any help.
great find.. will keep my eye on this thread
david1171 said:
do i enter this into the terminal emulator? also does this only need to be entered in one time? thank you in advance for any help.
Click to expand...
Click to collapse
yes you can enter it in via terminal emulator or ./adb shell, the echo'd settings are not permanent and will reset after reboot, so use the settings to test, then follow the directions to create a /etc/sysctl.conf file to make the settings permanent after you feel comfortable with the settings(if you notice improvement)
defcon
Wow, this is cool, thank you!
Could you maybe add some more comments, I don't really understand what the single commands do. Or some place, where the function of e.g. "dirty_expire_centisecs" is explained?
One more precise question though: If I don't have a swap file on sd, does the tweaking of the swappiness still change anything?
Greetings!
free-sidux said:
Wow, this is cool, thank you!
Could you maybe add some more comments, I don't really understand what the single commands do. Or some place, where the function of e.g. "dirty_expire_centisecs" is explained?
One more precise question though: If I don't have a swap file on sd, does the tweaking of the swappiness still change anything?
Greetings!
Click to expand...
Click to collapse
there is no swap space on G1, so settings related to the swap can be ignored.
echo 0 > /proc/sys/vm/dirty_expire_centisecs
echo 0 > /proc/sys/vm/dirty_writeback_centisecs
never writes out dirty pages ?
free-sidux said:
Wow, this is cool, thank you!
Could you maybe add some more comments, I don't really understand what the single commands do. Or some place, where the function of e.g. "dirty_expire_centisecs" is explained?
One more precise question though: If I don't have a swap file on sd, does the tweaking of the swappiness still change anything?
Greetings!
Click to expand...
Click to collapse
http://tinyurl.com/nlb9ws
Note: The value of vm.swappiness=0 states that no swap space will be used at all, basically it can be ignored if you dont use swap though
defconoi said:
http://tinyurl.com/nlb9ws
Note: The value of vm.swappiness=0 states that no swap space will be used at all, basically it can be ignored if you dont use swap though
Click to expand...
Click to collapse
set vfs_cache_pressure to 10 , gives more mem to cache fs dentry and inode to save cpu "wa".
how do i create a Sysctl.conf file with this script?
i tried the link of examples but all i could find was info about it.
everything else works but when i try
sysctl vm.block_dump=1
i get sysctl: error: 'vm.block_dump=1' is an unknown key
any ideas?
actually ya know what I think we can just disable sysctl all together in menuconfig->Filesystems->Pseudo Filesystems->Proc->Sysctl Support when compiling a new kernel and setting these tweaks right in the kernel.
Says in menuconfig"As it is generally a good thing, you should say Y here unless
building a kernel for install/rescue disks or your system is very
limited in memory."
So I think we can gain some memory disabling this since we dont really need it
disable /dev/mem
Also I think we can disable the Memory Device Driver, /dev/mem, it says it can be disabled for security conscious and can be disabled on memory tight systems, which we are definitely memory tight plus there's just no valid app that uses /dev/mem on actual memory.
Other popular users of /dev/mem are rootkits and the like.
(note: mmap access of memory via /dev/mem was already not allowed since
a really long time)
People who want to use /dev/mem for kernel debugging can enable the config
option.
tshizzle said:
how do i create a Sysctl.conf file with this script?
i tried the link of examples but all i could find was info about it.
everything else works but when i try
sysctl vm.block_dump=1
i get sysctl: error: 'vm.block_dump=1' is an unknown key
any ideas?
Click to expand...
Click to collapse
I have the same exact questions that u do
Unix98_ptys
Also do we really need UNIX98_PTYS enabled?
We can also use this to conserve memory if we dont need this as well...
menuconfig says:
"Unix98 PTY support UNIX98_PTYS
A pseudo terminal (PTY) is a software device consisting of two
halves: a master and a slave. The slave device behaves identical to
a physical terminal; the master device is used by a process to
read data from and write data to the slave, thereby emulating a
terminal. Typical programs for the master side are telnet servers
and xterms.
Linux has traditionally used the BSD-like names /dev/ptyxx for
masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
has a number of problems. The GNU C library glibc 2.1 and later,
however, supports the Unix98 naming standard: in order to acquire a
pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
terminal is then made available to the process and the pseudo
terminal slave can be accessed as /dev/pts/<number>. What was
traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
All modern Linux systems use the Unix98 ptys. Say Y unless
you're on an embedded system and want to conserve memory."
jroid said:
I have the same exact questions that u do
Click to expand...
Click to collapse
ahhhh it looks vm.block_dump=1 isnt a valid sysctl option, disregard that, gonna remove it from the first post
defconoi said:
ahhhh it looks vm.block_dump=1 isnt a valid sysctl option, disregard that, gonna remove it from the first post
Click to expand...
Click to collapse
yea. all the other ones work though. how would we make the file??
jroid said:
yea. all the other ones work though. how would we make the file??
Click to expand...
Click to collapse
adb remount
create sysctl.conf on your system
then adb push sysctk.conf /etc and the settings will be set every reboot.
defconoi said:
adb remount
create sysctl.conf on your system
then adb push sysctk.conf /etc and the settings will be set every reboot.
Click to expand...
Click to collapse
ok so it would be something like this?
adb remount
adb shell
mkdir /system/sysctl.conf
adb push sysctl.conf /system/etc
jroid said:
ok so it would be something like this?
adb remount
adb shell
mkdir /system/sysctl.conf
adb push sysctl.conf /system/etc
Click to expand...
Click to collapse
no, adb push sysctl.conf /etc
this isn't working. i created the dir sysctl.conf in /system then tried adb pushing it but says no such file or dir. then i tried in adb shell cp /system/sysctl.conf /etc
it says cp: omitting sysctl.conf is a directory"
couldnt i just create it directly in /etc?
like this mkdir /system/etc/sysctl.conf
defconoi said:
no, adb push sysctl.conf /etc
Click to expand...
Click to collapse
on android /etc is within the /system/etc directory.

Cyanogized Compache nocturna.JacHeroz (jachero 2.7.3MOD with compache support)

THIS HAS NOTHING TO DO WITH JAC 2.7.4 This is different!!
JacHeroski cyanagized with compache swap
07/21/09 1:27PM
download rename to update.zip and put on the phone flash as normal requires special spl and new radio
also requires ext2/3 swap and linux swap partitions
Nocturna.JacHeroZ cyanogized 1.0b
Much thanks to: justanothecrowd,cyanogen,ccyrowski,haykuro,jesufreke,D.b. hates you,drizzydrakerogers,h.nocturna, and jasherai
H.NOCTURNA! thanks for those .ko files or i wouldve been up till like 5 am looking
Im at work right now so i cant really put this all together quite yet but ill give you the rundown of how it will be done
if you dont wanna use the precompiled update.zip to avoid wipe
First download and flash Jachero 2.7.3
Then download jacheroski 1.4c and unzip in the folder you will need to things the "boot.img" in the main folder then jump into the /system folder and go ahead and copy the "modules" folder as well then open up /system/lib/modules/ and copy the wlan.ko
also youll need /system/bin/a2sd.sh
you should have 4 files pulled from this rom:
Modules
Boot.img
wlan.ko
a2sd.sh
heres what you do with those things:
Take modules and
adb push modules /system/modules/
take boot.img
adb push boot.img /sdcard/
wlan.ko
adb push wlan.ko /system/lib/modules
then please check this post and download the .ko files zipped attached to post
right here!!!
youll need to put these two files onto /system/modules/
one should be ramzswap.ko and xvmalloc.ko
Now for the a2sd.sh .. this script is ran on boot to do apps2sd but you can add to the end of it wich is what we are going to do
you will need to open this i used a word processor on my mac so it worked i duno about windows but you need to add these lines of code and then save it as a seperate document KEEP THE ORIGINAL!
#!/system/bin/sh
insmod /system/modules/xvmalloc.ko;
insmod /system/modules/ramzswap.ko memlimit_kb=32000 backing_swap=/dev/block/mmcblk0p3;
mknod /dev/ramzswap0 b 253 0;
echo 20 > /proc/sys/vm/swappiness;
swapon /dev/ramzswap0;
exit;
THEN adb time agian
adb push a2sd.sh /system/bin/
adb shell chmod 755 /system/bin/a2sd.sh
ok after this is done we need to change over to cyanogens boot.img wich contains his kernel that works with compache
so you either need to do this in adb or in terminal from the phone
$su
#flash_image boot /sdcard/boot.img
#exit
$exit
bingo bango cyanogized now!
ok now its time to reboot the phone
should start up as normal "may take a bit the first boot"
after fully booting up open up terminal app and type the following
$su
#free
(this should display your swap line with numbers in it)
IF YOU GET ZEROS HERE STOP WHAT YOUR DOING AND SKIP TO THE BOTTOM FOR INSTRUCTIONS TO FIX THAT
if you dont get zeros everything is going good
now type the following
$su
#cat /proc/ramzswap
you should get a list of things if it says not found stop what your doign skip to the bottom for instructions to fix it
if it gave you a list of numbers great everythings good enjoy your new faster jachero!
IF YOU GOT ZEROS IN YOUR SWAP LINE OR NO READING FOR ramzswap!!!
Do the following,
take your original a2sd.sh and get in adb
adb push a2sd.sh /system/bin/
adb shell chmod 755 /system/bin/a2sd.sh
adb shell reboot
now....
i suggest doing this in adb but you can type it all in terminal if you want...
type the following to enable compache
$su
#insmod /system/modules/xvmalloc.ko
##insmod /system/modules/ramzswap.ko memlimit_kb=32000 backing_swap=/dev/block/mmcblk0p3
#mknod /dev/ramzswap0 b 253 0
#echo 20 > /proc/sys/vm/swappiness
#swapon /dev/ramzswap0
#cat /proc/ramzswap
should show a list of numbers probably all at 0.. this is good
reboot phone now (the insmod and swap on stick after reboot)
tada!!
whenever i get off work ill compile this and post the update.zip for those who dont feel like doing this much work
this is not a SUPER customized rom or anything i just put together pieces i wanted to enable the compache swap on this... i feel it increases responsivness ALOT and alot smoother interface using compache and linux swap
lmk about any bugs or anything
h.nocturna said:
I actually have my update.zip completely finished. I threw it together last night, but I lost multi-touch as well as the weather update for the "Current City" everywhere else would update, but it would say no weather information for my current location. =/ I can throw the update.zip up if you guys want. I have basically the exact same changes that Zarboz had since I followed his instructions... lol
EDIT: Uploading now...
http://depositfiles.com/files/k449ghyxq
If anyone knows how to fix the weather problem or get multi-touch back, let me know and I'll update, and resign for you guys.
Compcache set up: push userinit.sh from zip to /system/sd/
-or-
Code:
#!/system/bin/sh
insmod /system/sd/xvmalloc.ko;
insmod /system/sd/ramzswap.ko memlimit_kb=32000 backing_swap=/dev/block/mmcblk0p3;
mknod /dev/ramzswap0 b 253 0;
echo 20 > /proc/sys/vm/swappiness;
swapon /dev/ramzswap0;
exit;
Click to expand...
Click to collapse
'
TODO LIST!
Multitouch on Cyanogens kernel
optimize compache script on boot (reading jasherais posts like crazy)
wow thanks for this, will wait for ya update.zip! out of curiosity, how much automation will your update.zip have? example, after flashing with Jachero 2.7.3, will your update.zip take care of everything else?
trying this now, will report back if it works after im done
Edit: ill quickly compile an update.zip for this, might take a while to upload though
the only problem i encountered when i did this was editing the a2sd.sh and getting it to work after i put it back in the system
if you have to get into terminal and do
su
chmod 755 /system/bin/a2sd.sh
exit
just to be safe
this script also enables the linux swap partition on boot
so your using compache highspeed swap as piramry and linux swap as secondary the compache swap is stored on your ext2/3 partition
Zarboz said:
the only problem i encountered when i did this was editing the a2sd.sh and getting it to work after i put it back in the system
if you have to get into terminal and do
su
chmod 755 /system/bin/a2sd.sh
exit
just to be safe
this script also enables the linux swap partition on boot
so your using compache highspeed swap as piramry and linux swap as secondary the compache swap is stored on your ext2/3 partition
Click to expand...
Click to collapse
I wish I wasn't at work so that I could do this right now!! I guess that I will have to wait a few hours (Plus by then I'm sure someone will have an update to flash. If not I'll make on when I get home and upload it)
i'm gonna try this now. will report back
Diceman4 said:
I wish I wasn't at work so that I could do this right now!! I guess that I will have to wait a few hours (Plus by then I'm sure someone will have an update to flash. If not I'll make on when I get home and upload it)
Click to expand...
Click to collapse
yah when i get off a t 9pm central time ill make a update.zip and get it put up somewhere
I actually have my update.zip completely finished. I threw it together last night, but I lost multi-touch as well as the weather update for the "Current City" everywhere else would update, but it would say no weather information for my current location. =/ I can throw the update.zip up if you guys want. I have basically the exact same changes that Zarboz had since I followed his instructions... lol
EDIT: Uploading now...
http://depositfiles.com/files/k449ghyxq
If anyone knows how to fix the weather problem or get multi-touch back, let me know and I'll update, and resign for you guys.
Compcache set up: push userinit.sh from zip to /system/sd/
-or-
Code:
#!/system/bin/sh
insmod /system/sd/xvmalloc.ko;
insmod /system/sd/ramzswap.ko memlimit_kb=32000 backing_swap=/dev/block/mmcblk0p3;
mknod /dev/ramzswap0 b 253 0;
echo 20 > /proc/sys/vm/swappiness;
swapon /dev/ramzswap0;
exit;
NguyenHuu said:
wow thanks for this, will wait for ya update.zip! out of curiosity, how much automation will your update.zip have? example, after flashing with Jachero 2.7.3, will your update.zip take care of everything else?
Click to expand...
Click to collapse
itll basically be 2.7.3 wiht some minor structure changes
all i really did was add compache support i didint rewrite the whole thing
h.nocturna said:
I actually have my update.zip completely finished. I threw it together last night, but I lost multi-touch as well as the weather update for the "Current City" everywhere else would update, but it would say no weather information for my current location. =/ I can throw the update.zip up if you guys want. I have basically the exact same changes that Zarboz had since I followed his instructions... lol
EDIT: Uploading now...
Click to expand...
Click to collapse
sweet lmk when it gets up and ill put a link on main page
i might crack it open and do some other minor changes i might know why the current city isnt working
##edit## it works on mine .......
MULTITOUCH WILL NOT WORK ON THIS BUILD! due to cyanogens kernel
i dont use it anyway....
lmk when its up
Zarboz said:
sweet lmk when it gets up and ill put a link on main page
i might crack it open and do some other minor changes i might know why the current city isnt working
##edit## it works on mine .......
lmk when its up
Click to expand...
Click to collapse
Its up now. Out of curiosity, do you still have multi-touch on yours?
EDIT: HAHAHAHAHA!! Looks like we got one-upped. JACHero2.7.4 w/ compcache is being uploaded now.
h.nocturna said:
Its up now. Out of curiosity, do you still have multi-touch on yours?
EDIT: HAHAHAHAHA!! Looks like we got one-upped. JACHero2.7.4 w/ compcache is being uploaded now.
Click to expand...
Click to collapse
PSHH dangit
o well wahts the link ill still put it up
Zarboz said:
PSHH dangit
o well wahts the link ill still put it up
Click to expand...
Click to collapse
I added the link to my other post on page 1
h.nocturna said:
I actually have my update.zip completely finished. I threw it together last night, but I lost multi-touch as well as the weather update for the "Current City" everywhere else would update, but it would say no weather information for my current location. =/ I can throw the update.zip up if you guys want. I have basically the exact same changes that Zarboz had since I followed his instructions... lol ..snip..
Click to expand...
Click to collapse
I just set this up myself using the directions in the first post, and I can get weather info for my current location...
EDIT: And it flies now... Here's my info...
Code:
# free
free
total used free shared buffers
Mem: 97908 96472 1436 0 92
Swap: 94672 14208 80464
Total: 192580 110680 81900
# cat /proc/ramzswap
cat /proc/ramzswap
DiskSize: 32000 kB
NumReads: 1946
NumWrites: 3848
FailedReads: 0
FailedWrites: 0
InvalidIO: 0
PagesDiscard: 0
ZeroPages: 276
GoodCompress: 75 %
NoCompress: 7 %
PagesStored: 3572
PagesUsed: 1135
OrigDataSize: 14288 kB
ComprDataSize: 4510 kB
MemUsedTotal: 4540 kB
BombaMyte said:
I just set this up myself using the directions in the first post, and I can get weather info for my current location...
EDIT: And it flies now...
Click to expand...
Click to collapse
i think that rosie girl likes the compache dope makes her go real fast
My system is not utilizing compcache, instead preferring to use my swap. I'm now testing my system with swap partition disabled:
# swapoff /dev/block/mmcblk0p3;
coolbho3000 said:
My system is not utilizing compcache, instead preferring to use my swap. I'm now testing my system with swap partition disabled:
# swapoff /dev/block/mmcblk0p3;
Click to expand...
Click to collapse
The way h.nocturna coded the userinit.sh for this made it prefer compache over linux swap partition for speed issues then linux swap is secondary
lmk how it runs with no linux swap partition on
EDIT
my system didnt use the compache swap till after reboot then it was FAST
Zarboz said:
i think that rosie girl likes the compache dope makes her go real fast
Click to expand...
Click to collapse
LMAO! Hell yeah she likes that compcache dope! Got a friend that's been trying *not* to root his phone for a few months now. He will once he sees this...
BombaMyte said:
LMAO! Hell yeah she likes that compcache dope! Got a friend that's been trying *not* to root his phone for a few months now. He will once he sees this...
Click to expand...
Click to collapse
i need to change the scripting the swap is getting slow after a day or two there was some info in the compache thread about this ... ill let yall know whtas goin on
I realized you need to turn on the swap on sd after compcache has initialized.

[HACK] (!update 04/26/2010) JIT enabled Dalvik VM on Android 1.6 (Dusted Donuts)

Update (fix for /cache/dalvik-cache 04-26-2010): Really only use this if your having issues using the symbolic link fixes posted by other members or are just out of free space on /cache. First the new issues people are experiencing is in cm-based-kernels from 4.2.15.x and not JIT enabled DalvikVM and people using danger/death spl will experience problems faster. Lack of space on /cache is a problem and will cause market downloads to fail as well as email attachments. The other problem is the kernel fails for various and unknown reasons to mount bind /cache/dalvik-cache to /data/dalvik-cache.
The other issue is the use to dalvik-cache clearing scripts and options in RA recovery, stop clearing your dalvik-cache, the .dex files are created when missing and you do not get any benefits by doing so and cause more wearing leveling of NAND, plus the script in RA recovery doesn't appear to look at /cache/dalvik-cache for dex files. This little update script (when installed correctly).
Understand that /cache/dalvik-cache is a newer option as a means to free up space on /data is by using /cache/dalvik-cache as a first storage of dex files then using the standard /data/dalvik-cache for over flow of dex files and newer installed apps. Somewhere along the way something may throw this and you get douplicate dex files in both locations, one way to check is to boot into recovery and
Code:
mount -a
and check dalvik-cache directories in both /cache and /data for douplicate dex files.
The script will fix these issues, or should at least:
Endless loop FCs on boot
broken /cache/dalvik-cache mount
no binded mount
missing user apps
missing system apps
failed market downloads
non-working symlink patches and installers (no need to run these, they will break this patch)
fixes duplicate dex files in both /cache/dalvik-cache and <target>/dalvik-cache (because it deletes /cache/dalvik-cache)
Will not Fix:
your ignorance
your unwillingness to read
your unwillingness to learn
your compulsive ROM flashing disorder
your compulsive dalvik-cache clearing syndrome
version 1.1.1(updated 4/27/2010 @ 10:10 PM) is current and was slapped together from Phonekenstein, it doesn't look for the existance of /cache/dalvik-cache it assumes it's there and deletes it wether it's a directory, a symlink or a file, re-creates a new empty /cache/dalvik-cache with Android default permissions and mount binds it to /data/dalvik-cache (be it a directory, a symlink or another binded mount) /cache/dalvik-cache will follow the target /data/dalvik-cache (no worries for apps2sd users or non-apps2sd users).
Script will turn on the blue LED when booting so you know it executed (if it annoys you then edit the script and make it pink)
Tested on Cyanogen MOD 4.2.15.1 and SuperD 1.10.3:
with and without apps2sd
with and without a /dev/block/mmcblk0p2 (apps2sd script nulled)
with and without a custom /dev/block/mmcblk0p4
with mount binded /ext/dalvik-cache (mmcblk0p4) to /data/dalvik-cache
with /data/dalvik-cache as a symbolic link to /ext/dalvik-cache (mmcblk0p4)
All scenarios experienced no failures as long as you set your permissions correctly on all targets and files and /cache/dalvik-cache followed and binded flawlessly.
install is simple and can be done through terminal:
1. download 86dalvik-cache-fix <--Long press and chose "save link as" (also attached to this post)
2. open terminal and issue these commands:
NOTE: COMMANDS ARE CASE sensitive in LINUX and as such ANDROID!!!!!!
ALL OFF THESE COMMANDS ARE IN lower case. SO Turn off your Auto-Caps options in your keyboard options. These command assume you downloaded the script using your the web browser on your G1/Magic whatever phone and the file is located in /sdcard/download (the default location for web browser downloads).
Code:
su
mount -o rw,remount /system
cp /sdcard/download/86dalvik-cache-fix.txt /system/etc/init.d/86dalvik-cache-fix
chown 0:2000 /system/etc/init.d/86dalvik-cache-fix
chmod 755 /system/etc/init.d/86dalvik-cache-fix
sync
reboot
Why 86dalvik-cache-fix? We want the script to execute after all scripts in /system/etc/init.d/ including /system/sd/userinit.sh (if you are using one) and before script 99. 86 because in 1987 everything got 86'd.
If you are having a problem getting the script to execute, copy it or merge it into /system/sd/userinit.sh (even if you aren't using a mmcblk0p2(ext partition)) it may make it work with FastTest builds, however the permissions on his builds appear to be root everything and I have problems getting the script to execute out of /system/etc/init.d even with root permissions.
--------------------------------------------------------------------------------------------------------------
Primer: Read this about Dalvik VM http://en.wikipedia.org/wiki/Dalvik_virtual_machine
Read this to: Google Groups post about JIT compiler for Dalvik VM from Android-Platform Link
From the post we see that this particular compiled library is ALPHA, so results can vary, but from reading most posts in this thread the results are right near the talked about 3x faster code, stability is going to vary on what apps and or widgets are running. More Widgets = slower performance as these have processes that are eating cycles. When testing with Linpack wait for the advertisement to load first then tap the benchmark button and remove your finger from the touch screen. Background process such that interrupt or having auto-rotate enabled while testing is going to give you slower benchmarks.
In short your apps should load faster and run faster, particularly 3D games. The web browser is faster and you can actually scroll through pages even while graphics are still loading.
The reboot when enabling it is long even appearing to hang at the G1 Screen for 5 minutes or more but once it starts booting past this you will know that your ROM is compatible. The cause is that the dex files are being optimized, after about a third reboot, your ROM should feel pretty snappy and launching apps should be quicker as well as switching apps. The snappiness lasts as well and as some may have said that it's a placebo effect are wrong. Bench mark readings prove it and more importantly a few ROM builders have included this in their 2.1 ROMs as experimental.
The libdvm.so that t3steve cross compiled for the DROID at the time was for Android 2.0, the library works for with newer ROMs Android 1.6 that have some eclair pieces built into the kernel, CyanogenMOD has been using bits and pieces for a while now, if other ROM builders have been using his kernel and framework than a good chance it will work for your phone as well.
I have nothing to do with the compiling of this or the exact functions of enabling JIT except that I had a hunch that the combo might work and it did, so I'm sharing it.
If you aren't good at typing in commands, or don't know how to extract a zip file and understand that a sub folder may or may not exist where you have extracted said zip file to, well.... you may run into some issues, maybe a video tutorial for basic command line on youtube would be a good place to learn.
I wanted to make a very detailed post on www.andoidonroids.com about how to mash the JIT enabled Dalvik VM library into Android 1.6 Donuts I'm calling the hack "Dusted Donuts" and take from the name for what you will. I have been using the JIT enabled Dalvik VM for about two weeks and i runs decent but not perfect. Anyhow a death in the family Sunday has kept me from making a decent post and haven't had the time to get to the website and post and cross post and give credit where due.
No doubt that aaraya1516 broke the news on http://forum.xda-developers.com/showpost.php?p=5703076&postcount=193 as he was first to break the hack on FastTest, not taking anything away from him on that.
My testing goes back two weeks or more even during the 580mhz & 780mhz hack, I was waiting for someone to compile a boot.img with some 2.x stuff and sure enough the carlospants boot.img from ctso worked with enabling JIT for Dalvik VM, but as we know now the overclocking doesn't work at the moment.
Thank Cyanogen and t3hSteve of which may not know that this was entirely possible. Cyanogen mixed in enough Eclair into his Donuts (he's like Willy Wonka) that makes it possible to use the cross compiled JIT enabled Dalvik VM library from 2.1 for the Motorola DROID 2.0.1 libdvm.so that t3hSteve of www.alldroid.com compiled for the custom roms on Droid.
WARNING: Using other methods supplied from other forum members that include replacing the build.prop may cause problems, using the build.prop from the original VMLIBS.ZIP (which is here for reference and original source for libdvm.so) is definitely going to cause ROM and application problems. Hello....use your head here... the VMLIBS.ZIP is for Motorola DROIDS, why would you put the build.prop file for a DROID on your G1 and expect your apps or ROM to work afterwards? It's so simple, you need 1 file, it's called libdvm.so it goes in /system/lib a file by the same name already exists there and it's in your best interest to at least back it up before overwriting it and gives you the ability in the event that your system doesn't boot up you can restore it through recovery console and get your phone to boot past the G1 screen.
FYI: Some ROMs have the option dalvik.vm.execution-mode=int:fast in the /system/build.prop file, this would need to be changed to dalvik.vm.execution-mode=int:jit or commented out or deleted. If you want to play with advanced options create /data/local.prop and fiddle in there with options available from typing dalvikvm -h in your console or terminal app.
Required:
1. Android 1.6 ROMS with a bit Eclair stuff in the Kernel and framework such as Cyanogen ROM 4.2.x, Super D 1.8 - 1.92, WG Y2.6, FastTest, KingKlick Eclair and more.. This libdvm.so works on Android 2.1 as well as it seems it should.. 1 st bootup is slow and I recommend you let it sit even when desktops are up for a couple of minutes and then reboot it, 2nd and 3rd bootups are faster and smoother response overall even for long durations, days.
FIX YOUR FILE SYSTEM FIRST !!!!!! Got to do it from Recovery Console, It's partly the cause of poorly running ROMS and takes seriously longer to type the command than to fix your unknowingly faulty file system. EXT2 is the worst offender and the built in function to repair falls short, even more so when checking EXT4.
Code:
#e2fsck -fcpDC0 /dev/block/mmcblk0p2
#reboot recovery
For the lazy fingers
#e2fsck -fcpDC0 /*/*/*0p2
#reboot recovery
1. Download www.androidonroids.com/dusted-donuts (File has 3 scripts backup, install, restore, 2 folders, 1 libdvm.so)
2. Extract zip to root of /sdcard or where ever you like (the zip has a folder containing the files named dusted-donuts)
3. Open Terminal or go to Recovery Console
FYI when running the install through Terminal your system may freeze or reboot and if it does I highly recommend that you prepare to enter Recovery Mode and check your file system. EXT2 corrupts quickly choosing this for apps2sd to use is not the best option especially if you are using custom ROMs that may lockup or reboot, basically that's a crash.
Code:
$su
#mount -o rw,remount auto /sdcard
#cd /sdcard/dusted-donuts
#sh backup
#sh install
#sync
#reboot
Check the Dalvik VM execution mode. look at the bottom line with_jit means the it is installed , and look at all of those options that can be jammed into your build.prop and local.prop files
Code:
$su
#dalvikvm -h
Phone won't boot past G1 screen? Go to recovery console and restore libdvm.so (give it at least 5 minutes first before giving up)
Code:
#mount -o rw,remount auto /sdcard
#cd /sdcard/dusted-donuts
#sh restore
#sync
#reboot
---------------------------------------------------------------------------------------------------------------------
prefer to use VMLIBS.ZIP from t3hSteve? This is how you can install using that.
Required:
1. Android 1.6 ROMS with a bit Eclair stuff in the Kernel and framework such as Cyanogen ROM 4.2.x, Super D 1.8 - 19.2, WG Y2.6, FastTest, KingKlick Eclair and more.. This libdvm.so works on Android 2.1 as well as it seems it should..
How to install: (easier to go in recovery mode but can be done through terminal)
1. Download the VMLIBS.ZIP from t3hSteve of allroid.com http://alldroid.org/download/file.php?id=1374
2. You only need the libdvm.so file of which appears to be JIT enabled by default.
3. Backup the original libdvm.so #cp /system/lib/libdvm.so /sdcard/libdvm.so
4. Copy the JIT enabled libdvm.so #cp -f /sdcard/vmlibs/libdvm.so /system/lib/libdvm.so
5. Set permissions on the file #chmod 644 /system/lib/libdvm.so
Optional for disabling: (easier to do vi through recovery console, since the back key escapes out of terminal)
To disable JIT MODE but want to keep the libdvm.so create a local.prop in /data and add dalvik.vm.execution-mode=int:fast
#vi /data/local.prop
press the i key to enter vi interactive mode
type dalvik.vm.execution-mode=int:fast
press back key to exit vi interactive mode
to write the file out and quit vi type :wq
or
restore your backed libdvm.so file from the sdcard.
-----------------------------------------------------------------------------------------------------------------------
Enjoi! the dusted donuts,
-Licknuts (me? I'm like Varuca Salt, I want another pony)
Vendor G1 roms around 1.2 Mflops, Custom G1 roms are around 2.4 MFlops/s and with JIT compiled Dalvik VM 3.6 MFlops/s. At most you will see 3.5 MFlops/s fairly consistently with a minimal load on your system and highs at 3.7 Mflops/s. Test before and after using Linpack from the Market, it's free.
The 13.236 Mflops/s is not normal and you will probably not see with your testing, I have seen 5.x & 7.x but these are far and few between and this took a while with tweaked configurations/settings with a persistent app to kill processes, it is attainable and I hope a ROM developer finds the sweet spot to exploit.
Looks nice.
Pre-JIT enabled: 2.194 Mflops/s
Post-enabled: 3.459 Mflops/s
Not quite getting the results you have there.
Running SuperD 1.9.2 Black W/ Nexus Theme. I copied it twice to make sure that the libdvm.so was copied correctly to the directory. Rebooted the phone, same results. Looks very promising though. If I did something wrong, lemme know.
Managed to get #10 on G1 Benchmarks with 3.583 Mflops/s... still nowhere near 13.~ Mflops/s
same here. Running Super D 1.9 on my magic
before JIT I got 1.xxxx Mflops/s
after i have 2.xxxx Mflops/s
how do you get the 13 Mflops/s ?
-edit-
with swap disabled i'm getting 3.5 Mflops/s
h.nocturna said:
Looks nice.
Pre-JIT enabled: 2.194 Mflops/s
Post-enabled: 3.459 Mflops/s
Not quite getting the results you have there.
Running SuperD 1.9.2 Black W/ Nexus Theme. I copied it twice to make sure that the libdvm.so was copied correctly to the directory. Rebooted the phone, same results. Looks very promising though. If I did something wrong, lemme know.
Managed to get #10 on G1 Benchmarks with 3.583 Mflops/s... still nowhere near 13.~ Mflops/s
Click to expand...
Click to collapse
I got 9 seconds on the pi benchmark
What will this do??
samsara00 said:
same here. Running Super D 1.9 on my magic
before JIT I got 1.xxxx Mflops/s
after i have 2.xxxx Mflops/s
how do you get the 13 Mflops/s ?
-edit-
with swap disabled i'm getting 3.5 Mflops/s
Click to expand...
Click to collapse
So I guess this only works with Swap off?
sabin123 said:
What will this do??
Click to expand...
Click to collapse
Speed your *hit up!
it works with and without swap.
Just the benchmark result is better when swap is turned off.
Got nearly the same as samsara00:
Rom: SuperD 1.9.2
Before (swap off): ~ 2.3 MFlops/s
After JIT enabling (swap off): ~ 3.5 MFlops/s
But the increase to 13.x seems so unreal, why is there only one result that high in the toplist of greene.com!?
Now to find out if this actually speeds up everyday use lol
CM4.2.14.1
Before: 2.3
After: 3.5
Wow! This made my 3G connection faster too. Was only getting 1500kbps before, now getting on average 3200kbps. Awesome. I'm located in Toronto, on Rogers.
Question: Is this Google's JIT? Will Myraids Dalvik Turbo be faster?
Doesn't boot past the G1 screen when using Dwangs 1.17.1 Assume thats because it has no Eclair in it, but it was worth the dream .
Waw!! great works!!
left is before - right one is after
on CM 4.2.14.1, enabled Swap 64MB, CC ON, RAM Hacked
So do we copy the zip to the root of our sd card? Do I extract it first and just copy the one file? The instructions are kind of vague.
G1ForFun said:
So do we copy the zip to the root of our sd card? Do I extract it first and just copy the one file? The instructions are kind of vague.
Click to expand...
Click to collapse
Not to be rude, but if you don't understand those directions, this isn't the sort of thing you should try to do yourself. Wait for a ROM builder to add this in. The directions are perfectly clear, you just need to understand command line use.
If you want to learn something about CLI use, install Linux on your computer and learn to use it without the GUI. If you don't want to do that, google for "cygwin" and use the bash shell they provide for Windows based machines.
Personally, I used adb and just pushed the darn file lol works perfectly fine, like everything else I've ever pushed. Just don't forget to set the permissions for the file.
tried in a terminal and with adb getting read-only file system when trying to copy over the libdvm.so file
SilentTweak said:
Personally, I used adb and just pushed the darn file lol works perfectly fine, like everything else I've ever pushed. Just don't forget to set the permissions for the file.
Click to expand...
Click to collapse
Nothing wrong with adb. Hell, I used SSH to do it. Just about anything will work, you just have to know what you're doing.
Damn.... I just rebooted and it took about half the time it used to.
Tried the Linpack benchmark, getting about 3.5 with SuperD 1.9.2 w/Compcache 16M swappiness=10. Fresh reboot, obviously. Lock your CPU to 528 (min and max) for more consistent results. When I have 128min 528max, it gives different results depending on the current CPU speed. SetCPU or Overclock Widget helps a lot here. No instability noticed yet, but this should probably be considered an unstable hack for now till we all get more experience with it. I know OpenEclair removed the JIT VM because of stability problems.
Sgt.EddieWinslow said:
tried in a terminal and with adb getting read-only file system when trying to copy over the libdvm.so file
Click to expand...
Click to collapse
Do "adb remount" first
ttabbal said:
Not to be rude, but if you don't understand those directions, this isn't the sort of thing you should try to do yourself. Wait for a ROM builder to add this in. The directions are perfectly clear, you just need to understand command line use.
If you want to learn something about CLI use, install Linux on your computer and learn to use it without the GUI. If you don't want to do that, google for "cygwin" and use the bash shell they provide for Windows based machines.
Click to expand...
Click to collapse
Obviously they are not clear to me. Why argue the point?
I have worked plenty with cmd type interfaces...so please...put down your know it all stick and be helpful.
edit: hope this helps somebody else...look better instructions posted in the fasttest thread!
download files here and copy them on the sdcard
created a folder /sdcard/jit and put the three files in it
make a folder /sdcard/dalbk and copy the original files
adb pull /system/build.prop .
Open in WordPad/Textpad and add as the last line: dalvik.vm.execution-mode=int:jit
SAVE IT, copy/push it on the /sdcard/jit folder
Sgt.EddieWinslow said:
tried in a terminal and with adb getting read-only file system when trying to copy over the libdvm.so file
Click to expand...
Click to collapse
Code:
C:\Android\tools>adb shell
# su
su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 777 /system/lib/libdvm.so
chmod 777 /system/lib/libdvm.so
# cp -f /sdcard/vmlibs/libdvm.so /system/lib/libdvm.so
cp -f /sdcard/vmlibs/libdvm.so /system/lib/libdvm.so
# chmod 644 /system/lib/libdvm.so
chmod 644 /system/lib/libdvm.so
# reboot
Damn.... I just rebooted and it took about half the time it used to.
Click to expand...
Click to collapse
Indeed
Licknuts result : 3.1-3.5 (with Super-D 1.9.2)
My method of installing it:
adb remount
adb push libdvm.so /system/lib/libdvm.so
Then open console and type:
su
chmod 644 /system/lib/libdvm.so
reboot
I'm about to try this myself.. has anyone noticed an overall increase in speed? Benchmarks are great but it's all about how it actually performs!
I'll post my own findings in a bit.

[Script][A2SD]Darktremor 2.7.5.3 Beta 04 [HeroCDMA] (01/29/2011)

Introducing...
Darktremor Apps2SD 2.7.5.3 Beta 04
Date of Release: January 29, 2011
Download Current Version
Instructions - Change Log - Commands - ROM List - Developer's Guide
Darktremor Apps2SD Fan Page ----
Darktremor Apps2SD Development Group
Are you installing Darktremor Apps2SD on your phone? Here are the instructions to help you: Facebook
Are you a developer wanting to include Darktremor Apps2SD in your latest ROM? Here is the Developer Guide: Facebook
Click to expand...
Click to collapse
Update on Beta 4
It seems I'm getting mixed results with these betas. I'm not sure why this is occurring, some people have been able to get this working right while others have had a hard time with it.
Currently, I'm rebuilding the entire program. This takes a while because I have to figure out how to pack all these options into the program but make it small enough to where it will run correctly.
I will say that some of the beta features are coming back out...one of them is the search for a partition code. I suspect that code may be leading me into issues with certain platforms, so I'm going back to the 2.7.5.2 method of mounting (mmcblk0p2 or mmcblk1p2).
Also, parts of the code will use Busybox Ash (the only code that won't will be starta2sd, which will still use Bash for the time being). The startup code will definitely use Busybox Ash.
Until then, here are the links to the the last two betas and the last official release:
Version 2.7.5.3 Beta 04 - http://www.darktremor.info/files/a2sd/dtapps2sd-2.7.5.3-beta04-signed.zip
Version 2.7.5.3 Beta 03 - http://www.darktremor.info/files/a2sd/dtapps2sd-2.7.5.3-beta03-signed.zip
Version 2.7.5.2-1 - http://www.darktremor.info/files/a2sd/dtapps2sd-2.7.5.2-1-signed.zip
And, if you want past versions, you can view the repository: ftp://dtuser:[email protected] (ignore the smiley face...that's XDA doing that.)
Click to expand...
Click to collapse
Beta 04 took longer than I expected to release. I have done major changes to the code:
1. New commands: convert-ext4 - This will convert your EXT3 partition into EXT4. Just a friendly reminder on this command: Not every rom supports EXT4, so it is possible to go into a boot loop if you switch roms. Use with caution.
2. Reworked convert-ext3 (convert-ext4 gets similar code)...now a flag file is set before the reboot (no conversion is done before the reboot). At load time, the conversion is performed. This takes longer in the reboot process and you may think your phone has locked up...wait about five minutes before doing anything with the phone.
3. Repair is rebuilt...now it uses existing commands to repair the setup (reinstall, remove, cachesd, cachepart, nocache, datasd, nodata). Definitely shrinks the code.
4. Added fix_permissions program to the package. This may help with Superuser issues when using the datasd feature. It is used in reinstall, remove, datasd and nodata.
5. a2sd install is back!!! Both a2sd install and a2sd reinstall do the exact same thing.
6. Dalvik heap code has been shrunk and now creates a file called dalvikheap. Actually, the code has been doing this all along (since about 2.7.5.2, I think), but I never put the code in to use the file.
7. Low Memory Killer code has also been shrunk and uses a file caled dtset_lowmem to set the low memory killer parameter.
8. Replaced Busybox PS function with Toolbox PS. The issue with Busybox PS is that it gives a false reading when I look for android.process.acore (which is the main program when the GUI starts up). If that is present, the program thinks you are trying to run Darktremor without any command line parameters. This was because Busybox would report the process was there when, in reality, it wasn't (validated this when my phone was boot looping.) Toolbox's PS reports the correct setting. This should fix the bootlooping issues some people are experiencing.
9. New commands: usedtbusybox and usedefaultbusybox - these commands may help in diagnosing issues that is may be related to the native Busybox on your rom. a2sd usedtbusybox will use the Busybox that is packaged with Darktremor. a2sd usedefaultbusybox will turn back on the scan behavior of the program introduced in Beta 03.
10. Support for Darktremor Apps2SD version 2.7 and earlier has been discontinued. To upgrade correctly from one of those versions, use version 2.7.5.3 Beta 03b or earlier.
11. Finally fixed stalled boot issues (or at least my tests with several roms says so.)
See the change log for additional details.
You will notice that if the program runs repair and finds a problem, it will correct the issue and reboot. You will see a second reboot when the dalvik-cache clears (this is to fix timing issues with CyanogenMod...I can't control that startup as well as I can other roms). This only happens if repair is ran or you flash a new rom (as repair will realign all data). If you are upgrading from a previous version of Darktremor, you should not see the reboots.
Click to expand...
Click to collapse
This is Darktremor Apps2SD, a multipurpose program that primarily allows a user to execute applications created for the Android OS on their Secure Digital card (with the proper setup...more on that later). But, Darktremor Apps2SD is all about stability. The goal is to be able for all users of the Android OS to be able to take advantage of a method to run their applications from a secure digital card.
But just because the Darktremor Apps2SD is all about stability, doesn't mean it isn't packed with features:
- Move applications (both free and paid) to the Secure Digital card.
- Move Dalvik Cache to run either from your Secure Digital card or from your cache partition and clears the cache on demand.
- Boot Loop Protection: prevents the phone from boot looping in the event the SD card could not be mounted.
- Dalvik JIT for faster performance on Roms which support it.
- User selectable sizes for the Dalvik heap sizes, allowing a user to freely optimize their system.
- Activate a swap partition on your SD card and sets how often the swap partition is utilized.
- Automatically fixes configuration issues.
- Users can check the free space on their SD card and check the installation to make sure all is setup correctly.
- Runs ZipAlign on demand...this makes your programs load faster.
- Built in help system for easy reference of commands.
- All features can also be reversed without repartitioning your Secure Digital card.
- New logging features assists in troubleshooting issues.
- Commands to set the Low Memory Killer feature at boot time. Great for those people who are the "set it and forget it" type.
- And more...
Darktremor Apps2SD is not the same as Froyo Apps2SD. Froyo Apps2SD creates a secure folder on the FAT32 section of your SD card (this is the section that you see when you mount your phone to your computer) and stores the programs there. This is nice as you don't have to do anything special with the phone, but it isn't backwards compatible with older versions of Android (Cupcake, Donut, Eclair) and, because of the way Froyo works, older programs not designed for Froyo will automatically stay on your internal storage (unless you install a program that forces the move to your SD card).
Darktremor Apps2SD takes a different approach. Based on the original CyanogenMod works, Darktremor Apps2SD uses symbolic linking to force Android into moving your applications to the SD card. Because Android will not allow anything to be ran from the FAT32 partition on your SD card (and, in Froyo, it will only allow you to run programs from a special folder), Darktremor utilizes filesystems called EXT2, EXT3 and EXT4. Each one of these filesystems is native to Linux (the operating system running Android), which allows you to run programs from them (same as, say, a computer running Ubuntu). This method is completely compatible with all versions of Android, including Froyo. In fact, you can run both the Darktremor Apps2SD and Froyo Apps2SD at the same time.
Check out the list of Roms that either have Darktremor Apps2SD installed or are compatible with Darktremor Apps2SD. Click on the link labeled ROM List at the top of this message.
Darktremor Apps2SD Installation Instructions
How to install:
NOTE: ROMS THAT ARE ORM (ORIGINAL ROM FROM MANUFACTURER...ALSO KNOWN AS STOCK ROMS) WILL NOT RUN ANY VERSION OF APPS2SD EXCEPT FROYO.
The code to launch Apps2SD is not present in the init.rc. The only way Apps2SD will work with a Stock ROM is if the init.rc has been modified with the commands to run Apps2SD.
Click to expand...
Click to collapse
Since you are flashing this version to your phone, do a nandroid backup of your phone before starting these instructions. Also, it is preferred you use RA 1.6.2 Recovery, Godspeed Recovery or ClockworksMod Recovery.
Click to expand...
Click to collapse
1. Download the program from the previous post.
2. Determine if you have setup your sd card with an ext partition
if you have setup your sd card already (existing users of a2sd...any version):
A. Copy the program to your sd card.
b. Reboot into recovery
Click to expand...
Click to collapse
if you have not setup your sd card (for those new to a2sd):
A. backup your sd card to your computer. can't stress this enough, as partitioning will wipe the entire card.
B. Reboot into recovery
c. In android system recovery, select partition sdcard
d. In the partition sdcard menu, select partition sd
e. Follow the instructions on the phone to partition your sd card. You can optionally set a swap file while you are partitioning your sd card.
F. In the partition sdcard menu, select sd:ext2 to ext3. Follow the instructions on the screen.
G. only perform this step if you want ext4 and your rom supports it: in the partition sdcard menu, select sd:ext3 to ext4. Follow the instructions on the sdcard.
h. Press the back button on the phone to go back to the main menu.
I. Put the a2sd file on the sd card (and all your other files you backed up earlier) by selecting usb-ms toggle and transfer the files to your computer.
Click to expand...
Click to collapse
3. In recovery, select flash zip from sdcard.
4. In flash zip from sdcard, select the a2sd package file you downloaded earlier. Press home to flash.
5. Reboot phone.
Click to expand...
Click to collapse
Note: Due to an issue with the Sprint Hero source code, ext4 partitions may only work intermittently. You may not want to use an ext4 partition unless the rom you are using is certified to have a working ext4 partition. If you have issues with ext4, repartition your sd card for ext3.
Click to expand...
Click to collapse
Note: If you apply Darktremor Apps2SD and still notice internal storage is decreasing, this is due to the dalvik-cache not being moved. By default, Darktremor Apps2SD will not move the dalvik-cache on boot.
If you want to move the dalvik-cache to the sd card, type:
a2sd cachesd (move dalvik to sd card)
a2sd cachesdreset (move dalvik to sd card and clears contents of dalvik-cache)
a2sd cachepart (move dalvik to cache partition)
a2sd cachepartreset (move dalvik to cache partition and clears contents of dalvik-cache)
Make sure your SD card is at least a class 4 before doing this, otherwise you may run into performance issues, unless you move the dalvik to the cache partition.
You still have other caches (i.e. Browser caches) and other data being stored and updated in internal storage, so the number of free space will continue to drop, but at a slower rate (unless you are engage in heavy web surfing, tweeting or facebook socializing.)
Click to expand...
Click to collapse
Darktremor Apps2SD Credits and Change Log
Special Thanks:
Thanks to the following people for helping me with Darktremor Apps2SD:
Toastcfh
- For assisting me in getting my test kernel setup to run ext4...that helped tremendously with development.
- For testing it (along with Flipzmode) on FreshToast 2.0 (CDMA Hero).
- For (along with Flipzmode) helping to identify the disappearing marketplace issue.
shahid.malik
- For testing on VillianROM 5.5 (HTC GSM Hero)
- For testing on VanillaEclair 2.0.1 (HTC GSM Hero)
Andrizoid
- For testing on Evil Eris 2.0 (HTC Eris)
- For including it in Smash Rom (HTC Eris)
Framework43
- For adding to Evil Eris 2.0.1 (HTC Eris)
DS36
- For testing on Eris Official 1.0 Alpha w/ Controllable Overclocking (HTC Eris)
4SidedDice (and others)
- For testing it on DamageControl's 2.08 and later (CDMA Hero)
Flipzmode
- For including it (along with Toastcfh) in FreshToast 2.0 (CDMA Hero)
- For including it in Fresh Hero (HTC CDMA Hero)
- For including it in Fresh Evo (HTC Evo)
- For (along with Toastcfh) helping to identify the disappearing marketplace issue.
Kurt666
- For testing on Pay's ROM for Desire v1.4 (HTC Desire)
Cordy
- For helping with general testing of Darktremor Apps2SD
zygame
- For including it on Daguu_Espresso_v1.2_By_FlZyGaMeUp-Pre-release-2 (HTC GSM Hero)
chuckhriczko
- For including it in SuperSonic v2.0 (HTC Evo)
zenulator
- For including it in ZenEXP 0.9.6.2 (HTC CDMA Hero)
crunchybutternut
- For including it in Buufed 1.7.2 (HTC CDMA Hero)
.mac
- For including it in ZenEXP Eris Expresso (HTC Eris)
Papa Smurf151
- For including it in Blue Echo (HTC CDMA Hero)
- For including it in Red Dawn (HTC CDMA Hero)
beezy420
- For including it in HoneyBun Rom (HTC CDMA Hero)
britoso
- For testing it on Froyo FRF50 and FRF83 (Nexus One)
djmcnz
- For including it in Kang-o-rama 0.9 Froyo (Nexus One)
THATTON
- For testing the installation process on ClockworksMod Recovery.
eViL D:
- For including it in eViL n-One-sh0t Noir 7 (Nexus One)
t2noob
- For including it in Plain Jane T2 2.1 (HTC Eris)
Jr33
- For including it in Froyo AOSP Beta3 (Nexus One)
- For including it in CliqMod (Motorola Cliq)
UltimoJedi
- For supplying the elusive base address to build a boot image on the HTC Legend.
MrDanger
- For including it in DangerRom (HTC CDMA Hero for Cellular South)
Kiljacken
- For including it in KiljackenROM (HTC Tattoo)
BesFen
- For including it in BesFen Apps2SD ROM (HTC Legend)
dsixda
- For including it in his Android Kitchen
freddyemmer
- For including it in Vodafone 845 MR Edition
attn1
- For including it in Liberated_Aria (HTC Aria)
capychimp
- For including it in RCMagic 4.2 for Rogers Cellular (HTC Magic)
nfinitefx45 (and others)
- For showing me the binding mount method for using dalvik-cache on the cache partition and using SenseUI (roboclk helped with this as well).
- For including it in NFX-Hero
Click to expand...
Click to collapse
If I forgot anyone...let me know.
Click to expand...
Click to collapse
Change Log
Darktremor Apps2SD Version 2.7.5.2
- Added additional code to allow /dev/block/mmcblk1p3 to be a swap partition. This complements the multiple location codes that were added in 2.7.5 Final that allows for EXT mounting from /dev/block/mmcblk0p2 or /dev/block/mmcblk1p2
- Fixed a few lines in the code that did not write to the log file correctly.
- Fixed the log file reference. It was pointed at "/data/dta2sd.log;"...the semicolon didn't need to be there.
- Adjusted the installer script to only remove files in /system/etc/init.d that have the following words in it: apps2sd, a2sd, cache, dalvik. It will also name the launcher file either 04apps2sd, 10apps2sd or 40apps2sd...depending on number availability (the number in the front of the file tells Busybox what sequence to run the file...you can't have two or more files start with the same number (i.e 04modules and 04apps2sd...one of these files will be skipped). This is to address concerns with other roms regarding the partition mounting as an ext2 when it was formatted as an ext4 (module launcher was overwritten by Darktremor).
Click to expand...
Click to collapse
Darktremor Apps2SD Version 2.7.5.1
- Added mounting functions to the cache partition. This mounts dalvik-cache directory on the cache partition (/cache/dc) to /data/dalvik-cache. The end result is SenseUI thinks it is storing dalvik-cache files on /data/dalvik-cache rather than the cache partition. No more force closes when using the cache to store dalvik-cache and using SenseUI.
- Added swappiness settings for swap partition. The command is a2sd swappyxx, where xx is the value you wish to set swappiness to (i.e. to set swappiness to 30%, type a2sd swappy30).
- Added a2sd partlist to list the available EXT partitions available on your rom. This should reduce the number of complaints about incorrectly mounting the ext partition.
- Rebuild a2sd repair to run from starta2sd. Fixa2sd is no longer available.
- Unmounts the EXT partition before it performs an automated reboot. This should reduce the time to mount the SD card (which it doesn't look like it did..oh well).
- Removed smallheap, largeheap and jumboheap command. Replaced with heapsizexx command, where xx is the number of megs you wish to set aside for dalvik cache.
Click to expand...
Click to collapse
Darktremor Apps2SD Version 2.7.5 Final
- New commands: cachepartreset, cachesdreset, nocachereset. These commands do the same as their counterparts (cachepart, cachesd, nocache), but it doesn't move the contents of the dalvik-cache. This allows users to perform both a move and a reset of the dalvik-cache.
- cmpatch command has been removed. The CyanogenMod patch that was related to that command automatically installs as part of startup.
- boota2sd has been removed. All functions have been transferred to launcha2sd. The "lite" version of Apps2SD no longer exists (replaced by the contents of boota2sd). This was done to speed up Apps2SD load time (this is part of the CyanogenMod 6 fixes).
- Mount commands now looks for both /dev/block/mmcblk1p2 and /dev/block/mmcblk0p2. This is to allow compatibility with phones that use mmcblk0p2 for other items (i.e. Froyo).
Click to expand...
Click to collapse
Darktremor Apps2SD Version 2.7.5 Release Candidate 3 (RC3)
- Four releases (three official, one unofficial): RC3, RC3A, RC3B (unofficial), RC3C...subsequent versions used to fix interactive issues between Darktremor Apps2SD and CyanogenMod Nightly Builds.
- Mount point has changed from /system/sd to /data/sd (RC3 only). This is mostly for stability with NAND protected phones. This was reversed back in RC3A. However, there is code in RC3C that detects whether the mount point /sd-ext (used in CyanogenMod and Froyo builds) exists...if so, it uses that mount point instead of /system/sd. - Include /system/bin/sysinit from CyanogenMod for developers who wish to use the CyanogenMod Froyo method outlined in the Rom Guide.
- a2sd swapspace now uses different data to show the swap sizes and free.
- Changed verbage in a2sd check to reflect the a2sd reinstall and a2sd reswap commands.
- New command: a2sd cmpatch - this command symlinks /cache/dalvik-cache to /data/dalvik-cache. Also creates a new Dalvik to Cache directory: /cache/dc.
- Now have a way to detect if the program is running during boot. Type a2sd by itself on a command prompt will display the help file.
Click to expand...
Click to collapse
Darktremor Apps2SD Version 2.7.5 Release Candidate 2 (RC2)
- a2sd install and a2sd swap have been renamed to a2sd reinstall and a2sd reswap. This is due to too many people thinking that a2sd install and a2sd swap is the commands used to install apps2sd and to turn on swap. These functions are automatic when apps2sd starts. Those commands are suppose to be used to a) reactivate apps2sd after running the a2sd remove command and b) reactivate swap after running a2sd noswap.
- Corrected lowmem-default command to work.
- Uses the installed Busybox on the phone or the included Busybox for Apps2SD. This may help with phones that are ext3 capable but only mount as ext2.
- Added more logging for Sysinfo
- Creates a separate dump file during Sysinfo that has numerous pieces of information about the phone. This will help in future troubleshooting and development of Apps2SD (it doesn't get sent anywhere).
- Detects Froyo build in a2sd check and a2sd repair. This will use the asterisks (old format) rather than the checkmarks (new format) in the report.
Click to expand...
Click to collapse
Darktremor Apps2SD Version 2.7.5 Release Candidate 1 (RC1)
- Added mknod command to create /dev/block/mmcblk0p2 (mostly for Froyo kernels)
- Added logging. Log is saved in /data/dta2sd.log
- Added Low Memory Killer commands (lowmem-moderate, lowmem-strict, lowmem-optimum, lowmem-aggressive, lowmem-extreme, lowmem-ultimate). Now the user can control the low memory killer settings and reapply them on boot. a2sd check reports Low Memory Killer settings - Moved launching of boota2sd from starta2sd to launcha2sd. This eliminates one level of bash shell, which should make the program use less memory.
- Now displays the help file when a2sd is called without command parameters from the command line.
- Added a new property: apps2sd.run. This is used for determining if a2sd is being called at first boot or the command line.
- Fixed an issue with moving /data/app and /data/app-private where the permissions were not being copied. This caused strange issues to occur in applications, especially the paid apps.
- a2sd check now reports "default setting" used when dalvik.vm.heapsize doesn't exists.
- Detection of No Apps2SD flag file has been installed in the Apps2SD Lite Version (apparently that was skipped all this time).
- Moved the code to activate swap to the front of launcha2sd. This is until I find a better way of detecting it.
- New format for a2sd check and a2sd repair. Now displays graphic symbols. Should make the report easier to read. Note: New graphics doesn't work so well in Froyo builds. A fix is coming soon.
- New commands: a2sd swapspace shows the amount of swap space (this may not work in all roms). a2sd sysinfo shows a complete profile of your phone.
Click to expand...
Click to collapse
Darktremor Apps2SD Version 2.7.5 Preview Fix 4a
- Removed 00a2sdremove script file. Removal of other apps2sd is done during the flash process.
- Fixed a coding error during the rebuild process where a2sd install and a2sd cachesd was not proceeding when the ext partition was mounted.
Click to expand...
Click to collapse
Darktremor Apps2SD version 2.7.5 Preview Fix 4
- Complete rebuild from Apps2SD 2.7 Update 3r1. This one is built a little different than Preview releases. Changes from Preview Fix 3 are included.
- Help system will now show the entire command list using Busybox More. - a2sd check will now display the ext type on the SD card.
- a2sd defaultheap will return the heap size to the device's default setting (removes all heap flag files)
Click to expand...
Click to collapse
Darktremor Apps2SD version 2.7.5 Preview Fix 3
- Removed reference to mounting /system (except in JIT installation/removal). This is to accommodate NAND protection in the Desire.
Click to expand...
Click to collapse
Darktremor Apps2SD version 2.7.5 Preview Fix 1 and Preview Fix 2
- Fixed JIT installation and removal error.
Click to expand...
Click to collapse
Darktremor Apps2SD version 2.7.5 Preview
- Added Boot Loop Protection...moves app, app-private and/or dalvik-cache back to internal storage if SD card could not be mounted. Sets No Apps2SD flag.
- Added Dalvik JIT. - Added user selectable Dalvik heap sizes (smallheap = 16mb, largeheap = 24mb, jumboheap = 32mb) - Renamed many programs with new .a2sd extentions.
- Corrected bugs from Darktremor A2SD 2.7 Update 3r1.
- Apps, Dalvik Cache and Swap Partition can be activated separately.
- Install and Davik Cache to SD will not work if the SD card can't mount. This prevents a user-inflicted boot loop.
Click to expand...
Click to collapse
Darktremor A2SD Version 2.7 Update 3r1
- Fixes a bug in fixa2sd that causes the dalvik-cache to automatically move to the SD card.
- Created a new program called launcha2sd that now does the launching functions of a2sd. The program a2sd now launches launcha2sd using bash. This fixes any /system/bin/sh issues with open brackets being interpreted at commands rather than conditions in an IF statement.
Click to expand...
Click to collapse
Darktremor A2SD Version 2.7 Update 3
- If a rom has the dalvik-cache on the cache partition, it will not attempt to move it to the internal cache.
- Users now have an option to move the dalvik-cache to the cache partition. The option to move dalvik-cache to the SD card is still retained.
- New commands introduced: cachepart moves dalvik-cache to cache partition, cachesd moves dalvik-cache to sd card (phased replacement to a2sd cache).
- Fixes some minor bugs.
Click to expand...
Click to collapse
Darktremor A2SD Version 2.7 Update 2
- The /system partition returns to read-only state when the program is finished. The /data partition is left untouched.
- ZipAlign does not automatically start on boot. You must type a2sd zipalign to activate the start on boot feature.
- Taken out visual references of CyanogenMod's cm.filesystem.ready and DamageControl's dc.filesystem.ready. It now refers to both visually as "File System Ready property"
- A2SD Check no longer mounts the ext partition. It will indicate when the ext partition is not already mounted. This should help in troubleshooting roms that do not automatically launch A2SD.
Click to expand...
Click to collapse
Darktremor A2SD Version 2.7 Update 1
- Reversed a decision on 2.7 final to set /system and /data to read-only when the program completes. This is causing major issues with some newer roms.
Click to expand...
Click to collapse
Darktremor A2SD Version 2.7
- Completely rebuild the entire program from ground up. Attempted to simplify the process and to better detect different environments.
- All programs use the included busybox.a2sd to avoid conflicts with the different busybox installations.
- Mounts /system and /data in read-write to prevent any conflicts. Remounts them in read-only when completed.
- Except for a2sd, all programs built as bash scripts.
- Separated the original program into the following programs:
a2sd - Simple script that detects whether the init.rc was fixed with the cm.filesystem.ready and sets it accordingly. Starts starta2sd if either a command is included or the cm.filesystem.ready patch is installed, otherwise runs A2SD that does not move dalvik-cache. Runs a smaller version of the boota2sd if the cm.filesystem.ready or dc.filesystem.ready are not present.
starta2sd - Processes all commands...it's the controller program. Adds the following commands: align, zipalign, nozipalign, resetcache, clearcache, fixmarket, diskspace. boota2sd - Used when the cm.filesystem.ready fix or the dc.filesystem.ready fix is present in init.rc. Resets dalvik-cache, app and app-private to internal storage upon the following conditions:
- Mount failure or missing ext partition, and
- Any or all key directories are symlinked to the SD card. This step prevents a bootloop or a stall from occuring during the boot process. Also incorporates better detection of mounted partition. If it detects the partition mounted in /proc/mounts, it will skip trying to mount. Automatically executes fixa2sd if the flags and symlinks to dalvik-cache, app and/or app-private do not match. Also moved the mounting of the swap partition to the end and reintegrated auto partition detection when mounting (similar to A2SD 2.6.1). Added ZipAlign functions.
chka2sd - Incorporates bug fixes that did not detect the dalvik-cache correctly. New report layout (should be simpler to read). Code was simplified. fixa2sd - Incorporates same bug fixes as chka2sd. Does a better detection of flag files and symlinks. Code was simplified.
setupa2sd - Used to execute setup commands from starta2sd (install, remove, cache, nocache, align, fixmarket). Also controls a2sd help.
aligna2sd - zip aligns all apk files in /data/app and /data/app-private.
010a2sdmodaco - Part of the Beta8 Modaco Desire testing, does the following:
- If 02cachedalvikcache exists, back the program up and overwrite the program, preventing the contents from executing.
- if 40a2sd exists, do the same thing.
Click to expand...
Click to collapse
Darktremor A2SD Version 2.6.1
- Mainly a bugfix. Corrects the dalvik-cache code where it would put the dalvik-cache back on the sd card even when the flag file was set.
- Put the flag files back on /system/sd. Fresh 2.0d was incompatible with the new setup (it doesn't mount the /sdcard until later in the boot process).
- Added code for Fresh 2.0d...the boot can be hung if the dalvik-cache is changed during boot. Program automatically determines if 04apps2sd exists in /system/etc/init.d (this is signature for any roms built from Fresh 2.0d) and automatically sets the NoCache flag if the dalvik-cache is in internal memory and the NoCache flag isn't set.
- Fixed swap code. It was not turning on swap when it should.
- (Release 1) - Fixed some minor issues.
- (Release 2) - Recreated a new flash package that is more compatible with different recovery system.
Click to expand...
Click to collapse
Darktremor A2SD Version 2.6
- Moves all flag files from /system/sd to /sdcard. The kernel mounts the FAT32 SD partition and that will be available before Apps2SD runs. Future flag file creation will be in /sdcard.
- Added a check feature (a2sd check). This will check your flag files and symlinks. A report on your screen will tell you what needs to be fixed, if any.
- Added a repair feature (a2sd repair). This will repair your a2sd installation.
- Flashing the A2SD checks Busybox installation and reinstalls it if necessary (it only checks for a missing Busybox installation...it won't replace the one you have installed).
- Automatically remounts /system and /data partitions for read-write access when started with any of the install/repair options (install, repair, cache, nocache, remove).
- Fixed mount command...now uses auto detect rather than the individual partitions. This allows A2SD to work on ext4.
- Separate nocache version available for slower SD cards.
Click to expand...
Click to collapse
Darktremor A2SD Version 2.5
- Added functionality to move dalvik-cache to the ext partition.
- Added option a2sd cache to manually move the dalvik-cache to the ext partition.
- Added option a2sd nocache to manually move the dalvik-cache back to the internal phone storage.
- Added option a2sd install to setup a2sd on a phone (all apps and dalvik-cache on ext partition)
- Added option a2sd remove to revert all a2sd changes back to normal mode (all apps and dalvik-cache in internal storage).
- Added option a2sd noswap to turn off swap partition.
- Added option a2sd swap to turn on swap partition.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Installing Support for Apps2SD in your Rom
How to add Apps2SD support to your Rom
If you are a new rom developer, chances are you are building a rom based on either someone else's work or you are using the stock rom. If you base your rom on someone else's work, chances are the previous developer included support for Apps2SD in the boot image.
However, if you are starting from the stock image, or you have grabbed a rom that doesn't have Apps2SD support, you aren't stuck. Here's a guide that will help you disassemble a boot image, edit the necessary files to activate Apps2SD, and reassemble a boot image.
To begin, you'll need a Linux or a Mac system and basic knowledge on how to navigate through your Linux or Mac via a terminal program. The tools presented in this guide will only work with those systems.
1. Create a directory called workspace. This will be where you work on the ramdisk.
2. Inside workspace, create another directory called scripts. This is where you will place the tools and scripts you will need.
3. Download the following and uncompress the files into the scripts directory: http://www.darktremor.info/files/tools/ramdisk-scripts.zip
4. Open a terminal window, change the directory to the workspace directory, and type chmod 755 *
5. Put the boot.img from the rom you are working on in the workspace directory.
6. In the terminal window, change to the scripts directory and type ./getramdisk
7. Change to the ramdisk directory located in the workspace directory.
8. Open a text editor and load init.rc
9. Look for a line called class_start default.
10. Choose a method:
Direct Apps2SD method
This method allows you to call Apps2SD directly. Additional scripts will have to be added as other services in the init.rc.
Type the following right above the class_start default:
start a2sd
on property:cm.filesystem.ready=1
The lines should look like this:
Code:
start a2sd
on property:cm.filesystem.ready=1
class_start default
Next , go to the end of the file and type the following:
Code:
service a2sd /system/bin/logwrapper /system/bin/sh /system/bin/a2sd
disabled
oneshot
Click to expand...
Click to collapse
Busybox Run-Parts Method
This method allows you to call Apps2SD (and other scripts) simply by placing it in a directory.
Type the following right above the class_start default:
start sysinit
on property:cm.filesystem.ready=1
The lines should look like this:
Code:
start sysinit
on property:cm.filesystem.ready=1
class_start default
Next , go to the end of the file and type the following:
Code:
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
disabled
oneshot
Click to expand...
Click to collapse
Modified CyanogenMod method
This method allows you to call Apps2SD (and other scripts) by running a script called sysinit
Type the following right above the class_start default:
exec /system/bin/sysinit
on property:cm.filesystem.ready=1
The lines should look like this:
Code:
exec /system/bin/sysinit
on property:cm.filesystem.ready=1
class_start default
Click to expand...
Click to collapse
11. Save the init.rc
12. Change to the scripts directory and type ./makeramdisk
13. Now it's time to create the boot image. In the scripts directory, you need to run the command makeboot, but you are going to need to enter some information on the command line:
a. You need the filename of the kernel code. This was created for you when you ran the getramdisk command. The file is called boot.img-kernel and it is located in the workspace directory.
b. You need the filename of the new ramdisk file you created. This was created for you when you ran the makeramdisk command. The file is called newramdisk.gz and it is located in the workspace directory.
c. You need to know what you are going to name your new boot image. You need to name it something other than boot.img (we'll fix that part later in the guide). Try newboot.img and save it to the workspace directory
d. You will need to know your kernel base address. Now I don't have all of the base addresses for all the phones, but I do have the four I normally work with when developers need me to check their boot image. This part is very important, as using the wrong base address will cause your phone not to boot (and you'll have to restore back from a recovery image). Use the following values for the base address and the kernel start commands:
Hero CDMA (heroc), Hero GSM (hero)
Base Address: 0x19200000
Command Line: "no_console_suspend=1 console=null"
Click to expand...
Click to collapse
Desire (bravo), Nexus One (passion)
Base Address: 0x20000000
Command Line: "no_console_suspend=1 msmsdcc_sdioirq=1 wire.search_count=5"
Click to expand...
Click to collapse
Evo 4G (supersonic), Incredible (inc)
Base Address: 0x20000000
Command Line: "no_console_suspend=1"
Click to expand...
Click to collapse
Wildfire (buzz)
Base Address: 0x02e00000
Command Line: "no_console_suspend=1 console=null"
Click to expand...
Click to collapse
Aria (liberty), Legend (legend), MyTouch3G Slide (expresso)
Base Address: 0x12c00000
Command Line: "no_console_suspend=1 console=null"
Click to expand...
Click to collapse
Geeksphone One
Base Address: 0x1a000000
Command Line: "[email protected] [email protected] [email protected] [email protected] [email protected] [email protected] androidboot.hardware=qcom"
Click to expand...
Click to collapse
T-Mobile G1 (dream), MyTouch3G (sapphire), Magic (sapphire)
Base Address; 0x10000000
Command Line: "no_console_suspend=1 console=null"
Click to expand...
Click to collapse
If you have the base address for a phone not listed, please let me know and I'll include them in this guide.
Click to expand...
Click to collapse
From the scripts directory, type:
./mkbootimg --kernel <Path and filename to boot.img-kernel> --ramdisk <Path and filename to newramdisk.gz> --cmdline "<Command Line from above>" -o <Path and filename of new boot image> --base <Base Address from above>
Example: ./mkbootimg --kernel ../boot.img-kernel --ramdisk ../newramdisk.gz --cmdline "no_console_suspend=1 console=null" -o ../newboot.img --base 0x19200000
14. Move the newboot.img file into the directory that you are using to build your rom and rename it to boot.img (you will have to delete the old boot.img first).
Now, if all works well, you will have a boot image that actually boots and has Apps2SD support built in.
To use Apps2SD with the Apps2SD direct method, simply put a file with the Apps2SD code in /system/bin and name it a2sd
To use Apps2SD with the Busybox Run Parts method or the CyanogenMod Froyo method, simply put a file with the Apps2SD code in /system/etc/init.d and name it anything...just make sure it starts with a two-digit number (not sure if that's an actual requirement, but all the busybox run parts roms use it). Example of this is 04apps2sd.
Darktremor Apps2SD Commands
Since this guide was posted, I'm getting questions ask on how to use Darktremor Apps2SD.
Darktremor Apps2SD is a command line interface (CLI) program (a GUI is planned, but has not been built).
You will need either a terminal program from the Android Marketplace, or you will need ADB from the Android Software Development Kit (SDK).
If you are using a terminal program, simply start up the program. Type su to allow the terminal program to gain superuser access (if you are using Superuser.apk to manage your superuser permission, this will automatically trigger a popup on the very first run. Press Accept to allow the terminal program superuser access).
If you are using ADB, simply navigate to the directory you stored the Android SDK in. Then navigate to the Tools directory under the SDK folder. Type adb shell in a command line on your computer (ADB can be found in the SDK under the Tools folder).
Both of these methods should bring you to a prompt that displays a pound sign (#).
Once you have the superuser prompt, simply type /system/bin/a2sd followed by the command you wish to use (i.e. /system/bin/a2sd check)
The list of commands are below.
Syntax
Syntax: /system/bin/a2sd command
command is one of the following:
Standard Apps2SD Commands:
--------------------------------------------------
reinstall
Moves free and paid apps to the ext2/ext3/ext4 partition on your secure digital card. Removes the No A2SD flag file.
This is used if you have already executed an a2sd remove command. Otherwise, this part is automatically performed when Apps2SD is started.
File removed: /data/.noa2sd
remove
Moves free and paid apps to the internal phone storage. Creates the No A2SD flag file.
File created: /data/.noa2sd
Click to expand...
Click to collapse
Swap Partition Commands:
--------------------------------------------------
reswap
Removes the No Swap flag. Allows A2SD to activate the swap partition.
This is used if you have already executed an a2sd noswap command. Otherwise, this part is automatically performed when Apps2SD is started. Note: This command has no effect on roms where the swap space is not built into the kernel.
File removed: /data/.noswap
noswap
Creates the No Swap flag. Prevents A2SD from activating the swap partition. Note: This command has no effect on roms where the swap space is not built into the kernel.
File created: /data/.noswap
swappyxx
Sets the swappiness setting for the swap file. xx sets the swappiness percentage used. (i.e. to set swappiness to 30%, type a2sd swappy30.
Click to expand...
Click to collapse
Dalvik Cache Commands:
--------------------------------------------------
cachesd
Moves Dalvik cache files to the ext2/ext3/ext4 partition on your secure digital card. Creates Dalvik Cache to SD flag.
Caution: If your phone fails to mount the ext2/ext3/ext4 partition and your dalvik-cache is pointed to the SD card, you will likely end up in a boot loop. Execute a2sd nocache from adb shell to rectify the issue.
Click to expand...
Click to collapse
File created: /data/.dalvikcacahe
File removed: /data/.dcpartition
cachesdreset
Same as cachesd above, but erases the contents of the dalvik-cache after move. This performs both the a2sd cachesd and a2sd resetcache all in one command.
File removed: /data/.dcpartition
cachepart
Moves Dalvik cache files to the /cache partition in your phone. Creates Dalvik Cache to Cache Partition flag.
Caution: Some phones do not have enough space to put the dalvik-cache on the cache partition. Also, some roms that have SenseUI installed may not work well with the dalvik-cache on the cache partition (although this issue appears to be fixed starting with Darktremor 2.7.5.1). If you experience issues such as force closes, try moving the dalvik-cache to the SD card (a2sd cachesd) or internal storage (a2sd nocache) instead.
Click to expand...
Click to collapse
File created: /data/.dcpartition
File removed: /data/.dalvikcache
cachepartreset
Same as cachepart above, but erases the contents of the dalvik-cache after move. This performs both the a2sd cachepart and a2sd resetcache all in one command.
File removed: /data/.dalvikcache
nocache
Moves Dalvik cache files to the internal phone storage. Removes all Dalvik Cache flags.
File removed: /data/.dcpartition, /data/.dalvikcache
nocachereset
Same as nocache above, but erases the contents of the dalvik-cache after move. This performs both the a2sd nocache and a2sd resetcache all in one command.
File removed: /data/.dcpartition. /data/.dalvikcache
resetcache
Clears the dalvik cache and restarts phone.
Click to expand...
Click to collapse
Apps2SD Diagnostic Commands:
--------------------------------------------------
check
Performs a symlink and flag file check on your setup. Outputs a report that shows you if
there are issues with your Apps2SD setup.
repair
Performs a repair of all symlinks based on flag file activation.
diskspace
Shows disk space statistics for the ext partition.
sysinfo
Displays information about your phone, partitions, swap, and more.
Also writes a dump file that has an entire profile of your phone. This is for troubleshooting only.
File Created: /data/dtsysdump.txt
swapspace
Shows swap space statistics for all swap space active on the phone. Note: This command has no effect on roms where the swap space is not built into the kernel.
Click to expand...
Click to collapse
ZipAlign Commands:
--------------------------------------------------
align
Performs a one-time zipalign on all APK files in /data/app and /data/app-private.
zipalign
Allows ZipAlign to execute during the boot process. Creates the ZipAlign flag file.
File Created: /data/.zipalign
nozipalign
Prevents ZipAlign from executing during the boot process. Removes the ZipAlign flag file.
File Removed: /data/.zipalign
Click to expand...
Click to collapse
Dalvik Setting Commands:
--------------------------------------------------
jit
Installs DalvikVM JIT.
WARNING: Do not run this command if your phone has NAND protection active.
Click to expand...
Click to collapse
nojit
Removes DalvikVM JIT.
WARNING: Do not run this command if your phone has NAND protection active.
Click to expand...
Click to collapse
defaultheap
Resets the Dalvik heap size to the default heap size.
File Removed: /data/.smallheap, /data/.largeheap, /data/.jumboheap
heapsizexx
Sets the dalvik heap size to xx. For example, to set the dalvik cache to 24mb, type a2sd heapsize24. To reset back to default, type a2sd heapsize0 (that's a zero, not the letter "o")
Click to expand...
Click to collapse
Low Memory Killer Commands:
----------------------------------------------------
lowmem-moderate
Sets the internal memory killer to the following settings:
Code:
Foreground Apps: 1536 pages / 6 MB
Visible Apps: 3072 pages / 12 MB
Secondary Server: 4096 pages / 16 MB
Hidden Apps: 7680 pages / 30 MB
Content Provider: 8960 pages / 35 MB
Empty App: 10240 pages / 40 MB
Create File: /data/.lmmoderate
Remove File: /data/.lmoptimum, /data/.lmstrict, /data/.lmaggressive, /data/.lmultimate, /data/.lmextreme
lowmem-optimum
Sets the internal memory killer to the following settings:
Code:
Foreground Apps: 1536 pages / 6 MB
Visible Apps: 2048 pages / 8 MB
Secondary Server: 4096 pages / 16 MB
Hidden Apps: 10240 pages / 40 MB
Content Provider: 12800 pages / 50 MB
Empty App: 15360 pages / 60 MB
Create File: /data/.lmoptimum
Remove File: /data/.lmmoderate, /data/.lmstrict, /data/.lmaggressive, /data/.lmultimate, /data/.lmextreme
lowmem-strict
Sets the internal memory killer to the following settings:
Code:
Foreground Apps: 1536 pages / 6 MB
Visible Apps: 2048 pages / 8 MB
Secondary Server: 4096 pages / 16 MB
Hidden Apps: 15360 pages / 60 MB
Content Provider: 17920 pages / 70 MB
Empty App: 20480 pages / 80 MB
Create File: /data/.lmstrict
Remove File: /data/.lmmoderate, /data/.lmoptimum, /data/.lmaggressive, /data/.lmultimate, /data/.lmextreme
lowmem-aggressive
Sets the internal memory killer to the following settings:
Code:
Foreground Apps: 1536 pages / 6 MB
Visible Apps: 3072 pages / 12 MB
Secondary Server: 4096 pages / 16 MB
Hidden Apps: 21000 pages / 82 MB
Content Provider: 23000 pages / 90 MB
Empty App: 25000 pages / 98 MB
Create File: /data/.lmaggressive
Remove File: /data/.lmmoderate, /data/.lmoptimum, /data/.lmstrict, /data/.lmextreme, /data/.lmultimate
lowmem-extreme
Sets the internal memory killer to the following settings:
Code:
Foreground Apps: 1536 pages / 6 MB
Visible Apps: 3072 pages / 12 MB
Secondary Server: 4096 pages / 16 MB
Hidden Apps: 38400 pages / 150 MB
Content Provider: 40960 pages / 160 MB
Empty App: 43520 pages / 170 MB
Create File: /data/.lmextreme
Remove File: /data/.lmmoderate, /data/.lmoptimum, /data/.lmstrict, /data/.lmaggressive, /data/.lmultimate
lowmem-ultimate
Sets the internal memory killer to the following settings:
Code:
Foreground Apps: 1536 pages / 6 MB
Visible Apps: 3072 pages / 12 MB
Secondary Server: 4096 pages / 16 MB
Hidden Apps: 51200 pages / 200 MB
Content Provider: 57600 pages / 225 MB
Empty App: 64000 pages / 250 MB
Create File: /data/.lmultimate
Remove File: /data/.lmmoderate, /data/.lmoptimum, /data/.lmstrict, /data/.lmaggressive, /data/.lmextreme
lowmem-default
Sets the internal memory killer back to phone default settings.
Remove File: /data/.lmmoderate, /data/.lmoptimum, /data/.lmstrict, /data/.lmaggressive, /data/.lmextreme, /data/.lmultimate
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Wow
Great release. ZipAlign on demand does make programs load noticeably faster. No problems with the market either. Trying different heap sizes for performance.
I like the help command too. Great work thanks!
Running a GSM Hero using a stock 2.1 repack ROM.
I've not used A2SD before, but giving it a shot now. I had no problems setting it up, the instructions are very clear and concise, but I am having problems using it.
I setup a 750MB ext3 partition, and I was expecting AppMonster to report I had loads of freespace. It was reporting my freespace as pretty much what it was before. (100MB free)
I tried /system/bin/a2sd install and it appears I have lots of duplicated files from the rather verbose output.
What have I done wrong?
Thanks.
Code:
# /system/bin/a2sd install
/system/bin/a2sd install
[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 preview
[ ] Mounting /system as read-write
[ ] Starting Apps2SD in install mode
[ ] Checking SD Card.
[ ] Searching for Mount Point...
[!] Mount point found..no further action required.
[ ] Checking for ext partition
[*] Ext partition found and already mounted.
[ ] Moving apps to SD card.
cp: '/data/app/YouTube.apk' and '/system/sd/app/YouTube.apk' are the same file
cp: '/data/app/br.com.fast4ward.sdcardspeedtester.zip' and '/system/sd/app/br.co
m.fast4ward.sdcardspeedtester.zip' are the same file
cp: '/data/app/btm.game.ui.apk' and '/system/sd/app/btm.game.ui.apk' are the sam
e file
cp: '/data/app/com.adobe.reader.apk' and '/system/sd/app/com.adobe.reader.apk' a
re the same file
cp: '/data/app/com.agilesoftresource.apk' and '/system/sd/app/com.agilesoftresou
rce.apk' are the same file
cp: '/data/app/com.alfray.timeriffic.apk' and '/system/sd/app/com.alfray.timerif
fic.apk' are the same file
cp: '/data/app/com.bigtincan.android.adfree.apk' and '/system/sd/app/com.bigtinc
an.android.adfree.apk' are the same file
cp: '/data/app/com.bonfiremedia.android_ebay.apk' and '/system/sd/app/com.bonfir
emedia.android_ebay.apk' are the same file
cp: '/data/app/com.dozingcatsoftware.WireGoggles.apk' and '/system/sd/app/com.do
zingcatsoftware.WireGoggles.apk' are the same file
cp: '/data/app/com.facebook.katana.apk' and '/system/sd/app/com.facebook.katana.
apk' are the same file
cp: '/data/app/com.google.android.apps.maps.apk' and '/system/sd/app/com.google.
android.apps.maps.apk' are the same file
cp: '/data/app/com.google.android.apps.shopper.apk' and '/system/sd/app/com.goog
le.android.apps.shopper.apk' are the same file
cp: '/data/app/com.google.android.apps.translate.apk' and '/system/sd/app/com.go
ogle.android.apps.translate.apk' are the same file
cp: '/data/app/com.google.android.apps.unveil.apk' and '/system/sd/app/com.googl
e.android.apps.unveil.apk' are the same file
cp: '/data/app/com.google.android.maps.mytracks.apk' and '/system/sd/app/com.goo
gle.android.maps.mytracks.apk' are the same file
cp: '/data/app/com.google.android.stardroid.apk' and '/system/sd/app/com.google.
android.stardroid.apk' are the same file
cp: '/data/app/com.google.zxing.client.android.apk' and '/system/sd/app/com.goog
le.zxing.client.android.apk' are the same file
cp: '/data/app/com.handcent.nextsms.apk' and '/system/sd/app/com.handcent.nextsm
s.apk' are the same file
cp: '/data/app/com.luke.uktvguide.apk' and '/system/sd/app/com.luke.uktvguide.ap
k' are the same file
cp: '/data/app/com.magicwach.rdefense_free.apk' and '/system/sd/app/com.magicwac
h.rdefense_free.apk' are the same file
cp: '/data/app/com.maplekeycompany.apps.shake.apk' and '/system/sd/app/com.maple
keycompany.apps.shake.apk' are the same file
cp: '/data/app/com.mathpad.mobile.android.wt.unit.apk' and '/system/sd/app/com.m
athpad.mobile.android.wt.unit.apk' are the same file
cp: '/data/app/com.mattwach.trap2.apk' and '/system/sd/app/com.mattwach.trap2.ap
k' are the same file
cp: '/data/app/com.mgillespie.AutosportsFREE.apk' and '/system/sd/app/com.mgille
spie.AutosportsFREE.apk' are the same file
cp: '/data/app/com.mgillespie.GamingNews.apk' and '/system/sd/app/com.mgillespie
.GamingNews.apk' are the same file
cp: '/data/app/com.mixzing.basic.apk' and '/system/sd/app/com.mixzing.basic.apk'
are the same file
cp: '/data/app/com.neoline.music.apk' and '/system/sd/app/com.neoline.music.apk'
are the same file
cp: '/data/app/com.newsrob.apk' and '/system/sd/app/com.newsrob.apk' are the sam
e file
cp: '/data/app/com.opera.mini.android.apk' and '/system/sd/app/com.opera.mini.an
droid.apk' are the same file
cp: '/data/app/com.pgmsoft.wifinder.apk' and '/system/sd/app/com.pgmsoft.wifinde
r.apk' are the same file
cp: '/data/app/com.rechild.advancedtaskkiller.apk' and '/system/sd/app/com.rechi
ld.advancedtaskkiller.apk' are the same file
cp: '/data/app/com.rerware.android.MyBackupPro.apk' and '/system/sd/app/com.rerw
are.android.MyBackupPro.apk' are the same file
cp: '/data/app/com.shazam.android.apk' and '/system/sd/app/com.shazam.android.ap
k' are the same file
cp: '/data/app/com.socialnmobile.dictapps.notepad.color.note.apk' and '/system/s
d/app/com.socialnmobile.dictapps.notepad.color.note.apk' are the same file
cp: '/data/app/com.xe.android.apk' and '/system/sd/app/com.xe.android.apk' are t
he same file
cp: '/data/app/de.android_telefonie.appmanager.apk' and '/system/sd/app/de.andro
id_telefonie.appmanager.apk' are the same file
cp: '/data/app/de.czesla.android.remote.apk' and '/system/sd/app/de.czesla.andro
id.remote.apk' are the same file
cp: '/data/app/net.flixster.android.apk' and '/system/sd/app/net.flixster.androi
d.apk' are the same file
cp: '/data/app/org.transdroid.apk' and '/system/sd/app/org.transdroid.apk' are t
he same file
cp: '/data/app/uk.co.johnsto.android.beebplayer.apk' and '/system/sd/app/uk.co.j
ohnsto.android.beebplayer.apk' are the same file
[ ] Linking /data/app to /system/sd/app.
[ ] Moving private apps to SD card.
cp: '/data/app-private/br.com.fast4ward.sdcardspeedtester.apk' and '/system/sd/a
pp-private/br.com.fast4ward.sdcardspeedtester.apk' are the same file
[ ] Linking /data/app-private to /system/sd/app-private.
[ ] Removing No A2SD flag file.
rm: cannot remove '/data/.noa2sd': No such file or directory
[ ] Setting File System Ready property to 1.
[ ] Remounting /system to read-only.
#
Can someone also explain how A2SD works in a simplified form? It may help in understanding things.
Thanks.
Your android phone is designed to store applications in the phone's internal storage under the directory /data/app and /data/app-private.
Apps2SD allows the applications to be stored on the SD card by telling Android to store the applications somewhere else.
It does this by creating directories on your SD card, then replaces /data/app and /data/app-private with a symbolic link file. A symbolic link file is a file that is a reference to another file or directory. This is similar to how shortcuts work in Windows.
For example, without Apps2SD installed, if you used a file manager on your phone and tapped the /data/app folder, you would see a bunch of files. Now, if you look at where you are at in the directory chain, you would be at /data/app, since that is a directory.
When Apps2SD is active, if you tap on the /data/app folder, you would still see files, but you will noticed that you are in a completely different directory (/system/sd/app). This is because /data/app is a file that points to /system/sd/app. When Android stores your program in /data/app, it thinks it is still storing it in /data/app (Internal storage). But, because of redirection, it is really storing the program in /system/sd/app.
When you type a2sd install, one of the processes it performs is moving all the data from /data/app to /system/sd/app. In your case, it looks like you tried to perform an install of Apps2SD after it was already installed. In other words, the files were trying to copy to themselves, which can't happen.
The a2sd install command is usually not necessary, as the program will automatically set itself up upon boot. The only time you really need to use a2sd install is if you used an a2sd remove command in the past or the Boot Loop Prevention code activated (your SD card failed to mount). Both scenarios activate the No Apps2SD flag file, which a2sd install removes.
To check your diskspace on your ext partition, you can use a2sd diskspace.
mgillespie said:
Running a GSM Hero using a stock 2.1 repack ROM.
I've not used A2SD before, but giving it a shot now. I had no problems setting it up, the instructions are very clear and concise, but I am having problems using it.
I setup a 750MB ext3 partition, and I was expecting AppMonster to report I had loads of freespace. It was reporting my freespace as pretty much what it was before. (100MB free)
I tried /system/bin/a2sd install and it appears I have lots of duplicated files from the rather verbose output.
What have I done wrong?
Thanks.
Code:
# /system/bin/a2sd install
/system/bin/a2sd install
[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 preview
[ ] Mounting /system as read-write
[ ] Starting Apps2SD in install mode
[ ] Checking SD Card.
[ ] Searching for Mount Point...
[!] Mount point found..no further action required.
[ ] Checking for ext partition
[*] Ext partition found and already mounted.
[ ] Moving apps to SD card.
cp: '/data/app/YouTube.apk' and '/system/sd/app/YouTube.apk' are the same file
cp: '/data/app/br.com.fast4ward.sdcardspeedtester.zip' and '/system/sd/app/br.co
m.fast4ward.sdcardspeedtester.zip' are the same file
cp: '/data/app/btm.game.ui.apk' and '/system/sd/app/btm.game.ui.apk' are the sam
e file
cp: '/data/app/com.adobe.reader.apk' and '/system/sd/app/com.adobe.reader.apk' a
re the same file
cp: '/data/app/com.agilesoftresource.apk' and '/system/sd/app/com.agilesoftresou
rce.apk' are the same file
cp: '/data/app/com.alfray.timeriffic.apk' and '/system/sd/app/com.alfray.timerif
fic.apk' are the same file
cp: '/data/app/com.bigtincan.android.adfree.apk' and '/system/sd/app/com.bigtinc
an.android.adfree.apk' are the same file
cp: '/data/app/com.bonfiremedia.android_ebay.apk' and '/system/sd/app/com.bonfir
emedia.android_ebay.apk' are the same file
cp: '/data/app/com.dozingcatsoftware.WireGoggles.apk' and '/system/sd/app/com.do
zingcatsoftware.WireGoggles.apk' are the same file
cp: '/data/app/com.facebook.katana.apk' and '/system/sd/app/com.facebook.katana.
apk' are the same file
cp: '/data/app/com.google.android.apps.maps.apk' and '/system/sd/app/com.google.
android.apps.maps.apk' are the same file
cp: '/data/app/com.google.android.apps.shopper.apk' and '/system/sd/app/com.goog
le.android.apps.shopper.apk' are the same file
cp: '/data/app/com.google.android.apps.translate.apk' and '/system/sd/app/com.go
ogle.android.apps.translate.apk' are the same file
cp: '/data/app/com.google.android.apps.unveil.apk' and '/system/sd/app/com.googl
e.android.apps.unveil.apk' are the same file
cp: '/data/app/com.google.android.maps.mytracks.apk' and '/system/sd/app/com.goo
gle.android.maps.mytracks.apk' are the same file
cp: '/data/app/com.google.android.stardroid.apk' and '/system/sd/app/com.google.
android.stardroid.apk' are the same file
cp: '/data/app/com.google.zxing.client.android.apk' and '/system/sd/app/com.goog
le.zxing.client.android.apk' are the same file
cp: '/data/app/com.handcent.nextsms.apk' and '/system/sd/app/com.handcent.nextsm
s.apk' are the same file
cp: '/data/app/com.luke.uktvguide.apk' and '/system/sd/app/com.luke.uktvguide.ap
k' are the same file
cp: '/data/app/com.magicwach.rdefense_free.apk' and '/system/sd/app/com.magicwac
h.rdefense_free.apk' are the same file
cp: '/data/app/com.maplekeycompany.apps.shake.apk' and '/system/sd/app/com.maple
keycompany.apps.shake.apk' are the same file
cp: '/data/app/com.mathpad.mobile.android.wt.unit.apk' and '/system/sd/app/com.m
athpad.mobile.android.wt.unit.apk' are the same file
cp: '/data/app/com.mattwach.trap2.apk' and '/system/sd/app/com.mattwach.trap2.ap
k' are the same file
cp: '/data/app/com.mgillespie.AutosportsFREE.apk' and '/system/sd/app/com.mgille
spie.AutosportsFREE.apk' are the same file
cp: '/data/app/com.mgillespie.GamingNews.apk' and '/system/sd/app/com.mgillespie
.GamingNews.apk' are the same file
cp: '/data/app/com.mixzing.basic.apk' and '/system/sd/app/com.mixzing.basic.apk'
are the same file
cp: '/data/app/com.neoline.music.apk' and '/system/sd/app/com.neoline.music.apk'
are the same file
cp: '/data/app/com.newsrob.apk' and '/system/sd/app/com.newsrob.apk' are the sam
e file
cp: '/data/app/com.opera.mini.android.apk' and '/system/sd/app/com.opera.mini.an
droid.apk' are the same file
cp: '/data/app/com.pgmsoft.wifinder.apk' and '/system/sd/app/com.pgmsoft.wifinde
r.apk' are the same file
cp: '/data/app/com.rechild.advancedtaskkiller.apk' and '/system/sd/app/com.rechi
ld.advancedtaskkiller.apk' are the same file
cp: '/data/app/com.rerware.android.MyBackupPro.apk' and '/system/sd/app/com.rerw
are.android.MyBackupPro.apk' are the same file
cp: '/data/app/com.shazam.android.apk' and '/system/sd/app/com.shazam.android.ap
k' are the same file
cp: '/data/app/com.socialnmobile.dictapps.notepad.color.note.apk' and '/system/s
d/app/com.socialnmobile.dictapps.notepad.color.note.apk' are the same file
cp: '/data/app/com.xe.android.apk' and '/system/sd/app/com.xe.android.apk' are t
he same file
cp: '/data/app/de.android_telefonie.appmanager.apk' and '/system/sd/app/de.andro
id_telefonie.appmanager.apk' are the same file
cp: '/data/app/de.czesla.android.remote.apk' and '/system/sd/app/de.czesla.andro
id.remote.apk' are the same file
cp: '/data/app/net.flixster.android.apk' and '/system/sd/app/net.flixster.androi
d.apk' are the same file
cp: '/data/app/org.transdroid.apk' and '/system/sd/app/org.transdroid.apk' are t
he same file
cp: '/data/app/uk.co.johnsto.android.beebplayer.apk' and '/system/sd/app/uk.co.j
ohnsto.android.beebplayer.apk' are the same file
[ ] Linking /data/app to /system/sd/app.
[ ] Moving private apps to SD card.
cp: '/data/app-private/br.com.fast4ward.sdcardspeedtester.apk' and '/system/sd/a
pp-private/br.com.fast4ward.sdcardspeedtester.apk' are the same file
[ ] Linking /data/app-private to /system/sd/app-private.
[ ] Removing No A2SD flag file.
rm: cannot remove '/data/.noa2sd': No such file or directory
[ ] Setting File System Ready property to 1.
[ ] Remounting /system to read-only.
#
Can someone also explain how A2SD works in a simplified form? It may help in understanding things.
Thanks.
Click to expand...
Click to collapse
Many thanks for that. That helps understand what is happening.
Is it normal that regular (a2sd unaware) apps like AppMonster will not be able to correctly report free internal phone diskspace? As clearly the report of 100MB free is totally bogus.
If this is normal, and I can use the a2sd diskspace command instead, that fine too, perhaps I worry too much, or ask too many questions!!!
Well when I get home I'll run it through it paces on my Rom and post my findings.
tkirton said:
You can still visit the old thread: http://forum.xda-developers.com/showthread.php?t=670087
At this moment, I need software testers to do some routine tests. Feedback is appreciated.
Click to expand...
Click to collapse
Sent from my HERO200 using XDA App
many thanks for this update, so how exactly do we enable (check if already enabled) JIT?
Got it up and running on blue echo and it runs beautifully. I've got 131mb free on my phone and the rom is flashing and running smooth as silk. Thanks for the update.
Only suggestion that I could make is maybe having an app like dcConfig but for ur a2sd that way u can change setting very easily. But other than that I love it and will always run ur stuff on my roms
The 100MB free is internal storage space (the /data partition). Remember that your applications are being stored on the Secure Digital card and not the data partition, so 100MB sounds right for the internal storage if you didn't move dalvik-cache.
a2sd diskspace reports the free space on your ext partition, so it will show a large difference (you configured more space on your ext partition).
mgillespie said:
Many thanks for that. That helps understand what is happening.
Is it normal that regular (a2sd unaware) apps like AppMonster will not be able to correctly report free internal phone diskspace? As clearly the report of 100MB free is totally bogus.
If this is normal, and I can use the a2sd diskspace command instead, that fine too, perhaps I worry too much, or ask too many questions!!!
Click to expand...
Click to collapse
The one with the GUI configuration is slated for 2.8. I just have to learn Java to program it (or convince friends of mine to help).
Believe me, I really want the GUI configuration in there. I think it would resolve many of the configuration questions I continue to receive.
Papa Smurf151 said:
Got it up and running on blue echo and it runs beautifully. I've got 131mb free on my phone and the rom is flashing and running smooth as silk. Thanks for the update.
Only suggestion that I could make is maybe having an app like dcConfig but for ur a2sd that way u can change setting very easily. But other than that I love it and will always run ur stuff on my roms
Click to expand...
Click to collapse
I completely agree. I wish I knew how to build an app from scratch cause I'd Def do it for u. U have helped so many here and r great at what u do. This thing deserves the GUI
im getting an error when trying to enable/disable jit
Code:
# apps2sd jit
apps2sd jit
[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 preview
[ ] Mounting /system as read-write
[ ] Starting Apps2SD in jit mode
[ ] Running A2SD JIT Install Program.
[ ] Running JIT Setup.
/system/bin/jit.a2sd: line 7: Case: command not found
/system/bin/jit.a2sd: line 8: syntax error near unexpected token `)'
/system/bin/jit.a2sd: line 8: ` "install")'
[ ] Setting File System Ready property to 1.
[ ] Remounting /system to read-only.
# apps2sd nojit
apps2sd nojit
[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 preview
[ ] Mounting /system as read-write
[ ] Starting Apps2SD in nojit mode
[ ] Running A2SD JIT Removal Program.
[ ] Running JIT Setup.
/system/bin/jit.a2sd: line 7: Case: command not found
/system/bin/jit.a2sd: line 8: syntax error near unexpected token `)'
/system/bin/jit.a2sd: line 8: ` "install")'
[ ] Setting File System Ready property to 1.
[ ] Remounting /system to read-only.
#
Just an update, So far it is smooth as silk, havent had any issues on my rom as of yet. Thanks tkirton
I can't test JIT since the rom I'm using already has it. But thanks for the feedback...I'll fix that right away.
urushiol said:
im getting an error when trying to enable/disable jit
Code:
# apps2sd jit
apps2sd jit
[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 preview
[ ] Mounting /system as read-write
[ ] Starting Apps2SD in jit mode
[ ] Running A2SD JIT Install Program.
[ ] Running JIT Setup.
/system/bin/jit.a2sd: line 7: Case: command not found
/system/bin/jit.a2sd: line 8: syntax error near unexpected token `)'
/system/bin/jit.a2sd: line 8: ` "install")'
[ ] Setting File System Ready property to 1.
[ ] Remounting /system to read-only.
# apps2sd nojit
apps2sd nojit
[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 preview
[ ] Mounting /system as read-write
[ ] Starting Apps2SD in nojit mode
[ ] Running A2SD JIT Removal Program.
[ ] Running JIT Setup.
/system/bin/jit.a2sd: line 7: Case: command not found
/system/bin/jit.a2sd: line 8: syntax error near unexpected token `)'
/system/bin/jit.a2sd: line 8: ` "install")'
[ ] Setting File System Ready property to 1.
[ ] Remounting /system to read-only.
#
Click to expand...
Click to collapse
The link for fix 1 (2?) isn't working.
It is now...I uploaded the archive file instead of the signed file.
mtnchkn said:
The link for fix 1 (2?) isn't working.
Click to expand...
Click to collapse

[MOD](UPDATED) For those with battery issues

please dont forget to thank
loSconosciuto
ilcorsaronero
PureMotive
credits to loSconosciuto for modifying this mod to our galaxy sl and most especially to ilcorsaronero for the modification and for making the universal cwm flashable zip for our device
ilcorsaronero said:
Since noone was updating it, I provide a working flashable zip basing on this mod. There were more than one problem in the zip, but now I fixed them. Please report:
* if you notice a battery performance improvement
* how much is this improvement
* which MOD are you on
* which KERNEL are you on. This mod works only on init.d featured mod/kernels.
thanks.
Flash this through CWM recovery!
Click to expand...
Click to collapse
link to cwm flashable zip file
http://forum.xda-developers.com/showpost.php?p=25536103&postcount=27
original thread of this mod
credits to PureMotive
PureMotive said:
Okay guys, I just thought I'd give you my mod for achieving good-great battery life. This is the mod I use in Anthem™ which has given me 50+ hours on a single charge. Feel free to include it in your own ROM or whatever. Giving credit would be nice
First: Here is a flashable .zip of the mod that may or may not work with your ROM. I'd still advise doing it manually.
Sysctl.conf​
Step 1
Open up your ROM.zip (or whatever it's called) in 7zip (Windows) or Betterzip (OSX) and locate
sysctl.conf in /system/etc
If it's not in this directory, create it.
Step 2
In your sysctl.conf file, paste the following code and save it.
Code:
#sysctl.conf file
fs.nr_open=1053696;
fs.inotify.max_queued_events=32000;
fs.inotify.max_user_instances=256;
fs.inotify.max_user_watches=10240;
fs.lease-break-time=10;
fs.file-max=165164;
kernel.threads-max=525810;
kernel.random.write_wakeup_threshold=256;
kernel.random.read_wakeup_threshold=128;
kernel.panic=5;
kernel.sched_compat_yield=1;
kernel.panic=0;
kernel.panic_on_oops=1;
kernel.msgmni=2048;
kernel.msgmax=64000;
kernel.shmmni=4096;
kernel.shmall=2097152;
kernel.shmmax=268435456;
kernel.sem='500 512000 64 2048';
kernel.sched_features=24189;
kernel.hung_task_timeout_secs=30;
kernel.sched_latency_ns=18000000;
kernel.sched_min_granularity_ns=1500000;
kernel.sched_wakeup_granularity_ns=3000000;
kernel.sched_shares_ratelimit=256000;
kernel.sched_child_runs_first=0;
fs.lease-break-time=10;
fs.file-max=65536;
net.core.wmem_max=524288;
net.core.rmem_max=524288;
net.core.rmem_default=262144;
net.core.wmem_default=262144;
net.core.optmem_max=20480;
net.unix.max_dgram_qlen=50;
net.ipv4.tcp_keepalive_time=900;
net.ipv4.tcp_keepalive_probes=5;
net.ipv4.tcp_keepalive_intvl=156;
net.ipv4.tcp_timestamps=0;
net.ipv4.tcp_sack=1;
net.ipv4.tcp_fack=1;
net.ipv4.tcp_window_scaling=1;
net.ipv4.tcp_tw_recycle=1;
net.ipv4.tcp_tw_reuse=1;
net.ipv4.tcp_congestion_control=cubic;
net.ipv4.tcp_syncookies=1;
net.ipv4.conf.all.rp_filter=1;
net.ipv4.conf.default.rp_filter=1;
net.ipv4.tcp_synack_retries=2;
net.ipv4.tcp_syn_retries=2;
net.ipv4.tcp_max_syn_backlog=1024;
net.ipv4.tcp_max_tw_buckets=16384;
net.ipv4.icmp_echo_ignore_all=1;
net.ipv4.icmp_ignore_bogus_error_responses=1;
net.ipv4.tcp_no_metrics_save=1;
net.ipv4.tcp_fin_timeout=15;
net.ipv4.tcp_keepalive_intvl=30;
net.ipv4.tcp_keepalive_probes=5;
net.ipv4.tcp_keepalive_time=1800;
net.ipv4.ip_forward=0;
net.ipv4.conf.default.accept_source_route=0 ;
net.ipv4.conf.all.accept_source_route=0;
net.ipv4.conf.all.accept_redirects=0;
net.ipv4.conf.default.accept_redirects=0;
net.ipv4.conf.all.secure_redirects=0;
net.ipv4.conf.default.secure_redirects=0;
net.ipv4.udp_rmem_min=6144;
net.ipv4.udp_wmem_min=6144;
net.ipv4.tcp_rfc1337=1;
net.ipv4.ip_no_pmtu_disc=0;
net.ipv4.tcp_ecn=0;
net.ipv4.route.flush=1;
net.ipv4.tcp_rmem='6144 87380 524288';
net.ipv4.tcp_wmem='6144 87380 524288';
net.ipv6.conf.default.use_tempaddr=2;
net.ipv6.conf.all.use_tempaddr=2;
net.ipv6.conf.all.temp_prefered_lft=3600;
net.ipv6.conf.default.temp_prefered_lft=3600;
vm.dirty_ratio=90;
vm.dirty_background_ratio=80;
vm.oom_kill_allocating_task=1;
vm.overcommit_memory=1;
vm.page-cluster=3;
vm.drop_caches=3;
vm.min_free_kbytes=4096;
vm.panic_on_oom=0;
vm.dirty_expire_centisecs=1000;
vm.dirty_writeback_centisecs=2000;
vm.oom_kill_allocating_task=0;
vm.vfs_cache_pressure=10;
vm.min_free_order_shift=4;
vm.laptop_mode=0;
vm.block_dump=0;
Step 3
Now we need to enable it. So, navigate to /system/etc/init.d and create a file with the following code:
Code:
#!/system/bin/sh
# grep sysctl /etc/init.d/*
# Load /sys/etc/sysctl.conf
sysctl -p
sysctl -p is what initializes the code.
Just FYI: You don't actually need these lines:
Code:
# grep sysctl /etc/init.d/*
Code:
# Load /sys/etc/sysctl.conf
So this would have just sufficed.
Code:
#!/system/bin/sh
sysctl -p
If the above code does not work for any reason, try this:
Code:
#!/system/bin/sh
sysctl -p /system/etc/
Name your file something like this 10sysctl
Save your file.
NOTE: Your ROM must support init.d. You can do this by using dsixda's android kitchen
Step 4
Save your ROM and install it via recovery
OR
you could just push the files into your current ROM and try them out.
----------- For knowledge -----------​
Credits to imoseyon for portions of the info​
Ok, so what exactly is sysctl.conf?
The sysctl.conf is a configuration file for "sysctl" which is an interface for dynamically changing kernel parameters in the Linux OS. The configuration file contains the following elements, vm.min_free_kbytes, vm.dirty_ratio, vm.dirty_backgroud_ratio, vm.vfs_cache_pressure, vm.oom_kill_allocating_task. There are many other elements within the file, but we will be primarily focusing on these specifically (the vm prefix stands for virtual memory). The sysctl.conf file should be located in /etc (/system/etc) by default. To enable it you need your ROM to execute "sysctl -p" somewhere during the boot process (or shortly afterward). We will also be discussing how to enable it if it is not already done so. You can also run sysctl -p manually to enable it any time after the OS is started.
Now, let’s get down to what sysctl.conf does and how it works.
min free kbytes (vm.min_free_kbytes)
This is used to force the Linux VM to keep a minimum number of kilobytes free. The VM uses this number to compute a pages_min value for each lowmem zone in the system. Each lowmem zone gets a number of reserved free pages based proportionally on its size. Default is 2048kb.
dirty ratio (vm.dirty_ratio) and dirty background ratio (vm.dirty_background_ratio)
This controls how often the kernel writes data to "disk" (in our case the internal microSD system card, not the removable microSD card). When your apps write data to disk, Linux actually doesn't write the data out to the disk right away, it actually writes the stuff to system memory and the kernel handles when and how the data is actually going to be flushed to the disk. These values represent a percentage, the higher the percentage, the longer it waits to flush, the lower the percentage, the more often flushes will occur. Now remember, we are dealing with solid state storage, not the traditional disk platter and spindle. So we are actually able to delay flushes a little longer with solid state versus a traditional hard drive disk.
VFS Cache Pressure
Now here is where it gets interesting! File system cache (dentry/inode) is really more important than the block cache above in dirty ratio and dirty background ratio, so we really want the kernel to use up much more of the RAM for file system cache, this will increas the performance of the system without sacrificing performance at the application level. The default value is 100, as a percentage, and what you want to do is lower the value to tell the kernel to favor the file system cache and not drop them aggressively.
oom allocating task (vm.oom_kill_allocating_task)(enable or disable, generally in Linux this value is either a "1" or a "0," representing as on or off.)
This enables or disables killing the OOM-triggering task in out-of-memory (oom) situations. If this is set to zero, or disabled, the OOM killer will scan through the entire task list and select a task based on heuristics to kill. This normally selects a rogue memory-hogging task that frees up a large amount of memory when killed. If this is set to non-zero, or enabled, the OOM killer simply kills the task that triggered the out-of-memory condition. This avoids the expensive task list scan, which can take mass amounts of time and "hang" or freeze the system.
block_dump (vm.block_dump)
This enables block I/O debugging when set to a nonzero value. If you want to find out which process caused the disk to spin up (see /proc/sys/vm/laptop_mode), you can gather information by setting the flag.
When this flag is set, Linux reports all disk read and write operations that take place, and all block dirtyings done to files. This makes it possible to debug why a disk needs to spin up, and to increase battery life even more. The output of block_dump is written to the kernel output, and it can be retrieved using "dmesg". When you use block_dump and your kernel logging level also includes kernel debugging messages, you probably want to turn off klogd, otherwise the output of block_dump will be logged, causing disk activity that is not normally there.
overcommit_memory (vm.overcommit_memory)
This controls overcommit of system memory, possibly allowing processes to allocate (but not use) more memory than is actually available.
0 - Heuristic overcommit handling. Obvious overcommits of address space are refused. Used for a typical system. It ensures a seriously wild allocation fails while allowing overcommit to reduce swap usage. root is allowed to allocate slighly more memory in this mode. This is the default.
1 - Always overcommit. Appropriate for some scientific applications.
2 - Don't overcommit. The total address space commit for the system is not permitted to exceed swap plus a configurable percentage (default is 50) of physical RAM. Depending on the percentage you use, in most situations this means a process will not be killed while attempting to use already-allocated memory but will receive errors on memory allocation as appropriate.
page-cluster (vm.page-cluster)
This controls the number of pages which are written to swap in a single attempt. The swap I/O size.
It is a logarithmic value - setting it to zero means "1 page", setting it to 1 means "2 pages", setting it to 2 means "4 pages", etc.
The default value is three (eight pages at a time). There may be some small benefits in tuning this to a different value if your workload is swap-intensive.
panic_on_oom (vm.panic_on_oom)
This enables or disables panic on out-of-memory feature. If this is set to 1, the kernel panics when out-of-memory happens. If this is set to 0, the kernel will kill some rogue process, by calling oom_kill().
Usually, oom_killer can kill rogue processes and system will survive. If you want to panic the system rather than killing rogue processes, set this to 1.
The default value is 0.
Panic is a system error that is detected by the kernel.
dirty_expire_centisecs (vm.dirty_expire_centisecs)
How old "dirty" data should be before the kernel considers it old enough to be written to disk. It is expressed in 100ths of a second.
dirty_writeback_centisecs (vm.dirty_writeback_centisecs)
This is the interval of when the writeback daemons periodically wake up and write "old" data out to disk. It is expressed in 100ths of a second.
Click to expand...
Click to collapse
source:
http://forum.xda-developers.com/showthread.php?t=1621808
i use juice defender...with okayish usage, i got 3 days and 1 hour(1 time thing).....with my normal usage i get 24+ hours......
would have given this a try had there been just a .zip file
it comes with a zip file but flash at your own risk
Code:
http://www.androidfilehost.com/main/Incredible_Developers/PureMotive/Mods/Universal/Sysctl-conf.zip
i just saw this thread and see it really interesting as we all love longer battery life
it was classified as universal but i have not flashed file yet and am hoping first feedbacks about this from developers in our phone model
noypi_ako said:
it comes with a zip file but flash at your own risk
Code:
http://www.androidfilehost.com/main/Incredible_Developers/PureMotive/Mods/Universal/Sysctl-conf.zip
i just saw this thread and see it really interesting as we all love longer battery life
it was classified as universal but i have not flashed file yet and am hoping first feedbacks about this from developers in our phone model
Click to expand...
Click to collapse
I cannot flash it (status 0) in my MIUI 10.5...
tomjoad2 said:
I cannot flash it (status 0) in my MIUI 10.5...
Click to expand...
Click to collapse
Replace the meta-inf folder with the one in your rom zip file
Cheers
Sent from my GT-i9003 powered by Stable and Smooth CleanKpu rom
I had problems installing the zip on UC kernel stock rom. Nonetheless the kind of hack proposed in this mod should work here as well. It makes sense. Is anyone able to fix it?
it was mentioned by the developer that the best to do it is manually
and that custom rom developers can implement it on their roms
Those having status 0 error: replace the meta-inf folder in the flashable zip with the one in your rom
Cheers
Sent from my GT-i9003 powered by Stable and Smooth CleanKpu rom
bscraze said:
Those having status 0 error: replace the meta-inf folder in the flashable zip with the one in your rom
Cheers
Sent from my GT-i9003 powered by Stable and Smooth CleanKpu rom
Click to expand...
Click to collapse
thanks...done, but now I get error (status 7)
tryng to do it manually
i think it would be best if we hear feedbacks first from our kernel/rom developers of i9003
Even though sysctl.conf accepts ";", it breaks the conf file and sysctl can't parse it.
Use this instead:
http://pastebin.com/raw.php?i=3tDgbmG3
EDIT:
This file is simply the one in the OP without ";".
FYI some of its values overwrite the values used by kernel developers.
EDIT 2:
And without single quotes.
loSconosciuto said:
Even though sysctl.conf accepts ";", it breaks the conf file and sysctl can't parse it.
Use this instead:
http://pastebin.com/raw.php?i=3tDgbmG3
Click to expand...
Click to collapse
Done manually... but when I try to review with sysctl -a| grep vm cannot see any changes
tomjoad2 said:
Done manually... but when I try to review with sysctl -a| grep vm cannot see any changes
Click to expand...
Click to collapse
Sorry, I didn't notice the single quotes in sysctl.conf
File updated (same link).
loSconosciuto said:
Sorry, I didn't notice the single quotes in sysctl.conf
File updated (same link).
Click to expand...
Click to collapse
Still nothing...maybe sysctl -p cannot activate the script...
tomjoad2 said:
Still nothing...maybe sysctl -p cannot activate the script...
Click to expand...
Click to collapse
deeper part of the first post
developer said if this dont work
Code:
#!/system/bin/sh
sysctl -p
then try this
Code:
#!/system/bin/sh
sysctl -p /system/etc/
tomjoad2 said:
Still nothing...maybe sysctl -p cannot activate the script...
Click to expand...
Click to collapse
It should work. Maybe you don't have /etc, but only /system/etc (/etc is just a symlink)
If you run
Code:
sysctl -p
you should get as output the content of sysctl.conf
If you get
Code:
sysctl: /etc/sysctl.conf: No such file or directory
Try with
Code:
sysctl -p /PATH/TO/THE/FILE/sysctl.conf
Where /PATH/TO/THE/FILE/ is, of course, the path to sysctl.conf,
noypi_ako said:
deeper part of the first post
developer said if this dont work
Code:
#!/system/bin/sh
sysctl -p
then try this
Code:
#!/system/bin/sh
sysctl -p /system/etc/
Click to expand...
Click to collapse
This is what I get
and when a write sysctl -p then ---> sysctl: short write
tomjoad2 said:
This is what I get
and when a write sysctl -p then ---> sysctl: short write
Click to expand...
Click to collapse
i believe loSconosciuto is highly qualified for this one
many thanks to him for looking into this mod
Code:
ls -l /proc/sys/net/ipv4/route/flush
--w------- 1 root root 0 Apr 28 14:26 /proc/sys/net/ipv4/route/flush
That means no one can read the content of this file, even 'root'. That's why you get
Code:
sysctl: error reading key 'net.ipv6.route.flush': Permission denied
sysctl: error reading key 'net.ipv4.route.flush': Permission denied
sysctl tries to read it, but it can't.
tomjoad2 said:
This is what I get
and when a write sysctl -p then ---> sysctl: short write
Click to expand...
Click to collapse
Are you sure your sysctl.conf is correct? Did you remove all the ";" and "'"?
loSconosciuto said:
Code:
ls -l /proc/sys/net/ipv4/route/flush
--w------- 1 root root 0 Apr 28 14:26 /proc/sys/net/ipv4/route/flush
That means no one can read the content of this file, even 'root'. That's why you get
Code:
sysctl: error reading key 'net.ipv6.route.flush': Permission denied
sysctl: error reading key 'net.ipv4.route.flush': Permission denied
sysctl tries to read it, but it can't.
Are you sure your sysctl.conf is correct? Did you remove all the ";" and "'"?
Click to expand...
Click to collapse
would it work if we chmod 644 those file?

Categories

Resources