Will I loose DRM functionality when the bootloader is unlocked? - Redmi K20 / Xiaomi Mi 9T Questions & Answers

Just bought a new Xiaomi mi 6T device. My previous phone was a Sony Xperia m6. To unlock the bootloader and get root access was a bit of a pain on the latter. I remember having to backup a ta-partition to secure my DRM-keys.
Wanting to unlock the bootloader on this device I couldn't find any information about backing up and restoring a certain partition to secure the DRM-keys. What I did find was this post on the mi community forum about how unlocking the bootloader results in the widevine beïng downgraded from L1 to L3 (read the post for further details. The only way to reverse that process is to relock the bootloader again according to the the information I found.
So this is my question: Is there a way to keep the widevine L1 version, with better HDR performances, with an unlocked bootloader by backing up and restoring any data or partition on the phone that is responsible for widevine or other DRM content?

Medeon said:
Just bought a new Xiaomi mi 6T device. My previous phone was a Sony Xperia m6. To unlock the bootloader and get root access was a bit of a pain on the latter. I remember having to backup a ta-partition to secure my DRM-keys.
Wanting to unlock the bootloader on this device I couldn't find any information about backing up and restoring a certain partition to secure the DRM-keys. What I did find was this post on the mi community forum about how unlocking the bootloader results in the widevine beïng downgraded from L1 to L3 (read the post for further details. The only way to reverse that process is to relock the bootloader again according to the the information I found.
So this is my question: Is there a way to keep the widevine L1 version, with better HDR performances, with an unlocked bootloader by backing up and restoring any data or partition on the phone that is responsible for widevine or other DRM content?
Click to expand...
Click to collapse
No, you don't loose L1. You don't need to backup anything. You will allways have L1 with the official roms (global/eea) and L3 with all other at the moment including china official, xiaomi.eu and all forks.
e.g:
I have L1 with global rom, unlocked BL and magisk.

fabsen said:
No, you don't loose L1. You don't need to backup anything. You will allways have L1 with the official roms (global/eea) and L3 with all other at the moment including china official, xiaomi.eu and all forks.
e.g:
I have L1 with global rom, unlocked BL and magisk.
Click to expand...
Click to collapse
Thank you very much for confirming this, that's a huge relief! I also just found out about it reading this article.

Medeon said:
Thank you very much for confirming this, that's a huge relief! I also just found out about it reading this article.
Click to expand...
Click to collapse
I'm unlock and rooted, on L1, but u can't install Netflix from play store, so no full HD

I kinda anticipated that, since when you root your device with magisk, Android prevents you from installing Netflix. Which is no problem in my case, since I only watch Netflix on my television or Pc. You can watch Netflix though on an unlocked device if don't root your devices, isn't it?

I just installed magisk and remains L1. Just that the app doesn't appear on play store. Sideloeaded and got hdr working just fine.

i think only SONY has this problem with drm keys and widevine l1..if you unlock the bootloader of any SONY mobile said goodbye to this keys.And the hdr of the camera i think..

I only recommend that you back up the persist partition with TWRP if you are going to change the ROM on the Mi 9T. Some ROMs try to damage this partition and if it does you will Widevine L1 forever as I lost it

