Guide: Get Widevine L1 back - Redmi K20 / Xiaomi Mi 9T Guides, News, & Discussio

I've figured out how to get Widevine L1 back after my persist partition got corrupted and I was stuck with Widevine L3. My phone is the global version so not sure if it will work for all.
Flash MiUI global ROM: davinci_global_images_V12.1.4.0.RFJMIXM_20210727.0000.00_11.0_global_9ce20c36aa.tgz (Note: EU or China ROM gives me widevine L3). Do not reboot into the ROM yet.
Flash persist image from MiUI global ROM: davinci_global_images_V12.1.4.0.RFJMIXM_20210727.0000.00_11.0_global_9ce20c36aa.tgz:
Extract persist.img from davinci_global_images_V12.1.4.0.RFJMIXM_20210727.0000.00_11.0_global_9ce20c36aa.tgz
Boot into fastboot mode: hold power and volume down buttons.
Flash TWRP: fastboot flash recovery twrp.img
Reboot into TWRP: hold power and volume up buttons
Plug in the USB cable and use adb to flash persist partition:
adb push persist.img /tmp
adb shell
dd if=/tmp/persist.img of=/dev/block/bootdevice/by-name/persist
Reboot into MiUI.
Popup camera will calibrate. You can calibrate sensors by entering *#*#6484#*#* into call dial pad.
Check that you have Widevine L1 now.
Flash custom rom like PixelExperience. You should keep L1 now, just don't modify persist partition when flashing.
Now my phone has Android 13 with Widevine L1 and all Safety Net checks pass.

Widevine L1 can be also restored by flashing Xiaomi.eu ROM(s), the latest for davinci was 12.5.2:
https://xiaomi.eu/community/threads/miui-12-0-12-1-12-2-12-5-stable-release.56191/

Related

[RECOVERY][IME][22.06.2020][OFFICIAL] TWRP 3.4.0-0 for HTC U12+ aka Imagine

