[Unofficial] HTC U11+ TWRP Recovery

Search This thread

DanteGR

Senior Member
Dec 14, 2010
3,767
1,387
Thessaloniki
www.facebook.com
OnePlus 11
Instead of that using the closed source SuperSU, use open source Magisk to root, and without touching the recovery partition. Follow this procedure:

1. Download http://fotadl-az.htc.com/secure/OTA....05.400.13_release_517158ov5r8lbbi6tc9m38.zip
2. Extract firmware.zip.
3. Extract boot.img from firmware.zip from step 2 and transfer to the /sdcard.
4. Install Magisk Manager and select Beta channel
5. Click install and choose to use "patch the stock boot image" method. It will browse you to /sdcard. Choose the boot.img from step 3. After its done, it will give you path of patched boot image.
6. Transfer the patched boot image from step 5 to PC using 'adb pull'
7. Boot the phone into download mode and flash the patched boot image.
8. Reboot and enjoy!!

Thank you for this.
Being away for too long from HTC and all so just one question if I may.
If you need to receive an OTA what's the procedure?
Unroot, relock bootloader and receive the OTA?
Thank you in advance.
 

nkk71

Inactive Recognized Developer / Contributor
May 26, 2010
8,741
7,571
53
Beirut
@nkk71
found "qseecomd_static" under /vendor/bin/ and it will be called in download mode

Code:
service qseecomd_static /sbin/qseecomd_static
    class core
    seclabel u:r:htc_dlmode:s0
    user root
    group root
    disabled

Code:
on property:ro.bootmode=download
    start qseecomd_static
    start htc_dlmode
    setprop sys.usb.config fastboot

on property:ro.bootmode=RUU
    start qseecomd_static
    start htc_dlmode
    setprop sys.usb.config fastboot


Build a TWRP using "qseecomd_static" instead "qseecomd"
https://drive.google.com/open?id=1oJZbz0Xh96AqKWQmT9A1AWe0lACAh35n

Doubt it would matter whether it's static or dynamically linked. In hosd they're probably using a static build because the linker (/system/bin/linker[64]) isn't available.
Also qseecomd & co aren't really the problem, TWRP is able to decrypt properly, both the first time and subsequent times. As I mentioned the ROM is however no longer able/willing to accept the decryption key, possibly related to a "key upgrade" occurring during TWRP decrypt, thereby invalidating the key(s) for decryption in ROM.

It's a rather complicated matter, and I'm neither an expert nor even a *decryption amateur* to be able to figure this out easily. Considering I do not have a device with this particular issue, I can only rely on whatever source code and articles are available to the general public, and try to make some [wild] guesses.
But this also takes time and is not one of my favorite subjects, so it's not the highest priority for me. I'm not saying I will not pursue it further, but until I go through the sources, etc. and *think* I found something, I'm not going to send you more blind builds, which I doubt would make any difference.
@sabpprook btw, my device tree is here https://github.com/nkk71/android_device_htc_ocm/tree/android-8.0
if you want to build using it, I'm using omni's minimal 8.0 manifest https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-8.0
 

devsk

Senior Member
Dec 14, 2008
2,074
770
Thank you for this.
Being away for too long from HTC and all so just one question if I may.
If you need to receive an OTA what's the procedure?
Unroot, relock bootloader and receive the OTA?
Thank you in advance.
With magisk, when you want to take OTA, you follow this guide: https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md#ota-installation-tips

---------- Post added at 09:10 AM ---------- Previous post was at 09:07 AM ----------

Thank you so much! I'm gonna try this tomorrow! I have just a question.. for point number 7, i will do "fastboot erase cache" and then "fastboot flash boot boot.img" .. is it correct?
If something goes wrong in the flash of boot.img how do i go back? Thank you!
Yes, that flash command is correct but I did only the boot, and did not need to erase cache.

If something goes wrong, you can flash the stock boot image that you got in Step 3. using fastboot just like above. It will just undo whatever magisk did.
 
  • Like
Reactions: DanteGR

nicechan

Member
Dec 14, 2014
21
2
Try the following instruction to root your U11 plus system.
1 make sure oem unlock open and bootloader unlocked
2 flash latest TWRP @nkk71 https://www.androidfilehost.com/?fid=673791459329066862
3 boot to TWRP, choose wipe-format data, input yes and enter
4 boot to bootloader or download, and then boot to recovery again. DO NOT reboot to system.
5 flash latest supersu @Chainfire https://download.chainfire.eu/1220/SuperSU/SR5-SuperSU-v2.82-SR5-20171001224502.zip
6 reboot to system

----------
thanks for your guide, and for developers‘ hard work.

