yashsingh1/xdaforums huggingface dataset:
[HTC One A9] FatKris:
Here's. Another screenshot
[HTC One A9] Captain_Throwback:
Can you use a root file explorer? Can you confirm you have su.img in /data and /su in root with folders inside?
[HTC One A9] FatKris:
I tried downloading f the current superuser .zip and installing through TWRP and still the same results. No Root.
[HTC One A9] Captain_Throwback:
What superuser zip? Did you see my previous post?
[HTC One A9] FatKris:
I don't understand, how did it unroot itself??
[HTC One A9] FatKris:
Nothing works
[HTC One A9] FatKris:
I will check right now.

---------- Post added at 06:30 PM ---------- Previous post was at 06:30 PM ----------

I can use root file explore no problem.
[HTC One A9] FatKris:
This is nuts to me.
[HTC One A9] danifilth4king:
Unlock token

EDIT: Found solution to my problem
[HTC One A9] FatKris:
Superuser .zip was from his website and was the most current.
[HTC One A9] timi666:
I am from Russia. I don't know what bands in Moscow. My A9 is Tiawan version with 16/2. Lte was working fine in taiwan and european builds. I can't help you.

Ask about this LlabTooFeR.
[HTC One A9] jcase:
Updated sprint boot image for non-critical bug

Sprint - ro.build.fingerprint=htc/hiaewhl_00651/htc_hiaewhl:6.0/MRA58K/635870.1:user/release-keys - a9-sprint-635870.1.zip

Add o2UK image

o2 UK - ro.build.fingerprint=htc/hiaeuhl_00206/htc_hiaeuhl:6.0/MRA58K/635503.7:user/release-keys - a9-o2uk-635503.7.zip
[HTC One A9] jcase:
Either you flashed a different root (or system supersu) on top of this one, or that root app's developer is beign sloppy or hasnt updated for 6.0 systemless root
[HTC One A9] FatKris:
What I'm not understanding is that all I have done is rooted, s-off and then tried to install Xposed. When Xposed didn't work, I deleted Xposed. I don't know what to do from here. I'm really hoping that I don't have to wipe everything and start over.

---------- Post added at 08:54 PM ---------- Previous post was at 08:53 PM ----------

What can I do [MENTION=2376614]jcase[/MENTION]?
[HTC One A9] jcase:
Did you take a backup of system? if so restore it, then push su.img back to /data/
[HTC One A9] FatKris:
So I'm going to need to get back on the computer to do this? And also, no backup.
[HTC One A9] jcase:
give me a run down of what was done to the device, and the current state of teh device
[HTC One A9] FatKris:
First thing I did was root as soon as the link was made available. Since this isn't my daily phone, that was it until I could s-off. I would use it for emails and social media, but that was it. Then I was able to s-off and I did that. After that I tried to install Xposed but it wouldn't install, so I deleted it. That's it. Again, this isn't my everyday device so I didn't want to mess with it too much.

---------- Post added at 09:08 PM ---------- Previous post was at 09:07 PM ----------

I forgot to quote you. But above is what I did.

---------- Post added at 09:14 PM ---------- Previous post was at 09:08 PM ----------

But still shows not rooted.

---------- Post added at 09:15 PM ---------- Previous post was at 09:14 PM ----------
[HTC One A9] FatKris:
So I got this, but I'm still not rooted.
[HTC One A9] jcase:
adb shell

su -v

su

id

type those out in order, and give me output
[HTC One A9] FatKris:
[MENTION=2376614]jcase[/MENTION]
[HTC One A9] jcase:
What else was done to it, as thats not normal, that looks like user-debug root, or adb root
[HTC One A9] FatKris:
I don't know the first root method that you stated. But I did use adb to root

---------- Post added at 10:21 PM ---------- Previous post was at 10:20 PM ----------

I had no issues after that though.
[HTC One A9] jcase:
adb shell getprop

pastebin the results
[HTC One A9] FatKris:
I'm going over everything again. I just did a factory reset through TWRP and its loading now.
[HTC One A9] crowsnestitsupport:
UPDATE,

