Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Proz0r
Old
(Last edited by Proz0r; 20th March 2012 at 01:49 AM.)
#1  
Proz0r's Avatar
Senior Member - OP
Thanks Meter 235
Posts: 277
Join Date: Oct 2010
Location: Zagreb
Default [MOD] D2P - free some space on /data, for most ICS ROMs

This is an init.d script inspired by bodhisattva99's work that can be found here:
http://forum.xda-developers.com/show....php?t=1526827
Props to him for the idea.
This script does the same as his, but my zip does not flash a new zImage (the partition can be mounted anywhere with one single command, thanks, Chainfire!).
I do not own an SGS2, so this is untested by me personally, but it was tested by AColwill on A LOT of ROMs and he noticed seemingly better boot times than with the original script. However, he discovered that this also doesn't work on GB and earlier ICS builds. If you do happen to flash it on an unsupported build, the script should simply print out that your ROM isn't supported to /data/d2p.log, exit, and let the boot process continue.


What does it do?

Basically, what it does is it puts Dalvik cache on /preload (which is about 500 MB in size and otherwise totally unused), freeing up space on /data for even more apps.
It will not wipe any of your data, it will just put Dalvik cache on /preload. First boot will take a while since Dalvik cache needs to rebuild, afterwards, it should work like a charm, leaving you with a few hundreds of megabytes more on /data.


Requirements:
- A recovery image
- A rooted ROM


CWM update.zip:

Download link


Huge thanks to:
AColwill - testing, testing, testing and some more testing
Ante0 - providing proper hosting for the zip
brabo, GShellz admin - the bash wizard
Chainfire - providing me with the preload parition ID
mattgirv (from #villainrom, Freenode) - compiling bash for me, help with cross-compiling
sircrazy, GShellz admin - help with cross-compiling


Disclamer: I'm not responsible if something goes wrong and wreaks havoc upon you, your phone, your card, any part of your phone, your friends, your family, your close or distant relatives and/or your pet, but I will gladly provide assistance if it does.
Device: Samsung Galaxy S III (GT-I9300)
The Following 4 Users Say Thank You to Proz0r For This Useful Post: [ Click to Expand ]
 
acolwill
Old
#2  
acolwill's Avatar
Senior Member
Thanks Meter 59
Posts: 240
Join Date: Dec 2008
Location: In your bank, sharding your purplz
Got some fail:

Code:
I/run-parts( 1667): /system/etc/init.d/99dalvik2preload: line 13: syntax error: unexpected word (expecting ")")

I/run-parts( 1667): run-parts: /system/etc/init.d/99dalvik2preload exited with code 2

I/logwrapper( 1667): /system/xbin/run-parts terminated by exit(1)
Get 500mb extra Dropbox space! Sign up here...

Phone History: Various Nokia's -> HTC Touch Diamond -> HTC Hero -> HTC Desire -> ZTE Blade -> Samsung Galaxy SII
Tablet History: Samsung Galaxy Tab GT-P1000 -> Samsung Galaxy Tab GT-P6200



 
Proz0r
Old
#3  
Proz0r's Avatar
Senior Member - OP
Thanks Meter 235
Posts: 277
Join Date: Oct 2010
Location: Zagreb
Sorry about that, should be fixed now. Try it now, should work like a charm!
Device: Samsung Galaxy S III (GT-I9300)
 
Phat7
Old
#4  
Phat7's Avatar
Senior Member
Thanks Meter 59
Posts: 229
Join Date: Oct 2007
This is great! A few questions though, a small FAQ could be useful in the first post.

1. Is this reversible?
2. Will it wipe any data?
3. Will the Wipe Dalvik command work in CWM?
4. What happens when the Dalvik becomes full?

Thanks for the mod and for replies in advance!
 
blizzari
Old
#5  
Senior Member
Thanks Meter 11
Posts: 168
Join Date: May 2011
Location: Lohja
And the link is where??? i only see download link [fixed] but cant press it
 
xzyk
Old
(Last edited by xzyk; 4th March 2012 at 08:21 PM.)
#6  
xzyk's Avatar
Senior Member
Thanks Meter 25
Posts: 121
Join Date: Sep 2006
Quote:
Originally Posted by blizzari View Post
And the link is where??? i only see download link [fixed] but cant press it
well the link he credits (http://forum.xda-developers.com/show....php?t=1526827) at the end of page2 does have a valid link to his script (called dalvik2preload_proz0rmod-signed.zip) now I'm not sure the OP link is down because it is borken or because the script is being worked on and he'll make the link active again once work is completed.

---------- Post added at 08:01 PM ---------- Previous post was at 07:59 PM ----------

Quote:
Originally Posted by Phat7 View Post
This is great! A few questions though, a small FAQ could be useful in the first post.

1. Is this reversible?
2. Will it wipe any data?
3. Will the Wipe Dalvik command work in CWM?
4. What happens when the Dalvik becomes full?

Thanks for the mod and for replies in advance!
just have a quick read at the link the OP credits ( http://forum.xda-developers.com/show....php?t=1526827 ) and all your questions will be answered.
Nexus N4....SlimBean-Mako
SGS2. Leaked LSJ
AdventVega...VegaComb 3.2
ZTE Blade......BladeMix 2.3.4
ZTE Blade II...Sebastian404 r1
Arnova 7G3....Stock.
HTC WFS.......Stock.
Asus FonePad..Stock
The Following User Says Thank You to xzyk For This Useful Post: [ Click to Expand ]
 
acolwill
Old
#7  
acolwill's Avatar
Senior Member
Thanks Meter 59
Posts: 240
Join Date: Dec 2008
Location: In your bank, sharding your purplz
Due to an issue with ASH and some retarded builds of busybox from some devs, Davor (Proz0r) has had to pull the release as it wasn't doing what it was supposed to do.

Currently, the 1.19.4 busybox which is included with the CM9 firmwares AND the one downloaded by jrummy's busybox installer (same build) is missing some core functionality required to get the script working :|

I'll be working with Davor over the next few days (hopefully) to get this fixed and released.
Get 500mb extra Dropbox space! Sign up here...

Phone History: Various Nokia's -> HTC Touch Diamond -> HTC Hero -> HTC Desire -> ZTE Blade -> Samsung Galaxy SII
Tablet History: Samsung Galaxy Tab GT-P1000 -> Samsung Galaxy Tab GT-P6200



The Following User Says Thank You to acolwill For This Useful Post: [ Click to Expand ]
 
Proz0r
Old
#8  
Proz0r's Avatar
Senior Member - OP
Thanks Meter 235
Posts: 277
Join Date: Oct 2010
Location: Zagreb
Exactly, thanks AColwill for the explanation as I was too busy with school at that time. I will get on it soon and deal with the Busybox issues.
Device: Samsung Galaxy S III (GT-I9300)
 
Proz0r
Old
#9  
Proz0r's Avatar
Senior Member - OP
Thanks Meter 235
Posts: 277
Join Date: Oct 2010
Location: Zagreb
Script works like a charm now, no need for Busybox. All tools required for the script to run are included, all you need is a rooted SGS2 with a recovery image and you're all set!
Device: Samsung Galaxy S III (GT-I9300)
 
II_DiE_4
Old
#10  
Senior Member
Thanks Meter 38
Posts: 166
Join Date: Dec 2007
Location: Budapest
Just flash it or we need to wipe something too?

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...