Roto Backup! UPDATED Dec 5 2010 - Galaxy Tab Android Development

I've been trying to recreate a flashable firmware based on the stock TMobile flash dumps and I have complete success.
Heres how to save your current firmware. It will be saved with all apps and settings except for whats on /sdcard.
I recommend reseting to defaults using "Settings->Privacy->Factory data reset" if you want to give these files to someone else to build a flashable rom for you. That will delete all your personal information.
Note: I just backed up a completely setup AT&T Tab, with tons of apps and customizations and restored it to my stock T-Mobile Tab, perfectly! Every app works, home screen is setup perfect, everything!
Effectively this is equivalent to a nandroid backup.
I'll call it "Roto Backup"!
Code:
mkdir backup
cd backup
adb shell su -c "dd if=/dev/block/bml1 of=/sdcard/boot.bin bs=4096"
adb shell su -c "dd if=/dev/block/bml2 of=/sdcard/pit.pit bs=4096"
adb shell su -c "dd if=/dev/block/stl3 of=/sdcard/efs.rfs bs=4096"
adb shell su -c "dd if=/dev/block/bml4 of=/sdcard/Sbl.bin bs=4096"
adb shell su -c "dd if=/dev/block/stl6 of=/sdcard/param.lfs bs=4096"
adb shell su -c "dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096"
adb shell su -c "dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096"
adb shell su -c "dd if=/dev/block/stl10 of=/sdcard/dbdata.rfs bs=4096"
adb shell su -c "dd if=/dev/block/stl11 of=/sdcard/cache.rfs bs=4096"
adb shell su -c "dd if=/dev/block/bml12 of=/sdcard/modem.bin bs=4096"
adb shell su -c "tar -czvf /sdcard/data.tar.gz /data"
adb pull /sdcard/param.lfs .
adb pull /sdcard/zImage .
adb pull /sdcard/factoryfs.rfs .
adb pull /sdcard/dbdata.rfs .
adb pull /sdcard/cache.rfs .
adb pull /sdcard/modem.bin .
adb pull /sdcard/efs.rfs .
adb pull /sdcard/boot.bin .
adb pull /sdcard/Sbl.bin .
adb pull /sdcard/pit.pit .
adb pull /sdcard/data.tar.gz .
Note you will be prompted for superuser permissions on the Tabs LCD on every dd command.
If you don't have the tar command on your tab, install Busybox Installer from the market.
I just paste the above commands into my command shell window and when im done all the files are siting in my current (backup) directory.
Roto Restore:
First flash the data back:
Code:
adb push data.tar.gz /sdcard/data.tar.gz
adb shell su -c "tar -zxvf /sdcard/data.tar.gz"
adb reboot download
Now flash the dumps with Heimdall:
Code:
heimdall flash --kernel zImage --factoryfs factoryfs.rfs --modem modem.bin --cache cache.rfs --dbdata dbdata.rfs --param param.lfs
Of course you could tar the files right n the Tab and flash via Odin if you really want to:
Code:
adb shell
cd /sdcard
tar -cf mybackup.tar cache.rfs dbdata.rfs factoryfs.rfs modem.bin param.lfs zImage
exit
adb pull /sdcard/mybackup.tar .

Nice
This interesting work, im curious though, what is your ultimate goal?
You want a Tmo firmware dump? to what end?

alias_neo said:
This interesting work, im curious though, what is your ultimate goal?
You want a Tmo firmware dump? to what end?
Click to expand...
Click to collapse
The Tmo dump/restore is a test. I want a solid backup/restore and custom rom creation solution.

Fair enough. But is the custom recovery being developed (and progressing nicely) not a solid enough solution?

I won't know till its functional.

rotohammer said:
I won't know till its functional.
Click to expand...
Click to collapse
Do you not have other android devices? I know of none where it doesn't function. So there is no reason i wouldn't wait a little longer for this to be ported.

alias_neo said:
Do you not have other android devices? I know of none where it doesn't function. So there is no reason i wouldn't wait a little longer for this to be ported.
Click to expand...
Click to collapse
A nandroid backup of my rom isn't something I can post publicly on the net. Regardless, I need to create full custom roms that can be flashed using Odin and Heimdall.

rotohammer said:
A nandroid backup of my rom isn't something I can post publicly on the net. Regardless, I need to create full custom roms that can be flashed using Odin and Heimdall.
Click to expand...
Click to collapse
Exactly, you post update.zips and then people use clockwork to flash the full ROM. On device recovery is much better than Odin method and more accessible to noobs that have an aneurism when they see the Odin iterface.
As for dumping your ROM to customise, well, yes, either this way using dd or decrypt the Odin flash files.

Now we're talking:
http://forum.xda-developers.com/showthread.php?t=850995

It sounds like this guy is new to android and iz trying to reinvent the wheel
Sent from my SGH-T849 using XDA App

miketaylor00 said:
It sounds like this guy is new to android and iz trying to reinvent the wheel
Sent from my SGH-T849 using XDA App
Click to expand...
Click to collapse
No, it sounds like he's trying to do exactly what he says he's doing, and that is to recreate the base TMo firmware from DD dumps!
Why? So that if necessary he could return to complete stock if he wished, and because there is no stock TMo image available.
A Nandroid backup doesn't cut the mustard in this case.
Remember guys - just because you don't see a need for something, it doesn't mean that that need doesn't exist for others!
Regards,
Dave
P.S. If you'd read any of Rotohammers posts in these forums, and looked back over previous activity in other sections, you'd know that he's not new to Android at all!

foxmeister said:
No, it sounds like he's trying to do exactly what he says he's doing, and that is to recreate the base TMo firmware from DD dumps!
Why? So that if necessary he could return to complete stock if he wished, and because there is no stock TMo image available.
A Nandroid backup doesn't cut the mustard in this case.
Remember guys - just because you don't see a need for something, it doesn't mean that that need doesn't exist for others!
Regards,
Dave
P.S. If you'd read any of Rotohammers posts in these forums, and looked back over previous activity in other sections, you'd know that he's not new to Android at all!
Click to expand...
Click to collapse
I forgot entirely that the Tab some people have might be carrier customised, mines a generic one so I can flash any of the generic dumps to put it back to "stock".
So yes, a Tmo stock firmware is useful for you guys.

miketaylor00 said:
It sounds like this guy is new to android and iz trying to reinvent the wheel
Click to expand...
Click to collapse
Yes, I am new to Android but I don't enjoy reinventing the wheel.
Perhaps you can point me to the code that I'm re-inventing that you are obviously familiar with?
Thanks in advance!

