SOLVED: Stuck in fastboot with low battery. Use this BATCH file!

Search This thread

danio.78

Member
Jul 31, 2007
24
0
are u keep pasting wht was writtin in the batch in cmd window or not ??
u can try to keep doing it in wall charger like connect the phone and when it boots to bootloader shut it down and so onn for hour then test it in pc to get how much voltage u reached ! maybe it will work even faster if u have nokia charger !

I have to paste

@ echo off
: start
fastboot getvar battery-voltage

fastboot reboot-bootloader

ping / n 6 localhost> nul

goto start

into cmd windows?
 

sallam5010

Senior Member
Sep 25, 2008
484
170
Google Pixel 7 Pro
hell yeaaah

it worked and btw i dont have to go till 3680v i tried on 3660 and it worked unlocked flashed CWM and noww am gonna flash my new ROM happy thank u
u r a legend :D:D:D
 

treebill

Senior Member
Jan 28, 2011
2,130
564
I have to paste

@ echo off
: start
fastboot getvar battery-voltage

fastboot reboot-bootloader

ping / n 6 localhost> nul

goto start

into cmd windows?







yes u have to keep pasting this keep pasting it the phone will keep restarting and u will see in the cmd screen that ur voltage is increasing

It's a batch file, you paste it into notepad then save as name.bat and run it

It will do the command wait 6 secs and then loop over.


Sent from my HTC One X using xda premium
 

WasifSal

Senior Member
Mar 29, 2012
425
48
OnePlus 8T
Does the phone's screen even turns ON? cuz my phone gets into the Bootloader :/
U said it keeps the screen OFF. It gets into the Bootloader for like 2-3 seconds, waits for it to be detected and then goes black for like another 2-3 seconds. this seems really awkward cuz after 10 minutes, My phones battery just increased from 3342 to 3347mV

Did any other people had this problem?
 

floepie

Senior Member
Feb 28, 2006
1,990
455
Amsterdam
Does the phone's screen even turns ON? cuz my phone gets into the Bootloader :/
U said it keeps the screen OFF. It gets into the Bootloader for like 2-3 seconds, waits for it to be detected and then goes black for like another 2-3 seconds. this seems really awkward cuz after 10 minutes, My phones battery just increased from 3342 to 3347mV

Did any other people had this problem?

If know how to run a batch, then the phone will continue to reboot (off and on). If you don't know how to run a batch, then look it up. The phone will slowly recharge but should go up faster than that after 10 minutes. Just watch your PC's screen and wait until it arrives at around 3.68V. You have enough power then to re-unlock your bootloader.
 

WasifSal

Senior Member
Mar 29, 2012
425
48
OnePlus 8T
If know how to run a batch, then the phone will continue to reboot (off and on). If you don't know how to run a batch, then look it up. The phone will slowly recharge but should go up faster than that after 10 minutes. Just watch your PC's screen and wait until it arrives at around 3.68V. You have enough power then to re-unlock your bootloader.

Thanks for the reply really appreciate it :D
So I had put it on the Front of the USB Ports of my PC. Not on the back which are mounted on the mother board :p
So now it went from 3555mV to 3573mV in like 10 minutes. This will do the job for me but I still have to flash a ROM or a RUU

I know this is off-topic but can u explain if I flashed a O2 UK RUU that is 1.26.206.2 on my O2 UK phone which was upgraded to the latest i.e 1.29.206.11
Will that cause problems since its a downgrade? :/
 

floepie

Senior Member
Feb 28, 2006
1,990
455
Amsterdam
Thanks for the reply really appreciate it :D
So I had put it on the Front of the USB Ports of my PC. Not on the back which are mounted on the mother board :p
So now it went from 3555mV to 3573mV in like 10 minutes. This will do the job for me but I still have to flash a ROM or a RUU

I know this is off-topic but can u explain if I flashed a O2 UK RUU that is 1.26.206.2 on my O2 UK phone which was upgraded to the latest i.e 1.29.206.11
Will that cause problems since its a downgrade? :/

Just go ahead now and re-unlock your bootloader at HTCdev, so you can get back into your custom recovery. Anything from there is indeed off-topic.
 

EddyOS

Senior Member
Jan 2, 2010
15,279
4,035
London
Thanks for the reply really appreciate it :D
So I had put it on the Front of the USB Ports of my PC. Not on the back which are mounted on the mother board :p
So now it went from 3555mV to 3573mV in like 10 minutes. This will do the job for me but I still have to flash a ROM or a RUU

I know this is off-topic but can u explain if I flashed a O2 UK RUU that is 1.26.206.2 on my O2 UK phone which was upgraded to the latest i.e 1.29.206.11
Will that cause problems since its a downgrade? :/

That won't work as you can't go backwards, the HBOOT will fail and it'll error
 

WasifSal

Senior Member
Mar 29, 2012
425
48
OnePlus 8T
@EddyOS I gave you a PM so please take a look at that. Since I don't wanna post anything that is off-topic