LeonardoBordin said:
I only recommend that you back up the persist partition with TWRP if you are going to change the ROM on the Mi 9T. Some ROMs try to damage this partition and if it does you will Widevine L1 forever as I lost it
Click to expand...
Click to collapse
Using OrangeFox and there is no checkmark to include Persist to Backup - screenshot attached.
I think it was the same with the official TWRP.
Which TWRP offers to backup Persist?
Btw, I was able to disk-dump Persist:
https://forum.xda-developers.com/mi-9t/how-to/to-extract-stock-boot-recovery-images-t4058447
But read somewhere (cannot find now and didn't try) that Persist.img cannot be flashed through Fastboot (?)

Medeon said:
Just bought a new Xiaomi mi 6T device. My previous phone was a Sony Xperia m6. To unlock the bootloader and get root access was a bit of a pain on the latter. I remember having to backup a ta-partition to secure my DRM-keys.
Wanting to unlock the bootloader on this device I couldn't find any information about backing up and restoring a certain partition to secure the DRM-keys. What I did find was this post on the mi community forum about how unlocking the bootloader results in the widevine beïng downgraded from L1 to L3 (read the post for further details. The only way to reverse that process is to relock the bootloader again according to the the information I found.
So this is my question: Is there a way to keep the widevine L1 version, with better HDR performances, with an unlocked bootloader by backing up and restoring any data or partition on the phone that is responsible for widevine or other DRM content?
Click to expand...
Click to collapse
No, but you will lose the safeties that could lead in to a persist partition corrupted.
Backup your persist partition and store this backup OUT of the phone, on a cloud or a PC.

Pupet_Master said:
No, but you will lose the safeties that could lead in to a persist partition corrupted.
Backup your persist partition and store this backup OUT of the phone, on a cloud or a PC.
Click to expand...
Click to collapse
The same question that was in the preceeding post:
Using OrangeFox and there is no checkmark to include Persist to Backup .
I think it was the same with the official TWRP
Which TWRP offers to backup Persist?
Btw, I was able to disk-dump Persist:
https://forum.xda-developers.com/mi-9t/how-to/to-extract-stock-boot-recovery-images-t4058447
But read somewhere (cannot find now and didn't try) that Persist.img cannot be flashed through Fastboot (?)

zgfg said:
The same question that was in the preceeding post:
Using OrangeFox and there is no checkmark to include Persist to Backup .
I think it was the same with the official TWRP
Which TWRP offers to backup Persist?
Btw, I was able to disk-dump Persist:
https://forum.xda-developers.com/mi-9t/how-to/to-extract-stock-boot-recovery-images-t4058447
But read somewhere (cannot find now and didn't try) that Persist.img cannot be flashed through Fastboot (?)
Click to expand...
Click to collapse
The chinese team TWRP

Pupet_Master said:
The chinese team TWRP
Click to expand...
Click to collapse
Pls link for that TWRP
Andd a question, official TWRP and OtangeFox properly support encryption - it is not needed to format Data, jus each time on booting to TWRPt to enter the current Android screen unlock pin/pass and they rrad/write to Internal storage
Is it also the case with the Chineer TWRP?

zgfg said:
Pls link for that TWRP
Andd a question, official TWRP and OtangeFox properly support encryption - it is not needed to format Data, jus each time on booting to TWRPt to enter the current Android screen unlock pin/pass and they rrad/write to Internal storage
Is it also the case with the Chineer TWRP?
Click to expand...
Click to collapse
If you will flash ANY different ROM, you NEED to format. since the ROM wont be able to access a encrypted data partition from another ROM/Encryption key.
Also, you can do a forum search for the chinese TWRP, i don't have the link
Good luck.

Pupet_Master said:
If you will flash ANY different ROM, you NEED to format. since the ROM wont be able to access a encrypted data partition from another ROM/Encryption key.
Also, you can do a forum search for the chinese TWRP, i don't have the link
Good luck.
Click to expand...
Click to collapse
Im absolutely not interested in custom ROMs (I only do rooting of the stock, and for that, as well as for official TWRP ahd OrangeFox, no kind of forkatting any partition is needed)
However, I have asked about Persist partitions just in case
Good luck

zgfg said:
Im absolutely not interested in custom ROMs (I only do rooting of the stock, and for that, as well as for official TWRP ahd OrangeFox, no kind of forkatting any partition is needed)
However, I have asked about Persist partitions just in case
Good luck
Click to expand...
Click to collapse
If you install stock MIUI but from a zip, such as xiaomi.eu is is a custom rom..
Stock is just what come with the phone.

Pupet_Master said:
If you install stock MIUI but from a zip, such as xiaomi.eu is is a custom rom..
Stock is just what come with the phone.
Click to expand...
Click to collapse
Tthank for teaching but I know what the stockk means
My Mi 9T came with v10.3.12 PFJEUXM, updated by OTA to v11.0.3 PFJEUXM and then again by OTA to v11.0.4 QFJEUXM.
Alll syock firmwares, no eu weekly ROMs and no AOSP ROMs (only debloating by ADB, twrp.me davincii TWRP, OranfeFox, Canary Magisk root and modules)
Instead of this OT discussion, I still did not get answers for sone originally asked questions but please nwm(for example about flashing from Fastboot the disk-dumped Persist.img)
Good luck and goodbye

zgfg said:
Tthank for teaching but I know what the stockk means
My Mi 9T came with v10.3.12 PFJEUXM, updated by OTA to v11.0.3 PFJEUXM and then again by OTA to v11.0.4 QFJEUXM.
Alll syock firmwares, no eu weekly ROMs and no AOSP ROMs (only debloating by ADB, twrp.me davincii TWRP, OranfeFox, Canary Magisk root and modules)
Instead of this OT discussion, I still did not get answers for sone originally asked questions but please nwm(for example about flashing from Fastboot the disk-dumped Persist.img)
Good luck and goodbye
Click to expand...
Click to collapse
fastboot a disk dump persist.img will cause you to lose DRM, i did it my self and i lost.

Pupet_Master said:
fastboot a disk dump persist.img will cause you to lose DRM, i did it my self and i lost.
Click to expand...
Click to collapse
What about
Code:
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
to backup and
Code:
dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist
to restore?
That's how I did it with my Moto G5+. Later the official TWRP recovery for that device had checkmarks for persist and efs too.
Edit: Sorry,I've seen that @zgfg posted that method so follow his steps:
https://forum.xda-developers.com/mi...ck-boot-recovery-images-t4058447/post81871363
Sent from my Moto G5 Plus using XDA Labs

You will lose DRM even with "dd" to restore (tested on Mi Mix 3 5G)

Related

New!! [MTK-SU temp root] TA Backup BEFORE Unlocking your bootloader. MTK SoC Only!!

This works for MediaTek SoC ONLY!! XA XA1 and variants of C4/5's, M5's, L1, L2 and Maybe even L3's
Update: A Bootless/System only Root is now reported as working again thanks to diplomatic.
Can XA1 users who have benefited from mtk-su and the System only Root please report back their experience here also so other XA1 users will know what to expect. ​
Thanks to dev @diplomatic All Sony Mediatek devices should now be able to obtain a /ta partition backup before unlocking their bootloader. :victory:
It works by getting temporary "root" with a easy to use method which will then allow you to grab a /ta backup via the dd cmd
I did some testing for diplomatic and I can confirm this works with my locked bootloader XA1 on Android 8.0 lesser versions should also work.
I also tested this on my other Mediatek devices with the same successful results upto and including Android 8.1
Please visit diplomatic's Thread HERE for instructions and details also remember to Hit his Thanks Button or the :good: Thumbs Up Button if your using a phone app.
How do I backup the /ta ???
See this here.
Use MTK-SU to get temp root then use my dd backup helper script
Thread is HERE for instructions and info
https://github.com/bigrammy/dd-backup-helper-script/blob/master/dd-backup.sh
I am new to Sony whats all this stuff mean???
The below will help anyone new to Sony Gain a little insight into the slight differences over stock Android.
So take time to read it
New to Sony then read the info HERE it will save you a lot of head scratching and google time and I created the thread for just such as you. :good:
As a Footnote for the over enthusiastic:
You only need dd backup what is specific to your device so everything that is NOT included in the FlashTool/Xperifirm firmwares. Like the /TA, /Protect_f, /Protect_s, to name a few for example.
Backing up stock boot or fotakernel is kinda pointless because these are contained in the XperiFirm/FlashTool firmwares and can be easily restored using FlashTool or xflasher to flash those Stock ROM parts.
This is all a little over my head, to be honest. But it looks like I won't be able to install TWRP unless I unlock my bootloader if I'm reading this right?
My phone's bootloader can't be unlocked so that'll be a real shame if that's so.
Ticklefish said:
This is all a little over my head, to be honest. But it looks like I won't be able to install TWRP unless I unlock my bootloader if I'm reading this right?
My phone's bootloader can't be unlocked so that'll be a real shame if that's so.
Click to expand...
Click to collapse
Sure. But you will be able to temp root phone.
Ticklefish said:
This is all a little over my head, to be honest. But it looks like I won't be able to install TWRP unless I unlock my bootloader if I'm reading this right?
My phone's bootloader can't be unlocked so that'll be a real shame if that's so.
Click to expand...
Click to collapse
Sorry for the super late reply but for some reason I don't get a notification when someone post's I guess I must have forgot to subscribe to my own thread. :silly:
Why cant you unlock your bootloader
bigrammy said:
Sorry for the super late reply but for some reason I don't get a notification when someone post's I guess I must have forgot to subscribe to my own thread. :silly:
Why cant you unlock your bootloader
Click to expand...
Click to collapse
I have the message "bootloader unlock allowed: no" so I'm stuck.
I was hoping to be able to install TWRP so I can start modding my system apps.
Sent from my Sony Xperia XA1 using XDA Labs
Ticklefish said:
I have the message "bootloader unlock allowed: no" so I'm stuck.
I was hoping to be able to install TWRP so I can start modding my system apps.
Sent from my Sony Xperia XA1 using XDA Labs
Click to expand...
Click to collapse
Hmm My XA1 is with a relative just now so can't check but we used to have this problem on the C4 and C5.
I just Ignored that and tried the unlock code anyway. It worked for me on the C4 and XA but but not tested it on the XA1 so no guarantee's.
The other option is to use xflasher which worked for me on my XA1 (BL Locked) and flash only the system, boot, recovery, oem and userdata of the earliest 7.0 you can get your hands on and see if it boots. :fingers-crossed: It may even work for the preloader lk etc but I did not want to risk bricking the XA1 so never tried to flash those sensitive area's
If it does let you flash a earlier version then just wait for the ota and install it. The OTA will flash the perloader and lk of the next 7.x update and hopefully that will allow you to unlock the BL unless your phone is locked to specific carrier then I am unsure about that.
Again this is the method used on the C4/5 for rolling back to 5.0 so we could unlock the bootloader.
bigrammy said:
Hmm My XA1 is with a relative just now so can't check but we used to have this problem on the C4 and C5.
I just Ignored that and tried the unlock code anyway. It worked for me on the C4 and XA but but not tested it on the XA1 so no guarantee's.
The other option is to use xflasher which worked for me on my XA1 (BL Locked) and flash only the system, boot, recovery, oem and userdata of the earliest 7.0 you can get your hands on and see if it boots. :fingers-crossed: It may even work for the preloader lk etc but I did not want to risk bricking the XA1 so never tried to flash those sensitive area's
If it does let you flash a earlier version then just wait for the ota and install it. The OTA will flash the perloader and lk of the next 7.x update and hopefully that will allow you to unlock the BL unless your phone is locked to specific carrier then I am unsure about that.
Again this is the method used on the C4/5 for rolling back to 5.0 so we could unlock the bootloader.
Click to expand...
Click to collapse
Interesting. I might try the unlock code just to see what it does. I think Vodafone may have locked my phone, which is understandable but annoying.
I can't afford a new handset and all my old ones are either broken or so underpowered that they're pretty useless, so I won't try flashing anything right now. Too risky.
Ticklefish said:
Interesting. I might try the unlock code just to see what it does. I think Vodafone may have locked my phone, which is understandable but annoying.
I can't afford a new handset and all my old ones are either broken or so underpowered that they're pretty useless, so I won't try flashing anything right now. Too risky.
Click to expand...
Click to collapse
Hmm I thought they could only really sim lock the device but maybe that's why your not been shown the Option to unlock the bootloader.
If you have the sim lock removed by fair or fowl means then the unlock option may become available to you. I have flashed full Vodafone Virgin O2 ROM's with FlashTool before now and none ever locked the bootloader I have only ever heard of people having problems who accidentally flash the sim.lock part of the firmware. :silly:
PS: I have used these before for sim unlocking and all was ok. HERE also cheaper than most.
New bootless/System Only Root
A Heads up for everyone!!!
Well @diplomatic has done it again with a New bootless Root for locked bootloaders it has been reported to be working on the XA1 which I am sure will be good news for many. :victory:
Remember to Hit the thanks button of diplomatic or better still buy him a Beer or Pizza for liberating your phone. :good:
https://forum.xda-developers.com/showpost.php?p=79626434&postcount=135
@Ticklefish
Bootless magisk root
Bootless magisk root working on XA1!!!
Updated tutorial: https://forum.xda-developers.com/showpost.php?p=79626434&postcount=135
Wow, cool! You mean I don't have to unlock my phone to get root? Can't wait to try it on my XA1...
---------------------
But seriously, this bootless root may be a bigger headline than the temp root shell itself.
diplomatic said:
Wow, cool! You mean I don't have to unlock my phone to get root? Can't wait to try it on my XA1...
---------------------
But seriously, this bootless root may be a bigger headline than the temp root shell itself.
Click to expand...
Click to collapse
Awesome work all round and yes you are correct it may even warrant a thread of its own since itś not limited to MTK devices.
On a side note.
Safestrap recovery would be the next logical thing for the XA1 then the locked bootloader circle should be complete.
It will be like running the Fire Phone again :laugh:
https://github.com/bigrammy/android_bootable_recovery-safestrap
Yeah, you're right, I'll make a new thread eventually. Just wanted to start slow and see where it goes...
Unfortunately, safestrap recovery will be problematic because this method doesn't let you write to /system or boot. It doesn't do anything about dm-verity and all that.
diplomatic said:
Yeah, you're right, I'll make a new thread eventually. Just wanted to start slow and see where it goes...
Unfortunately, safestrap recovery will be problematic because this method doesn't let you write to /system or boot. It doesn't do anything about dm-verity and all that.
Click to expand...
Click to collapse
I need to get around to unpacking the boot of the XA1 and look at the lk too. If they moved the fstab to system/vendor then there maybe a way.
My thoughts are as yet untested and based off vague memories but if I manage to put them all together I will let you know.
Real busy just now with Work and ongoing home improvements so not got much time for playing
Read this before thinking about bootless recovery:
https://source.android.com/security/verifiedboot/dm-verity
Any method to root with magisk that allows modifying / system?
leonardo.teseyra said:
Any method to root with magisk that allows modifying / system?
Click to expand...
Click to collapse
Yes for sure but you need to be officially bootloader unlocked for that.
You use the mtk-su to gain temp root then make a couple of dd backups of your /ta and any other partition you think maybe useful which is basically
anything not contained in a firmware package using FlashTool/Xperifirm
EG:
ta
nvram
nvdata
protect_f
protect_s
When you have what you need Unlock the bootloader officially.
Convert your boot.elf to boot.img have Magisk patch the new boot.img and flash it via fastboot.
If you need more detail please provide more such as your device etc it make helping easier. :good:
bigrammy said:
Yes for sure but you need to be officially bootloader unlocked for that.
You use the mtk-su to gain temp root then make a couple of dd backups of your /ta and any other partition you think maybe useful which is basically
anything not contained in a firmware package using FlashTool/Xperifirm
EG:
ta
nvram
nvdata
protect_f
protect_s
When you have what you need Unlock the bootloader officially.
Convert your boot.elf to boot.img have Magisk patch the new boot.img and flash it via fastboot.
If you need more detail please provide more such as your device etc it make helping easier. :good:
Click to expand...
Click to collapse
Thanks for the help, I have a Sony Xperia XA1 with android 8.0. Do you know of any tutorial I can follow? I need to root with magisk to be able to hide the root.
leonardo.teseyra said:
Thanks for the help, I have a Sony Xperia XA1 with android 8.0. Do you know of any tutorial I can follow? I need to root with magisk to be able to hide the root.
Click to expand...
Click to collapse
Backup your ta partition then unlock your bootloader using Sonys official method.
Flash the boot and recovery for your device which are located in this thread HERE
Format your data again with TWRP and flash magisk thats it your done.
To revert your devices back to 100% stock dd back your ta backup and reflash the 100% stock ROM using FlashTool or maybe Sonys official tool.
bigrammy said:
Backup your ta partition then unlock your bootloader using Sonys official method.
Flash the boot and recovery for your device which are located in this thread HERE
Format your data again with TWRP and flash magisk thats it your done.
To revert your devices back to 100% stock dd back your ta backup and reflash the 100% stock ROM using FlashTool or maybe Sonys official tool.
Click to expand...
Click to collapse
How can I backup my TA partition?. I have root access but I can't find /ta any where

flash potter on xt1687 retus?

Just got the xt1687 usa model retus software channel... Is it safe to flash potter roms on here?
itcanbdone said:
Just got the xt1687 usa model retus software channel... Is it safe to flash potter roms on here?
Click to expand...
Click to collapse
What firmware? 7.0 or 8.1? If you are on 8.1 it's as safe as it ever is to flash a custom ROM.
If you're still on 7.0 you should update first and in any case make a full nandroid backup incl. Persist and EFS before you flash anything.
Sent from my Moto G5 Plus using XDA Labs
Currently on 7.0 so unlock bootloader n twrp after update? Thanks
itcanbdone said:
Currently on 7.0 so unlock bootloader n twrp after update? Thanks
Click to expand...
Click to collapse
Yes. If you can update via OTA that should be the way to go. If you can't flash full Motorola signed fastboot 8.1 firmware:
https://mirrors.lolinet.com/firmware/moto/potter/official/
Unlock the BL on Motorola website, boot to or flash TWRP and make a full nandroid incl. persist.
After that you shoud be good to go and flash custom ROMS. Check whether the selected ROM needs 7.0 or 8.1 as base, almost all of them need stock Oreo.
Sent from my Moto G5 Plus using XDA Labs
Oh yeah, I'm rusty.. Software channel duh, linux gets its stuff there... I guess it is potter xt1687, which is odd though as a website said it wasn't potter.. Anyway, looking in the gsm arena and checking against other variants of our g5 plus, it seems that everything but the radios are the same so is it safe to flash variants backing up the original radio? Thank you very much
itcanbdone said:
Oh yeah, I'm rusty.. Software channel duh, linux gets its stuff there... I guess it is potter xt1687, which is odd though as a website said it wasn't potter.. Anyway, looking in the gsm arena and checking against other variants of our g5 plus, it seems that everything but the radios are the same so is it safe to flash variants backing up the original radio? Thank you very much
Click to expand...
Click to collapse
You wrote you're on the retus channel and model is 1687. Here are the firmwares for your device, the second one ( OPS28.85-17-6-2) is the latest and last build, flash that one and everything should be fine:
https://mirrors.lolinet.com/firmware/moto/potter/official/RETUS/
You still know how to fastboot flash? Unzip firmware to ADB/Fastboot folder etc.?
Here's a post I made for someone else, it includes a link to a flashall.bat, put in in there too so you don't have to manually flash all partitions, just double-click it and it'll run all the commands for you.
https://forum.xda-developers.com/g5...solve-imei0-explanation-t3825147/post80478329
Sent from my Moto G5 Plus using XDA Labs
So I was on stock and flashed twrp after successful unlock of bootloader. After backing up, got stuck at bootloader before any further changes made, yet it was booting fine with bootloader before that.. Saw in a post to flash stock after re locking bootloader, then unlick again...
I skipped that just to get a rom on, now running havoc 9.0 but cannot seem to root as the two su & magisk arent cuttin it in twrp.
Are you really telling me I gotta revert back to stock and flash root in stock to get root?
If so, couldnt i just flash havoc 8.1 and root that way.
Yes i still remember how to flash via adb. Thank you very much
itcanbdone said:
So I was on stock and flashed twrp after successful unlock of bootloader. After backing up, got stuck at bootloader before any further changes made, yet it was booting fine with bootloader before that.. Saw in a post to flash stock after re locking bootloader, then unlick again...
I skipped that just to get a rom on, now running havoc 9.0 but cannot seem to root as the two su & magisk arent cuttin it in twrp.
Are you really telling me I gotta revert back to stock and flash root in stock to get root?
If so, couldnt i just flash havoc 8.1 and root that way.
Yes i still remember how to flash via adb. Thank you very much
Click to expand...
Click to collapse
I'm not sure that I understand everything. After flashing (official) TWRP and making a nandroid you weren't able to boot to system, only to bootloader?
Have you updated to 8.1 stock Oreo before?
Havoc needs that definitely:
https://forum.xda-developers.com/g5-plus/development/rom-havoc-os-v2-2-t3906282/post79018816
It won't make any sense to revert to stock and root it because after flashing havoc root will be lost anyway. What do you mean with "the two su & Magisk aren't cuttin it in TWRP"? (English is not my native language)
Why two? There should be magisk only to flash.
So the goal seems to be making TWRP work correctly when running havoc to be able to flash magisk.zip and boot to system.
Can you post a recovery log after the attempt to flash magisk from TWRP (the function is in TWRP/ advanced/log.)
Can you boot to havoc directly now?
Are you able to reach TWRP?
I need the error message that appears when you try to flash magisk, should be in the log.
And what is it about two things, su AND magisk?
Magisk.zip is the su binary.
Please provide some more information and sorry if it's me who don't understand something.
Sent from my Moto G5 Plus using XDA Labs
- I got root after all. Seems I was just flashing no verity before root and it was suppise to be after.
- there was a super su which I'd rather have to mod things with but neither worked until i figured out as mentioned above
- now I'm trying to get gaps to work..
- also having problem flashing rom withou encryption, it keeps forcing it encrypted.
- here is link to 3 images of what i've got currently:
https://mega.nz/#F!q3pVQIDJ!kwfNgjMEEssa97rrZJjWHg
Thanks
itcanbdone said:
- I got root after all. Seems I was just flashing no verity before root and it was suppise to be after.
- there was a super su which I'd rather have to mod things with but neither worked until i figured out as mentioned above
- now I'm trying to get gaps to work..
- also having problem flashing rom withou encryption, it keeps forcing it encrypted.
- here is link to 3 images of what i've got currently:
https://mega.nz/#F!q3pVQIDJ!kwfNgjMEEssa97rrZJjWHg
Thanks
Click to expand...
Click to collapse
Never use SuperSU alongside with magisk but I think you know that now.
To remove encryption: It's not enough to wipe data in TWRP, you have to format it (the option where you have to confirm with "Yes" and not just wipe). That will wipe your internal storage too.
Only formatting data in TWRP will remove the encryption and the Disable_Dm-Verity_ForceEncrypt_02.04.2019.zip will keep it decrypted. Make sure usb debugging is enabled.
Boot to TWRP and flash ROM and Gapps (both in one action without a reboot in between).
Now flash the no verity-force encryption.zip.
You can reboot to system now but you can also flash the magisk.zip directly afterwards, it helps to keep the data partition encrypted too.
I flash everything in a row.
Check that thread: https://forum.xda-developers.com/g5-plus/how-to/guide-how-to-remove-device-encryption-t3863586
(page 2)
Sent from my Moto G5 Plus using XDA Labs
Thanks for the encryption link.. Any idea on the pros n cons on encryption in the world of flashing zips and modding?
I see pros n cons on google search for encryption but not from developments perspective
itcanbdone said:
Thanks for the encryption link.. Any idea on the pros n cons on encryption in the world of flashing zips and modding?
I see pros n cons on google search for encryption but not from developments perspective
Click to expand...
Click to collapse
I decrypt my device, for example to have access to /data in case of a bootloop because of a magisk module. I don't like the idea of not physically seeing parts of my partitions or even not being able to edit it.
From the sight of security it's better to encrypt naturally. It depends a bit how old your device is and what you want to do with it.
I never lost my device or it was getting stolen so as long it's in my pocket I don't need encryption.
But that's just my personal opinion.
Sent from my Moto G5 Plus using XDA Labs
Hey so I found a really cool way to decrypt but ROM after it's already been encrypted and you have all your stuff in it, I figured it out on accident. What I did was simply did a backup through TWRP and formatted the drive. When I restored the drive it was decrypted! And all this time everyone ever told me that you cannot decrypt. Pretty cool. Actually found this out by switching to a ROM and then going back anyway maybe people should know this? Hope it helps thanks for all the pointers

[HELP] I lost WIDEVINE L1 and safetynet checks in the custom ROMs

Hi guys,
I have a problem with my device. I recently had a problem with the sensors and I flash the persist.img of fastboot rom with twrp.
I lost WIDEVINE L1 and safetynet checks (only with ROM customs and without ROOT). I would like to know if there is a way to go back and "uncorrupt" the internal storage?
isman77 said:
Hi guys,
I have a problem with my device. I recently had a problem with the sensors and I flash the persist.img of fastboot rom with twrp.
I lost WIDEVINE L1 and safetynet checks (only with ROM customs and without ROOT). I would like to know if there is a way to go back and "uncorrupt" the internal storage?
Click to expand...
Click to collapse
No l1 is gone forever, sorry mate
Doesn't it bring the Global Rom "davinci_global_images_V10.3.11.0.PFJMIXM_20190802.0000.00_9.0_global_ea6683ef55.tgz" 3.3GB with MI PC Suite to flash?
And bring the phone back to its original state?
spedyy said:
Doesn't it bring the Global Rom "davinci_global_images_V10.3.11.0.PFJMIXM_20190802.0000.00_9.0_global_ea6683ef55.tgz" 3.3GB with MI PC Suite to flash?
And bring the phone back to its original state?
Click to expand...
Click to collapse
I have not tried with the MI PC suite, by cons I tried several times with Mi flash, without success ...
In your opinion, should I try with MI PC SUITE?
Benfatica said:
No l1 is gone forever, sorry mate
Click to expand...
Click to collapse
I tell myself that maybe with luck someone has a solution ...
Did you try the FASTBOOT file .tgz or the RECOVERY .zip?
There is no hope for us. Sorry
Wysłane z mojego Mi 9T przy użyciu Tapatalka
I'm sorry, I can't help but as someone who is looking at flashing a rom tomorrow, how do I avoid this from happening?
I would still like to use Netflix
spedyy said:
Doesn't it bring the Global Rom "davinci_global_images_V10.3.11.0.PFJMIXM_20190802.0000.00_9.0_global_ea6683ef55.tgz" 3.3GB with MI PC Suite to flash?
And bring the phone back to its original state?
Click to expand...
Click to collapse
It will flash back to factory settings and reset everything, I would backup and restore after doing so, with widevine though that will stay at level 3 and no chance of getting L1 back ever.
---------- Post added at 12:07 AM ---------- Previous post was at 12:01 AM ----------
BJozi said:
I'm sorry, I can't help but as someone who is looking at flashing a rom tomorrow, how do I avoid this from happening?
I would still like to use Netflix
Click to expand...
Click to collapse
Don't flash persist.img unless it's from your phone, backup with twrp, you could even connect the phone to your PC and copy the persist.img file to your PC and use that if anything happened, the problem is people are extracting the persist.img file from the ROM and it's not the original file for the phone and flashing to correct faulty sensors, this breaks widevine and doesn't restore regardless if a ROM supports it, the phone doesn't anymore because it's now basically corrupt and can't be restored unless using the original persist.img.
I'm not sure I fully understand.
So I've unlocked my bootloader, I'm about to flash Twrp and a custom rom such as Pixel Experience or Havoc.
Am I right in saying this will have broken it already?
Before flashing I should backup everything in Twrp, I can then reviver only the persist part after flashing a room and things will be as normal but with a different rom?
I made a backup of ALL partitions (including the partition persist) 3 months ago that I transferred to my PC and that I later deleted, if I manage to find it with software like Recuva and restoring with TWRP, would it work?
isman77 said:
I made a backup of ALL partitions (including the partition persist) 3 months ago that I transferred to my PC and that I later deleted, if I manage to find it with software like Recuva and restoring with TWRP, would it work?
Click to expand...
Click to collapse
I would say yes if you have the original files, you can try with those, if flashing from stock ROM that didn't belong to your phone then it won't work.
isman77 said:
Hi guys,
I have a problem with my device. I recently had a problem with the sensors and I flash the persist.img of fastboot rom with twrp.
I lost WIDEVINE L1 and safetynet checks (only with ROM customs and without ROOT). I would like to know if there is a way to go back and "uncorrupt" the internal storage?
Click to expand...
Click to collapse
how did you flash persist.img? i dont use netflix anyways and same thing happened to me that happened to you, i just want to get persist.img back, help?
I also lost it for the same sensors fix reason.
Has anyone tried restoring a twrp backup from a working L1 device?
Can someone with untouched persist that still has L1 upload a twrp backup of their persist partition, please?
It probably won't work as the l1 keys are linked to each device individually but we lose nothing for trying.
bihariel said:
I also lost it for the same sensors fix reason.
Has anyone tried restoring a twrp backup from a working L1 device?
Can someone with untouched persist that still has L1 upload a twrp backup of their persist partition, please?
It probably won't work as the l1 keys are linked to each device individually but we lose nothing for trying.
Click to expand...
Click to collapse
Have flash any persist image from the fastboot ROM?
Yep, that's what I did. I didn't know that would break L1 but I wasn't using it anyway.
bihariel said:
Yep, that's what I did. I didn't know that would break L1 but I wasn't using it anyway.
Click to expand...
Click to collapse
Then it's gone, you can't fix it
I know, but has anyone tried what I suggested?
bihariel said:
I know, but has anyone tried what I suggested?
Click to expand...
Click to collapse
Yes.
Hello,
In your opinion does the xiaomi warranty take care of this problem?

WideVine L1 lost after installing custom ROM on Q firmware

HELP!!!!! I installed the latest Android 10 build (Developer V2). Then unlocked bootloader and installed TWRP and then Evolution X.
Now Widevine L1 is lost!!! Please help me with any damn method to get it back. Will do ANYTHING to get it back....
keshavjain235 said:
HELP!!!!! I installed the latest Android 10 build (Developer V2). Then unlocked bootloader and installed TWRP and then Evolution X.
Now Widevine L1 is lost!!! Please help me with any damn method to get it back. Will do ANYTHING to get it back....
Click to expand...
Click to collapse
Do you have the backup of persist partition when your phone was L1 ? If yes, then try restoring it.
Tianhe said:
Do you have the backup of persist partition when your phone was L1 ? If yes, then try restoring it.
Click to expand...
Click to collapse
No I don't have. I have searched in various telegram groups to take persist backup on someone else (same device) and change serial number in it? Should I try that? There were people complaining that they were not able to install/update stock rom after doing this process. Please GUIDE, I am a beginner in these things....
keshavjain235 said:
No I don't have. I have searched in various telegram groups to take persist backup on someone else (same device) and change serial number in it? Should I try that? There were people complaining that they were not able to install/update stock rom after doing this process. Please GUIDE, I am a beginner in these things....
Click to expand...
Click to collapse
You could try that but I am not sure if that would restore the wiped DRM keys. In some phones (Moto G5 Plus?), backup of persist from other phones would do no good.
Also you can try flashing stock ROM through AFT and see if it helps you.
An please REMEMBER TO TAKE BACKUP before attempting any of the above methods.
Tianhe said:
You could try that but I am not sure if that would restore the wiped DRM keys. In some phones (Moto G5 Plus?), backup of persist from other phones would do no good.
Also you can try flashing stock ROM through AFT and see if it helps you.
An please REMEMBER TO TAKE BACKUP before attempting any of the above methods.
Click to expand...
Click to collapse
Already tried flashing stock rom via AFT, but Widevine stays at L3. I am not risking to flash persist of other device as it may lead to further issues. Please let me know if there is some more efficient way out of this issue. Thanks.
I heard flashing q firmware permanently causes issues with widevine l1. The only way to bring it back is to restore a previous persist backup or flash a qfil rom (not sure about the latter). If you don't have a backup, too bad chief.
farhanshaikh671 said:
I heard flashing q firmware permanently causes issues with widevine l1. The only way to bring it back is to restore a previous persist backup or flash a qfil rom (not sure about the latter). If you don't have a backup, too bad chief.
Click to expand...
Click to collapse
Partially correct. QB1 update caused widevine downgrade to L3 but QB2 restored it to L1. Of course, you have to be bootloader locked all the time. Too many theories going around to restore L1 on UBL but none proven, even persist backup method isn't 100%
how to install qb2 bro please help need widevine
Tianhe said:
Partially correct. QB1 update caused widevine downgrade to L3 but QB2 restored it to L1. Of course, you have to be bootloader locked all the time. Too many theories going around to restore L1 on UBL but none proven, even persist backup method isn't 100%
Click to expand...
Click to collapse
how to install qb2 and iam trying qfil
parvez1119eee said:
how to install qb2 and iam trying qfil
Click to expand...
Click to collapse
mine too lost L1 certification after flashing Havoc os latest build 3.5, also charging issue, charges very slow, apprx. 5-6 hrs for fullcharge my asus.
parvez1119eee said:
how to install qb2 bro please help need widevine
how to install qb2 and iam trying qfil
Click to expand...
Click to collapse
After installing QFIL rom did L1 comes back.

Rollback Android 11 -> 10 results in Widevine L3 on Poco F2 Pro

Summary of the thread:​ANDROID 11 XIAOMI.EU ROMS AS OF CURRENT CORRUPT PERSIST PARTITION.
IF YOU HAVE LOST YOUR PERSIST BACKUP - COPYING PERSISTBAK TO PERSIST IS THE WAY, BUT REQUIRES CALIBRATION AFTERWARDS.
Original post:​After spending some time with latest xiaomi.eu weekly I have finally decided to downgrade my phone back to Android 10.
First I've tried fastboot flashing CN 12.0.8.0 with subsequent recovery flash of xiaomi.eu stable 12.0.8.0 which is the latest stable Android 10 firmware.
However, to my surprise DRM Info showed Widevine L3.
Passwords & security -> Fingerprint unlock -> Fignerprint payments -> Widevine (L1) had:
Payment status - Not available
Certificate number - 0
Certificate update -
Pressing Download certificate resulted in Couldn't download certificate. Error code: 1.
Netflix also reported Widevine L3.
At this point I thought that maybe xiaomi.eu didn't have Widevine L1 support for my device back then, so I've tried latest xiaomi.eu weekly which still had Android 10 - 20.7.9.
Unfortunately, same story with that one.
Reading changelogs made me think that maybe support for Widevine L1 appeared only on Android 11 xiaomi.eu lmi releases, so I went for stock firmwares.
I've tried EEA 11.0.6.0 (I think this is the one I've had out of the box), EEA 12.0.3.0 and Global 12.0.4.0 all of which had Widevine L3. The earliest one didn't even have option for downloading Widevine certificate.
As soon as I've updated back to Android 11, I had my Widevine L1 restored, which makes me think that it is impossible to rollback Android version on Poco F2 Pro without loosing Widevine L1.
I've never tampered with persist or persistbak partitions. Maybe flashing persist with persistbak would solve my issues on lower firmwares?
Would be great if someone could confirm that.
So think twice before upgrading to Android 11. Mostly it's about improving DRM (hardware SafetyNet attestation, /data/ encryption, system components wrapped in .apex format files) with lots of features broken on MIUI (3rd party launchers are still kinda broken, though working, they have no support for custom recents menu and default one lags when used with non-default launcher).
It doesn't even have a proper documentation of changes that are required for old applications to work on it (most of them regarding permissions).
Originally my phone was in android 10 with Widevine L1.( V12.0.1.0.QJKMIXM )
I installed EU,Aosp,stock(android 10/11) roms and I always kept Widevine L1.
You may have gone a little too far in downgrade.
Regarding the stock roms, I always used Miflash.(because zip firmware,sometimes doesn't work with twrp).
.
NOSS8 said:
I installed EU,Aosp,stock(android 10/11) roms and I always kept Widevine L1.
Click to expand...
Click to collapse
This is strange, since I never messed with persist partition which is what determines Widevine. Yet my experience is not quite the same as yours.
NOSS8 said:
You may have gone a little too far in downgrade.
Click to expand...
Click to collapse
I've mentioned that, but let me reiterate, I've tried both the earliest (11.0.6.0.QJKEUXM) and latest (V12.0.3.0.QJKEUXM) available EEA official ROM that is still Android 10. Also I've tried latest available Android 10 Global ROM (12.0.4.0.QJKMIXM). No avail.
NOSS8 said:
Regarding the stock roms, I always used Miflash.(because zip firmware,sometimes doesn't work with twrp).
Click to expand...
Click to collapse
Not an issue in my case, since as I said, I've been flashing using fastboot, which mitigates recovery altogether.
Edit:
It appears I am not the only one, but it doesn't look like there is a solution unfortunately.
there have been some post about the loss of the L1 widevine with the first TWRPs also in root cases.
try with miflash ,Just to confirm..
In the rom fastboot (tgz) there is the perstist img
NOSS8 said:
there have been some post about the loss of the L1 widevine with the first TWRPs also in root cases.
try with miflash ,Just to confirm..
Click to expand...
Click to collapse
I don't have TWRP and never used it to flash but whatever, just for the sake of it, I've tried flashing with MiFlash the very same fastboot rom I flashed previously (lmi_eea_global_images_V12.0.3.0.QJKEUXM_20200923.0000.00_10.0_eea). Clean all - flash_all.bat.
Checked DRM Info - Widevine L3.
Fingerprint payments - same as before.
NOSS8 said:
In the rom fastboot (tgz) there is the perstist img
Click to expand...
Click to collapse
Yeah, I did notice that, but as far as I am concerned, it is not used in the flashing process. Upon inspecting flash_all.bat script I didn't find it mentioned at all!
P.S. Ignore red error message, I didn't want to lock the bootloader, so it didn't get to the checkpoint in the .bat file where it actually does that.
AlexJi said:
I don't have TWRP and never used it to flash but whatever, just for the sake of it, I've tried flashing with MiFlash the very same fastboot rom I flashed previously (lmi_eea_global_images_V12.0.3.0.QJKEUXM_20200923.0000.00_10.0_eea). Clean all - flash_all.bat.
Checked DRM Info - Widevine L3.
Fingerprint payments - same as before.
Yeah, I did notice that, but as far as I am concerned, it is not used in the flashing process. Upon inspecting flash_all.bat script I didn't find it mentioned at all!
P.S. Ignore red error message, I didn't want to lock the bootloader, so it didn't get to the checkpoint in the .bat file where it actually does that.
Click to expand...
Click to collapse
https://c.mi.com/thread-3260759-1-0.html
NOSS8 said:
https://c.mi.com/thread-3260759-1-0.html
Click to expand...
Click to collapse
It doesn't work, I've already wrote in the first post that "Pressing Download certificate resulted in Couldn't download certificate. Error code: 1."
Also check out my second screenshot.
Also read the last comment in the link you've provided.
AlexJi said:
It doesn't work, I've already wrote in the first post that "Pressing Download certificate resulted in Couldn't download certificate. Error code: 1."
Also check out my second screenshot.
Also read the last comment in the link you've provided.
Click to expand...
Click to collapse
I know, I saw afterwards.
I used this rom V12.0.3.0 in global and I had the L1 widevine.
maybe your phone that has a problem.
NOSS8 said:
I know, I saw afterwards.
I used this rom V12.0.3.0 in global and I had the L1 widevine.
maybe your phone that has a problem.
Click to expand...
Click to collapse
That's the thing, I also remember having that version prior to updating to Android 11 and having Widevine L1 intact.
AlexJi said:
That's the thing, I also remember having that version prior to updating to Android 11 and having Widevine L1 intact.
Click to expand...
Click to collapse
Is it an EEA or Global version?
NOSS8 said:
Is it an EEA or Global version?
Click to expand...
Click to collapse
It was EEA version. Back then there was no Android 11 for EEA/Global and I was only using OTA updates.
AlexJi said:
It was EEA version. Back then there was no Android 11 for EEA/Global and I was only using OTA updates.
Click to expand...
Click to collapse
Mine is a global one.
Maybe try to flash only global versions.(with miflash ).
Eu roms are better than stock.
NOSS8 said:
Mine is a global one.
Maybe try to flash only global versions.(with miflash ).
Click to expand...
Click to collapse
It's all the same. Apparently miflash doesn't do much apart from starting flash_all.bat script with provided minimal adb.
NOSS8 said:
Eu roms are better than stock.
Click to expand...
Click to collapse
That's true, but it doesn't solve my issue, since I have absolutely the same experience with eu stable and weeklies that are Android 10.
zip file
AlexJi said:
It's all the same. Apparently miflash doesn't do much apart from starting flash_all.bat script with provided minimal adb.
That's true, but it doesn't solve my issue, since I have absolutely the same experience with eu stable and weeklies that are Android 10.
Click to expand...
Click to collapse
Some people had lost the FOD due to bad handling, only miflash was able to get it back.
Tgz files are much bigger than zips and this is not a coincidence.
AlexJi said:
After spending some time with latest xiaomi.eu weekly I have finally decided to downgrade my phone back to Android 10.
First I've tried fastboot flashing CN 12.0.8.0 with subsequent recovery flash of xiaomi.eu stable 12.0.8.0 which is the latest stable Android 10 firmware.
However, to my surprise DRM Info showed Widevine L3.
Passwords & security -> Fingerprint unlock -> Fignerprint payments -> Widevine (L1) had:
Payment status - Not available
Certificate number - 0
Certificate update -
Pressing Download certificate resulted in Couldn't download certificate. Error code: 1.
Netflix also reported Widevine L3.
At this point I thought that maybe xiaomi.eu didn't have Widevine L1 support for my device back then, so I've tried latest xiaomi.eu weekly which still had Android 10 - 20.7.9.
Unfortunately, same story with that one.
Reading changelogs made me think that maybe support for Widevine L1 appeared only on Android 11 xiaomi.eu lmi releases, so I went for stock firmwares.
I've tried EEA 11.0.6.0 (I think this is the one I've had out of the box), EEA 12.0.3.0 and Global 12.0.4.0 all of which had Widevine L3. The earliest one didn't even have option for downloading Widevine certificate.
As soon as I've updated back to Android 11, I had my Widevine L1 restored, which makes me think that it is impossible to rollback Android version on Poco F2 Pro without loosing Widevine L1.
I've never tampered with persist or persistbak partitions. Maybe flashing persist with persistbak would solve my issues on lower firmwares?
Would be great if someone could confirm that.
So think twice before upgrading to Android 11. Mostly it's about improving DRM (hardware SafetyNet attestation, /data/ encryption, system components wrapped in .apex format files) with lots of features broken on MIUI (3rd party launchers are still kinda broken, though working, they have no support for custom recents menu and default one lags when used with non-default launcher).
It doesn't even have a proper documentation of changes that are required for old applications to work on it (most of them regarding permissions).
Click to expand...
Click to collapse
RECAP
MIUI 12 12.0.4.0 indonesian android 10 widewine is L1 ----- OTA update to 12.2.2.0 indonesian android 11 windewine is L1 --- downgrade to 12.0.4.0 indonesian android 10 windewine is still L1.
MIUI 12 12.0.4.0 indonesian android 10 widewine is L1 ----- Flashed Xiaomi.eu latest WEEKLY 21.2.4 android 11 widewine is L1 ---- downgrade to 12.0.4.0 indonesian causing lost widewine and showing L3.
Same as yours ---- Passwords & security -> Fingerprint unlock -> Fignerprint payments -> Widevine (L1) had:
Payment status - Not available
Certificate number - 0
Certificate update -
Pressing Download certificate resulted in Couldn't download certificate. Error code: 1.
It only happen on latest xiaome.eu to me, early version of xiaomi.eu rom was fine and L1 was there in downgrade to android 10.
Anyway i restore my original persist and persistbak and problem solved
Dadovvv said:
It only happen on latest xiaome.eu to me, early version of xiaomi.eu rom was fine and L1 was there in downgrade to android 10.
Anyway i restore my original persist and persistbak and problem solved
Click to expand...
Click to collapse
Oho, so what actually happens is that xiaomi.eu roms corrupt persist partition despite that they are flashed using recovery?
And if I don't have persist.img backup, I am basically screwed in terms of returning to Android 10 with Widevine L1 certification? Or is flashing persistbak.img to persist partition would be sufficient to revert the damage? I've noticed that persistbak has much less files than persist.
AlexJi said:
Oho, so what actually happens is that xiaomi.eu roms corrupt persist partition despite that they are flashed using recovery?
And if I don't have persist.img backup, I am basically screwed in terms of returning to Android 10 with Widevine L1 certification? Or is flashing persistbak.img to persist partition would be sufficient to revert the damage? I've noticed that persistbak has much less files than persist.
Click to expand...
Click to collapse
Persististbak is same as persist on stock ROM u have persist.img and persistbak.img and it's absolutely same file.
And yes latest xiaomi.eu ROM have something new in therms of widewine L1 so it editp persistimg I think
Dadovvv said:
Persististbak is same as persist on stock ROM u have persist.img and persistbak.img and it's absolutely same file.
And yes latest xiaomi.eu ROM have something new in therms of widewine L1 so it editp persistimg I think
Click to expand...
Click to collapse
Il let u know how many kB have original persist img from Indonesian ROM, but if u have different size probably persist.img is from xiaomi.eu and persistbak.img your original
EDIT : original persist.img in Indonesian is 65,536 KB
Dadovvv said:
Persististbak is same as persist
Click to expand...
Click to collapse
Not in my case. My persistbak seems to hold its original files, while persist clearly was modified.
Can you confirm how your original persist partition (the one you've backed up) looks like?
Here is a screenshot of my persist and persistbak contents.

Categories

Resources