For those having Problems flashing a 2.x Rom - G1 Android Development

From Manups 1.4 on, i was not able to flash any Eclair Rom to my 32B Magic. Now, i could get this done, and i could reproduce my faults. This is now for everyone with fc or Bootloops after applying an Update:
- Wipe data
- Wipe ext
- Wipe dalvik
- repair ext
- reboot (this maybe our fault !)
- flash your rom
- reboot again
-> With this, i can succesfully run Manups 1.5
Thanks to everyone, especially to cyanogen, jac an manup for making us happy !!
Yeah, hope this helps somebody else, too

meisterlampe2000 said:
From Manups 1.4 on, i was not able to flash any Eclair Rom to my 32B Magic. Now, i could get this done, and i could reproduce my faults. This is now for everyone with fc or Bootloops after applying an Update:
- Wipe data
- Wipe ext
- Wipe dalvik
- repair ext
- reboot (this maybe our fault !)
- flash your rom
- reboot again
-> With this, i can succesfully run Manups 1.5
Thanks to everyone, especially to cyanogen, jac an manup for making us happy !!
Yeah, hope this helps somebody else, too
Click to expand...
Click to collapse
i think step 5 is where people get messed up at..i dont see why people get boot loops n cant get past the G-1 screen or anything..

meisterlampe2000 said:
From Manups 1.4 on, i was not able to flash any Eclair Rom to my 32B Magic. Now, i could get this done, and i could reproduce my faults. This is now for everyone with fc or Bootloops after applying an Update:
- Wipe data
- Wipe ext
- Wipe dalvik
- repair ext
- reboot (this maybe our fault !)
- flash your rom
- reboot again
-> With this, i can succesfully run Manups 1.5
Thanks to everyone, especially to cyanogen, jac an manup for making us happy !!
Yeah, hope this helps somebody else, too
Click to expand...
Click to collapse
Those are the steps i follow when i flash any rom, (except if its an upgrade of the same rom), and i have never had a bootloop or anything like that...

MY steps are like your but I wipe data a second time after the first reboot and like other have said I have never run into boot loops
- Wipe data
- Wipe ext
- Wipe dalvik
- repair ext
- reboot (this maybe our fault !)
- Wipe data
- flash your rom
- reboot again

In most cases, rom dev's post in their OP instructions for upgrading their line of Roms or upgrading from another rom. So in that regards, this thread is useless, but none the less important for new comers.

Yeah of course they do !
But have a look at all those Threads...Almost one third of all questions is about fc or Bootloops... I just want to make clear that it really works, when do it right. I was also confused because i just did not read the right lines. Maybe a Thread about "wipes" is justified - If some people can get helped out by that !

If you have apps2sd isn't your dalvik cache on ext already, so when you wipe ext you are wiping dalvik too, correct?

meisterlampe2000 said:
From Manups 1.4 on, i was not able to flash any Eclair Rom to my 32B Magic. Now, i could get this done, and i could reproduce my faults. This is now for everyone with fc or Bootloops after applying an Update:
- Wipe data
- Wipe ext
- Wipe dalvik
- repair ext
- reboot (this maybe our fault !)
- flash your rom
- reboot again
-> With this, i can succesfully run Manups 1.5
Thanks to everyone, especially to cyanogen, jac an manup for making us happy !!
Yeah, hope this helps somebody else, too
Click to expand...
Click to collapse
Thanks for the tips, but I never have boot loop. I perform steps 1-3, then flash rom. No reboot, nothing! Then again, I have a G1. I think this was meant for MT3G devices.

Code:
I//system/xbin/busybox( 47): +++ "This is your world, these are your people. Y
ou can live for yourself today, or help build tomorrow for everyone."
I//system/xbin/busybox( 47): +++ Welcome to Android 2.1 / Manup456_ECLAIR_ERD7
9
I//system/xbin/busybox( 47): e2fsck 1.41.6 (30-May-2009)
I//system/xbin/busybox( 47): ext2fs_check_if_mount: Can't check if filesystem
is mounted due to missing mtab file while determining whether /dev/block/mmcblk0
p2 is mounted.
I//system/xbin/busybox( 47): /dev/block/mmcblk0p2: clean, 11/249856 files, 396
09/499300 blocks
I//system/xbin/busybox( 47): cp: cannot stat '/data/app-private/*': No such fi
le or directory
I//system/xbin/busybox( 47): cp: cannot stat '/data/dalvik-cache/*': No such f
ile or directory
I/DEBUG ( 140): debuggerd: Nov 20 2009 10:17:15
I/vold ( 139): Android Volume Daemon version 2.0
D/AKMD ( 148): akmd 1.6.6 START
D/AKMD ( 148): library version: 1.2.1.1129
I/vold ( 139): New MMC card 'SU04G' (serial 2420584359) added @ /devices/pla
tform/msm_sdcc.2/mmc_host/mmc1/mmc1:aaaa
I/vold ( 139): Disk (blkdev 179:0), 7744512 secs (3781 MB) 3 partitions
I/vold ( 139): New blkdev 179.0 on media SU04G, media path /devices/platform
/msm_sdcc.2/mmc_host/mmc1/mmc1:aaaa, Dpp 3
I/vold ( 139): Partition (blkdev 179:1), 6682977 secs (3263 MB) type 0xc
I/vold ( 139): New blkdev 179.1 on media SU04G, media path /devices/platform
/msm_sdcc.2/mmc_host/mmc1/mmc1:aaaa, Dpp 2
I/vold ( 139): Partition (blkdev 179:2), 998601 secs (487 MB) type 0x83
I/vold ( 139): New blkdev 179.2 on media SU04G, media path /devices/platform
/msm_sdcc.2/mmc_host/mmc1/mmc1:aaaa, Dpp 1
I/vold ( 139): Partition (blkdev 179:3), 62871 secs (30 MB) type 0x82
I/vold ( 139): New blkdev 179.3 on media SU04G, media path /devices/platform
/msm_sdcc.2/mmc_host/mmc1/mmc1:aaaa, Dpp 0
I/vold ( 139): Evaluating dev '/devices/platform/msm_sdcc.2/mmc_host/mmc1/mm
c1:aaaa/block/mmcblk0' for mountable filesystems for '/sdcard'
I/vold ( 139): Aborting start of /sdcard (bootstrap = 1)
I/vold ( 139): Volmgr not ready to handle device
D/vold ( 139): Bootstrapping complete
I//system/xbin/busybox( 47): Setting up swapspace version 1, size = 32185856 b
ytes
I//system/xbin/busybox( 47): UUID=89298fcc-2d7e-4440-b962-646ec1c0891d
I//system/xbin/busybox( 47): --- Enabling compcache
I//system/xbin/busybox( 47): Failed to open /dev/block/ramzswap0: No such file
or directory
I//system/xbin/busybox( 47): swapon: can't stat '/dev/block/ramzswap0': No suc
h file or directory
I//system/xbin/busybox( 47): run-parts: /system/etc/init.d/06compcache exited
with code 1
I/logwrapper( 47): /system/xbin/busybox terminated by exit(1)
Trying the steps that were mentioned in the original post, and I still get the errors listed above. I have a 4 gig SD card, partitioned as FAT/EXT/Swap....for the life of me I can not figure out what is going on. I have repartitioned and all, to no avail.

That's all mostly unnecessary. Simplest explanation is that you guys are doing it wrong. Most roms take care of the formatting if it's necessary, more often than not it's not. Often, the culprit will be a poor (as if the "better" one is better... ) a2sd implementation that causes conflicts when mounting and linking the partitions. Most often, it will be just a matter of removing the links and creating new ones.
If you really feel you must wipe (really, it's not necessary), then just do a factory reset (does both /data and /cache (erasing all /app, /app-private, /dalvik-cache and /lost+found in the process)) and wipe the ext (which also erases all /app, /app-private, /dalvik-cache and /lost+found but in the ext partition). That's all that's needed, the rom does the rest.

OP u r an idiot this is for developers not noobs who trying to make something out of themselves, this **** should've been in general or actually not even exist.

If you think there is no need for this, you have to ban all the new Android user that don´t have any clue about what this "wipe" is about...
Almost every developer says, "do a wipe first", and in every thread is somebody having problems with that. I just wanted to tell how it worked for me after a long time of nothing...

Related

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

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.

[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.

[GUIDE/HOW-TO] Beginner's "Getting Started" Guide :: Root, Recovery, Roms etc

[GUIDE/HOW-TO] Beginner's "Getting Started" Guide :: Root, Recovery, Roms etc
Update: Links are dead, mediafire decided to pull them without any notice. However, all important files can be found on my DevHost Account
This guide is made to help newbies get started on the basic customizations they can do to their Galaxy Fit, and with minimum possible risk of bricking it. Plus, recent update will help users to move on from being android newbies to experienced users.
Before you think of posting as ‘copied’, I want to inform you that more than 90% of the guide has been typed by me, using my own experiences with my Galaxy Fit, and has not been simply copy-pasted from anywhere.
Note: Even though care is taken to help you minimize risk of bricking your phone,
no one, except yourself, is responsible for any damage that happens to your phone.
Also, doing most of the modifications below WILL void your warranty.
Do not quote the entire post!
Quote only the part where you are facing problems...
If you completely quote the posts by me, I will not help, since I can safely assume that you are not following instructions as stated.
And do NOT pm me asking help, with regards to this thread...I will not help you there!
If you have questions/problems, ask here...I'll try my best to help you here!
Topics covered in this guide:
Most stuff related to Rooting
Backing up data using Titanium Backup Pro
Installing Stock Roms
Installing Custom Recovery
Installing Custom Roms (Continued in second post)
Creating and Deleting Sd-card Partition
Setting up and using Link2sd
Installing apk’s through “Root Explorer” method
Nandroid Backups (Continued in third post)
Overclocking
Bricked Galaxy Fit
Bootloops (Continued in fourth post)
How to reclaim warranty?
Battery Care
Android Debugging Bridge (In fifth post)
Logcats (In sixth post)
Pre-requisites:
Before you proceed, you need to have the following things ready with you:
Samsung Galaxy Fit S5670 (obviously)
Windows PC (Xp, Vista, 7)
Usb Data Cable
Samsung Usb Drivers installed on your computer (Download)
Usb Debugging Enabled (Enable it from Settings> Applications> Development> Usb Debugging)
A minimum of 50% Battery left for use
Knowledge on how to use a windows pc (optional, but recommended )
A calm mind, and plenty of patience.
Also, remember this:
a.To reboot into “recovery mode”, first shutdown your phone completely, then press and hold power + home button and wait for phone to switch on.
b.To reboot into “download mode”, first shutdown your phone completely, then press and hold power + home + volume down button and wait till phone switches on (you’ll get a yellow triangle with an android inside it, with the word “Downloading” written under it)
Edit: Since a proper "route" to installing custom roms isn't very clear, I'll just add this:-
Let's say you have a stock froyo rom, and want to try some custom rom, then
[OPTIONAL] Root Froyo, if you wish.
Then, you update to Gingerbread.
[OPTIONAL] Root GB, if you wish.
Install ClockworkMod Recovery
Then finally, install the custom rom of your choice.
Hope the "path" is now clearer ​
1. Rooting
Q) What is “rooting”? What are its advantages and disadvantages?
A) “Rooting” your device means obtaining “superuser” rights and permissions to your Android’s software. With these elevated user privileges, you gain the ability to load custom software (ROM’s), install custom themes, increase performance, increase battery life, and the ability to install software that would otherwise cost extra money (ex: Wi-Fi tethering). Rooting is essentially “hacking” your Android device.
For more info, refer Source
Though, one thing worth mentioning, YOU DO NOT NEED TO BE ROOTED IN ORDER TO INSTALL ANY CUSTOM ROM OR RECOVERY, it is optional but recommended…
People usually root beforehand as it helps them to backup their data…and you won't be able to root after you install a custom recovery, since the scripts are made only for stock Samsung recovery​
Q) Okay, now how do I root my Galaxy Fit?
A)
If you are running Froyo (android version 2.2.1), then:
Download SuperOneClick (Source Link)
Make sure your phone is connected to the computer via USB, AND your SD card is NOT mounted.
Run the app
When SuperOneClick launches, you’ll see several large buttons at the top of the screen. Make sure that the debugger can “see” it (activity will start logging).
Click “Root” in SuperOneClick.
If you are running Gingerbread (android version 2.3.x), then:
Download this update.zip file (Link)
Place it on the root of sd card (root here meaning “home directory” of your micro-sd card, i.e. the first folder which you get when you open any file explorer)
Make sure the file’s name is “update.zip” (without the “”)
Now reboot into recovery mode
Select the option: “Apply update.zip”
Wait for it to complete, and you are done!
After you have successfully rooted, you will find an app named “Superuser” in your application menu. If not, you can download it from Play Store.
Also, it is advisable to update the app (as well as the superuser binaries, option present in-app) to the latest version available.​
Q) How do I unroot my g-fit?
A) There might be various reasons why you would want to unroot your fit (the main one being to recover/reclaim your warranty)
For unrooting (in Froyo), just run SuperOneClick again, and click option “Unroot”.
For unrooting (in GB), you have a few ways: one is a sure-shot way (install/flash stock rom), another works for some and doesn’t work for some (update.zip), and one more is false un-root.
1.Sure-shot way: This method will work all the time, i.e. you will be able to unroot successfully with this method. All you’ve got to do is flash a stock rom, and you will be back to factory settings (and even get your warranty back)
2.Update.zip method: This method worked for some users, and didn’t work for some. In this, you just need to download this file, rename it to “update.zip” and install it the same way as you did to root, i.e. reboot into recovery and apply update.zip
3.False un-root: This isn’t actually unrooting, but is a little trick I used to get my warranty back.
1. First download and install Audio Manager aka Hide It Pro
2. Then use it to hide all your root-related apps (like superuser, titanium backup etc.), and done!
Note: The false un-root method isn’t actually un-rooting, as anyone with enough android knowledge will be able to tell that you still retain root access. The method only hides the notifications that you receive from superuser, when any app is requesting root access. Exercise caution when using this method, as all apps can have root access, and you wouldn’t even come to know about it.​
2. Backing up data using Titanium Backup Pro
Since you don’t need to have root access in order to install any custom recovery/rom, hence one of the major reason left to root is to backup your phone settings and data.
You can find plenty of apps on Play Store which can backup AND restore your data, but barely any other app can do it better than Titanium Backup. The free version also does quite a lot of stuff, but in this guide I’ll be explaining how to use the pro-version (v4.8.2), including how to do one-click backup as well as restore, and scheduling backups to run at a pre-defined time automatically.
First, install Titanium Backup Pro
Then, run the app.
(I recommend going through the app settings so that you can tweak it according to your preference)
Now, you can either backup apps (and their data) one-by-one or just backup all of them at once. In order to backup all of them at once, run the app, press menu button > batch > choose option “backup all apps + system data”, and then wait for the backup process to get over.
To restore backups after a data reset, run the app, press menu button > batch > choose option “restore missing app + all system data”.
Note #1: Restore all system data only if you are doing a data wipe. If you have flashed a new ROM altogether, then do not restore system data, only restore missing apps + data, else you will get force closes.
Note #2: Titanium backup automatically store its preferences/settings on your sd-card, and auto restores them after a wipe, so you do not need to bother about it again.
To set-up schedules, run the app, and then go to the “schedules” pane/tab, and then select the ones which were pre-set, or create new ones according to your need.
Titanium Backup has other uses as well (which you can find on your own), but the main important ones have been covered.
Note #3: Use some other app to backup and restore your contacts/call logs/messages...
I use GO Backup or sometimes, MyPhoneExplorer...​
3. Installing Stock Roms
First, download the stock rom of your choice from samfirmware.com
Then download beni.ops and Odin Multidownloader
Remove the sim card and memory card of your phone, and put it in download mode
Next, run Odin, and connect your phone to your windows computer. Odin should respond as detected. Then, select “Ops” as beni.ops. (Doing this would disable all other fields except “One Package”)
After this, select your desired stock rom in “One Package”.
Do not alter any other option other than those mentioned, let them remain as they are.
Make sure that the color of “COM PORT MAPPING” is yellow, and then click “Start”.
Odin will start giving different responses, and the timer in Odin would also start…now all you have to do is wait till Odin completes flashing (You will get a message “Pass”, usually within 10 minutes)
Note: Do not disconnect you phone while the process is on, and till you get that “Pass” message.
After this, it is optional but advised that you reboot into recovery mode and wipe data, otherwise you *may* face bootloops.​
4. Installing Custom Recovery
Q) I already have stock Samsung recovery. Why do I need a different recovery for?
A) The stock Samsung recovery has a very limited functionality, while other recoveries offer various other functions, and support other (better) filesystems also.
Also, to install any custom rom, you will need a custom recovery.
The most popular and commonly used recovery for Galaxy Fit is ClockworkMod Recovery v5 built by tj_style.
This recovery works with all custom roms, but it does not support backing up and restoring (Nandroid Backups) of stock roms (since samsung stock roms are of rfs filesystem).
Hence, you CAN install this recovery on stock roms, but you won’t be able to take (and restore) nandroid backups of stock roms.
However, pratyush.creed has modified this cwm5 to support backups of rfs (i.e. stock roms), you can get this from here
But for this guide, we will stick to the popular, tried and tested, cwm5 by tj_styles​
Your phone needs to be on gingerbread, as this recovery doesn’t work on Froyo.
Note: Even though rooting is not required for installing CWM, it is recommended to do so before, since you can root only from stock recovery, and CWM replaces the stock Samsung recovery.
To install this recovery:
Download the recovery file from the above link.
Also, download beni.ops and Odin Multidownloader
(Beni.ops and Odin are the same files used, so you don’t need to download them again)
Next, run Odin, and connect your phone to your windows computer. Odin should respond as detected. Then, select “Ops” as beni.ops.
Select the recovery file under “One Package”.
Do not alter any other option other than those mentioned, let them remain as they are.
Click “Start”.
Wait till odin completes flashing (might take upto 10 minutes)
Now, after your device has rebooted, restart into recovery mode to confirm that you have successfully installed ClockworkMod Recovery (CWM).
5. Installing Custom Roms
Though Samsung has possibly tried its best to create the best stock roms (compared to other manufacturers), it still has a lot of potential. Custom roms are made to achieve this potential, helping you get more returns from your Fit.​
Q) How to install custom roms?
A) Before proceeding, you will need to have any custom recovery installed, since the stock Samsung recovery cannot be used here. Preferably, use CWM5 by tj_style (the one explained above). Also, remember that your phone’s data (not the one stored on sd-card) will be erased/reset, so be sure to make a backup.
Now, download the custom rom of your choice from the Development Section of our sub-forum.
Optional: Check if the zip file you have downloaded is proper (i.e. not corrupt).
To do this, simply use WinZip (Windows) or other similar program to extract the file on your desktop. If the extraction has completed without any errors, then the file is proper, but if you get any errors while extracting, then the file is corrupt and you will have to re-download it.
Now, copy the file onto your sd-card.
Reboot into recovery mode.
Select “wipe data / reset”.
After this completes, select “wipe cache partition”.
After this, select “advanced”>”wipe dalvik cache”.
Now that you have wiped all data, select “install zip from sd” from the main recovery menu, then “choose zip from sdcard”.
[*] Optional, but recommended: Select “mounts and storage”>”format /system”.
(Important, if you are installing any variation of CyanogenMod 7 (cm7) for the first time, or are moving from a stock based custom rom to a cm based custom rom...else you will be stuck on the "android" text screen)
Now select the custom rom that you had placed on your card, and wait for it to install.
Optional: When the install completes, wipe data, cache and dalvik cache again (steps 5,6,7)
Select “reboot system now”, and be prepared to wait till the phone restarts. (Note: first boot may take upto 10 minutes, so do not panic)
Enjoy your new rom!!!
If you want to get back to your stock rom, you will have to flash the stock rom using Odin.
Also, all custom roms are pre-rooted, so you don’t have to bother with rooting again (though you might have to update superuser and its binaries)​
For your first custom ROM, I would suggest sticking to stock based custom roms...
Some sim cards aren't compatible for CM7 and CM9/10 (cm = short for CyanogenMod)...we don't know the cause and effect relationship between them, as of yet...
So, if your CM doesn't boot into the homescreen, try removing your sim card...
If it then boots up without any additional steps required, then unfortunately, you belong to the group of people who can't use CM7 with their current SIM...
The only workaround available are:
Use phone without SIM (unrealistic, since it wouldn't do the primary functions of a phone then)
Change your SIM card
Use stock based custom rom's, and forgo CM entirely
6. Creating and Deleting Sd-card Partition
Partitioning sd-card is basically virtually “dividing” your sd card into parts, so that you can use each one separately for different purposes.
So, in easy words, you can virtually increase your phone’s internal memory and ram (both of which are unsatisfactorily low in our device)
However, there is a disadvantage to partitioning, mainly a slightly slowed phone. This “slowdown” is caused mostly if you:
Have a low-speed (technical word = “class”) sd card
Have moved dalvik cache to sd partition that you have created
Have attempted to use a swap partition
But a lot of people don’t mind this slowdown a lot, since a partition allows them to have access to more apps.
Also, you will lose hot-swapability, i.e. you won’t be able to remove your card from your phone, will the phone is running.​
Before you proceed, you SHOULD backup all of your data on your card since it will be deleted, as the card will be formatted during the process.​
Q) How to create a sd partition?
A) You will need
• A good micro sd-card, with a class greater than 4
(the class is usually printed on the card itself, it’s the number inside the letter ‘C’)
• A rooted galaxy fit running android 2.3.x (preferably on a stock rom), with ClockworkMod recovery
Steps:
Backup all your data.
Reboot into CWM.
Go under “advanced”>”partition sd card”.
Select the size of your second partition (On my first try, I made a partition of 1024MB but found it too big with a lot of space unused, so I deleted the partition and made a new one of 512MB)
This is your choice, choose one depending on the total size of your card, the no. of apps/games you’ll have etc.
After selecting that, select swap size as 0MB (This one also is your choice, but I’ll explain why to take 0MB, and not anything else)
Now wait till the process is completed, and reboot.
As far as I know, CWM v5 makes a partition of EXT3 format, by default.
Q) Why to select swap size as 0MB?
A) Swap partition is made with the objective of utilizing it as VIRTUAL RAM. Now this may sound as a good thing, but in reality the ram in our fit is way faster than the average class 10 micro sd-card. So, instead of speeding up your system, it will slow down your system horribly after a certain point.
So, in short, you shouldn’t be using a swap partition, hence there is no point in creating one if you are not utilizing it.
You are still free to create a swap partition, but I shall not be providing support for that in this thread.​
Q) What if I want to delete all my partitions and get back my sd card the way it was?
A) There are a few ways to delete your partitions and reset your card, and I’ll explain the easiest one.
Backup the data on your card.
Make sure your card is in the phone’s card slot, and that your phone is booted/running.
Go into Settings>Storage, then select option “Unmount sd card”
When the card is unmounted, you will be able to select the option “Format sd card” (which you previously couldn’t)
Select the option and wait for it to complete.
If you want to delete the ext partition, I recommend doing it after a clean install of a stock rom. Else, make sure to move all your apps from the ext partition to your phone.
7. Setting up and using Link2sd
Now that you have created an ext partition, you need to make use of it (duh).
There are a lot of ways and scripts to transfer apps from your internal memory to the sd ext partition, but the most consistent method I found was Link2sd.
This method works across all roms (rooted stock and custom, both) that I’ve tried, even on all variations of CyanogenMod7 (CM7) as well as on ICS CM9 and JB CM10, and is very easy to setup and use.
However, if a custom rom already has DarkTremor's a2sd (a2sdgui app will be present) or any similar script, then DO NOT configure them.
For example: Creeds v3 has a2sdgui, and if i want to use Link2sd, then after flashing Creeds, I SHOULD NOT run a2sdgui, and directly install (and configure) Link2sd...if you run/configure a2sdgui, then it will clash with the working of Link2sd.
Similarly, if any custom rom has any memory hack already implemented, then you cannot use Link2sd...​
Steps to setup Link2sd:
Download Link2sd from Play Store (it’s a free app).
After it gets installed, run it, and allow root access.
You will get a message to select the format of your sd partition, select “ext3”.
Link2sd will then automatically create mount scripts that it requires to work, and will then tell you to reboot your phone.
Do a proper reboot, and not a ‘hot reboot’.
After rebooting, open up Link2sd, press menu then select “settings”.
Select/check the options “automatically link newly installed applications to sd”, “auto link notification”, “relink lib files at boot” (and “fast scroll”, if you want).
For “install location” option, select “internal”.
Then go to “auto link settings” and select/check all the three options (you can skip/ unselect “link dalvik-cache file” if you wish)
Done
Now, every new app that you will install will automatically be moved to your sd ext partition.​
Link2sd is also an excellent (and fast loading) app manager, with which you can freeze, uninstall, re-install…though you can move only user apps to sd-ext partition.
Also, there is no point in having your entire phone memory empty, so you probably should unlink the dex (dalvik cache) of your apps. I usually link only the apk and lib files, and leave the dex files unlinked and on the phone storage, so as to avoid any sluggishness in operation., though if your phone memory still fills up, you can link the dex of your rarely-used apps, and leave the dex of important and frequently used apps on the phone storage.​
Suppose a custom rom has s2e/app2sd pre-implemented, then after a fresh install, FREEZE the app (rather than uninstall), and then install Link2sd...
Also, if you get error "mount script not created", then choose partition as ext4 (rather than ext3 mentioned below), even though your partition might be ext3...(don't know why this happens with some roms )
If on some ROM, you get “device/resource busy”, then you need to format your SD-EXT partition from CWM (should be under “mounts and storage”)
[DO NOT confuse this with deleting and re-creating a partition]
8. Installing apk’s through root explorer method.
At times, some of your apk files won’t get installed in the normal way, so you can use this approach to install them. This method is coomonly referred to as "root explorer method".
For this, you will need:
•A rooted phone
•Root Explorer or any other file manager.
Since root explorer isn’t a free app, you can use this free File Manager (my personal preference).
If you are unable to uninstall a newer version of any app, then first uninstall the old version, and then use this method.
Steps:
Get the apk file of the app that you want to install.
Now launch Root Explorer
On the top left side, it will be written as “Mount as r/w”, click that, and allow root access. (basically mount system as read and write, if you are using other file managers)
Now place the apk file at either /data/app or /system/app (if you want it as a system file)
Now set appropriate permissions (For /data/app, the default permissions are rwx rwx rwx and for /system/app, the default permissions are rw- r-- r--)
Reboot your phone, and then check your app drawer, you will find your app installed.
12. Bootloops:
If you have flashed any custom rom/recovery/hack/kernel/update.zip, and unfortunately, have got stuck in a bootloop (i.e. you cannot reach the app launcher as the phone keeps rebooting again and again), then before asking for help, do try wiping data, cache, and dalvik cache from recovery mode...
This should stop bootloops (in lots of cases)...​
13. How to reclaim warranty?
Let's just say you need your warranty back for some reason...but have done any of the above stuff (which voids your warranty)...
Then all you got to do is flash any stock rom (preferably, of your region), and you will have your warranty back
(This, ofcourse, assumes that you had warranty, in the first place)​
14. Battery care
A lot of people have said that their battery has swollen. If this is the case, then this could be dangerous for YOUR HEALTH.
If this happens, you SHOULD replace your battery.​
Q) Why would the battery swell up?
A) My phone's battery looks safe enough, so I do not know the perfect cause. But from the users who complained about this, I did notice that most of them just leave their phones plugged in, unattended, for more than 4-5 hours at end (Usually, they just leave it to charge overnight)
So, if you do this on a regular basis, then watch out!​
Q) How do I know if its swollen?
A) To know if its swollen, just see if the battery surface is smooth or not, from all the sides. If there is any swelling, you will notice it.
Also, if you get REALLY POOR battery life, (only 3-4 on single full charge, with light usage), then this could be an indication that you have battery problems. [Just to confirm, ask other fellow users how much usage they get on that rom and baseband, since this could happen due to ROM and kernel also.]​
Q) What do I do if it's swollen?
A) There is no other option but to replace the battery with a new one. I STRONGLY ADVICE to buy them from your local Samsung Service Center. Avoid online sellers, or other 3rd party batteries, as they may not be proper.​
Q) Any precautions that can be taken?
A) Yup, DO NOT LEAVE YOUR PHONE TO CHARGE FOR LONG PERIODS, ALL THE TIME.
That's what has been deduced from the people who have complained.
Take Care!!​
9. Nandroid Backups
Q) What are Nandroid Backups?
A) Nandroid Backups are like an exact copy image of your phone’s state, saved on your sd card. It stores all your apps, data, settings, sd-ext etc. of the phone (obviously, the state when you took the backup). Nandroid Backups are a very convenient way to restore your data after something has gone wrong (or want to change between roms), and their size can be anywhere starting from 150mb+.
If you want to test some stuff from the development section (like different mods/hacks/scripts), it is advisable to make a Nandroid Backup before you proceed...​
Q) How to make Nandroid Backups?
A) Perquisites to make a nandroid backup:
•ClockworkMod Recovery (any version) on your galaxy fit.
•Plenty of free space on your sd card (this depends on how many apps you have, my backups usually average around 450-500 MB)
Steps:
Do a clean reboot into ClockworkMod Recovery (i.e. shutdown properly, then reboot into recovery mode)
Go to “backup and restore”>”backup”
Wait for the process to get completed, and you are done!
The backup that you just made has been saved to your sd-card, in a folder named clockworkmod (complete location is /mnt/sdcard/clockworkmod/backup).
Restoring:
Now, suppose, while flashing any rom, you are stuck in a never-ending bootloop, and you have wiped everything (i.e. data, cache, dalvik cache), and just want to get back the way it was, then just follow these steps to restore:
Boot into CWM
Wipe data, cache, and dalvik cache (optional, but recommended).
Go to “backup and restore”>”restore”, and then select your backup.
Wait for it to complete (time taken depends on the size of your backup, which in turn depends on the number of apps that you had installed), and reboot
You will find that you are now back to last state before you did that backup, with all your apps, settings etc. the way it was left.
If you keep more than one nandroid backup, you may find it confusing to remember which one is what…
So you can rename them in the following way:
Suppose the default name of my backup of a cm7 rom is 2012-03-29.14.04.59 , then I can rename it as cm72012-03-29.14.04.59
In this way, if you ever get a md5 mismatch error while restoring, then you can simply edit it back to the way it was.
However, if you still get an md5 mismatch error, then you can use this method suggested by fellow xda member, arhant. Though if the backup wasn’t created by you (i.e. you took it from someone else), then exercise caution while doing this.​
10. Overclocking
Q) What is overclocking?
A) Overclocking refers to running your processor above the “safe” limit set by Samsung (or the manufacturer, in general). This limit is usually set so that the battery life is extended, less overheating problems occur as well as minimum possible damage is done to the processor in the long run.​
Why to overclock:
Helps make Fit more “usable”, i.e. makes launcher smooth, games a little less laggy etc.
Why not to overclock (Most of this happens only if you don’t overclock properly):
Poor battery life
Abnormal heating of the phone
Increased instability
Q) How to overclock (oc) Galaxy Fit?
A) In order to overclock Galaxy Fit, you need to have a custom kernel, as the stock kernel doesn’t support overclocking, as well as root access.
Note: Stock roms can be overclocked! They just need another kernel, the in-built kernel cannot be overclocked.
• If you want to overclock on stock (at your own risk), you can flash any kernel from this via cwm (so, obviously you need cwm, stock recovery won’t do).
• Most custom roms have oc kernel in-built, so you usually don’t need to flash anything extra.
After you have a custom overclock-able kernel, you just need to install either No-frills CPU Control or SetCPU for Root Users (No-frills is free ) or any other such app, run them, and select the desired max frequency, governor, and i/o scheduler. (Don’t set the max frequency above 800+ mhz, unless you know what you are doing)
You have to use trial-and-error to find out the combination of governor, i/o scheduler, and max frequency, which suits your need…and you will get different results on different kernels, roms and basebands, so keep experimenting.​
11. Bricked phone
Q) What do you mean by a "bricked" phone??
A) A "bricked" phone is a phone which cannot start normally, AND cannot be rebooted into both, the recovery mode as well as the download mode...thus, effectively, it becomes just a paperweight, i.e. a brick
It is more of a "state" your phone can go into, if you do things wrong...​
If your phone can enter recovery mode OR download mode, then it is not bricked!
You can try and fix it yourself!​
If your phone can enter recovery mode, (and assuming you have a custom recovery installed), then you simply have to flash any custom rom to get your phone back in working condition.
If your phone can enter download mode, then you can install any stock rom (via odin), to get back your phone in working condition.
Note: These solutions are general in nature, i.e. they will work for the majority of cases, but may not work for some.​
HOWEVER, IF YOUR PHONE IS BRICKED,
Then there is nothing much that we can do...only the samsng service center will be able to repair it (they replace the motherboard).​
15. Android Debugging Bridge (ADB)
To put it simply, adb is two different applications - one running on your computer (Windows, Linux or Mac) and one running on your phone (which you don’t have to bother about). When your phone is connected, and USB debugging is enabled, you can issue commands and communicate with the phone using your computer screen and keyboard.
Your Android phone uses a modified Linux kernel and tools as a base. This means that quite a few Linux commands can be sent via the adb server (the one running on your computer) to the adb client (the one running on your phone) and they will be executed. – Android Central​Q) How do I setup ADB on my Windows PC?
A) With the help of my friend wilfredcool007, I have made a really simple method to use adb and also provided some tools for hassle-free logcats. This method is portable in nature (you do not have to install any untrusted application), does not need large downloads, neither the full Android SDK installation. You will just have to download a small compressed file, which is all that you require.
Thank You Wilfred!
Make sure you have the device drivers installed beforehand. If you have been following this guide since the beginning, you will have it on your computer. If not, just simply refer the beginning of this thread.
Steps:
Download this file: ADB & Logcat Tools.zip
Extract the .zip file to any suitable location, wherever you wish. I extracted it on to C:\Android Debugging Bridge just so that it’s easy to remember where it is.
Now, once you’ve extracted the zip, you will find 7 files in it [of which the 3 files named as “Logcat xxxxxx”, and “dmesg”, will be used in the later part of this guide for making logcats].
To launch ADB, just hold the “Shift” key and right click on a blank area in the folder, and in the drop down menu which follows, select the option “Open Command Window Here”.
And you’re done! Now you can use any of the adb commands that you wish! It really is this simple!
Some common ADB commands are:
Code:
adb devices – list all connected devices
adb push <local> <remote> – copy file/dir to device
adb pull <remote> [<local>] – copy file/dir from device
adb sync [ <directory> ] – copy host->device only if changed
adb shell – run remote shell interactively
adb shell <command> – run remote shell command
adb emu <command> – run emulator console command
adb logcat [ <filter-spec> ] – View device log
adb forward <local> <remote> – forward socket connections forward specs are one of: tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp – list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> – push this package file to the device and install it
adb uninstall [-k] <package> – remove this app package from the device (‘-k’ means keep the data and cache directories)
adb bugreport – return all information from the device that should be included in a bug report.
adb help – show this help message
adb version – show version num
adb wait-for-device – block until device is online
adb start-server – ensure that there is a server running
adb kill-server – kill the server if it is running
adb get-state – prints: offline | bootloader | device
adb get-serialno – prints: <serial-number>
adb status-window – continuously print device status for a specified device
adb remount – remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] – reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader – reboots the device into the bootloader
adb root – restarts the adbd daemon with root permissions
adb usb – restarts the adbd daemon listening on USB
More information regarding some common ones will come soon.
You can also refer Google’s Official Page too.​
16. Logcats
A lot of time, you'll see developers asking for logcat. Viewing a logcat is usually the best, and in some cases, the only way to diagnose a problem.
You can do it two ways:
Within the device, through apps like aLogcat or Catlog or any other application that is capable of logging (This is self explanatory, all you got to do is download and run the app, and the app will do the work. Do check out the options to tweak out the settings and other stuff. I shall not be providing help for these in this thread.)
With ADB (explained further)
Thanks to the zip provided in the previous step, it’s really easy to do so via adb.
Steps:
If you haven’t downloaded it already, do download the ADB & Logcat Tools.zip (it’s the same file mentioned above) and extract it to a suitable location.
You have two options now.
You can either run adb as explained above and use the command
Code:
adb logcat >logcat.txt
There will be no further activity on the screen, but the logging will start. Recreate the problem that you wanted, and when you need to stop the logcat, just press “Ctrl” + “C” [Hold Ctrl and press C], and then press “Y” and “Enter” key to stop logging.
You will notice that a file named logcat.txt has appeared, and when you open the file in Notepad, you shall see its contents.
Example:
Code:
--------- beginning of /dev/log/system
I/ActivityManager( 1019): Starting: Intent { flg=0x14000000 cmp=com.whatsapp/.Conversation (has extras) } from pid 18867
D/VoldCmdListener( 891): volume shared /mnt/sdcard ums W/ActivityManager( 1019): Activity pause timeout for HistoryRecord{405690f0 com.whatsapp/.Conversation}
D/VoldCmdListener( 891): volume shared /mnt/sdcard ums
I/ActivityManager( 1019): Starting: Intent { flg=0x14000000 cmp=com.whatsapp/.Conversation (has extras) } from pid 18867
W/InputManagerService( 1019): Starting input on non-focused client [email protected] (uid=10080 pid=18867)
D/VoldCmdListener( 891): volume shared /mnt/sdcard ums
D/VoldCmdListener( 891): volume shared /mnt/sdcard ums
D/MusicControls( 1279): Updating Music Controls Visibility
D/MusicControls( 1279): Music is not active
W/InputManagerService( 1019): Window already focused, ignoring focus gain of: [email protected]
D/MusicControls( 1279): Updating Music Controls Visibility
D/MusicControls( 1279): Music is not active
W/InputManagerService( 1019): Window already focused, ignoring focus gain of: [email protected]
D/StatusBarService( 1279): DISABLE_CLOCK: yes
D/StatusBarService( 1279): DISABLE_NAVIGATION: yes
W/ProcessStats( 1019): Skipping unknown process pid 26719
I/ActivityManager( 1019): Start proc mobi.mgeek.TunnyBrowser:DolphinNotification for service mobi.mgeek.TunnyBrowser/com.dolphin.browser.message.C2DMService: pid=26767 uid=10119 gids={3003, 1015, 1007}
I/ActivityManager( 1019): Process com.google.android.talk (pid 18915) has died.
I/ActivityManager( 1019): Process mobi.mgeek.TunnyBrowser:DolphinNotification (pid 26767) has died.
W/ProcessStats( 1019): Skipping unknown process pid 27439
I/TelephonyRegistry( 1019): notifyDataConnection: state=0 isDataConnectivityPossible=false reason=null interfaceName=null networkType=2
I/TelephonyRegistry( 1019): notifyDataConnection: state=1 isDataConnectivityPossible=true reason=null interfaceName=null networkType=2
I/ActivityManager( 1019): Start proc com.google.android.apps.uploader for broadcast com.google.android.apps.uploader/.ConnectivityBroadcastReceiver: pid=27556 uid=10005 gids={3003}
Logcats get longer the longer they run. So it is advisable that you run the logcat and immediately proceed to recreate the problem.
Also, paste the resulting logcat on sites like Pastebin and share the link to the dev!​
Now, you must be wondering what the rest of the files in the Zip were for…
Well, those files are pre-configured commands for logcats to run. All that has to be done is double click the .bat files, and logging shall start. To stop logging, as stated above, press CTRL+C, then Y and ENTER.
Remember: Do delete/rename/move the output logcat file before creating a new logcat with the following files.
Files:
Logcat 1 (Long and Detailed).bat : Normal Logcat command. Same result as the example given above.
Logcat 2 (Short and Errors only).bat : Shorter Logcat command. Omits out Verbose, Debug and Info. Displays/Filters only Warning, Error And Fatal. Useful when logcat duration is very long, as this displays only the error and fault messages. Example:
Code:
--------- beginning of /dev/log/system
11-13 12:13:40.099 1019 1019 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 12:20:34.359 1019 1360 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 12:22:31.069 1019 1045 W ActivityManager: Activity pause timeout for HistoryRecord{4085daf8 com.quoord.tapatalkxdapre.activity/.forum.ForumNavigationActivity}
11-13 12:23:42.009 1019 1402 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 12:28:36.779 1019 28921 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 12:31:20.980 1019 1402 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 12:58:05.899 1019 1057 W ProcessStats: Skipping unknown process pid 29887
11-13 13:06:11.630 1019 1045 W ActivityManager: Activity pause timeout for HistoryRecord{405d5100 com.android.phone/.InCallScreen}
11-13 13:06:14.400 1019 26640 W WindowManager: Layout repeat skipped after too many iterations
11-13 13:06:14.400 1019 26640 W WindowManager: Layout repeat skipped after too many iterations
11-13 13:06:14.400 1019 26640 W WindowManager: Layout repeat skipped after too many iterations
11-13 13:06:14.400 1019 26640 W WindowManager: Animation repeat aborted after too many iterations
11-13 13:06:14.420 1019 1211 W WindowManager: Layout repeat skipped after too many iterations
11-13 13:06:14.750 1019 1211 W WindowManager: Animation repeat aborted after too many iterations
11-13 13:06:21.069 1019 1045 W ActivityManager: Activity idle timeout for HistoryRecord{405d5100 com.android.phone/.InCallScreen}
11-13 13:17:41.240 1019 28924 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 14:02:27.259 1019 1328 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 14:06:00.389 1019 1330 W ActivityManager: Scheduling restart of crashed service com.whatsapp/.messaging.MessageService in 5000ms
11-13 14:06:03.459 1019 28922 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 14:09:21.689 1019 21101 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 14:09:23.329 1019 1330 W ActivityManager: Scheduling restart of crashed service com.jim2/.UpdateService in 5000ms
11-13 14:09:35.339 1019 1045 W ActivityManager: Launch timeout has expired, giving up wake lock!
11-13 14:09:35.399 1019 1057 W ActivityManager: Process ProcessRecord{406b4718 32036:com.imgurforandroid/10108} failed to attach
11-13 14:09:41.639 1019 1045 W ActivityManager: Activity pause timeout for HistoryRecord{4050c488 com.imgurforandroid/.activity.LaunchUploadUi}
11-13 14:09:41.679 1019 1034 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 14:10:23.679 1019 1033 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 14:11:00.629 1019 28924 W ActivityManager: startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { cmp=com.imgurforandroid/.activity.ImageDetails bnds=[0,138][240,189] (has extras) }
11-13 14:11:25.639 1019 1033 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 14:11:58.979 1019 1045 W ActivityManager: Activity pause timeout for HistoryRecord{408690f0 com.quoord.tapatalkxdapre.activity/.forum.ForumNavigationActivity}
11-13 14:12:26.129 1019 1360 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 14:13:20.449 1019 1402 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 14:13:53.159 1019 28922 W ActivityManager: Duplicate finish request for HistoryRecord{407186d8 com.quoord.tapatalkxdapre.activity/.forum.ForumNavigationActivity}
11-13 14:36:20.180 1019 1034 W InputManagerService: Window already focused, ignoring focus gain of: com.andr[email protected]
11-13 14:36:23.110 1019 1034 W ActivityManager: Scheduling restart of crashed service com.imgurforandroid/.ImgurUploadService in 5000ms
11-13 14:36:53.479 1019 26640 W InputManagerService: Starting input on non-focused client [email protected] (uid=1001 pid=1304)
11-13 14:36:56.649 1019 1033 W BackupManagerService: dataChanged but no participant pkg='com.android.providers.settings' uid=10092
11-13 14:36:56.799 1019 1328 W BackupManagerService: dataChanged but no participant pkg='com.android.providers.settings' uid=10092
11-13 14:37:58.840 1019 1330 W InputManagerService: Window already focused, ignoring focus gain of: [email protected]
11-13 14:43:51.779 484 509 E ActivityThread: Failed to find provider info for com.opera.branding.BrandingProvider
11-13 14:43:51.779 484 509 E ActivityThread: Failed to find provider info for com.opera.branding.BrandingProvider
11-13 14:43:51.789 484 510 E ActivityThread: Failed to find provider info for com.opera.branding.BrandingProvider
Logcat 3 (Radio related only).bat : Displays only messages related to radio (telephony). Useful whenever your developer asks for a Radio logcat. Example:
Code:
D/RILJ ( 1304): [1876]> QUERY_NETWORK_SELECTION_MODE
D/RILJ ( 1304): Serial: 1875
D/RILJ ( 1304): Error: 0
D/RILJ ( 1304): [1875]< REGISTRATION_STATE {1, 1777, 0000d72a}
D/RILJ ( 1304): Serial: 1876
D/RILJ ( 1304): Error: 0
D/RILJ ( 1304): [1876]< QUERY_NETWORK_SELECTION_MODE {0}
D/GSM ( 1304): Poll ServiceState done: oldSS=[0 home TATA DOCOMO TATA DOCOMO 405039 EDGE CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false] newSS=[0 home TATA DOCOMO TATA DOCOMO 405039 EDGE CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false] oldGprs=0 newGprs=0 oldType=EDGE newType=EDGE
D/GSM ( 1304): [DataConnection] Stop poll NetStat
D/GSM ( 1304): [DataConnection] Start poll NetStat
D/RILJ ( 1304): [1877]> SCREEN_STATE: false
D/RILJ ( 1304): Serial: 1877
D/RILJ ( 1304): Error: 0
D/RILJ ( 1304): [1877]< SCREEN_STATE
D/GSM ( 1304): [DataConnection] Stop poll NetStat
D/GSM ( 1304): [DataConnection] Start poll NetStat
D/RILJ ( 1304): [1878]> SCREEN_STATE: true
D/RILJ ( 1304): [UNSL]< UNSOL_RESPONSE_NETWORK_STATE_CHANGED
D/RILJ ( 1304): Serial: 1878
D/RILJ ( 1304): Error: 0
D/RILJ ( 1304): [1878]< SCREEN_STATE
D/RILJ ( 1304): [1879]> OPERATOR
D/RILJ ( 1304): [1880]> GPRS_REGISTRATION_STATE
D/RILJ ( 1304): [1881]> REGISTRATION_STATE
D/RILJ ( 1304): Serial: 1879
D/RILJ ( 1304): Error: 0
D/RILJ ( 1304): [1879]< OPERATOR {TATA DOCOMO, TATA DOCOMO, 405039}
D/RILJ ( 1304): [1882]> QUERY_NETWORK_SELECTION_MODE
Dmesg.bat : Prints messages from the kernel, useful as tool for debugging drivers and other kernel code. Use this whenever the developer asks to get a dmesg output. Example:
Code:
# c027ce40 : [HSIL] mdp_suspend_sub(1387) will cancel_delayed_work
<4>[34607.196686] [HSIL] mdp_suspend_sub(1391) will flush_workqueue
<4>[34607.196731] [HSIL] mdp_suspend_sub(1395) will atomic_read
<4>[34607.196773] [HSIL] mdp_suspend_sub(1400) will mdp_pipe_ctrl
<4>[34607.196816] [HSIL] mdp_suspend_sub(1402) after mdp_pipe_ctrl
<6>[34607.196854] # c03d7894 :
<6>[34607.196883] # c03d7894 :
<6>[34607.196909] # c03cb4a0 :
<6>[34607.196939] early_suspend: after calling suspend handlers
<6>[34607.205456] early_suspend: after calling sync_work_queue
<6>[34607.205508] early_suspend: abort label / before spin lock
<6>[34607.205564] early_suspend: unlocked main_wake_lock
<6>[34607.205599] early_suspend: end
<4>[34607.205636] [BACLKIGHT] : 17
<4>[34607.205668] Platform V:17, Find V:1
<4>[34607.205714] LCD Backlight re-init - wakeup time tune:1, lcd:32
<4>[34607.205926] [BACLKIGHT] : 15
<4>[34607.205956] Platform V:15, Find V:1
There you have it! Life made simpler, just double click and you are done!​
Q) What’s the difference between Logcat and Dmesg?
A) Read this for info.​
Hope this guide helped you.
I appreciate feedback and constructive criticism, but please, no “haters”/”trolls”.
Whatever questions/doubts you have regarding this guide, then please post it here itself…I don’t guarantee replying tech support questions via pm .
Do consider clicking on the “thanks” button rather than just posting thanks, and also joining us on our Facebook Group
a.cid said:
...
• If you want to overclock on stock (at your own risk), you can flash any kernel from this via cwm (so, obviously you need cwm, stock recovery won’t do)....
Click to expand...
Click to collapse
Pratyush mentioned in:
http://forum.xda-developers.com/showpost.php?p=24719114&postcount=1387
a cwm for rfs / see download-link, therefore exists in theory the possibility to oc stock-roms.
zcop said:
the first troll here hehe
What is s5670? Can i eat it?
Ok good work for newbie - who messup forum
Click to expand...
Click to collapse
Idk what s is, but 5670 are part of the number series...
You know 1 2 3 4 5 6 7 0
martin_s5670 said:
Pratyush mentioned in:
http://forum.xda-developers.com/showpost.php?p=24719114&postcount=1387
a cwm for rfs / see download-link, therefore exists in theory the possibility to oc stock-roms.
Click to expand...
Click to collapse
Ohhh sorry I totally forgot about that...will update the thread tomorrow from comp...
But I haven't tried it personally :/
And other recoveries (like the touch ones) give errors while flashing a few stuff...
Sent from my g-fit using xda premium
martin_s5670 said:
Pratyush mentioned in:
http://forum.xda-developers.com/showpost.php?p=24719114&postcount=1387
a cwm for rfs / see download-link, therefore exists in theory the possibility to oc stock-roms.
Click to expand...
Click to collapse
Ohhh wait, stock rom can be oc'ed, if you install another custom kernel...
That rfs support is for backups and restore...
The post will be clearer after I'll update it...
Sent from my g-fit using xda premium
Aspire said:
Nice, but the links aren't working.
Click to expand...
Click to collapse
Which ones??
Edit: oh okay, will fix them
Thank you
Sent from my g-fit using xda premium
Aspire said:
Nice, but the links aren't working.
Click to expand...
Click to collapse
Deleting
xn--http-fb7a//
in adress helps!
martin_s5670 said:
Deleting
xn--http-fb7a//
in adress helps!
Click to expand...
Click to collapse
Links updated...
i had typed in this in ms word, and it has messed around with the foramtting...
anyways, if you still find something wrong, do inform me
edit: added pratyush's recovery, as well as updated post to clarify...
a.cid said:
...
edit: added pratyush's recovery, ...
Click to expand...
Click to collapse
Pardon, its not pratyush's recovery, ..its of tj's !, see:
http://forum.xda-developers.com/showpost.php?p=24749890&postcount=1392
martin_s5670 said:
Pardon, its not pratyush's recovery, ..its of tj's !, see:
http://forum.xda-developers.com/showpost.php?p=24749890&postcount=1392
Click to expand...
Click to collapse
I know
The most popular and commonly used recovery for Galaxy Fit is ClockworkMod Recovery v5 built by tj_style.
This recovery works with all custom roms, but it does not support backing up and restoring (Nandroid Backups) of stock roms (since samsung stock roms are of rfs filesystem).
Hence, you CAN install this recovery on stock roms, but you wont be able to take (and restore) nandroid backups of stock roms.
However, pratyush.creed has modified this cwm5 to support backups of rfs (i.e. stock roms), you can get this from here
But for this guide, we will stick to the popular, tried and tested, cwm5 by tj_styles
Click to expand...
Click to collapse
a.cid said:
I know
...
However, pratyush.creed has modified this cwm5 to support backups of rfs
...
Click to expand...
Click to collapse
I said, not prat has modified, its tj's.
first of all I really thank you for this wonderful guide...
btw,the main reason to write this post -
what difference does it make if i select EXT4 instead of EXT3 while partitioning SD card
thnx
yzak58 said:
first of all I really thank you for this wonderful guide...
btw,the main reason to write this post -
what difference does it make if i select EXT4 instead of EXT3 while partitioning SD card
thnx
Click to expand...
Click to collapse
The cwm mentioned in my post doesn't give you the option to select ext3 or ext4
It, by default, partitions it to ext3...
Typed on a small touchscreen
Hey friend.. i m unable to root my mobile...
I have installed "GINGERBREAD.DXKT7 2.3.6"
So please say how can i root this stock rom...
akash6448 said:
Hey friend.. i m unable to root my mobile...
I have installed "GINGERBREAD.DXKT7 2.3.6"
So please say how can i root this stock rom...
Click to expand...
Click to collapse
Can you list the steps you did?
Also check if you have downloaded the update.zip correctly (simply try and extract it on your comp)...
Typed using a small touchscreen