Code:
*** Disclaimer ***
All flashing is done at your own risk!
While nothing from this thread should break your device,
don't come back here blaming anyone if it does!
Hello Guys and Girls,
the title is obvious: Here is a twrp build for the HTC U12+. I spent quite a bit of time together with the dear @Captain_Throwback to get everything working.
At this place a huge thanks to @Captain_Throwback for helping me, even though not having the device at his hands!
Instructions:
With A/B devices the command
Code:
fastboot flash recovery recovery.img
is not possible, because these devices generally don´t have a recovery partition any longer. The recovery sits now in the ramdisk of the boot.img.
So how do we get TWRP on it?
The first option is to just boot TWRP temporarily with the command
Code:
fastboot boot twrp.img
. This will just boot up TWRP, not actually flash it onto your device. After rebooting the phone, TWRP will be gone. This is a great option for those, who just like to flash their phone one time, don´t want to modify the boot.img and don´t need a permanently installed TWRP.
The second option is to use the twrp flashable installer zip to install TWRP permanently to your ramdisk from the booted TWRP or magisk manager! Installing from Magisk Manager was made possible by @osm0sis!
So you see there are generally 2 steps needed on A/B devices now.
First booting TWRP. Second flashing the installer zip.
But and now comes HTC into play. When permanently flashing TWRP zip touchscreen gets disabled, because HTC added a nasty little check into the touchscreen driver. If it detects that the phone is in recovery mode it disables the touchscreen.
Luckily we found 2 ways around that!
First way is to have a custom kernel, that has this check patched out!
Second option is to use a zip we provide here, that also patches your kernel, to avoid tripping this check. The downside of flashing this zip is that all commands like
HTML:
adb reboot recovery
, hitting reboot to recovery in magisk manager and finally reboot to recovery in TWRP are not working and only boot to the OS!
How to temporary boot TWRP:
1. You need a working fastboot and adb environment! Your device´s bootloader must be unlocked!
2. Download the twrp.img provided in this thread and copy it to your fastboot folder (pay attention that firmware version matches)
3. Open a command prompt in your fastboot folder!
3.a While your phone is booted to the OS and USB debugging is enabled, type:
Code:
adb reboot bootloader
4. You need to fastboot boot twrp currently
Code:
fastboot boot <filename of the twrp.img>
example:
Code:
fastboot boot twrp-3.2.3-2-ime.img
5. Wait for twrp to be booted
6. You´re now in TWRP
7. Please note that you need to fastboot boot the TWRP every single time you need it. After a reboot it will be gone!
8. Important:
Please note that
Code:
fastboot boot twrp.img
(like done in step 4) will also break OTA functionality. More about this in the FAQ.
How to permanently flash TWRP via the .zip installer
1. Make sure you have a working fastboot and adb environment! Your device´s bootloader must be unlocked!
2. Download the flashable TWRP installer zip provided in this thread!
2a. If you´re on a stock kernel that has no touchscreen fix for recovery included please also download the touchscreen_hexpatcher.zip
3. Flash the TWRP-Installer.Zip from the booted TWRP or Magisk Manager on your phone (hit the + while in modules section)
3a. Important: Directly afterwards flash the magisk zip from TWRP or Magisk Manager
If you don´t flash it you will only be able to reboot to TWRP, regardless of the option you choose
4.Only needed when on stock kernel without touchscreen fix:
also flash the touchscreen_hexpatcher.zip from TWRP or Magisk Manager
Be aware that flashing touchscreen_hexpatcher.zip will make touch work when using stock kernel but render all recovery related commands unusable.
This includes
Code:
adb reboot recovery
, reboot to recovery from magisk manager and reboot to recovery from inside TWRP.
To get into TWRP you first have to reboot to bootloader and from there on to TWRP/Recovery!
5. Reboot
6. Congratulations: you can now reboot into your permanently flashed TWRP
How to permanently flash TWRP via the TWRP.img file inside TWRP
1. Make sure you have a working fastboot and adb environment! Your device´s bootloader must be unlocked!
2. Download the twrp.img file from the offical twrp site
2a. If you´re on a stock kernel that has no touchscreen fix for recovery included please also download the touchscreen_hexpatcher.zip
3. Boot to TWRP. Navigate to Advanced -> Install Recovery Ramdisk -> Choose the twrp.img downloaded earlier. Wait for the flash to be completed successfully and do either 3a or 3b.
3a. If you want to be rooted flash the magisk.zip
3b. If you don´t want to be rooted navigate to Advanced -> Fix Recovery Bootloop to be able to boot into system
4.Only needed when on stock kernel without touchscreen fix:
also flash the touchscreen_hexpatcher.zip from TWRP or Magisk Manager
Be aware that flashing touchscreen_hexpatcher.zip will make touch work when using stock kernel but render all recovery related commands unusable.
This includes
Code:
adb reboot recovery
, reboot to recovery from magisk manager and reboot to recovery from inside TWRP.
To get into TWRP you first have to reboot to bootloader and from there on to TWRP/Recovery!
5. Reboot
6. Congratulations: you can now reboot into your permanently flashed TWRP
Few tips and tricks:
1. You need to mount ext_sd card before you can access it in the file manager
2. Go to mount and click on mount usb storage to access the ext sdcard when connected via USB
3. Don´t forget you can connect an usb device via usb-otg to backup/flash stuff from/to an usb storage device
Official Changelog: twrp.me
22.06.2020 3.4.0-0
HTC Firmware on Android Pie can´t be decrypted.
Add support to be able to decrypt Viper GSI - Huge Thanks to @Captain_Throwback
20.05.2019 3.3.1-0
Decryption on devices running firmware 1.68.xxx.y with security patch state of 1st April 2019 when fastboot booting the twrp.img
NOTE: The official TWRP image 3.3.1-0 will only decrypt devices on the 1st April 2019 security patch state when fastboot booted. The official TWRP image 3.3.0-0 will only decrypt devices on the 1st February 2019 security patch state when fastboot booted. The official TWRP image 3.2.3-5 will only decrypt devices on the 1st January 2019 security patch state when fastboot booted. The official TWRP image 3.2.3-3 will only decrypt devices on the 1st December 2018 security patch state when fastboot booted! The TWRP 3.2.3-2 image will only decrypt devices on the 1st Sepember 2018 security patch if fastboot booted! The TWRP 3.2.3-1 image will only decrypt devices on the 1 June 2018 security patch if fastboot booted. If you are on the 1 March 2018 security patch, you will need to fastboot boot one of the unofficial 1.15 TWRP images. The zip installer (also from the 3.2.3-3 release), however, will work on any patch level, but if you're on stock kernel, you will still need to flash the hex patcher or a custom kernel to have working touch when rebooting into recovery mode.
17.04.2019 3.3.0-0
Decryption on devices running firmware 1.62.xxx.y with security patch state of 1st February 2019 when fastboot booting the twrp.img
Future TWRP.img files can be flashed via the "Install Recovery Ramdisk" option inside TWRP´s advanced settings (for now the twrp.zip is also still available)
If you don´t flash magisk there is also option to "Fix Recovery Bootloop" inside TWRP´s advanced settings to be able to boot to system
you are able to take screenshots via power + home button
busybox is included instead of toybox
NOTE: The official TWRP image 3.3.0-0 will only decrypt devices on the 1st February 2019 security patch state when fastboot booted. The official TWRP image 3.2.3-5 will only decrypt devices on the 1st January 2019 security patch state when fastboot booted. The official TWRP image 3.2.3-3 will only decrypt devices on the 1st December 2018 security patch state when fastboot booted! The TWRP 3.2.3-2 image will only decrypt devices on the 1st Sepember 2018 security patch if fastboot booted! The TWRP 3.2.3-1 image will only decrypt devices on the 1 June 2018 security patch if fastboot booted. If you are on the 1 March 2018 security patch, you will need to fastboot boot one of the unofficial 1.15 TWRP images. The zip installer (also from the 3.2.3-3 release), however, will work on any patch level, but if you're on stock kernel, you will still need to flash the hex patcher or a custom kernel to have working touch when rebooting into recovery mode.
01.01.2019 3.2.3-5
Add support for successfully decryption devices on firmware 1.57.xxx.y with security patch state of 1st December 2018
NOTE: The official TWRP image 3.2.3-5 will only decrypt devices on the 1st January 2019 security patch state when fastboot booted. The official TWRP image 3.2.3-3 will only decrypt devices on the 1st December 2018 security patch state when fastboot booted! The TWRP 3.2.3-2 image will only decrypt devices on the 1st Sepember 2018 security patch if fastboot booted! The TWRP 3.2.3-1 image will only decrypt devices on the 1 June 2018 security patch if fastboot booted. If you are on the 1 March 2018 security patch, you will need to fastboot boot one of the unofficial 1.15 TWRP images. The zip installer (also from the 3.2.3-3 release), however, will work on any patch level, but if you're on stock kernel, you will still need to flash the hex patcher or a custom kernel to have working touch when rebooting into recovery mode.
01.01.2019 3.2.3-4
System is no longer being mounted R/W when booting TWRP
NOTE: The official TWRP image 3.2.3-3 will only decrypt devices on the 1st December 2018 security patch state when fastboot booted! The TWRP 3.2.3-2 image will only decrypt devices on the 1st Sepember 2018 security patch if fastboot booted! The TWRP 3.2.3-1 image will only decrypt devices on the 1 June 2018 security patch if fastboot booted. If you are on the 1 March 2018 security patch, you will need to fastboot boot one of the unofficial 1.15 TWRP images. The zip installer (also from the 3.2.3-3 release), however, will work on any patch level, but if you're on stock kernel, you will still need to flash the hex patcher or a custom kernel to have working touch when rebooting into recovery mode.
01.01.2019 3.2.3-3
Add support for successfully decryption devices on firmware 1.53.xxx.y with security patch state of 1st December 2018
NOTE: The official TWRP image 3.2.3-3 will only decrypt devices on the 1st December 2018 security patch state when fastboot booted! The TWRP 3.2.3-2 image will only decrypt devices on the 1st Sepember 2018 security patch if fastboot booted! The TWRP 3.2.3-1 image will only decrypt devices on the 1 June 2018 security patch if fastboot booted. If you are on the 1 March 2018 security patch, you will need to fastboot boot one of the unofficial 1.15 TWRP images. The zip installer (also from the 3.2.3-3 release), however, will work on any patch level, but if you're on stock kernel, you will still need to flash the hex patcher or a custom kernel to have working touch when rebooting into recovery mode.
Older versions:
05.10.2018 3.2.3-2
[Fix] TWRP Image 3.2.3-2 successfully decrypts devices on 1st September Security patch state! Also see the information below.
[Tweak] resetprop included statically, remove dependencies for it thanks @Captain_Throwback, @topjohnwu and @nkk71
NOTE: The official TWRP image 3.2.3-2 will only decrypt devices on the 1st Sepember 2018 security patch state when fastboot booted! The TWRP 3.2.3-1 image will only decrypt devices on the 1 June 2018 security patch if fastboot booted. If you are on the 1 March 2018 security patch, you will need to fastboot boot one of the unofficial 1.15 TWRP images. The zip installer (also from the 3.2.3-2 release), however, will work on any patch level, but if you're on stock kernel, you will still need to flash the hex patcher or a custom kernel to have working touch when rebooting into recovery mode.
07.09.2018 3.2.3-1
[Fix] MTP now enabled/working! (@Captain_Throwback)
[Fix] Vibration feedback now enabled/working (@notsyncing)
[Fix] Maximum brightness fixed - you need to manually adjust brightness in Settings using the slider to update (@Captain_Throwback)
[Tweak] Zip now automatically unroots the device when flashing to allow device to reboot to system normally if root isn't immediately flashed afterwards (@osm0sis)
[Tweak] /data/cache contents now mounted to /cache on flashed version (@Captain_Throwback)
NOTE: The official TWRP image will only decrypt devices on the 1 June 2018 security patch if fastboot booted. If you are on the 1 March 2018 security patch, you will need to fastboot boot one of the unofficial 1.15 TWRP images. The zip installer, however, will work on any patch level, but if you're on stock kernel, you will still need to flash the hex patcher or a custom kernel to have working touch when rebooting into recovery mode.
07.08.2018 3.2.3-0
Official TWRP release
NOTE: The official TWRP image will only decrypt devices on the 1 June 2018 security patch if fastboot booted. If you are on the 1 March 2018 security patch, you will need to fastboot boot one of the unofficial 1.15 TWRP images. The zip installer, however, will work on any patch level, but if you're on stock kernel, you will still need to flash the hex patcher or a custom kernel to have working touch when rebooting into recovery mode.
Unofficial Changelog:
21.07.2018 3.2.2-0
Initial Release
28.07.2018 3.2.2-1
Decryption is now working
02.08.2018 3.2.3-0
fix system not getting mounted by magisk installer!
fix no OS message upon reboot
flashable installer for permanently installing TWRP!
05.08.2018 3.2.3-1
fix system not being mountable as R/W in twrp
display a message asking you to reflash magisk after flashing twrp installer zip
Download:
Official
twrp.me
NOTE: The official TWRP image will only decrypt devices on the 1 June 2018 security patch if fastboot booted. If you are on the 1 March 2018 security patch, you will need to fastboot boot one of the unofficial 1.15 TWRP images. The zip installer, however, will work on any patch level, but if you're on stock kernel, you will still need to flash the hex patcher or a custom kernel to have working touch when rebooting into recovery mode.
Unofficial
XDA | AFH
Additional Downloads
Touchscreen hexpatcher | Mirror (AFH) - SEE IMPORTANT NOTES BELOW:
Only needed when on stock kernel without touchscreen fix
Flashing touchscreen_hexpatcher.zip will make touch work when using stock kernel but render all recovery related commands unusable.
This includes "adb reboot recovery", reboot to recovery from Magisk Manager and reboot to recovery from inside TWRP. To get into TWRP you first have to reboot to bootloader and from there on to TWRP/Recovery!
Known Issues:
MTP is disabled in official TWRP. This is currently an issue on several A/B devices. - Enabled since 3.2.3-1
Official TWRP can´t decrypt HTC Firmware on Android Pie!
NOTE: The unofficial TWRP image has MTP enabled for fastboot booting ONLY.
fastboot booting TWRP mounts the system RW and breaks ability to take an OTA.
Please take a look at FAQ, found in the 2nd post here. It contains more information
Bug Reporting:
If you have an issue, the first step is to post a recovery log so we can determine the cause of the issue. This is done in recovery using Advanced -> Copy Log, or adb pull /tmp/recovery.log. Once a log is uploaded we can determine how best to proceed. NOTE: Posts that are reporting bugs or issues without an accompanying recovery log will be ignored! Additionally, providing details about your device setup, including variant, firmware version, and exact steps to reproduce your issue will also be helpful in diagnosing the problem.
We need your help!
Join the TWRP Testing group on Slack to help us test TWRP prior to official releases!
Tips on how to build TWRP for the U12+ yourself:
To build TWRP you need to use this branch as your device tree:
https://github.com/freak07/android_device_htc_ime
Additionally you these commits from gerrit to your twrp tree!
https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/31760/
https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/31207/
https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/31021/
Depending on the base you're building for, you may need to comment/uncomment the PLATFORM_SECURITY_PATCH flag for your respective build if you want to fastboot boot the twrp.img. If the patch level of the image doesn't match the patch level of the current system, decryption will not function when fastboot booting the image. If installed via zip, the patch level doesn't matter, as it is automatically updated from system using @topjohnwu & @nkk71's resetprop.
XDA:DevDB Information
TWRP for HTC U12+ aka Imagine, Tool/Utility for the HTC U12+
Contributors
Freak07, Captain_Throwback, nkk71, topjohnwu, Dees_Troy, bigbiff, _that
Source Code: https://github.com/TeamWin/android_device_htc_ime
Version Information
Status: Stable
Current Stable Version: 3.4.0-0
Stable Release Date: 2020-06-22
Created 2018-07-21
Last Updated 2020-06-25
F.A.Q.:
Q: Which TWRP.img to choose for my current Security Patch State
A: For the old base 1.15 use on of the unoffical 1.15 release found in the OP.
TWRP Image 3.2.3-1.img decrypts devices, which run firmware on the 1st June Security patch State.
TWRP Image 3.2.3-2.img decrypts devices, which run firmware on the 1st September Security patch State.
The zip installer (also from the 3.2.3-2 release), however, will work on any patch level, but if you're on stock kernel, you will still need to flash the hex patcher or a custom kernel to have working touch when rebooting into recovery mode.
Q: I´m not able to fastboot boot the recovery, because the command won´t execute properly.
A: Update your adb and fastboot binaries to the latest one found here:
https://www.xda-developers.com/google-releases-separate-adb-and-fastboot-binary-downloads/
Make sure you´re using the original cable.
Make sure you are in bootloader mode.
Try different USB ports on your machine.
On windows make sure you have the latest usb/mtp driver installed properly when the phone is connected in bootloader mode.
Q: I flashed the permanent twrp installer zip and now my touchscreen is not working.
A: This happens when you´re on stock kernel and did not flash the hexpatch-touchscreen zip found in the OP.
Q: I flashed the permanent twrp installer zip and the hexpatch-touchscreen zip found in the OP. Now commands/actions like
Code:
adb reboot recovery
reboot to recovery button in magisk manager
reboot to recovery button in TWRP
are only booting me straight to the OS.
A: As mentioned in the OP flashing the hexpatch-touchscreen zip will break the reboot to recovery command and associated actions.
To get to twrp reboot to bootloader and from there choose reboot to recovery with volume buttons and confirm with the power button.
Q: I flashed the permanent twrp installer zip, booted to the OS and lost root
A: Directly after flashing the twrp installer zip flash the magisk zip to keep root!
Q: I only fastboot booted TWRP but now my OTA functionality is broken.
A: Fastboot booting the twrp image trips a check, this check isn´t able to determine if system has been modified (because it receives no output) and subsequently assumes it has been modified.
this breaks verity on system and probably vendor. Resulting in non existing OTA functionality.
If you are interested in a more detailed explanation please follow this link:
https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1301
to check if system has been modified check the following path:
"/sys/fs/" + Current_File_System + "/" + block + "/lifetime_write_kbytes"
Current_File_System is ext4 on the U12+
block is related to your boot_slot. so check the partition table here:
https://forum.xda-developers.com/u12-plus/how-to/guide-how-to-root-u12-magisk-tips-tricks-t3802583
if you´re on slot A: system_a is sda18
if you´re on slot B: system_b is sda19
Example:
I was on slot B so the file I needed to check was: `/sys/fs/ext4/sda19/lifetime_write_kbytes`
if this file shows 0 system was not modified. Any other value means it was modified and you will not be able to take an OTA!
Same check applied for vendor! you just have to adjust the path.
Slot A vendor: sde19
Slot B vendor: sde40
Example to check if vendor_b has been modified: /sys/fs/ext4/sde40/lifetime_write_kbytes
To restore OTA functionality follow this post:
https://forum.xda-developers.com/showpost.php?p=76606113&postcount=3
or alternatively:
1. after updating your device via RUU or OTA, patch the boot.img with magisk (look at my guide thread)
2. run the following command on either a terminal shell on the phone or via adb shell on your pc(don´t forget to grant su permissions) to obtain an untouched system.img:
dd if=/dev/block/bootdevice/by-name/system$(getprop ro.boot.slot_suffix) of=/sdcard/system.img
3. store this system.img somewhere safe
Additional info:
you can also backup vendor this way!
dd if=/dev/block/bootdevice/by-name/vendor$(getprop ro.boot.slot_suffix) of=/sdcard/vendor.img
Information: Please note that only perm s-off devices are able to flash the vendor.img in fastboot!
Q: Is there a way to restore OTA functionality and keep using TWRP?
A: Yes there is. Please read below! thanks to @osm0sis who came up with the idea!
Temporary Workaround for TWRP mounting /system as RW
the issue linked here: https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1301, which is causing TWRP not being able to mount system as read-only, results in a non pristine system partition after booting TWRP once.
The following file will allow TWRP to mount system as read-only (and therefore keeping OTA functionality)
That means after the following procedure, you can restore an untouched system.img, keep TWRP flashed on your device and simultaneously be able to take OTAs!
Instructions:
1. Download the following file https://www.androidfilehost.com/?fid=1322778262904004337 and extract it! (also as attachement to this post)
2. Copy/Replace the .twrps files to
/persist (make sure to grant the correct permissions afterwards! 0664 | rw-rw-r-- )
/storage/emulated/0/TWRP
with the one you just downloaded
3. When now booting/flashing TWRP system will get mounted as read only.
4. You can now restore a pristine system.img to your device! TWRP shouldn´t mount it as RW now!
5. Check if everything worked by following the guide above (check file lifetime_kbyte_writes for your active system partition)
A huge thanks to @MassStash for testing all this!
also mine
nice.:good:
noob question: can I format data partition and install magisk without force encryption flag like HTC 10? or is that impossible without decrypt the partition?
wiQbold said:
nice.:good:
noob question: can I format data partition and install magisk without force encryption flag like HTC 10?
Click to expand...
Click to collapse
I didn’t try it.
If you could try it and report back to confirm that would be great :highfive:
Nice work guys. Thanks @Freak07, @Captain_Throwback and all others who are still with as, as well as those who had to leave to soon - you'll be remembered.
Sent from my HTC U12+ using XDA Labs
@Freak07
Followed your instructions, but hangs at downloading 'boot.img' after second step: "fastboot boot TWRP_3.2.2.0_Imagine.img"
I'm Unlocked and Rooted with Magisk.
same here
fastboot boot TWRP.img
downloading...
FAILED: unknown command
schmeggy929 said:
same here
fastboot boot TWRP.img
downloading...
FAILED: unknown command
Click to expand...
Click to collapse
Might be a stupid question but did you try booting in fastboot? AFAIK it only works in fastboot
umaranjum said:
Might be a stupid question but did you try booting in fastboot? AFAIK it only works in fastboot
Click to expand...
Click to collapse
Yes that too, just hangs at booting... It is the same procedure at the U11. You boot TWRP in Bootloader and flash from Download Mode. Fastboot is the command for both.
umaranjum said:
Might be a stupid question but did you try booting in fastboot? AFAIK it only works in fastboot
Click to expand...
Click to collapse
Not the person you replied to, but since I have the same problem, I followed the steps in OP, and since it's only 2 steps, I'm sure the other person performed the "adb reboot bootloader" step.
Ah, Ok. Interesting, it worked the first time for me, have you tried redownloading the TWRP img and trying it again? If so, then it may be a problem specific to your device, in which case @Freak07 should be able to help you out better
---------- Post added at 02:27 AM ---------- Previous post was at 02:25 AM ----------
k_l_o said:
Not the person you replied to, but since I have the same problem, I followed the steps in OP, and since it's only 2 steps, I'm sure the other person performed the "adb reboot bootloader" step.
Click to expand...
Click to collapse
Ah, yes, I forgot about that lol. I do apologise, I'm quite tired. If it still doesn't work after redownloading then you'll need to wait for @Freak07 to help you out, as I mentioned above. Apologies that I couldn't be of more help and I hope you two manage to get it working
k_l_o said:
@Freak07
Followed your instructions, but hangs at downloading 'boot.img' after second step: "fastboot boot TWRP_3.2.2.0_Imagine.img"
I'm Unlocked and Rooted with Magisk.
Click to expand...
Click to collapse
Do you also get the same
FAILED: unknown command
as @schmeggy929?
schmeggy929 said:
same here
fastboot boot TWRP.img
downloading...
FAILED: unknown command
Click to expand...
Click to collapse
To both of you.
Try both bootloader and download mode for booting. Although only bootloader should work for booting.
Make sure you have the latest fastboot and adb drivers!
Try different usb ports.
What happens if you try to fastboot boot a stock boot.img?
Thanks @Freak07, @Captain_Throwback. TWRP_3.2.2.0_Imagine.img is worked.
product: htc_imedugl
current-slot: a
version-main: 1.15.709.6
Great news! Thanks everyone for your hard efforts! Get my U12 at the end of the month so looking forward to flashing. Hopefully Lee will have a nice ROM for us by then too
Freak07 said:
Do you also get the same
FAILED: unknown command
as @schmeggy929?
To both of you.
Try both bootloader and download mode for booting. Although only bootloader should work for booting.
Make sure you have the latest fastboot and adb drivers!
Try different usb ports.
What happens if you try to fastboot boot a stock boot.img?
Click to expand...
Click to collapse
I get a "FAILED (status read failed (Too many links))
Does it matter that I've Magisk already installed which required a patched_boot.img?
Freak07 said:
Do you also get the same
FAILED: unknown command
as @schmeggy929?
To both of you.
Try both bootloader and download mode for booting. Although only bootloader should work for booting.
Make sure you have the latest fastboot and adb drivers!
Try different usb ports.
What happens if you try to fastboot boot a stock boot.img?
Click to expand...
Click to collapse
Tried all available USB ports, two different cables. Where do I get a stock boot img for US Unlocked? Also while in bootloader, the only command that works is "fastboot reboot bootloader". "Fastboot reboot" and "fastboot reboot download" does nothing.
k_l_o said:
I get a "FAILED (status read failed (Too many links))
Does it matter that I've Magisk already installed which required a patched_boot.img?
Click to expand...
Click to collapse
Could you please post everything from your terminal?
And update the fastboot and adb binaries with the one from the following link for your current OS beforehand
https://www.xda-developers.com/google-releases-separate-adb-and-fastboot-binary-downloads/
No it doesn’t matter I did the same.
schmeggy929 said:
Tried all available USB ports, two different cables. Where do I get a stock boot img for US Unlocked? Also while in bootloader, the only command that works is "fastboot reboot bootloader". "Fastboot reboot" and "fastboot reboot download" does nothing.
Click to expand...
Click to collapse
You can extract it from the US firmware zip linked in the firmware thread.
Is fastboot devices showing your device?
Did you update your fastboot and adb binaries to the ones found here for your OS?
https://www.xda-developers.com/google-releases-separate-adb-and-fastboot-binary-downloads/
Freak07 said:
You can extract it from the US firmware zip linked in the firmware thread.
Is fastboot devices showing your device?
Did you update your fastboot and adb binaries to the ones found here for your OS?
https://www.xda-developers.com/google-releases-separate-adb-and-fastboot-binary-downloads/
Click to expand...
Click to collapse
Low and behold after updating the binaries twice and redownloading TWRP.img for the third time, it finally booted to TWRP. Cancelled decrypt and kept "Read Only". Flashed your Kernel successfully except for preload error due to not mounted. Rebooted and everything seems good, shows Kirisakura_1.0.
Thanks for the help!

