Related
saw this over here...
http://andblogs.net/2009/05/quick-hack-save-tons-of-space/#more-1660
Quick Hack: Save Tons of Space
Posted on May 8th, 2009 in Android Hacking by Disconnect Tagged cupcake, customize, G1 & ADP1, hacking, howto, kernel, space
So I was looking at my phone, and under 1.5 my dalvik cache was 31 megs (!!!). Rather than move apps to SD (I use my sd card for other stuff, and my apps are only 15 megs anyway) I began thinking.. what else could I move? Aha!
Here are the directions for moving dalvik-cache to /cache, which is unused on these images anyway (it is only for OTA updates.)
There is no fancy installer or much support, and there may be bugs (I only just did this today.)
Its pretty easy. And, so far, works well for me This walkthrough isn’t going to be particularly handholding, but if you need more help try the comments.
Just boot up a capable recovery image (such as JF’s) and mount up /cache and /data.
view sourceprint?
1.# cd /cache
2.# mkdir dalvik-cache
3.# chown 1000 dalvik-cache
4.# chgrp 1000 dalvik-cache
5.# chmod 771 dalvik-cache
6.# cd /data
7.# mv dalvik-cache dalvik-cache-orig
8.# ln -s /cache/dalvik-cache dalvik-cache
The other thing you need is a new boot.img. This one is tuned for JF’s 1.5 adp1 image, and it may or may not work with anything else. Boot Image Cache to Cache JF1.5-ADP1 (71)
(All it does is create the /cache/dalvik-cache dir if it is missing and make sure the perms on /cache are 771 instead of 770.)
Tadah! If everything works, you can remove dalvik-cache-orig. If not, just flash the backup (you did take a backup, right?)
Enjoy!
(Big thanks to JF for helping with the boot image since I have no dev tools right now, and for testing it out for me too.)
any one try it yet? be nice to free up 70meg more on the phone...
Has anyone tried this?
I tried to follow it, but I dont know what to do with the boot.img.gz file.
I did everything else but I got an unbootable phone afterwards and was forced to do a wipe.
I'm running JF 1.5 ADP1 image.
Any help is welcome.
THanks
this is potentially dangerous. /cache may be cleared under many occasions, so if a modified init.rc is not used, you may have a loop on boot.
even if you have such init.rc file, it would be painful to boot after /cache is cleared.
the ultimate solution is to use haykuro's new spl.
M0E-lnx said:
Has anyone tried this?
I tried to follow it, but I dont know what to do with the boot.img.gz file.
I did everything else but I got an unbootable phone afterwards and was forced to do a wipe.
I'm running JF 1.5 ADP1 image.
Any help is welcome.
THanks
Click to expand...
Click to collapse
if you do not flash the modified boot.img file then you CANNOT move the stuff to /cache .. each time you boot it is mounted non-executable .. the modified boot.img makes it executable each time you boot .. if dalvik-cache cannot execute then your phone doesn't load
LucidREM said:
if you do not flash the modified boot.img file then you CANNOT move the stuff to /cache .. each time you boot it is mounted non-executable .. the modified boot.img makes it executable each time you boot .. if dalvik-cache cannot execute then your phone doesn't load
Click to expand...
Click to collapse
Is this the boot.img.gz linked in that howto up top?
If so, how do I go about flashing it?
I really need a solution. I do a lot of online radio streaming and my memory runs out quick. I'd really like to keep my jf 1.5 setup as I have become quite confortablle with it
M0E-lnx said:
Is this the boot.img.gz linked in that howto up top?
If so, how do I go about flashing it?
I really need a solution. I do a lot of online radio streaming and my memory runs out quick. I'd really like to keep my jf 1.5 setup as I have become quite confortablle with it
Click to expand...
Click to collapse
that boot.img.gz file is an archive .. extract the boot.img file out of it to the SD card and then it's something like:
flash_image boot /sdcard/boot.img
or something like that in Terminal .. and then just reboot
And is this done in just terminal or do I need to boot the recovery console?
M0E-lnx said:
And is this done in just terminal or do I need to boot the recovery console?
Click to expand...
Click to collapse
i can't even justify that line of questioning
LucidREM said:
i can't even justify that line of questioning
Click to expand...
Click to collapse
That is the most eloquent response of that nature I've ever seen. I wish I could +1 rep you for that
I gave it a shot, keep getting an error " cannont rename 'dalvik-cache': No such file or directory!
Using RA 1.2.3
ROM
prophetz said:
I gave it a shot, keep getting an error " cannont rename 'dalvik-cache': No such file or directory!
Using RA 1.2.3
Click to expand...
Click to collapse
what ROM are you using? if you already have some form of apps2SD running your dalvik-cache may already be moved .. or you may have mistyped something
I would like to copy additional files into the /data/app/ folder with an update.zip file. My script will successfully add to /system/app/ folder but not /data/app/. I've seen code to delete and then add a whole new /data/app/ folder but I would like to keep whatever is in there already, just add and remove specific files in it. This is what I've been using but it fails. Can this be done?
Code:
show_progress 0.200000 0
delete DATA:app/com.facebook.katana.apk
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
diordnahero said:
I would like to copy additional files into the /data/app/ folder with an update.zip file. My script will successfully add to /system/app/ folder but not /data/app/. I've seen code to delete and then add a whole new /data/app/ folder but I would like to keep whatever is in there already, just add and remove specific files in it. This is what I've been using but it fails. Can this be done?
Code:
show_progress 0.200000 0
delete DATA:app/com.facebook.katana.apk
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
Click to expand...
Click to collapse
While not necessarily my forte, do you happen to be running apps2sd? My guess is that the partition on the SD card hasn't mounted yet, and thus, the file(s) can't be accessed to delete.
yes I am.
Though my update script works to write and delete to /system/.. folders just fine. The update-script files I have looked at delete the whole folder first and then create/copy the new one, then correct permissions. I can't find anything specific to delete/adding individual files though.
diordnahero said:
yes I am.
Though my update script works to write and delete to /system/.. folders just fine. The update-script files I have looked at delete the whole folder first and then create/copy the new one, then correct permissions. I can't find anything specific to delete/adding individual files though.
Click to expand...
Click to collapse
The system folder is not part of apps2sd, so that would make sense.
I'm still thinking this is your issue. I'm wondering if there is a way to mount via an update script?
JsChiSurf said:
The system folder is not part of apps2sd, so that would make sense.
I'm still thinking this is your issue. I'm wondering if there is a way to mount via an update script?
Click to expand...
Click to collapse
I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcard when in recovery to do a backup of google ****s.
zippy-man said:
I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcard when in recovery to do a backup of google ****s.
Click to expand...
Click to collapse
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...
JsChiSurf said:
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...
Click to expand...
Click to collapse
yup, I've done that before. Very handy. that'll get the job done
I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcar
Click to expand...
Click to collapse
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...
Click to expand...
Click to collapse
Yep. You just create whatever script you want and add that to the update script and it will run it. I have used it for many things but have not used a script to mount the sd card.
If you get a hold of the script that cm wrote you could pull out the party that mounts the sd card and use that to write to data if it its located on the sd card.
-------------------------------------
Sent from my HTC Hero
Awsome! Great stuff.
I found this but have not tried it yet as there hasn't been need to update anything lately.
having a 750mb for data partition like in my previous post seems interesting for everyone. however, make a 2nd rom isn't easy for everyone. there are some people who can't download a rom, which makes dualboot mod useless for them. well...I want to share the joy of having a bigger data partition, so I modify a kernel to enable 2nd ext3 sdcard partition as data partition. for now on lets call this mod **data-2sd**. the steps is quite easy.
preparation step:
1. download a modified kernel from here
2. rename the file to 'boot.img'.
3. repartition your sdcard. all partition is primary. 1st partition fat32. 2nd partition ext3. adjust the partition size to any size you want.
Click to expand...
Click to collapse
the steps:
1. install the kernel
2. make a blank file named 'bootsdcard' in your root sdcard
3. reboot your device.
notes:
1. this kernel is made based on irfanbagus's kernel. (credits for him)
2. if you already have 2nd partition in your sdcard, please reformat it.
3. don't use link2sd or a2sd.
4. clean you init.d folder (optional)
5. you'll need a fast sdcard for best result. our default sdcard is too slow.
Click to expand...
Click to collapse
well...thanks for irfanbagus who has make a dualboot kernel for us. as I have said, I modify the kernel based on his work. the modified script is not an efficient one. I have to admit that. feel free to edit the kernel if you don't satisfy with my work.
btw, I realize that not everyone want to use sdcard's 2nd partition, especially when their sdcard is slow and they have to wait till they have enough money to buy a faster one. well...you don't have to uninstall this kernel since I've made an option to turn off data-2sd feature simply by delete 'bootsdcard' from your sdcard. now, it will act as stock DXLC stock kernel with init.d support. when you already have a fast sdcard you can turn on data-2sd feature again by make 'bootsdcard' file in your sdcard.
you could find the modified files here
www.mediafire.com/download.php?cc1kg8s7cx27onb
www.mediafire.com/download.php?0xydu66254ic6yz
DISCLAIMER:
do it with your own risk. no need to thanks or press it. I'm just a noob. give that to the original dev instead.
KNOWN ROM INCOMPATIBILITY ISSUE
============================
please read this before install this kernel. these roms are reported to incompatible with this kernel. some user said it work, but some other said it doesn't work in these rom. to minimilize the risk, I'll list all reported incompatibility issue with my kernel.[/b]
Incompatibility list
1. chobits digital v1.8 and v2
2. m.u.r (merruk ultimate rom) v1
please inform me if you got another incompatibility issue with other custom rom[/quote]
ADDITIONAL STUFF
==============
if your rom incompatible with this kernel you may try this guide to increase your /data partition as well. you'll need a kernel with init.d support to use this method. please read carefully before modify your system.
1. go to system/etc/init.d
2. delete all a2sd and link2sd related stuff
3. create a new file named 01data2sd. put this script inside it
Code:
#!/system/bin/sh
unmount /data
mount -t ext3 -o nosuid,nodev /dev/block/mmcblk0p2 /data
4. set the permission to 777 (rwxrwxrwx)
5. open your terminal manager. type these command.
Code:
su
mkdir /data/sd-ext
mount -t ext3 -o nosuid,nodev /dev/block/mmcblk0p2 /data/sd-ext
note: its blk-zero-p-two, not blk-O-p2
6. via root explorer go to /data.
7. copy all stuff in /data into /data/sdext.
8. open terminal manager. type these command.
Code:
umount /data/sd-ext
9. restart your device.
if you got bootloop, via adb, type these command
Code:
adb shell
su
mount -o remount rw /system
chmod 222 /system/etc/init.d/*
exit
exit
adb reboot
KNOWN ISSUE: gps not working.
NOTE: the bug is a lil bit annoying for several person. if you want a BETTER-FASTER-BUGLESS-BATTERY FRIENDLY method to save your internal memory, you can use my akuro tweak.
TERM OF USE AND SHARING:
this thread intent is for sharing. feel free to use, edit, distribute all material inside this thread which came from me. if there any parts of this mod which comes not from me please refer to the original dev I've mentioned in this thread. if want to share it to another forum or modify it you don't have to ask my permission. no need to credits, put links or whatsoever. you'll only need to remember that you should held all the responsibility by using this mod, modify it or distribute it. DO IT WITH YOUR OWN RISK
Click to expand...
Click to collapse
what is the advantage?
sgy's original data partition size is only 190mb. you can get 1gb or bigger data partition for your device by using this mod.
I see. I will try this, does it work on creeds 2.0?
it will work on all rom but will make your a2sd didn't work. please remove all a2sd script in init.d before use this mod.
So this will be my steps?
1. FLash your ROM/CUSTOM ROM
2. Delete the scripts in data/system/init.d via Root Explorer.
3. Make a file name "bootsdcard" in root directory of your sdcard.
Question : What file? .txt? .exe?
4. Flash the Kernel via Odin or other methods.
5. Reboot your device.
So now all my apps are on my SD? or all futured apps are on it?
just a plain file without any extension.
for the second question...this mod will change your data partition to 2nd sdcard ext3 partition. its completely different with a2sd or link2sd since it won't move any installed app in your device. your previous app will remain in your original data partition. when you activate the feature and reboot your phone, it would be like when you turn on the device for the first time.
so it will show 750mb not 190mb?
I will try this tomorrow
bla bla bla
devion14 said:
so it will show 750mb not 190mb?
Click to expand...
Click to collapse
it depends on your partition size. you can make it 750mb, 1gb, or any size you want.
does it support init d tweaksthe kernel is based on what??
---------- Post added at 06:23 PM ---------- Previous post was at 06:22 PM ----------
and what stock rom should i used? what roms have no sd card issues? im using dxlc1..
Sir. I dont have to modified the custom rom with modified updater-script? I just have to flash the kernel and then custom rom with the formated 1st. Fat32 and 2nd. Ext3. ?
Sent from my GT-S5360 using Tapatalk 2
kurotsugi said:
sgy's original data partition size is only 190mb. you can get 1gb or bigger data partition for your device by using this mod.
Click to expand...
Click to collapse
Now I am using DDLC2 official firmware and my 2nd partition (ext3) size is 1.06 GB,
but I am not using any kernal and other thing, I am using pure official ROM and
rooted my mobile thats all. From lot of months I am using this second partition
with Link2sd app.
See this attachment
devion14 said:
does it support init d tweaksthe kernel is based on what??
---------- Post added at 06:23 PM ---------- Previous post was at 06:22 PM ----------
and what stock rom should i used? what roms have no sd card issues? im using dxlc1..
Click to expand...
Click to collapse
it supports init.d script. however, there are some script in init.d which will mount your 2nd partition in different place. its better to remove them before you activate this feature.
it works for both custom and stock rom.
krishna_nirvana said:
Now I am using DDLC2 official firmware and my 2nd partition (ext3) size is 1.06 GB,
but I am not using any kernal and other thing, I am using pure official ROM and
rooted my mobile thats all. From lot of months I am using this second partition
with Link2sd app.
See this attachment
Click to expand...
Click to collapse
thats your choice. however this mod doesn't require any app and you don't have to link your app to to ext partition. when you uninstal link 2sd you'll lose all your app in ext partition.
tandob said:
Sir. I dont have to modified the custom rom with modified updater-script? I just have to flash the kernel and then custom rom with the formated 1st. Fat32 and 2nd. Ext3. ?
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
nope. you don't need to install any rom. but make sure that you have a clean 2nd ext partition.
What is the Base Firmware of This Modified Kernel?
I Hope its DXLC1? Or ?
tandob said:
Click to expand...
Click to collapse
is it for real?
kurotsugi said:
it supports init.d script. however, there are some script in init.d which will mount your 2nd partition in different place. its better to remove them before you activate this feature.
it works for both custom and stock rom.
thats your choice. however this mod doesn't require any app and you don't have to link your app to to ext partition. when you uninstal link 2sd you'll lose all your app in ext partition.
nope. you don't need to install any rom. but make sure that you have a clean 2nd ext partition.
Click to expand...
Click to collapse
ok...ill try...i will use
v6 supercharger only
yup...its based on DXLC kernel. we do only a minor modification in init.rc and /sbin folder.
ok, downloading now..will give this a shot
BTW does increasing internal memory with this increase speed a little bit? coz the more internal memory the faster right?
internal memory space doesn't related to device speed. in fact, it will a little bit slower since ext3 partition is slower than rfs. nevertheless, the differences is not significant. and could only seen in benchmarking test.
Hello,
I'm using a Samsung GT-i9000 phone with limited size yaffs2 partition (mounting point : /datadata). On this speed memory partition are placed apps data files; so whith lots of them we've got a "low memory" warning while the 2Go ext4 /data parition as lots of free space.
I used a script developped in Samsung Vibrant forum to solve this (same problem) : Workaround for small /datadata partition, reported here in XDA : [SCRIPT][CM7/9] /datadata/ low storage notification lagless fix - init.d script.
I modified it to prevent some lag problems (explanation of what I've done in the thread linked) but it doesn't satisfied me as is.
So I'm starting a new developpement script (cleaner way of doing imho) : moving read only static files (ie : lib subdirectory) from /data/data (pointing to /datadata yaffs2 partition) to /data/local/staticdatadata/appdir/lib and making the corresponding softlink from /datadata/appdir/lib.
If script is used when running everything works fine but I've got a problem : when (re-)booting the phone it seems libs are extracted from apk files and copied to /datadata/appdir/lib (while softlink exists so it is erased).
Is someone could explain why (and when) this occurs please ? Is there a way to prevent this ?
PS : I search and read all (I hope) rc scripts and the only thing I found is a script (on /sbin) about encrypted /datadata (and doesn't seem relevant for my problem).
Anyone could help me please ?
An other question : I've seen that /sbin is not the same in recovery than in Android.
I want to modify my /sbin/setupdatadata.sh (the one used in booting process) but when editing it in recovery changes are removed at boot.
In Android it's a RO access (unless I'm root). I could remount it in RW but I think this file comes from "somewhere else" so I prefer modify it ...
Where could I found it please ?
EDIT : find -name "setupdatadata" doesn't help ...
Wendigogo said:
Anyone could help me please ?
Click to expand...
Click to collapse
+1000
Which part of boot procedure extract and copy apk's lib in /datadata (think there's a test or something like that somewhere) ?
Wendigogo said:
In Android it's a RO access (unless I'm root). I could remount it in RW but I think this file comes from "somewhere else" so I prefer modify it ...
Where could I found it please ?
Click to expand...
Click to collapse
I was right; it's part of initrd so I have to compile my own kernel for that ... not a versatile solution.
If not in good section, thanks to point it.
Hi,
i thougt the n1 and the desire would have exactly the same hardware and tried to install this: http://forums.miui.us/showthread.php?15234-ROM-6-1-12-MIUI-us-4-0-4-2-6-1-Ice-Cream-Sandwiched
i have changed the installer script to make it install on desire and changed the build.prop settings from n1 to bravo
after installing it wont boot, why?
what i made wrong, havent they the same hardware and the same drivers?
metin
Did you replace boot.img?
Otherwise this is not the right place for these questions
Tapatalking
-Replace boot.img(also there are some files from modules that need to be replaced---so replace them all)-
-Change ro.product.board from mahimahi to bravo from build prop-
-Replace key charts and key layouts-
-libhtc_ril.so and libhtc_acoustic.so from libs(best is to use from stock original rom)-
Maybe i forgot something...
Please move
sry for the wrong section: PLEASE MOVE
thank you ill try it
boot animation comes up but logcat show somethings like "cannot create dir '/data/data/*pkgs of apps*'': Read-Only system", but it created dalvik cache for the framework and a few folders,
what to do next?
MetinKale38 said:
boot animation comes up but logcat show somethings like "cannot create dir '/data/data/*pkgs of apps*'': Read-Only system", but it created dalvik cache for the framework and a few folders,
what to do next?
Click to expand...
Click to collapse
Code:
mount -o remount rw data
I think.
Sent from my HTC Desire using xda app-developers app
Can someone please give me a instruction of porting a Rom to Desire? (a link maybe)
alipashang77 said:
Can someone please give me a instruction of porting a Rom to Desire? (a link maybe)
Click to expand...
Click to collapse
Try adapting this guide:
http://forum.xda-developers.com/showthread.php?t=1736086
Sent from my GT-P7300 using xda app-developers app
Yes i have tried to mount it with adb shell but it gets mounted again as ro
If tried to moint it again and again and it booted