[App] [2.3+] OTA Verifier

Whenever there's an over-the-air (OTA) update sent-out or made available (either leaked or official), there's always a large number of users that end-up reporting that their installations have failed with the infamous and dreaded "E:Error in /sdcard/xxx.zip (Status 7) installation aborted." error message. So, I decided to try to write an app that would help folks figure-out what the issues might be so that they can get their OTA update installed.
The OTA Verifier app can be used to evaluate an over-the-air (OTA) update.zip or other flashable .zip file before you attempt the install or afterwards to help you figure-out why the installation may have failed. OTA Verifier will point-out what files and conditions are being tested so that you can more easily attempt to correct these issues.
Play Market Link (free!): OTA Verifier (beta)
Do I have to be rooted to use this?
No, but rooted devices will have more conditions that the app will be able to test/evalute because it will have access to protected files that non-rooted devices don't.
Will the app actually do the installation or change anything on my device?
No. The app will only evaluate the expressions and conditions contained inside the updater-script file inside the .zip file that's trying to be installed. None of the functions or commands that try to modify your device (i.e., delete/patch/format/extract, etc.) will be evaluated or executed. The app basically operates in "read-only" mode with respect to the .zip file being evaluated.
Will this app work on older devices or flashable .zip files that use the amend update-script files?
No, this app evaluates and interprets the newer edify updater-script files (notice the "r" in "updater").
How do I use this app?
Install and launch the app
Click the "Select File" button and navigate to desired .zip file
Long-press (press and hold) the file entry for the desired .zip file
Click the "Verify OTA .zip" file pop-up
Wait for the app to process the file (should take under a minute, depending on your device)
View the displayed results (text will also be copied to the clipboard)
Miscellaneous info:
1. Savvy root users probably already know that after a failed .zip file installation, you should be able to view the /cache/recovery/log file to view the information about what might have failed. OTA Verifier will try to uncover all of the issues and not just the first one that causes the installation to fail.
2. While I wrote this app principally to evaluate OTA update.zip files, the edify updater-script files are used and written by ROM devs and others who created flashable .zip files. This app can be used to evaluate those file's updater-script files, too.
How does this all work?
Here's the basic outline/structure of what the app does:
1. the .zip file is selected by the user via the file selector
2. list of frozen system apps are identified for later reporting
3. the updater-script file is extracted from the META-INF/com/google/android folder in the .zip file
4. this updater-script file is parsed and converted into reverse polish notation (RPN) for execution
5. edify functions that might modify your device are NOT evaluated; these include apply_patch, delete, delete_recursive, format, mount, package_extract_dir/file, run_program, set_perm[_recursive], symlink, unmount, write_raw_image, etc.
6. note: the update-binary executable is not used by or involved in this app; the edify script interpreter that the app uses was written by me, in Java, specifically for this app
7. the remaining edify script functions that test conditions (such as apply_patch_check, apply_patch_space, assert, concat, file_exists, file_getprop, getprop, greater_than_int, if-then-else-endif, ifelse, is_substring, less_than_int, read_file, ui_print, and various operators (!, !=, &&, (, ), ;, ||, +, ==)) are evaluated using an operand/operator stack from the RPN expression parsed from the updater-script statements
8. expressions that fail (return a null-string) or are bypassed (usually because a resource (file/partition) is protected/secured against read-access) are reported for the user
9. after the entire script has been processed, the results are displayed in a pop-up window on the device and the text of those results are copied to the clipboard
Planned / future features:
- preferences / settings
- logging of the output to a file on the /sdcard
- test if .zip file is signed or not
- display more stats
- "explanation mode" to interpret, in English, what the edify commands are testing
Successfully tested on:
Samsung Galaxy Nexus (CDMA) 4.1.1
Samsung Galaxy Nexus (GSM) 4.1.2
Asus Nexus 7 tablet 4.1.2
Motorola Droid X 2.3.4
The following edify commands/functions/operators are supported:
Code:
[COLOR="blue"]apply_patch_check[/COLOR] // apply_patch_check ( <filepath>, <sha1-checksum> [ , <sha1-checksum> ... ] )
// apply_patch_check ( <compoundvalue> )
<compoundvalue> := [ EMMC : <filepath> : <sha1-size> : <sha1-checksum> [ <sha1-size> : <sha1-checksum> ... ]
[ MTD : <dev-block> : <sha1-size> : <sha1-checksum> [ <sha1-size> : <sha1-checksum> ... ]
[ vfat : <dev-block> : <sha1-size> : <sha1-checksum> [ <sha1-size> : <sha1-checksum> ... ]
<dev-block> := filename in /dev/block
[COLOR="Blue"]apply_patch_space[/COLOR] // apply_patch_space ( <bytes> )
[COLOR="blue"]assert[/COLOR] // assert ( <expression> )
[COLOR="blue"]concat[/COLOR] // conact ( <string> , <string> )
[COLOR="blue"]file_exists[/COLOR] // file_exists ( <filepath> )
[COLOR="blue"]file_getprop[/COLOR] // file_getprop ( <filepath>, <propertyname> )
[COLOR="blue"]getprop[/COLOR] // getprop ( <propertyname> )
[COLOR="blue"]greater_than_int[/COLOR] // greater_than_int ( <integer>, <integer> )
[COLOR="blue"]if then else endif[/COLOR] // if <condition> then <expression> [ else <expression> ] endif
[COLOR="blue"]ifelse[/COLOR] // ifelse ( <condition>, <then-expression> [ <else-expression> ] )
[COLOR="blue"]is_substring[/COLOR] // is_substring ( <string> , <string> )
[COLOR="blue"]less_than_int[/COLOR] // less_than_int ( <integer>, <integer> )
[COLOR="blue"]read_file[/COLOR] // read_file ( <filepath> )
[COLOR="blue"]ui_print[/COLOR] // ui_print ( <string> ) parsed & executed, but output not displayed
[COLOR="blue"]![/COLOR] // logical NOT operator
[COLOR="blue"]!=[/COLOR] // not equals operator
[COLOR="blue"]&&[/COLOR] // logical AND operator
[COLOR="blue"]([/COLOR] // open paren: precedence / grouping
[COLOR="blue"])[/COLOR] // close paren: precedence / grouping
[COLOR="blue"];[/COLOR] // sequence/imperative (terminates & separates statements)
[COLOR="blue"]||[/COLOR] // logical OR operator
[COLOR="blue"]+[/COLOR] // string concatenation operator
[COLOR="blue"]==[/COLOR] // equals operator
[COLOR="blue"]#[/COLOR] // comment line
The following edify functions are NOT supported (the majority of them because they are intended to modify your device):
Code:
[COLOR="blue"]apply_patch[/COLOR]
[COLOR="blue"]delete[/COLOR]
[COLOR="blue"]delete_recursive[/COLOR]
[COLOR="blue"]format[/COLOR]
[COLOR="blue"]mount[/COLOR]
[COLOR="blue"]package_extract_dir[/COLOR]
[COLOR="blue"]package_extract_file[/COLOR]
[COLOR="blue"]run_program[/COLOR]
[COLOR="blue"]set_perm[/COLOR]
[COLOR="blue"]set_perm_recursive[/COLOR]
[COLOR="blue"]symlink[/COLOR]
[COLOR="blue"]unmount[/COLOR]
[COLOR="blue"]write_raw_image[/COLOR]
[COLOR="blue"]is_mounted[/COLOR] // innocuous, but still not supported
[COLOR="blue"]stdout[/COLOR] // innocuous, but still not supported
[COLOR="blue"]show_progress[/COLOR] // innocuous, but still not supported
[COLOR="blue"]set_progress[/COLOR] // innocuous, but still not supported
Keywords:
OTA, over-the-air, updater-script, edify, amend
Screenshots:
updated 9-May-2014
updated to version 1.3
Updated app with root-enabled file browser for navigating to protected/secured directories like /cache to select OTA's update zip file.
Full change log to date:
[v1.3 - 04-Nov-2012]:
- for rooted devices, change file browser to allow navigating and selecting .zip files in protected directories (like /cache)
[v1.2 - 29-Oct-2012]:
- minor fix to handle two reports of null pointer exceptions
[v1.1 - 28-Oct-2012]:
- remove unused SD card write permission
[v1.0 - 28-Oct-2012]:
- initial Play Market release
This is pretty cool.
Any chance you could direct me to an explanation for sha1-size (for apply_patch_check) is though? I'm working on some edify scripting stuff and trying to incorporate some asserts for a specific bootloader (important to what I'm doing), and this is honestly the best reference I've found for it yet.
osm0sis said:
This is pretty cool.
Any chance you could direct me to an explanation for sha1-size (for apply_patch_check) is though? I'm working on some edify scripting stuff and trying to incorporate some asserts for a specific bootloader (important to what I'm doing), and this is honestly the best reference I've found for it yet.
Click to expand...
Click to collapse
You bet!
I'm heading home from work here soon and I'll dig-up the details for you .
(yeah, I scoured the internet for detailed information on Edify scripting as well as reviewed the actual Google/Android code--there's not a complete compendium, unfortunately).
I'll ping you back after a bit...
Cheers!
osm0sis said:
Any chance you could direct me to an explanation for sha1-size (for apply_patch_check) is though?
Click to expand...
Click to collapse
Okay, here's what I know about the apply_patch_check command:
There are basically two formats:
Code:
apply_patch_check // apply_patch_check ( <filepath>, <sha1-checksum> [ , <sha1-checksum> ... ] )
// apply_patch_check ( <compoundvalue> )
<compoundvalue> := [ EMMC : <filepath> : <sha1-size> : <sha1-checksum> [ <sha1-size> : <sha1-checksum> ... ]
[ MTD : <dev-block> : <sha1-size> : <sha1-checksum> [ <sha1-size> : <sha1-checksum> ... ]
[ vfat : <dev-block> : <sha1-size> : <sha1-checksum> [ <sha1-size> : <sha1-checksum> ... ]
The first of which is what I think you typically see in updater-script files where you have a filename, followed by one or more SHA1 digests. Here's an example:
assert(apply_patch_check("/system/app/ApplicationsProvider.apk", "41bb5aaaa2791e68b55622fcca13f0e4efa757b2", "fc845332ae7f706824de73f64ae47f93866ad245"));​
The second format is what I call a compound value format, where the file or partition to be checked and the SHA1 digests to be compared, are all concatenated together in a single, colon-separated value. For example:
assert(apply_patch_check("EMMC:/dev/block/platform/omap/omap_hsmmc.0/by-name/boot:4247552:3f4d4f9549d307d152f8503983ee4ff5f46b0a43:4470784:fbd13c778b34fdb7917c1ccee6389aa9b13a92bd")); ​
In the above, I've colored the sizes in red of file/partition on which to compute the SHA1 checksum (colored in black). I figured this out and verified this by using dd to copy the portions of the partition in question and calculating the SHA1 checksums on it.
My app only supports parsing and evaluating two sets of lengths/SHA1s for the compound format at this time (that's all I've encountered so far in the scripts that I've viewed).
Does that help and/or answer your questions?
Cheers!
Thanks! Yeah that helps a lot, but unfortunately it doesn't seem to solve the problem I've been seeing..
Using dd to grab the partition img I can sha1sum that and that SHA1 doesn't allow it to pass the assert, or even a direct sha1_check of the partition.
Code:
run_program("/sbin/busybox", "dd", "if=/dev/block/platform/sdhci-tegra.3/by-name/USP"), "of=/tmp/bootloader.img")
ui_print(sha1_check(read_file("/tmp/bootloader.img"))); = 8c206a1a87599f532ce68675536f0b1546900d7a (also, bootloader.img is 2097152 in size)
ui_print(sha1_check(read_file("/dev/block/platform/sdhci-tegra.3/by-name/USP"))); = da39a3ee5e6b4b0d3255bfef95601890afd80709
assert(apply_patch_check("EMMC:/dev/block/platform/sdhci-tegra.3/by-name/USP:2097152:8c206a1a87599f532ce68675536f0b1546900d7a")); = Fail
They just don't match and I'm completely baffled by it. I can work around it by using dd to pull the img first and using that for my asserts but it's not as clean as I'd like it.
osm0sis said:
Yeah that helps but I guess unfortunately it doesn't entirely solve the problem I've been seeing.
Using dd to grab the partition img I can sha1sum that and that SHA1 doesn't allow it to pass the assert, or even a direct sha1_check of the partition.
They just don't match and I'm completely baffled by it. I can work around it by using dd to pull the img and using that for my asserts but it's not as clean as I'd like it.
Click to expand...
Click to collapse
Is it for the Gnex or the N7 (I have those same devices)?
I'd be happy to test something for you...just PM me or send me an email ([email protected]).
I don't know if you're using my app to test with, but you can also manually run the update-binary directly on/from your phone (i.e., you don't have to run it in recovery, but you obviously need to be careful what your updater-script does ).
I'm still looking for the exact syntax in my notes, but I'll edit this post when I find it...brb.
~ ~ ~
edit: http://wiki.opticaldelusion.org/wiki/Update-binary shows this:
update-binary <api> <pipefd> <zip>
Click to expand...
Click to collapse
I know I did this during my early testing, but I can't remember the exact syntax...I'll try it and re-re-edit .
Man thanks so much, PM sent.
Sorry for cluttering up your thread with this semi-OT stuff.
osm0sis said:
Man thanks so much, PM sent.
Sorry for cluttering up your thread with this semi-OT stuff.
Click to expand...
Click to collapse
LOL, not a problem...it's all Edify-related and updater-script related...I'm betting that's what'll lead most folks here.
Happy to help .
==================
Detailed Analysis
==================
- you have no frozen system apps (good!)
- there were 2 failed expressions; see below for the details about these tests that will cause your OTA install to fail
- there were no bypassed expressions (good!)
-------------------------------
statistics:
frozen system apps: 0
success count: 526
fail count: 2
ignore count: 1587
partition count: 2
protected count: 2
bypassed count: 0
-------------------------------
updater-script analysis details:
FAILED: line #268:
assert(apply_patch_check("/system/app/XT9IME.apk", "8aba56a4406128e78f5729753252c3d93bc21cb4", "965b437bce65018eeb31ff9a381c3687542099e0"));
----------------------
FAILED: line #1038:
assert(apply_patch_check("EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5013504:c48f8e86c73fb2c2ba1794f5ec98e27c9e206ed5:5060608:319331fae14fec8a88063751475fce26bae328e0"));
So a question, could this failure above be causing my 32 GB nexus 7 to have system update issues? (Not necessarily XT9IME.apk (which I shouldn't have deleted), more the other one) Is there a fix?
Sent from my Nexus 7 using Tapatalk HD
---------- Post added at 10:44 AM ---------- Previous post was at 10:39 AM ----------
==================
Detailed Analysis
==================
- you have no frozen system apps (good!)
- there were 2 failed expressions; see below for the details about these tests that will cause your OTA install to fail
- there were no bypassed expressions (good!)
-------------------------------
statistics:
frozen system apps: 0
success count: 526
fail count: 2
ignore count: 1587
partition count: 2
protected count: 2
bypassed count: 0
-------------------------------
updater-script analysis details:
FAILED: line #268:
assert(apply_patch_check("/system/app/XT9IME.apk", "8aba56a4406128e78f5729753252c3d93bc21cb4", "965b437bce65018eeb31ff9a381c3687542099e0"));
----------------------
FAILED: line #1038:
assert(apply_patch_check("EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5013504:c48f8e86c73fb2c2ba1794f5ec98e27c9e206ed5:5060608:319331fae14fec8a88063751475fce26bae328e0"));
Sent from my Nexus 7 using Tapatalk HD
Click to expand...
Click to collapse
So a question, could this failure above be causing my 32 GB nexus 7 to have system update issues? (Not necessarily XT9IME.apk (which I shouldn't have deleted), more the other one) Is there a fix?
modwilly said:
So a question, could this failure above be causing my 32 GB nexus 7 to have system update issues? (Not necessarily XT9IME.apk (which I shouldn't have deleted), more the other one) Is there a fix?
Click to expand...
Click to collapse
Looks like you've updated the boot (LNX) partition in addition to deleting (or renaming/moving) the XT9IMG.apk?
So yes, the OTA will not install until you've put both items back to their expected state.
The fix, of course, depends on exactly what you did to change them in the first place.
version 2.1 uploaded to Play Store
Major re-write of app done for version 2.0 and above.
Recent change log:
[version 2.1 - 6-May-2014]:
- fix issue w/identification of non-existent files
[version 2.0 - 5-May-2014]:
- major app update: edify parsing, RPN processing and execution engine completely re-written
- original core app behavior and functionality remain the same, but code cleanup and re-write should mean better and more robust handling of future OTA updater-script expressions
Click to expand...
Click to collapse
Thanks and let me know if you have any questions.
@scary alien could you please tell me how to get apply_patch_space bytes? i am making ota script and i got almost all, still need to generate:
apply_patch_space(bytes) || abort("Not enough free space on /cache to apply patches.");
Click to expand...
Click to collapse
i just dunno how
ZduneX25 said:
@scary alien could you please tell me how to get apply_patch_space bytes? i am making ota script and i got almost all, still need to generate:
i just dunno how
Click to expand...
Click to collapse
It's just the available space (in bytes) in the /cache partition that you want to make sure is available (i.e., free space) for any operations your updater-script file will do concerning /cache.
For example:
apply_patch_space(1000000) || abort("Not enough free space on /cache to apply patches.");
Click to expand...
Click to collapse
Would verify that there is at least 1MB (1,000,000) free bytes available in /cache.
Does that answer what you're asking?
Lemme know--happy to help if I can.
Cheers!
@scary alien not really, i mean i know how it works, just dunno how to generate proper size in updater, for example:
i create regular ota: multiple .p files and some images, zipped, signed OTA.zip size is 20mb, /patch size is 7 mb, images 10 mb and /system (new files) 3mb, how do i know how many bytes i should set to make this ota install in recovery?
should i summarize .p files size or target (patched apk, jar) files size (would be around 90mb) or what else?
I think the size would depend on when your patch files are cleaned-up...i.e., after each patching operation or at the end. If its at the end, you'll of course need to account to all of the space you might use in /cache.
I don't know of a good way to tell you what the high water mark would be other than testing and recording the output of a "df /cache" command at various points in your updater-script file.
I could do that however I don't see it universal or handy, each ota has different size so it would need more/less free space every time.
There is how Google gets this value : https://github.com/MiCode/patchrom_tools/blob/kitkat/releasetools/edify_generator.py#L131 maybe you will understand better.
ZduneX25 said:
I could do that however I don't see it universal or handy, each ota has different size so it would need more/less free space every time.
There is how Google gets this value : https://github.com/MiCode/patchrom_tools/blob/kitkat/releasetools/edify_generator.py#L131 maybe you will understand better.
Click to expand...
Click to collapse
I think I understood what you meant...there's no easy way to make this universal for each OTA except to evaluate each file that might need to use space resources from the /cache partition.
Even the edify-generator git that you referenced does this dynamically:
releasetools/ota_from_target_files:
Code:
for diff in diffs:
tf, sf, d = diff.GetPatch()
if d is None or len(d) > tf.size * OPTIONS.patch_threshold:
# patch is almost as big as the file; don't bother patching
tf.AddToZip(output_zip)
verbatim_targets.append((tf.name, tf.size))
else:
common.ZipWriteStr(output_zip, "patch/" + tf.name + ".p", d)
patch_list.append((tf.name, tf, sf, tf.size, common.sha1(d).hexdigest()))
[COLOR="Red"]largest_source_size[/COLOR] = max([COLOR="red"]largest_source_size[/COLOR], sf.size)
:
:
:
if patch_list or updating_recovery or updating_boot:
script.[COLOR="Blue"][B]CacheFreeSpaceCheck[/B][/COLOR]([COLOR="red"]largest_source_size[/COLOR])
I have seen it, but here comes largest_source_size:
Code:
largest_source_size = 0
https://github.com/MiCode/patchrom_tools/blob/kitkat/releasetools/ota_from_target_files#L532
ZduneX25 said:
I have seen it, but here comes largest_source_size:
Code:
largest_source_size = 0
https://github.com/MiCode/patchrom_tools/blob/kitkat/releasetools/ota_from_target_files#L532
Click to expand...
Click to collapse
Yeah, that's just the initialization of that variable...it gets updated in the for-loop that I included above.
(you know that's not my tool, software, right?)

Device Hangs On Boot at AT&T Globe (at Account Manager)

My skyrocket won't boot. It displays both Samsung logos (the plain and fancy ones) and the AT&T globe (with the flash animation thing) and plays the boot sound, but doesn't get past the globe-on-white screen. Log seems to indicate that boot sequence hangs at Account Manager. That is: The PackageManager sequence has problems, but seems to at least complete: log has both "[email protected]" and "[email protected]". Then there's "I/SystemServer( 519): Account Manager", but there's nothing like "[email protected]" (though I'm not sure whether there should be). That's where things kind-of stop, though dalvikvm's garbage collector keeps running like a champ.
I was updating some apps (4, I think) in Google Play Store when device suddenly rebooted. I don't even remember which apps were being updated. It looks like /data/system/users/0/package-restrictions.xml is corrupted. It also looks like the permissions got corrupted, too.
Any ideas? I believe I could flash a new ROM (adb, fastboot, recovery, download mode all work fine), but I'd like to fix this if I can. Also, I don't want to lose any data, and the tarballs from recovery don't even seem to work (data tarball @ 990 MB extracts to only 153 MB of actual files).
Device info: Rooted (SuperSU, Busybox). Custom recovery (PhilZ Touch). ROM is stock. Also: Xposed, Xprivacy. Again, recovery and download modes work fine.
Code:
D/Xposed ( 164): Starting Xposed binary version 58, compiled for SDK 16
D/Xposed ( 164): Phone: SAMSUNG-SGH-I727 (samsung), Android version 4.1.2 (SDK 16)
D/Xposed ( 164): ROM: JZO54K.I727UCMC1
D/Xposed ( 164): Build fingerprint: samsung/SGH-I727/SGH-I727:4.1.2/JZO54K/I727UCMC1:user/release-keys
I'm happy to post the entire logcat output, but it's 3354 lines. Some of the weird things in log:
Code:
...
I/Xposed ( 164): java.io.FileNotFoundException: /data/data/de.robv.android.xposed.installer/conf/modules.list: open failed: ENOENT (No such file or directory)
...
D/Kies ( 153): fail to get sys.boot_completed
...
W/Zygote ( 164): Class not found for preloading: android.database.sqlite.SQLiteCompiledSql
(MULTIPLE OF THESE)
...
W/ResourceType( 519): Failure getting entry for 0x7f020003 (t=1 e=3) in package 0 (error -75)
(LOT OF THESE)
...
E/PackageManager( 519): Error reading stopped packages: org.xmlpull.v1.XmlPullParserException: unterminated entity ref (position:TEXT @1:313 in [email protected])
...
I/dalvikvm( 519): Zip is good, but no classes.dex inside, and no .odex file in the same directory
W/PackageManager( 519): Exception reading jar: /system/framework/twframework-res.apk
W/PackageManager( 519): java.io.IOException: /system/framework/twframework-res.apk
...
I/BootTime( 519): Fail Safe scanning for:/system/app/SetupWizard.apk
(LOTS OF THESE)
...
E/Atfwd_Sendcmd( 231): Could not obtain AtCmdFwd service
(LOTS)
...
W/PackageManager( 519): Removing dangling permission: com.qualcomm.permission.ACCESS_LOCATION_API from package null
W/PackageManager( 519): Unknown permission android.permission.ACCESS_DEV_STORAGE in package com.sec.android.gallery3d
(LOTS OF THESE)
...
i think ur only option is to reset in recovery,, or if that fails a system wipe and then reflash rom, yup that sucks
do a backup first but that might corupted backup of the rom which might be useless but worth a shot.
vincom said:
i think ur only option is to reset in recovery,, or if that fails a system wipe and then reflash rom, yup that sucks
do a backup first but that might corupted backup of the rom which might be useless but worth a shot.
Click to expand...
Click to collapse
Thanks for replying. I was afraid you'd say that. I'll give that a shot, but I'm trying to back up some data first. Most stuff (e.g., contacts, calendar) is remote, so no problem there.
I'm having trouble with some local stuff, though. I've got voice memos and MMS/SMS. But I can't find:
+ call history / log ... Where is it? /data/data/com.android.[providers.]contacts only contain subdirs lib/. There are no files. Is it in with the mmssms.db? I can't even tell. Is this stored in the cloud, too?
+ text memos ... /data/data/com.sec.android.app.memo only contains lib/. There are no files. (Same with /data/data/com.sec.android.widgetapp.memo.) (I MAY have used OpenIntents Notepad, but its default directory is empty, too.)
Any ideas/suggestions/etc on where to find text memos and call history? And how about seeing what icons were on my home screen?
Also, the weird thing about the CWM tarballs is that they don't appear corrupt -- tar gives no errors, no warnings, etc. But the size of the data actually extracted is ridiculously less than the size of the tarball.
system = 567.1 MB ... extracts to 13.6 MB
data = 990.2 MB ... extracts to 153.3 MB
The extracted sizes change if I do another backup. And I used adb to push the data out, and it looks like I've gotten it all. This is just kinda strange.

Categories

Resources