Help me i bricked my phone

my redmi note 4 mido is bricked and i don't know how, i left my phone for a month because i travelled away and when i came back the phone was stuck on mi logo i tried to fix it by this methods but nothing worked:
-i tried to flash stock firmware via mi flash tool and it failed so many times (i used an old version which stated that the installation succeed but the phone was still stuck in bootloop)
- i tried edl version and it didn't work
- i tried to install via adb and it didn't work also
- i tried to open recovery (volume + and power) it got me to twrp 3.2.3.0 but it's alway stuck on twrp logo and nothing happens
it only happened 2 times when twrp worked and asked me for decryption password, i wrote my phone pin but said wrong password (tried also password and default_password) then i bypassed the password section and got into twrp but i couldn't mount or format storage (it appears that internal storage and sd card is 0 gb) i tried to format it fails,
tried also to change storage to ext2 it got stuck and i couldn't open the twrp again.
any stock firmware flashed on my mido doesn't work and it still stuck on mi logo ( no android loading logo), and it still has twrp
(i tried to flash another twrp or orangefox it just doesn't flash even if it's successful flash on adb)
i tried also to boot the recovery image it also get stuck on the logo and doesn't open the recovery
please help me to know what the hell is wrong with this phone and how i can fix it
help pleassseeeeeeee
Install magisk if you are stuck in boot loop it fixes the problem otherwise download a recovery rom and change your twrp version to 3.1.0.0 because the decryption password in the new versions of twrp doesn't seem to work on rn4. Now wipe system,vendor,data. import recovery rom from your computer and install it. It will install the rom then flash Magisk otherwise your phone will be stuck in bootloop. Wait for a while and bam your system is back!
i can't install anything or even boot into twrp 3.1.0.0 even if i tried
Can you boot into fastboot atleast? If yes then type fastboot reboot recovery and as you said you have twrp installed then it surely means that your bootloader is unlocked. Do you know the name of your custom rom or are you using stock rom? If yes whichever rom you are using just download the recovery rom of that and extract the boot.img in your adb and fastboot folder and flash it via fastboot by typing fastboot flash boot boot.img . And also when booting in twrp which buttons are you using? This happened to me when I myself bricked my device. I thought I can't boot in twrp but the point was I was using volume up+ power but the actual key to boot to twrp is volume up+volume down+power key
You can flash your Xiaomi Redmi Note 4 [MIDO] using Mi Flash. I have an article that discusses how to flash Xiaomi Redmi Note 4 [MIDO / Snapdragon] that might help you: How to Flash Redmi Note 4 / 4x Snapdragon [Mido] with MiFlash
NOTE: Few problematic tool links in this article. Please search on Google | This website was translated using Google Translate [Indonesian -> English]
pandmc said:
You can flash your Xiaomi Redmi Note 4 [MIDO] using Mi Flash. I have an article that discusses how to flash Xiaomi Redmi Note 4 [MIDO / Snapdragon] that might help you: How to Flash Redmi Note 4 / 4x Snapdragon [Mido] with MiFlash
NOTE: Few problematic tool links in this article. Please search on Google | This website was translated using Google Translate [Indonesian -> English]
Click to expand...
Click to collapse
I think flashing the stock rom should be the last step before which everything possible should be tried
JustExperimentingRedmi said:
I think flashing the stock rom should be the last step before which everything possible should be tried
Click to expand...
Click to collapse
Yes, Flashing Stock ROM should be the last step before he tries to fix. But mostly if the smartphone is bootlooped or bricked there is no other step besides Erase All Data / Format Data or Flashing Stock ROM.
pandmc said:
Yes, Flashing Stock ROM should be the last step before he tries to fix. But mostly if the smartphone is bootlooped or bricked there is no other step besides Erase All Data / Format Data or Flashing Stock ROM.
Click to expand...
Click to collapse
You can flash orignal boot.img which most times fixes the problem and if it didnt work flash system.img it almost always works and the last option is flashing magisk. Then only i will recommend to flash stock rom.
JustExperimentingRedmi said:
Can you boot into fastboot atleast? If yes then type fastboot reboot recovery and as you said you have twrp installed then it surely means that your bootloader is unlocked. Do you know the name of your custom rom or are you using stock rom? If yes whichever rom you are using just download the recovery rom of that and extract the boot.img in your adb and fastboot folder and flash it via fastboot by typing fastboot flash boot boot.img . And also when booting in twrp which buttons are you using? This happened to me when I myself bricked my device. I thought I can't boot in twrp but the point was I was using volume up+ power but the actual key to boot to twrp is volume up+volume down+power key
Click to expand...
Click to collapse
the rom i was using before the phone got bricked is crdroid 10, i downloaded it again as you said and tried to flash boot img then i rebooted into recovery but i got stuck at twrp logo as usual and even if twrp worked it will as for a password i tried all pins i have used on my phone and tried default_password didn't work either, i can't even mount data or storage or anything and it shows everything with 0mb storage (external or internal storage).
i can't even format data to remove encryption it just freezes whenever i do that
pandmc said:
You can flash your Xiaomi Redmi Note 4 [MIDO] using Mi Flash. I have an article that discusses how to flash Xiaomi Redmi Note 4 [MIDO / Snapdragon] that might help you: How to Flash Redmi Note 4 / 4x Snapdragon [Mido] with MiFlash
NOTE: Few problematic tool links in this article. Please search on Google | This website was translated using Google Translate [Indonesian -> English]
Click to expand...
Click to collapse
i tried that before it's always shows me ( mi flash tool could not find a part of the path) error, there's a one time i tried an older version of mi flash tool and the flash succeeded but when phone rebooted it stayed at the bootloop
i checked the recovery and sadly it was still the same twrp recovery
i don't really know if my phone can be fixed or this an emmc problem
So it means you have your stock rom right? Extract boot.img and flash it with
fastboot flash boot boot.img
make sure to put it in adb folder
You can find boot.img in images folder
If it does not work get the system.img and flash it with
fastboot flash system system.img
i flash the whole stock rom via fastboot (adb) and it also didn't work.
sorry if this seems disappointing
Try orangefox recovery then, not sure why is this happening to you
If still not working type
fastboot oem edl
Then flash via mi flash it should work as far as I know. If not then go to mi service centre it's the last thing you can do

