[Q] [Help!] An Accident

Search This thread

MySlimey

Senior Member
Oct 1, 2011
60
2
Antipolo
I accidentally wiped my internal storage while flashing a new rom. Now I am in recovery and not having anything in. I can't even mount anything or flash anything :\ What can I do to fix it?
 

KriBKriB

Member
Mar 25, 2013
42
12
Singapore
Hi!
If you have previously copied a backup to your computer (You should always do this) you can restore it by using the push command in ADB to your device and then restoring the file the normal way in Recovery. (Mind the file path, it should be exact. If you have no backup download any ROM to your phone and push this in the same way. I recommend Android Revolution, but any ROM will do.

It might be easier to first install a ROM, then do a backup of it to find the exact path if you want to restore a previous backup.

I have only used it a few times, but a quick Google search should give you enough information to get you started with the push commands.
 
  • Like
Reactions: MySlimey

alray

Inactive Recognized Contributor
May 22, 2012
8,932
3,593
I accidentally wiped my internal storage while flashing a new rom. Now I am in recovery and not having anything in. I can't even mount anything or flash anything :\ What can I do to fix it?

follow this guide to transfer your rom again to your phone, while booted in recovery:

HTC ONE M7_U/M7_UL - ADB PUSH & FLASH A ROM - DETAILED INSTRUCTIONS


Prerequisites:
  • You need ADB and FASTBOOT on your computer, either by installing the Android SDK or Minimal ADB and FASTBOOT
  • You need to know how to start a fastboot/adb command prompt:
    To open a command window prompt, in Windows go to Start Menu --> ''Run'' then type cmd. Change the directory to the ADB folder on your machine:
    • If using the default install location for the SDK:
      Code:
      cd C:\android-sdk-windows\tools
    • If using the default install location of Minimal ADB and FASTBOOT:
      Code:
      cd C:\Program Files (x86)\Minimal ADB and Fastboot
    • Or hold left shift + right click a blank space inside the folder where adb and fastboot are located and select ''Open command window here'' from the contextual menu.
      Open%20command%20window.png
  • You need TWRP recovery (2.6.3.3 for all 4.4+ roms or 2.7.1.1 for newer CM roms) on your device.

    1. Unlock bootloader if not already unlocked:

      Thanks to Electroz for the video tutorial
    2. Flash TWRP Recovery:
      1. Make sure the recovery.img file is in the same folder where adb and fastboot are located
      2. reboot phone in bootloader mode
      3. Flash the recovery:
        Code:
        fastboot flash recovery name_of_recovery.img
        fastboot erase cache
        fastboot reboot-bootloader

  • You need your HTC drivers correctly installed on your PC:

    device%20manager.png


    If not, follow this guide (thanks to nkk71):
    originally from @nkk71: [GUIDE] [02-MAR-2014] nkk71's SuperGUIDE to returning 100% back to stock

    follow the below instructions to fix

    Open "Device Manager" -> select the unknown "One" -> right-click -> "Update Driver Software ..." -> "Browse my computer" -> "Let me pick" -> "Android USB Devices" -> select "My HTC ..." -> install that
    just in case, HTC Drivers can be found here: [Drivers] HTC Drivers for Windows - Several Versions (credits to @mdmower)
    though you should already have them since you have been using your phone anyways


    for those who like a visual guide:

    okay so I did a fastboot boot command, and as you can see it didnt install correct driver
    28ioxf6.jpg



    Open "Device Manager"
    2ywxpp3.jpg



    there's the culprit
    312v6me.jpg



    right click and Update Driver Software
    2ivmu5k.jpg



    select Browse my computer for driver software
    357qek7.jpg



    select Let me pick from a list of device drivers on my computer
    2582flf.jpg



    select Android USB Devices
    143jar8.jpg



    select My HTC ... (if you have more than one version, choose the latest)
    axea9h.jpg



    warning, select Yes
    14lhelv.jpg



    successful installation
    21btc3d.jpg



    now it looks better :)
    zwx53s.jpg


    and can confirm:
    Code:
    C:\ADB3>[B]adb devices[/B]
    List of devices attached
    HTxxxxxxxxxx    recovery