I rooted my U11+ by this method, here I have one question.
can I reboot to recovery again?
cause I flashed recovery,then flash SU without wipe data, then I need password to boot to system, but I didn't set a password.
so I used fastboot -w, wiped all data as a new phone, I just want to know if I reboot to recovery and flash something, will I have to wipe data again?

by the way, I'm form beijing, but I don't know too much about code or development, can you leave me a contact?
like wechat or QQ or something, thanks again!

---------- Post added at 03:18 AM ---------- Previous post was at 03:11 AM ----------

Instead of that using the closed source SuperSU, use open source Magisk to root, and without touching the recovery partition. Follow this procedure:

1. Download http://fotadl-az.htc.com/secure/OTA....05.400.13_release_517158ov5r8lbbi6tc9m38.zip
2. Extract firmware.zip.
3. Extract boot.img from firmware.zip from step 2 and transfer to the /sdcard.
4. Install Magisk Manager and select Beta channel
5. Click install and choose to use "patch the stock boot image" method. It will browse you to /sdcard. Choose the boot.img from step 3. After its done, it will give you path of patched boot image.
6. Transfer the patched boot image from step 5 to PC using 'adb pull'
7. Boot the phone into download mode and flash the patched boot image.
8. Reboot and enjoy!!

---------------
Hi, I followed your guide and searched magisk's guide as this:
Code:
Via Magisk Manager (Only support v14.0+):
This method does not need root, and also does not require a custom recovery.
However, you MUST have a stock boot image dump beforehand, and also be able to flash the patched boot image, either through fastboot/download mode or ODIN
Install the latest Magisk Manager
If you're planning to flash the patched boot image through ODIN, go to Settings > Update Settings > Patched Boot Output Format, and select .img.tar. For normal users leave it as the default .img
Press Install > Install > Patch Boot Image File, and select your stock boot image file
Magisk Manager will now patch your boot image, and store it in [Internal Storage]/MagiskManager/patched_boot.img[.tar]
Copy the patched boot image to your PC. If you can't find it via MTP, you can pull the file with ADB: adb pull /sdcard/MagiskManager/patched_boot.img[.tar]
Flash the patched boot image to your device and reboot. If using fastboot: fastboot flash boot /path/to/patched_boot.img, or use the ODIN software.
Voilà!

I succeed to gain the patched boot image, but when I flashed this by fastboot flash boot patched_boot.img, I reboot into a black screen.
so I had to flash the stock boot.img extracted from your OTA zip, then I can reboot to system again, but didn't get root.
where did I do wrong? or can I have some other way to try?
thanks for your kind!
 

goodman_east

Senior Member
Jan 13, 2013
258
95
Amoy
----------
thanks for your guide, and for developers‘ hard work.

I rooted my U11+ by this method, here I have one question.
can I reboot to recovery again?
cause I flashed recovery,then flash SU without wipe data, then I need password to boot to system, but I didn't set a password.
so I used fastboot -w, wiped all data as a new phone, I just want to know if I reboot to recovery and flash something, will I have to wipe data again?

by the way, I'm form beijing, but I don't know too much about code or development, can you leave me a contact?
like wechat or QQ or something, thanks again!

---------- Post added at 03:18 AM ---------- Previous post was at 03:11 AM ----------



---------------
Hi, I followed your guide and searched magisk's guide as this:
Code:
Via Magisk Manager (Only support v14.0+):
This method does not need root, and also does not require a custom recovery.
However, you MUST have a stock boot image dump beforehand, and also be able to flash the patched boot image, either through fastboot/download mode or ODIN
Install the latest Magisk Manager
If you're planning to flash the patched boot image through ODIN, go to Settings > Update Settings > Patched Boot Output Format, and select .img.tar. For normal users leave it as the default .img
Press Install > Install > Patch Boot Image File, and select your stock boot image file
Magisk Manager will now patch your boot image, and store it in [Internal Storage]/MagiskManager/patched_boot.img[.tar]
Copy the patched boot image to your PC. If you can't find it via MTP, you can pull the file with ADB: adb pull /sdcard/MagiskManager/patched_boot.img[.tar]
Flash the patched boot image to your device and reboot. If using fastboot: fastboot flash boot /path/to/patched_boot.img, or use the ODIN software.
Voilà!

I succeed to gain the patched boot image, but when I flashed this by fastboot flash boot patched_boot.img, I reboot into a black screen.
so I had to flash the stock boot.img extracted from your OTA zip, then I can reboot to system again, but didn't get root.
where did I do wrong? or can I have some other way to try?
thanks for your kind!

Check your pm please.
 

milesd

Member
Jul 5, 2016
32
8
my u11+ rollercoaster day

Never read a success root message here.
My first try: KingRoot. stuck at 1%-no root
2nd TWRP 3.1.1.2 cant read encrypted partition, anyway, install SuperSU 2.82 from sdcard- no root
3rd TWRP 3.2.0.0 handles encryption, install SuperSU 2.82- no root, after new reboot encrypted system
4th TWRP 3.2.0.1 handles encryption but encrypted system after reboot
5th Magisk (try it, why not) very confusing first time, patched_boot.img bringing a bootloop-no root
So I'm back to stock now and learn to be more patient!
I had OneX, M7, M9+, I was really happy while unboxing U11+, 'cause I didn't know......
 

digio1996

Member
Sep 9, 2016
14
3
----------

I succeed to gain the patched boot image, but when I flashed this by fastboot flash boot patched_boot.img, I reboot into a black screen.
so I had to flash the stock boot.img extracted from your OTA zip, then I can reboot to system again, but didn't get root.
where did I do wrong? or can I have some other way to try?
thanks for your kind!

same here, it just reboot into a black screen :mad:
If we want root it seems that we have to install a custom recovery :(
 

nkk71

Inactive Recognized Developer / Contributor
May 26, 2010
8,741
7,571
53
Beirut
No offence guys, I'm just a casual visitor here, but
  1. Isn't this supposed to be a development thread
  2. About TWRP in particular
  3. So I fail to see the point of all the random questions in here, like
    • where do I get stock recovery X
    • how do I root this device
    • where can I find OTA
    • how do I patch boot.img

Shouldn't these questions go to Q&A and guides to General :confused:

That way people actually following development of
[Unofficial] HTC U11+ TWRP Recovery​
can stay focused on it.
 

devsk

Senior Member
Dec 14, 2008
2,074
770
No offence guys, I'm just a casual visitor here, but
  1. Isn't this supposed to be a development thread
  2. About TWRP in particular
  3. So I fail to see the point of all the random questions in here, like
    • where do I get stock recovery X
    • how do I root this device
    • where can I find OTA
    • how do I patch boot.img

Shouldn't these questions go to Q&A and guides to General :confused:

That way people actually following development of
[Unofficial] HTC U11+ TWRP Recovery​
can stay focused on it.
No offence taken @nkk71. Apologies for derailing the thread.
 

lukemo

Senior Member
Feb 17, 2008
617
92
Milan
No offence taken @nkk71. Apologies for derailing the thread.

No apologies, you are only very kind. May be he is right, may be not...even if I'm not a developer, testing the abilities of unofficial twrp at my own risk may help developers I think...anyway elsewhere in the unofficial twrp threads (see pixel 2 xl) there are a lot of question regarding magic flash. So if I may put this question...are you sure that flashing with twrp magisk_14_5.zip doesn't work and the only possibility is to patch the bot ing?
 

nkk71

Inactive Recognized Developer / Contributor
May 26, 2010
8,741
7,571
53
Beirut
No apologies, you are only very kind. May be he is right, may be not...even if I'm not a developer, testing the abilities of unofficial twrp at my own risk may help developers I think...anyway elsewhere in the unofficial twrp threads (see pixel 2 xl) there are a lot of question regarding magic flash. So if I may put this question...are you sure that flashing with twrp magisk_14_5.zip doesn't work and the only possibility is to patch the bot ing?

I'm not saying you shouldn't post here when you have relevant information regarding the current TWRP version, and feel free to post all over the place if you wish, but may I invite you to read:
Device Forum Rules (Please Read before posting)
I think the different forums are clearly explained in there.

As to why I asked to get back on topic is rather simple: You probably have noticed that the current TWRP build breaks your decryption key for the booted ROM.
Obviously this is a major problem, and something that is not easy to debug. So this thread is an ongoing work in progress, and as such should stay on topic.

Furthermore, I do not have this device, and doing *blind builds* is not something I nor the many of the other developers would usually do, but I am trying to help a bit, and I appreciate all the logs and relevant information people are posting.

However, I also have limited time, just like every other person, and having to read 3 or 4 pages of what I consider irrelevant information to the problem at hand, is a waste of time for me.
 

lukemo

Senior Member
Feb 17, 2008
617
92
Milan
I'm not saying you shouldn't post here when you have relevant information regarding the current TWRP version, and feel free to post all over the place if you wish, but may I invite you to read:
Device Forum Rules (Please Read before posting)
I think the different forums are clearly explained in there.

As to why I asked to get back on topic is rather simple: You probably have noticed that the current TWRP build breaks your decryption key for the booted ROM.
Obviously this is a major problem, and something that is not easy to debug. So this thread is an ongoing work in progress, and as such should stay on topic.

Furthermore, I do not have this device, and doing *blind builds* is not something I nor the many of the other developers would usually do, but I am trying to help a bit, and I appreciate all the logs and relevant information people are posting.

However, I also have limited time, just like every other person, and having to read 3 or 4 pages of what I consider irrelevant information to the problem at hand, is a waste of time for me.

Understood, and I thank you a lot for your effort. I'll try by myself about magisk installation without bothering this thread with non-developer's questions. Let's hope in the future to see here the main (and more open minded) HTC developers
 

nkk71

Inactive Recognized Developer / Contributor
May 26, 2010
8,741
7,571
53
Beirut
Understood, and I thank you a lot for your effort. I'll try by myself about magisk installation without bothering this thread with non-developer's questions. Let's hope in the future to see here the main (and more open minded) HTC developers

Seriously?

I really don't understand your problem, what's so difficult of looking in the General or Q&A forum on "How to root your device", and if there is no such thread you can create one.
You can even get people's attention by using mentions.
I never said anything about doing it by yourself :rolleyes:

And thanks to your "compliment", I won't bother you folks anymore (so feel free to continue here), I have better things to do than waste my time with this.
 

lukemo

Senior Member
Feb 17, 2008
617
92
Milan
Seriously?

I really don't understand your problem, what's so difficult of looking in the General or Q&A forum on "How to root your device", and if there is no such thread you can create one.
You can even get people's attention by using mentions.
I never said anything about doing it by yourself :rolleyes:

And thanks to your "compliment", I won't bother you folks anymore (so feel free to continue here), I have better things to do than waste my time with this.

Me too...I am a 55 years old university professor and marketing consultant with the hobby of technology. Really I would like to close this discussion too and I really thank you for your effort. But please give me only the possibility to say that I'm almost sure that you're right but also that in other twrp threads the developers behaviour and friendliness is different. Dot and sorry again.

EDIT: anyway in the Q&A section of a so young device the probability to find somebody to exchange experiences and suggestions is asymptotic to 0.
 
Last edited:

devsk

Senior Member
Dec 14, 2008
2,074
770
Seriously?

I really don't understand your problem, what's so difficult of looking in the General or Q&A forum on "How to root your device", and if there is no such thread you can create one.
You can even get people's attention by using mentions.
I never said anything about doing it by yourself :rolleyes:

And thanks to your "compliment", I won't bother you folks anymore (so feel free to continue here), I have better things to do than waste my time with this.
@nkk71: forgive the newbie....:D He does not know your contributions to XDA. Please don't let a single person's post determine your path. You are bigger than that man!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    fTrUp65.png
    lmGK4U4.png


    It have been about 2 years, I finally get a U11 plus to make TWRP device tree with working decrypt function.
    Source: https://github.com/sabpprook/android_device_htc_ocm

    Please download latest TWRP build in following link.

    [Android 8.0]
    twrp-3.3.1-0-ocm_171001.img
    twrp-3.3.1-0-ocm_171201.img
    twrp-3.3.1-0-ocm_180601.img
    twrp-3.3.1-0-ocm_180901.img
    twrp-3.3.1-0-ocm_181001.img
    twrp-3.3.1-0-ocm_181101.img

    [Android 9.0]


    PS. watch out the last 6 digits at the filename, it must equal to your system's android patch level. e.g. 2017-12-01 (Dec, 2017) = 171201, otherwise TWRP will not decrypt data partition.

    PS2. U11+ already get Android Pie update, but this update will break data decrypt function in TWRP recovery.

    @nkk71, thanks all the works you've done for us.
    9
    @kuchivas

    It states in the op that this version of TWRP cannot decrypt /data


    OP, as this is a trebble device, have you added support for backing up /vendor?

    In order to modify system, fstab in /vendor would need to be modified to remove DM verity, the same applies to removing forced encryption
    8
    Seriously?

    I really don't understand your problem, what's so difficult of looking in the General or Q&A forum on "How to root your device", and if there is no such thread you can create one.
    You can even get people's attention by using mentions.
    I never said anything about doing it by yourself :rolleyes:

    And thanks to your "compliment", I won't bother you folks anymore (so feel free to continue here), I have better things to do than waste my time with this.
    @nkk71: forgive the newbie....:D He does not know your contributions to XDA. Please don't let a single person's post determine your path. You are bigger than that man!
    7
    Understood, and I thank you a lot for your effort. I'll try by myself about magisk installation without bothering this thread with non-developer's questions. Let's hope in the future to see here the main (and more open minded) HTC developers

    Seriously?

    I really don't understand your problem, what's so difficult of looking in the General or Q&A forum on "How to root your device", and if there is no such thread you can create one.
    You can even get people's attention by using mentions.
    I never said anything about doing it by yourself :rolleyes:

    And thanks to your "compliment", I won't bother you folks anymore (so feel free to continue here), I have better things to do than waste my time with this.
    7
    excellent! Please, try to put up a github repo for it, if not already :)
    Hopefully it works fine.
    If HTC rolls out kernel sources, I might try some blind development, as I don't have the device, but wanna support it.