Question How to stay decrypted with A12/A12L

Hi,
As everyone knows, up till now there's no recovery yet able to decrypt the A12 encryption.
Since this device is an A/B with dynamics, somehow I always failed to flash DFE after successfully flash A12 rom + format + flash rec to ramdisk + reboot to rec + flash gapps + flash dfe
Flashing gapps after reboot to rec is always successful, yet not the zip to disable encryption (any kind of disable force encrypt zip from here https://forum.xda-developers.com/t/...-10-pro-miui-vendor-oss-vendor-sweet.4276559/)
Flashing DFE right after flashing rom won't work (I expected it), or any combination of it (didn't flash gapps, sideload dfe). Always fails in mounting /vendor
I've tried looking for similar topic, the closest one was Poco F3 thread (https://forum.xda-developers.com/t/...e-for-poco-f3-alioth-decryption-data.4317277/). Maybe someone has managed to pull one off for Redmi Note 10?
It's quite lengthy process (mounting, extracting super partition, repacking super, etc.) and the latest zip file seems tailored just for Poco F3 device.
I recalled the DFE/or any disable force encryption is about patching the fstab.qcom to include flag to disable the encryption.
I know with dynamics part now is hard to edit anything inside the super part (if it's not impossible), but gapps is able to mount it (though it's only /system)
Why does it fail in mounting /vendor?
I just like to try keeping twrp/orangefox with decrypted storage. Is anyone able to stay decrypted with A12/A12L without similar method for Poco F3?