Procedure:
  1. Make sure the ROM you want to flash is in the same folder where ADB and FASTBOOT are.
  2. Connect your phone to computer using usb cable
  3. Reboot phone in recovery mode (TWRP):
    • If phone is booted in OS:
      Code:
      adb reboot recovery
      adb%20reboot%20recovery.png
    • if not booted or bootlooping, hold power button + volume down until phone boot in bootloader mode
      then select BOOTLOADER then RECOVERY using volume up/down to navigate and power button to select.
  4. Make sure your phone is booted in TWRP main menu:
    main%20menu.png
  5. transfer the rom to your /sdcard folder:
    Code:
    adb push name_of_rom.zip /sdcard/

    Wait for the zip file to transfer, this can take several minutes and there is no progress bar. When the command prompt give you back the hand and display how much bytes transferred in X seconds, the transfer is completed:
    ADB%20PUSH.png

  6. In TWRP main menu, select ''INSTALL''
  7. Browse the installation menu and select your rom zip file inside /sdcard folder:
    install.png
  8. Swipe to confirm you want to flash the rom
    swipe.gif
  9. Reboot phone
 
Last edited:
  • Like
Reactions: MySlimey

MySlimey

Senior Member
Oct 1, 2011
60
2
Antipolo
follow this guide to transfer your rom again to your phone, while booted in recovery:

HTC ONE M7_U/M7_UL - ADB PUSH & FLASH A ROM - DETAILED INSTRUCTIONS




Yeah, I have a problem though. I can't open a fastboot Terminal or and ADB terminal, it always closes really fast. I don't even know how it happens and what causes it :\
 

alray

Inactive Recognized Contributor
May 22, 2012
8,932
3,593
Yeah, I have a problem though. I can't open a fastboot Terminal or and ADB terminal, it always closes really fast. I don't even know how it happens and what causes it :\

I guess you are trying to execute adb or fastboot by double clicking the icon which is not possible. Open the folder where adb.exe and fastboot.exe are and hold left shift then right click a blank space in that folder. in the contextual menu, select "open a cmd window here" and then you'll be able to type fasboot/adb commands. Its all explained in the guide (2nd prerequisite, 3rd method):
Or hold left shift + right click a blank space inside the folder where adb and fastboot are located and select ''Open command window here'' from the contextual menu.
Open%20command%20window.png
 
Last edited:
  • Like