---------- Post added at 03:58 PM ---------- Previous post was at 03:48 PM ----------

Just go ahead now and re-unlock your bootloader at HTCdev, so you can get back into your custom recovery. Anything from there is indeed off-topic.

It won't unlock it even with 3588mV :/
I'll let it wait for charge i think.

---------- Post added at 04:18 PM ---------- Previous post was at 03:58 PM ----------

not going above than 3588mV :(

---------- Post added at 04:32 PM ---------- Previous post was at 04:18 PM ----------

Can anyone please help me?? :'( :'(
 

WasifSal

Senior Member
Mar 29, 2012
425
48
OnePlus 8T
UPDATE! FIXED IT!

I'm such an idiotic person in the whole xda forum :D
I was using a faulty data cable, my friend has the SGS2 cable, came with it so used that. Worked like a charm! Thanks to everyone who replied to my "useless and crazy" comments. :p
 

mtumnene

Member
May 24, 2012
20
0
That won't work as you can't go backwards, the HBOOT will fail and it'll error
hello, i have done all this, i managed to get enough charge and re-unlock the boot loader
and tried to flash clock work mod recovery which i have done, so when i try to access recovery it just get stuck at the htc logo and that's it, is anything that am possible do wrong (plz help)
 

floepie

Senior Member
Feb 28, 2006
1,990
455
Amsterdam
If you really know how to boot into recovery and you are still at the same spot, then just reflash the recovery in fastboot with the latest CWM, after you're fully charged.
 

rezzwan

Member
Sep 23, 2010
6
0
I too have stuck in bootloader while ago. to solve this problem. I used my friend's charger which is from Samsung Galaxy S2, charge it on welcome screen. wait for an hour or 2 hours later. you can flash anything you want.

I guess other brand's charger have more voltage than normal one. Cheers

You don't need to cut your wires, it can be expensive in some countries.
 

mtumnene

Member
May 24, 2012
20
0
i have done what you said, i have flashed the latest cwm but it still wont allow me to access recovery it still just hangs at the htc logo (i have no idea why it wont let me access cwm)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 124
    You have a problem when you have ALL of the following conditions met:

    1. Your battery level is below 3.68 V (3680 mV) (about 10% charged).
    2. You have a custom recovery on the recovery partition AND a custom ROM on the system partition.
    3. You have just re-locked your bootloader and you can't re-unlock it because your battery is too low (less than 10%).

    Here's the problem: If you want to use a RUU, you need about 30% battery. But, if you have less than that, you need to charge it. But the problem is, you can't charge it because you can't boot your phone into either recovery or the ROM itself in order to accept a charge. A re-locked bootloader will NOT allow you to boot either into the custom recovery or the custom ROM. And, you cannot charge your phone in fastboot. Additionally, you cannot re-unlock your bootloader because your phone has even less than 10% charge (3.68 V). If you have between 10% and 30%, then simply re-unlock your bootloader and boot into recovery and charge as normal to a level somewhere above 30% if you want to flash an RUU. But, if your battery is below 10%, then you will need to bring it back above 10% with the script below.

    So you need the following script which power cycles your phone repeatedly in order to turn off your screen long enough to accept a charge. Once you reach 3.68 V, which is 10% charge, you're through the woods, so to speak, as you can then, re-unlock your bootloader.

    Run the following script as a batch file while your phone is in USB fastboot mode.

    Here is the script:
    Code:
    " @echo off
    :start
    fastboot getvar battery-voltage
    
    fastboot reboot-bootloader
    
    ping /n 6 localhost >nul
    
    goto start
    "
    17
    SOLVED!

    This little bad boy of a batch file saved my life. I was in a situation where my phone had a custom ROM with a re-locked bootloader and a low battery. The battery cannot be charged while in fastboot, and there was too little charge to re-unlock the bootloader. If you have a custom ROM with a custom recovery (CWM) and a locked bootloader, you cannot get into recovery.

    In any case, if you create a batch file with the following contents, you can make your phone continually boot indefinitely, which allows the screen to be off sufficiently long enough between boots that the battery begins to charge. And, when voltage apparently approaches 3.68V, you have enough charge to re-unlock the bootloader and charge normally without the phone's screen in fastboot continually on.

    " @echo off
    :start
    fastboot getvar battery-voltage

    fastboot reboot-bootloader

    ping /n 6 localhost >nul

    goto start
    "

    Source: http://xdaforums.com/showthread.php?t=1643483
    5
    There you go. Change the extension to *.bat from *.txt
    4
    i made a shell script that should do the same thing for linux users, i haven't tested it on OS X or any other *nix OS but feel free to try!

    just make sure it's in the same folder as your fastboot command

    Code:
     #!/bin/sh
    while true
    do
    ./fastboot getvar battery-voltage
    ./fastboot reboot-bootloader
    sleep 5
    done
    4
    To make things simple I've included a bat and adb files etc. Just unzip this file and double-click "flatbattery.bat"

    And many many thanks OP. You're advice is currently rescuing my HOX :good: