Brick Protection? - Xiaomi Mi Max 2 Questions & Answers

Hi,
I just ordered my Mi Max 2 128GB. The seller flashed the global rom on it.
I wonder which system files I should backup to my pc first before I install anything, so if I brick
my phone one day, I will be able to unbrick it?
Thanks

Well your phone could mostly brick if you unlock it, install custom ROM, root, etc... Also, backing up your phone completely, even the system, it would require again unlocking and instaling TWRP custom recovery which if i'm not wrong at the moment the only thing capable of backing up all the partitions on Xiaomi phones. Someone, correct me if i'm wrong.

First have MiFlash with driver and Fastboot ROM, zip of TWRP and then backup everything. This can help you with soft brick. Hard brick requires opening and touching the contact points, using EDL to flash rom, then TWRP and then your saved ROM.

requires root
use Partition Backup by wanam (playstore), ensure you have enough space in your main storage (not the external sdcard)
(save as both .img & tar.gz, plus the 1st 100MB - see 'spanner tool')
Backup every partition, except the System and Data partition.
The partitions hold IMEI, wifi mac addresses, phone serial number which is exclusive to the phone. Doubt anyone, including Xiaomi support could restore them.
Follow this guide to backup your QCN (imei numbers)
Store all files from above at safe location #1, plus another location #2.
Brick happens all the time, including flashing official Xiaomi updates, even if phone is not rooted, bootloader locked. Many such cases on the net.
So, a backup is the safest option.
It's the 1st thing I did after receiving a new phone. 2nd step is to calibrate the battery.
It is YOUR responsibility to backup your phone essential partitions. Sometimes, official OTA updates are botched, or the phone is low battery during flash, or simply bad luck.

Related

[Q] Bootloader Locking/Unlocking, Stock ROM Backup with minimum changes

Hello people. Recently i got my first qualcomm device redmi-4x (v8.2.12.0) global (previously i used/worked-for mtk devices), and from past few days i have been reading/learning about this qualcomm device.
I have checked almost all redmi-4x forums (miui, xda, 4pda etc) and still have some questions in my mind.
Q1:
I want to backup my redmi-4x before unlocking/rooting/FlashingTWRP. I know in mtk devices, even if the device is unrooted/untouched we can easily backup firmware/complete-emmc (each and every partition) by readback methods using SP-FlashTool/Miracle-Box etc...
i read somewhere, we can do same thing, i.e readback qualcomm device's emmc in edl-mode but unfortunately, xiaomi has disabled fastboot edl mode in new devices and the only way left to open edl mode is test point method which requires disassembly. though i can but i don't want to disassemble it (warranty will be void). Another solution i saw was Deep Flash Cable, which isn't working either, personally tested... Now, having no other option, i decided to unlock it to make stock rom backup using TWRP. Actually i wanted to make backup with minimum changes to original firmware, so if anyone here knows any other solution to make backup without unlocking bootloader, (or unlocked_bootloader + no_other_changes, i.e without TWRP) please share... Thanks!
Q2:
From what i have learned so far, i think MiUI bootloader unlock tool doesn't work with non-miui firmwares, right? so the question is, if we manually relock our redmi 4x using fasboot when there is some non-miui rom installed in the device. what can be the possible solution to unlock it again? (except reflashing miui by test point method and then unlocking bootloader). Thanks!
EnerJon said:
i wanted to make backup with minimum changes to original firmware, so if anyone here knows any other solution to make backup without unlocking bootloader, (or unlocked_bootloader + no_other_changes, i.e without TWRP) please share... Thanks!
Click to expand...
Click to collapse
Hi, I do it this way:
- unlocked bootloader
- copy http://www.mediafire.com/file/pj0qh1ccj4h2a2a/p0.zip to FAT32 flash drive
- fastboot boot twrp.img (TWRP is not flashed, boots from RAM, not eMMC, so no_other_changes)
- attach the flash drive to R4X on OTG adapter
- in TWRP "install" p0.zip
- entire eMMC will be compressed and saved on the flash drive
My new R4X 32GB was compressed down to 2GB within around half an hour. Later I mounted the disk image on a PC and erased OS/data partitions: system, cache, userdata, cust, recovery, boot, and now the entire 32GB with bootloader, support and firmware is 80MB compressed.
Have you tried QPST backup in EDL mode?
k23m said:
- unlocked bootloader
- copy http://www.mediafire.com/file/pj0qh1ccj4h2a2a/p0.zip to FAT32 flash drive
- fastboot boot twrp.img (TWRP is not flashed, boots from RAM, not eMMC, so no_other_changes)
- attach the flash drive to R4X on OTG adapter
- in TWRP "install" p0.zip
- entire eMMC will be compressed and saved on the flash drive
My new R4X 32GB was compressed down to 2GB within around half an hour. Later I mounted the disk image on a PC and erased OS/data partitions: system, cache, userdata, cust, recovery, boot, and now the entire 32GB with bootloader, support and firmware is 80MB compressed.
Click to expand...
Click to collapse
Thanks for The Guide, it Will Surely be Helpful for New R4X Users :good: Just Wondering Why No One Made Such a Guide For R4X Earlier... Or Did i Missed it Somewhere?
k23m said:
Have you tried QPST backup in EDL mode?
Click to expand...
Click to collapse
No, But i Used another Tool Which i Think Uses Same Technique as QPST in EDL Mode. i Unlocked My R4X and Then Booted into EDL Mode, Used This Tool (With "prog_emmc_firehose_8937_ddr.mbn" From R4X Fastboot Firmware) To Take Complete EMMC Backup, it Also Converted The Backup into Fastboot ROM...
EnerJon said:
Thanks for The Guide, it Will Surely be Helpful for New R4X Users :good: Just Wondering Why No One Made Such a Guide For R4X Earlier... Or Did i Missed it Somewhere?
Click to expand...
Click to collapse
I made the guide and script for Nexus 7'13 but it works well on R4X too. There is no known method of QPST backup on the Nexus but Xiaomi always had more options thanks to freely available "firehose" files. Thank you for the emmcdl link, it is a very simple and convenient tool.
We could use emmcdl for unlocking. I found some pre-patched "persist" partitions here http://blog.regenerationmm.com/2017/03/emmc-dl-အသုံးျပဳျပီး-mi-account-bypass-ျပဳလုပ္/
:highfive:
k23m said:
I made the guide and script for Nexus 7'13 but it works well on R4X too. There is no known method of QPST backup on the Nexus but Xiaomi always had more options thanks to freely available "firehose" files. Thank you for the emmcdl link, it is a very simple and convenient tool.
We could use emmcdl for unlocking. I found some pre-patched "persist" partitions here http://blog.regenerationmm.com/2017/03/emmc-dl-အသုံးျပဳျပီး-mi-account-bypass-ျပဳလုပ္/
:highfive:
Click to expand...
Click to collapse
Hello. Do you have more information on this? I have a Redmi 4x that I really want to unlock the bootloader, but the official method doesn't work for me.
I found this site showing a method for the redmi 4a that uses the emmcdl tool:
Rolex Instant UBL (Unofficial Unlock Bootloader for Redmi 4A) Tested! - OmBob Opreker
Complete Tutorial how to bypass your Redmi 4A (rolex) lock bootloader, the unofficial way. tested And Work for all rolex version
ombob.my.id
Is this what you mentioned?
unluckyuser said:
Hello. Do you have more information on this? I have a Redmi 4x that I really want to unlock the bootloader, but the official method doesn't work for me.
I found this site showing a method for the redmi 4a that uses the emmcdl tool:
Rolex Instant UBL (Unofficial Unlock Bootloader for Redmi 4A) Tested! - OmBob Opreker
Complete Tutorial how to bypass your Redmi 4A (rolex) lock bootloader, the unofficial way. tested And Work for all rolex version
ombob.my.id
Is this what you mentioned?
Click to expand...
Click to collapse
Hi, I have files from the defunct link, but never tested them as my R4X is unlocked officially.
The R4A is indeed using the unlock method I speculated about.
k23m said:
Hi, I have files from the defunct link, but never tested them as my R4X is unlocked officially.
The R4A is indeed using the unlock method I speculated about.
Click to expand...
Click to collapse
I would like to have the files and experiment, thank you.
I already messed up my phone and I'm trying to flash the stock rom via edl first.

ZUK Z2 Pro persist.img files flashable by twrp / adb

Hi mates,
here we go with the persists.img for Lenovo ZUK Z2 Pro.
So if you deleted them by accident you can try to reflash these:
new added file host for all files: https://www.androidfilehost.com/?w=files&flid=243937
persist.img ZUI 1.9.104:
https://mega.nz/#!0dxzwRrD!0DjKphWCRU-vv4yb1clTqrppVPGzbdaLEc4P7ItX6Ek
persist.img ZUI 2.3.044:
https://mega.nz/#!9QAE3J4I!wMNuXJ9430ihNKUgAmfJJqaB7a13v8qHtTGhCb-3hOE
persist.img ZUI 2.5.462:
https://mega.nz/#!MVZEnQCb!KvKYcHFdxvQEjlRC3zKsvQH316YY3iyNJEV3HE63cDU
persist.img ZUI 3.1.194:
https://mega.nz/#!oURh0ARA!JvliKwO6-bvdobG1qZoXg9CrH1u0zmtLsjFuoCIBoFk
persist.zip FLASHABLE zip ZUI 4.0.233 ST:
https://mega.nz/#!8RJ3hCpS!8cjVHyoOoa6yg9uvgTht71WB1CVCNoQi07GEZMxUR6M
All credits to @crisps
WARNING: these files are not tested. All use to your own risk.
Anyway if you accidentially deleted your persist partition it is worth a try
Flashable by fastboot or twrp. Note: Twrp 3.2.0.0 is not giving you the option to flash persist img. Use a previous Twrp version or flash by adb/fastboot.
TWRP 3.1.0.0 for Z2 Pro:
https://mega.nz/#!ABACiBKD!jPpLuguCoPU58Wq667D3H-YnsoyyXQ505ih0sapAOUY
Enjoy
_______________________________________
HowTo flash with fastboot:
- Download correct adb and fastboot drivers
(look into sticked thread "how to flash stock rom")
- put Persist.img in same folder like your adb/fastboot installation
- reboot your phone into fastboot mode
(hit volume when phone starts, select fastboot)
- open command line in the folder where your drivers / ADB-Fastboot installation is located.
- enter command:
fastboot.exe flash persist Persist.img
- you can reboot phone by select via volume buttons(not recommended) or type command:
fastboot reboot
!!! Dont / never ever / at no time ever select "reboot to ffbm"
Dont touch that!!!!
So my suggest is to enter command:
Fastboot reboot
(avoid missclick to that ffbm mode)
_____________________________________
experiences:
persist.img of 3.1.194 is not good with AEX 5.0. Produces black screen / blue led freeze.
persist.img of 2.3.044 is good with AEX 5.0
_____________________________________
experiences by crisps:
persist.img of 3.1.194 no problem with LineageOS by cosme 20171125
OP link added to 1.9.104 and 2.5.462 persist.img.
Added link to Twrp 3.1.0.0 where you can flash persist.img to persist partition.
With twrp newer than 3.1.0.0 the option to flash to persist partition is no longer available.
added new file host in post #1
What are those containing?
Is there any benefit to upgrade the image?
These are containing core drivers for sensors (correct me if im wrong).
No real benefit, flash only if you screw up your phone by formatting persist partition.
yep, use these persist partitions only if you deleted them by accident or experience problems with sensors.
Not necessary to use them if there is no problem.
Jb boin said:
What are those containing?
Is there any benefit to upgrade the image?
Click to expand...
Click to collapse
I have a problem with AEX, getting BLODs since 5.0. I've never used qpst and went straight from ZUI 2.5.462 to AEX. Tried all the basebands with no result(well I'm on the latrest 3.5.444 now for a couple hours still no BLODs). The recommended baseband doesn't allow me to unlock the phone as if UI restarts right after pattern entering and then asks me to draw it again. I wonder whether flashing 3.1 could help and aren't there newer persis images?
dimitar.petrunov said:
I have a problem with AEX, getting BLODs since 5.0. I've never used qpst and went straight from ZUI 2.5.462 to AEX. Tried all the basebands with no result(well I'm on the latrest 3.5.444 now for a couple hours still no BLODs). The recommended baseband doesn't allow me to unlock the phone as if UI restarts right after pattern entering and then asks me to draw it again. I wonder whether flashing 3.1 could help and aren't there newer persis images?
Click to expand...
Click to collapse
So between this post and the one where you asked me about not needing to do QPST/QFIL flashes any more since there's unofficial Treble support in the AEX thread, I get the feeling you're hoping someone will tell you that there's a simple answer that doesn't involve using QFIL to flash a factory ZUI QPST package.
There isn't.
What you're realizing is that you need to update more than just /system, /boot, and /persist... there's a lot of potential partitions that could've been messed up or accidentally wiped or overwritten, depending on which recovery you've been playing with and what the many various custom ROM installer scripts tell it to do... and the best way to make sure that ALL the partitions are healthy and have current, works-well-together data in them is by using QFIL to flash a current ZUI package (3.1.194 as of this writing) then use the factory recovery to install the latest ZUI Oreo OTA. With this phone, it's not an optional step; using QFIL to go back to a standard, factory image is literally step 1 in any of the upgrade or troubleshooting guides.
It's time to make sure you have it installed, USB drivers working, a good USB 3.0 type C cable that works reliably for data transfer, 7-zip installed, and at least 2 gigs of drive space available so you can decompress ZUI 3.1.194 into a folder at the root level of your drive. This isn't a phone you can work on without a computer unless you're ready to only stay on official ZUI releases with a locked bootloader & no root so that you can't accidentally mess anything up trying to get custom ROMs to work. If you want to re-lock your bootloader in that case, be sure you download the ZUI 1.9 QPST package and start from that instead of 3.1.194.
It's not that scary, and I'm happy to answer questions in PM if you need some help.
Terminator.J said:
So between this post and the one where you asked me about not needing to do QPST/QFIL flashes any more since there's unofficial Treble support in the AEX thread, I get the feeling you're hoping someone will tell you that there's a simple answer that doesn't involve using QFIL to flash a factory ZUI QPST package.
There isn't.
What you're realizing is that you need to update more than just /system, /boot, and /persist... there's a lot of potential partitions that could've been messed up or accidentally wiped or overwritten, depending on which recovery you've been playing with and what the many various custom ROM installer scripts tell it to do... and the best way to make sure that ALL the partitions are healthy and have current, works-well-together data in them is by using QFIL to flash a current ZUI package (3.1.194 as of this writing) then use the factory recovery to install the latest ZUI Oreo OTA. With this phone, it's not an optional step; using QFIL to go back to a standard, factory image is literally step 1 in any of the upgrade or troubleshooting guides.
It's time to make sure you have it installed, USB drivers working, a good USB 3.0 type C cable that works reliably for data transfer, 7-zip installed, and at least 2 gigs of drive space available so you can decompress ZUI 3.1.194 into a folder at the root level of your drive. This isn't a phone you can work on without a computer unless you're ready to only stay on official ZUI releases with a locked bootloader & no root so that you can't accidentally mess anything up trying to get custom ROMs to work. If you want to re-lock your bootloader in that case, be sure you download the ZUI 1.9 QPST package and start from that instead of 3.1.194.
It's not that scary, and I'm happy to answer questions in PM if you need some help.
Click to expand...
Click to collapse
It's been over a day without a blod now with latest baseband. I don't want to qfil anything because I'm sceptical of the outcome.
dimitar.petrunov said:
It's been over a day without a blod now with latest baseband. I don't want to qfil anything because I'm sceptical of the outcome.
Click to expand...
Click to collapse
And that's your choice, but if you've been flashing partitions piecemeal since ZUI 2.5.x and AEX 5.0 instead of a clean QFIL flash & bring-up to eliminate potential unknown causes of instability, please don't waste time submitting bug reports or asking for help with blue LED hard crashes since there's no way to know what state your phone is in.
Terminator.J said:
And that's your choice, but if you've been flashing partitions piecemeal since ZUI 2.5.x and AEX 5.0 instead of a clean QFIL flash & bring-up to eliminate potential unknown causes of instability, please don't waste time submitting bug reports or asking for help with blue LED hard crashes since there's no way to know what state your phone is in.
Click to expand...
Click to collapse
Well, I have only reflashed the firmware partition until now, which according to your own criteria makes me eligible for bug reporting. Jokes aside, here's why I believe it doesn't make sense what you recommend. It's been reported that the only way to recover from nonworking device sensors is by going back to zui 1.9 which you don't do. So your partitions have to be in a mixed state since you start from zui 3.1. Since your device works I assume you never ran into sensor problems and respectively reflashing zui 3.1 on your phone just gives you the illusion of a clean slate start( since there is nothing wrong with your phone in the first place)
Having said that, I haven't had a blod since firmware .344 which makes me think I'm right about that.
I'm not trying to attack you by the way, and I still want to help make sure you've got a working QPST/QFIL setup on your computer because I do believe it'll help make sure you have the best experience going forward. But I'm also appreciating the discussion, and I hope some other folks will chime in (and we can take it elsewhere in the forums if needed - I know it's getting a little off-topic).
dimitar.petrunov said:
Well, I have only reflashed the firmware partition until now, which according to your own criteria makes me eligible for bug reporting.
Click to expand...
Click to collapse
You've installed custom roms. Without QFIL in-between. That touches more than just /system, /data, /boot, /dalvik-cache, or /cache. It touches /persist where your device sensor configs live, it means you're modifying NVRAM areas like /modem-st1 and /modem-st2, and now, with the Treble-compatible TWRP fstab mounting /factory as /vendor, you're modifying /factory. There's probably many more. But you're not resetting them to a known-good factory state in-between, which is the entire point of this discussion.
dimitar.petrunov said:
Jokes aside, here's why I believe it doesn't make sense what you recommend.
Click to expand...
Click to collapse
What everyone recommends. Go look at troubleshooting and how-to guides throughout the Z2 Pro forums here and on zukfans.eu. It's all about starting with a QFIL flash which will reset your device's partitions to a known factory state before custom ROM installation. How much time have you spent looking at the files included in a QPST package, or digging into the XML to see what they're flashing? They've got a full GPT blank partition map included; it wipes out and re-loads whatever Lenovo thinks needs to get wiped out to factory flash a phone.
dimitar.petrunov said:
It's been reported that the only way to recover from nonworking device sensors is by going back to zui 1.9 which you don't do.
Click to expand...
Click to collapse
It's been reported that you might be able to flash just a persist.img that corresponds to your last-flashed ZUI version to recover from non-working sensors, but it's safer to just QFIL flash the whole thing. And I literally just flashed 1.9 before 3.1 three nights ago, and re-unlocked my bootloader. So I *DO* do that.
Like I have already said, what I disagree with is the generally proposed troubleshooting/clean flashing advice of starting with 1.9 and then doing OTA updates... more steps = more points of potential failure, especially when you're transferring over the internet from servers in China. I feel like it's superstition that we're passing along because it usually works; it's true that it's a slightly more complete troubleshooting option because it also restores a locked bootloader, which all later factory QPST packages don't touch. But if I have no reason to believe that my bootloader is messed up, as I have no problem getting into & out of it or using fastboot commands, then it's also a big waste of time. My advice continues to be that if you're trying to do super-super clean or need to troubleshoot, you should QFIL flash 1.9 then QFIL flash 3.1, rather than only flashing 1.9 then downloading OTA updates and risk those being corrupted in-transit or wasting the time/download bandwidth to get and apply several updates over & over again. As far as I can tell looking at the QPST installation packages, it's just as thorough (other than bootloader), with fewer opportunities for something to go wrong.
dimitar.petrunov said:
So your partitions have to be in a mixed state since you start from zui 3.1. Since your device works I assume you never ran into sensor problems and respectively reflashing zui 3.1 on your phone just gives you the illusion of a clean slate start( since there is nothing wrong with your phone in the first place)
Click to expand...
Click to collapse
I didn't start from 3.1, I just understand that since it's literally blowing a new GPT partition map over the storage and filling them with the appropriate images, it's not a mixed state and it is a clean state. But since it had been a while since I last touched my bootloader, I decided to start with 1.9 before going to 3.1 before going to 3.5.316 OTA before unlocking bootloader & going to custom ROM + 3.5.344 baseband via TWRP-flashable zip.
dimitar.petrunov said:
Having said that, I haven't had a blod since firmware .344 which makes me think I'm right about that.
Click to expand...
Click to collapse
Good, I'm glad it's working better now, but that shouldn't make you think you're right about avoiding QPST/QFIL. The BLoD could be from the bluetooth radio freaking out, could be from someone using a poorly-configured thermal-engine.conf that has an artificially low temp limit and it thinks it's overheating, could be from using a custom kernel with aggressively low voltages for given clock steppings, could be from failure to change clock states trying to come out of deep sleep at a certain time (like alarm going off, ugh, that one's awful). It's the Z2's general "I think I have a hardware failure and I'm going to hard crash to avoid potential physical damage by trying to continue", and I'm glad you're not getting it now with the latest radio firmwares.
Again, not trying to pick on you, but I think you're doing yourself a disservice AND wasting peoples' troubleshooting efforts if you're not willing to start with a QPST/QFIL flash, and I'm hoping I'm giving a good explanation as to why.
Actually I suffered from non-working sensors and full wipe (or you can say total factory reset) by QFIL of ZUI 1.9 solved it. I softbricked my phone between these two states trying to solve it without QFIL btw.
@Terminator.J thanks for the input. Still I'm coming from the fact that If I've only flashed AEX and AEX is the culprit of my partition problems then reflashing it once again won't solve them. And AEX is the only ROM I've ever flashed on this phone. I haven't understood you correctly about ZUI 1.9, my appologies. I haven't reported BLODS in the ROM's thread only asked if anyone experiences it since I'm aware of my personal setup. Btw If I remeber correctly NYE version was BLOD free on my phone too.
@Oriwen That's exactly what I wonder how is it possible to wipe your persist partition by flashing a custom rom? Since the cure is going to zui 1.9 and then flashing the same ROM how do you not loose your persist partition again? I'm trying to understand why flashing has such side effects or is just because of flashing random partition images like the ones in this thread?
dimitar.petrunov said:
@Oriwen That's exactly what I wonder how is it possible to wipe your persist partition by flashing a custom rom? Since the cure is going to zui 1.9 and then flashing the same ROM how do you not loose your persist partition again? I'm trying to understand why flashing has such side effects or is just because of flashing random partition images like the ones in this thread?
Click to expand...
Click to collapse
I probably flashed recovery partition badly, rewritten wrong partition and boom .... thats only possible culprit for me as far as I know.
dimitar.petrunov said:
@Terminator.J thanks for the input. Still I'm coming from the fact that If I've only flashed AEX and AEX is the culprit of my partition problems then reflashing it once again won't solve them. And AEX is the only ROM I've ever flashed on this phone. I haven't understood you correctly about ZUI 1.9, my appologies. I haven't reported BLODS in the ROM's thread only asked if anyone experiences it since I'm aware of my personal setup. Btw If I remeber correctly NYE version was BLOD free on my phone too.
@Oriwen That's exactly what I wonder how is it possible to wipe your persist partition by flashing a custom rom? Since the cure is going to zui 1.9 and then flashing the same ROM how do you not loose your persist partition again? I'm trying to understand why flashing has such side effects or is just because of flashing random partition images like the ones in this thread?
Click to expand...
Click to collapse
All an installer script (any of them - rom, gapps, magisk, supersu, whatever) has to do is touch something in /persist. And there's legitimate reasons to do that, like survival scrips for things that you want to persist across a system wipe/update (someone correct me if I'm wrong, but I know it's for more than just sensor configs), like google apps install info.
It seems like a number of folks either got too happy with wiping things in TWRP trying to clean their phone (rather than using QFIL to flash a factory QPST image, which does all the partitions!) or otherwise some custom ROM or systemless root or botched flashing attempt put garbage data into /persist. Some of the TWRP versions available, like the LR.Team ones, allow you to wipe a LOT more than just /system, /data, /cache, /dalvik-cache, /boot, and internal storage... the Chinese one will let you mount & wipe /persist, /efs, and a bunch of others you reeeeeally don't want to touch. Or maybe it just gets crusty with several months' worth of various installations (again, not just a ROM, but any installation script could actually touch it) doing different things to it and leaving ultimately incompatible data.
The cure doesn't cure /persist by wiping it, but by making sure that it only has good data in it (particularly the configs for the sensors), and that those config versions match the drivers that depend on those configs. So if you've got configs from an ancient (ZUI 1.9 = Android 6 marshmallow) version in /persist but drivers for that hardware from Oreo (taking the ZUI 3.5 blobs), it's likely that some things aren't going to behave correctly, wouldn't you agree? When someone's having trouble with their setup, QFIL of the latest full factory package (which includes fresh /persist partition images), followed by as few OTA updates as needed, is the fastest way to get good data back in all the places so you can start loading a custom recocovery & ROM from a known-good state.
Yeah, you're right; AEX 5.2 and earlier (including NYE beta and some other non-Treble custom ROMs worked okay with the ZUI nougat basebands (like the ZUI 2.5.462 you had), and they were even recommending coming from 3.1.194 because the early 3.5 DEV basebands were unstable. But in AEX 5.3 & up it REALLY needed an oreo (3.5.x) one in order to work... I was running into that same problem of constant BLOD crashes right after a QFIL flash of ZUI 3.1 and fresh TWRP 3.2.1 & AEX 5.3 install from there. Reflashing ZUI 3.1 via QFIL then updating with the 3.5.316 OTA package via factory recovery, then loading TWRP , wiping, & installing AEX 5.3 again took care of it and 5.3 has been basically solid for me in all the important ways since then (and with the latest 3.5.344 baseband update).
Again, please feel free to PM me if you'd like to compare more notes on things or are having issues... I really do want to be a resource for you & everyone here in making the most of these phones, and avoiding some big headaches. Setting up QPST/QFIL is a little headache, but it helps prevent much bigger ones in the long run.
weimerd said:
Hi mates,
here we go with the persists.img for Lenovo ZUK Z2 Pro.
So if you deleted them by accident you can try to reflash these:
new added file host for all files: https://www.androidfilehost.com/?w=files&flid=243937
persist.img ZUI 1.9.104:
https://mega.nz/#!0dxzwRrD!0DjKphWCRU-vv4yb1clTqrppVPGzbdaLEc4P7ItX6Ek
persist.img ZUI 2.3.044:
https://mega.nz/#!9QAE3J4I!wMNuXJ9430ihNKUgAmfJJqaB7a13v8qHtTGhCb-3hOE
persist.img ZUI 2.5.462:
https://mega.nz/#!MVZEnQCb!KvKYcHFdxvQEjlRC3zKsvQH316YY3iyNJEV3HE63cDU
persist.img ZUI 3.1.194:
https://mega.nz/#!oURh0ARA!JvliKwO6-bvdobG1qZoXg9CrH1u0zmtLsjFuoCIBoFk
All credits to @crisps
WARNING: these files are not tested. All use to your own risk.
Anyway if you accidentially deleted your persist partition it is worth a try
Flashable by fastboot or twrp. Note: Twrp 3.2.0.0 is not giving you the option to flash persist img. Use a previous Twrp version or flash by adb/fastboot.
TWRP 3.1.0.0 for Z2 Pro:
https://mega.nz/#!ABACiBKD!jPpLuguCoPU58Wq667D3H-YnsoyyXQ505ih0sapAOUY
Enjoy
_______________________________________
HowTo flash with fastboot:
- Download correct adb and fastboot drivers
(look into sticked thread "how to flash stock rom")
- put Persist.img in same folder like your adb/fastboot installation
- reboot your phone into fastboot mode
(hit volume when phone starts, select fastboot)
- open command line in the folder where your drivers / ADB-Fastboot installation is located.
- enter command:
fastboot.exe flash persist Persist.img
- you can reboot phone by select via volume buttons(not recommended) or type command:
fastboot reboot
!!! Dont / never ever / at no time ever select "reboot to ffbm"
Dont touch that!!!!
So my suggest is to enter command:
Fastboot reboot
(avoid missclick to that ffbm mode)
_____________________________________
experiences:
persist.img of 3.1.194 is not good with AEX 5.0. Produces black screen / blue led freeze.
persist.img of 2.3.044 is good with AEX 5.0
_____________________________________
experiences by crisps:
persist.img of 3.1.194 no problem with LineageOS by cosme 20171125
Click to expand...
Click to collapse
By flash Twrp:
Witch partition i select?
Boot
Recovery
Système image
Firmware
Read OP
"persist" lenovo z5
Hi everyone, I could get the file persist.img for lenovo z5. I am trying to use twrp but always the error because of the persist folder
new flashable persist sensors zip from ZUI 4.0.233 ST online, see first post.
Enjoy mates, all for Z2 Pro only.
Tested with latest twrp and RedWolf twrp. Tested with Android 8.1 and upcoming versions.
All credits to @crisps who did all the work and let me upload it

corrupt to the core

heya people! my razer 2 is screwed. I had trinity kernel originally, and i saw arter's was updated to april and trinity was march so i flashed arter's, someone else did it with no issue.
K so i flash arter, go to system, reboot, someone in tg group told me arter is sketchy and known to brick phones, so i wanted to go back to trinity, before tho, someone said i should clean flash my stock, so i tried. The thing is, the file comes from razer, and is a flash_all.bat the only problem was i couldnt use fastboot, so after talking to them i tried to just flash the boot.img to boot slot in twrp. Big mistake. Twrp no longer is a thing, fastboot doesnt work, cant go into download mode, when i boot up my phone it tells me my phone is corrupted and may not function, after that it takes me to default android recovery screen.
if i hit apply via adb, i get sys errors and **** and according to nfs group, my partition is completely corrupted (device not found) or something like that
so i called a repair place and explained it to him and he said hed have to look at it, so im gonna probably have to drive down there for him to tell me its screwed.
I tried applying via sd card, but when i insert the sdcard to my pc and try to write files, it says its write protected, and i dont see anything in properties about making it r/w so im really at a loss.
Is there ANYTHING i can do or am i gonna have to pray that this guy knows something?
dont thikn i can send to razer since i broke my warranty unlocking bootloader and rooting.
anything would help guys, i dont wanna have to go back to my razer 1 ;_;
ok well i didnt get any replies so i took it to a repair place, he said his tech guy wasnt in but he'd call me with updates as to whats happening. Shouldnt cost more than $75 so thats great.
if you have any ideas on what could be wrong id love to hear, maybe i can learn from my mistakes and be able to recover next time.
I'm not sure about the comments in the telegram group, but I don't think it was necessary to flash all the stock stuffs. Factory images may contain stuffs that you should never flash on a device that has already left factory and packaged. Usually you should only be flashing boot, system and vendor (plus userdata, if you want to wipe existing data as well). You may also consider flashing modem, dsp, bluetooth if baseband/firmware update on certain parts are needed.
Recovery is now part of the kernel image, so flashing stock kernel means you have stock recovery. Stock recovery is only useful if you accidentally issued Factory Reset from system, or pressed "Wipe user data" from bootloader (which happened when I was preparing the device for unlock/rooting for the first time), and got into an endless loop after that (since TWRP may not properly handle /misc stuffs).
Again, **NEVER** use Factory Reset from system, or Wipe user data from bootloader, if you use TWRP. Always wipe data from TWRP if you intend to do so.
At one point (r13) arter97's kernel had some issues which is supposed to have been fixed in r14. I haven't updated my kernel yet since last Trinity nightly (it's working great even after flashing MR3 vendor stuffs).
LSS4181 said:
I'm not sure about the comments in the telegram group, but I don't think it was necessary to flash all the stock stuffs. Factory images may contain stuffs that you should never flash on a device that has already left factory and packaged. Usually you should only be flashing boot, system and vendor (plus userdata, if you want to wipe existing data as well). You may also consider flashing modem, dsp, bluetooth if baseband/firmware update on certain parts are needed.
Recovery is now part of the kernel image, so flashing stock kernel means you have stock recovery. Stock recovery is only useful if you accidentally issued Factory Reset from system, or pressed "Wipe user data" from bootloader (which happened when I was preparing the device for unlock/rooting for the first time), and got into an endless loop after that (since TWRP may not properly handle /misc stuffs).
Again, **NEVER** use Factory Reset from system, or Wipe user data from bootloader, if you use TWRP. Always wipe data from TWRP if you intend to do so.
At one point (r13) arter97's kernel had some issues which is supposed to have been fixed in r14. I haven't updated my kernel yet since last Trinity nightly (it's working great even after flashing MR3 vendor stuffs).
Click to expand...
Click to collapse
hmm, im not understanding how flashing stock boot.img to boot partition would make recovery part of the kernel image? boot.img is the literal only thing i got to flash in twrp before it just died.
Like i said fastboot didnt work, and oddly enough, it doesnt work on my old razer 1 either, i tried rooting it the other day and it wont go to fastboot
Edit: according to an admin in magnetar group, dm-verity could be the reason, and he said i should've flashed something called "lazy flasher" after flashing the boot img. Never heard of it and never used it.
hadtosignuptoreply said:
hmm, im not understanding how flashing stock boot.img to boot partition would make recovery part of the kernel image? boot.img is the literal only thing i got to flash in twrp before it just died.
Like i said fastboot didnt work, and oddly enough, it doesnt work on my old razer 1 either, i tried rooting it the other day and it wont go to fastboot
Edit: according to an admin in magnetar group, dm-verity could be the reason, and he said i should've flashed something called "lazy flasher" after flashing the boot img. Never heard of it and never used it.
Click to expand...
Click to collapse
Recovery is built into the kernel (which is common for recent devices). arter97 (or Trinity) kernel image includes TWRP in place of the stock recovery, so you get TWRP when you flashed the kernel. Stock boot.img comes with stock recovery, so if you flash stock kernel you lose TWRP.
Also, keep track of your reboot count and your current active slot. If your system fails to boot multiple times in a row, the bootloader may consider it damaged and switching to another slot (which usually contains the previous version of system/vendor/modem etc.) and may cause some issues if you're unlocked (or you were previously on a GSI).
As for fastboot issues, I once had a time that I could only conduct flash commands within a very tiny time window right after the phone booted to bootloader, although the problem has been lessened after reboot and I could now flash properly again. It's unknown when the problem would resurface that I'd need another reboot (given the distro I use, Manjaro, is constantly updating, I'd just update the system and reboot anyway if that happens).
Some fastboot versions may be buggy, or maybe USB interactions under Linux can be problematic in general (especially in handling plugs and unplugs). This is more apparent if a system is running constantly for a long time and a lot of devices has been properly (or improperly) plugged or unplugged over the course of its uptime. Maybe it's better if one conducts fastboot using rear USB ports (as front USB ports tend to have less voltage).
I never bothered with dm-verity and hardly ever had problems with it.
vnb
LSS4181 said:
Recovery is built into the kernel (which is common for recent devices). arter97 (or Trinity) kernel image includes TWRP in place of the stock recovery, so you get TWRP when you flashed the kernel. Stock boot.img comes with stock recovery, so if you flash stock kernel you lose TWRP.
Also, keep track of your reboot count and your current active slot. If your system fails to boot multiple times in a row, the bootloader may consider it damaged and switching to another slot (which usually contains the previous version of system/vendor/modem etc.) and may cause some issues if you're unlocked (or you were previously on a GSI).
As for fastboot issues, I once had a time that I could only conduct flash commands within a very tiny time window right after the phone booted to bootloader, although the problem has been lessened after reboot and I could now flash properly again. It's unknown when the problem would resurface that I'd need another reboot (given the distro I use, Manjaro, is constantly updating, I'd just update the system and reboot anyway if that happens).
Some fastboot versions may be buggy, or maybe USB interactions under Linux can be problematic in general (especially in handling plugs and unplugs). This is more apparent if a system is running constantly for a long time and a lot of devices has been properly (or improperly) plugged or unplugged over the course of its uptime. Maybe it's better if one conducts fastboot using rear USB ports (as front USB ports tend to have less voltage).
I never bothered with dm-verity and hardly ever had problems with it.
Click to expand...
Click to collapse
ah ok. Well the repair guy called and said they didnt know what was wrong or how to fix it, i know i can at least get to bootloader, and to root my razer 1 again, i went to bootloader and fastboot worked. Before work tomorrow im gonna get that phone from the place and hope that i can flash what i need to get it working again. Assuming it will actually be able to read the device. Thanks for your input

How to install lazyflasher-no-verity-opt-encrypt

I am trying to root my Redmi Note 9, and the instructions I am following say to install "lazyflasher-no-verity-opt-encrypt".
I downloaded it and unzipped it but can't figure out how to actually install it on the phone. There is no APK file that I can see. The other key download, Magisk, came with a APK, so that stage went okay.
When I realized that I didn't know how to install lazyflasher, I uninstalled Magisk, as I feared bricking the device on the next boot.
Is there a way to backup the whole system, before I go ahead and brick it? I want to back up not just user data and a few app settings, I want something that will allow me to restore all my installed apps and system settings, in case something goes wrong.
No, you do NOT need no-verity-opt-encrypt.
VD171 said:
No, you do NOT need no-verity-opt-encrypt.
Click to expand...
Click to collapse
Good news. Can you link me to a decent set of instructions for rooting my device? I am an android noob, with Windows and Linux skills.
And what NOT to do, if I don't want a bricked device?
Just make rooting using fastboot and flash updates using fastboot and everything will be fine.
So if I do it the fastboot way, it wipes personal data, right? Is all that data restorable by means of the standard Redmi backup tool? If not, what's recommended to backup and restore that set of data?
No, data is not formatted for rooting or updating the system.
Data is formatted only for unlocking bootloader.
Do I need to unlock the bootloader for fastboot?
You do NOT need unlocked bootloader if you want to flash signed images (from stock rom).
But, you NEED unlocked bootloader if you want to flash custom partitions, like patched boot.img and patched vbmeta.img, for rooting.
VD171 said:
You do NOT need unlocked bootloader if you want to flash signed images (from stock rom).
But, you NEED unlocked bootloader if you want to flash custom partitions, like patched boot.img and patched vbmeta.img, for rooting.
Click to expand...
Click to collapse
Thanks for all your help!
I want to do two things:
1 Install a root certificate in order to get my phone working with my local network
2 Install a backup app such as Titanium Backup.

Question NV data corrupted each time I install LineageOS 20 via TWRP

I have bricked several times the phone trying to install lineageOS 20. every time I manage to recover the phone using mtk and then a clean and full reset to stock images from Mi Flash.
I have tried flashing the GSI rom through fastbootD (after installing TWRP) and also via TWRP>install>image>myGSIROM
Any idea about how could be flashing the system partition causing the NV data corruption? Any other possible cause of the corruption?
Thank you!
Hello.
I was able to install it without any problems.
light version lineage-20.0-20230417-UNOFFICIAL-gsi_arm64_gN.img
nvdata mac address is also fine.
Installing GSI is very simple.
Install without TWRP.
Please use the latest SDK Platform Tools.
newboihere said:
I have bricked several times the phone trying to install lineageOS 20. every time I manage to recover the phone using mtk and then a clean and full reset to stock images from Mi Flash.
I have tried flashing the GSI rom through fastbootD (after installing TWRP) and also via TWRP>install>image>myGSIROM
Any idea about how could be flashing the system partition causing the NV data corruption? Any other possible cause of the corruption?
Thank you!
Click to expand...
Click to collapse
I was able to boot other GSIs as well.
but I'm using the evo x custom rom published on the telegram group.
There are plenty of smarter people out there than me, so I encourage you to take a look there too.
kousuke5555 said:
Hello.
I was able to install it without any problems.
light version lineage-20.0-20230417-UNOFFICIAL-gsi_arm64_gN.img
nvdata mac address is also fine.
Installing GSI is very simple.
Install without TWRP.
Please use the latest SDK Platform Tools.
Click to expand...
Click to collapse
Thank you!
I have been checking the issue at the lineage thread and I think the reason for losing the mac and sometimes also end up with a vndata corruption is that I changed the size of super partition but did not updated the scatter file at MiFlash, so all the flashing resets afterwards might be compromised (although MiFlash does not complain). Another reason is that when I changed the size I might have also changed some flags or something like that, I will check later.
By the way, I would really appreciate if someone could share the original gpt table (to be restored with gdisk or gparted)
newboihere said:
Thank you!
I have been checking the issue at the lineage thread and I think the reason for losing the mac and sometimes also end up with a vndata corruption is that I changed the size of super partition but did not updated the scatter file at MiFlash, so all the flashing resets afterwards might be compromised (although MiFlash does not complain). Another reason is that when I changed the size I might have also changed some flags or something like that, I will check later.
By the way, I would really appreciate if someone could share the original gpt table (to be restored with gdisk or gparted)
Click to expand...
Click to collapse
I don't know what your situation is.
It seems that it can be solved by flashing the firmware with sp flash tool using the auth bypass tool.
Isn't gpt table a scatter file in the firmware? I think you can get it by extracting the .tgz.
If you use the sp flash tool, be sure to select "Download Only Mode". Do not choose anything else.
There seems to be an error in "combo_partsize_check" when flashing with miui13rom. Please rewrite the corresponding part in the scatter file to false with Notepad etc.
There seems to be a tool that makes bypassing and flashing easier, such as "act unlock tool", so use whatever you like.
If the situation cannot be resolved with sp tool
I can't solve it with my knowledge level.

Categories

Resources