Reactions: MySlimey

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi!
    If you have previously copied a backup to your computer (You should always do this) you can restore it by using the push command in ADB to your device and then restoring the file the normal way in Recovery. (Mind the file path, it should be exact. If you have no backup download any ROM to your phone and push this in the same way. I recommend Android Revolution, but any ROM will do.

    It might be easier to first install a ROM, then do a backup of it to find the exact path if you want to restore a previous backup.

    I have only used it a few times, but a quick Google search should give you enough information to get you started with the push commands.
    1
    I accidentally wiped my internal storage while flashing a new rom. Now I am in recovery and not having anything in. I can't even mount anything or flash anything :\ What can I do to fix it?

    follow this guide to transfer your rom again to your phone, while booted in recovery:

    HTC ONE M7_U/M7_UL - ADB PUSH & FLASH A ROM - DETAILED INSTRUCTIONS


    Prerequisites:
    • You need ADB and FASTBOOT on your computer, either by installing the Android SDK or Minimal ADB and FASTBOOT
    • You need to know how to start a fastboot/adb command prompt:
      To open a command window prompt, in Windows go to Start Menu --> ''Run'' then type cmd. Change the directory to the ADB folder on your machine:
      • If using the default install location for the SDK:
        Code:
        cd C:\android-sdk-windows\tools
      • If using the default install location of Minimal ADB and FASTBOOT:
        Code:
        cd C:\Program Files (x86)\Minimal ADB and Fastboot
      • Or hold left shift + right click a blank space inside the folder where adb and fastboot are located and select ''Open command window here'' from the contextual menu.
        Open%20command%20window.png
    • You need TWRP recovery (2.6.3.3 for all 4.4+ roms or 2.7.1.1 for newer CM roms) on your device.

      1. Unlock bootloader if not already unlocked:

        Thanks to Electroz for the video tutorial
      2. Flash TWRP Recovery:
        1. Make sure the recovery.img file is in the same folder where adb and fastboot are located
        2. reboot phone in bootloader mode
        3. Flash the recovery:
          Code:
          fastboot flash recovery name_of_recovery.img
          fastboot erase cache
          fastboot reboot-bootloader

    • You need your HTC drivers correctly installed on your PC:

      device%20manager.png


      If not, follow this guide (thanks to nkk71):
      originally from @nkk71: [GUIDE] [02-MAR-2014] nkk71's SuperGUIDE to returning 100% back to stock

      follow the below instructions to fix

      Open "Device Manager" -> select the unknown "One" -> right-click -> "Update Driver Software ..." -> "Browse my computer" -> "Let me pick" -> "Android USB Devices" -> select "My HTC ..." -> install that
      just in case, HTC Drivers can be found here: [Drivers] HTC Drivers for Windows - Several Versions (credits to @mdmower)
      though you should already have them since you have been using your phone anyways


      for those who like a visual guide:

      okay so I did a fastboot boot command, and as you can see it didnt install correct driver
      28ioxf6.jpg



      Open "Device Manager"
      2ywxpp3.jpg



      there's the culprit
      312v6me.jpg



      right click and Update Driver Software
      2ivmu5k.jpg



      select Browse my computer for driver software
      357qek7.jpg



      select Let me pick from a list of device drivers on my computer
      2582flf.jpg



      select Android USB Devices
      143jar8.jpg



      select My HTC ... (if you have more than one version, choose the latest)
      axea9h.jpg



      warning, select Yes
      14lhelv.jpg



      successful installation
      21btc3d.jpg



      now it looks better :)
      zwx53s.jpg


      and can confirm:
      Code:
      C:\ADB3>[B]adb devices[/B]
      List of devices attached
      HTxxxxxxxxxx    recovery
    Procedure:
    1. Make sure the ROM you want to flash is in the same folder where ADB and FASTBOOT are.
    2. Connect your phone to computer using usb cable
    3. Reboot phone in recovery mode (TWRP):
      • If phone is booted in OS:
        Code:
        adb reboot recovery
        adb%20reboot%20recovery.png
      • if not booted or bootlooping, hold power button + volume down until phone boot in bootloader mode
        then select BOOTLOADER then RECOVERY using volume up/down to navigate and power button to select.
    4. Make sure your phone is booted in TWRP main menu:
      main%20menu.png
    5. transfer the rom to your /sdcard folder:
      Code:
      adb push name_of_rom.zip /sdcard/

      Wait for the zip file to transfer, this can take several minutes and there is no progress bar. When the command prompt give you back the hand and display how much bytes transferred in X seconds, the transfer is completed:
      ADB%20PUSH.png

    6. In TWRP main menu, select ''INSTALL''
    7. Browse the installation menu and select your rom zip file inside /sdcard folder:
      install.png
    8. Swipe to confirm you want to flash the rom
      swipe.gif
    9. Reboot phone
    1
    Yeah, I have a problem though. I can't open a fastboot Terminal or and ADB terminal, it always closes really fast. I don't even know how it happens and what causes it :\

    I guess you are trying to execute adb or fastboot by double clicking the icon which is not possible. Open the folder where adb.exe and fastboot.exe are and hold left shift then right click a blank space in that folder. in the contextual menu, select "open a cmd window here" and then you'll be able to type fasboot/adb commands. Its all explained in the guide (2nd prerequisite, 3rd method):
    Or hold left shift + right click a blank space inside the folder where adb and fastboot are located and select ''Open command window here'' from the contextual menu.
    Open%20command%20window.png