[HELP] L1 after unlock , L3 after custom rom (Widevine on Oneplus 7t pro HD1911)

I went on many posts from this forum. Searched far and wide.
I am able to unlock and still pass widevine L1. However, for some reason, flashing custom roms makes me lose L1. MSM, at least, bring it back.
My procedure is as follows:
MSM to 11.0.5.1 (hotdog_14_O.25_211210_repack)
DRM Info L1 Yasnac pass
"Downgrade zip" of 11.0.5.1
DRM Info L1 Yasnac pass
adb reboot bootloader
adb oem unlock
"yes" on my phone
Wait for my phone to wipe and reboot into OOS setup screen[/B]
DRM Info L1 Yasnac fail
Reboot
adb reboot bootloader
fastboot.exe flash dtbo ../firmwares/lineage_20230221/dtbo.img
fastboot.exe flash vbmeta ../firmwares/lineage_20230221/vbmeta.img
crdroid firmware firmware_OP7TPro_HD1911_11.F.20_A12 script (first flash recovery, reboot into recovery, flash the rest, "You can install crDroid.")
Factory reset in CrDroid Recovery (Current: f2fs. Selected: F2FS)
Apply Update in CrDroid recovery
adb.exe sideload rom.zip (yes signature fail)
reboot into CrDroid ... or Nameless ... or Pixel Experience ... Or XTended... Setup google account and password and stuff
YASNAC (Pass or fail) + DRM Info L3
YASNAC sometime requires root and other trickery, but in the end Safetynet passes and DRM Info always fail.
Can anyone please give me an idea of what procedure change to I need to do to get L1 with custom Android 13 roms?
Thank you a lot....
I'm wondering the same thing as well.
My experience has been as follows:
MSM to 10.0.3 (hotdog_14_O.07_191012_repack)
DRM Info is L1
Upgrade to 11.X.X via OTA (I don't exactly remember which one but i guess it was the lastest android 11 update)
DRM Info is L1
adb reboot bootloader
adb oem unlock
"yes" on my phone
Wait for my phone to wipe and reboot into OOS setup screen
DRM Info is L3
Upgraded to latest OOS 12 via OTA
Followed the Pixel experience official guide to flash the recovery and the rom anyways (Pixel Experience 13)
And i'm still on this rom for now with Widevine L3
Is it even possible to have DRM L3 once the bootloader is unlocked?
Anonymperson777 said:
I'm wondering the same thing as well.
My experience has been as follows:
MSM to 10.0.3 (hotdog_14_O.07_191012_repack)
DRM Info is L1
Upgrade to 11.X.X via OTA (I don't exactly remember which one but i guess it was the lastest android 11 update)
DRM Info is L1
adb reboot bootloader
adb oem unlock
"yes" on my phone
Wait for my phone to wipe and reboot into OOS setup screen
DRM Info is L3
Upgraded to latest OOS 12 via OTA
Followed the Pixel experience official guide to flash the recovery and the rom anyways (Pixel Experience 13)
And i'm still on this rom for now with Widevine L3
Is it even possible to have DRM L3 once the bootloader is unlocked?
Click to expand...
Click to collapse
It is. Is it possible you OTA'ed to OOS12? (My research told me unlocking should be done with OOS11 exclusively)
Anyways if you use 11.0.5.1 for both, like in the procedure I've shared, I believe you should have identical result, that is DRM L1 unlocked (but safetynet fail)
Hey Guys,
I'm on the exact same problem for about a week now.
My Problem is, even after flashing OOS 10.5.1 with MSM, I'm still stuck on L1.
It'll somehow never come back, even on stock OOS.
YASNAC looks like this. Is that okay?
I literally tried everything now.

Huawei P10 VTR-L29 (dual SIM) and Lineage 18.1, 19.1, 20

Works!
But you have to solve some basic problems:
Unlock bootloader. Solved here: https://github.com/mashed-potatoes/PotatoNV
You have to patch the recovery_ramdisk original partition. Patch with The Magisk https://github.com/topjohnwu/Magisk
Take the recovery_ramdisk partition from the latest full upgrade file VTR-L29 9.1.0.297(C432E5R1P9), VTR-L29C432B185
Download the lineage .img file https://sourceforge.net/projects/andyyan-gsi/files/. You will need the -arm64_bgN.img.xz version
Reboot the phone to fastboot mode and execute command: fastboot flash system xxxxx-arm64_bgN.img
fastboot reboot
After reboot the phone go to the erecovery (Volume up to 3 secondes) and do wipe data / factory reset
Boot phone in to clean Lineage system and do the first Lineage configuration
Reboot phone to fastboot mode
Flash the Magisk patched recovery_ramdisk partition: fastboot flash recovery_ramdisk magisk_patched_recovery_ramdisk.img
Now you have a full working Huawei P10 with Lineage 18.1, 19.1 or 20.x system, but every time you will have to boot the phone with "Magisk boot cheat" means Volume Up + Power button. When appears the Huawei logo release all buttons. https://topjohnwu.github.io/Magisk/install.html
Not necessary - permanent boot to recovery cheat. When the phone boot and the yellow text on black wallpaper appers, use the first option and go to eRecovery (Volume Up for 3 seconds). In eRecovery select Wipe data / Factory reset, confirm and reboot the phone. The phone will reboot to recovery and will boot in to the Magisk root boot system (the wipe will not be called).
Go back to point 11 state. The RAM card have not to contain a /dload directory!!!!! Power off the phone. Press Volume Up + Volume Down + Power and release all buttons, when Huawei logo appears. Now you will see aclean EMUI screen which will respond - OS Upgrade not successfull. Go to reboot and the permanent Recovery reboot byte will be cleaned.
here's a great alternative for magisk
KernelSU
all thx to coconut for bringing kernelsu on vtr & also maimai for his pangu kernel
GitHub - Coconutat/android_kernel_huawei_vtr_emui9_KernelSU: Modify based Pangu Kernel(EMUI 9 Custom Kernel) for support KernelSU
Modify based Pangu Kernel(EMUI 9 Custom Kernel) for support KernelSU - GitHub - Coconutat/android_kernel_huawei_vtr_emui9_KernelSU: Modify based Pangu Kernel(EMUI 9 Custom Kernel) for support KernelSU
github.com
that's for EMUI "9.0"
works great, i did test some magisk module such as uka tool and it works without any issues.
for zygisk on kernelsu:
GitHub - Dr-TSNG/ZygiskOnKernelSU: Run Zygisk on KernelSU
Run Zygisk on KernelSU. Contribute to Dr-TSNG/ZygiskOnKernelSU development by creating an account on GitHub.
github.com

Categories

Resources