[Guide] How to recover your semi-brick

Search This thread

Hawon

Senior Member
Nov 9, 2009
219
15
Chicago
My phone is semi-bricked now.. and my problem is ADB command doesn't really work right now...
It keeps telling me my phone is offline. what should i do?
 

amroush_1800

Member
Nov 26, 2010
14
186
Here is how I managed to solve this boot loop

I PermRooted using VISIONary S-OFF using hboot_7230_0.84.2000_100908.nb0
but when i rebooted phone.... Oh **** !! i got stucked in a reboot loop.
my new phone became a semi-brick. :mad:

what i did:

* Android SDK
unzip to C:\android-sdk-windows
* HTC Sync
install to get necessary USB drivers for ADB & fastboot protocols

i connected usb cable, then started phone normally. I issued this
command several times before the reboot occurs again to dump
debug messages from android kernel

> adb shell dmesg

INFO [ 7.424316] mmcblk0: mmc0:0001 SEM04G 2.17 GiB
INFO [ 7.424621] mmcblk0:
INFO [ 7.537780] EXT3-fs: INFO: recovery required on readonly filesystem.
INFO [ 7.537994] EXT3-fs: write access will be enabled during recovery.
<2>[ 17.243713] EXT3-fs error (device mmcblk0p26): ext3_add_entry: bad entry i
n directory #80002: rec_len is smaller than minimal - offset=0, inode=0, rec_len
=0, name_len=0
INFO [ 105.371154] request_suspend_state: wakeup (0->0) at 99729444658 (2010-12-0
3 01:22:50.574279812 UTC)
ERR [ 105.374786] init: untracked pid 1368 exited


from the log, i see that android fails to load its kernel because of filesystem
errors on the ROM and this caused the endless boot loop. it seems that
VISIONary or hboot may incorrectly handle the ROM cache resulting in
cache faults. A scandisk may partially solve these errors. :confused:


start phone in fastboot mode (power + volume down). connect to pc by usb cable.

manually installed ClockworkMod Recovery to phone

>C:\android-sdk-windows\fastboot flash recovery recovery-clockwork-2.5.1.2-vision.img



reboot phone again into boot menu (power + volume down).
select recovery to get into CWM -> then mount data and system partitions.


with the usb cable still connected i am able to adb to the phone

From a cmd window on pc :


>C:\android-sdk-windows\adb devices
List of devices attached
HT0B6RT00035 device

>C:\android-sdk-windows\adb shell

~ # cat /proc/mounts
cat /proc/mounts
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/dev/block/mmcblk0p27 /cache ext3
/dev/block/mmcblk0p25 /system ext3
/dev/block/mmcblk0p26 /data ext3
/dev/block/mmcblk1p1 /sdcard vfat



we need first to unprotect the ROM and unmount its partitions before these errors can be fixed


~ # adb push wpthis-pre-OTA.ko /data/local/wpthis-pre-OTA.ko

~ # insmod /data/local/wpthis-pre-OTA.ko
insmod: can't insert '/data/local/wpthis-pre-OTA.ko': Function not implemented

~ # umount /system
~ # umount /data
~ # umount /cache
~ # umount /devlog

~ # e2fsck -y -f -v /dev/block/mmcblk0p25
~ # e2fsck -y -f -v /dev/block/mmcblk0p26
~ # e2fsck -y -f -v /dev/block/mmcblk0p27
~ # e2fsck -y -f -v /dev/block/mmcblk0p28

~ # dd if=/sdcard/hboot_orig.bak of=/dev/block/mmcblk0p18

~ # reboot



then, restarted my DZ as usual.

Viola ! my DZ is back to life again :D
 

fastludeh22

Senior Member
Mar 22, 2009
369
29
Here is how I managed to solve this boot loop

I PermRooted using VISIONary S-OFF using hboot_7230_0.84.2000_100908.nb0
but when i rebooted phone.... Oh **** !! i got stucked in a reboot loop.
my new phone became a semi-brick. :mad:

what i did:

