• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help accidentally wiped my system

OK, with the OS being blank like that I'll bet you have a TWRP version that's 2.7.x.x one of those versions seems to remove this info. Unfortunately I think this will also mean the version-main entry from running the fastboot command line is also going to come up blank. We still need to check your modelid and CID anyway from the getvar all info.

Edit : kind of ninja'd by Hadron and we'll try not to cross post as it can be confusing.
 
  • Like
Reactions: scary alien
Upvote 0
You can install fastboot on a Mac (if anything it's less hassle than a PC - just install a stand-alone fastboot executable and no faffing with drivers. If you go to HTCdev.com, select the bootloader unlock option, then when you get to the instructions you'll find a download link for the fastboot executable).

I'll have a look for RUUs, see what I can find.
 
Upvote 0
@Hadron (not sure if that works in tapatalk?) I have relevant xda threads bookmarked for a variety of CID stock backups, and a signed MM WWE RUU zip that works via Hboot if it comes to it. Maybe save you some search time, but on train and poor reception so happy if you dig this up. Be tomorrow before I can stick anything up.
 
  • Like
Reactions: scary alien
Upvote 0
@saltire OK, sounds good. I've only found LP WWE ROMs so far, and am not certain which is right for the OP (he says international, but the time zone suggests Asia or Oceana as the location).

Anyway, the radio version is Android 4.4.3, so while Saltire's file is probably the simplest solution (update straight to MM), I've found a couple of Lollipop RUUs which might work as backup options. If your phone has the same cidnum as a European WWE then this file should work. Or else this HTC Asia one might be an option, going by the timezone (both are WWE, it's the question of the region of the handset). If one of these works then you should be able to update over the air to MM.

I should note that I'm still using an M7, and so haven't worked directly with the M8.
 
  • Like
Reactions: scary alien
Upvote 0
First things first, in the bootloader screen in the second line does it say "Locked" or "Unlocked" ? If it says Unlocked (which I think it should since you have TWRP custom recovery installed) then there is no need to go through the htcdev.com process to get the unlock token.

I'm also not sure what you've downloaded from htcdev - I don't know what Android studio is used for. What you need are the fastboot/adb tools, whihc you can get from here:

ADB Guide (updated 2014/11/11)

along with instructions to install. You don't need to worry about the drivers, just the adb and fastboot tools in the mini-SDK zip.

The following references to command prompt and Explorer are for a Win PC since that's what I have, but assume there is an equivalent on the Mac.

Reboot phone to bootloader and plug in to PC (so you see FASTBOOT USB on bootloader screen). Open a command prompt window in the adb/fastboot folder on your PC - if in Explorer hold shift + right click, and pick "Open command window here" from context menu.

Then since you have a Mac, from within the sdk-tools folder type:

./fastboot devices (this is to check fastboot connects to phone ok, it should return the phone serial number)

If it does, then type:

./fastboot getvar all

and post the info the command returns but scrub out your IMEI number and serial number first before posting.

We need to know two further pieces of info about your phone before I can point you to next steps, and these come from the getvar all output.
 
  • Like
Reactions: scary alien
Upvote 0
Unlocked is good and phone being in FASTBOOT USB mode is what you need. Ok, now can you just post the modelid number. Is there anything against version-main or is it blank?

Edit : Although I don't think you are I'm going to ask just the same, is the phone s-off? And can you just copy the whole getvar all output (without IMEI and Serial number) save having to ask each time.
 
Last edited:
  • Like
Reactions: scary alien
Upvote 0
(bootloader) version: 0.5

(bootloader) version-bootloader: 3.18.0.0000

(bootloader) version-baseband: 1.19.21331147A1.16G

(bootloader) version-cpld: None

(bootloader) version-microp: None

(bootloader) version-main:

(bootloader) version-misc: PVT SHIP S-ON


(bootloader) imei2: Not Support

(bootloader) meid: 00000000000000

(bootloader) product: m8_ul

(bootloader) platform: hTCBmsm8974

(bootloader) modelid: 0P6B63000

(bootloader) cidnum: HTC__622

(bootloader) battery-status: good

(bootloader) battery-voltage: 0mV

(bootloader) partition-layout: Generic

(bootloader) security: on

(bootloader) build-mode: SHIP

(bootloader) boot-mode: FASTBOOT

(bootloader) commitno-bootloader: c802cb02

(bootloader) hbootpreupdate: 11

(bootloader) gencheckpt: 0
 
  • Like
Reactions: saltire
Upvote 0
I haven't managed to dig up an RUU for your CID and modelid - so in order to update you will need to get back to stock.

Ok, here's the steps you need to take to get back to stock working phone.

Reboot phone to bootloader and plug in to PC (so you see FASTBOOT USB on bootloader screen). Open terminal on the Mac and type:

./fastboot devices (to check fastboot connects to phone ok, it should also return the phone serial number - write this down carefully as we will need it later)


Next steps to get you up and running:

1) On PC download the TWRP backup files you need from here:

http://forum.xda-developers.com/showpost.php?p=60211235&postcount=2

scroll down to CID HTC__622 section and pick the download link for 3.32.708.4. Based on your bootloader version I think this is correct, but I would also download the older 2.11.708.2 backup as well just in case.

Plus the stock recovery, which is handy to have if you want to fully return to stock, from here:

http://forum.xda-developers.com/showpost.php?p=60211779&postcount=4

in the section headed 2.xx.xxx.xx scroll down and again pick the 2.11.708.2 download link, and in the section headed 3.xx.xxx.xx pick the 3.32.708.4 download link.


2) Next, you need a micro sd card reader so you can copy the TWRP backup files you downloaded to the micro sd card and access them in TWRP. The main point to note is that you need to place the extracted files from the zip or rar file you downloaded from step 1) in a folder, on micro sd card, with the following name:

TWRP\BACKUPS\<your phone serial number>\<backup folder name>

Where:
The phone's serial number is what you noted down - the <your phone serial number> folder you create needs to match this exactly.

For <backup folder name> give it a name you'll recognise eg Stock_Backup - this can be can be whatever you like, I tend to avoid using spaces just in case. Try the later one first, but you may have to repeat this with the older backup download.

The key point is to make sure you have placed the extracted backup files in the above folder, so once we get the later version of TWRP flashed (see below), it will pick up the files for the restore. When you extract the zip/.rar file I suspect you'll find a folder extracted with a name that ends in "... release-keys" it is the files in this folder that you need. You can just use this folder if you like, but as this will appear in TWRP as the backup name I think something called "Stock_Backup" is easier to recognise and deal with.

If you do this before the next steps, it'll save a bit of time.


3) Then download the latest version of TWRP recovery from here, and save to folder on PC where you have the fastboot.exe:

https://dl.twrp.me/m8/

I'd go for the 2.8.7.0 version but latest should be fine if you want to try it. Check the md5sum for your downloaded file matches - the md5sum link is at the top of the website download page, and the mini sdk zip file includes a md5sum checker in it if you haven't got one.

If md5 checks out, reboot phone to bootloader and plug in to PC (so you see FASTBOOT USB on bootloader screen). Open terminal and type:

./fastboot devices (to check fastboot connects to phone ok, it should return the phone serial number)

If it does, then type:

./fastboot flash recovery twrp-2.8.7.0-m8.img (assuming you downloaded this version of TWRP)


4) Then we need to check you can get in to TWRP ok, on phone bootloader screen use vol down to highlight HBOOT from the menu and press power button to select. Wait until HBOOT finishes check (some green text appearing on screen), then select RECOVERY from menu using vol down and pressing power to select.

This should load TWRP. Then you want to do the restore of the backup you downloaded, so select Restore to get into the restore screen. Now you need to point TWRP to your external SD card, look for the line of text in restore screen that will say something like Internal Storage, press on it and then select External SD Card (or might be Micro sd card, can't recall off the top of my head) - it should be obvious which to select. You should then see the backup listed.

Press on backup name, you should then see a screen with various partitions to restore selected (ticked), there should at least be Boot, System and Data. The important bit here is to de-select (untick) Data so that your stock settings aren't overwritten. Then at the bottom swipe the slider left to right to start the restore.

At this point, once restore has completed successfully, I would reboot phone and check it boots ok and complete initial set-up before moving on to the stock recovery step. If it boots ok, and everythign looks/works as normal then you can go to step 5) - if these some things not working quite right you will need to repeat step 2) and step 4) using the older TWRP backup you downloaded.


The following is Optional if you don't want to keep TWRP, and get back to stock - I wouldn't until we're sure phone is working ok

5) On PC, copy the stock recovery image you downloaded to your fastboot folder, reboot phone to bootloader and plug in to PC (so you see FASTBOOT USB on bootloader screen). Open terminal and type:

./fastboot devices (again just to check fastboot connects to phone ok, it should return phone serial number)

If it does, then type:

./fastboot flash recovery recovery_3.32.708.4.img (I haven't downloaded this so the "recovery_3.32.708.4.img" filename might be different, just type this with the correct filename if it is). Note that if you have had to go with the older backup, you need to flash the older recovery as well in this step.

This should be you back to 100% stock rom/kernel and recovery i.e. unrooted.


Optional if you want to go fully back to stock

6) Then if you want to, the last part is just a case of relocking the bootloader and the phone should be set for OTA updates. At this stage until we are sure everything is ok I wouldn't recommend doing this, in case we need to get TWRP back on. Command for this from PC is:

./fastboot oem lock


Let us know how you get on.
 
Upvote 0
Next, you need a micro sd card reader so you can copy the TWRP backup files you downloaded to the micro sd card and access them in TWRP.

i don't have a micro sd card reader :( is there a way around this?

ok what im trying is to put the sd card from my phone into my go pro and then connect the go pro to the computer adn see if it reads
 
Last edited:
Upvote 0
If the phone won't boot into Android your only alternative is to go into TWRP (if that's still working) then you should be able to use ADB commands to do this over usb from the Mac. I think that the following should do what @saltire describes above:

adb devices (just a test - will return your serial number if it is working)
adb shell
mkdir /storage/sdcard1/TWRP/Backups/<your phone serial number>
mkdir /storage/sdcard1/TWRP/Backups/<your phone serial number>/<backup folder name>
exit
adb push <backup file> /storage/sdcard1/TWRP/Backups/<your phone serial number>/<backup folder name>

I am assuming that the backup file is in a directory you can run ADB from, and that you have adb set up on your computer (all similar to fastboot, the mini-idk saltire linked above should install adb too).

What the above does: "ADB" is "Android Debug Bridge", i.e. the USB debugging interface. "adb shell" creates a remote shell (interactive session) on the phone. The "mkdir" command makes a directory. "exit" closes the shell. Then "adb push" copies a file from your computer to the specified directory.

If you aren't familiar with the command line then a microSD card reader will appear simpler, and they are quite cheap - there's just the delay in getting hold of one.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones