[NewMethod][MOD][PATCH]CM5.0.7/8 AnySPL (NoneDanger) [2010-06-23] - G1 Android Development

OK , quick post
Firstly, this is not my work...
Full credit to Cyanogen & Co, please see CM5.0.7 OP for the full credits, and Donation links.
And no I do not have a donate link myself, yes I could make one but I'm not about to. Honestly my changes are minimal.
I would also like to credit Speedysilwady for his [HOW-TO] Make ANY ROM fit on Stock/Any SPL thread, and lbcoder for inspiring him to create that thread.
What is it?
This is simply CM5.0.8 patched to flash on a None Danger SPL G1
HardSPL -VER: HSPL 10.95.3000
Engineering SPL - VER: HBOOT- 0.95.3000
Original SPL - VER: HBOOT- 0.95.0000
BUT, my goal was to keep it compatible with Danger and MT3G ( which I have done )
Why?
because I use NoneDangerSPL. Personally I believe its better for Huge bloated Sense ROMs ( via cachehack )
Some don't wish to flash Danger for fear of bricking.
Danger SPL will also complicate things for QWERTZ keyboard users, where they have to manually 'patch' the keyboard files to get proper support for QWERTZ
I don't have anything to back this up as yet, but since I don't have any USB mount/ADB issues, and have not been able to replicate them I believe DangerSPL might be a factor ( but as yet I don't understand why ), _but_ as I said I have nothing to back this theory up with
######################################################################
Quick instructions
Nand + ext backup
Wipe <-- that is up to you, if you don't and it goes all screwy... wipe everything
flash FR-CM-5.0.8-DS-AnySPL_S.zip
assuming you want/need google addon flash Google Addon: ERE36B from CM5.0.8 OP
Magic 32A/EBI1 users should flash the kernel update in CM5.0.8 OP
######################################################################
Experimental
Credit for this goes to Lbcoder and his excellent Custom partition layouts, ZERO brick risk! thread
I have posted full instructions here http://forum.xda-developers.com/showthread.php?p=6916491#post6916491
no sense in me just repeating it
go check it out
NB, it is experimental, but I've had it working well for a day or two now
######################################################################
notes,
Clockwork Recovery / ROM Manager
never used this myself, but from posts in the CM forum it seems most people with flashing problems were using that, personally I use RA 1.7.0​
flashing RA 1.7.0 ( or any recovery )
*do not*, I repeat *do not* flash recovery ( or boot ) via CM5.0.7 ( flash_image or ROM Manager ), use fastboot or recovery.​
is RA 1.7.0 needed?
Nope,
far too many people think RA <= 1.6.2 is incompatible with CM5. The fact is CM5 is incompatible.
But I have the install script create the legacy sd mount point ( /system/sd ) which makes CM5 compatible with RA <= 1.6.2... so you don't need to worry about it, just laugh at anyone that tells you that you *must* update to 1.7.0​
SWAP
ahh swap, I like swap *but* in CM5 it behaves very different to what we all knew and loved.. don't keep posting about it... maybe one day I will look at the kernel and try and revert it, but I fear we would lose the 'good stuff'​
A2SD
A2SD changed in CM5, its not on by default turn it on via Settings --> Applications​What is different in AnySPL and Stock CM5.0.8?
short answer, the least I could get away with
Better answer,
two 'bug' fixes common to all SPL's ( Danger, mt3g and all of the NoneDanger SPLs ) + a 'make it fit' thing...
/system/sd mount point ( for older recovery images )
fix_permissions script ( the stock CM5.0.8 is still checking /system/sd I 'patched' it to check /sd-ext )
/system/xbin is a sqf ( squash fs, had to do this to make it all fit NoneDanger, basically tests1->7 had an xbin.sqf, no idea why final doesn't )
kernel modules now squashfs ( 5.0.8 Final )
None Danger SPL
as well as the above
redirect /system/media/bootanimation.zip to /data/local/
redirect all google apps from /system/app/ to /data/gapps/
bind mount /cache/dalvik-cache to /data/dalvik-cache*
* since we have a large cache partition on NoneDanger SPL it makes sense to do this
NB This is Not CacheHack, CacheHack involves mounting the /cache partition somewhere in the system folder, like it was system. It is not worth doing this with CM5 ( for one the space one cache is more useful for dalvik-cache )
Going further..
I have an 'all in one' patch which can be used to 'enhance' CM5 a little, just a couple of workarounds for Live Wallpapers and the Market Version of Facebook
Posts to this thread
Please try to keep the posts in this thread relevant to its target, i.e. NoneDanger SPLs
General CM5 comments should go to CM5.0.7/8 OP
However, I am particularly interested in knowing if anyone has any loss of USB connectivity which requires a reboot to resolve. That seems to be a common problem with CM5, yet I have not experienced it and I wonder if it has anything to do with me not using Danger SPL
Oh, swap.. don't clutter up CM5.0.7/8 thread with swap questions, instead have your say here
Lastly, enjoy, this is a great ROM, all thanks to Cyanogen & Co
Historic Links
FR-CM-5.0.8-DS-test1-AnySPL_S.zip
FR-CM-5.0.7-DS-AnySPL_S.zip
FR-CM5test4-4AnySPL_S.zip
FR-CM5test5-4AnySPL_S.zip
FR-CM5test6-4AnySPL_S.zip
FR-CM5test7-4AnySPL_S.zip

How I made CM5 NoneDanger Flashable
Its quite simple really, I get the updater-script to run a script which figures out if the phone is NoneDanger, then makes so symlinks to redirect the google apps/bootanimation.zip
I inserted the bold into the updater script
Code:
show_progress(0.200000, 10);
ui_print("Installing system...");
format("MTD", "system");
[B]ui_print("Check for NoneDangerSPL...");
package_extract_file("InstallPrep.sh", "/tmp/InstallPrep.sh");
set_perm(0, 0, 0777, "/tmp/InstallPrep.sh");
run_program("/tmp/InstallPrep.sh");
ui_print("Check for NoneDangerSPL complete");[/B]
mount("MTD", "system", "/system");
show_progress(0.500000, 40);
and this is the script which runs
( I'll come back and add some comments to it.. maybe )
InstallPrep.sh
Code:
#!/sbin/sh
gogogo ()
{
mount /cache
Block4=`df |grep block4|awk '$0 { print $2 }'|head -n1`
if [ `expr $Block4 \/ 1024` -lt "67" ];
then
Danger
elif [ `expr $Block4 \/ 1024` -gt "67" ];
then
MT3G
else
NoneDanger
fi
}
PrepBase ()
{
mount /system
if [ ! -d /system/sd ];
then
mkdir /system/sd
fi
mount -a
return
}
banner ()
{
if [ ! -d /system/etc/init.d ];
then
install -d /system/etc/init.d
fi
cat > /system/etc/init.d/00ndbanner << "EOF"
#!/system/bin/sh
#
# indicate tainted
L="log -p i -t cm"
$L "
) (
( /( )\ )
)\()) ( (()/( ) ( ( ( (
((_)\ ( ( ))\ /(_)) ( /( ( )\))( ))\ )(
_((_) )\ )\ ) /((_|_))_ )(_)) )\ )((_))\ /((_|()\
| \| |((_)_(_/((_)) | \((_)_ _(_/( (()(_|_)) ((_)
| .\` / _ \ ' \)) -_) | |) / _\` | ' \)) _\` |/ -_)| '_|
|_|\_\___/_||_|\___| |___/\__,_|_||_|\__, |\___||_|
|___/"
EOF
chmod 700 /system/etc/init.d/00ndbanner
return
}
Danger ()
{
PrepBase
echo "no action required"
return
}
MT3G ()
{
PrepBase
echo "no action required"
return
}
NoneDanger ()
{
PrepBase
install -d /data/local
install -d /system/media
for i in bootanimation.zip;do
ln -s /data/local/$i /system/media/$i
done
mkdir /data/gapps
install -d /system/app
for i in BugReport.apk EnhancedGoogleSearchProvider.apk GenieWidget.apk Gmail.apk GmailProvider.apk GoogleApps.apk GoogleBackupTransport.apk GoogleCheckin.apk GoogleContactsSyncAdapter.apk GooglePartnerSetup.apk GoogleSettingsProvider.apk GoogleSubscribedFeedsProvider.apk gtalkservice.apk LatinImeTutorial.apk Maps.apk MarketUpdater.apk MediaUploader.apk NetworkLocation.apk PassionQuickOffice.apk SetupWizard.apk Street.apk Talk.apk TalkProvider.apk Vending.apk VoiceSearch.apk YouTube.apk Gallery.apk;do
ln -s /data/gapps/$i /system/app/$i
done
cat > /dev/10bind-dc << "EOF"
#!/system/bin/sh
if [ -e /cache/dalvik-cache ] && [ ! -d /cache/dalvik-cache ];
then
rm /cache/dalvik-cache
fi
if [ ! -d /cache/dalvik-cache ];
then
install -m 771 -o 1000 -g 1000 -d /cache/dalvik-cache
fi
rm /data/dalvik-cache/*
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
EOF
install -m 700 -D /dev/10bind-dc /system/etc/init.d/10bind-dc
banner
return
}
# ok, lets start
gogogo
exit 0

this is for, I don't know , maybe more stuff I guess

Firerat, any plans to do your thing to other CM5 based roms like Superbad or Super E like you did with the original and Cannon's?

FatBoyExtraordinaire said:
Firerat, any plans to do your thing to other CM5 based roms like Superbad or Super E like you did with the original and Cannon's?
Click to expand...
Click to collapse
nope, I have no plans to install every themed CM5 ROM
but
Post #2 has everything that is required to make an AnySPL version
the InstallPrep.sh script may need a little bit of tweaking if much has been added to /system

CM5.0.8 test 1 added

Firerat said:
nope, I have no plans to install every themed CM5 ROM
but
Post #2 has everything that is required to make an AnySPL version
the InstallPrep.sh script may need a little bit of tweaking if much has been added to /system
Click to expand...
Click to collapse
Nor did I expect you to, before long there will be about 15 different offshoots of CM. I just wanted to know if I should be adding this thread to my other XDA bookmarks just in case you decided to do any updates or test out other roms. Appreciations.
Firerat said:
CM5.0.8 test 1 added
Click to expand...
Click to collapse
And that's why I bookmarked the thread! Thank you so very kindly.

FC (in g1), sounds are audible in the front speaker (low sound) , in experimental 5.0.8 and FR-CM-5.0.7-DS-AnySPL_S.
This may be the cause?

I registered to post this here.
Flashed the rom, lovin it.
Running FR-CM-5.0.7-DS-AnySPL
I'm having the same as elfasito.
Sound comes from front earpiece speaker, rear speaker does not work
elfasito said:
FC (in g1), sounds are audible in the front speaker (low sound) , in experimental 5.0.8 and FR-CM-5.0.7-DS-AnySPL_S.
This may be the cause?
Click to expand...
Click to collapse
I can confirm that audio is messed up on FR-CM5test6-4AnySPL_S.zip as well.
This isn't really a dealbreaker, but it certainly is annoying. If you could fix this, I will donate to either you or Cyanogen, your choice Dev.

Firerat said:
Posts to this thread
Please try to keep the posts in this thread relevant to its target, i.e. NoneDanger SPLs
General CM5 comments should go to CM5.0.7 OP
However, I am particularly interested in knowing if anyone has any loss of USB connectivity which requires a reboot to resolve. That seems to be a common problem with CM5, yet I have not experienced it and I wonder if it has anything to do with me not using Danger SPL
Oh, swap.. don't clutter up CM5.0.7 thread with swap questions, instead have your say here
Click to expand...
Click to collapse
elfasito said:
FC (in g1), sounds are audible in the front speaker (low sound) , in experimental 5.0.8 and FR-CM-5.0.7-DS-AnySPL_S.
This may be the cause?
Click to expand...
Click to collapse
can teh man said:
I registered to post this here.
Flashed the rom, lovin it.
Running FR-CM-5.0.7-DS-AnySPL
I'm having the same as elfasito.
Sound comes from front earpiece speaker, rear speaker does not work
Click to expand...
Click to collapse
has nothing to do with the redirection of bootanimation.zip or the google apps

Firerat said:
has nothing to do with the redirection of bootanimation.zip or the google apps
Click to expand...
Click to collapse
In this case, where the problem might reside speaker?.
FC apparently occurs only in these edited versions.
or at least reading the threads of the original rom cyanogeno, no one has the same problem.
anyway good job Firerats, you gave me eclair without risk of losing my g1 in the process , I hope the problem will be resolved soon

I can testify that speaker phone does not work either.

Awesome Firerat!
You my friend have allowed me to try 2.1 on my phone. kudos. but i to am experiencing the usb connectivity problem. happened when I attempted to tether via usb...

sllim-kun said:
You my friend have allowed me to try 2.1 on my phone. kudos. but i to am experiencing the usb connectivity problem. happened when I attempted to tether via usb...
Click to expand...
Click to collapse
this is a general CM5 issue,
it seems to happen after using a wall charger, don't use a wall charger
CM5.0.8 test1's Kernel is suppose to resolve it, I have noticed heavy battery drain with 508test1, but turning wifi off does seem to help

elfasito said:
In this case, where the problem might reside speaker?.
FC apparently occurs only in these edited versions.
or at least reading the threads of the original rom cyanogeno, no one has the same problem.
anyway good job Firerats, you gave me eclair without risk of losing my g1 in the process , I hope the problem will be resolved soon
Click to expand...
Click to collapse
tell you what,
you tell me how the fact that google apps are on data and not system causes your problem and I will have a good hard look at resolving it

Firerat said:
tell you what,
you tell me how the fact that google apps are on data and not system causes your problem and I will have a good hard look at resolving it
Click to expand...
Click to collapse
thank you Firerat for all your contributions! I've been wanting to try CM508 T1! I have not been experiencing any of the issues mentioned so far. This is so smooth! Thanks again

Battery drain issue
I upgraded my G1 from Android 1.6 to CM 5.0.7 . Even though I run the same apk as Android 1.6, CM 5.0.7 drain my battery from 100% to 0% in about 10hr (wifi off).
Anyone else notice this issue as well?
I found in cyanogenmod forum that others are reporting the same issue but there is no mention on this thread....
(CyanogenMod Forum > Stable MOD > HTC Dream / HTC Magic -> Severe Battery Drain with CM5 )
I am still trying to figure out how to fix this, otherwise, I have no choice but to go back to Android 1.6.
Btw, CM 5.0.7 runs slower than the official ADP1 derived Android1.6 rom, espeically when returning to the homescreen, takes forever to load.

ericwong said:
I found in cyanogenmod forum that others are reporting the same issue but there is no mention on this thread...
Click to expand...
Click to collapse
Firerat has made this thread for all of us without the want/desire to go the DangerSPL route to be able to experience CM5. It's the same exact rom, just reconfigured to work on any spl, so that's why you see no (or shouldn't see many) mentions of issues with the rom here. It's best to check the official CM5 thread because others in that thread may be able to help with similar issues and this thread is more for Firerat keeping us up to date with his AnySPL versions. Hope that helps a little.

Minor note:
These patches work just fine for 508T3 still, no modification required.
Easiest way to patch is to just copy FR's InstallPrep.sh and update-script from the 508T1 package into CM's 508T3 package and re-sign.

lbcoder said:
Minor note:
These patches work just fine for 508T3 still, no modification required.
Easiest way to patch is to just copy FR's InstallPrep.sh and update-script from the 508T1 package into CM's 508T3 package and re-sign.
Click to expand...
Click to collapse
I made my own as well.. it installed, so I think it was correct.. I saw the messages about checking for NoneDanger, altho that was all I noticed, so I believe that confirms I got the modified updater-script to run.
But I seem to have an issue with gapps... posted in the CM5 thread.. any help appreciated. http://forum.xda-developers.com/showpost.php?p=6739940&postcount=1171
I'm not convinced I got Installprep to run correctly... when I look in /data/gapps, I don't see links.. (using ls -al, unless they are displayed differently than in every unix I've used)
perhaps if my wipe was not complete.. and the apks were still there, then the linking would fail... and thus the problem I'm seeing?
The 00ndbanner does exist in /system/etc/init.d, so that suggests InstallPrep did run, and we're back to some issue with my wipes. I will rewipe and try again.
EDIT:
Wipe <-- that is up to you, if you don't and it goes all screwy... wipe everything
Click to expand...
Click to collapse
that was it.. all seems good after factory reset wipe and reinstall.

Related

[MOD][RECOVERY] Custom MTD Partitions (resize Data,System and Cache ) [ 2010-10-29 ]

Custom MTD Partitions
This is an implimentaion of lbcoder's Custom partition layouts
be sure to checkout that thread for the full history
What does it do?
Well, basically Custom MTD Partitions resizes your MTD partitions
for instance this is a CM6.1RC1, ( heavily customised )
Code:
Filesystem Size Used Available Use% Mounted on
/dev/block/mtdblock3 73.0M 72.8M 236.0K 100% /system
/dev/block/mtdblock5 134.8M 107.2M 27.6M 80% /data
/dev/block/loop0 896.0K 896.0K 0 100% /system/lib/modules
/dev/block/loop1 4.0M 4.0M 0 100% /system/xbin
/dev/block/mmcblk0p2 457.4M 201.8M 231.1M 47% /sd-ext
/dev/block/mmcblk0p2 457.4M 201.8M 231.1M 47% /cache
/dev/block/mtdblock4 2.0M 776.0K 1.2M 38% /dev/cache
most of my Apps are on sd-ext, dalvik-cache is on data
/dev/cache is where the real cache partition is mounted, /cache is actually a bind mount from /sd-ext/cache
Applicable to..
Probably any device that uses the same kind of nand as the G1 MT3G ( msm_nand )
The intial scripts are geared towards G1 / MT3G. however I have 'rewritten' much of the script for v1.5 , it now reads the partition table in dmesg, so it _should_ be universal **
v1.5.3 confirmed to work on heroc
v1.5.6 confirmed to work on bravo + bravoc ( with S-OFF )
unsure if it will work with your device? checkout the source on github ( or ask your favourite dev to take a look )
The 'Tech' in Breif
This method is beautifully simple...
When booting we give the kernel the mtd partition table we want to use..
Thats it
In practice we need to do this when booting to recovery, and booting the rom.
below are files to make this as simple flashing a rom.
Credits :-
Lbcoder - for coming up with the idea
Skraw ( CM forums ) - for getting lbcoder interested
Koush - for AnyKernel
Cyanogen & Co - for giving us all such great ROMs to play with
Amon_RA and Koush - for giving us something to patch
Techjosh - for fixing the patchers for use with Rogers (EBi1)
Mblaster - for pointing out my nasty habit of using -r zip flag at the end of command ( breaks compatibility with older zip versions, fixed in AutoPatcher v1.5 )
Safety First
This method is safe, however it is not without risk
Two things could potentially go wrong
Recovery flash corrupt
This is extremely unlikely, and tbh could happen anytime you flash recovery
If in the very unlikely event that you find you can't reboot to recovery you have three options
re-flash recovery via fastboot ( the preferred option )
re-flash recovery via ROM ( not a great option with cm5.0.x/cm6 )
Do the whole root thing all over again ( no one wants to do that )
system, cache , data partition unmountable - corrupt
Under the right ( or wrong ) circumstances it is possible to get 'junk' files stuck in system ( or cache,data ), and in such away that recovery can not delete them, more serious corruption can render the partitions unmountable.
It is actually quite straight forward to fix this, but it does require fastboot
Code:
fastboot erase system -w
Clockwork Recovery 2.0.2.0 and later has erase_image binary, if you can adb shell in then
Code:
for i in system cache userdata;do erase_image $i;done
and reboot
I would advise you seek out how to 'fastboot', which tbh is a good thing to have regardless of using this 'hack' as it can get you out of so much trouble
*NB* don't use a patched recovery to flash SPL or RADIO ( you should avoid using recovery to flash these anyway, feel free to ask for current advice on spl / radio flashing )
Prevention is better than cure
I have only managed to corrupt partitions when switching partition layouts while having files on cache or data, for example going from System 67.5 Cache 67.5 to System 90 cache 5 with
cache approx 80% 'used'...
I have not been able to repeat this if I wipe Cache before rebooting,
therefore I advise that you wipe both cache and data * after patching recovery ( and rebooting )
* along with system if you are using clockwork
OK, now lets patch recovery and a ROM
Install Instuctions
It really is quite simple
download FR-recovery-v1.5.6-CustomMTD_S.zip and FR-boot-v1.5.6-CustomMTD_S.zip
create mtdpartmap.txt and put on /sdcard/ see configuration *
reboot to recovery
nandbackup
wipe cache + data
flash FR-recovery-v1.5.6-CustomMTD_S.zip
reboot to recovery ( reboot and hold Home )
Either : -
Nandrestore
Flash ROM + extras
flash FR-boot-v1.5.6-CustomMTD_S.zip
reboot
* configuration
The script in the recovery patcher checks for /sdcard/mtdpartmap.txt and reads that to override the default sizes.
e.g. for system 90mb and cache 2mb
NB make sure you mount sdcard first, else you won't write to sdcard/mtdpartmap.txt !
Code:
echo "mtd 90 2" > /sdcard/mtdpartmap.txt
data would be 117.8mb ( 116.7 useable )
e.g. for system 55mb and cache 2mb ( Purhaps a nice 'sugar free' Donut )
Code:
echo "mtd 55 2" > /sdcard/mtdpartmap.txt
data would be 152.8mb ( 151.7 useable )
NB, above data sizes are for G1s, MT3Gs should add ~78mb
All In One Patch runner ( New to v1.5.3 )
new option to run the All In One Patch script ( versions 1.3.6 and higher )
the format is
Code:
aio <option1> <option2> <option3>...
e.g.
Code:
aio swap remount shabang lwp
By default it will install the sd-ext mount ( option sdext )
so a line just reading aio will be fine
Note: the patch must be on the root of the sdcard, and its file name must start with "fr-patch" and end with ".txt"
if you have several versions the newest ( as per files datetime stamp ) will be used
Faking your SPL
If your using an SPL that is not officially supported by your ROM and that ROM checks your SPL you can 'patch' to fake it.
Code:
echo "spl 1.33.2005" >> /sdcard/mtdpartmap.txt
note that we are using ">>" here, this is to append to the file ( ">" would overwrite it )
you can by all means use any text editor you like, the script will automatically convert to unix format
NOTE : you are dodging the checks the ROM dev put in place, do not complain to them if this doesn't workout for you
in post 2 I have some 'CM6' Kernels I compiled for (1)0.95.xxxx SPLs
but I will only likely do these for RCs and Finals ( and there maybe a delay ).
In that post I point you towards the 'SafeSPL' ( 1.33.2003 ) this SPL is compatible with the current CM6 kernels ( so no need to wait for me or someone else to compile with bluetooth as modules ), but 1.33.2003 is not 'officially' supported ( its stock at 67.5mb system ) so you need to Fake your SPL ( say 1.33.2005 ) and resize to 90mb system ( or whatever you feel is optimum )
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
Downloads
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
http://tinyurl.com/customMTD
aab0fadf658ed275954aea8d0aed9c8f FR-AutoMTD_partitionPatcher_v1.5.6.tar.bz2
8857194cdbe34a52d173def4441ad2ae FR-AutoMTD_partitionPatcher_v1.5.6.zip
1f84a5ec50684a7830a93a8d455bc159 FR-boot-rpp-v1.5.6-CustomMTD_S.zip
bca0360f91aed0acf6e2dc82dfe01b56 FR-boot-v1.5.6-CustomMTD_S.zip
94b4238c2668cbe7cd52fb8ad5a2ee12 FR-recovery-v1.5.6-CustomMTD_S.zip
5404f1a41dbc60105d59c7fa0c335a70 FR-remove-v1.5.6-CustomMTD_S.zip
NB New Config option !!! to automatically run fr-patch136+
e.g.
Code:
mtd 90 2
spl 1.33.2005
aio swap remount shabang lwp a2sd
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
ROM Zip Patcher for Devs
To make life even simpler for end users it is possible to integrate the 'patch' within a ROM
AutoMTD_partitionPatcher_v1.5.6.zip
currently Linux only,
within the zip is a tarball, untar that.
get that directory into your PATH, ( or just cd into it )
and then execute
Code:
PatchUpdateScript.sh <zip file to patch>
it will then
create a temp directory ( in your current directory )
copy your zip to it
extract required files
patch update(r)-script
zip and sign.
It simply saves the user from flashing the boot patch after flashing your ROM
The Future....
lbcoder has already suggested ways in which we can implement this 'on the fly'
so for instance it would be possible for a ROM , to instruct recovery what MTD partition layout is required, reload mtd kernel modules, and then flash ROM + boot.img
for those with huge partitions
Hey, you could go all silly and dual boot between ROMs ..
Anyway, enjoy and feel free to modify/improve on these
Changelog
v1-5-6 : 2010-10-28
Calculate userdata size, greatly improves compatibility
Added a version to patch a boot.img ( boot-rpp ) with run-parts
didn't want to , but some are using roms which don't have run-parts, so the 06BindCache script wasn't running
Added a remove version ( remove )
flashing this will return the recovery to SPL's layout
I may well integrate that better, so you don't need a separate zip
AutoMTD_partitionPatcher can convert a recovery.img to a AutoMTD flashable zip
PatchUpdateScript.sh <full path to>/recovery.img
boot patcher is much cleaner, it just uses the cmdline of the running recovery
removed the default 90 2 sizing, you *must* set your own size in mtdpartmap.txt
v1-5-4/5
added stuff
removed stuff
moved stuff
see v1-5-6
v1-5-3 : 2010-08-13
This should be last version we need
greater compatibility with none dreams/sapphires
option to launch All in One Patcher
v1-5-2 : 2010-08-0
Bug fixes
recovery was getting written to boot ( flash_image <partition> is now a variable )
typo in env variable was causing cache and data calculations to fail
AutoMTD now prints version number ( when flashing patched Zip )
tided up system "0x" 'fudge' ( to be compatible with trout/sapphire fall back )
removes temp files from memory when done
v1-5-1 : 2010-08-06
Bug fixes, had an extra '0x' on the system start + functions had wrong env var for the location of dmesg derived partition map
v1-5 : 2010-08-06
Version numbers brought into sync
Zipe Filename - 'reordered' ( easier to see version numbers in CWR )
AutoMTD Patcher - changes as per boot Patcher + zip recursion fix ( my bad habit, thanks go to mblaster for pointing this out )
Boot Patcher - cleaned up cache bind mount
Now supports leagcy /system/sd mount point
[*]supports ROM Manager ( real cache partition mounted on /dev/cache, recovery dir symlinked from 'fake' to 'real' cache )
Recovery Patcher - can 'fake' your SPL ( see configuration )
Recovery Patcher - creates more noise ( advise wipe and reboot )
Single Patcher script ( so I don't have make the same changes to three different files that essentially do the same job )
No longer 'Hardcoded' to 32[a/b] Partition Layout ( figures out SPL layout via dmesg ) **
uses original boot/recovery img's base configuration ( i.e. EBi0 and EBi1 compatible )
=< v1.4
Recovery Patcher v1.3, added SPL faker
Boot Patcher v1.2, fixed oversite where boot.img was not 'dumped'
Recovery Patcher v1.1 initial
Boot Patcher v1.1 ( was a fail, it didn't patch boot.img on CM roms as the tmp boot.img was deleted, my fault for just using the AutoMTD Patcher's script ( which runs before the tmp boot.img is deleted )
Boot Patcher v1 initial
Todo
- 2010-08-13 redundent ( launching AIO script ) - I might add some stuff to cm5/6's backup routine via the Auto patcher, things like the "All in One" installed scripts: 05mountsd and remount
windows compatible AutoMTD script ( meh, I hate batch scripts )
- 2010-08-13 DONE - thinking of adding a config option to launch the "all in one" script, but have to make that recovery compatible first
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
Downloads
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
mediafire downloads
http://tinyurl.com/customMTD
aab0fadf658ed275954aea8d0aed9c8f FR-AutoMTD_partitionPatcher_v1.5.6.tar.bz2
8857194cdbe34a52d173def4441ad2ae FR-AutoMTD_partitionPatcher_v1.5.6.zip
1f84a5ec50684a7830a93a8d455bc159 FR-boot-rpp-v1.5.6-CustomMTD_S.zip
bca0360f91aed0acf6e2dc82dfe01b56 FR-boot-v1.5.6-CustomMTD_S.zip
94b4238c2668cbe7cd52fb8ad5a2ee12 FR-recovery-v1.5.6-CustomMTD_S.zip
5404f1a41dbc60105d59c7fa0c335a70 FR-remove-v1.5.6-CustomMTD_S.zip
The attached files are OLD
Custom MTD FAQ
FAQ
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Q my SPL starts with 0 or 10, and I want to try CM5.0.8 or/and CM6. DO I need to do anything extra?[/b]
A yeap, it seems the newer kernels are just a bit too big for x0.95.x00x SPLs, you can get round it with the below kernels. And to flash CM6 you need to 'fake' your SPL ( see configuration in OP ) or edit the updater-script. faking is easier.
However, I would recommend the 1.33.2003 SPL ( you still need to fake your SPL, but you won't need the 'special' kernels )
guide for flashing 1.33.2003 SPL by Ezterry
#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
2010-07-11
I have compiled a kernel, which I hope is NoneDanger compatible
the source is simply CyanogenMod's github, I have taken the config from cm6rc1, and simply changed the bluetooth to modules
this approach has worked in the past
It is pre-patched with AutoMTD, so just flash cm6rc1, then flash this
FR-CM6RC1-bootimg4NoneD-AutoMTD.zip(MD5: 386D9A05A3C0FFC08E5B3F844D437AA7)
mirrors
http://rapidshare.com/files/406402016/FR-CM6RC1-bootimg4NoneD-AutoMTD.zip
http://www.mediafire.com/?152jnqwyme3
#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
2010-07-27
NoneDanger compatible Kernel for RC2
FR-CM6RC2-bootimg4NoneD-AutoMTD.zip (MD5: 7858a8a8d126919318d1718c6e5167ec )
http://www.mediafire.com/file/ttxfcocsti3mma3/FR-CM6RC2-bootimg4NoneD-AutoMTD.zip
I'll have to dig out the src
#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
2010-08-15
NoneDanger compatible Kernel for RC3
2010-08-17 ( Sorry, old one had a status6 bug )
New one here
87F160F08FCD2233DDD40FBFC50D3711 FR-CM6RC3-bootimg4NoneD-AutoMTD.zip
src = http://github.com/CyanogenMod/cm-kernel/tree/48c57f11abaaf3de6c81f6f5c44cfe2637251184
no modifications its straight cm ( besides the config, which you can get from the compiled kernel or zcat /proc/config.gz )
#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
*NB* don't use a patched recovery to flash SPL or RADIO ( you should avoid using recovery to flash these anyway, feel free to ask for current advice on spl / radio flashing )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Q do I need to flash both of the files each time I install a new rom?
A No, you only need to flash the recovery patcher once, unless you want to resize or you install a new recovery.
the boot patcher *must* be flashed after you have installed a new ROM or Kernel update
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Q my cache looks odd in df, I see two and its the same size as data or sd-ext, is something wrong?
A everything is fine, since we shrunk cache its no good for things like the Market, so a script is installed to 'bind mount' cache with /sd-ext/cache or data if sd-ext is not mounted.
it actually turns out that /cache is not actually used in CM6, so I might adapt the script a little in a future release.
EDIT: as of version 1.5 the cache bind mount script mount 'real cache' separately, which should reduce confusion
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Q When I tell ROM Manger to do something in recovery, it just reboots to recovery and does nothing. it used to do the action but not since I installed CustomMTD
A yeah, nearly forgot about that, I was going to fix it last week, basically ROM Manger writes commands to /cache, but its writing it to our bind mount so.. when recovery boots it doesn't see the commands.
In all honesty that one hasn't been pointed out to me yet, but yeah I can fix it..
EDIT: as of version 1.5 the cache bind mount is compatible with ROM Manager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Scripts
'source' is now available on github
http://github.com/Firerat/CustomMTD
errm, tbh I'm not all that clued up on it yet
looks very promising
So, will i need to change the values everytime i flash a different rom? or can i just set them to a large size and everything will work?
asb123 said:
looks very promising
So, will i need to change the values everytime i flash a different rom? or can i just set them to a large size and everything will work?
Click to expand...
Click to collapse
most roms have a target of 90mb system ( DangerSPL )
so 90 2 config will basically give you an extra 28mb on data than you would have with stock DangerSPL MTD map
so yeah
90 2 is a good all rounder
Firerat said:
most roms have a target of 90mb system ( DangerSPL )
so 90 2 config will basically give you an extra 28mb on data than you would have with stock DangerSPL MTD map
so yeah
90 2 is a good all rounder
Click to expand...
Click to collapse
is it okay if I make system 70mb?
The rom im using is only using 66 out of 90, i want more space for data instead. I remember you said something about it being a miltiple of 128K.
With this, could Devs stop skimping on stuff like wallpapers and ringtones or additional apps, and surpass the 90MB danger spl mark? It would seem so. Also, I do not make roms so I do not know how it works but if there is compression or lower quality stuff they would now be able to use up as much space as wanted correct?
Ace42 said:
is it okay if I make system 70mb?
The rom im using is only using 66 out of 90, i want more space for data instead.
Click to expand...
Click to collapse
yeap, should be fine
personally I would be tempted to use clockwork, since you can erase system ( part of partition options )
.img files can be found here
http://www.koushikdutta.com/2010/02/clockwork-recovery-image.html
I don't recommend flashing via ROM Manager with CM5 or CM6
fastboot it over, or flash via recovery
I may be a little over cautious recommending a full wipe, but I have never had problems when system, cache and data are clean.
if you are 'growing' system make sure cache and data are clean
if your 'shrinking' make sure system is clean ( so 'hangovers don't mess up /cache or data )
asb123 said:
With this, could Devs stop skimping on stuff like wallpapers and ringtones or additional apps, and surpass the 90MB danger spl mark? It would seem so. Also, I do not make roms so I do not know how it works but if there is compression or lower quality stuff they would now be able to use up as much space as wanted correct?
Click to expand...
Click to collapse
yes, you can 'grow' or 'shrink' at will
just hope it doesn't get used to be lazy and not trim bloat
Hi firerat,
you mentioned once before something about market data on the cahe... or something so downloads would be ok if a certain partition was big enough?....something like that... I am having a prob that might be related since it started when I tried to change from default to system 80 5 for data. now I cant sign in to google and after flashing gaaps there is no market? everything else in the gaaps zip is there...? It could be google i know but i remembered you saying that somewhere.
TheNewGuy said:
Hi firerat,
you mentioned once before something about market data on the cahe... or something so downloads would be ok if a certain partition was big enough?....something like that... I am having a prob that might be related since it started when I tried to change from default to system 80 5 for data. now I cant sign in to google and after flashing gaaps there is no market? everything else in the gaaps zip is there...? It could be google i know but i remembered you saying that somewhere.
Click to expand...
Click to collapse
I very much doubt it is related in anyway
/cache is where the market downloads apks to prior to install
it should be bind mounted to /sd-ext/cache or /data/cache if sd-ext is not mounted
your missing Market is related to something else
Firerat said:
I very much doubt it is related in anyway
/cache is where the market downloads apks to prior to install
it should be bind mounted to /sd-ext/cache or /data/cache if sd-ext is not mounted
your missing Market is related to something else
Click to expand...
Click to collapse
On my sdcard, why were my market Dls going to /Sdcard/Download folder?
I never seen them go there before, I'm used to seeing them in /cache.
Ace42 said:
On my sdcard, why were my market Dls going to /Sdcard/Download folder?
I never seen them go there before, I'm used to seeing them in /cache.
Click to expand...
Click to collapse
Because he bind mounted it.
Ace42 said:
On my sdcard, why were my market Dls going to /Sdcard/Download folder?
I never seen them go there before, I'm used to seeing them in /cache.
Click to expand...
Click to collapse
JAguirre1231 said:
Because he bind mounted it.
Click to expand...
Click to collapse
sorry for confusion
When I download stuff with dolphin HD it goes to /sdcard/download
maybe its different with stock browser
the cache bind mount is
added a few extra comments to make it easier to follow
/system/etc/init.d/06BindCache
Code:
#!/system/bin/sh
# check we don't already have a bind mount
# ( so if ran manually multiple times we don't end up with strange things happening )
if [ "`awk '/\/cache/' /proc/mounts |sed -n '$='`" -gt "1" ];
then
echo "cache already bind mounted"
echo `awk '/\/cache/' /proc/mounts`
exit
fi
# check if /sd-ext mounted, if yes then bind to /sd-ext/cache, if not /data/cache
if [ "`grep -q sd-ext /proc/mounts;echo $?`" = "0" ];
then
CacheDir=/sd-ext/cache
else
CacheDir=/data/cache
fi
# check we have something to bind mount, and create if not
if [ ! -d $CacheDir ];
then
install -m 771 -o 1000 -g 2001 -d $CacheDir
fi
mount -o bind $CacheDir /cache
# check dalvik-cache exists ( this is really for magics )
# so they don't end up in bootloop because dex files can not be created
if [ ! -d $CacheDir/dalvik-cache ];
then
install -m 771 -o 1000 -g 1000 -d $CacheDir/dalvik-cache
fi
actually, errm yeah it is d/l to /sdcard/downloads
not my doing
I guess cache really is pointless on froyo
hey firerat great job bro! again ive been really busy and i still didnt get to try this or the earlier betas you made...hell i havent even tried a froyo rom yet. ima try this right now and let you know how it goes!
speedysilwady said:
hey firerat great job bro! again ive been really busy and i still didnt get to try this or the earlier betas you made...hell i havent even tried a froyo rom yet. ima try this right now and let you know how it goes!
Click to expand...
Click to collapse
Froyo has been nice so far
but you may run into issues
for one the updater-script is actively 'kicking' NoneDanger
you can just remove the getprop checks
I have had problems booting cm5.0.8's kernel, I did get round it by compiling a new one from cm github,
I
'm not sure is cm6's kernel has the same issue
it does seem SPL related, I flashed Danger and it was fine, I plan to go back to NoneDanger and confirm it still doesn't work.
but figured that while I was on Danger I might as well put this (Custom MTD) through its paces with a DangerSPL
Firerat said:
Froyo has been nice so far
but you may run into issues
for one the updater-script is actively 'kicking' NoneDanger
you can just remove the getprop checks
I have had problems booting cm5.0.8's kernel, I did get round it by compiling a new one from cm github,
I
'm not sure is cm6's kernel has the same issue
it does seem SPL related, I flashed Danger and it was fine, I plan to go back to NoneDanger and confirm it still doesn't work.
but figured that while I was on Danger I might as well put this (Custom MTD) through its paces with a DangerSPL
Click to expand...
Click to collapse
lol yeah i was just gonna say the get prop error occured lemme remove those asserts resign and see what happens
hmm oddly everything flashed fine on the latest nightly build but when it gets past the g1 screen it keeps rebooting to recovery? ima rewipe and try again and see if i can get a logcat if it happens again
edit: no dice when i run logcat =/
-exec '/system/bin/sh/' failed: permission denied (13) -"
double edit: i get the same error for any rom i try to flash when i look at the logcat. the only difference is cm's latest nightly build rebooted on the g1, super e freezes at the g1 screen...ima try to modify the .txt to go back to the stock layout so i can nandroid my cachehacked cm5.08 back if not...idk what to do..
speedysilwady said:
hmm oddly everything flashed fine on the latest nightly build but when it gets past the g1 screen it keeps rebooting to recovery? ima rewipe and try again and see if i can get a logcat if it happens again
edit: no dice when i run logcat =/
-exec '/system/bin/sh/' failed: permission denied (13) -"
Click to expand...
Click to collapse
Odd, but at leasat the kernel is booting, I wasn't getting anywhere with cm5.0.8
It could be a general error
Which build are you using
I'm on a nightly, but I know Defcon works
If its still not working, try the older v1 version of boot patcher in lbcoders thread
I did change boot v1.1 to the script I use in the automtd one
I'm on the nightly 0704 (944 I think ) btw
Firerat said:
Odd, but at leasat the kernel is booting, I wasn't getting anywhere with cm5.0.8
It could be a general error
Which build are you using
I'm on a nightly, but I know Defcon works
If its still not working, try the older v1 version of boot patcher in lbcoders thread
I did change boot v1.1 to the script I use in the automtd one
I'm on the nightly 0704 (944 I think ) btw
Click to expand...
Click to collapse
noo this wasnt cm5.08 this was the latest nightly, same one youre 0704 on.
it got to the g1 screen and right when its abt to hit the boot animation it reboots.
i tried super e but it froze on the g1 screen
trying to get back to 67 67 for cache and system so i can nandroid but its weird that the logcat wont show no matter what rom i use.

[WIPE][COMPLETE][FLASHABLE] SuperWipe v2 (30 Jan 2011) - So Fresh and So Clean Clean!

One thing we have run into with BiffMod ROM is that there is no single "COMPLETELY erase the phone" solution.
So this is my attempt at it.... No console/terminal, no adb shell, no USB, no anything required. Just flash the file in recovery and you are done.
But OHSAKA! There are tons of threads about this, there are even existing "wipe-update" files to erase the phone. What makes your flashable update file so special???
Well I'm glad you asked that. This update contains the 'erase_image' executable with all the needed libraries statically linked. (thanks ezterry) 'erase_image' performs a low-level format of the partition which can fix unforeseen problems. Most other wipe-updates just perform "rm -rf *" at the file system level and don't touch the boot partition.
v2
---
Kudos to RichieDaze! He stepped up and added some often requested functionality to this popular wipe script. Now SuperWipe will check the root of the /sdcard/ directory for a file named "SuperWipe.conf". This file will control which partitions get erased and also control if the script triggers an auto-reboot. If the file is not present, then the script will default to wiping all partitions.
SuperWipe.conf
Code:
## SuperWipe Custom Configuration
## So Fresh and So Clean Clean Menu
## Cannot be blank (yes or No)
#
Wipe_Cache=yes
Wipe_Userdata=yes
Wipe_System=yes
Wipe_Boot=yes
Wipe_Sd_Secure=yes
Wipe_Sd_Ext=yes
#
##
## Extras
#
Reboot_when_done=no
Reboot_Delay=5
#
##
SuperWipe v2 (MD5: a3c358c1e027c8ec039ada8e667cab1a)
SuperWipe.conf (MD5: 1e7eb3a97270142aa6bf7c4fca9c2490)
You will need to reboot back into recovery after running this. If you forget and try to boot normally, you will have to pull battery to power off.
v1
---
This update will:
1) Call erase_image on CACHE, SYSTEM, USERDATA, and BOOT partitions
2) Mount /sd-ext (if it exists) and delete all files from it
3) Delete all files in the /sdcard/.android_secure directory which is where all the froyo apps2sd files live
4) Run e2fsck (file system repair) on the your ext partition
5) Log all output to the /tmp/wipe.log file (if you care)
I think this is the most complete way to wipe a phone. It supersedes 'fastboot erase system -w', VOL_DOWN+HOME+BACK, Amon_RA wipes, or various other flashable update-wipe zips.
I have tested this file the best I can on my phone. I verified all partitions are completely empty after running it. Any suggestions or bug reports are welcome!
SuperWipe (MD5: 945218bbbeab63d2c41e20c3243176ce)
You will need to power off and reboot back into recovery after running this. If you forget and try to boot normally, you will have to pull battery to power off.
This space reserved for Firerat's comments
Will definitely check this out! sounds like a "duh" kind of thing.
microb0i said:
Will definitely check this out! sounds like a "duh" kind of thing.
Click to expand...
Click to collapse
Yeah, when I told ezterry I was done and it works, he said "Doing what someone ought to have done ages ago"...
a "low format" kind of wipe should isolate the bad blocks on the memory (i have such things ) ? and because i can`t use anything that require usb on my phone, i`ll try use your file to wipe and then reinstall biffmode2.1 (which i have trough bart restore from another phone).
another question. if your file is like a low format, is it ok to use it every time ? or often ?
Later edit: tried it. the rom still doesn`t install. so i don`t know what the problem is. i guess that your wipe script is ok. the rom stuff is not your problem but since cm6 stable, i can`t install any rom.
for your script, just release a lot of time spent with the "wipe" operations in flashing new roms. and from what you say, it does it better. so, nice job!
yo9gnc said:
a "low format" kind of wipe should isolate the bad blocks on the memory (i have such things ) ? and because i can`t use anything that require usb on my phone, i`ll try use your file to wipe and then reinstall biffmode2.1 (which i have trough bart restore from another phone).
another question. if your file is like a low format, is it ok to use it every time ? or often ?
Later edit: tried it. the rom still doesn`t install. so i don`t know what the problem is. i guess that your wipe script is ok. the rom stuff is not your problem but since cm6 stable, i can`t install any rom.
for your script, just release a lot of time spent with the "wipe" operations in flashing new roms. and from what you say, it does it better. so, nice job!
Click to expand...
Click to collapse
If you havent been able to install any rom since CM6... then its either your hardware, or your not giving it enough time to boot.
Getting ready to try this out because Im sure I have some bad blacks on my Mytouch 1.2 that have been causing location issues in sense roms for only about 4 months, before that all worked fine.
whether I could use for my N1?
Ohsaka said:
Yeah, when I told ezterry I was done and it works, he said "Doing what someone ought to have done ages ago"...
Click to expand...
Click to collapse
I still find fastboot erase a bit cleaner than erase_image but for 99.9% of your problems erase_image works well.. and can be done without a computer on hand.
lackonne said:
whether I could use for my N1?
Click to expand...
Click to collapse
You need someone who knows how the n1 is set up to be sure, but I think it will work perfectly.. ask for some dev with an n1 to check.
Great work Ohsaka, this is something that the community has been needing for a long time. You rock.
Sent from my HTC Hero using XDA App
ill have to download this for future use
lackonne said:
whether I could use for my N1?
Click to expand...
Click to collapse
I promise to port this to the N1 if anyone donates an N1 to me.
Heck, I'll port it to ANY phone...just send me the phone!
Seriously though, I imagine this can be ported to most phones quickly by tweaking the install.sh script.
Quick dumb question. Could this possible offer a speed improvement when flashing a new ROM? I find that if I don't use fastboot, any Froyo ROM is completely unusable. Even if I do use fastboot, the Froyo ROMs usually bog down after a few hours. I'm talking like 10 minutes pounding on the screen trying to get an outgoing call to work. Could this possibly fix all this mess?
r3s-rt said:
Could this possibly fix all this mess?
Click to expand...
Click to collapse
Sounds more like permission/dalvik issues to me.
This if used right can prevent old permission/dalvic issues carrying into the new rom.
ezterry said:
Sounds more like permission/dalvik issues to me.
This if used right can prevent old permission/dalvic issues carrying into the new rom.
Click to expand...
Click to collapse
Speaking of Dalvik, does this also wipe the Dalvik cache?
crypysmoker said:
If you havent been able to install any rom since CM6... then its either your hardware, or your not giving it enough time to boot.
Getting ready to try this out because Im sure I have some bad blacks on my Mytouch 1.2 that have been causing location issues in sense roms for only about 4 months, before that all worked fine.
Click to expand...
Click to collapse
i think i`m a little bit offtopic but i`m curious why do you think that? if i try to flash old roms, based on cm6rc1-2 ( like htcclay`s, or chromersmith`s), they work ok. since cm6 stable ... i`m stuck on the g1 logo after flashing zip.
i give`em enough time, believe me. are 15 minutes enough ?
captaincrook said:
Speaking of Dalvik, does this also wipe the Dalvik cache?
Click to expand...
Click to collapse
It basically writes a 0 to every sector of the internal phone partitions except for the "recovery" partition. So EVERYTHING is erased. (it also wipes the sd-ext directory from the sdcard and runs repair on it)
I don't think the cache partition is getting wiped
XxKOLOHExX said:
I don't think the cache partition is getting wiped
Click to expand...
Click to collapse
Code:
#!/sbin/sh
/tmp/work/erase_image cache
echo "erase_image cache=$?" >> /tmp/wipe.log
/tmp/work/erase_image system
echo "erase_image system=$?" >> /tmp/wipe.log
/tmp/work/erase_image userdata
echo "erase_image userdata=$?" >> /tmp/wipe.log
/tmp/work/erase_image boot
echo "erase_image boot=$?" >> /tmp/wipe.log
After you flash SuperWipe, open a shell and run 'cat /tmp/wipe.log'
If you see "erase_image cache=0" then it means the erase_image command did not report any errors...
Ohsaka said:
Code:
#!/sbin/sh
/tmp/work/erase_image cache
echo "erase_image cache=$?" >> /tmp/wipe.log
/tmp/work/erase_image system
echo "erase_image system=$?" >> /tmp/wipe.log
/tmp/work/erase_image userdata
echo "erase_image userdata=$?" >> /tmp/wipe.log
/tmp/work/erase_image boot
echo "erase_image boot=$?" >> /tmp/wipe.log
After you flash SuperWipe, open a shell and run 'cat /tmp/wipe.log'
If you see "erase_image cache=0" then it means the erase_image command did not report any errors...
Click to expand...
Click to collapse
Oh okay lol
Awesome stuff. If this lives up, it should be included in more OP's for rom's. Can't wait to see that day

[JIT Updated 31/12/10] Frozen Eclair- For 2.21 & AND NOW 2.34.1 Firmwares

Firstly I am posting this with permission of [email protected] Modaco. All props go to him for the origina JIT files - buy him a beer or summat.
Original Thread (Modaco)
For all those asking what JIT is this is a good explanation:
What is JIT for Android
Please don't flood the thread asking what JIT is - Google is your friend.
Disclaimer: I will not be held responsible for any damage to your phone, your PC or indeed your life from following this guide. The steps in this guide worked for me. Doing this kind of thing could affect your warranty and all that so have a long hard think about it before you go ahead. If anything goes wrong and you get into a bootloop or something then use my debricking guide posted in this forum. Make a backup first by Tenfars Clockwork Mod for Defy
After I attempted JIT in a half arsed way previously and not getting good results (force closes etc). Antibyte has done it the right way and compile his "Frozen Eclair" JIT package.
NB: if you have removed apps this will add them back in as it is based on all the apps from the stock rom.
Ok So this is super easy now - one update.zip applied via Tenfars Clockworkmod Recovery Get it Here! - so no excuses not to give it a try! You won't be sorry.
As always start by making a backup via Clockwork Recovery.
There are now 2 packages - Choose the one for the the appropriate stock ROM you use (2.21 or 2.34.1), make sure you choose the right one for godsake or bad things will most probably happen!
Download FrozenEclairDefy_V2.zip Here for 2.21 Stock ROMs
Download FrozenEclair_V2.34.1.zip Here from 2.34.1 No Blur Stock ROMs
Instructions:
Place the FrozenEclair.....zip on the root of your sdcard
Boot into recovery
Select "Install zip from SDCARD"
Select "Choose zip from sdcard"
Select FrozenEclairDefy......zip from the list
Select "YES - Install - FrozenEclair......zip
The above will then install and then you just need to reboot. 1st boot will take longer than usual while it rebuilds the dalvik cache.
For some reason this removes root, so just reroot by Z4Root or your preferred method once the phone has rebooted. This will also mean you will have to reapply your overclock if you use milestone overclock (well it did for me anyways!)
##If you get any untoward things happening like force closes/apps not working my advice is to 1) reflash the .sbf (you follow my guide for this) and if that doesn't work 2)do a full wipe of all data. This is hacking and stuff like that happens all the time so be prepared##
MY Advice if you want to change to 2.34.1 ROM from 2.21. Follow this process:
Back up all user apps/their data by titanium backup.
Boot into recovery and make a backup of your 2.21 ROM.
Then wipe data/cache in the recovery options.
Using the debranding guide, flash the 2.34.1 firmware.
After 1st boot it will be as if you have a new phone.
Install z4root - root the badboy.
Then after reboot install Tenfars ClockworkMod - apply the mod and boot into it
Flash the deodex/JIT package.
After 1st reboot, reroot with Z4root.
Reinstall titanium back up from the market and reinstall you user apps/data.
Reset up your system settings.
Once you've got it back how you like it, boot back into recovery and back up the new rom.
So to reitterate thanks for this go to:
Antibyte @ Modaco for the JIT Files and full Update.zip 2.21 ROM
Paul @ Modaco for the deodexed/optimised app/framework for the 2.21 ROM
Me for the XDA guide and the original Update.zip for V1 and the deodexed app/framework for 2.34.1 ROM, and the JIT update.zip
Sorensiim for the generous hosting of all my files, meaning direct downloads and no shady file sharing sites - good lad!
Changelog:
19/12/10:
Frozen Eclair V1 - JIT For Defy
Tut on deodexing rom
Update.zip for installing JIT
20/12/10:
Frozen Eclair V2 - JIT For Defy
Recompiled and more optimisations
Whole process automated in 1 easy update.zip that includes deodexing and installing JIT.
Tut/OP updated to reflect the above changes
31/12/10:
Frozen Eclair V2.34.1 for 2.34.1 No Blur Stock ROM released
Wow! A preemptive thanks from me to you and the guys at Modaco!
Sent from my MB525 using XDA App
Hey
stupid question maybe, but what is JIT good for?
so what is JIT exactly? ( all i know so far is that it makes your quadrant scores higher so i assume it makes your phone faster in general or onlky in games?) and have you had any problems yet?
Great ! But what's MCR optimised ?
kendael said:
Great ! But what's MCR optimised ?
Click to expand...
Click to collapse
Paul runs the apks through his optimisation process, I don't know exactly what it does, but i trust Paul -but if you don't then just use the standard deodexed apps
For those that don't know I have added a link to the OP which gives a pretty decent explanation for what JIT for android is, or you could google "what is android jit" and you''ll find plenty of info lets use this thread to discuss this mod and any bugs etc.
I just read the introduction of Dalvik JIT. This is really amazing. I will try it later, since it will affect the warranty anyway.
Everythings works well. Quadrant with 900 mhz before JIT= 1175. Quadrant with 900 mhz with JIT installed = 1280. Thanks Paul! Good work. Keep it up.
Wow this sounds great! Thanks.
Can anyone tell me why i get an Unrecognized option '-h' for dalvikvm -h? I wanted to test if JIT is realy enabled.
# dalvikvm -h
dalvikvm -h
Unrecognized option '-h'
dalvikvm: [options] class [argument ...]
dalvikvm: [options] -jar file.jar [argument ...]
The following standard options are recognized:
-classpath classpath
-Dproperty=value
-verbose:tag ('gc', 'jni', or 'class')
-ea[:<package name>... |:<class name>]
-da[:<package name>... |:<class name>]
(-enableassertions, -disableassertions)
-esa
-dsa
(-enablesystemassertions, -disablesystemassertions)
-showversion
-help
The following extended options are recognized:
-Xrunjdwp:<options>
-Xbootclasspath:bootclasspath
-Xcheck:tag (e.g. 'jni')
-XmsN (min heap, must be multiple of 1K, >= 1MB)
-XmxN (max heap, must be multiple of 1K, >= 2MB)
-XssN (stack size, >= 1KB, <= 256KB)
-Xverify:{none,remote,all}
-Xrs
-Xint (extended to accept 'ortable', ':fast' and ':jit')
These are unique to Dalvik:
-Xzygote
-Xdexopt:{none,verified,all}
-Xnoquithandler
-Xjnigreflimit:N (must be multiple of 100, >= 200)
-Xjniopts:{warnonly,forcecopy}
-Xdeadlockpredict:{off,warn,err,abort}
-Xstacktracefile:<filename>
-Xgc:[no]precise
-Xgenregmap
-Xcheckdexsum
-Xincludeselectedop
-Xjitop:hexopvalue[-endvalue][,hexopvalue[-endvalue]]*
-Xincludeselectedmethod
-Xjitthreshold:decimalvalue
-Xjitblocking
-Xjitmethod:signature[,signature]* (eg Ljava/lang/String\;replace)
-Xjitcheckcg
-Xjitverbose
-Xjitprofile
-Xjitdisableopt
Configured with: debugger profiler jit show_exception=1
Dalvik VM init failed (check log file)
-----------------------------------------------------------------
This is the output from that on mine it doesnt mean anything however
Key line is this:
Configured with: debugger profiler jit show_exception=1
however if you do a logcat you will see the following from time to time proving jit is enabled:
12-19 14:53:55.641 1678 1681 I dalvikvm: Jit: resizing JitTable from 4096 to 8192
You are right. I have checked it with logcat.
Thanks Higgsy and everyone else involved. The first few runs on quadrant got about the same scores as before, but it just now returned a 1223.
Zaben said:
Thanks Higgsy and everyone else involved. The first few runs on quadrant got about the same scores as before, but it just now returned a 1223.
Click to expand...
Click to collapse
whats your linpack - are you overclocked?
Higgsy said:
whats your linpack - are you overclocked?
Click to expand...
Click to collapse
Stock 800 Mhz, I haven't messed with that stuff yet. The best I could get out of Linpack is 11.934. Neither Linpack or Quadrant are consistent. Quadrant scores vary from 937 to 1223. I haven't been able to reproduce the 1223 score.
I'm reverting here in a sec. The accounts problem has it where I can't get contacts to open. I may try again next weekend from a fresh reset.
Applied it fine and is working OK so far. Thanks! Quadrant on stock is 1241 now.
Loving the recovery applied zip. I would like to create one for the deodexed/optimised files as well - is there a FAQ about creating these?
A++ on this, defy is a really nice phone, thanks to dev efforts
Version 2 and fully automated update.zip process updated in the OP
whenever i enter recovery, it says "Can't open /cache/recovery/command" and there is no "install ZIP from SD CARD" option only reboot system now, apply sdcard:update.zip, wipe data/factory reset, and wipe cache partition. help

(ROM)CM7.1(2.3.7)Sapphire32a(NR-6.35.16.19)Sept 30(Unofficial)

I Was Helping another member get a rom working for the 6.35 radio sapphire and thought I'd look into making cm7 run better on our new radio magics, I've had it compiling for a long time now but it was slow and laggy and several things were broken. So I concentrated on DietGingerbread.
Well I succeeded this weekend at making it run ok and everything is working as it does on any other cm7 phone install.
It has my 710 kernel with 245/528 as default. (updated kernel, added 352000 to cpu freq table)
You must have 1.76.2007 spl
You should have 6.35.16.19 radio
cwm-carz-v4.0.1.4-0820-recovery, RA's hero recovery on sapphire does not work
install the rom
install gapps (optional)
Custom MTD explained below. (optional)
________
New Sept 30
Fixed merge issue in frameworks/base, fixes settings for lockscreen and a few other quirks
2.3.7 now
cm-7.1.0-09302011-6355Sapphire
________
New Sept 28
Latest cm7 source, a few changes, unlock bubbles are nice
New kernel with many changes, it has great battery life again, only 3% drop overnight now, 40 hours 35 minutes on battery and I have 18% left still, no problems over a weeks use.
Gapps package has the new market now, the old one auto updated to the new one every time for me anyways
Everything is on Andriodspin now, nice fast servers
cm-7.1.0-09262011-6355Sapphire (I didn't wipe and it works perfectly, your mileage my vary)
--------------
Aug 20
2.3.5, CM teams updates merged and tested
New kernel
Updated power profile (not sure if it affects battery or not)
Incall ui off by default, you can enable in settings
Off animation is not on by default anymore, you can turn it on in settings (it's still buggy for me anyways, I need to rewrite the code so it isn't using gles2.0)
Led settings are back (not that a lot of you noticed it gone lol, I didn't notice either)
Many tweaks for more speed, mostly in ADW
Fast enough now that I don't even overclock at all now
I forgot to add, I fixed gles1.1, neocore now works
Finally, here is the update!
cm-7.1.0-08202011-6355Sapphire-signed
This is the gapps you should use, the minimal package that way all is updated and current from the market
gapps-gb-20110613-signed.zip
*Optional*
This is the newest recovery, 4.0.1.4,(in fastboot usb mode: fastboot flash recovery cwm-carz-v4.0.1.4-0820-recovery.img )
cwm-carz-v4.0.1.4-0820-recovery (unzip and use the fastboot binary in the zip to flash, you can not flash the zip from recovery!)
--------------
New July 10 (fixed)
This is the version I have in a post in this thread (over 350 downloads and only one issue so far)
Updated kernel with camera speed improvement (not in the previously posted rom, I'll post an update package for you guys)
Fixed audio issue after taking pictures
Recovery 4.0.0.5
Rom:
CyanogenCARZ-7.1.0-07102011-6355Sapphire-signed (todays build downloaded and tested)
gpsshim replacement for wake issue http://www.multiupload.com/DKOFY5UNR3
Kernel: (update zip for those already running the july version)(not needed for above rom)
carz-2.6.34.4-07072011-signed
Google apps:
gapps_mdpi_gb_20110613_S(go to market and update)
Recovery: (fixes a wipe issue)
carz-clockworkmod-v4.0.0.5-recovery
--------------
June 21
Updated to latest cm/aosp sources, new kernel with updated usb and audio, fastest version yet. Also 4.0.0.2 recovery is working great so far.
Testing reports are good, wipe if you have issues.
CyanogenCARZ-7.1.0-06192011-6355Sapphire-signed
Carz-Clockworkmod-4.0.0.2-recovery
gapps_mdpi_gb_20110307_S
--------------
June 08
A very stable and fast release so far
New kernel with updated usb, tethering and debug notification working now
New recovery (optional)
I did not wipe but I was coming from builds that were only 1 day old, If in doubt wipe and format system.
on off animations may or may not work for you, still looking into it
cm-CyanogenCARZ-7.1.0-06062011-6355Sapphire-signed
This is not needed for anything but testing for you guys, tethering involved rom changes also.
carz-2.6.34.2-06052011-signed (flashable zip with new kernel and modules)(modules are sqf)
Recovery coming, v3.2.0....
--------------
May 23
Many updates from both the cm team and aosp (close to RC I think)
Smoother and more responsive
Updated kernel
If you have any boot issues you have to fully wipe and format system from recovery
update-cm-CyanogenCARZ-7.1.0-05232011-6355Sapphire
MD5SUM: cf815615f72cf5df900e2f8f73b57c5d
Clockworkmod-Carz-recovery-v3.1.0.1-05-23-2011.zip (newest recovery compiled with rom)
--------------
May 14 Consider this a Nightly
No wipe update if coming from may 08 version
update-cm-CyanogenCARZ-7.1.0-05142011-6355Sapphire
p
md5sum 8f3fda6dbb4b47ac3098ab28b3f29181
--------------
May 08 Stable
Sorry about the wait, I had real life work to do, also several things quit working with the cm7.1.0, 2.3.4 update, it's all good now I believe and seems much faster, This is on a clean install without custom mtd that I tested.
update-cm-CyanogenCARZ-7.1.0-05092011-6355Sapphire for mtd use, everything else is the same as the version below
update-cm-CyanogenCARZ-7.1.0-05072011-6355Sapphire
MD5SUM 137e6ec97d0498c5097bce4e42bfe102
I also started compiling clockworkmods recovery with the rom for our devices, it has all the options plus a few I've never seen before.
Clockworkmod-Carz-recovery-v3.0.2.8-05-04-2011
It's a zip with the recovery and the fastboot binary, unzip, cd to directory and:
Code:
fastboot flash recovery Clockworkmod-Carz-recovery-v3.0.2.8-05-04-2011.img
--------------
April 24
You must wipe all for this release, I used google to save settings and apps before wiping and then used it to restore everything, works now on mtd also.
If you use seo's 2.0 recovery (as I do) you have to use fastboot to erase system, as the recovery does not. (I'm looking in to fixing it)
Code:
fastboot erase system -w
Cyanogen-CARZ-7-6355sapphire-signed
Here is a new boot mtd flasher for custom MTD, I fixed cm7 so it doesn't bind data/local/download to cache/download anymore, market fixed for good on MTD
DGB-boot-v1.5.8-CustomMTD_S
(I will have a newer compile out later today with a few changes like the kernel)
--------------
Cyanogen-7-RC4-6355Sapphire
MD5SUM
Cyanogen-7-RC4-6355Sapphire-MTD
--------------
Cyanogen-7-RC3-6355Sapphire
CM7 RC3 carz v03.27.2001.2-MTD
--------------
gapps
Limited support as I'm only pulling in cm teams changes. Enjoy! Big props to all of Cyanogenmods team.
For market to work on AutoMTD for now, open terminal
on phone
Code:
su
cp -a /dev/cache/download /cache
on comp
Code:
adb shell
su
cp -a /dev/cache/download /cache
New Nightlies
--------------
update-cm-CyanogenCARZ-7-04062011-2-NIGHTLY-DS-signed.zip
MD5SUM f005d14bd708403ff92dafba475837ff
update-cm-CyanogenCARZ-7-04062011-2-NIGHTLY-DS-signed-AutoMTD.zip
MD5SUM ce91ba7861de46e9e52bd12c8d39ecb9
I have no long movies, please check and see if they work now
--------------
update-cm-CyanogenCARZ-7-04022011-NIGHTLY-DS-signed.zip
MD5SUM
update-cm-CyanogenCARZ-7-04022011-NIGHTLY-DS-signed-AutoMTD.zip
MD5SUM
--------------
update-cm-Carz2-Cyan-7-04012011-NIGHTLY-signed.zip
MD5SUM
update-cm-Carz2-Cyan-7-04012011-NIGHTLY-signed-AutoMTD.zip
--------------
update-cm-Carz2-Cyan-7-03302011-NIGHTLY-signed.zip
MD5SUM
update-cm-Carz2-Cyan-7-03302011-NIGHTLY-signed-AutoMTD.zip
MD5SUM
Custom MTD: Please know what you are doing here, read and then read some more.
first before anything run this either in term or using adb (only "df" in term)
Code:
adb shell df
you should get something like this
Code:
[email protected]:~/androidgb/system$ adb shell df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98096 32 98064 0% /dev
tmpfs 98096 0 98096 0% /mnt/asec
tmpfs 98096 0 98096 0% /mnt/obb
/dev/block/mtdblock3 174080 [COLOR="Red"]139540[/COLOR] 34540 80% /system
/dev/block/mtdblock5 169728 19832 149896 12% /data
/dev/block/mtdblock4 133120 39968 93152 30% /cache
/dev/block/loop0 1024 1024 0 100% /system/lib/modules
/dev/block/loop1 4352 4352 0 100% /system/xbin
/dev/block/mmcblk0p2 468331 8226 435120 2% /sd-ext
/dev/block/vold/179:1
7216340 7148400 67940 99% /mnt/sdcard
/dev/block/vold/179:1
7216340 7148400 67940 99% /mnt/secure/asec
look at "/dev/block/mtdblock3 174080 139540 34540 80% /system"
I used "mtd 140 3" in my mtdpartmap.txt
Download DGB-recovery-v1.5.8-CustomMTD_S.zip
These instructions are from firerats thread (recommended reading material) modified a little for my use.
Install Instructions:
Download DGB-recovery-v1.5.8-CustomMTD_S.zip
Create mtdpartmap.txt and put on /sdcard/ (use 140 3) see configuration above or in Firerats thread < recomended
reboot to recovery
nandbackup
wipe (I also "fastboot erase system -w" )
flash DGB-recovery-v1.5.8-CustomMTD_S.zip
reboot to recovery ( reboot and hold Home )
wipe again
Flash any of my custom MTD roms
reboot
Click to expand...
Click to collapse
For market to work on AutoMTD for now, open terminal
on phone
Code:
su
cp -a /dev/cache/download /cache
on comp
Code:
adb shell
su
cp -a /dev/cache/download /cache
The above is what I did and I'm running fine right now,
Below is with 130 3 mtdpartmap, I trimmed some stuff out
Code:
[email protected]:~/androidgb/system$ adb shell df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98096 32 98064 0% /dev
tmpfs 98096 0 98096 0% /mnt/asec
tmpfs 98096 0 98096 0% /mnt/obb
/dev/block/mtdblock3 133120 131772 1348 99% /system
/dev/block/mtdblock5 340736 83740 256996 25% /data
/dev/block/loop0 1024 1024 0 100% /system/lib/modules
/dev/block/mmcblk0p2 468331 10053 433293 2% /sd-ext
/dev/block/mmcblk0p2 468331 10053 433293 2% /cache
/dev/block/mtdblock4 3072 780 2292 25% /dev/cache
/dev/block/vold/179:1
7216340 7138144 78196 99% /mnt/sdcard
/dev/block/vold/179:1
7216340 7138144 78196 99% /mnt/secure/asec
169 > 340 on data
Great job!
Thank you for all your effort. I will test it right away.
May i get your permission to post this ROM in other forum? With all the credits and with a link to these thread. Only for promoting purpose.
Unkjcr said:
Thank you for all your effort. I will test it right away.
May i get your permission to post this ROM in other forum? With all the credits and with a link to these thread. Only for promoting purpose.
Click to expand...
Click to collapse
Sure but can you wait till it gets tested out a little bit first?
carz12 said:
Sure but can you wait till it gets tested out a little bit first?
Click to expand...
Click to collapse
Sure! I was thinking in testing the ROM first before doing that. Thanks
Awesome, downloading asap
Hi Carz,
Do i need to change my SPL and recovery?
Dexreyes said:
Hi Carz,
Do i need to change my SPL and recovery?
Click to expand...
Click to collapse
Not if it's what is in your sig.
carz12 said:
Not if it's what is in your sig.
Click to expand...
Click to collapse
Thanks Carz, I'm downloading it right now, will test this, looks promising!
So far it works as any other GB ROM out there. But with 2 differences for now: It doesn´t support App2SD (i really hope you enable this feature) and... it´s faster than the others! Great job Carz!
Unkjcr said:
So far it works as any other GB ROM out there. But with 2 differences for now: It doesn´t support App2SD (i really hope you enable this feature) and... it´s faster than the others! Great job Carz!
Click to expand...
Click to collapse
Have you turned on jit yet?
Sent from my Dream/Sapphire using XDA App
i got install error, status 7 when installing this rom. Please look into this.
hellokittyr said:
i got install error, status 7 when installing this rom. Please look into this.
Click to expand...
Click to collapse
Do you have 1.76.2007 spl?
Sent from my Dream/Sapphire using XDA App
Unkjcr said:
So far it works as any other GB ROM out there. But with 2 differences for now: It doesn´t support App2SD (i really hope you enable this feature) and... it´s faster than the others! Great job Carz!
Click to expand...
Click to collapse
It supports apps2sd (native) and supports app2ext if I add the script
Sent from my Dream/Sapphire using XDA App
thx carz, testing it right now...
Just installed, replacing GBRider, so far so good, very speedy, everything seems to work.
Excellent work carz, as usual!
---
Update: seems I spoke too fast, the root portion seems to have a problem. SuperUser/Titanium don't work (exception with 'failed running exec() on SU' appear in the log
Reset your phone - it helped me -
carz - rom is very fast like 4 GB2.3 - one qestion, how about battery drain?
[email protected] said:
Just installed, replacing GBRider, so far so good, very speedy, everything seems to work.
Excellent work carz, as usual!
---
Update: seems I spoke too fast, the root portion seems to have a problem. SuperUser/Titanium don't work (exception with 'failed running exec() on SU' appear in the log
Click to expand...
Click to collapse
So far so good, are there any plans on a MTD friendly version?
orange_24 said:
Reset your phone - it helped me -
carz - rom is very fast like 4 GB2.3 - one qestion, how about battery drain?
Click to expand...
Click to collapse
Em, could you specify what do you mean by 'reset' ? Wiping? Rebooting?
I started with a wipe, and rebooted since... Didn't help.
install Completed but reboot to recovery ?

[TWEAK][APK][CWM][[Update 2.0.0]] Seeder entropy generator to provide lag reduction

Original Post | CWM
Guys check this out
Best result on Android 4.+
Description
Hey everyone,
So, I was experiencing significant lag as we all do from time to time, and decided I was going to get to the bottom of it.
After tracing and debugging for hours, I discovered the source of 90% of Android's lag. In a word, entropy (or lack thereof).
Google's JVM, like Sun's, reads from /dev/random. For all random data. Yes, the /dev/random that uses a very limited entropy pool.
Random data is used for all kinds of stuff.. UUID generation, session keys, SSL.. when we run out of entropy, the process blocks. That manifests itself as lag. The process cannot continue until the kernel generates more high quality random data.
So, I cross-compiled rngd, and used it to feed /dev/urandom into /dev/random at 1 second intervals.
Result? I have never used an Android device this fast.
It is literally five times faster in many cases. Chrome, maps, and other heavy applications load in about 1/2 a second, and map tiles populate as fast as I can scroll. Task switching is instantaneous. You know how sometimes when you hit the home button, it takes 5-10 seconds for the home screen to repopulate? Yeah. Blocking on read of /dev/random. Problem solved. But don't take my word for it .. give it a shot!
Update!
I've built a very simple Android app that bundles the binary, and starts/stops the service (on boot if selected). I'll be adding more instrumentation, but for now, give it a shot! This APK does not modify /system in any way, so should be perfectly safe.
This is my first userspace Android app, so bear with me!
Note that this APK is actually compatible with all Android versions, and all (armel) devices. It's not at all specific to the Captivate Glide.
Click to expand...
Click to collapse
Quote Original Post link - Click Here
UPDATE: Seeder_v7 is out, as suggested by pepoluan, it now detects for qrngd (built in rngd for Qualcomm Snapdragon-based devices), if it is there, then it will not start as rngd may conflict with it...the rngd binary is also using the latest version (it is turned off when screen is off)...users of previous versions can just flash it over...
INSTALLING
You need init.d support for this!
Download and flash:
http://www.androidfilehost.com/?fid=9390248398092764755
Here is a mirror... http://d-h.st/REX
How to use this script?:
After flashing, launch terminal emulator and type
Code:
su
seeder
You will get a menu like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
NOTE: There will be NO app after flashing! This only installs the necessary binaries and scripts...
For those who cannot install via recovery:
You get a status 0 error -> replace the update-binary in Seeder_v6.zip with one from another zip that works with your device
OR
Use the new installation method!
Instructions:
1. Download Seeder_v7_non-CWM.zip from here:
http://www.androidfilehost.com/?fid=9390248398092764756
2. Extract the zip, you will get a folder named "install"
3. Place the folder in the root of your sdcard (/sdcard)
4. Launch terminal emulator, type:
Code:
su
cd /sdcard/install
sh install.sh
5. Ignore any error messages (those are only warnings, only happens to current users)
6. You are done! The script will auto-delete the "install" folder as it is not required anymore...
Sample output:
UNINSTALLING:
And now for the way to clean up Seeder_7:
Via recovery:
Flash Seeder_v6&7_Uninstall.zip:
http://www.androidfilehost.com/?fid=9390248398092764753
Via terminal:
1. Download Seeder_v6&7_Uninstall_non-CWM.zip:
http://www.androidfilehost.com/?fid=9390248398092764145
2. Extract it to the root of your sdcard (/sdcard), you should get a file named uninstall.sh
3. Launch terminal emulator and type this:
Code:
su
cd /sdcard
sh uninstall.sh
4. You are done! Everything gets cleaned up, including uninstall.sh...
Click to expand...
Click to collapse
Flash now works, you can now type in terminal to turn off/on and also easier remove. Up to u if ud like to try. Note" it may drain battery more" so please do not be going all against tweak. Thanks
FLASH THIS ON GINGERBREAD!?!?!(v1.4.0)
Thanks to Zen Arcade for making a flash for Gingerbread! His Post Here!
I took a look at the original CWM package and made the following changes:
1 - swapped in our update-binary
2 - changed the mount command in edify script (not really needed since system is already mounted in gb voodoo CWM recovery)
3 - removed all mount commands from init.d script (not required since you have to have /system mounted just to read the script)
Here's a link to the CWM flashable: http://d-h.st/Kaq
I'm running this on both my Infuses - no problems noted. At work now so will not have a chance to try with games for a couple more hours at least. Only down side I can note is that the rngd binary is about 1MB in size - a small sacrifice if it does eliminate lag events
Note that this package is for GB, but should work fine for 4.x roms as long as /system is mounted as part of recovery startup. Can someone test on a 4.x (CWM9/10) rom by flashing the zip and then checking /system/etc/init.d for a file named 91RNGD or /system/xbin for rngd? I've already tested on GB and it works fine there.
Thanks bradman for posting this - all credit and thanks to the original devs who posted this.
Click to expand...
Click to collapse
Sorry if this is a n00b question, but if you just install the .apk do you still need to change the permissions or does it take care of it for you?
dginsd said:
Sorry if this is a n00b question, but if you just install the .apk do you still need to change the permissions or does it take care of it for you?
Click to expand...
Click to collapse
Is best to just fix Perm to brr safe, easiest way to do so if you just install the app is to go to recovery/advanced/fix permissions and reboot
Sent from my SGH-I997 using xda premium
I stumbled upon this myself a few days ago and have been looking into it... I can easily implement it into my source builds, but want to see how it reacts first before doing so. And btw bradman... CM10.1 is smooth as **** with nothing needed... but if this makes it even better, then thats good to hear.
Anyone tried this on 2.3.6?
im aware its smooth good job! i was just testing it on infuse and i currently had ur rom so i just gave it a try to confirm it working on infuse
wawaweewa said:
Anyone tried this on 2.3.6?
Click to expand...
Click to collapse
ive heard it works on gingerbread. never tried. try a backup in recovery then flash. if anything goes wrong restore
bradman117 said:
ive heard it works on gingerbread. never tried. try a backup in recovery then flash. if anything goes wrong restore
Click to expand...
Click to collapse
I updated OP so that if flash doesn't work i have download files to manually do
bradman117 said:
ive heard it works on gingerbread. never tried. try a backup in recovery then flash. if anything goes wrong restore
Click to expand...
Click to collapse
that is what i am doing now! im on saurom jvu atm thanks for the quick reply ill let you know how it turns out
EDIT: i hope it works so my online game will run smoothly!
I must say, this relatively minor tweak provides a noticeable boost. I'm currently using Liquid Smooth RC9.11 with no further tweaks. After applying this tweak I've noticed faster loading times for a couple games, Google maps is much more responsive to massive view changes, web browsing is snappier, and as stated above almost no redraw delay when returning to the launcher after running a large app (like a game). I must say this under-powered and under-RAMmed little Infuse just keeps getting better and better thanks to all the work the devs here. Keep up the good work!
deathblade said:
Is best to just fix Perm to brr safe, easiest way to do so if you just install the app is to go to recovery/advanced/fix permissions and reboot
Sent from my SGH-I997 using xda premium
Click to expand...
Click to collapse
Thanks for the tip
dginsd said:
Thanks for the tip
Click to expand...
Click to collapse
so i just have to flash the zip in recovery then fix permission and that's it?
just flash it will do permission
Working CWM Flashable for Infuse GB
I took a look at the original CWM package and made the following changes:
1 - swapped in our update-binary
2 - changed the mount command in edify script (not really needed since system is already mounted in gb voodoo CWM recovery)
3 - removed all mount commands from init.d script (not required since you have to have /system mounted just to read the script)
Here's a link to the CWM flashable: http://d-h.st/Kaq
I'm running this on both my Infuses - no problems noted. At work now so will not have a chance to try with games for a couple more hours at least. Only down side I can note is that the rngd binary is about 1MB in size - a small sacrifice if it does eliminate lag events
Note that this package is for GB, but should work fine for 4.x roms as long as /system is mounted as part of recovery startup. Can someone test on a 4.x (CWM9/10) rom by flashing the zip and then checking /system/etc/init.d for a file named 91RNGD or /system/xbin for rngd? I've already tested on GB and it works fine there.
Thanks bradman for posting this - all credit and thanks to the original devs who posted this.
UPDATE - 2012/01/03
I've confirmed the documented improvement in speed at which Maps re-tiles the map display when making big location changes. Still testing other apps. Some games appear a big less laggy, although some disruptive lag events still occur (I suspect due to file system i/o scheduler delays rather than from lack of random/entropy data as addressed with this enhancement). I'll do some benchmarking over the weekend and report back with results.
Zen Arcade said:
I took a look at the original CWM package and made the following changes:
1 - swapped in our update-binary
2 - changed the mount command in edify script (not really needed since system is already mounted in gb voodoo CWM recovery)
3 - removed all mount commands from init.d script (not required since you have to have /system mounted just to read the script)
Here's a link to the CWM flashable: http://d-h.st/Kaq
I'm running this on both my Infuses - no problems noted. At work now so will not have a chance to try with games for a couple more hours at least. Only down side I can note is that the rngd binary is about 1MB in size - a small sacrifice if it does eliminate lag events
Note that this package is for GB, but should work fine for 4.x roms as long as /system is mounted as part of recovery startup. Can someone test by flashing the zip and then checking /system/etc/init.d for a file named 91RNGD or /system/xbin for rngd?
Click to expand...
Click to collapse
I currently cant test this but if it turns out to work ill put it on OP. i did hear from someone that the biggest difference on GB but i cant say that for y self because i have not tried yet
I gotta say, it's very smooth so far.
Works fine on Scott's CM10. PS shows the rngd process running. Thanks
Zen Arcade said:
Note that this package is for GB, but should work fine for 4.x roms as long as /system is mounted as part of recovery startup. Can someone test on a 4.x (CWM9/10) rom by flashing the zip and then checking /system/etc/init.d for a file named 91RNGD or /system/xbin for rngd? I've already tested on GB and it works fine there.
Thanks bradman for posting this - all credit and thanks to the original devs who posted this.
Click to expand...
Click to collapse
Sent from my SGH-I997 using xda premium
Heyyy Scott, check out this guys find
lordvincent 90 posted it..
Originally Posted by zeppelinrox
So I did a bit of digging and a bit of research and a bit of testing.
I really dunno if the tweak makes that big of an effect but I did discover a nice trick to have a nice fat entropy_avail with zero overhead.
One of the first pages I skimmed was http://linux.die.net/man/4/random which mentioned at the bottom these other files:
read_wakeup_threshold contains the number of bits of entropy required for waking up processes that sleep waiting for entropy from /dev/random.
write_wakeup_threshold contains the number of bits of entropy below which we wake up processes that do a select() or poll() for write access to /dev/random.
Normally, read_wakeup_threshold is 64 and write_wakeup_threshold is 128
I also wondered why most users report that their entropy_avail was by default in the 200ish range while mine was always by default over 300.
I had also found this page at linuxinsight. I had used that site alot when researching Kick Ass Kernelizer's sysctl tweaks.
So I thought, hey I wonder if I can use sysctl to set good values and low and behold, I looked in my script and I already have settings for both lol:
Code:
busybox sysctl -e -w kernel.random.read_wakeup_threshold=128;
busybox sysctl -e -w kernel.random.write_wakeup_threshold=256;
As you can see, I had doubled the default values - and that's why my entropy_avail was always over 300.
So I decided to mess with sysctl a bit.
Connected the phone to the laptop.
In one command prompt I watched the entropy_avail with this one liner:
Code:
while :; do cat /proc/sys/kernel/random/entropy_avail; sleep 1;done
In a second command prompt I did the sysctl thing...
I found that write_wakeup_threshold didn't effect entropy_avail at all.
But read_wakeup_threshold is a totally different story
I did
Code:
busybox sysctl -w kernel.random.read_wakeup_threshold=2048
The entropy_avail just started climbing....
All the way up to 3600+ and just stayed there. Never went down at all.
Actually, the more I did stuff with the phone, the faster the level would climb.
So it would never go down and would never get used.
I thought well maybe I should lower it so it does get used.
I kept lowering read_wakeup_threshold until it got down to 1200 and finally entropy_avail dropped to 2400+ and kept climbing until 3600 and then would drop to 2400 immediately and up again and so on...
I played with different values.
Setting it to 1000... entropy would go up to 3000 and then drop to 2000 and up to 3000 again....
Setting to 750.... entropy would go up to 2250 and drop to 1500 and up to 2250 again...
So the pattern is:
max entropy_avail=read_wakeup_threshold * 3
min. entropy_avail=read_wakeup_threshold * 2 (ie. read_wakeup_threshold * 3 - read_wakeup_threshold)
So it builds up 3 times the read_wakeup_threshold and then when it hits that limit, it drops the value of read_wakeup_threshold.
If you want to lock it it at the highest possible value (4096), you'd do:
Code:
echo 1366 > /proc/sys/kernel/random/read_wakeup_threshold
Or
Code:
busybox sysctl -w kernel.random.read_wakeup_threshold=1366
You can add either of those to any init.d script.
However, on my device, it won't go over 3600 so you can test for yourself how high yours will go.
If all you can get is 3600ish just go with 1200 (ie. 3600/3)
In Kick Ass Kernelizer I'm gonna make it like so:
Code:
busybox sysctl -e -w kernel.random.read_wakeup_threshold=1024;
busybox sysctl -e -w kernel.random.write_wakeup_threshold=2048;
That will make it bounce between 3072 max and 2048 min.
I'm making write_wakeup_threshold twice the amount of read_wakeup_threshold simply because that's what it is by default.
But hey, maybe I can save battery life if I make it 1280 just so it stays locked in at 3600+ and it doesn't have to keep rebuilding entropy_avail lol
So conclusion is: since there is a definite pattern on how entropy was being built up to a pre-determined level and dropped to a pre-determined level, it wasn't actually being used. That's just how it's programmed.
If the setting isn't there to "hold" all the entropy, it just drops/flushes it and force feeding it entropy won't make it not spit it out
So at least I found the setting that will make it hold it in lol
Maybe somebody would like to give it a try and test to see if it actually saves battery by setting read_wakeup_threshold to 1366.
Click to expand...
Click to collapse
lordvincent 90 posted it..
Just adding this, after reading the whole thread here it seems like this may be a simpler solution (and better on battery life)
Click to expand...
Click to collapse
Post Link -- http://forum.xda-developers.com/showpost.php?p=36208713&postcount=32
Zen Arcade said:
I took a look at the original CWM package and made the following changes:
1 - swapped in our update-binary
2 - changed the mount command in edify script (not really needed since system is already mounted in gb voodoo CWM recovery)
3 - removed all mount commands from init.d script (not required since you have to have /system mounted just to read the script)
Here's a link to the CWM flashable: http://d-h.st/Kaq
I'm running this on both my Infuses - no problems noted. At work now so will not have a chance to try with games for a couple more hours at least. Only down side I can note is that the rngd binary is about 1MB in size - a small sacrifice if it does eliminate lag events
Note that this package is for GB, but should work fine for 4.x roms as long as /system is mounted as part of recovery startup. Can someone test on a 4.x (CWM9/10) rom by flashing the zip and then checking /system/etc/init.d for a file named 91RNGD or /system/xbin for rngd? I've already tested on GB and it works fine there.
Thanks bradman for posting this - all credit and thanks to the original devs who posted this.
Click to expand...
Click to collapse
Anyone tried this?
Btw brad im on jvu saurom and flashed it fix permission but this is what i get
Tweak
This relatively minor tweak provides a noticeable boost. I'm currently using Liquid Smooth RC9.11 with no further tweaks. After applying this tweak I've noticed faster loading times for a couple games, Google maps is much more responsive to massive view changes, web browsing is snappier, and as stated above almost no redraw delay when returning to the launcher after running a large app (like a game). I must say this under-powered and under-RAMmed little Infuse just keeps getting better and better thanks to all the work the devs here. Keep up the good work!
BR

Categories

Resources