* Android SDK
unzip to C:\android-sdk-windows
* HTC Sync
install to get necessary USB drivers for ADB & fastboot protocols

i connected usb cable, then started phone normally. I issued this
command several times before the reboot occurs again to dump
debug messages from android kernel

> adb shell dmesg

INFO [ 7.424316] mmcblk0: mmc0:0001 SEM04G 2.17 GiB
INFO [ 7.424621] mmcblk0:
INFO [ 7.537780] EXT3-fs: INFO: recovery required on readonly filesystem.
INFO [ 7.537994] EXT3-fs: write access will be enabled during recovery.
<2>[ 17.243713] EXT3-fs error (device mmcblk0p26): ext3_add_entry: bad entry i
n directory #80002: rec_len is smaller than minimal - offset=0, inode=0, rec_len
=0, name_len=0
INFO [ 105.371154] request_suspend_state: wakeup (0->0) at 99729444658 (2010-12-0
3 01:22:50.574279812 UTC)
ERR [ 105.374786] init: untracked pid 1368 exited


from the log, i see that android fails to load its kernel because of filesystem
errors on the ROM and this caused the endless boot loop. it seems that
VISIONary or hboot may incorrectly handle the ROM cache resulting in
cache faults. A scandisk may partially solve these errors. :confused:


start phone in fastboot mode (power + volume down). connect to pc by usb cable.

manually installed ClockworkMod Recovery to phone

>C:\android-sdk-windows\fastboot flash recovery recovery-clockwork-2.5.1.2-vision.img



reboot phone again into boot menu (power + volume down).
select recovery to get into CWM -> then mount data and system partitions.


with the usb cable still connected i am able to adb to the phone

From a cmd window on pc :


>C:\android-sdk-windows\adb devices
List of devices attached
HT0B6RT00035 device

>C:\android-sdk-windows\adb shell

~ # cat /proc/mounts
cat /proc/mounts
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/dev/block/mmcblk0p27 /cache ext3
/dev/block/mmcblk0p25 /system ext3
/dev/block/mmcblk0p26 /data ext3
/dev/block/mmcblk1p1 /sdcard vfat



we need first to unprotect the ROM and unmount its partitions before these errors can be fixed


~ # adb push wpthis-pre-OTA.ko /data/local/wpthis-pre-OTA.ko

~ # insmod /data/local/wpthis-pre-OTA.ko
insmod: can't insert '/data/local/wpthis-pre-OTA.ko': Function not implemented

~ # umount /system
~ # umount /data
~ # umount /cache
~ # umount /devlog

~ # e2fsck -y -f -v /dev/block/mmcblk0p25
~ # e2fsck -y -f -v /dev/block/mmcblk0p26
~ # e2fsck -y -f -v /dev/block/mmcblk0p27
~ # e2fsck -y -f -v /dev/block/mmcblk0p28

~ # dd if=/sdcard/hboot_orig.bak of=/dev/block/mmcblk0p18

~ # reboot



then, restarted my DZ as usual.

Viola ! my DZ is back to life again :D

Great, glad you got it going! You were able to do that cause the s-off hboot had worked before the other probs had started. If you had an hboot problem the phone would not boot at all.

I would have omitted the last step, that put u back to s-on.

Alterntivly I would have suggested the steps under "if hboot is s-off". That being manually install cwm recovery (like you did). But then wiping and fashing rom of your choice. You would be done at this point w/your new rom + root.

But to each their own, that's the beauty of android, many different ways to do something. The end result is your phone is working again, and that's all that really matters! Hope something in this guide helped you, and the info you added helps someone else.

I suggest the rage method next time to root. And the new true radio s-off from scotty2.
 
Last edited:

fastludeh22

Senior Member
Mar 22, 2009
369
29
well, i should explained myself better. I can't use ADB command at all. Since this semi-bricking, my phone does not recognized by ADB commands at all. ADB shows my phone is offline.

Have you tried it all the different ways I described in the 2nd post?

How did this happen? I.e. using visionary on stock phone. Or did you have custom rom /kernel installed and did something to cause this? Or...
 

