[STOCK] Guides and Stock Backups/Recovery/OTA/RUU

Search This thread

topjohnwu

Senior Recognized Developer / Inactive RC
Jan 31, 2012
1,849
61,428
Taipei
HTC 10
Stock Collection​
Hi, I'm creating this thread for people to find all possible files from official HTC.
People can also post backups from your own device here, so people can find files they want easily.
I'll start with me :)

Latest Update (August 23): 1.9X.XXX.X (TWRP & OTA & RUU)​

TWRP Backup (Untouched System Image + Boot)

Stock Recovery

OTA

RUU Zip (Stock Signed)

Stock RUU EXE

XDA:DevDB Information
Stock Collection, ROM for the HTC 10

Contributors
topjohnwu
ROM OS Version: 6.0.x Marshmallow

Version Information
Status: Stable

Created 2016-04-15
Last Updated 2017-02-02
 
Last edited:

topjohnwu

Senior Recognized Developer / Inactive RC
Jan 31, 2012
1,849
61,428
Taipei
How to Create My Own System Backup
If you cannot find a system dump of your current system, and fortunately you've not done any modifications to your system, we need your contribution!
  1. Flash TWRP in download mode
  2. Boot into TWRP, then choose "Mount system as read-only" when it asks you. This is important!!
  3. Backup your device choosing "System Image" (not "System") and "Boot".
  4. Copy the files to your PC, zip them into file and upload to a hosting site I can easily download.
    I'll re-host your uploaded files to my personal AFH account, so you don't have to keep the files online forever if your storage is limited.

How to Get The OTA Link From HTC
Some time ago, HTC changed the place where the OTA files are stored. It used to be stored in internal storage.
The OTA zip will now be downloaded to the following directory:
Code:
/data/data/com.htc.updater/files
This directory is protected and cannot be accessed without root permission.
So here are two methods you can use to get the OTA link directly from HTC servers.
Please share the links in this thread so people unable to get OTAs can download them and apply them manually.

Method 1: Use Network Monitoring Applications

Requirements: You are able get the update notification; you can download the OTA on your phone.
Won't work: Unfortunate devices stuck with the situation stated here
.

By monitoring all network traffic on the device, it is obvious that you can get the OTA links, because your phone is also downloading from the link.
Here I use a paid app called "Charles Web Debugging Proxy" for example. The trial mode can have the job done with no issues.
  1. Download the app to your computer from the official site. It supports all platforms.
  2. Open the app and let it initialize the network settings.
  3. Go back to the phone, connect to the same network as your computer. Open Wi-Fi settings, long press your current connection, select "Edit connection".
  4. Scroll to the bottom, enable proxy. Enter your computer's local network IP for server (search the web for guides to find the IP), and insert "8888" in port, then press save.
  5. On your computer, Charles should detect that your phone is trying to connect the computer. Accept it and you should see all network traffic from your phone.
  6. Back to the phone, go to settings and check for system updates and download the update
  7. You should see some addresses related to HTC/OTA inside Charles, test the links and try if you can download the OTA zip file.

Method 2: Use Logcat And Guess the Download Link

This will work on all devices, include those who cannot even receive OTA discussed here.
  1. Remember to enable "USB Debugging" on your phone
  2. Connect your phone to your computer.
  3. Type following commands, but don't press enter yet
    Code:
    adb logcat > log.txt  // This will store logs in a file called log.txt
  4. Go to settings on your phone, press enter on computer to start logging your device right before you tap on the "Check for updates" on your phone (this is for reducing the length of the logs)
  5. After it notifies there is an update available, or saying that your system is corrupt, press "Ctrl + C" to stop logging.
  6. View the logs, you should find something similar to this:
    Code:
    11353 11803 D UpdaterAPK | UpdaterNetworkCheck: isIPTOn() IPTInfo is null
     1600  1600 D htcCheckinService: onStartCommand()
     1600  1600 D htcCheckinService: onStartCommand() the action name = com.htc.checkin.HTC_CHECKIN
     1600  1600 W Settings: Setting device_provisioned has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
     1600  1600 D htcCheckinService: Roaming is :false
     1600  1600 I htcCheckinService: == Checkin triggered == A8.0(M)
    11353 11536 V UpdaterAPK | DownloadProvider: starting query, database is not null; projection[0] is _id; projection[1] is entity; projection[2] is status; projection[3] is _data; projection[4] is lastmod; selection is hint=?; selectionArgs[0] is OTA_PERFUME_UHL_M60_SENSE80GP_hTC_Asia_TW_1.30.709.1_R-1.21.709.2_R2_release_477314i6fyk64xlvy886ba.zip; sort is null.
    11353 11536 V UpdaterAPK | DownloadProvider: created cursor android.database.sqlite.SQLiteCursor@2edc675 on behalf of 1600
     1600 11804 D PMS     : acquireWL(6ee6ed9): PARTIAL_WAKE_LOCK  htcCheckinService_300 0x1 1600 1000 null
     2827  2827 D HtcTelephonyInternal: CMD_GET_ALL_DEVICE_ID_INFO
     1600 11804 W htcCheckinService.CheckinProtocol: the build rom task id  = 475995
  7. For the example above, you can found out that the expected OTA update zip filename is
    Code:
    OTA_PERFUME_UHL_M60_SENSE80GP_hTC_Asia_TW_1.30.709.1_R-1.21.709.2_R2_release_477314i6fyk64xlvy886ba.zip
  8. Finally, put the file name after the following web address:
    Code:
    http://fotadl-az.htc.com/secure/
    With the example, the final result is
    Code:
    http://fotadl-az.htc.com/secure/OTA_PERFUME_UHL_M60_SENSE80GP_hTC_Asia_TW_1.30.709.1_R-1.21.709.2_R2_release_477314i6fyk64xlvy886ba.zip
    (Note: I'm not sure if every OTA files follows the same rules, this is why I said this is "guessing" the download link)
 
Last edited:

topjohnwu

Senior Recognized Developer / Inactive RC
Jan 31, 2012
1,849
61,428
Taipei
How to Use The TWRP Backups
The zip file you download has the following structure:
Code:
A.BB.CCC.D.zip
|--boot.emmc.win
|--system_image.emmc.win
|--recovery.log
Every device has an TWRP directory in your internal/external storage with the following structure:
Code:
Storage Root
|--BACKUPS
    |--(Your Device ID)
        |--(Backup Name, any name is OK)
            |--boot.emmc.win
            |--system_image.emmc.win
            |--recovery.log
If you don't have a similar folder structure, backup a small file in TWRP (eg. boot), TWRP will create the structure for you.
After extracting the TWRP backup downloaded above, remember to put the files into a correct place so TWRP can detect the backup files.

How to Manually apply OTA Updates
Before we get started, note that in order to install OTA, you are required to have
  • 100% unmodified system (can be restored from TWRP backup provided in OP)
  • Stock recovery (can download from OP)
It is not required to have the exact matching recovery to manually apply OTAs, recoveries that aren't too many versions away should function the same, and thus accept OTA flashings
  1. Place your OTA file to external sdcard, and reboot to stock recovery (if you don't have SD Card use adb sideload instead, search the web for simple instructions):
    Code:
    adb reboot recovery
  2. After booting to the recovery, you'll see a large exclamation mark on the screen.
    Press the power button, then short press volume up + volume down to activate the HTC recovery menu.
  3. Use your volume keys to navigate through items. Navigate to "Apply update from SD card", and press power button to select.
  4. Navigate to your file and press power button to apply
  5. The recovery will now install the OTA.
  6. After reboot, the recovery should automatically install the firmware for you.

How to Get The Firmware For a Particular Version
Download the OTA zip of the version you're interested in. Inside the zip, it will contain a zip called "firmware.zip".
This zip contains a portion of the firmware, you can flash it by rebooting into download mode and use this command:
Code:
fastboot flash zip (path to zip)
 
Last edited:

topjohnwu

Senior Recognized Developer / Inactive RC
Jan 31, 2012
1,849
61,428
Taipei
I see you said that HTC does not support fastboot. How did you install twrp? Also we found on the Nexus 6P that fastboot was having issues and a newer version was found and worked. Have a look in this thread: [GUIDE] Unlock/Root/Flash for Nexus 6P should be newer versions of fastboot that work with Android 6.

I believe he said unable to fastboot boot twrp in order to backup the stock recovery and fastboot flash twrp is not a problem.

@topjohnwu thanks for your contribution

What I mean is the 10 cannot use the fastboot boot XXX.img function, the image was sent successfully but it is stuck at the cmd line showing "booting". I had to flash the TWRP directly to recovery in order to make it boot up.

And about the fastboot version, I always keep two versions of fastboot in my computer, one is directly from Android Studio (which will automatically update to the latest version), and another is from HTC Dev website. It seems that several HTC specific commands on newer HTC devices requires the HTC Dev fastboot to work. Just keep this in mind.
 

Captain_Throwback

Recognized Developer
Ah ok, I had read it that you could not get fastboot to communicate to the device at all! Odd that the command did not work to allow temp boot. Could possibly be a bug in TWRP.
Nothing to do with TWRP. HTC disabled fastboot boot on the A9 as well. It doesn't even work with the stock recovery.
 
  • Like
Reactions: sore500 and Stephen

rav101

Senior Member
System Backup (TWRP with Untouched System Image)
CID: HTC__621
1.21.709.2

Is this the unlocked version or a region specific one? On old HTC phones, I thought the unlocked version was .401???

There has been talk of 1.21.x, 1.22.x to 1.24.x having been pushed as well. Any chance to check for updates or is that off table now that twrp has been installed?
 

topjohnwu

Senior Recognized Developer / Inactive RC
Jan 31, 2012
1,849
61,428
Taipei
Is this the unlocked version or a region specific one? On old HTC phones, I thought the unlocked version was .401???

There has been talk of 1.21.x, 1.22.x to 1.24.x having been pushed as well. Any chance to check for updates or is that off table now that twrp has been installed?
I will update this post as soon as I receive an update, since I do serious backups for my phone before messing around. And as long as I still have my 10 (which will likely be two years), I will keep maintaining this thread. I hope people can help adding content to this thread by sharing their own backups, so users may find a way back to stock for OTAs.

The Taiwanese carriers are following the international standards, and there are no sim lock / region lock / bootloader lock BS (like China and US), so consider this version nearly the same as an international one.
 

Captain_Throwback

Recognized Developer
I will update this post as soon as I receive an update, since I do serious backups for my phone before messing around. And as long as I still have my 10 (which will likely be two years), I will keep maintaining this thread. I hope people can help adding content to this thread by sharing their own backups, so users may find a way back to stock for OTAs.

The Taiwanese carriers are following the international standards, and there are no sim lock / region lock / bootloader lock BS (like China and US), so consider this version nearly the same as an international one.
That's confirmed by the Model ID (2PS620000) and device ID (pmeuhl) being the same as the Europe/Int'l variant. It seems that there will be only 3 total variants of the 10 (at least the one with the S820) once they're all released.
 
  • Like
Reactions: thugslug

blueberry60

Senior Member
Nov 13, 2010
1,182
894
@topjohnwu
Could you possibly to test this HTC 10 Deodexed Rom on your device ?

1.21.709.2 Base
Used sparse_dat perm type for more efficient space usage
Unpacked boot.img and repacked keeping ramdisk
Added init.d support
Added insecure boot
Disabled dm-verity and forceencrypt
Debloated
Deodexed with oat2dex method
Zipaligned all apk and framework apk files

hc10_deodexed_marshmallow.zip
MD5: 4653b96454365206111760d4f641e81c
 
Last edited:
  • Like
Reactions: jureca

Captain_Throwback

Recognized Developer
@topjohnwu
Could you possibly to test this HTC 10 Deodexed Rom on your device ?


1.21.709.2 Base
Used sparse_dat perm type for more efficient space usage
Unpacked boot.img and repacked keeping ramdisk
Added init.d support
Added insecure boot
Disabled dm-verity and forceencrypt
Debloated
Deodexed with oat2dex method
Zipaligned all apk and framework apk files


hc10_deodexed_marshmallow.zip
MD5: 4653b96454365206111760d4f641e81c
If you built this ROM with @SuperR.'s Kitchen, be aware that on the A9, sparse_dat ROMs wouldn't flash at all - they would just get stuck. Set_metadata had to be used to produce a working ROM. Also, I'm assuming you removed the device assert too? Because the current available version of TWRP doesn't have the proper device name in there. I'll be updating it today, most likely.
 

blueberry60

Senior Member
Nov 13, 2010
1,182
894
If you built this ROM with @SuperR.'s Kitchen, be aware that on the A9, sparse_dat ROMs wouldn't flash at all - they would just get stuck. Set_metadata had to be used to produce a working ROM. Also, I'm assuming you removed the device assert too? Because the current available version of TWRP doesn't have the proper device name in there. I'll be updating it today, most likely.
Kitchen showed device assert as " htc_pmeuhl " and I corrected it as " htc_pmeuhl,htc_pmeul "
 

Captain_Throwback

Recognized Developer
  • Like
Reactions: topjohnwu

Top Liked Posts

  • There are no posts matching your filters.
  • 113
    HTC 10
    Stock Collection​
    Hi, I'm creating this thread for people to find all possible files from official HTC.
    People can also post backups from your own device here, so people can find files they want easily.
    I'll start with me :)

    Latest Update (August 23): 1.9X.XXX.X (TWRP & OTA & RUU)​

    TWRP Backup (Untouched System Image + Boot)

    Stock Recovery

    OTA

    RUU Zip (Stock Signed)

    Stock RUU EXE

    XDA:DevDB Information
    Stock Collection, ROM for the HTC 10

    Contributors
    topjohnwu
    ROM OS Version: 6.0.x Marshmallow

    Version Information
    Status: Stable

    Created 2016-04-15
    Last Updated 2017-02-02
    21
    This there a way to just update to 1.80 firmware without flashing HTC recovery and keeping the twrp recovery , I remember it on the m9 days

    Yes, but you will have to flash the firmware.zip separately.
    This is correct.

    You can take the OTA directly with TWRP installed; it should work fine - in fact, that's how I took it today.

    Prior to hitting the "Install Now" radio button in the System Update notification, though, I had to make a copy of the OTA zip and place it elsewhere on the device. Then, I extracted the firmware.zip from it. Then I extracted the zip itself, and zipped it back up without recovery.img (so that I wouldn't overwrite TWRP). Renamed the new zip 2PS6IMG.zip and placed on the root of my SD.

    Then hit "Install Now". System reboots into recovery and OTA install begins. You'll see some red text in the console at the end of the install but it'll complete successfully.

    Take a fresh "System Image" backup in case you decide to modify system later. Reboot to download mode, and install the firmware zip. It reboots once by itself to update aboot, and finishes updating after then. Then you have to press power to power off the device (for some reason). When powering back on, hold Volume Down to get back to download mode, this time cancelling the update and rebooting to bootloader, then back to recovery (TWRP). Re-root with SuperSU, flash systemless Xposed or whatever and when you're done, reboot. It'll reboot by itself once to process the SuperSU install, and then booting will proceed. It'll optimize apps, which will take a while, but once it's finally back up, you'll be all updated, without ever having flashed a stock recovery, and fully rooted once again :)

    It's a beautiful thing....:D.

    P.S. Obviously the OTA will only apply if your system is completely stock, without ever having been mounted rw.

    P.P.S. You can only modify the firmware.zip and successfully flash it if you're S-OFF. Otherwise, you have to leave the firmware zip untouched and flash it that way. Then you'll have to re-flash TWRP.

    P.P.P.S. You can obviously root using whatever method you'd like. I'm no longer using SuperSU - I'm currently using Magisk combined with phh's open-source root.
    20
    How to Create My Own System Backup
    If you cannot find a system dump of your current system, and fortunately you've not done any modifications to your system, we need your contribution!
    1. Flash TWRP in download mode
    2. Boot into TWRP, then choose "Mount system as read-only" when it asks you. This is important!!
    3. Backup your device choosing "System Image" (not "System") and "Boot".
    4. Copy the files to your PC, zip them into file and upload to a hosting site I can easily download.
      I'll re-host your uploaded files to my personal AFH account, so you don't have to keep the files online forever if your storage is limited.

    How to Get The OTA Link From HTC
    Some time ago, HTC changed the place where the OTA files are stored. It used to be stored in internal storage.
    The OTA zip will now be downloaded to the following directory:
    Code:
    /data/data/com.htc.updater/files
    This directory is protected and cannot be accessed without root permission.
    So here are two methods you can use to get the OTA link directly from HTC servers.
    Please share the links in this thread so people unable to get OTAs can download them and apply them manually.

    Method 1: Use Network Monitoring Applications

    Requirements: You are able get the update notification; you can download the OTA on your phone.
    Won't work: Unfortunate devices stuck with the situation stated here
    .

    By monitoring all network traffic on the device, it is obvious that you can get the OTA links, because your phone is also downloading from the link.
    Here I use a paid app called "Charles Web Debugging Proxy" for example. The trial mode can have the job done with no issues.
    1. Download the app to your computer from the official site. It supports all platforms.
    2. Open the app and let it initialize the network settings.
    3. Go back to the phone, connect to the same network as your computer. Open Wi-Fi settings, long press your current connection, select "Edit connection".
    4. Scroll to the bottom, enable proxy. Enter your computer's local network IP for server (search the web for guides to find the IP), and insert "8888" in port, then press save.
    5. On your computer, Charles should detect that your phone is trying to connect the computer. Accept it and you should see all network traffic from your phone.
    6. Back to the phone, go to settings and check for system updates and download the update
    7. You should see some addresses related to HTC/OTA inside Charles, test the links and try if you can download the OTA zip file.

    Method 2: Use Logcat And Guess the Download Link

    This will work on all devices, include those who cannot even receive OTA discussed here.
    1. Remember to enable "USB Debugging" on your phone
    2. Connect your phone to your computer.
    3. Type following commands, but don't press enter yet
      Code:
      adb logcat > log.txt  // This will store logs in a file called log.txt
    4. Go to settings on your phone, press enter on computer to start logging your device right before you tap on the "Check for updates" on your phone (this is for reducing the length of the logs)
    5. After it notifies there is an update available, or saying that your system is corrupt, press "Ctrl + C" to stop logging.
    6. View the logs, you should find something similar to this:
      Code:
      11353 11803 D UpdaterAPK | UpdaterNetworkCheck: isIPTOn() IPTInfo is null
       1600  1600 D htcCheckinService: onStartCommand()
       1600  1600 D htcCheckinService: onStartCommand() the action name = com.htc.checkin.HTC_CHECKIN
       1600  1600 W Settings: Setting device_provisioned has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
       1600  1600 D htcCheckinService: Roaming is :false
       1600  1600 I htcCheckinService: == Checkin triggered == A8.0(M)
      11353 11536 V UpdaterAPK | DownloadProvider: starting query, database is not null; projection[0] is _id; projection[1] is entity; projection[2] is status; projection[3] is _data; projection[4] is lastmod; selection is hint=?; selectionArgs[0] is OTA_PERFUME_UHL_M60_SENSE80GP_hTC_Asia_TW_1.30.709.1_R-1.21.709.2_R2_release_477314i6fyk64xlvy886ba.zip; sort is null.
      11353 11536 V UpdaterAPK | DownloadProvider: created cursor android.database.sqlite.SQLiteCursor@2edc675 on behalf of 1600
       1600 11804 D PMS     : acquireWL(6ee6ed9): PARTIAL_WAKE_LOCK  htcCheckinService_300 0x1 1600 1000 null
       2827  2827 D HtcTelephonyInternal: CMD_GET_ALL_DEVICE_ID_INFO
       1600 11804 W htcCheckinService.CheckinProtocol: the build rom task id  = 475995
    7. For the example above, you can found out that the expected OTA update zip filename is
      Code:
      OTA_PERFUME_UHL_M60_SENSE80GP_hTC_Asia_TW_1.30.709.1_R-1.21.709.2_R2_release_477314i6fyk64xlvy886ba.zip
    8. Finally, put the file name after the following web address:
      Code:
      http://fotadl-az.htc.com/secure/
      With the example, the final result is
      Code:
      http://fotadl-az.htc.com/secure/OTA_PERFUME_UHL_M60_SENSE80GP_hTC_Asia_TW_1.30.709.1_R-1.21.709.2_R2_release_477314i6fyk64xlvy886ba.zip
      (Note: I'm not sure if every OTA files follows the same rules, this is why I said this is "guessing" the download link)
    18
    How to Use The TWRP Backups
    The zip file you download has the following structure:
    Code:
    A.BB.CCC.D.zip
    |--boot.emmc.win
    |--system_image.emmc.win
    |--recovery.log
    Every device has an TWRP directory in your internal/external storage with the following structure:
    Code:
    Storage Root
    |--BACKUPS
        |--(Your Device ID)
            |--(Backup Name, any name is OK)
                |--boot.emmc.win
                |--system_image.emmc.win
                |--recovery.log
    If you don't have a similar folder structure, backup a small file in TWRP (eg. boot), TWRP will create the structure for you.
    After extracting the TWRP backup downloaded above, remember to put the files into a correct place so TWRP can detect the backup files.

    How to Manually apply OTA Updates
    Before we get started, note that in order to install OTA, you are required to have
    • 100% unmodified system (can be restored from TWRP backup provided in OP)
    • Stock recovery (can download from OP)
    It is not required to have the exact matching recovery to manually apply OTAs, recoveries that aren't too many versions away should function the same, and thus accept OTA flashings
    1. Place your OTA file to external sdcard, and reboot to stock recovery (if you don't have SD Card use adb sideload instead, search the web for simple instructions):
      Code:
      adb reboot recovery
    2. After booting to the recovery, you'll see a large exclamation mark on the screen.
      Press the power button, then short press volume up + volume down to activate the HTC recovery menu.
    3. Use your volume keys to navigate through items. Navigate to "Apply update from SD card", and press power button to select.
    4. Navigate to your file and press power button to apply
    5. The recovery will now install the OTA.
    6. After reboot, the recovery should automatically install the firmware for you.

    How to Get The Firmware For a Particular Version
    Download the OTA zip of the version you're interested in. Inside the zip, it will contain a zip called "firmware.zip".
    This zip contains a portion of the firmware, you can flash it by rebooting into download mode and use this command:
    Code:
    fastboot flash zip (path to zip)