This is a guide on how to fix a bootloop on your T-Mobile G2 if you don't have a suitable backup (i.e. md5sum mismatch won't let you flash, you forgot to make one, etc.) This procedure also works if you want to unroot your device for warranty purposes or if you flashed something that can't be undone by flashing another ROM (rare, but it can happen)
WARNING: You WILL lose your root. The possibility of bricking your phone by entering a typo in the commands are somewhat high. If you don't wanna take risks, then find another tutorial.
THIS TUTORIAL DOES NOT WORK WITH THE HTC DESIRE Z
Prerequisites:
-ADB installed and fully functional.
-My misc.img file. You can grab it from this link: http://www.mediafire.com/?80r8dkkqzcwszdb
-The stock ROM (PC10IMG.zip) Grab it from this link if you don't have it: http://www.megaupload.com/?d=20Y1ELB0
-Clockworkmod Recovery
Let's begin, shall we?
1. Boot into Clockworkmod Recovery (Volume+Down, then scroll down to recovery and press the power button)
2. Place the misc.img and PC10IMG.zip files in the same folder where ADB is located, and enter the following commands:
Code:
adb push misc.img /sdcard/misc.img
adb push PC10IMG.zip /sdcard/PC10IMG.zip
(alternatively, you can go to Mounts and Storage, mount USB storage, then transfer the files that way)
3. Now, we're gonna use the dd command to edit the misc partition. Enter the following EXACTLY as it's written over here:
Code:
adb shell
su
dd if=/sdcard/misc.img of=/dev/block/mmcblk0p17
You should get a message saying 512 records out or something.
You might ask "Why can't we use misc_version instead of the dd command?" Well the answer is that misc_version doesn't really work in recovery mode as far as I've tested. You can try misc_version, and if it works, congratulations!
4. Reboot into HBoot mode (Power off, then power+volume down)
5. Wait for the update to flash, and viola! You're now out of that pesky bootloop. You're unrooted, but then again you can start over.
I have followed following Instructions --
but, after restarting the device it Stuck in boot with green HTC logo..
pls pls help ...
***************************************************
Instructions
1. Install Terminal Emulator and a file manager (such as Astro File Manager) from the Market.
2. Extract the contents of the zip file to the SD card (this will create a directory called root_files on the card). When done, make sure you unmount your SD card from your computer if you had mounted it as a storage device to transfer the files.
3. Enable Unknown Sources (under Settings->Applications) and USB Debugging (under Settings->Applications->Development).
4. Using your file manager, navigate to the root_files directory on your SD card and select "com.modaco.visionaryplus.r14.apk" to install the Visionary app.
5. Start the Visionary app.
6. Click on "Temproot now." Leave all other settings unchecked.
7. Start the Terminal app.
8. Type the following commands (the $ and # symbols represent the command prompt and should not be typed):
Code:
$ su
# cp /sdcard/root_files/perm_root /data/local/perm_root
# chmod 777 /data/local/*
# /data/local/perm_root
You will see multiple messages scroll by as the programs run. Once you are returned to the prompt in terminal, you will have permanent root (S-OFF), as well as subsidy unlock and SuperCID. At this point, you can also choose to flash the engineering hboot as explained in the wiki. Flashing this hboot allows you to use the flashboot program to flash images from your computer to your phone (which can be very helpful when stuck in a bootloop for example). Note, this is often times the step that bricks people's phones when following other guides. To help mitigate the danger involved, I created a script that first checks the md5 of the hboot file to ensure it didn't get corrupted and then actually performs the flash (many times the bricking occurs because of a typo in this command). If you wish to flash the engineering hboot, type the following command in terminal if you have a G2:
Code:
# /data/local/tmp/flash_hboot
Or this command if you have a Desire Z
Code:
# /data/local/tmp/flash_hboot_z
If you get a verification failed message, you should re-download the files, re-extract them to your SD card, and run the flash_hboot script again.
If you don't want the engineering hboot, just reboot your phone. You can verify you have permanent root by holding volume down while powering on (you'll see S-OFF in the first line of the bootloader). You are now free to install a new recovery and start flashing custom ROMs. If you don't want to flash a new ROM, it's safe to uninstall the Visionary app at this point.
And if you are curious, you can open the perm_root and flash_hboot files in a text editor to see what they are actually doing...
*******************************************************
I guess you didn't see the
WARNING - Do not use Visionary to permanent root your G2/DZ - high brick risk! sticky, well that's a shame.
If you managed to flash the eng hboot, it shouldn't be too hard to fix. Otherwise you might have to flash an RUU to get it back to factory settings.
-Nipqer
sry, but there are quite a few warnings about not using visionary...
ok, so what can you do?
first thing i would try is:
try to enter bootloader (power & volume down) connect your phone to pc, open cmd.exe go to your platform tools folder and type "fastboot devices" if your phone shows up, type "fastboot oem boot"
...if you are lucky you are able to boot into the rom again.
EDIT: or do what nipqer posted... tell us what your bootloader shows (hboot number and s-off?)
On volume down + power, it shows following
VISION PVT ENG S-OFF
HBOOT-0.76.2000 (PC1011000)
MICROP-0425
RADIO-26.04.02.17_M2
eMMC-boot
Aug 20 2010, 16:51:01
Download clockworkmod recovery
Use fastboot to flash it. Boot into fastboot mode (hold trackpad and power), then run 'fastboot flash recovery recovery.img' from a command line.
Then boot into the recovery, from hboot, and flash a new rom from there.
-Nipqer
ok, i will leave it to nipqer
Do i have to use ADB tool to run 'fastboot flash recovery recovery.img' ?
please help me with the step to run the same as I never done this before....
It will be a great help
Fastboot is an Android tool, but it is not adb.
(Assuming you're on windows) I'm not sure which drivers (if any) you need for it, but if you have installed HTC Sync you will have the drivers.
Download this zip and extract the fastboot for your OS, into the same folder the recovery image is in, then just run the command
fastboot-[os] flash recovery recovery-clockwork-5.0.2.7-vision.img
You could pop into #g2root on freenode for faster/easier help.
Otherwise hopefully hoffmas sees this and feels like taking over as its almost sleep time for me.
-Nipqer
warnning: any damage you do to your phone following these directions is your responsibility. Assume you warranty is void if your are rooted.
I used the information koush provided here and info birdman provided here and adopted it in Ubutnu Linux 11.10. I hit some bumps along the way using my Linux box so I decided to write this for those of us not using OS's made by the darkside This should also work with Ubuntu 12.04 LTS just fine.
All this should work with Linux Mint 12 also.
1- Set up Android SDK, adb, and fastboot in Ubuntu Linux using the links in my signature. I can't stress how useful and easy it is to set adb and fastboot in your "path" so you can easily use it from any prompt. The links explain it. Take your time with that and it will payoff for all your devices. Here is the guide I wrote http://forum.xda-developers.com/showpost.php?p=19446284&postcount=62
STOP NOW! EVERYTHING INCLUDING YOUR PERSONAL FILES, PICTURES, AND VIDEOS WILL BE ERASED WHEN YOU UNLOCK/ROOT THIS DEVICE. It does not have a physical SD card. Very annoying. Use Dropbox or Google+ to backup everything.
2- on your phone, go to settings/Developer Options and check the box for USB Debugging
3-connect your phone, fire up a terminal, and type:
Code:
adb devices
You should get the serial number of your device appear. If not, unplug, reboot phone, re-attach the phone to your computer and try again. If you still do not get your device's serial number, go back to step 1 and make sure everything is setup correctly.
4- Now download Clockwork Recovery from here
http://download.clockworkmod.com/recoveries/recovery-clockwork-5.5.0.4-toro.img
(make sure it's the CDMA one (toro). The GSM one is called maguro and steps should be the same)
and su.zip from here
http://download.clockworkmod.com/test/su.zip
5-Turn the phone off, hold both Volume up and Volume Down and press the power button. You should come to a screen that has a big arrow and some writings at the bottom (fastboot). Last line should say Locked state.
6- Connect your phone to your computer, fire up a terminal and type:
Code:
fastboot devices
your phone and its serial number should appear just as it did using adb above. adb will not work here of course. If you don't see your device, go to step one. I guess you can download the fastboot for linux and cd to that directory and do it but I like to have it setup on my computer.
STOP NOW! EVERYTHING INCLUDING YOUR PERSONAL FILES, PICTURES, AND VIDEOS WILL BE ERASED WHEN YOU UNLOCK/ROOT THIS DEVICE. It does not have a physical SD card. Very annoying. Use Dropbox or Google+ to backup everything.
7- Now for the stuff that voids your warranty: Type
Code:
fastboot oem unlock
and enter. Look at your phone now, use the Volume up to choose YES and press the power button to accept. It should say that you are unlocked and fastboot is in good state.
9-use the volume up to change the value appearing in the arrow to recovery and press the power button to accept. You are taken to laying down android with a red triangle. This is the stock recovery. Now carefully press the volume up, volume down, and the power button to get to a menu. Choose wipe data and factory reset. 2 things: I had a hard time getting to the menu. Do it a few times and try pressing the power button JUST a fraction of a second earlier than the 2 volume buttons. Also wiping and resetting takes a few minutes, be patient.
10-you are now unlocked. Turn the phone off ( I pulled battery), go to fastboot screen by holding volume up, down and power button. Connect your phone to your computer and make sure it is recognized by typing:
Code:
fastboot devices
If it is, change directory to where you downloaded clockwork recovery. If you didn't change it, it should be the Download directory (remember it's case sensitive):
Code:
cd Downloads
11- Time to re-write your recovery:
Code:
fastboot flash recovery recovery-clockwork-5.5.0.4-toro.img
Please make sure you use common sense here when it comes to file names. If the file you downloaded has a different name or version, change it in the code above. I guess you can put the fastboot file in that location also to be used if you do not have it setup as in step 1. I'm not positive how and if that would work. Downloading and installing the wrong file is a mistake that may cause harm to your phone.
12- Use the vol up/down to point the big arrow toward recovery, push the power button to get to Cloclwork Recovery. Once you confirm you have CWR, reboot the phone normally and let Android OS create all the folders it needs. Once at start up screen, pull the battery to turn phone off, and then get to bootloader by holding vol up/down and power button in. Use the vol up/down to point the big arrow on sceen toward recovery. While in recovery, make sure your terminal prompt still shows the Downloads directory (or where the su and recovery files were downloaded to). Now type: (note the space between zip and /data)
Code:
adb push su.zip /data/media
this will put the su.zip file in the root of your virtual sd card.
You are still in recovery, reboot into recovery to refresh the file list by typing this
Code:
adb reboot recovery
Now go ahead and install su.zip through clockwork recovery's menus. Pretty self explanatory (choose zip from sd card). The su.zip should be now in the root of your virtual sd card.
That's all. You are now unlocked and rooted. Reboot. Make sure you install the paid versions of rom manager, titanium backup, and update superuser app.
13- Download Rom Manager and flash the recovery again (top choice). This will erase the install-recovery.sh file and keeps your CWR at each boot. You do not have to do step 14 if you do this. I will leave step 14 here just in case someone needs it.
14-When you are back in the fastboot screen. DO NOT reboot the phone here. There maybe a file that re-writes the recovery to stock if the phone is rebooted. Your phone may or may not have this file. of the two GN I have, one did and one did not at this step(may have been erased). The file is reovery.sh and is located in /system/etc/ . You need to either rename it or delete it.
While in fastboot and after you flashed CWR, use the Volume up and Down to change the arrow's value to recovery and press the power button. You should now see the familiar Clockwork recovery. In recovery, you can use adb (you can't in fastboot of course). You need to rename that file, use these steps in terminal: (If you see no file/folder found message, you know you do not have this file)
Code:
adb shell
Code:
mount -o rw,remount /system
Code:
mv /system/etc/install-recovery.sh /system/etc/install-recovery.bak
step 1 fires up adb, step 2 allows you to change permissions and read and write, and step 3 renames it. You can now unplug the phone.
Again, you can also get rid of this file by flashing the clcokwork recovery in Rom Manager or using the paid app root explorer to rename the file.
Once again referrence links:
http://rootzwiki.com/topic/12013-welcome-to-rootzwiki-editionstep-by-step-oem-unlock-and-root/
https://plus.google.com/103583939320326217147/posts/1Jsh9xPwnQP
thank you so much this is exactly what i was looking for. cant believe im the only one to comment on this. it is very detailed even some one new to Ubuntu could figure this out.
I've been using it too for a while but never posted so THANK YOU! Very easy to follow. Great work.
you're welcome. I find it ironic that a Linux based OS such as Android has so many HOWTOs for Windows but not enough for Linux. #powerofmonoply
I find I need to run fastboot commands with sudo or su into root before it will work. Same for you, or misconfig on my side?
Sent from my Galaxy Nexus using XDA
ual4720 said:
I find I need to run fastboot commands with sudo or su into root before it will work. Same for you, or misconfig on my side?
Sent from my Galaxy Nexus using XDA
Click to expand...
Click to collapse
I'm not sure. How did you setup your adb and fastboot? I did not have to sudo for fastboot commands. What OS are you running?
Hey loveubuntu, I have a question.
I'm at Step 12, and I'm in recovery and when I run adb push su.zip /data/media, it isn't finding any devices. When I run adb devices, the device isn't listed.
Any advice?
AndroidSparty said:
Hey loveubuntu, I have a question.
I'm at Step 12, and I'm in recovery and when I run adb push su.zip /data/media, it isn't finding any devices. When I run adb devices, the device isn't listed.
Any advice?
Click to expand...
Click to collapse
were you able to see the device in the previous steps 3, 6 and 10 and now you don't?
Things that come to mind is:
1- Do you have the usb debugging checked?
2- unplug and replug the device and see if it works.
3- don't forget the samsung recovery file install-recovery.sh. If the phone is rebooted you may have re-written your recovery and have to start over. Then reboot the phone and go to rom manager and reflash the recovery (first option). This will take care of the install-recovery.sh file.
loveubuntu said:
were you able to see the device in the previous steps 3, 6 and 10 and now you don't?
Things that come to mind is:
1- Do you have the usb debugging checked?
2- unplug and replug the device and see if it works.
3- don't forget the samsung recovery file install-recovery.sh. If the phone is rebooted you may have re-written your recovery and have to start over. Then reboot the phone and go to rom manager and reflash the recovery (first option). This will take care of the install-recovery.sh file.
Click to expand...
Click to collapse
3, 6, & 9...check.
I rebooted my phone by pulling the battery and I still can't get adb to see the device. The install-recovery.sh? I don't remember reading anything about that.
In step 12 it says to let the phone reboot into the Android OS, but it's now back at factory reset, as that's what we did earlier in the instructions. As soon as it boots into the Android OS, adb lists the device.
At that point, since I'm in the AOS, I downloaded Astro File Manager and tried to put su.zip in the /cache folder, I think that's the folder that the clockwork recovery mod folder sees, and I don't have permission. I was hoping I could cheat and just drag & drop instead of pushing it. BUT...I did try the command adb push su.zip /media/play and I get permission denied. I'm guessing I don't have permission, even as sudo, to move the file to /data/media.
Okay I finally got it!
I didn't wait long enough for the Android OS to boot up. I finally was able to move the .zip file, but I couldn't find where /data/media was. So I let the OS boot up, removed the battery, went back into recovery, moved the zip file, and it was finally listed.
Ordered a Galaxy Nexus too, will definitely be using this guide. Windows guides are confusing.
Forceflow said:
Ordered a Galaxy Nexus too, will definitely be using this guide. Windows guides are confusing.
Click to expand...
Click to collapse
>Windows guides are confusing
>Windows guides
>Windows
Root of the issue
But agreed, this was a good supplement to follow for Ubuntu.
Sent from my Galaxy Nexus using xda app-developers app
Thank you for this guide. Some how I like the Linux method better than the Windows ones.
12- Use the vol up/down to point the big arrow toward recovery, push the power button to get to Cloclwork Recovery. Once you confirm you have CWR, reboot the phone normally and let Android OS create all the folders it needs. Once at start up screen, pull the battery to turn phone off, and then get to bootloader by holding vol up/down and power button in. Use the vol up/down to point the big arrow on sceen toward recovery. While in recovery, make sure your terminal prompt still shows the Downloads directory (or where the su and recovery files were downloaded to). Now type: (note the space between zip and /data)
Click to expand...
Click to collapse
This step is confusing. While in recovery should be replaced by "Hit Power button to enter ClockworkMod Recovery"
Otherwise people may mis-interpret by "Stay in fastboot and position the big arrow on top to Recovery Mode"
In my case (GNex GSM stock JB 4.11):
adb push su.zip /data/media
or
adb push su.zip /sdcard
did copy su.zip successfully but could not be listed by ClockworkMod Recovery menu when selecting "choose zip from sd card". I had to do this:
Code:
adb push su.zip /sdcard/Alarms
And, within the ClockWorkMod Recevery menu, select "choose zip from sd card"
Land on another screen where I could navigate to Alarms folder and see the su.zip there.
Now go ahead and install su.zip through clockwork recovery's menus. Pretty self explanatory (choose zip from sd card). The su.zip should be now in the root of your virtual sd card.
Click to expand...
Click to collapse
Sorry for being picky but personally, it is NOT self explanatory for me. I was expecting a menu item in CWM Recovery menu to say "Install su.zip". Actually you must navigate in the file system and select the su.zip yourself. Ok, may be that seems obvious now that I know what to do. But on the moment, I was worried I screwed up something because I needed to do some extra manipulations while you said that should be "self explanatory".
4- Now download Clockwork Recovery from here
Click to expand...
Click to collapse
You may want to up date the link, ClockWorkMod now has a Recovery program which is touch sensitive:
GSM: http://download2.clockworkmod.com/recoveries/recovery-clockwork-touch-6.0.1.0-maguro.img
Sprint: http://download2.clockworkmod.com/recoveries/recovery-clockwork-touch-6.0.1.0-toroplus.img
VRZ: http://download2.clockworkmod.com/recoveries/recovery-clockwork-touch-6.0.1.0-toro.img
Step 12 finishes with
That's all. You are now unlocked and rooted. Reboot. Make sure you install the paid versions of rom manager, titanium backup, and update superuser app.
Click to expand...
Click to collapse
Therefore what is the need of doing #13 and 14?
Furthermore, Step 13 starts by
13- Download Rom Manager and flash the recovery again (top choice)
Click to expand...
Click to collapse
What is that top choice? Do you mean restart from the top at step #1? If you need to reflash again CWN, would it be simpler to restart from Step 10 instead of going back to the top?
And BTW, what is the reason to reflash the CWM Recovery again just after you have successfully flashed it at Step 12? Could that be #13 and #14 are some steps of an older guide which no longer apply now but you forgot to remove?
Sorry for the silly question but I am rather lost. After all that hardwork, when I attempt to Update SuperUser, it failed on the line "Gaining root access ..." What is the reason and how to fix that? FOUND ANSWER: the su.zip given in the post is Superuser 3.07 which is outdated, It is probably buggy. Replaced it by SuperSU 0.94 and it works perfect: http://download.chainfire.eu/204/SuperSU/
Thanks
worked like a charm.. if you have problem using fastboot, just cd to the folder with fastboot and run it like this:
Code:
sudo ./fastboot "command"
it will require your password and then work normally, seems like it need super user permissions.
Also for new user: to avoid writing a command or a folder name manually just push the TAB button, it will autocomplete the word if it's unique in that folder
Hi guys,
I rooted my Rogers GS3 using the Guide in the Development Forum (http://forum.xda-developers.com/showthread.php?t=1822308), I followed the instructions exactly, including the below:
To Flash ClockworkMod Recovery: Have the recovery image on the internal memory...name as "recovery.img"
Download Android Terminal Emulator from the Play Store, have the recovery image on the internal memory, run:
Once in the terminal type: su (press enter)
Then type: dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p18 (press enter)
The terminal manager app appeared to execute this properly, there is even a folder in my /sdcard now called "clockwork"
BUT when I boot the phone into download mode (power + home + volume down) I do not see a Clockwork Mod Recovery icon, just the standard "press volume up to enter download mode, volume down to restart your device" option. I've been told that I cannot confirm CWM Recovery is installed until I see the Clockwork Mod Recovery option appear in this mode.
Any idea why it's not appearing? Or an alternative method for installing CWM Recovery?
Try pressing Volume up instead of volume down. Volume down is download mode.
Well, that was easy.
LOL.
Thanks. Working.
I have seen some people suffering this issue like I did before and Other guys just offering the advice of " Use LG flash tools to flash to stock"
Yes, it could solve the problem. But it takes so much effort and hustle to fix such a easy issues.
There is always a easy way to solve a problem. Keep reading.
This method should work for LG Optimus G Pro using the same recovery. Like E980, E985, E986. I only try this on my phone (AT&T E980)
Issue:
Your phone keep boot into CWM or TWRP all the time, no mater what you did- factory reset, wipe system, install new rom. It just keep going into recovery all the time.
What might cause this:
You install recovery in your phone and when you are in stock rom, you accidently hit "check update" and " install update".
You might not remmeber you did that , and the system just pop up showing " update available", and you click it....That is how the nightmare starts.
How to fix
If you are using CWM, try this method: http://forum.xda-developers.com/showpost.php?p=49370751&postcount=70 But I personally like the TWRP method below ( just flash TWRP over CWM and use the TWRP method bellow)
remember hit thanks to @chappatti
Following these steps:
1.a. If you are stuck on CWM OR TWRP boot loop DO NOT DO ANYTHING YET to the phone or anything. All you need to do is delete the "fota" file. keep reading
1.b. YOU MUST HAVE ADB INSTALLED AND WORKING.
1.c. Open cmd prompt as admin and run "adb devices". If you get
"List of devices attached
XXXXXXXX recovery" GO TO STEP 7.
If you HAVE adb installed and get no device output....continue from 2.
Otherwise, INSTALL ADB.
2. With the phone in CWM plug it into the computer.
3. Your computer MAY not see the phone. i.e you will get the ping noise for USB cnnection, but if you look under
COntrolPanel>>>>DeviceManager you will see a yellow exclamation mark. The next part I figured by trial and error.
If your phone is seen properly go to step 5.
4. If 3: although I installed the drivers again, if you had the phone working on adb before try this step:
4.b. Press and hold the Volume DOWN (volume decrease) button and hold the power button.
NOTE: I am not 1000% whether volume up or down did it. Try each one.
HOLD until the phone goes off and reboots. After the LG logo release the power. You will see black and white text as the phone tries to go into factory reset. It will ask if you want to factory reset...... SAY NO by pressing volume down button. During reboot my computer saw my phone and installed the driver. Phone was still on CWM recovery now.
4.c. If 4.b. did not work reinstall following drivers (attached rar): I do not know which worked, if any
LGUnitedMobileDriver_S50MAN310AP22_ML_WHQL_Ver_3.1 0.1
minimal_adb_fastboot_v1.1.3_setup
UniversalAdbDriverSetup
LGPCSuite_Setup
http://www.mediafire.com/download/1j...nd STUFF.rar
5. These steps I got from this forum post here: I DO NOT CLAIM ANY CREDIT http://forums.androidcentral.com/t-l...ot-loop-2.html
6. Open cmd promt as administrator.
7. Run "adb devices"
You will get
"List of devices attached
XXXXXXXX recovery" Now you are good to proceed
Enter the following one by one
adb shell
dd if=/dev/block/platform/msm_sdcc.1/by-name/fota of=/sdcard/fota-backup.img
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
it will say xxxx info in and out or soemthing each time.
Type "exit" to leave adb shell.
Then "adb reboot". This will reboot your phone and all is great !!
If you are using TWRP, or the method above did not work for you, flash TWRP as your recovery, then using this TWRP method.
remember to hit thanks to @thecubed here is the post: http://forum.xda-developers.com/showthread.php?t=2451696
you can simply use TWRP's awesome "terminal command" option to run the following code
go to "Advance" " Terminal Command", select the current folder( root folder), and type the following code:
Code:
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
You'll have to type that whole thing out, and be VERY careful with spaces and punctuation. One wrong letter and you could nuke your phone.
After that finishes, you can reboot and continue on your happy way!
I took no credit for these method, they are work of other XDA members.
Hit thanks if any of us help you solve your problem.
This is VERY good work! THANK YOU!
Sent from my LG-D415 using XDA Free mobile app