curleecoleman

Member
Mar 26, 2010
19
0
Hello I'm new to posting but I am having the same problems as others ADB only works for me when I am in stock recovery but all it says is device offline I tried to manually flash clockwork recovery but it comes back fail. I also have S-on with the stock rom as well. This all happened when I used Visionary and temp root first and then right after that I perm rooted and phone rebooted and never gets past the htc screen. I tried to most of the options except the very last ones because I cant get ADB to work. Any possible solutions would be greatly appreciated.
 

amroush_1800

Member
Nov 26, 2010
14
186
My phone is semi-bricked now.. and my problem is ADB command doesn't really work right now...
It keeps telling me my phone is offline. what should i do?

Hello I'm new to posting but I am having the same problems as others ADB only works for me when I am in stock recovery but all it says is device offline I tried to manually flash clockwork recovery but it comes back fail. I also have S-on with the stock rom as well. This all happened when I used Visionary and temp root first and then right after that I perm rooted and phone rebooted and never gets past the htc screen. I tried to most of the options except the very last ones because I cant get ADB to work. Any possible solutions would be greatly appreciated.


If you have a stock recovery installed, adb/shell access is disabled by default. when you try to connect to phone by ADB it says device is offline.

If you have both a stock hboot (S-ON) and a stock recovery, i don't think you have any access unless the device boots normally or recovering an official signed pc10img.zip of version equal to or higher than what is installed.

If you have previously flashed an engineering HBOOT (fake S-OFF), you have a chance to connect to the device via FASTBOOT method to flash a custom recovery image.

C:\android-sdk-windows\fastboot flash recovery recovery-clockwork-2.5.1.2-vision.img

From there you have many options. you can either adb/shell to fix filesystem errors or restore a nandroid backup or wipe and and flash a custom rom.
 

curleecoleman

Member
Mar 26, 2010
19
0
If you have a stock recovery installed, adb/shell access is disabled by default. when you try to connect to phone by ADB it says device is offline.

If you have both a stock hboot (S-ON) and a stock recovery, i don't think you have any access unless the device boots normally or recovering an official signed pc10img.zip of version equal to or higher than what is installed.

If you have previously flashed an engineering HBOOT (fake S-OFF), you have a chance to connect to the device via FASTBOOT method to flash a custom recovery image.

C:\android-sdk-windows\fastboot flash recovery recovery-clockwork-2.5.1.2-vision.img

From there you have many options. you can either adb/shell to fix filesystem errors or restore a nandroid backup or wipe and and flash a custom rom.

Thanks for your quick response is there a way to flash the eng hboot since I cannot use adb and also I was wondering if the signed zip in the roms section in the sticky guide can be used as a pc10img.zip for my g2 because I did do the OTA with wifi calling and I have heard people say that there isnt a pc10img for the OTA and that we have to wait for one to be found.
 

steviewevie

Retired Forum Moderator
Oct 28, 2009
5,333
616
UK
If you have a stock recovery installed, adb/shell access is disabled by default. when you try to connect to phone by ADB it says device is offline.

If you have both a stock hboot (S-ON) and a stock recovery, i don't think you have any access unless the device boots normally or recovering an official signed pc10img.zip of version equal to or higher than what is installed.

I think I must be missing something here. Because one of the methods to root the phone (rage) uses adb, and at that point you have a stock everything (recovery, hboot, etc). And adb does work at that point. Is it only a certain part of adb that you're saying doesn't work ?
 

DrLabRatOry

