[SCRIPT][DALVIK] System Dalvik cache script 0.0.1 - GT540 Optimus Android Development

Hi Folks,
By request from a friend i've created a sh script to move all [email protected] dalvik cache files to /cache/dalvik-cache because some roms store [email protected] dalvik files in /data/dalvik-cache. So for those that need or wont to save some space in /system follow this steps:
1 - You need a rooted phone
2 - You need terminal emulator
3 - Download script from here
4 - Open terminal, navigate to where you downloaded the script and run sh dalvik.sh
5 - Reboot
!!Warning!!
Only run script in roms that store [email protected] dalvik files in /data/dalvik-cache otherwise you will experience some bugs in aplications.
Please post your feedback please
Thanks to HeD_pE for testing!
Cheers,
h4ck3dm1nd

Sorry I can't find the links

http://forum.xda-developers.com/showthread.php?p=32360919#post32360919
his other post...

[email protected]:/ # su
[email protected]:/ # cd /data/dalvik-cache
[email protected]:/data/dalvik-cache # mv [email protected]* /cache/dalvik-cache
failed on '[email protected]@[email protected]' - Cross-device link
255|[email protected]:/data/dalvik-cache #
I have [email protected] dalvik stuff in /data/dalvik cache and I've created folder /cache/dalvik-cache. Android: CM9.1 miroslav. Ideas?

prwnd said:
[email protected]:/ # su
[email protected]:/ # cd /data/dalvik-cache
[email protected]:/data/dalvik-cache # mv [email protected]* /cache/dalvik-cache
failed on '[email protected]@[email protected]' - Cross-device link
255|[email protected]:/data/dalvik-cache #
I have [email protected] dalvik stuff in /data/dalvik cache and I've created folder /cache/dalvik-cache. Android: CM9.1 miroslav. Ideas?
Click to expand...
Click to collapse
I'm having the same problem but with AIME.apk file. I'm using AOSP v1.2 by miroslav

prwnd said:
[email protected]:/ # su
[email protected]:/ # cd /data/dalvik-cache
[email protected]:/data/dalvik-cache # mv [email protected]* /cache/dalvik-cache
failed on '[email protected]@[email protected]' - Cross-device link
255|[email protected]:/data/dalvik-cache #
I have [email protected] dalvik stuff in /data/dalvik cache and I've created folder /cache/dalvik-cache. Android: CM9.1 miroslav. Ideas?
Click to expand...
Click to collapse
Hi,
Sorry but i do not check GT540 forum to often, I realised that if you create the /cache/dalvik-cache folder and run the script after it it will create the same folder again and in root explorer you can see the folders with the exact same name, So please backup your ROM, move all dalvik cache from /cache to its original folder, remove any symlinks and without creating the /cache/dalvik-cache folder run the script please.

In the attachment I share the scripts that Worked for me in order to move dalvik-cache to /cache (or to /dev).
Just put the one you want on /system/etc/init.d and set permissions to 777. Reboot to recovery, wipe cache and dalvik-cache and reboot to system again. Done =D

coto39 said:
In the attachment I share the scripts that Worked for me in order to move dalvik-cache to /cache (or to /dev).
Just put the one you want on /system/etc/init.d and set permissions to 777. Reboot to recovery, wipe cache and dalvik-cache and reboot to system again. Done =D
Click to expand...
Click to collapse
using your script, and it works. tq m8. using optimus 2x

The script is pretty easy to create.
# /system/bin/sh
rm /data/dalvik-cache/*
reboot
Use su binary.
Save it has a .sh file and then chmod 755 the file so you can run it via terminal.
And how do I know that?, I have experience with Linux OS.
I will upload it to my site tomorrow if I have time to also create index.php for it and update the other index.php file so it is easy to access the file to download.
EDIT: Oops, you are talking about moving, all well, this can be useful anyway.
EDIT2: Here is the link: caftp.3owl.com/Shell_Scripts/Dalvik_cache_cleaner/

andyabc said:
The script is pretty easy to create.
# /system/bin/sh
rm /data/dalvik-cache/*
reboot
Use su binary.
Save it has a .sh file and then chmod 755 the file so you can run it via terminal.
And how do I know that?, I have experience with Linux OS.
I will upload it to my site tomorrow if I have time to also create index.php for it and update the other index.php file so it is easy to access the file to download.
EDIT: Oops, you are talking about moving, all well, this can be useful anyway.
Click to expand...
Click to collapse
Oops, moderator delete this post, I accidentally ended up quoting my own post o.o

I fixed this script, but u must create before dalvik-cache folder in /cache (maybe add this to updater script) [no need anymore till V0.2 version]
Script v0.4 (can be used also as init.d script ) :
Code:
#!/system/bin/sh
#Dalvik Cache Saver by Alberto96
if [ -d /cache/dalvik-cache ];
then
cd /data/dalvik-cache
cp -a [email protected]* /cache/dalvik-cache
rm -r -f [email protected]*
find /data/dalvik-cache -type l -delete
busybox find /cache/dalvik-cache/* -type f -exec cp -f -s {} /data/dalvik-cache/ \;
else
mkdir /cache/dalvik-cache
cd /data/dalvik-cache
cp -a [email protected]* /cache/dalvik-cache
rm -r -f [email protected]*
find /data/dalvik-cache -type l -delete
busybox find /cache/dalvik-cache/* -type f -exec cp -f -s {} /data/dalvik-cache/ \;
fi
[ 0.3 version works but have a problem, im searching a fix. ]

Link for thread : http://forum.xda-developers.com/showthread.php?p=35843614

Ok , but how move ONLY SYSTEM DALVIK to cache/dalvik cache? Any ideas?
When we move ALL dalvik cache apps (some data and system) , than cache partition is fully! And we can't install any others apps !

This script moves only system dalvik cache so cache partition size is enough. Data dalvik cache will be saved in data partition with no cause of no space Tested in huawei u8160 with very little partitions
Inviato dal mio GT-I9000 con Tapatalk 2

Script working perfect , but first we must create dalvik-cache folder in cache partition (in CM9) and set permissions this folder:
[x][x][x]
[x][x][x]
[o][o][x]
Script move to etc/init.d and set perm:
[x][x][x]
[x][o][x]
[x][o][x]
reboot.

Related

How do I completly clear out my ext2 partition through Terminal emulator

I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Joeriginal said:
I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Click to expand...
Click to collapse
well you can try flashing LucidREM mod that has the files for mounting it located here and instead of using the copy.sh app first try this.
$su
# cd /system/sd
# ls -la
check if the app folder is there if it is than
# cd app
#ls
check if the files are there.. and if they exist than try this
# rm -rf /data/app
# ln -S /system/sd/app /data/app
# reboot
hope that helps and it u still want to wipe the ext2 parttition than jut
# rm -rf /system/sd/*
or
# rm -a /system/sd/*
Nitro212 said:
well you can try flashing LucidREM mod that has the files for mounting it located here and instead of using the copy.sh app first try this.
$su
# cd /system/sd
# ls -la
check if the app folder is there if it is than
# cd app
#ls
check if the files are there.. and if they exist than try this
# rm -rf /data/app
# ln -S /system/sd/app /data/app
# reboot
hope that helps and it u still want to wipe the ext2 parttition than jut
# rm -rf /system/sd/*
or
# rm -a /system/sd/*
Click to expand...
Click to collapse
I have problems when I get to ln -S /system/sd/app /data/app
it says link failed no such file exists
Joeriginal said:
I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Click to expand...
Click to collapse
I kinda had the same question but was wondering if there was an easier way of wiping the ext2 partition? I'm kinda new at all this and am now starting to get the hang of flashing different roms onto my phone but I realized that doing an Alt+W before flashing new roms does not wipe the ext2 partition. (At least I'm pretty sure it doesn't.)
I'm not too savvy on using terminal yet..I've heard of using adb but I don't even know where to begin with that..so I was wondering if going into Paragon Partition Manager and just formatting the ext2 partition will work? Any info will be greatly appreciated.
Ok i finally have it working. I keep getting a social network force close.
wiping an ext2/ext3 partition
Joeriginal said:
I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Click to expand...
Click to collapse
there is an app on the market called lucid REM that runs his script via terminal emulator. after getting it and running it you can go to terminal and type
su
lucid -c (this wipes ext2/3 partition)
hopefully this helps you. if you are on a rom that uses auto a2sd then you will most likely getting force closes all over until you flash your new rom.
I posted a thread with steps to do it http://forum.xda-developers.com/showthread.php?t=533731
Code:
Open console and enter the following commands. Press "Enter" after each line. This wipes the ext partition.
mount -o rw /dev/block/mmcblk0p2 /system/sd
rm -r /system/sd/
[code]
Glad this wasnt deleted right away, maybe it can just be moved?
It helped because I also was wondering the best way of doing this, and now I know.
Thanks .
Odd, double post for no reason. Sorry delete this post?

Dalvik-cache in /cache

I've seen in some ROMs for other phones (like Cyanogen and Enomther's ROMs) that they implement a hack that moves the dalvik-cache into the /cache partition, thus freeing up a lot of space in /data (and virtually eliminating the need for a2sd). I'm wondering if anyone has thought of or knows how to do that? I think it'd be a great addition to any ROM.
adb shell
busybox cp -a /data/dalvik-cache /cache/delvik
reboot recovery
adb shell
mount cache
rm -rf /data/dalvik-cache
ln -s /cache/dalvik/dalvik-cache /data/dalvik-cache
should work
Dont know about after reboot though.
Me personally I just moved it all to the sd ext2.
Dalvik and system apps also.
smstutler said:
adb shell
busybox cp -a /data/dalvik-cache /cache/delvik
reboot recovery
adb shell
mount cache
rm -rf /data/dalvik-cache
ln -s /cache/dalvik/dalvik-cache /data/dalvik-cache
should work
Dont know about after reboot though.
Me personally I just moved it all to the sd ext2.
Dalvik and system apps also.
Click to expand...
Click to collapse
Cool! Now to make that survive a reboot, it would have to be written into the boot.img, or in a script that is called in the boot.img correct?
That I dont know. I was wondering how to utilize all the free space I have better. Just a heads up though dalvik on my system is 60megs.
smstutler said:
That I dont know. I was wondering how to utilize all the free space I have better. Just a heads up though dalvik on my system is 60megs.
Click to expand...
Click to collapse
Exactly why moving it to cache would be ideal, as far as my limited knowledge of this understands. That frees up about 60mb of space in /data.
smstutler said:
I was wondering how to utilize all the free space I have better.
Click to expand...
Click to collapse
Honestly, the best use for the internal memory would be to leave the dalvik cache on it. It consists of files that have already been preprocessed by the VM specifically with the intention of improving performance. Moving that from the internal memory to the slower sd card.... It ain't gonna help....
If your trying to tweak performance, you're much better off looking for other things you can move to create more space for the cache....
Isn't /cache just a separate partition in the internal memory?
mrinehart93 said:
Isn't /cache just a separate partition in the internal memory?
Click to expand...
Click to collapse
I assumed he had symlinked it over to the sd card. Generally the only benefit to be gained by moving files around is by putting things on the (slow) sd card to free up the (faster) internal memory.
If that's not what we're talking about, then the end result would be exactly nill...
subliminalurge said:
I assumed he had symlinked it over to the sd card. Generally the only benefit to be gained by moving files around is by putting things on the (slow) sd card to free up the (faster) internal memory.
If that's not what we're talking about, then the end result would be exactly nill...
Click to expand...
Click to collapse
Actually I have seen no performance hit as I can tell by running it internally or on sd card.
smstutler said:
Actually I have seen no performance hit as I can tell by running it internally or on sd card.
Click to expand...
Click to collapse
That's certainly possible. Are you using the stock sd card?
I still stand behind my assertion that the dalvik cache is the wrong thing to be moving if the goal is to improve performance. (Well, unless you somehow have an sd card that operates faster than the internal memory...)
And your statement that you see no performance hit one way or the other is kind of just another way of saying what I said... The result was nill.....
subliminalurge said:
That's certainly possible. Are you using the stock sd card?
I still stand behind my assertion that the dalvik cache is the wrong thing to be moving if the goal is to improve performance. (Well, unless you somehow have an sd card that operates faster than the internal memory...)
And your statement that you see no performance hit one way or the other is kind of just another way of saying what I said... The result was nill.....
Click to expand...
Click to collapse
Right I get your point. But now on to the better thing. Possibly moving some music files to internal since I have seen complaints of hiccups when playing tunes. I cant think of any other benefits as of yet. Was just curious as to if it could be done so I did it. I am using a class 4 card I have a 6 but it is a tad bad so it is of no use. Now as for moving the dalvik to the /cache, that seems like it would be the better idea, since i have yet to see my cache used much at all.
smstutler said:
Now as for moving the dalvik to the /cache, that seems like it would be the better idea, since i have yet to see my cache used much at all.
Click to expand...
Click to collapse
I haven't really monitored the usage, although it shouldn't change much.
I'm also new to Android, but I have a good number of years under my belt both adminning Linux machines and developing Java apps (amongst other things...).
I've done a bit of reading on how the Dalvik VM works, and I can confidently tell you that you want the Dalvik cache on whatever the fastest memory in your phone is. For the vast majority of people, that will be the internal memory. If you've spent a small fortune on a super-badass sd card that is faster (like that other thread where the guy bought a class 10), then moving it would be a simple matter of symlinking that directory onto the card.
As far as your concerns with stuttering music, even the dog slow sd card that comes stock with the hero is plenty fast for playing an mp3 file. If you're having trouble there, you need to take a look at what's hogging your cpu, not what's hogging your memory....
Nah wasn't meant for me with the music on SD. I rarely use it for that. But yes I do agree with you. The SD may not be best choice but there has to be a better way to utilize some of the system memory that just sits dormant.
/dev/block/mtdblock4 130.0M 1.1M 128.9M 1% /cache
see what I mean here. 1% used.
I've tested this on my Hero, my Nexus One and on a friend's Evo.
Code:
#!/system/bin/sh
echo "++++ DALVIK 2 CACHE STARTING ++++"
if [ ! -d /cache/dalvik-cache ]
then
mkdir /cache/dalvik-cache
chown 1000:1000 /cache/dalvik-cache
chmod 775 /cache/dalvik-cache
fi
if [ -L /data/dalvik-cache ]
then
rm -f /data/dalvik-cache
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ ! -d /data/dalvik-cache ]
then
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ -d /data/dalvik-cache ]
then
for filename in /data/dalvik-cache/*
do
if [ -L $filename ]
then
rm -f $filename
fi
done
mv /data/dalvik-cache/* /cache/dalvik-cache/
fi
mount -o bind /cache/dalvik-cache/ /data/dalvik-cache/
It's part of Darktremor A2SD 2.7 update 3r1.
Command: a2sd cachepart
Hacre said:
I've tested this on my Hero, my Nexus One and on a friend's Evo.
Code:
#!/system/bin/sh
echo "++++ DALVIK 2 CACHE STARTING ++++"
if [ ! -d /cache/dalvik-cache ]
then
mkdir /cache/dalvik-cache
chown 1000:1000 /cache/dalvik-cache
chmod 775 /cache/dalvik-cache
fi
if [ -L /data/dalvik-cache ]
then
rm -f /data/dalvik-cache
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ ! -d /data/dalvik-cache ]
then
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ -d /data/dalvik-cache ]
then
for filename in /data/dalvik-cache/*
do
if [ -L $filename ]
then
rm -f $filename
fi
done
mv /data/dalvik-cache/* /cache/dalvik-cache/
fi
mount -o bind /cache/dalvik-cache/ /data/dalvik-cache/
Click to expand...
Click to collapse
tkirton said:
It's part of Darktremor A2SD 2.7 update 3r1.
Command: a2sd cachepart
Click to expand...
Click to collapse
Was there a reason you quoted me?
Hacre said:
Was there a reason you quoted me?
Click to expand...
Click to collapse
I believe tkirton quoted you because instead of ruunning the script you could simply use the Command: a2sd cachepart
In his latest release.
nfinitefx45 said:
I believe tkirton quoted you because instead of ruunning the script you could simply use the Command: a2sd cachepart
In his latest release.
Click to expand...
Click to collapse
Oh I see. Well the script I posted should work on ROMs that don't have such a feature.
True. Point taken.
Hacre said:
Oh I see. Well the script I posted should work on ROMs that don't have such a feature.
Click to expand...
Click to collapse
Newbie question
Hacre said:
I've tested this on my Hero, my Nexus One and on a friend's Evo.
Code:
#!/system/bin/sh
echo "++++ DALVIK 2 CACHE STARTING ++++"
if [ ! -d /cache/dalvik-cache ]
then
mkdir /cache/dalvik-cache
chown 1000:1000 /cache/dalvik-cache
chmod 775 /cache/dalvik-cache
fi
if [ -L /data/dalvik-cache ]
then
rm -f /data/dalvik-cache
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ ! -d /data/dalvik-cache ]
then
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 775 /data/dalvik-cache
elif [ -d /data/dalvik-cache ]
then
for filename in /data/dalvik-cache/*
do
if [ -L $filename ]
then
rm -f $filename
fi
done
mv /data/dalvik-cache/* /cache/dalvik-cache/
fi
mount -o bind /cache/dalvik-cache/ /data/dalvik-cache/
Click to expand...
Click to collapse
How can I run this script on my ROM? Please guide me to make this work.

Removing apps on SD Card

I originally was using apps2sd on my DC 2.09.01 hero. I have now decided not to use it. But when I go into applications it shows all the apps that I had installed as ex: "com.jrtstudio.automont" 0 kb. How can I remove these?
reboot into recovery and wipe your cache.
1 more question...
Once you use apps2sd is there a way to transfer those apps back to your device if you decide you no longer want those apps on your SD.
Kcarpenter said:
reboot into recovery and wipe your cache.
Click to expand...
Click to collapse
I rebooted into recovery and wiped my dalvik cache and they are still there...
Still trying to figure this all out...
Just go to dc config an disable a2sd and disable dalvik cache to sd (uncheck the buttons) then save. After that reboot it should move all ur apps and cache back to internal storage memory. That's it
-------------------------------------
Sent via the XDA Tapatalk App
roadster92 said:
Just go to dc config an disable a2sd and disable dalvik cache to sd (uncheck the buttons) then save. After that reboot it should move all ur apps and cache back to internal storage memory. That's it
-------------------------------------
Sent via the XDA Tapatalk App
Click to expand...
Click to collapse
I did that originally and it still shows the .com files...and my apps never got moved back to the phones memory.
Type the following in ADB shell:
/system/xbin/busybox rm /data/app
/system/xbin/busybox rm /data/app-private
/system/xbin/busybox mkdir /data/app
/system/xbin/busybox mkdir /data/app-private
/system/xbin/busybox chmod 755 /data/app
/system/xbin/busybox chmod 755 /data/app-private
/system/xbin/busybox cp /system/sd/app/* /data/app
/system/xbin/busybox cp /system/sd/app-private/* /data/app-private
Now your programs should be back on the SD card.
To move dalvik-cache, while in ADB Shell, type the following commands:
/system/xbin/busybox rm /data/dalvik-cache
/system/xbin/busybox mkdir /data/dalvik-cache
/system/xbin/busybox chmod 755 /data/dalvik-cache
/system/xbin/busybox cp -f /system/sd/dalvik-cache/* /data/dalvik-cache
Now, your phone is now using internal storage. Reboot the phone to make sure the changes stay (make sure the A2SD and Dalvik-Cache to SD is off in Dconfig).
If that doesn't work, download Darktremor A2SD 2.7 Update 3. Once that is flashed and you have your phone booted, type the following in an ADB shell:
a2sd remove
That will move everything back to internal storage and sets a flag (called .noa2sd) on your SD card to prevent the data from being moved again (until you reactivate it using a2sd install)
Hope that helps.
fifedogg said:
I did that originally and it still shows the .com files...and my apps never got moved back to the phones memory.
Click to expand...
Click to collapse

[STOCK]INIT.D support. No need to flash anything or even reboot into recovery

So yea I've been working on a proper "app2sd" solution that doesn't involve just switching the MicroSD for the eMMC, but I like the stock rom so far, so I didn't feel like flashing a rom just to get init.d, and I didn't feel like modifying the ramdisk in the kernel either. So I cooked up this script that anyone can run from terminal to get init.d support. It should work for other devices too, as long as they run /system/etc/install-recovery.sh on boot.
There's only three requirements for it to work:
#1 You must be rooted
#2 Your device must run /system/etc/install-recovery.sh
#3 You must have busybox
I tested a few times on my own device (GT-N8013), but haven't had anyone else test it, so don't freak out if it doesn't work. Just let me know what went wrong and I'll figure something out.
Running it is very simple:
#1 Open any terminal app
#2 su
#3 navigate to the folder where you have the script
#4 sh ./enableinit.sh
Your device will be rebooted once the process is done, don't freak out. If everything went fine, you'll have a file in /sdcard called init.d.log created by the test init.d script that is made by the enabler.
You can either download the attachment (rename it to enableinit.sh if you get the attachment), or create the file with the contents betlow:
Code:
#!/system/bin/sh
# Adds init.d support to any device that automatically runs /system/etc/install-recovery.sh
# on startup.
#
# Made by TweakerL, make sure to visit us at and-host.com or chat with us on freenode #and-host
echo '##################################################'
echo '## ##'
echo '## Script by TweakerL ##'
echo '## Visit us at and-host.com ##'
echo '## Chat with us at freenode #and-host ##'
echo '## ##'
echo '##################################################'
echo ''
echo 'This script will enable init.d if your device'
echo 'executes /system/etc/install-recovery.sh'
echo ''
echo 'Your tablet will be rebooted once the process'
echo 'is done.'
echo ''
echo 'If the script successfully enabled init.d you will'
echo 'have a file in /sdcard called init.d.log after'
echo 'the device is done rebooting. Remember to always'
echo 'set the proper permissions in your scripts or they'
echo 'will not work.'
echo ''
read -p "Press ENTER to continue..."
if [ ! -f /system/xbin/busybox -a ! -f /system/bin/busybox ]
then
echo 'You do not have busybox. Exiting now...'
else
# Mount system as rw in order to execute the script
busybox mount -o remount,rw -t ext4 /dev/block/mmcblk0p9 /system
# Check if install-recovery.sh already exists, and if so
# add the necessary lines, otherwise create it
if [ -f /system/etc/install-recovery.sh ]
then
if cat /system/etc/install-recovery.sh | busybox egrep -i "sysinit"
then
echo sysinit already present in install-recovery.sh, skipping this step.
else
busybox cp -f /system/etc/install-recovery.sh /sdcard/qsxdrgbhuk.sh
echo '' >> /sdcard/qsxdrgbhuk.sh
echo '/system/bin/sysinit' >> /sdcard/qsxdrgbhuk.sh
busybox cp -f /sdcard/qsxdrgbhuk.sh /system/etc/install-recovery.sh
fi
else
echo '#!/system/bin/sh' >> /sdcard/qsxdrgbhuk.sh
echo '' >> /sdcard/qsxdrgbhuk.sh
echo '/system/bin/sysinit' >> /sdcard/qsxdrgbhuk.sh
busybox cp -f /sdcard/qsxdrgbhuk.sh /system/etc/install-recovery.sh
busybox chmod 755 /system/etc/install-recovery.sh
fi
# Check if sysinit already exists and if so skip step
# otherwise create it
if [ ! -f /system/bin/sysinit ]
then
echo '#!/system/bin/sh' >> /sdcard/kuhbgrdxsq
echo 'export PATH=/sbin:/system/sbin:/system/bin:/system/xbin' >> /sdcard/kuhbgrdxsq
echo '' >> /sdcard/kuhbgrdxsq
echo '/system/bin/logwrapper busybox run-parts /system/etc/init.d' >> /sdcard/kuhbgrdxsq
busybox cp -f /sdcard/kuhbgrdxsq /system/bin/sysinit
busybox chmod 755 /system/bin/sysinit
else
echo sysinit already exists in /system/bin. init.d should already be enabled.
fi
# Cleanup
busybox rm -f /sdcard/qsxdrgbhuk.sh
busybox rm -f /sdcard/kuhbgrdxsq
#Check that init.d folder exists and if not create it
# as well as set the right permissions
if [ -d '/system/etc/init.d' ]
then
chmod 755 /system/etc/init.d
else
mkdir /system/etc/init.d
chmod 755 /system/etc/init.d
fi
# Create a test init.d script that echoes a file to
# /sdcard on successful execution
echo '#!/system/bin/sh' > /sdcard/99testinit
echo '' >> /sdcard/99testinit
echo 'echo init.d works > /sdcard/init.d.log' >> /sdcard/99testinit
busybox cp -f /sdcard/99testinit /system/etc/init.d
chmod 755 /system/etc/init.d/99testinit
busybox rm -f /sdcard/99testinit
# Sync and remount system
sync
busybox mount -o remount,ro -t ext4 /dev/block/mmcblk0p9 /system
# Reboot system to enable init.d
if [ -f /system/bin/reboot ]
then
echo Your device will reboot in 3 seconds
sleep 3
reboot
else
echo "Your device doesn't appear to have a reboot command,"
echo "please reboot your device now to avoid problems."
fi
fi
reserved
TweakerL said:
reserved
Click to expand...
Click to collapse
it is good!
TweakerL said:
reserved
Click to expand...
Click to collapse
Thanks for sharing.
Im tested my ainol elf offical rom novo0706, and worked. Thank
Sent from my Ainol Novo 7 Elf using Tapatalk 2
Pretty awesome. Will edit once i try this out.
Edit: Everything worked. Tested on GT-N8013
Thanks alot.
Sent from my GT-N8013 using Tapatalk 2
Hi, Can you tell more clearly how to make this work.
Sent from my GT-N8000 using xda app-developers app
Can any one make .zip file to flash thru recovery..thanks
The point was not to have to go into recovery...
Anyway, it's really simple...
Download the attached file
open terminal
then do the following commands
Code:
su
cd /sdcard
sh ./Download/enableinit.sh.txt
assuming that your browser saves files to /sdcard/Download
Sorry, I am a computer idiot . I really donot how to do after I had downloaded the text file. Appreciated if you can explain more detail.
Sent from my GT-N8000 using xda app-developers app
So now with init.d support ready, is it going to be possible to run proper a2sd scripts? And which one specifically would you recommend? Excuse me if i'm asking the wrong questions.
andylam16 said:
Sorry, I am a computer idiot . I really donot how to do after I had downloaded the text file. Appreciated if you can explain more detail.
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
It has nothing to do with knowing anything about computers, as you don't need a computer to do this... just your device...
Download the file, on your device, if you're using stock browser it will go to /sdcard/Download
Make sure you have busybox, download a busybox installer from the market, install it, and run it, and tell it to install busybox
Download a terminal app from the play store for free, such as android terminal emulator, install it and open it
then type in these exact commands, just like they're in here, in the terminal:
Code:
su
sh /sdcard/Download/enableinit.sh
Assuming of course, that your stuff is getting download to /sdcard/Download.
If you can't do this... sell your android device and buy an iCrap one...
drnish83 said:
So now with init.d support ready, is it going to be possible to run proper a2sd scripts? And which one specifically would you recommend? Excuse me if i'm asking the wrong questions.
Click to expand...
Click to collapse
I'm working on my own app2sd script that should beat anything ever made. Here's what it does:
It uses a second partition in the MicroSD card for gaining extra storage, this partition has to be formatted to ext4
#1 It mounts the external ext4 partition to a new location
#2 It detects the location for /sdcard/Android; /data/data; /data/app no matter what device you have (suppose the directories aren't the same for a certain device)
#3 It has the option to mount /sdcard/Android to a folder in the external partition
#4 It has the option to mount /data/data to a folder in the external partition
#5 It has the option to mount /data/app to a folder in the external partition
#6 It has the option to automatically copy everything from any of those folders to the appropriate folder in the external partition
#7 It has the option to automatically wipe from the internal storage anything that it moves
#8 If you have all options enabled, apps will be automatically installed to the external partition and never take any space in the internal storage, while everything else (Download/recovery/backup/pictures/videos/etc...) all remain in the internal partition.
Wow... cant wait for this script
Sent from my GT-N8013 using Tapatalk 2
Thanks for explaining. Interesting indeed! Will definitely wait for it eagerly!
Here's a preview of the super app2sd script I'm working on. Much of it is already implemented, should have it all in a couple of days
confusing
I have tried your script and it has successful at first.. then i flashing my note again with stock rom and i try using ur script again but now there is nothing chance.. do you know why?? what must i do now??
You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?
NessLookAlike said:
You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?
Click to expand...
Click to collapse
Busy box installs on mine.
Sent from my GT-N8013 using Tapatalk 2
NessLookAlike said:
You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?
Click to expand...
Click to collapse
Only reason you wouldn't be able to install busybox is if you're not rooted.
Mr tweaker, i have done the process of init.d but there is nothing changed.. where is my false?
Sent from my GT-N8000 using XDA Premium HD app
Welly_11 said:
Mr tweaker, i have done the process of init.d but there is nothing changed.. where is my false?
Sent from my GT-N8000 using XDA Premium HD app
Click to expand...
Click to collapse
Look for these files and let me know if they're there:
/system/etc/install-recovery.sh
/system/bin/sysinit
/system/etc/init.d/99testinit
**************************************
If anybody needs help, look for me on irc - #and-host in freenode

Use internal sdcard as dalvik-cache

As I cannot use the internal sdcard with CM11, I've made a small script which mounts the internal sdcard as /data/dalik-cache to get more free space for apps & app-data.
WARNING: Only for users who are familiar with adb as you can probably brick your device!
Installation is a bit tricky, maybe someone makes an installer. All steps are done over adb
First format the internal sdcard with ext4: mke2fs -t ext4 /dev/block/mmcblk0p23
Copy script below to /data/local/userinit.sh (e.g. adb push userinit.sh /data/local/userinit.sh)
chmod 755 /data/local/userinit.sh
Reboot and let dalvik cache recreate. After this happend, reboot into recovery, wipe dalvik-cache and enjoy the 200MB more free space in data for apps.
Code:
#!/system/bin/sh
busybox mount -t ext4 -o noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p23 /data/dalvik-cache;
mountext=`busybox mount | egrep 'ext2|ext3|ext4'`;
if [ -n "$mountext" ];
then
busybox chown 1000:1000 /data/dalvik-cache;
busybox chmod 771 /data/dalvik-cache;
fi;
sync;
Awesome... I just needed it for assigning block on dalvik in my beta app. Works great!

Categories

Resources