Been thinking about this all day and the only thing I can think is that, when I rooted the the first time I was still S-ON as the S-Off solution wasn't available. Once I S-Offed, the next time I rebooted was when it hung on boot screen and now ever since anything that gets root access reboot my phone. ( Even though I've done all the things I mentioned above) Can I go back to S-On or am I on the wrong track? [MENTION=2376614]jcase[/MENTION] any thoughts?:D
[HTC One A9] jcase:
My guess is adawy isnt 6.0 compatible (or compatible with systemless root) and goof'd things up some how. I would RUU, and repeat the root process (dont lock or go s-on). Then try adaway again, if it fails file a bug report with their authors.
[HTC One A9] crowsnestitsupport:
I thought about that as well, but.. adaway worked fine before the S-off and it also works just fine on my Nexus 6p and 5x :( Is the RUU image available anywhere? Didn't do any research on that. I did restore TWRP backup that I made before making any mods and that didn't help.
[HTC One A9] jcase:
Try setting it s-on (but not locked) and see if that changes anything, s-off shouldnt cause any such issue.
[HTC One A9] crowsnestitsupport:
OK, Not trying to be a noob but what is the best way to turn it back to S-On?
[HTC One A9] jcase:
adb reboot download

fastboot oem writesecureflag 3

fastboot reboot
[HTC One A9] crowsnestitsupport:
Thanks for that... I am now back to S-on and unlocked, formatted sd card, repushed su.img and reinstalled super user, downloaded new adaway apk confirmed to work on 6.0, installed it and opened it and granted root access and it still rebooted the phone same as before :( :( The only difference this time is that since S-on i get message after each reboot that say system recovered from unexpected shutdown, send report to HTC...
[HTC One A9] jcase:
i'd RUU it and s-off back, its unrelated to s-off then, its something one of the rootapps, perhaps adaway, did
[HTC One A9] crowsnestitsupport:
OK, so sorry to be so ignorant, can you provide instructions to RUU and the file? I did some research and found very little. I have the USA unlocked edition. Thanks again for all you do. Really appreciate it!
[HTC One A9] jcase:
You are going to have to look around, i dont have any of the RUUs
[HTC One A9] jollywhitefoot:
You could try to use TWRP to restore this unmodified system image and boot image.

http://xdaforums.com/one-a9/general/unlocked-639737-5-image-backup-t3249186
[HTC One A9] sgt.sloth88:
ok, so do you need s-off? cause i have done everything possible i can think of and my superuser doesnt work. i cant update the su binary any help here please? i have been going crazy. i will try any fix there is possible

thanks
[HTC One A9] jollywhitefoot:
You do not need s-off. Where are you running into trouble? The op lays the steps out pretty clearly I think but here's my breakdown of the steps.

From download mode:

Flash the custom boot.img for your device

Flash custom recovery (TWRP)

Boot to recovery

From recovery:

FORMAT data partition

Reboot to recovery

Use adb to push su.img to /data

Reboot to system

From system

Use adb to install the superuser.apk in the op

That's it.

If you have trouble, post your command window output to show what errors/messages you're receiving

Oh, and obviously step one it to unlock your bootloader using an unlock code from htcdev.com
[HTC One A9] FatKris:
Okay, so I have the US unlocked version of the HTC One A9. I rooted and s off, still I am unrooted. From what I've heard and read, the only way to fix this is RUU? If that's the case, I'm on a Mac and would like to know how difficult that's going to be.
[HTC One A9] jollywhitefoot:
Have you tried using the system image backup I posted in the general section? That's got the unmodified system and boot partitions.

To my knowledge ruus for the US versions aren't readily available yet. But when they are, expect them to be exe files.
[HTC One A9] FatKris:
I was going to, but I'm running on Mac.
[HTC One A9] jollywhitefoot:
Mac doesn't prevent you from working with the system image backup. Just download the zip file, decompress it, transfer the backup folder to the twrp backup directory on your phone, reboot to recovery, mount system as read only and restore the system image and boot partitions.
[HTC One A9] NuShrike:
After doing the root and then switching back to the stock boot+recovery, phone is now not compatible with the recent unlocked OTA_HIA_AERO_UL_M60_SENSE7GP_ATT_NA_Gen_Unlock_1. 12.617.6-1.11.617.5_release_458832.zip
[HTC One A9] rahaar:
with this root process is it possible to recive the november security update that HTC announced ???
[HTC One A9] eelpout:
just came by here to ask this very thing. :)

Edit: OK, re-read the latest posts on the thread and now see we have to go back to stock boot/recovery for the update. do we have to wipe any data for this?
[HTC One A9] Captain_Throwback:
Stock recovery, definitely, stock boot, uncertain. But of course you don't need to wipe data to take an OTA.
[HTC One A9] NuShrike:
If stock boot, then it reencrypts your phone, and so you'll have to wipe it again to root. Don't flash stock boot until the issue is investigated further.

So far, it almost looks like (for me) it's the wrong OTA or the OTA is broken looking for the wrong release keys.
[HTC One A9] Captain_Throwback:
Since su.img is already on /data, the device being encrypted shouldn't matter. As soon as the ramdisk edits are made to the boot.img, root should continue working, even with the device encrypted. But stock boot.img will definitely unroot in the short term, so it should be avoided.
[HTC One A9] jollywhitefoot:
You have to restore to an unmodified system state to take an ota. If you made a system image backup prior to modifying, then use that. Or you can download the one I posted in the general section

Edit: nevermind. It failed for me too after restoring unmodified system image.
[HTC One A9] NuShrike:
My /system is unmodified as far as I know.

When I first tried flashing from TWRP, it complained a set of release keys didn't match. That's why I think the OTA is wrong ..
[HTC One A9] jollywhitefoot:
naw. see my edit. It didn't work for me.
[HTC One A9] Captain_Throwback:
Try fastboot flashing the system image backup, or zip it up with an android-info.txt and try flashing it in Download mode.
[HTC One A9] jollywhitefoot:
Still no luck. But I'm not positive that I have to correct stock recovery.
[HTC One A9] Captain_Throwback:
What error are you getting?

You can use the stock recovery from the OTA itself so you know you have the correct one.
[HTC One A9] jollywhitefoot:
I'll try extracting the recovery from the ota later tonight.
[HTC One A9] Captain_Throwback:
Yeah, definitely looks like you have the wrong recovery. I can extract it from the OTA zip for you, if you'd like. That'll only take a few minutes. I can also mod the boot.img in the OTA to add root.

EDIT: Stock recovery from the OTA zip that was posted in the thread is attached.

EDIT 2: Added rooted boot.img from the OTA as well. If you already have su.img in /data, fastboot flashing the included boot.img after taking the OTA will retain root (and not force encryption).
[HTC One A9] jollywhitefoot:
Thanks. I'll play with this tonight.
[HTC One A9] NuShrike:
OTA fails past 25% on mine with the new posted Recovery. Something in /sideload/package.zip is failing the /system check.

I've already flashed [MENTION=5957136]jollywhitefoot[/MENTION]'s TRWP /system backup, factory reset. I just can't get past this /sideload/package.zip error:

/dev/block/bootdevice/by-name/system has been remounted R/W; reflash device to reenable OTA updates
system partition has unexpected contents E:Error in /sideload/package.zip
(Status 7)

Installation aborted.
[HTC One A9] JontyJonty:
Most definately a stupid question, but I have flashed the boot image, rebooted to bootloader, how do i factory reset the device? There is no option in bootloader for this...
[HTC One A9] Captain_Throwback:
Flash TWRP, and in Wipe Menu, choose the "Format Data" option. Then reboot recovery and you'll be good to go.
[HTC One A9] crowsnestitsupport:
Update,

So I looked every where and no luck on the unlocked RUU as of yet. But, thanks to [MENTION=5957136]jollywhitefoot[/MENTION] I downloaded his system image backup for the unlocked version and restored to my device and bingo, everything worked great. Really weird because I also created a backup before I started making any changes and I tried restoring mine half a dozen times and no luck :( I actually was unable to S-Off my device again because all apps with root permission would reboot the device. But it's all good now. S-off and adaway all working fine!
[HTC One A9] JontyJonty:
I have been through the procedure but cannot update the binary su files, keeps failing. I ran the following commands

adb shell

su -v

su

id

I got the following output -

C:\adb>adb shell

shell@htc_hiaeuhl:/ $ su -v

su -v

2.56:SUPERSU

shell@htc_hiaeuhl:/ $ su

su

root@htc_hiaeuhl:/ # id

id

uid=0(root) gid=0(root) groups=0(root) context=u:r:init:s0

root@htc_hiaeuhl:/ #

C:\adb>

I then tried updating binary using normal, now am stuck on HTC One screen.
[HTC One A9] jcase:
Nowhere in my guide does it mention updating binaries, thats a support issue for ChainFire
[HTC One A9] JontyJonty:
Went back to stock and tried again, getting this error now.

C:\adb>adb push su.img /data/su.img

2648 KB/s (33554432 bytes in 12.373s)

C:\adb>adb install superuser.apk

2419 KB/s (5847527 bytes in 2.360s)

pkg: /data/local/tmp/superuser.apk

Failure [INSTALL_FAILED_ALREADY_EXISTS]
[HTC One A9] NuShrike:
... install -r ... You must have also let TRWP install supersu.
[HTC One A9] jollywhitefoot:
Thanks for the assistance. Incorrect recovery was definitely the reason the OTA was failing. However, now I'm using the correct recovery but OTA still fails because my "unmodified" system image backup apparently isn't unmodified. I must have made that backup after mounting system R/W and I can't find any that I made earlier. My A9 files aren't very well organized right now, so hopefully I can find the one I made before I mounted R/W or I'm going to have to wait for an RUU to become available.
[HTC One A9] NuShrike:
Well, I give up on the OTA. Can't get it past the "/system partition is modified" issue.
[HTC One A9] jollywhitefoot:
Yeah, if you used my system image , then I think the problem is with the backup. I made a couple of system image backups and the one I uploaded must have been made after I mounted system R/W.
[HTC One A9] NuShrike:
I was getting this with my original /system also (which I never changed afaik) which was why the OTA kept failing even after flashing the finally correct recovery.
[HTC One A9] Captain_Throwback:
Have you tried taking the system_image backup from TWRP, renaming it system.img, zipping it up with an android-info.txt file and flashing it via 2PQ9IMG.zip in Download mode? Sometimes that works better than a restore in TWRP (for unknown reasons).

Maybe someone can tweet at Mo Versi and HTC to post the A9 RUU.
[HTC One A9] pfefferkuchen:
Is it possible to unlock and root the european 16GB / 2GB Version already?

And what is the easiest way?
[HTC One A9] Captain_Throwback:
https://gerrit.omnirom.org/#/c/15719/ <--- this is probably the issue. Due to systemless root, TWRP is apparently mounting system rw when it checks for root. That patch fixes it, but the current TWRP build doesn't include it. Not sure how this hasn't been a problem before now, honestly. At any rate, the original system image backup would only be good in this case if you took it immediately after your initial flash of TWRP. Otherwise it will fail dm-verity. However, if you DO have a good backup, fastboot flashing it or using the SD card method to flash in Download mode should properly restore it.
[HTC One A9] nenebear:
TWRP backup system_image is raw ext4 image need transform sparse ext4 image . then boot into download mode flash images (system.img boot.img recovery.img)

linux

$ img2simg <raw_image_file> <sparse_image_file> [<block_size>]

example : img2simg system_image system.img 4096
[HTC One A9] Captain_Throwback:
They should flash fine as-is. I've done it a bunch of times. Are you saying it doesn't work?
[HTC One A9] nenebear:
HTC A9 I always use flash images then OTA (system.simg)

HTC_A9u

Carrier: HTC Asia TW

Device: HIA_AERO_UHL

Model ID: 2PQ910000
[HTC One A9] Captain_Throwback:
That didn't answer my question.

---------- Post added at 10:25 AM ---------- Previous post was at 09:53 AM ----------

I've updated the TWRP at the link in the OP to remove the SuperSU prompt completely, per this patch. This should alleviate the above issue in the future. It's probably a good idea to update your TWRP immediately.
[HTC One A9] nenebear:
I am very sorry. Maybe I should say flash system sparse.img is another kind of possible way. Thank you for your work.
[HTC One A9] jollywhitefoot:
Thanks. I'll try this out, but I flashed my backup using fastboot and ota still didn't work, so I'm assuming that means my backup wasn't taken soon enough, right? I know I took it prior to mounting system R/W in twrp, but I doubt it was the first time I had entered twrp.

Thanks again for your work.
[HTC One A9] Captain_Throwback:
Did you try the SD card method?
[HTC One A9] JontyJonty:
Thanks to everyone for the help on this. After much fighting I finally have root on my A9 and s-off. It was all my own fault as to why it was going wrong.. An amazing forum with amazing people...
[HTC One A9] eelpout:
So, no go with OTA yet, correct? (it's getting a little hard to follow with all the regular root talk :) ).
[HTC One A9] jollywhitefoot:
Not for me. Still working on it. Tweeted [MENTION=1862878]movers[/MENTION]i to ask about ETA for RUU.

I'll try tonight. You mean rename the complete ota package and install from SD card, or do you mean restore my system image backup from SD card?
[HTC One A9] Captain_Throwback:
The system image.
[HTC One A9] NuShrike:
Tried this, doesn't recognize the .zip as something valid to flash. Anything special to the android-info.txt? I used the one from your 2PQ9IMG_1.12.617.6_recovery.zip.

Tried img2simg on the "system_image.emmc.win system.img 4096" but fastboot won't flash it refusing to allocate a large negative number.

Now trying that same system.img img2simg from Xubuntu with fastboot from android-tools-fastboot. Bootloader still says system is modified.
[HTC One A9] Captain_Throwback:
That android-info.txt should be fine. The system.img in the zip is named correctly? The zip is named 2PQ9IMG.zip?
[HTC One A9] NuShrike:
Yup, you're right. Had the two files wrapped in an extra directory.

Repacked it, download mode flash, but flash stopped with error 255, 255, and stopped. System still seems to work otherwise.

So summary:

* recover system_image from TRWP backup [OTA fails, duh]

* img2simg to system.img TRWP backup, flashboot flash system in download on Xubuntu [OTA followup fails with system modified]

* rename system_image to system.img and package with android-info.txt in 2PQ9IMG.zip with Windows 7zip, then use download mode to auto-flash, flash doesn't complete. [OTA followup fails with system modified]
[HTC One A9] Captain_Throwback:
The method of zipping can sometimes be an issue for Download mode zip flashing. The zip will typically work if zipped in a Linux distro (like Ubuntu) or in Android using Root Explorer. But if you zip it in Windows, aboot won't update system for some reason.
[HTC One A9] jollywhitefoot:
You can use WinZip to prepare the zip file, but you have to make sure you use legacy compression option.

No luck with OTA. I flashed my "unmodified" system image using 2PQ9IMG.zip, rebooted to system and took OTA. Again, it failed at 25% saying system had been mounted R/W. I'm sure it's because I guess it's my backup. I used TWRP version B5 (maybe B7, but more likely B5). Anyway, maybe someone will post a system image backup that was made with the latest version you posted, or HTC will put up an RUU for this device. No big deal. Thanks for the suggestions.

Edit: I just realized that the OTA actually updated the firmware, but I guess it fails when trying to apply the system patch.
[HTC One A9] Fischfuss:
Hello,

I rooted my HTC One A9 as described in Post1 and it works......axcept.....

Now I can't encrypt neither the internal nor the external memory. If I try, the Handy reboots and nothing is done.

Also, I can not set the external SD card as an extension. respectively, I can do that, but it works only till I reboot the Phone. After reboot the card is no longer recognized until I Format it again.

My Phone-Status is: "modified, unlocked,S-On"

Can someone Help?

Many thanks
[HTC One A9] nenebear:
We can use Hex can look at system image is not being modified. If you see /system can certainly be modified.

I use twrp-2.8.7.0_CPTB-B9-hiae.img backed up 1.10.709.7 twice (read only & mount system partition) again and jollywhitefoot uploaded a9-unlocked-639737.5_SystemImageBackup + Boot comparison. The results obtained in the picture in.
[HTC One A9] jollywhitefoot:
Are you able to OTA when restoring your read only system image? Would it be possible for you to share yours? Thanks!
[HTC One A9] jbea007:
Will we able to get that OTA update that was released a few days ago if your rooted?
[HTC One A9] Captain_Throwback:
His is for 1.10.709.7, not 1.12.617.6, so it won't work for you.
[HTC One A9] jollywhitefoot:
Thanks. I was on my phone and it doesn't show the location in the sidebar.
[HTC One A9] NuShrike:
Just tried the boot-1.12.617.6-SuperSU.img. It doesn't retain root for me (pre-OTA still) even with su.img on /data.

I have to go back to the a9-unlocked-639737.5.img to get root back.
[HTC One A9] Captain_Throwback:
That's weird. I have no explanation for that.

EDIT: Actually, that makes sense, since your build fingerprint doesn't match (since you haven't updated your system). The whole point is to use the new boot image with an updated system.
[HTC One A9] entrpn:
Anyone have the system image for an a9 sprint version? I deleted mine by accident :S
[HTC One A9] FatKris:
Good morning everyone, I have been away for a while but am back. So I've been trying to figure out what's going on with my unlocked A9. I got some advice from [MENTION=2376614]jcase[/MENTION] and I also tried [MENTION=5957136]jollywhitefoot[/MENTION] steps to try to go back to stock (or as close as stock as possible) my HTC unlocked version I think is a different version then other unlocked versions. If anyone wants info I can try to post it. But here's where I'm at. I currently have no OS on device. I am still unlocked and s-off with TWRP 2.8.7.0_CPTB-B9. Unfortunately I am at a dead in as far as what I'm understanding. So any help would be great. I don't think there's an RUU for my device yet, I've been looking. Again it's a US factory unlocked. I'll post a couple of pics of what is going on in a moment. Thank you to everyone who has helped me to this point.
[HTC One A9] jcase:
You can try flashing the ATT RUU, until a proper one appears for your device
[HTC One A9] Captain_Throwback:
What's your OS version in Download Mode? If someone has a TWRP Backup of "System" or "System Image" for your variant, you should be able to just restore one of those to your device.
[HTC One A9] FatKris:
---------- Post added at 05:18 PM ---------- Previous post was at 05:16 PM ----------

I posted the pics. Sorry no pastebin but I think this will work. [MENTION=2376614]jcase[/MENTION] I didn't think I could install the att version. I'll try it.
[HTC One A9] Captain_Throwback:
That's a printout from when in recovery. I asked for the OS from Download mode.
[HTC One A9] FatKris:
Damn
[HTC One A9] Captain_Throwback:
*sigh*

Do you see "OS" anywhere there?

It's right on the main page of Download mode. I'm not sure why you're making this so complicated, lol.

P.S. You're probably going to want to remove that screenshot as it has a LOT of device-specific info in it . . .
[HTC One A9] FatKris:
That was definitely the wrong screenshot. I'm not trying to make this difficult for anyone. Especially someone taking time out of their day to help me.

---------- Post added at 05:46 PM ---------- Previous post was at 05:45 PM ----------
[HTC One A9] Captain_Throwback:
http://xdaforums.com/one-a9/general/unlocked-639737-5-image-backup-t3249186