Member
Nov 11, 2010
16
0
Allentown, PA
Yes, if your phone is fully/mostly functional, adb works (assuming you've enabled USB debug). However, in these semi-bricked phones (of which mine is one, grrr), it never gets to the point where adb is enabled.

And so we wait for a signed 1.22+ ROM, which the author of VISIONary said he was going to try to get. A month ago. I'm not holding my breath. He's moved on to other things.

And yes, if you are comfortable with command line and adb, there are absolutely no advantages to using VISIONary, and several disadvantages. I'm just glad I hadn't yet sold my 3GS and iphone_dev figured out how to hack the baseband in the meantime. Life without a smartphone is a bit of culture shock. :p
 

steviewevie

Retired Forum Moderator
Oct 28, 2009
5,333
616
UK
* as new methods are discovered, or ones here are proven wrong, i will update as necessary. as of the writing post, 2 devices that i know of have been saved!

With the new radio S-OFF (gfree), we have a new route to un-bricking now, don't we ? i.e. if you power on the phone while holding down the Volume *Up* button, at which point the phone vibrates and the LED flashes amber. I think this is some sort of mode in which you can talk to the radio via a PC (though the screen is blank).

Do we know anything about this yet ? Or are we waiting for someone (Scotty ?) to figure it out for us ?
 

luis86dr

Senior Member
May 27, 2009
2,224
1,590
Jersey
With the new radio S-OFF (gfree), we have a new route to un-bricking now, don't we ? i.e. if you power on the phone while holding down the Volume *Up* button, at which point the phone vibrates and the LED flashes amber. I think this is some sort of mode in which you can talk to the radio via a PC (though the screen is blank).

Do we know anything about this yet ? Or are we waiting for someone (Scotty ?) to figure it out for us ?

Funny that you mentioned that. I was playing around with my device and noticed that. Haven't got as far as to seeing if I could make the device and my pc communicate under that mode. Maybe ill give it a try when I get home.


[G2/HTC Vision]
 

steviewevie

Retired Forum Moderator
Oct 28, 2009
5,333
616
UK
Funny that you mentioned that. I was playing around with my device and noticed that. Haven't got as far as to seeing if I could make the device and my pc communicate under that mode. Maybe ill give it a try when I get home.

I think you're talking to the OSBL in that mode. I have no idea what you can do there though (obviously, be careful if you're experimenting ! :D )
 

jlopez0109

Member
Dec 2, 2010
19
2
in same boat

Hey all, I am in the same boat as a few of you out there. I did the permroot with visionary and now its stuck in the htc boot logo screen. Having a hard time installing adb with the java sdk and all, so I just dont know what I am going to do with this phone. Worse part is its practically brand new. I tried putting the stock rom in sd card and doing the recovery. It all goes well untill the phone reboots for like a second time...then just back again stuck in the HTC logo screen. Is there something I can do.....or is this g2 useless?
 

IcedZ

Member
Sep 18, 2010
16
4
Gainesville
Hey all, I am in the same boat as a few of you out there. I did the permroot with visionary and now its stuck in the htc boot logo screen. Having a hard time installing adb with the java sdk and all, so I just dont know what I am going to do with this phone. Worse part is its practically brand new. I tried putting the stock rom in sd card and doing the recovery. It all goes well untill the phone reboots for like a second time...then just back again stuck in the HTC logo screen. Is there something I can do.....or is this g2 useless?

Did you do the hex edit?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    YES YOU NEED TO READ THIS WHOLE POST, PROB MORE THEN ONCE TO MAKE SURE YOU GOT IT. YES I KNOW HOW LONG IT IS, I TYPED IT!

    *Also note that not all sections will apply to you. I have tried to seperate different senerios using * at each one. Also more then one section here may be needed by you.


    the reason i call it a semi-brick is because a true brick can bot be recovered with out opening the case.

    first go here and read this for info: http://xdaforums.com/showthread.php?t=838484

    now since your here im going to assume that its too late.

    *things you will need.

    copy of cwm recovery. get it here (the manual install link): http://xdaforums.com/showpost.php?p=9145724&postcount=28

    adb installed and working.

    a known good rom, or nandroid backup. here is one: http://xdaforums.com/showthread.php?t=836042 (use odex one)

    a wpthis.ko for YOUR specfic kernel (run (adb shell cat /proc/version) that will tell you what kernel you have)

    *first thing we need to know is, are you s-off or s-on now?

    if your s-off just boot into clockwork mod recovery, wipe the phone and flash a known good rom and be done with it. if you dont have cwm recovery installed. boot into fastboot (vol down+power) you must have the sdk/adb installed and working, and type fastboot flash recovery LocationOfRecovery.img (where LocationOfRecovery.img= where you have the recovery, ie c:\android\recovery.img). once thats installed follow instructions above.

    *if you are s-on:

    will the phone boot into android? if so your not bad off.

    if you want to unroot to return the phone, follow the unroot thread here: http://xdaforums.com/showthread.php?t=835971

    if you dont want to unroot then you have a couple of different options. if you have cwm recovery still installed, just follow instructions above and flash a known good rom. ive been told that boot.img (kernel) wont flash if you are s-on. the way to fix this (temporarily) is boot into recovery, but before you flash run these commands:
    (put wpthis.ko in sdk folder)

    adb remount
    adb push wpthis.ko /data/local/wpthis.ko (specific for your kernel)
    adb shell
    # insmod /data/local/wpthis.ko (should get same function not implemented error as when u rooted first time)

    then proceed to flash the rom. once booted into android skip down to, "now to get back to s-off"

    *if you have stock or eng-recovery installed.

    will the phone attempt to boot android at all? where is it stuck at?

    a good min after it starts to try to boot, type these commands:

    adb remount
    adb shell

    if you can get in shell then theres still hope. back out shell for a second and start here:
    put the cwm recovery.img and wpthis.ko in your sdk folder
    adb remount
    adb push wpthis.ko /data/local/wpthis.ko (specific for your kernel)
    adb push recovery.img /data/local/recovery.img
    adb shell
    # insmod /data/local/wpthis.ko (should get same function not implemented error as when u rooted first time)
    # dd if=/data/local/recovery.img of=/dev/block/mmcblk0p21 (now wait a min or 2 to give it time to finish)
    #sync (give it another min or to just to be safe)
    #reboot recovery

    at this point you should be in cwm recovery. follow instructions above for flashing with s-on.

    *if you cannot get into shell while booting, but have eng-recovery installed, there might be some options.(however this is all theory)

    boot into recovery-
    if you are on linux using adb, you can try taking sh from /system/bin folder of any custom rom, chmod 0755 it, then push it to /system/bin and adb shell might work.

    windows-
    boot into recovery.
    a system.img compatible with your installed kernel pushed may work. put the system.img into the sdk folder.

    adb push system.img /data/block/mmcblk0p25

    then reboot and see where you are. if that dont work, grab the modified miscnew.img here: http://www.4shared.com/file/pUPfrGi-/mmcblk0p17.html

    rename it misc.img put it in sdk folder and

    adb push misc.img /dev/block/mmcblk0p17

    then reboot into bootloader with PC10IMG.zip on root of sdcard and it should run though. if it does your fully stock and get to start all over again.

    *if you cannot get into shell, and you have stock recovery, s-on, and post OTA, im sorry your pretty screwed. as of right now the only thing thats gonna bring it back is a full img/update signed from htc thats equal to or higher then the version currently on the phone. (well and jtag of course)


    *well now you've done one of the steps above. your booted into android, you have perm root, and cwm recovery installed, just still s-on. dont worry your almost there!

    first take that wpthis.ko for you kernel and push it, and the eng hboot.

    adb push wpthis.ko /data/local/
    adb push hboot-eng.img /data/local

    then from adb shell, or terminal root prompt:

    # insmod /data/local/wpthis.ko (again you should get the function not implemented error)

    NOW REMEMBER THIS NEXT STEP COULD MEAN DEATH FOR YOU G2 IF TYPED WRONG, AND AFTER ALL THIS HARD WORK!

    # dd if=/data/local/hboot-eng.img of=/dev/block/mmcblk0p18

    wait a few mins to be sure its done.

    # sync

    wait a few more just cause.
    reboot, you should now be s-off, cwm recovery installed, and free to do whatever you want. just dont go screwing it up again ;)


    * as new methods are discovered, or ones here are proven wrong, i will update as necessary. as of the writing post, 2 devices that i know of have been saved!

    good luck!

    wpthis.ko for bacon bits.03 kernel: http://www.4shared.com/file/OAcd1bix/wpthis-263221-cyanogenmod.html
    1
    did some reading found this post http://xdaforums.com/showthread.php?t=834427

    downloaded guide
    followed instructions

    :eek: That's a Desire HD guide ! You could brick your phone following a guide for the wrong phone (assuming you're in the right forum, i.e. have a G2/DZ).

    my kernel wasn't on of the ones listed so i modified the one 2.6.32.21-gf3f553d to be 2.6.32.21-g9ab3677 where stated and moved files to sdcard root
    ran gscript files
    rebooted still no perma-root

    noticed that i had kernel 2.6.32.17-g9ab3677 so changed the file to have 17 instead of 21 before the - in the kernel name.

    Do you have S-OFF ? Do you have the engineering bootloader (what does it say if, from power off, you go into hboot, at the top) ?

    I think you need to flash a complete ROM, but we need to do so carefully depending on exactly what state (e.g. S-OFF etc) your phone is in at the moment.
    1
    I think you have the DZ engineering bootloader on your G2, which might explain why you have all the bootloops. I believe the partitions are different, so it will flash roms and recoveries to the wrong place.

    Sorry, I don't have any advice on how to move forward.


    Sent from my CyanogenMod Vision


    if he had the dz hboot on g2 (or vice-versa) it SHOULD work. same internals. yes partitions are different so would require a reflash of a rom though.

    HOWEVER he has a desire HD hboot on there, and all i can say is HOLY **** YOUR LUCKY, it will still let you in fastboot. most time wrong hboot=true brick, but it must just be close enough to boot.

    now here is what i would try, and should work but dont hold me responsible. grab the g2 hboot here: http://xdaforums.com/showthread.php?t=834228

    it will be in that download under perm root folder, hboot-eng.img put that file on the root of your computers c drive. boot into fastboot and do:

    fastboot flash hboot c:\hboot-eng.img

    give that time to finish, then do:

    fastboot reboot bootloader

    when your back in it should say "HBOOT_0.76.2000"

    if it does follow this post: http://xdaforums.com/showpost.php?p=9284754&postcount=187

    if it does NOT say that post back here and we'll go from there
    1
    hi all,

    i have the following error on my clockworkmod recovery.

    IMG_20101229_025703.jpg


    i've previously gotten into a semi-brick state and my phone went into a boot loop, so i followed a lot of other guides and finally got my clockworkmod flashed on the phone.

    phone is S-OFF and i guess it should be rooted.

    this is my first time working on android and any help will be really appreciated. :)

    another issues, when i try to use adb devices command it returns me saying that my device is in the recovery mode, is that normal?

    last question. if i get my clockworkmod to work, can i just flash the CyanogenMod-6.1 for Vision :: V6.1.1 rom?
    I've read a lot about radios and such, i am kina worried if any of these will affect the whole flashing process.

    The system partition is where the programs and other important stuff for your ROM are located. So it seems there's something still wrong with that. But Clockwork seems to be installed correctly (though you have 2.5.1.2 and there is a 2.5.1.3 available, but that's not really an issue or important right now).

    Yes, you won't be able to use adb with your phone in recovery mode, Android will have to be up and booted for adb to work. Though if you have the engineering bootloader you can use fastboot commands from your PC to flash images (and do a few other things as well) to your phone before it gets into Android.

    Yes, you should be able to flash Cyanogen now. What radio you have shouldn't affect the flashing process.
    1
    can you point me to a guide for doing the rom flashing?
    So as to speak, i can ignore the error above and start to do the rom flashing right? just to make sure before moving on, don't wish to end up in another semi brick state.

    Yes, you should be fine to go ahead and flash. You have S-OFF which is helping a lot, and flashing a new ROM should start things afresh.

    Download the CM ROM onto your PC and transfer it onto your SD card.

    Then go into Clockwork and select the option to wipe your current ROM (data/cache).

    Then select the option to flash a ROM from your SD card.

    See the Cyanogen thread for more info - http://xdaforums.com/showthread.php?t=841275