rotohammer: I've been looking for the ways to dump the firmware like you are suggesting for the AT&T version, mainly because the only available dump is an older version that stock. So far all I've found is this from another post by you:
I would like to get various Vibrant radio dumps if someone would be so kind to do so. The command from adb shell is:
Code:
dd if=/dev/block/bml12 of=/sdcard/bml12.dump bs=4096
Lets discuss what we've tried in this thread.
Click to expand...
Click to collapse
The instructions seem straightforward enough for anyone who has used dd before. How were you able to ascertain the location of this (and other) pieces of the firmware? (Interested to know prior to trying to enable voice on my Tab by swapping modems and reflashing. I'm familiar with Samsung devices since I have a Captivate, but not too reassured that the newest firmware available to restore to is older than launch date.)

The instructions seem straightforward enough for anyone who has used dd before. How were you able to ascertain the location of this (and other) pieces of the firmware? (Interested to know prior to trying to enable voice on my Tab by swapping modems and reflashing. I'm familiar with Samsung devices since I have a Captivate, but not too reassured that the newest firmware available to restore to is older than launch date.)
Click to expand...
Click to collapse
The Tab follows the flash layout of other previous Samsung phones, so just google them, the info is out there. I stare at hexdumps to identify/prove what each partition contains, no big deal.
I feel that once some more official firmware is released all the need for reconstruction of dumps will eliminated.

Figured I'd chime in here from my experience, since I've gone through it with the Epic 4G....
The .rfs files and .lfs files won't restore with redbend... and don't touch bml1 and bml4... that's the boot.bin and sbl.bin... screwing with those can lead to brick...
Current roms for the Epic 4g use update-script or updater-script (different formats, updater-script requires update-binary. The scripts get flashed with clockworkmod... first, system is formatted, then the system files copied over, then permissions given to the files. The kernel is flashed using redbend, along with modem (ours require updater-scripts and a modem_delta file if not using odin).
I browse .rfs system images by first creating a /mnt folder on the sd card. With busybox, use the following command:
Code:
Busybox mount /sdcard/factoryfs.rfs /sdcard/mnt
[/card]
I've gotten the factoryfs.rfs from the stock tars...
Maybe this is reinventing the wheel, but maybe it'll help.
Sent from my SPH-D700 using Tapatalk

rotohammer said:
The Tab follows the flash layout of other previous Samsung phones, so just google them, the info is out there. I stare at hexdumps to identify/prove what each partition contains, no big deal.
I feel that once some more official firmware is released all the need for reconstruction of dumps will eliminated.
Click to expand...
Click to collapse
Gotcha. Thanks. So, for restores, do you use redbend_ua or does a simple reversal of the dd command work? (admittedly this is an area where I haven't quite dug into yet)

maniac3389 said:
Gotcha. Thanks. So, for restores, do you use redbend_ua or does a simple reversal of the dd command work? (admittedly this is an area where I haven't quite dug into yet)
Click to expand...
Click to collapse
You must use redbend_ua, Odin or Heimdall (theres others too). You can't write to these partitions with dd alone, although there is an app that allows you to use dd too.

DRockstar said:
Figured I'd chime in here from my experience, since I've gone through it with the Epic 4G....
The .rfs files and .lfs files won't restore with redbend... and don't touch bml1 and bml4... that's the boot.bin and sbl.bin... screwing with those can lead to brick...
Current roms for the Epic 4g use update-script or updater-script (different formats, updater-script requires update-binary. The scripts get flashed with clockworkmod... first, system is formatted, then the system files copied over, then permissions given to the files. The kernel is flashed using redbend, along with modem (ours require updater-scripts and a modem_delta file if not using odin).
I browse .rfs system images by first creating a /mnt folder on the sd card. With busybox, use the following command:
Code:
Busybox mount /sdcard/factoryfs.rfs /sdcard/mnt
[/card]
I've gotten the factoryfs.rfs from the stock tars...
Maybe this is reinventing the wheel, but maybe it'll help.
Sent from my SPH-D700 using Tapatalk[/QUOTE]
I'll give that a look, don't know why it didn't dawn on me to give a look at the ROMs for my Captivate again. I've looked inside an update.zip file before, but didn't really delve into the script inside.
As for the actual dumping of the images, when dumping the .rfs files, what's the difference between using, say, /dev/block/stl9 versus /dev/block/bml9? Will one work and not the other?
What I'd like to be able to do is dump a current stock AT&T ROM since the one posted is older (and possibly an engineering ROM from what I recall reading.)
My current resources are:
[URL="http://forum.xda-developers.com/wiki/index.php?title=Samsung_Galaxy_S_Series#Partitions"]http://forum.xda-developers.com/wiki/index.php?title=Samsung_Galaxy_S_Series#Partitions[/URL]
[URL="http://forum.xda-developers.com/showthread.php?t=794425&page=2"]http://forum.xda-developers.com/showthread.php?t=794425&page=2[/URL]
[URL="http://androidforums.com/behold-2-all-things-root/54424-creating-custom-roms-backups-odin.html"]http://androidforums.com/behold-2-all-things-root/54424-creating-custom-roms-backups-odin.html[/URL]
Click to expand...
Click to collapse

rotohammer said:
Why the failure?
Probably because the file systems were still mounted at the time the dumps were made, the zImage partition and the modem partition are not mounted at runtime.
Click to expand...
Click to collapse
Here is a thought, although I may be completely off base:
I noticed that you can access the ADB shell if you boot into stock recovery, perhaps you can mount the SD and dump a few more RFS images?

Related

[HOW TO] /efs Folder backup + Restore NV_DATA.BIN

I’ve compiled a quick guide to instruct how to make a copy of the /efs folder. I’ve found in many threads suggestions about backing up this folder but the methods itself are very general. Most of the times they suggest to “root and copy the folder” with Root Explorer or similar, but usually it’s not that easy or it just doesn't work for everyone (my case).
This guide ASUMES you have read this Excellent Guide by Darkstrikerfirst:
H E R E <-- Make sure to read the ADB Guide.
I recommend doing this with a Mobile just taken out of the box or with any Official ROM of its Service Provider. If you have already Flashed your phone with another ROM but its working fine, then you can use that /efs also.
Why the /efs folder?
This is a very sensitive system folder that contains Phone-specific information such as the IMEI (encrypted in the nv_data.bin), wireless devices MAC addresses, product code (also in the nv_data.bin), and much more. Often users trying to change product codes or trying to unlock the mobile will end up corrupting data in this location.
Why back it up?
Well, let’s resume it saying that backing-up this little folder will keep you away from Samsung service centers.
***WARNING: I take no responsibility to any damage caused by the methods cited and/or written here. Their sole purpose is to back-up data and not to alter in any way the integrity of the original files of the mobile***
Please don’t ask how to recover your IMEI if you have previously messed your SGS without backing up this folder. I’m not familiar with such methods plus it is UNRELATED to this thread.
What you will need:
Rooted SGS to get permissions as a SU (Super User) and perform the backup
I would suggest learning a little about the terminal commands used (in case you are not familiar with them), as it’s better to know what you are doing rather than typing strings like a little chimp without knowing what they are; if you are a little lazy, then you have a good chance bricking your mobile.<- Busybox Commands(or Google them)
Terminal Emulator by Jack Palevich (available from the market) <-Terminal Emulator or use ADB which is included in the SDK Development Tools
IMPORTANT: If getting "error: device not found" under ADB (happened to me under CM7 2.3.4), you need to update your ADB drivers. Go HERE and follow the instructions to download the USB Driver for Windows, Revision 4 (Nexus S Support). Then update the drivers under your Windows Device Manager.
--------------------------------------
Backup commands
--------------------------------------
Depending on the type of root, you might have to use “busybox” at the beginning of the sting or just the string:
The standard prompt of terminal (adb) is a $ sign. Once you enter “SU” it will become a # Sign.
***NOTE: Make sure to keep an eye on the screen of your SGS during this process, because it will request SU permissions; else, you will get an error (just if it’s the first time). In Terminal Emulator you will need to reset the app after granting permissions cause it usually freezes***
*Remember: to use ADB you need to enable USB DEBUGGING under Applications/Development in your SGS. Once you are finished with the files, you need to turn it off so you can get the files.
Code:
su
tar zcvf /sdcard/efs-backup.tar.gz /efs or
busybox tar zcvf /sdcard/efs-backup.tar.gz /efs
After this, you will end up with the file efs-backup.tar.gz in your INTERNAL SDCARD, which is a “tarball” or a ZIP of the /efs folder. That file is your backup. You can expand it with Winrar.
In another forum I also saw a recommendation to back up the st13 under /dev/block which can support greatly to recoveryour IMEI in case of a screw-up:
Code:
su
cat /dev/block/stl3 > /sdcard/efs_dev-block-stl3.img or
busybox cat /dev/block/stl3 > /sdcard/efs_dev-block-stl3.img
Same thing, the target is the INTERNAL SDCARD, so go ahead and copy the file.
----------------------------
nv_data.bin - Restore
----------------------------
In case you screwed your IMEI by playing with the nv_data.bin and you are experiencing issues like:
Fake IMEI (usually 004999010640000)
Unable to download apps from the market
Unable to unlock your SIM card using your PIN
Weird apps are downloading automatically from the market
Blinking SIM card icon on the top tray… ETC
You may want to upload your fresh copy of this file back to the phone. Use this commands:
(thanks to Methyldioxide method to recover the product code http://forum.xda-developers.com/showthread.php?t=780509 )
Copy the file from your backup (efs-backup.tar.gz) and paste it in the INTERNAL SDCARD:
Code:
cp /sdcard/nv_data.bin /efs/nv_data.bin
rm -rf /efs/nv_data.bin.md5 OR
busybox rm -rf /efs/nv_data.bin.md5
Reboot your SGS
The md5 hash/signature is removed (rm) as the system will generate a new one.
**Most likely your SIM code won’t work after this and you won’t be able to log into the phone**
Pop off your SIM card, boot your SGS and execute the following commands to change ownership of the file under ADB or Terminal as well:
Code:
su
busybox chown 1001:1001 /efs/nv_data.bin or
chown 1001:1001 /efs/nv_data.bin
Hope this can help anyone with doubts. Cheers!
An alternative to the backup part is to use Root Explorer and zip the whole /efs folder onto your external sd card. (or wherever you want)
How about a method to restore the IMEI if you never had a good back up to begin with ?
Candanga said:
Please don’t ask how to recover your IMEI if you have previously messed your SGS without backing up this folder. I’m not familiar with such methods plus it is UNRELATED to this thread.
Click to expand...
Click to collapse
EarlZ said:
How about a method to restore the IMEI if you never had a good back up to begin with ?
Click to expand...
Click to collapse
How did you manage to miss that?
EarlZ said:
How about a method to restore the IMEI if you never had a good back up to begin with ?
Click to expand...
Click to collapse
had the feeling you would be here LMAO..
funny thing
the other day i messed up nv_data.bak trying to get my old product code back
the phone would not recognise the sim card
i deleted the whole /efs folder and the phone made a new one
i got my imei but no product code
sim card started working everything looked ok appart from sgs tools reporting nothing as phone !?!
i did restore /efs from a backup i had and then my product code came back
weird though
I was on jpo when all this happened
pele78 said:
had the feeling you would be here LMAO..
Click to expand...
Click to collapse
I guess you find it entertaining if people messed up their IMEI, well we all have our kinkiness.
EarlZ said:
I guess you find it entertaining if people messed up their IMEI, well we all have our kinkiness.
Click to expand...
Click to collapse
@EarlZ - I myself was a victim of this, but I managed to make a duplicate of my nv_data.bin as per instructions of the guide that I was following to unlock my SGS.
The only "tip" that I can give you (geez.. Im going against my own disclaimer lol ) is to try to flash it back to JM1 or the earliest release of your mobile. I think I remember to get my IMEI back doing this, but then lost it flashing to a newer ROM. AGAIN, my "research" didn't go past this as I managed to get my IMEI back, reason why I got inspired to throw this little guide.
Hope this can get you started on your IMEI recovery journey.
Cheers mate.
The restore should also be done with tar - in this way you won't lose the permissions on the files.
ingineru said:
The restore should also be done with tar - in this way you won't lose the permissions on the files.
Click to expand...
Click to collapse
Just for future reference (in case I need it ) can you give us the full command line?
Thanks
Thanks for the HowTo.
I ended up deleting my nv_data files in order to restore the backup files to get back the orig product code. As far as I can tell, it worked perfectly.
Code:
busybox rm -rf /efs/nv_data.bin
busybox rm -rf /efs/nv_data.bin.md5
In case you really boink your EFS
I wanted to add a small piece to this thread that not really consolidated anywhere I can fine. I toasted my /EFS yesterday - to the point of no cellular unless I was at JF6. I couldn't use tar because I'd get "out of room" errors and "numerical value out of range". I mean I SERIOUSLY borked the /EFS. But then I've been flashing this phone from the day it was available from AT&T.
I used ODIN to restore my /EFS. I have a permanent generic IMEI.
There are several good threads on backup of the /EFS, but not on restoring. If you follow the OP post to backup, here's a good discussion on how to restore.
http://forum.xda-developers.com/showthread.php?t=882039
What wasn't clear in Da_G's thread is the you don't have to use DD to use ODIN to restore. There's no discussion on using the .img file to restore. That's scattered across a couple of threads and lots of reading. I'm not a linux guy, so I had to figure this out. . . .
Deep in rotohammer's following thread, there is a discussion about using a cat .img file to do create an ODIN .rfs file that allows you to restore from ODIN.
http://forum.xda-developers.com/showthread.php?t=850359
So here's what I did to restore my /EFS to functional. You MUST have a backup of your functional /EFS using either dd or cat and ADB installed.
On your PC do the following:
c:\Android\tools> adb shell
$ su (you're now on your phones Android command line; watch your home screen on the phone in case Superuser comes up asking for permission)
#
Now we're going to take the efs_folder_backup_stl3.img that you did with the cat file and make it usable by ODIN. Change directory locations to your cat .img location. Mine is on /sdcard/external_sd/.
#cd /sdcard/external_sd/
#busybox cat efs_folder_backup_stl3.img > /sdcard/efs.rfs (this is the key step!!)
# cd /sdcard
# tar -cf efs.tar efs.rfs
# exit
$ exit
Now your back at your PC. Do the following step to get the .tar file off your phone.
c:\Android\tools> adb pull /sdcard/efs.tar
Almost done. Move the efs.tar file to the same direction as ODIN and the follow the last directions in Da_G's thread. I'll post them below for just for clarity.
"Now, get into download mode, open odin, stick efs.tar in PDA slot, and press start. Bam! EFS fixed"
This worked for me, several times. Once you have the /EFS directory in ODIN flashable tar format - you really have to work hard to brick your phone.
Hope this helps!
If I flash back to stock using ODIN, would that also put things back to right ?
@bsc7080xsc
It should. You might have to do a factory reset if the device shows as locked, but otherwise it's worked for me many times.
Hi
backedup my efs folder through this thread in combination with roto.
cellgeek in your post you say : " busybox cat efs_folder_backup_stl3.img > /sdcard/efs.rfs (this is the key step!!)"
But i never made an .img file/folder.
both the dd and cat created an rfs file which i turned to tar.
am i missing a step?
thank you for your little extra guide.
that's a very useful Candanga
several times saved my ass
thanks !
Thank you VERY much OP, that worked for me
Sorry to revive if this is old;
Why won't rm -rf /efs/nv_data.bin.md5 work in terminal? It gives me an error along the lines of this is a read-only file etc?
geesamsungs said:
Sorry to revive if this is old;
Why won't rm -rf /efs/nv_data.bin.md5 work in terminal? It gives me an error along the lines of this is a read-only file etc?
Click to expand...
Click to collapse
Try "busybox rm -rf /efs/nv_data.bin.md5"
Thanks that was very useful but I have a problem here.
When I copy my nv_data.bin file to efs directory I can only change the ownership but not the group!
I tried both of this:
su
busybox chown 1001:1001 /efs/nv_data.bin or
chown 1001:1001 /efs/nv_data.bin
Click to expand...
Click to collapse
and
su
busybox chown radio:radio /efs/nv_data.bin or
chown radio:radio /efs/nv_data.bin
Click to expand...
Click to collapse

[GUIDE] Flash any recovery easily on the phone using flash_image

Background
To update (flash) a recovery image onto your phone allows you to update or replace your recovery environment on your phone. There are a number of ways to flash a new recovery image, some of the more commonly used methods are using a tool such as ROM Manager or using development tools such as Fastboot. There is also a third method using a standalone utility "flash_image" which allows the flashing of recovery using the terminal emulator on the phone.
flash_image is not a new tool, it has been used on Android since the beginning, many custom ROMs include the utility as part of the ROM itself though not all stock ROMs (including the stock ROM on the G2) include it.
Requirements
1. A permanently rooted (with S-OFF) phone
2. The flash_image binary
3, A recovery image that is compatible with your phone and ROM
3. A terminal emulator application on the phone or use of an ADB shell
Overview:
1. Get the flash_image binary and recovery image onto your phone
2. Copy or move the flash image binary to your system and make executable
3. Use flash_image to update your recovery environment
Stage 1: Get flash_image and recovery image on your phone
1. Download the flash_image binary (not needed if you are running a custom ROM that includes this binary)
2. Download the recovery image you wish to use
You can either directly download the files onto your phone or onto your PC and transfer to your phone. Probably the easiest way to do this is to connect your phone to your computer via USB and mount USB storage, then copy the files to your SD Card. Alternatively you can use ADB Push, bluetooth file transfer or several other methods.
Stage 2: Copy or move the flash image binary to your system and make executable
In terminal emulator:
su
mount -o remount, rw /system
cd /sdcard (or wherever you downloaded/copied the file)
cp flash_image /system/bin
cd /system/bin
chmod 777 flash_image
Click to expand...
Click to collapse
Stage 3: use flash_image to update your recovery environment
In terminal emulator:
su (not needed if using the same terminal session used in the steps above)
cd /sdcard (or wherever you downloaded/copied the recovery image)
flash_image recovery recovery.img (use the appropriate file name for the image file you are flashing)
Click to expand...
Click to collapse
Reboot into recovery and verify that the correct recovery environment is installed
Notes
Any of the commands that call for using a terminal emulator on the phone should work fine using an ADB shell if you prefer.
This was tested on G2 but I can't think of why it would not work on Desire Z or any other phone for which this version of flash_image works. Obviously different phones have different compatible recovery images.
I've attached a zip file containing the flash_image binary that I extracted from the CM 6.1 update zip. I suspect most custom ROMs already have flash_image.
If you are wondering "Why should I use this method over using ROM Manager?" you could be using a recovery image that ROM manager doesn't support, for example ClockWorkMod Recovery 3.x which is required for some experimental ROMs.
If you are wondering "Why should I use this method over using fastboot?" The two main reasons are you can't use fastboot if you are not with a computer with working ADB and using fastboot requires that you have previously flashed the engineering HBOOT.
This is my first guide so I'm open to suggestions or feedback.
Nice one
Though I would suggest that
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
could be simplified to :
Code:
mount -o remount,rw /system
Edit - actually /system isn't even on /dev/block/mtdblock3, and it's not a yaffs2 file system, I suspect that's come from another phone model ?
"dd" will do exactly the same, but no need to install extra stuff since its already there.
dhkr123 said:
"dd" will do exactly the same, but no need to install extra stuff since its already there.
Click to expand...
Click to collapse
I wouldn't have a problem using dd myself. But I would have thought it was much more risky, since instead of typing something relatively user-friendly like "recovery", you're typing in /dev/xyz/abc or similar, which if you get it slightly wrong could be disastrous ?
Excellent, worked for me, flashed CW 3.0 without fastboot
steviewevie said:
Nice one
Though I would suggest that
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
could be simplified to :
Code:
mount -o remount,rw /system
Edit - actually /system isn't even on /dev/block/mtdblock3, and it's not a yaffs2 file system, I suspect that's come from another phone model ?
Click to expand...
Click to collapse
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
steviewevie said:
I wouldn't have a problem using dd myself. But I would have thought it was much more risky, since instead of typing something relatively user-friendly like "recovery", you're typing in /dev/xyz/abc or similar, which if you get it slightly wrong could be disastrous ?
Click to expand...
Click to collapse
Unless you run wpthis before dd, you're perfectly safe. The radio partitions are all protected by the power-on write protect feature of the eMMC AS WELL as the linux kernel write protect on low addresses. Worst you can do is blow away your system, data, cache, misc, boot, or recovery partitions, and these are trivial to recover from.
raitchison said:
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
Click to expand...
Click to collapse
Depends on whether or not the mount command can tell the associations between the devices and mount points, which is determined by either system configuration, or what mount command you are using (i.e. android's mount or busybox mount).
raitchison said:
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
Click to expand...
Click to collapse
Sorry, there should have been an extra space, this works on my phone :
Code:
mount -o remount, rw /system
I don't have a "/dev/block/mtdblock3" on my system. My system partition is mounted on /dev/block/mmcblk0p25, and it is ext3 not yaffs2.
What ROM are you running ? I am running the stock DZ 1.34 ROM. I wonder if you are running Gingerbread ?
steviewevie said:
Sorry, there should have been an extra space, this works on my phone :
Code:
mount -o remount, rw /system
I don't have a "/dev/block/mtdblock3" on my system. My system partition is mounted on /dev/block/mmcblk0p25, and it is ext3 not yaffs2.
What ROM are you running ? I am running the stock DZ 1.34 ROM. I wonder if you are running Gingerbread ?
Click to expand...
Click to collapse
I'm running the Stock G2 T-Mobile post-OTA ROM, definitely not Gingerbread.
Edit: I just tried your method and it works, I will update the guide because your way is simpler and sounds like a safer choice.
you could just rename the CW 3.x.x recovery to the exact named recovery slap it in the cloclwork download folder after you delete the old one and flash it with CW just a quicker trick for GB roms
Not sure that's actually quicker, at least I don't think it would be for me, especially if you are changing recoveries with any frequency (like if tying out Gingerbread ROMs then going back to a 2.2 ROM) because you'd need to constantly rename your recovery images. With my method you would only need to leave the two files named as they are, or for expediency you could rename to recovery.img and recovery3.img then when you wanted to switch you could just execute:
flash_image recovery recovery.img
Click to expand...
Click to collapse
or
flash_image recovery recovery3.img
Click to expand...
Click to collapse
Depending on which recovery you wanted at that point & time.
As I said in the guide, there are already a number of options available, using ROM Manager and fastboot are the most commonly seen in guides but your method and mine are other options for people for whom they work better.
Works!!!
Hi my friends!
It worked for me flawlessly. I was using virtuos 0.9 on my desireZ
Great description, but file did not work for me
It's a very good description that a novice like me can follow. And, I am sure the provided file works for many of you, since many of you reported it to work. After following this guide, and not getting it to work (Stopping Signal error), I decided to find another binary file for flash_image, and the other flash_image file worked for me on my Sprint CDMA Hero. My phone currently has aospMod v0.9.9.2 | AOSP 2.2.1(12/10/2010), if it matters.
One can download a flash_image from here http://cyanogen-files.carneeki.net/flash_image.zip
Then unzip and place on sdcard - follow all the steps in the original post of this thread.
It is my understanding that this file is not unique for different android phones, but if I am incorrect, someone please reply to this thread to correct me.
Again, great job in summarizing the steps.
Regards,
Sanjiv
so darn easy! thank you!
Also usable for splash screen ??
Just curious,
Anybody tried to use flash_image to flash a custom splash screen ?
Something like :
flash_image splash1 customsplash.img
very good post for a newbie like me, just want to make sure, do i need to do the stage 2 every time I flash the recovery?
jaoyina said:
very good post for a newbie like me, just want to make sure, do i need to do the stage 2 every time I flash the recovery?
Click to expand...
Click to collapse
No, you only need to do stage 2 once, whenever you update/change recoveries from that point forward just use stage 3.
Is there a way I can reflash a recovery without access to the ROM?
I'm stuck at the HTC splash screen, so I'm basically stuck in my current (broken) recovery.
sanjivp2000 said:
One can download a flash_image from here (..)[/URL]
Click to expand...
Click to collapse
The flash_image in the start post did not work for me, the one above did.
Also, my HTC Hero was missing the cp command.
Instead, I used: cat /sdcard/flash_image > /system/bin/flash_image
Successfully flashed recovery again

Any way to get cwm back on without usb?

Well as a previous thread I made ive been having a crap load of issues with my usb not syncing with my comp. Some how I have the stock samsung backup with viperrom and dk28 modem.
What else can I do?
I need to atleast get an updated clockwork back on and i cant locate a thread for that without using odin or cwm 2. ect
My phone isnt bricked but it feels like it might as well be. i tried the app anycut to see if I could mass storage so I could atleast go back to stock to see if that was the issue but that didnt help.
I really could use some help as Im at my wits end with this.
Brief rundown:
flashed truly epic rebirth rom
phone goes haywire during low batt
usb mounting no longer works but still charges
installed drivers 5 times and nothing
tried my laptop but same error message
tried flashing other roms by directly downloading from phone and flashing through cwm 3
tried reseting back to stock with noobl thread but all of those aborted due to ext4 script
tried to remove ext4 script by changing clockwork versions
now stuck with stock clockwork and no where to go
downloaded anycut as its supposed to over ride issues with storage
rom manager doesnt work at all when trying to install clockwork. Keeps giving me an error.+
Phone still charges but
come on devs. there's got to be a solution to this or I missing something really easy lol
OK, im gathering that you are having issues with the Drivers, unless its a physical connection issue, like the other thread where the 'tooth' in his micro usb on the phone was not connecting, he bent it back... I would look at that last.
Ok, short of a cardreader and a DI18 update.zip...
Odin to DI18... this will get you back to start...
OK, known USB/driver issues:
Installing drivers, get them off this site, from a thread where others have success, just in case. I am assuming youre on winXP 32bit or whatever is normal... OK, so installing drivers... install drivers with phone unplugged from PC, then after the install, plug the usb into a motherboard USB port, not front, not PCI, not a hub... on the board itself. The PC should recognize it, and start going thru install thingys, of course ignore the install wizard if you have it enabled. What worked for me to get the last half of the drivers to install... I think modem is the one it tends to hang on, if it sits there forever, quickly disconnect the phone and reconnect it.... it should kick it back into installing drivers... you can check for drivers in your device manager in settings... look to make sure theres no ?s and make sure there is adb device...
next, to be sure, using the same USB port, start Odin, THEN plug in the phone, it should come up with a COM port in yellow and you should be able to flash from there, see Odin threads from there.
Oh and dont use the charging cable, thats all its good for, charging. I use a fat old USB from my old berry.
Well I tried everything you posted minus the get a new cord. I might get that tomorrow but it doesnt make sense as I went to sprint and the guy plugged his phone in with my cord and it worked just fine for him.
i remember seeing a update zip file that can be loaded on to the sd and updated through the stock samsung clockwork but i cant seem to find it anywhere?
noobl thread on reflashing without odin didnt do a thing and i honestly think it should be taken down as its posted in the wiki but there's got to be another file here someplace. no hate on noobl but there was so many people having issues with those zips
I keep posting these instructions for people, but apparently no one can find them. If you want cwm 2.5.1.0 instead of cwm 3, get the files from the one-click v2.5.5 instead. Oh and standard disclaimer: you shouldn't do this if you aren't comfortable using the command line on your phone and if you screw up, I'm not responsible.
---
The first thing you need is the OneClickRootCWM3.zip. You need a few files out of it.
Below is a copy of the code from the run.bat that does all the clockwork stuff. We're going to be translating this into something you can do without a computer.
Code:
:Redirector
echo Installing clockworkmod redirector
adb push recovery /system/bin/recovery
adb push recoveryfiles /system/bin/recoveryfiles/
adb push recoveryres /system/bin/recoveryres/
adb shell busybox chmod -R 0755 /system/bin/recoveryfiles/*
adb shell busybox chmod -R 0755 /system/bin/recoveryres/*
adb shell chmod 0755 /system/bin/recovery
adb shell sync
goto:Clockwork
:Clockwork
echo Installing clockworkmod recovery...
adb push redbend_ua /data/local
adb shell chmod 755 /data/local/redbend_ua
adb push zImage /data/local/tmp/zImage
adb shell /data/local/redbend_ua restore /data/local/tmp/zImage /dev/block/bml8
If you paid attention to the code, you probably noticed which files we want. They are:
recovery
recoveryfiles/* (the whole folder)
recoveryres/* (the whole folder again)
redbend_ua
zImage
Put these files somewhere easy to find on your sdcard, such as a folder named cwm.
Now, open a terminal on your phone. We'll start with the redirect, just like the one-click does. If you put the files in a folder called cwm, then enter the lines below one at a time into the terminal.
Code:
remount rw
cp /sdcard/cwm/recovery /system/bin/
cp /sdcard/cwm/recoveryfiles /system/bin/
cp /sdcard/cwm/recoveryres /system/bin/
##Then you *may* have to copy the subfolder in recovery res by doing the following
cp /sdcard/cwm/recoveryres/* cp/system/bin/recoveryres/
busybox
chmod -R 0755 /system/bin/recoveryfiles/*
chmod -R 0755 /system/bin/recoveryres/*
exit (to exit busybox and drop back to toolbox)
chmod 0775 /system/bin/recovery
sync
I don't remember for sure, but your phone may reboot now. If it does, then enter "remount rw" again so that you have write access to the system. Now to finish installing cwm.
Code:
cp /sdcard/cwm/redbend_ua /data/local/
chmod 755 /data/local/redbend_ua
cp /sdcard/cwm/zImage /data/local/tmp/zImage
/data/local/redbend_ua restore /data/local/tmp/zImage /dev/block/bml8
That last line calls redbend_ua with the "restore" flag and puts "/data/local/tmp/zImage" into the place where the recovery belongs, or "/dev/block/bml8" The phone should reboot now and you will have your new recovery.
Then if you want to clean up the left over stuff
Code:
rm /data/local/redbend_ua
rm /data/local/tmp/zImage
Have fun.
DiGi760 said:
I keep posting these instructions for people, but apparently no one can find them. If you want cwm 2.5.1.0 instead of cwm 3, get the files from the one-click v2.5.5 instead. Oh and standard disclaimer: you shouldn't do this if you aren't comfortable using the command line on your phone and if you screw up, I'm not responsible.
---
The first thing you need is the OneClickRootCWM3.zip. You need a few files out of it.
Below is a copy of the code from the run.bat that does all the clockwork stuff. We're going to be translating this into something you can do without a computer.
Code:
:Redirector
echo Installing clockworkmod redirector
adb push recovery /system/bin/recovery
adb push recoveryfiles /system/bin/recoveryfiles/
adb push recoveryres /system/bin/recoveryres/
adb shell busybox chmod -R 0755 /system/bin/recoveryfiles/*
adb shell busybox chmod -R 0755 /system/bin/recoveryres/*
adb shell chmod 0755 /system/bin/recovery
adb shell sync
goto:Clockwork
:Clockwork
echo Installing clockworkmod recovery...
adb push redbend_ua /data/local
adb shell chmod 755 /data/local/redbend_ua
adb push zImage /data/local/tmp/zImage
adb shell /data/local/redbend_ua restore /data/local/tmp/zImage /dev/block/bml8
If you paid attention to the code, you probably noticed which files we want. They are:
recovery
recoveryfiles/* (the whole folder)
recoveryres/* (the whole folder again)
redbend_ua
zImage
Put these files somewhere easy to find on your sdcard, such as a folder named cwm.
Now, open a terminal on your phone. We'll start with the redirect, just like the one-click does. If you put the files in a folder called cwm, then enter the lines below one at a time into the terminal.
Code:
remount rw
cp /sdcard/cwm/recovery /system/bin/
cp /sdcard/cwm/recoveryfiles /system/bin/
cp /sdcard/cwm/recoveryres /system/bin/
##Then you *may* have to copy the subfolder in recovery res by doing the following
cp /sdcard/cwm/recoveryres/* cp/system/bin/recoveryres/
busybox
chmod -R 0755 /system/bin/recoveryfiles/*
chmod -R 0755 /system/bin/recoveryres/*
exit (to exit busybox and drop back to toolbox)
chmod 0775 /system/bin/recovery
sync
I don't remember for sure, but your phone may reboot now. If it does, then enter "remount rw" again so that you have write access to the system. Now to finish installing cwm.
Code:
cp /sdcard/cwm/redbend_ua /data/local/
chmod 755 /data/local/redbend_ua
cp /sdcard/cwm/zImage /data/local/tmp/zImage
/data/local/redbend_ua restore /data/local/tmp/zImage /dev/block/bml8
That last line calls redbend_ua with the "restore" flag and puts "/data/local/tmp/zImage" into the place where the recovery belongs, or "/dev/block/bml8" The phone should reboot now and you will have your new recovery.
Then if you want to clean up the left over stuff
Code:
rm /data/local/redbend_ua
rm /data/local/tmp/zImage
Have fun.
Click to expand...
Click to collapse
So will this work when i currently have the stock samsung backup?
Basically i download the OneClickRootCWM3.zip directly from my phone then go into say astrofiles and remove the files you mentioned and put it in a file named cwm and go to android terminal emulator from there?
If i can get this to work and get back to cwm3 what do you suggest I do next to get the phone back to stock since the usb mount work and I can't even use odin? all the flash zips from noobln thread didnt work.
seoulseek80 said:
So will this work when i currently have the stock samsung backup?
Click to expand...
Click to collapse
Yes. This is how the one-click installs cwm over stock backup.
Basically i download the OneClickRootCWM3.zip directly from my phone then go into say astrofiles and remove the files you mentioned and put it in a file named cwm and go to android terminal emulator from there?
Click to expand...
Click to collapse
Get the files below I mentioned below the first code block and put them in a folder called cwm.
If i can get this to work and get back to cwm3 what do you suggest I do next to get the phone back to stock since the usb mount work and I can't even use odin? all the flash zips from noobln thread didnt work.
Click to expand...
Click to collapse
What were you flashing the zips with? They don't work with anything but cwm, so if you don't have cwm...
DiGi760 said:
Yes. This is how the one-click installs cwm over stock backup.
Get the files below I mentioned below the first code block and put them in a folder called cwm.
What were you flashing the zips with? They don't work with anything but cwm, so if you don't have cwm...
Click to expand...
Click to collapse
I was flashing the roms with cwm3 but i mean flashing back to stock with odin as there doesnt seem to be a way to flash back to stock with cwm3.
You probably want to use the "ReRFS" dk28 rom to convert back to RFS, then try flashing noob's di18.
DiGi760 said:
You probably want to use the "ReRFS" dk28 rom to convert back to RFS, then try flashing noob's di18.
Click to expand...
Click to collapse
ok. Ill look for a link for that. in your opinion do you think its possible that reverting back to stock everything might fix this usb mounting issue? I litterelly tried everything else. i mean could have one of the roms messed up the internal phone usb
A rom shouldn't ruin your usb, especially not the roms we have available to us. Having the same issue in different roms would lead me to believe it is a hardware problem. It may just be coincidence that it started after you flashed a rom. If you have the same problem when you make it to di18, then there really isn't anything software can do for you. You'll have to take it to a service center and have them order a refurb from asurion.
Well good news is that sprint will issue a new phone to me through mail as it is a manufacturer defect and not a human error since I'm in the 1 year manufacturers warranty. i thought for a second i was screwed without that service plan but hopefully this fix you posted might help somewhat. well also since I dont want to send in a rooted phone anyways lol
Hehe did you actlly try the usb "tooth" fix? It was something wrong with mine, turned out to be some other guys problem as well. I have an inkling its a common issue. Caused by nothing more than the simple innocent act of unplugging your phone. I'm on my phone, so I can't find the post. If you're on a computer search through my posts to find the thread.
Sent from my baked and emotionless SPH-D700
squshy 7 said:
Hehe did you actlly try the usb "tooth" fix? It was something wrong with mine, turned out to be some other guys problem as well. I have an inkling its a common issue. Caused by nothing more than the simple innocent act of unplugging your phone. I'm on my phone, so I can't find the post. If you're on a computer search through my posts to find the thread.
Sent from my baked and emotionless SPH-D700
Click to expand...
Click to collapse
Wow squshy I wish i could thank you a thousand times. It wasn't the actual tooth but the copper contact that was bent up. So i sat there with my wifes eyebrow pluckers and pulled it and down and boom it works.
It was hardly noticeable but I wouldnt have looked unless you said something. lol
Thanks bro!

[DUMP] SGH-T989 System Dump

SGH-T989 System Dump (Odexed)
Here you guys go, a system dump, thanks to luckyduck69.
luckyduck69 said:
dump: http://dl.dropbox.com/u/21231693/T989odex.zip..
Click to expand...
Click to collapse
I have also mirrored this on my website, here.
I will have it deodexed here later tonight.
Reserved.
as;dflkjas;ldfkja;sldfkj
So, the dump would be useful if one needed to put the phone back to just the way it was out of the box, correct? One could use it with Odin to fix, say... a soft brick?
Ty for this!! this means what exactly? easier to root and set up for odin?????curious
movieaddict said:
Ty for this!! this means what exactly? easier to root and set up for odin?????curious
Click to expand...
Click to collapse
once it deodexed... the real def fun begins as far as modding or cooking up personalized roms.
but we really need to get a modded kernel somehow and get root. that must be our main priority cuz nothing else matters without it. maybe someone has a trick up their sleeve... i hope.
Awesome........ now the ball gets rolling
Ty sir Please remove all the ridiculous t-mobile bloat.
Ty luckyduck!
sence im at school and cant up u all my original build ill root this for u all and upload it back to my sf page
RaverX3X said:
sence im at school and cant up u all my original build ill root this for u all and upload it back to my sf page
Click to expand...
Click to collapse
Nice greatnews and good to see familiar faces from the gs4g thanks raver
Sent from my SGH-T989 using xda premium
Raver always comes thru so glad to see him here!
Sent from my SGH-T989 using XDA App
Ty to all of u guys!! cant wait
Hey fellas i was on sammy's open source site yesterday and nothing was there for the SGH-T989 and today there is an SGH-T989 open source.zip file up on the site just in case this helps in any way with getting things going with rooting this bad mutha!
https://opensource.samsung.com/
Sent from my SGH-T989 using xda premium
Was this dump made using "adb pull"? If so, it's next to worthless for the purposes of building a prerooted system image - no permissions, no symlinks.
Someone needs to dump system using tar. I have attached a binary of busybox (which includes tar) compiled using the instructions given at http://arighi.blogspot.com/2011/08/install-busybox-from-source-on-samsung.html
Extract it from the zip and install it as follows, I am assuming that whoever does the dump is comfortable with ADB:
Code:
adb push busybox /data/local/tmp/
Then start an adb shell or an Android Terminal Emulator session, and within it:
Code:
cd /system
/data/local/tmp/busybox tar czvf /sdcard/system_dump_t989.tar.gz *
Then grab /sdcard/system_dump_t989.tar.gz and upload it here.
To avoid having 308403434 different people do this, I suggest you guys name a volunteer
IMPORTANT: If the attempt to tar up /system above gives any errors about access denial or permissions, post the name of every file that was a problem.
Would love to but at work atm.
Sent from my SGH-T989 using xda premium
Entropy512 said:
Was this dump made using "adb pull"? If so, it's next to worthless for the purposes of building a prerooted system image - no permissions, no symlinks.
Someone needs to dump system using tar. I have attached a binary of busybox (which includes tar) compiled using the instructions given at http://arighi.blogspot.com/2011/08/install-busybox-from-source-on-samsung.html
Extract it from the zip and install it as follows, I am assuming that whoever does the dump is comfortable with ADB:
Code:
adb push busybox /data/local/tmp/
Then start an adb shell or an Android Terminal Emulator session, and within it:
Code:
cd /system
/data/local/tmp/busybox tar czvf /sdcard/system_dump_t989.tar.gz *
Then grab /sdcard/system_dump_t989.tar.gz and upload it here.
To avoid having 308403434 different people do this, I suggest you guys name a volunteer
Click to expand...
Click to collapse
"/data/local/tmp/busybox tar czvf /sdcard/system_dump_t989.tar.gz *" gives permission denied error
/system itself? That's VERY odd.
zaventh is working this now, talking with him on IRC
Edit: Looks like adb push didn't make busybox executable, as I mentioned in IRC:
Code:
adb shell chmod 755 /data/local/tmp/busybox
Finally the ball gets rolling
Sent from my SGH-T989 using xda premium
Entropy512 said:
Was this dump made using "adb pull"? If so, it's next to worthless for the purposes of building a prerooted system image - no permissions, no symlinks.
Someone needs to dump system using tar. I have attached a binary of busybox (which includes tar) compiled using the instructions given at http://arighi.blogspot.com/2011/08/install-busybox-from-source-on-samsung.html
Extract it from the zip and install it as follows, I am assuming that whoever does the dump is comfortable with ADB:
Code:
adb push busybox /data/local/tmp/
Then start an adb shell or an Android Terminal Emulator session, and within it:
Code:
cd /system
/data/local/tmp/busybox tar czvf /sdcard/system_dump_t989.tar.gz *
Then grab /sdcard/system_dump_t989.tar.gz and upload it here.
To avoid having 308403434 different people do this, I suggest you guys name a volunteer
IMPORTANT: If the attempt to tar up /system above gives any errors about access denial or permissions, post the name of every file that was a problem.
Click to expand...
Click to collapse
Dump using this method available here: http://www.multiupload.com/MKCNJTUTRW
zaventh said:
Dump using this method available here: http://www.multiupload.com/MKCNJTUTRW
Click to expand...
Click to collapse
Another dump ---- http://www.multiupload.com/424YLKAN90

[Q] Unrooting

Hi All,
This is just a quick 2 part question as I see many threads for the GNEX on rooting, but none very concrete on removing root. I've tried searching, but I must have missed it.
So, my questions are:
1. Once rooted via whatever method (I used fastboot method myself, thanks efrant for teaching the fastboot stuff), how do I unroot this thing to bring it back to stock configuration?
2. To make the unit truly stock again, can I just use fastboot and flash a factory google image? I know doing this will eliminate all my data, but will it remove all traces of any rooting done? (Insecure Kernal, SU, Busybox and whatever else)?
Please let me know.
Thanks guys... wasn't planning on rooting, but I miss the ability to do it. lol
1. See two.
2. Yes.
Flashing the stock image will bring your phone back to an out-of-the-box state.
Sent from my Galaxy Nexus using Tapatalk 2
infazzdar said:
1. See two.
2. Yes.
Flashing the stock image will bring your phone back to an out-of-the-box state.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Thanks man,
Makes me feel better about my decision to root this phone.
Appreciate the reply.
If you installed Superuser to system when you rooted then you'll need to remove that also but here are the basic adb commands for the job (make sure you have data and system mounted via CWM so you have access):
Code:
adb shell
rm /system/bin/su
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
exit
BusyBox is another matter since CWM installs it to sbin every time you boot with it. Perhaps someone has a better idea (?), but from messing around a bit the other night the best method I've come up with is to use BusyBox to remove BusyBox, as follows:
Code:
adb shell
cd /sbin
cp busybox /data/local/tmp/busybox
chmod 06755 /data/local/tmp/busybox
rm busybox
/data/local/tmp/busybox rm `/data/local/tmp/busybox find -follow -maxdepth 1 -type l`
/data/local/tmp/busybox rm /data/local/tmp/*
exit
that second to last line gets rid of all the stray symlinks busybox left behind, not sure if CWM leaves any of those recovery/symlinks in sbin also or if those should be removed as well; perhaps someone else can fill us in on that point!
osm0sis said:
If you installed Superuser to system when you rooted then you'll need to remove that also but here are the basic adb commands for the job (make sure you have data and system mounted via CWM so you have access):
Code:
adb shell
rm /system/bin/su
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
exit
BusyBox is another matter since CWM installs it to sbin every time you boot with it. Perhaps someone has a better idea (?), but from messing around a bit the other night the best method I've come up with is to use BusyBox to remove BusyBox, as follows:
Code:
adb shell
cd /sbin
cp busybox /data/local/tmp/busybox
chmod 06755 /data/local/tmp/busybox
rm busybox
/data/local/tmp/busybox rm `/data/local/tmp/busybox find -follow -maxdepth 1 -type l`
/data/local/tmp/busybox rm /data/local/tmp/*
exit
that second to last line gets rid of all the stray symlinks busybox left behind, not sure if CWM leaves any of those recovery/symlinks in sbin also or if those should be removed as well; perhaps someone else can fill us in on that point!
Click to expand...
Click to collapse
So flashing a Google factory image won't remove root? Or it will, but won't remove all evidence if someone went searching around trying to deny warranty.
When I rooted, I used the method of flashing recovery, then installed the su.zip via recovery. When I unrooted I simply flashed a factory image.
when you say installed superuser to system I'm guessing you mean something more advanced than the typical root process, correct?
Sent from my Galaxy Nexus using XDA
thos25 said:
So flashing a Google factory image won't remove root? Or it will, but won't remove all evidence if someone went searching around trying to deny warranty.
When I rooted, I used the method of flashing recovery, then installed the su.zip via recovery. When I unrooted I simply flashed a factory image.
when you say installed superuser to system I'm guessing you mean something more advanced than the typical root process, correct?
Sent from my Galaxy Nexus using XDA
Click to expand...
Click to collapse
Flashing the factory system image DOES remove root (and busybox and anything else you changed on the ROM).There is no need to do anything that osm0sis said to do.
And there is no "more advanced" process of rooting. Root is two files placed on you system: /system/bin/su and /system/app/Superuser.apk. Nothing more. (Whether you place them there yourself, or have CWM do it for you, is irrelevant.) Remove those those and root is gone.
Sent from my Galaxy Nexus using Tapatalk 2
if you grab wugfresh's toolkit itll do all of that with one-click convenience. thats what I do to un-root my Nexus.
Zbraptorsdr said:
if you grab wugfresh's toolkit itll do all of that with one-click convenience. thats what I do to un-root my Nexus.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=21936493
Sent from my Galaxy Nexus using Tapatalk 2
efrant said:
Flashing the factory system image DOES remove root (and busybox and anything else you changed on the ROM).There is no need to do anything that osm0sis said to do.
Click to expand...
Click to collapse
Right, I was referring to "unroot"ing without reflashing the system.img, since my intent with that method was to keep all settings, etc. as-is, just remove all traces of root.
osm0sis said:
Right, I was referring to "unroot"ing without reflashing the system.img, since my intent with that method was to keep all settings, etc. as-is, just remove all traces of root.
Click to expand...
Click to collapse
Yup, you would need to remove it manually if you were running a custom ROM, but with a stock ROM, flashing the system partition only WOULD leave all your data/settings as is.
osm0sis said:
BusyBox is another matter since CWM installs it to sbin every time you boot with it.
Click to expand...
Click to collapse
IS this true? Can someone confirm? And is it true for all phones?
Zbraptorsdr said:
if you grab wugfresh's toolkit itll do all of that with one-click convenience. thats what I do to un-root my Nexus.
Click to expand...
Click to collapse
The easiest way to do it, just click and its does it on its own.
The-Droidster said:
IS this true? Can someone confirm? And is it true for all phones?
Click to expand...
Click to collapse
Just wanted to clear this up now that I'm a bit more wise on the subject. The sbin stuff doesn't matter since it's all part of the ramdisk, and gets generated on each boot (to recovery or OS) and otherwise doesn't exist. No need to delete anything but su. :good:
osm0sis said:
Just wanted to clear this up now that I'm a bit more wise on the subject. The sbin stuff doesn't matter since it's all part of the ramdisk, and gets generated on each boot (to recovery or OS) and otherwise doesn't exist. No need to delete anything but su. :good:
Click to expand...
Click to collapse
he means, of course, "su" as in /system/bin/su AND /system/app/Superuser.apk. partially correct, i think, ramdisk is only used for early OS boot. Ramdisk + kernel = boot.img.
Recovery is on a different partition, for starters, and AFAIK, deploys needed files to a temporary location on the phone's ram or in the file system, which would be the recovery partition. Busybox gets placed in there as well.
Sent from my i9250
stock kernel has a ramdisk but not all kernels are packaged with one. recovery also has a ramdisk, just as it also has a kernel. Decompile/split/unzip one some time and you'll see /sys/ and /proc/ and /sbin/ all get generated from the ramdisk. And yes, if you for some reason put Superuser.apk or SuperSU.apk in /system/app/ (a completely unnecessary step), then naturally they need to go too.

Categories

Resources