I created this thread to serve as a "All in One" thread with all possible known solutions to repair the infamous Persist issue that some unfortunate people have experienced. Symptoms can include the EFS No Signal issue, and eventually the phone will shut down and no longer being able to boot to system, even when formatted the ever present persist error messages in TWRP seem unfixable. until now.
Option 1
The most simple and easy option
The easiest solution for resolving a persist issue is to restore your Full TWRP backup. That is if you were careful enough to make a full backup that included backing up the persist image.
Update repair file April 2020:
Option 2
Download this file and follow the steps on the link below
File: https://androidfilehost.com/?fid=4349826312261781866
See this page on this thread for the steps to use the tested and working file above: : https://forum.xda-developers.com/showpost.php?p=82346409&postcount=76
I will leave the other optional methods below posted just in case this file does not work for some people. Also If you are visiting this thread from another device and need similar help. Send me a PM and I can make a solution for your device, I also have made fixes for DBTO issues
Once your issue is resolved :
Immediately go make a full backup and save it to your desktop and you will never have to deal with the annoyance. of a persist related issue.
Note that you must use The most current Orange Fox or the LR Team version of TWRP, because it is one of the few versions that include the option of backing up and restoring persist.
Recommended Tools Needed for preventative measure and for the additional options below
A Recovery that can backup and restore the persist partition
April 2020 version of Orange Fox or LR Team TWRP will suffice
Orange Fox: https://sourceforge.net/projects/orangefox/files/dipper/OrangeFox-R10.1-Stable-dipper.zip/download
LR Team version of TWRP
Non-Q version: https://androidfilehost.com/?fid=4349826312261636232[/url]
Q version: https://androidfilehost.com/?fid=4349826312261636230[/url]
You must use one of these versions of TWRP, because they both have the ability to write to the persist partition.
Backup your data if possible (most likely you can’t ) and you need to remove all encryption by formatting user data
If you do not have a backup and the flashable persist solution does not work, I would suggest starting clean by restoring the phone with a fastboot rom.
Fastboot Images Rom
Any Dipper images rom will work, BUT Must be the version for your device) Below is for Global devices only.
Global Stable Fastboot 11.0.3.0 : dipper_global_images_V11.0.3.0.QEAMIXM_20200118.00 00.00_10.0_global
Alternatively you can use the older 11.0.6
http://bigota.d.miui.com/V11.0.6.0....XM_20191022.0000.00_9.0_global_fe09c43d5a.tgz
OR one of these alternate Archive of Image Roms : Make sure you choose for your device ( Global or China) . Also, I will add additional official links here as I find them I have not been able to find an official link for 11.03. but I have inspected and scanned it and it is purely stock.
https://xiaomifirmware.com/roms/download-official-miui-roms-for-xiaomi-mi8-dipper/
Option 3
In the unlikely event that the flashable fix fails unpack the fastboot rom, and manually extract the persist.img and then place it into the sd folder of your phone using the TWRP recovery file manager.
1. Boot to TWRP ( Command below only works if booted to TWRP Recovery)
2. Go to advanced, then terminal
3. type: dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist
4. After its finished reboot to the system, finished
5. Alternate step here
Option 4 - If using an older Oreo or Pie rom
Ensure that you have proper Recovery installed and have downloaded the images file
1. Chose wipe-> 'format data' in TWRP, type yes, reboot to recovery English and then complete the full wipe steps and flash Magisk.
2. Next, Install the TWRP that I mentioned later versions of TWRP do not have the option to flash the persist image alone.
3. This version of TWRP is in Chinese you need to change it to English.
4. Go to settings/ globe to activate the English version. > Reboot to recovery
5. Copy persist.image to your MI8 using desktop
6. The persist image file is inside the unpacked images rom folder that you should have downloaded.
7. Within In TWRP File manager: Chose to install image, and copy persist image into the partition folder “persist”
8. Format all data and the persist will be unlocked
9. Flash Magisk
10. Done, You should be back in Business.
Option 5 - Flashall.bat restore
1. Enter Fastboot mode
2. Download fastboot dipper images rom, and use flashall.bat method to restore the phone.
3. Download dipper images rom. > Important>>>>>> It must be a fastboot rom and not a Recovery rom
4. Unpack the rom twice on your desktop
5. You will be left with a folder and inside you will see batch files and an image folder.
6. Doubleclick Flashall.bat ( be careful on what you click, you want flashall.bat only) with the phone attached an in Recovery mode, fastboot or EDL
7. Flashall.bat is a batch script that will wipe your phone and restore all images and then boot to the system.
8. You should then Setup rom
9. Afterwards, install TWRP and root then create a full Twrp backup and save to your PC.
10. This way you will have a quick solution if you ever need it again in the future.
11. Enjoy a working phone
Flashall.bat : Described here : https://forum.xda-developers.com/showpost.php?p=81532611&postcount=8
Partitions backed up by LR Team listed here : https://forum.xda-developers.com/showpost.php?p=81532463&postcount=7
If I just saved your phone and a mountain of headaches, please say thanks by clicking the thanks button or better yet I would certainly welcome a small donation for Pizza or beer.
Attached Images Explanation :
The first image illustrates the location of the persist image found within the Images Rom, this is what you will use to overwrite, the persist partition.
The 2nd image : shows the backed up files perist files when you have madea backup using one of the recommended versions of recovery. if your issue is resolved, make a backup now and store it on your desktop. This way if you encounter a persist issue, it can be fixed within seconds by booting to recovery and restoring persist ( Again It must be you own persist, You cannot restore someone else persist backup to your phone or you will cause irreparable damage.
Worst case scenario: I live in the US, if you are local and you still having trouble, feel free to send me a PM. If you arrange shipping and mail your phone to me. I will attempt to repair it and if successful there will be a very small and reasonable fee.
Good luck
I have spent literally over one hundred hours researching this issue, before discovering a universal solution that should work for most people. However, I have found that it will not permanently repair phones that have either restored someone else TWRP persist back up, or that they have manually IMEI modified. DO NOT PM ME about this is issue unless you have made a donation in advance, this thread provides everything that you need to know and you are getting it for free by reading the above options.
Reserved
tsongming said:
Since I have written the persist instructions on practically every thread out there and still receive PM's daily asking for help I have created this all in One thread with all possible solutions to repair a Persist issue ( AKA, EFS No Signal issue, or Persist error messages in TWRP)
Common Courtesy on XDA is Clicking Thank you.
Click here to learn more
Thank you Rant
Next, I don’t mind with short quick tips. But for these extended types of solutions, it's very annoying that people in the Mi8 forum cannot be bothered to click the thank you button.
Watching my statistics improve with the thanks button being clicked is almost as good as a beer. Click it, don't say it.
Once your issue is resolved :
Immediately go make a full backup and save it to your desktop and you will never have to deal with the annoyance. of a persist related issue. Note that you must use the LR Team version of TWRP, because it is one of the few versions that include the option of backing up and restoring persist.
Back to the Matter at Hand.
So I am guessing that you flashed something incorrectly and now your persist partition is corrupt. Absolutely, I have personally had this issue myself, more than once, and the easiest and best way is to restore your Full TWRP backup if you have one.
Tools Needed
LR Team version of TWRP
Non-Q version: https://androidfilehost.com/?fid=4349826312261636232
Q version: https://androidfilehost.com/?fid=4349826312261636230
You must use this version of TWRP, because it has the ability to write to the persist partition.
Backup your data if you can, most likely you can’t and it’s gone so you need to remove all encryption by formatting user data.
Fastboot Images Rom ( Any Dipper images rom will work, BUT Must be the version for your device) Below is for Global
http://bigota.d.miui.com/V11.0.6.0....XM_20191022.0000.00_9.0_global_fe09c43d5a.tgz
Alternate Archive of Image Roms, make sure you choose for your device. Also, I will add additional official links here as I find them.
https://xiaomifirmware.com/roms/download-official-miui-roms-for-xiaomi-mi8-dipper/
Option 1
• The absolute best method is to use a Twrp restore if you have one. Did you save any Twrp backups to your PC?
FYI Trivia: the release date of the firmware doesn't matter, If you use diff or Beyond Compare to analyse file differences you will find nothing different.
Option 2
• Unpack the fastboot rom, and manually extract the persist.img and then place it into the sd folder of your phone using the TWRP recovery file manager.
1. Boot to TWRP
2. Go to advanced, then terminal
3. type: dd if = / sdcard / persist.img of = / dev / block / bootdevice / by-name / persist
4. After its finished reboot to the system, finished
Option 3
Ensure that you have proper TWRP installed and have downloaded the images file
1. Chose wipe-> 'format data' in TWRP, type yes, reboot to recovery English and then complete the full wipe steps and flash Magisk Canary.
2. Next, Install the TWRP that I mentioned later versions of TWRP do not have the option to flash the persist image alone.
3. This version of TWRP is in Chinese you need to change it to English.
4. Go to settings/ globe to activate the English version. > Reboot to recovery
5. Copy persist.image to your MI8 using desktop
6. The persist image file is inside the unpacked images rom folder that you should have downloaded.
7. Within In TWRP File manager: Chose to install image, and copy persist image into the partition folder “persist”
8. Format all data and the persist will be unlocked
9. Flash Magisk
10. Done, You should be back in Business.
Option 4
1. If you are unable to access fastboot, you will need to go into EDL mode ( absolutely use Fastboot if available)
2. Download fastboot dipper images rom, and use flashall.bat method to restore the phone.
3. Download dipper images rom. Note: It has to be a fastboot rom and not a Recovery rom
4. Unpack the rom twice on your desktop
5. You will be left with a folder and inside you will see batch files and an image folder.
6. Doubleclick Flashall.bat ( be careful on what you click, you want flashall.bat only) with the phone attached an in Recovery mode, fastboot or EDL
7. Flashall.bat is a batch script that will wipe your phone and restore all images and then boot to the system.
8. You should then Setup rom
9. Afterwards, install TWRP and root then create a full Twrp backup and save to your PC.
10. This way you will have a quick solution if you ever need it again in the future.
11. Enjoy a working phone
Errors may exist in this post, I barely proofread it so let me know if there are any errors and check back I will fine tune it over the next few days.
Finally, I just saved your phone. So go click thanks, clicking thanks is what provides motivation to help you. or better yet, buy me a beer.
Images Explanation :
The first image on the left is the persist file within the Images Rom, this is what you will use to overwrite, the persist partition.
The 2nd image is what the perists files look like if you backup persist with the LR Team versions of TWRP, if you encounter a persist issue, it can be fixed in 10 seconds by boot to recovery and restoring persist ( It must be you own persist, You cannot restore someone else persist or your phone will be much m8uch worse off, and probably unfixable.
Click to expand...
Click to collapse
Hey Thanks so much for this post. However, for Option 2 , the command is not working , Then i tried dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist, it worked but the issue was not solved.
and for Option 4 . i pressed the flash_all.bat but nth came out , so i installed fastboot files into the fastboot file and when i click the flashall.bat it worked . but then after setting up , my IMEI , Wifi and simcard were still dead
Any suggestion?
Once again im soo grateful for this but my 16 thanks limit is up
Theevanz said:
Hey Thanks so much for this post. However, for Option 2 , the command is not working , Then i tried dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist, it worked but the issue was not solved.
and for Option 4 . i pressed the flash_all.bat but nth came out , so i installed fastboot files into the fastboot file and when i click the flashall.bat it worked . but then after setting up , my IMEI , Wifi and simcard were still dead
Any suggestion?
Once again im soo grateful for this but my 16 thanks limit is up
Click to expand...
Click to collapse
Okay, I am getting ready to go to bed so this post will be brief. Persist issues are usually caused by encryption, or somehow the persist image gets wiped. I used a spellchecker and I think it added the space. Doh!
Try using adb command : fastboot flash persist persist .img
1. You must first put a copy of the persist image from the Images folder into the ADB folder, or open the ADB window from within the extracted folder.
2. If this works then use flashall.bat method to restore phone. if it fails with the 11.6 Rom then try an older one.
If this fails:
I assume that you do not have a backup that you can restore? if so by all means do that first. Because it will absolutely work. Next remember that you must wipe the phone completely including formatting userdata/storage. and use the TWRP that I listed above.
Please explain exactly how you arrived at this issue, and don't leave out details. How did you arrive at this issue? If you were editing the IMEI then tell me , that requires restoring a QCN file and using QPST. (That issue is not really a persist issue, not at all.) But I don't mind attempting to helping you figure it out. Did you ever flash a persist image that someone posted somewhere?
Be sure that you are using a fastboot images rom specifically for your device, is it a Global or Chinese device?
Again please provide details.
This way we dont waste time taking non relative steps.
So you tried the flashall.bat steps? What should happen is the ADB windows will open and each partition image is flashed one by one, when it's complete, you will see the Miui setup page and then you sign into Wifi then you miCloud account.
Edit
@Theevanz
I found a flashable file to restore the persist for the Oreo version of the Chinese Mi8. If you a have global device it will not work. However, I used a program called beyond compare to figure out how this file works. if all goes well, I may have a flashable fix for you tomorrow. I plan to simply make a flashable file that will flash the Global Version of the persist image to the persist partition. You will still need to be fully wiped and formatted, so you do not get a write error message. Don't worry we will get this. I have had the exact same issue happens to me and I was able to get my phone working again.
Thanks for the guide tsongming.
You have absolutely helped all of us more than once. I've been using custom roms for more than 7 years and I didn't even know what "persist" partition was.
I'm currently using the TWRP made by mauronofrio because I haven't had any issue yet. However, as you explained the only TWRP that can backup the persist partition is LR Team one. Would you suggest me to flash this version and make a backup of the partition and then swap again to my original version of TWRP?
I know the questions is quite WTF but atm asking is free.
Thanks for your help.
tsongming said:
Okay, I am getting ready to go to bed so this post will be brief. Persist issues are usually caused by encryption, or somehow the persist image gets wiped. I used a spellchecker and I think it added the space. Doh!
Try using adb command : fastboot flash persist persist .img
1. You must first put a copy of the persist image from the Images folder into the ADB folder, or open the ADB window from within the extracted folder.
2. If this works then use flashall.bat method to restore phone. if it fails with the 11.6 Rom then try an older one.
If this fails:
I assume that you do not have a backup that you can restore? if so by all means do that first. Because it will absolutely work. Next remember that you must wipe the phone completely including formatting userdata/storage. and use the TWRP that I listed above.
Please explain exactly how you arrived at this issue, and don't leave out details. How did you arrive at this issue? If you were editing the IMEI then tell me , that requires restoring a QCN file and using QPST. (That issue is not really a persist issue, not at all.) But I don't mind attempting to helping you figure it out. Did you ever flash a persist image that someone posted somewhere?
Be sure that you are using a fastboot images rom specifically for your device, is it a Global or Chinese device?
Again please provide details.
This way we dont waste time taking non relative steps.
So you tried the flashall.bat steps? What should happen is the ADB windows will open and each partition image is flashed one by one, when it's complete, you will see the Miui setup page and then you sign into Wifi then you miCloud account.
Edit
@Theevanz
I found a flashable file to restore the persist for the Oreo version of the Chinese Mi8. If you a have global device it will not work. However, I used a program called beyond compare to figure out how this file works. if all goes well, I may have a flashable fix for you tomorrow. I plan to simply make a flashable file that will flash the Global Version of the persist image to the persist partition. You will still need to be fully wiped and formatted, so you do not get a write error message. Don't worry we will get this. I have had the exact same issue happens to me and I was able to get my phone working again.
Click to expand...
Click to collapse
Hi, so i will say the whole issue i had. I will miss out some details along the way as it happened very long ago
So i started installing custom rom for my Dipper and everything was fine until one day that i try to download a app on the playstore that promises to enable camera2API to improve my phone camera quailty . after i gave it root access via magisk and started the process, my phone just went down into a bootloop.
So i reinstalled my rom and my camera was not working , after some digging finally realise my persist was missing.
i tried to use MI FLASH TOOL to try to install back my persist but to no avail.
then i flashed persist from the fastboot rom (Im not sure if it was global or china but im having a global phone) and cleaned (Format data , advance wipe everything ) and reflashed my rom(Pixel experience rom - it was actually quite stable as no one was complaining the same issue) .
then after awhile , my phone start going into a bad state where it would go into a boot loop every 2 weeks or smth like that and then it would say "mount /data/..../..../.../..... (structure needs cleaning)" or sometimes persist. and i will do a clean install (Formatt , advance wipe everything, reboot back into recovery ,flash my rom ) over and over again ever few weeks . until like a few days ago , my phone died at 0 percent and when i plugged in the power bank it said 7 percent (Something wrong with the battery?? ) and i immediately powered it on and that happened .
Now the symptoms of my phone is that it cannot connect to the wifi , neither detect the sim card , no imei , apps will sometimes hang for awhile before responding , while starting it up , it will enter a black screen for ard 1 min before it shows the lock screen .
Thats about all i can think of ....
Update :
I tried the method u suggested on the fastboot flash persist persist.img . but it says partition is write protected , ima go sleep . thanks for the effort . ill send thanks when my 12 per day wears off
Boiisxu said:
Thanks for the guide tsongming.
You have absolutely helped all of us more than once. I've been using custom roms for more than 7 years and I didn't even know what "persist" partition was.
I'm currently using the TWRP made by mauronofrio because I haven't had any issue yet. However, as you explained the only TWRP that can backup the persist partition is LR Team one. Would you suggest me to flash this version and make a backup of the partition and then swap again to my original version of TWRP?
I know the questions is quite WTF but atm asking is free.
Thanks for your help.
Click to expand...
Click to collapse
Absolutely because although that version that you use works, it does not backup the persist partition and DTBO partition individually and it doesn't restore it. ( The problem with restoring persist is that it has to be your persist no else's will work) I would strongly recommend using the LR Team Version simply to make the backup and then store it to your Desktop, then if you ever need it. You will need to use the LR Team version to restore.
You need to backup everything except for:
Data
System
System Image
The partitions I backup are:
Cache
Boot
DTBO
Recovery
Vendor
Vendor Image
Firmware
Persist
Bluetooth
DSP
Cust
Splash
Logo
VBMata
DEVinfo
fsg
EFS
MSADP
APDP
XBL
CMNLIB
keymaster
hyp
TZ
DEVCFG
@ Theevanz
What you describe sounds like a combination of encryption and the persist, it also sounds like you did not flash DM verity on a Rom that called for it. The only version of DM verity that I know to work is the August version, later versions do not work. ( I don't know why)
Yes, when you come back. and click thanks . Remember that the phone must be fully wiped and Formatted.
IT Must be absolutely Formatted, ( type yes, reboot to recovery) wiping alone is not good enough..
The description that you gave, sounds alot like what i was dealing with. but in my case the phone would not even boot after a couple of days.
I have helped quite a few people with this exact issue and flashall.bat alone should work.
Flashall. Bat Steps
Boot to Fastboot
Download fastboot dipper images rom, and use flashall.bat method to restore the phone.
Download dipper_global_images_rom / It has to be a fastboot rom and not a Recovery rom
Unpack the rom twice on your desktop
You will be left with a folder and inside you will see batch files and a image folder.
Doubleclick Flashall.bat ( be careful on what you click, you want flashall.bat only) with the phone attached an in Recovery mode, fastboot or EDL
Flashall.bat is a batch script that will wipe your phone and restore all images, and then boot to system.
You should then Setup rom
Afterwards install TWRP and root then create a full Twrp backup and save to your PC.
tsongming said:
Absolutely because although that version that you use works, it does not backup the persist partition and DTBO partition individually and it doesn't restore it. ( The problem with restoring persist is that it has to be your persist no else's will work) I would strongly recommend using the LR Team Version simply to make the backup and then store it to your Desktop, then if you ever need it. You will need to use the LR Team version to restore.
You need to backup everything except for:
Data
System
System Image
The partitions I backup are:
Cache
Boot
DTBO
Recovery
Vendor
Vendor Image
Firmware
Persist
Bluetooth
DSP
Cust
Splash
Logo
VBMata
DEVinfo
fsg
EFS
MSADP
APDP
XBL
CMNLIB
keymaster
hyp
TZ
DEVCFG
Click to expand...
Click to collapse
Thanks for your reply.
I've downloaded the twrp for android 9 (currently using los16) but it seems that it's a .zip. Can I flash it via TWRP or shall I flash it using fastboot mode?
Moreover, I don't know what actually are those all partitions you backup for.
Boiisxu said:
Thanks for your reply.
I've downloaded the twrp for android 9 (currently using los16) but it seems that it's a .zip. Can I flash it via TWRP or shall I flash it using fastboot mode?
Moreover, I don't know what actually are those all partitions you backup for.
Click to expand...
Click to collapse
Yes its a zip, it will write to the Recovery. if you are nervous you can unpack it and you will see the image, that you can flash instead.
The partitions are selected by default, double check to make sure. These partitions are the one that you need if your partitions are damaged. personally, I have found persist and DBO to be exceptionally useful. However, be sure to back them all up, I have seen issues on other phones where these partition backups are lifesavers.
tsongming said:
Absolutely because although that version that you use works, it does not backup the persist partition and DTBO partition individually and it doesn't restore it. ( The problem with restoring persist is that it has to be your persist no else's will work) I would strongly recommend using the LR Team Version simply to make the backup and then store it to your Desktop, then if you ever need it. You will need to use the LR Team version to restore.
You need to backup everything except for:
Data
System
System Image
The partitions I backup are:
Cache
Boot
DTBO
Recovery
Vendor
Vendor Image
Firmware
Persist
Bluetooth
DSP
Cust
Splash
Logo
VBMata
DEVinfo
fsg
EFS
MSADP
APDP
XBL
CMNLIB
keymaster
hyp
TZ
DEVCFG
Click to expand...
Click to collapse
Sorry, may be i don't understand english so good. I tryed to instal persist (taking .img file from a fastboot ROM Global) partition with your twrp, the process is completed but wifi, signal still not work.
I don't have my backup of that partition because mine doesn't exist any more.
After flashing it i still can't see any file in /persist folder (via twrp) is it normal? Or just cant see folder contenent via twrp?
tsongming said:
@ Theevanz
What you describe sounds like a combination of encryption and the persist, it also sounds like you did not flash DM verity on a Rom that called for it. The only version of DM verity that I know to work is the August version, later versions do not work. ( I don't know why)
Yes, when you come back. and click thanks . Remember that the phone must be fully wiped and Formatted.
IT Must be absolutely Formatted, ( type yes, reboot to recovery) wiping alone is not good enough..
The description that you gave, sounds alot like what i was dealing with. but in my case the phone would not even boot after a couple of days.
I have helped quite a few people with this exact issue and flashall.bat alone should work.
Flashall. Bat Steps
Boot to Fastboot
Download fastboot dipper images rom, and use flashall.bat method to restore the phone.
Download dipper_global_images_rom / It has to be a fastboot rom and not a Recovery rom
Unpack the rom twice on your desktop
You will be left with a folder and inside you will see batch files and a image folder.
Doubleclick Flashall.bat ( be careful on what you click, you want flashall.bat only) with the phone attached an in Recovery mode, fastboot or EDL
Flashall.bat is a batch script that will wipe your phone and restore all images, and then boot to system.
You should then Setup rom
Afterwards install TWRP and root then create a full Twrp backup and save to your PC.
Click to expand...
Click to collapse
I tried again but to no avail. Do i need to do anything before the fastboot?
So heres what i did :
Did not wipe anything or format device (Device was already in MIUI 11)
Power off
Went to fastboot
Got a global fastboot Rom (dipper_global_images_V11.0.6.0.PEAMIXM_20191022.0000.00_9.0_global)
extracted 2 times with 7zip
Put the adb/fastboot files into the extracted rom
Clicked on flash_all.bat
Device rebooted but the issue was no solved
Heres what i realise :
i opened the flash_all file and tried to find the sentence to flash persist but i cant find anything tat says flashing persist . heres my flash_all file from the extracted folder. Should i add a line that says to flash persist?
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *dipper" || echo Missmatching image and device
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *dipper" || exit /B 1
::set CURRENT_ANTI_VER=1
::for /f "tokens=2 delims=: " %%i in ('fastboot %* getvar anti 2^>^&1 ^| findstr /r /c:"anti:"') do (set version=%%i)
::if [%version%] EQU [] set version=0
::if %version% GTR %CURRENT_ANTI_VER% (
:: echo current device antirollback version is greater than this pakcage
:: exit /B 1
:
fastboot %* erase boot || @ECHO "Erase boot error" && exit /B 1
fastboot %* flash crclist %~dp0images\crclist.txt || @ECHO "Flash crclist error" && exit /B 1
fastboot %* flash sparsecrclist %~dp0images\sparsecrclist.txt || @ECHO "Flash sparsecrclist error" && exit /B 1
fastboot %* flash xbl_ab %~dp0images\xbl.img || @ECHO "Flash xbl_ab error" && exit /B 1
fastboot %* flash xbl_config_ab %~dp0images\xbl_config.img || @ECHO "Flash xbl_config_ab error" && exit /B 1
fastboot %* flash abl_ab %~dp0images\abl.img || @ECHO "Flash abl_ab error" && exit /B 1
fastboot %* flash tz_ab %~dp0images\tz.img || @ECHO "Flash tz_ab error" && exit /B 1
fastboot %* flash hyp_ab %~dp0images\hyp.img || @ECHO "Flash hyp_ab error" && exit /B 1
fastboot %* flash devcfg_ab %~dp0images\devcfg.img || @ECHO "Flash devcfg_ab error" && exit /B 1
fastboot %* flash storsec_ab %~dp0images\storsec.img || @ECHO "Flash storsec_ab error" && exit /B 1
fastboot %* flash bluetooth %~dp0images\bluetooth.img || @ECHO "Flash bluetooth error" && exit /B 1
fastboot %* flash cmnlib_ab %~dp0images\cmnlib.img || @ECHO "Flash cmnlib_ab error" && exit /B 1
fastboot %* flash cmnlib64_ab %~dp0images\cmnlib64.img || @ECHO "Flash cmnlib64_ab error" && exit /B 1
fastboot %* flash modem %~dp0images\modem.img || @ECHO "Flash modem error" && exit /B 1
fastboot %* flash dsp %~dp0images\dsp.img || @ECHO "Flash dsp error" && exit /B 1
fastboot %* flash keymaster_ab %~dp0images\keymaster.img || @ECHO "Flash keymaster_ab error" && exit /B 1
fastboot %* flash logo %~dp0images\logo.img || @ECHO "Flash logo_ab error" && exit /B 1
fastboot %* flash misc %~dp0images\misc.img || @ECHO "Flash misc error" && exit /B 1
fastboot %* flash aop_ab %~dp0images\aop.img || @ECHO "Flash aop_ab error" && exit /B 1
fastboot %* flash qupfw_ab %~dp0images\qupfw.img || @ECHO "Flash qupfw_ab error" && exit /B 1
fastboot %* flash ImageFv %~dp0images\imagefv.elf || @ECHO "Flash imagefv error" && exit /B 1
fastboot %* flash vendor %~dp0images\vendor.img || @ECHO "Flash vendor_ab error" && exit /B 1
fastboot %* flash system %~dp0images\system.img || @ECHO "Flash system_ab error" && exit /B 1
fastboot %* flash userdata %~dp0images\userdata.img || @ECHO "Flash userdata error" && exit /B 1
fastboot %* flash recovery %~dp0images\recovery.img || @ECHO "Flash recovery error" && exit /B 1
fastboot %* flash cache %~dp0images\cache.img || @ECHO "Flash cache error" && exit /B 1
fastboot %* erase sec || @ECHO "Erase sec error" && exit /B 1
fastboot %* flash cust %~dp0images\cust.img || @ECHO "Flash cust error" && exit /B 1
fastboot %* flash boot %~dp0images\boot.img || @ECHO "Flash boot error" && exit /B 1
fastboot %* reboot || @ECHO "Reboot error" && exit /B 1
tsongming said:
Yes its a zip, it will write to the Recovery. if you are nervous you can unpack it and you will see the image, that you can flash instead.
The partitions are selected by default, double check to make sure. These partitions are the one that you need if your partitions are damaged. personally, I have found persist and DBO to be exceptionally useful. However, be sure to back them all up, I have seen issues on other phones where these partition backups are lifesavers.
Click to expand...
Click to collapse
So the other file that comes in the .zip is not important?
Boiisxu said:
So the other file that comes in the .zip is not important?
Click to expand...
Click to collapse
No, You just flash the zip, there is a code that tells it to flash to recovery.
I was just letting you know that the image was inside the unpacked zip, and it can be flashed traditionally. Personally, I always flash the zip.
Leoleo96 said:
Sorry, may be i don't understand english so good. I tryed to instal persist (taking .img file from a fastboot ROM Global) partition with your twrp, the process is completed but wifi, signal still not work.
I don't have my backup of that partition because mine doesn't exist any more.
After flashing it i still can't see any file in /persist folder (via twrp) is it normal? Or just cant see folder contenent via twrp?
Click to expand...
Click to collapse
Okay , if your formatted and typed yes ( this is the most important step)
Then you double clicked flash all.bat, you should have seen ADB restore every partition and then from there, install TWRP Recovery, and boot to TWRP. After booting into twrp you can use dd command from adb shell to access persist partition.
@Leoleo96
Edit
Your case is more difficult, I just added Option 5 , try it. This should work.
Theevanz said:
I tried again but to no avail. Do i need to do anything before the fastboot?
So heres what i did :
Did not wipe anything or format device (Device was already in MIUI 11)
Power off
Went to fastboot
Got a global fastboot Rom (dipper_global_images_V11.0.6.0.PEAMIXM_20191022.0000.00_9.0_global)
extracted 2 times with 7zip
Put the adb/fastboot files into the extracted rom
Clicked on flash_all.bat
Device rebooted but the issue was no solved
Heres what i realise :
i opened the flash_all file and tried to find the sentence to flash persist but i cant find anything tat says flashing persist . heres my flash_all file from the extracted folder. Should i add a line that says to flash persist?
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *dipper" || echo Missmatching image and device
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *dipper" || exit /B 1
::set CURRENT_ANTI_VER=1
::for /f "tokens=2 delims=: " %%i in ('fastboot %* getvar anti 2^>^&1 ^| findstr /r /c:"anti:"') do (set version=%%i)
::if [%version%] EQU [] set version=0
::if %version% GTR %CURRENT_ANTI_VER% (
:: echo current device antirollback version is greater than this pakcage
:: exit /B 1
:
fastboot %* erase boot || @ECHO "Erase boot error" && exit /B 1
fastboot %* flash crclist %~dp0images\crclist.txt || @ECHO "Flash crclist error" && exit /B 1
fastboot %* flash sparsecrclist %~dp0images\sparsecrclist.txt || @ECHO "Flash sparsecrclist error" && exit /B 1
fastboot %* flash xbl_ab %~dp0images\xbl.img || @ECHO "Flash xbl_ab error" && exit /B 1
fastboot %* flash xbl_config_ab %~dp0images\xbl_config.img || @ECHO "Flash xbl_config_ab error" && exit /B 1
fastboot %* flash abl_ab %~dp0images\abl.img || @ECHO "Flash abl_ab error" && exit /B 1
fastboot %* flash tz_ab %~dp0images\tz.img || @ECHO "Flash tz_ab error" && exit /B 1
fastboot %* flash hyp_ab %~dp0images\hyp.img || @ECHO "Flash hyp_ab error" && exit /B 1
fastboot %* flash devcfg_ab %~dp0images\devcfg.img || @ECHO "Flash devcfg_ab error" && exit /B 1
fastboot %* flash storsec_ab %~dp0images\storsec.img || @ECHO "Flash storsec_ab error" && exit /B 1
fastboot %* flash bluetooth %~dp0images\bluetooth.img || @ECHO "Flash bluetooth error" && exit /B 1
fastboot %* flash cmnlib_ab %~dp0images\cmnlib.img || @ECHO "Flash cmnlib_ab error" && exit /B 1
fastboot %* flash cmnlib64_ab %~dp0images\cmnlib64.img || @ECHO "Flash cmnlib64_ab error" && exit /B 1
fastboot %* flash modem %~dp0images\modem.img || @ECHO "Flash modem error" && exit /B 1
fastboot %* flash dsp %~dp0images\dsp.img || @ECHO "Flash dsp error" && exit /B 1
fastboot %* flash keymaster_ab %~dp0images\keymaster.img || @ECHO "Flash keymaster_ab error" && exit /B 1
fastboot %* flash logo %~dp0images\logo.img || @ECHO "Flash logo_ab error" && exit /B 1
fastboot %* flash misc %~dp0images\misc.img || @ECHO "Flash misc error" && exit /B 1
fastboot %* flash aop_ab %~dp0images\aop.img || @ECHO "Flash aop_ab error" && exit /B 1
fastboot %* flash qupfw_ab %~dp0images\qupfw.img || @ECHO "Flash qupfw_ab error" && exit /B 1
fastboot %* flash ImageFv %~dp0images\imagefv.elf || @ECHO "Flash imagefv error" && exit /B 1
fastboot %* flash vendor %~dp0images\vendor.img || @ECHO "Flash vendor_ab error" && exit /B 1
fastboot %* flash system %~dp0images\system.img || @ECHO "Flash system_ab error" && exit /B 1
fastboot %* flash userdata %~dp0images\userdata.img || @ECHO "Flash userdata error" && exit /B 1
fastboot %* flash recovery %~dp0images\recovery.img || @ECHO "Flash recovery error" && exit /B 1
fastboot %* flash cache %~dp0images\cache.img || @ECHO "Flash cache error" && exit /B 1
fastboot %* erase sec || @ECHO "Erase sec error" && exit /B 1
fastboot %* flash cust %~dp0images\cust.img || @ECHO "Flash cust error" && exit /B 1
fastboot %* flash boot %~dp0images\boot.img || @ECHO "Flash boot error" && exit /B 1
fastboot %* reboot || @ECHO "Reboot error" && exit /B 1
Click to expand...
Click to collapse
The persist image is inside the folder, you take it out, and try the DD command. I just added Option 5 , try it.
next regarding your error log, You clicked flashall. bat? Remember that the phone must be in fastboot mode and connected to the PC. if you have usb3 ports you will need to use a hub, that converts down to usb 2. You can buy an extender hub practically anywhere for $5
tsongming said:
Okay , if your formatted and typed yes ( this is the most important step)
Then you double clicked flash all.bat, you should have seen ADB restore every partition and then from there, install TWRP Recovery, and boot to TWRP. After booting into twrp you can use dd command from adb shell to access persist partition.
@Leoleo96
Edit
Your case is more difficult, I just added Option 5 , try it. This should work.
Click to expand...
Click to collapse
When type the first code line (option 5) it says
'Invalid sparse file format at header magic
Failed to read sparse file'
Leoleo96 said:
When type the first code line (option 5) it says
'Invalid sparse file format at header magic
Failed to read sparse file'
Click to expand...
Click to collapse
Read the instruction on option 5
You place the image in the user storage /sd card, and use TWRP terminal, it works for countless people on all Xiaomi phones.
@Leoleo96
Try editing the file as indicated here: http://4pda.ru/forum/index.php?s=&showtopic=906971&view=findpost&p=77405784
tsongming said:
The persist image is inside the folder, you take it out, and try the DD command. I just added Option 5 , try it.
next regarding your error log, You clicked flashall. bat? Remember that the phone must be in fastboot mode and connected to the PC. if you have usb3 ports you will need to use a hub, that converts down to usb 2. You can buy an extender hub practically anywhere for $5
Click to expand...
Click to collapse
Option 5 does not work with the error of 'Invalid sparse file format at header magic Failed to read sparse file' (Its in the correct file , /sdcard)
should i try the persist on older version of global miui roms??
i also Tried editing the file as indicated here: http://4pda.ru/forum/index.php?s=&sh...ost&p=77405784 , I ran the file with the added info stated in the forum . when i ran the file through a USB 2.0 , the command prompt stops at the persist command. (I have attached the files that i edited. the batch file has been converted to a txt file cause XDA dont support)
Do you need any other info? Thanks so much !!
tsongming said:
Absolutely because although that version that you use works, it does not backup the persist partition and DTBO partition individually and it doesn't restore it. ( The problem with restoring persist is that it has to be your persist no else's will work) I would strongly recommend using the LR Team Version simply to make the backup and then store it to your Desktop, then if you ever need it. You will need to use the LR Team version to restore.
Click to expand...
Click to collapse
If backup is taken before the persist problem with this TWRP, only restoring the backup will solve the problem when problem occurs? Or have to wipe/format phone again? And you are using this TWRP for quite a long time. Have you faced persist/any problem till now?
Thanks
Related
UPDATE4: New Treble guide is posted here. Ask all your questions here that aren't specific to other parts of Treble (e.g. the ROM or the TWRP). Thread lock requested. Thanks all!
UPDATE3: The new TWRP Installer with Treble Manager (for guided repartitioning) is now released. See this thread.
UDPATE2: Experimental RR builds for Treble is now released. This contains the required Vendor Pack for GSI use. See this thread.
UPDATE: We have succeed in booting a Phh-Treble GSI! See screenshot at Post #57. Stay tuned for user releases!
This thread will be kept for posterity, but I will request locking once we release stuff. Thanks you all for the support, and thanks to @ghpranav for lots of help and @phhusson for pointing me in the right direction on the last stretch.
Original post below
----------------------------------------------
Alright, here is my WIP guide for converting the Mi A1 to a Treble device and ROM.
NOT FOR NEWBIES. This is all manual stuff right now and if you do something wrong you CAN firm-brick your device! The project is incomplete and for developers/researchers only.
Please refrain from "good luck" and "can't wait for this" and "OMG you are the King of Kings ComsicDan, plz have my babies" and such posts.
Also note that you will NEED to get into EDL mode to restore stock partition table, if you need to, by flashing stock factory image with MiFlash or my Low-Level Backup Tool. MiFlash will WIPE your Userdata completely and your persist so you MUST make a low-level backup to restore original persist.img, and manually backup internal storage. But really it's perfectly fine to keep using a non-treble ROM even with partition table changes (there's no need to revert for any functional reason that I can think of, unless you somehow get a ROM that's bigger than 2.4GB). Note that the final update ZIP that will automatically repartition can also restore stock partitions, without the need for EDL stuff.
Prerequisite - Low-level backup, TWRP backup and Internal Storage backup
First make a full backup of all partitions, via EDL (low-level which gets all partitions). You can use my new Low-Level tool here. I recommend using the skip-systems-and-userdata list since it takes like an hour, and you can backup system/userdata faster in TWRP and PC manually.
Make a full TWRP backup of our current ROM. System needs to be erased during this procedure. After re-partitioning however, you can simply restore this backup (unless your system is > 2.4GB for some reason, which is very unlikely).
Make a full manual backup of your internal storage files to PC. Userdata partition needs to be completely erased if/when you restore the original stock partitions and firmware. You can postpone this process to later however, for if/when you want to actually restore to stock partition layour.
Phase 1 - Repartition device for vendor_a and vendor_b
This is relatively simple. Our device has a standard GPT table, so we can use sgdisk which is already included in our TWRP build.
Boot into recovery and fire up an adb shell
View current partition table...
Code:
sgdisk /dev/block/mmcblk0 --print
...and confirm these values...
Code:
...
25 1185792 7477247 3.0 GiB FFFF system_a
26 7477248 13768703 3.0 GiB FFFF system_b
...
49 14550032 61071326 22.2 GiB FFFF userdata
The important values are the partition numbers (25, 26 and 49), and the next two numbers for both system partitions (start/end sectors). The start/end sector of userdata isn't important, only the partition number of 49 is. If your sector start/ends are different, you will need to adjust some of the values in these steps - that's up to you to figure out. But do please let me know what your differences are, for science.
Remove system_a, and create a new system_a partition of size ~2.4GB. Don't worry, this is plenty - my current RR build with a heavy AROMA Gapps is only ~1.9GB. We're taking off ~600MB, which is 1228800 sectors (600*1024*1024/512) so the new end sector will be 6248447 (7477247 - 1228800):
Code:
sgdisk /dev/block/mmcblk0 --delete 25
sgdisk /dev/block/mmcblk0 --new=25:1185792:6248447
sgdisk /dev/block/mmcblk0 --change-name=25:system_a
Create vendor_a with the reclaimed ~600MB:
Code:
sgdisk /dev/block/mmcblk0 --new=50:6248448:7477247
sgdisk /dev/block/mmcblk0 --change-name=50:vendor_a
...notice the partition number of 50 - one after the userdata (49).
Do similarly to above, only for system_b and vendor_b:
Code:
sgdisk /dev/block/mmcblk0 --delete 26
sgdisk /dev/block/mmcblk0 --new=26:7477248:12539903
sgdisk /dev/block/mmcblk0 --change-name=26:system_b
sgdisk /dev/block/mmcblk0 --new=51:12539904:13768703
sgdisk /dev/block/mmcblk0 --change-name=51:vendor_b
Quit shell and reboot recovery...
Code:
adb reboot recovery
...and verify the new partitions exist...
Code:
adb shell ls -la /dev/block/bootdevice/by-name/
...should show this at the bottom...
Code:
...
lrwxrwxrwx 1 root root 21 Jan 5 1970 userdata -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 Jan 5 1970 vendor_a -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 Jan 5 1970 vendor_b -> /dev/block/mmcblk0p51
Repartition is done! You can now restore your TWRP backup (only system) and system works perfectly as before.
Roadblocks of Phase 1
How best to deliver this partition table change to users? The obvious answer is an update ZIP that just scripts it all (that's why I used sgdisk in this write-up). But then this requires the user to manually backup, reboot recovery, then restore backup. Is that ideal?
Another solution would be to export the new GPT, and make a MiFlash-flashable package. This could be another option for future, but would require new system and vendor images too - may as well be a whole flash package. That's big. We'll look into that once we actually get a Treble ROM working (e.g. stock).
Phase 1b revert - Restore stock partition map
If you want to go back to original partition table for some reason, you will need to flash an official fastboot ROM via EDL mode in MiFlash. After researching, I have discovered that there is no way around this. The way MiFlash works is it actually adjusts the GPT info dynamically based on *your* partition map (64GB vs 32GB have different userdata sizes) and for this to be done it needs to flash a full package. So, to restore stock partition map, you must flash a stock ROM in MiFlash via EDL mode which wipes everything. I hope you made a low-level and internal-storage backup like I warned - because after that you'll want to restore your backup to get persist and stuff back. Flashing in fastboot mode is not enough because it does not restore stock partition table.
Full steps for restoring to stock:
Boot into EDL mode
Load MiFlash, select any Oreo fastboot image (I use 8.1.10 since it's what I have) > Refresh. Should show COM30 (or whatever your QDLoader COM port is).
Reboot EDL by holding Power + VolDown and then 'fastboot oem edl' again
Run the restore in my Low-level flash tool of your backup
Reboot back into recovery by holding power + volume-up for ~10 seconds.
"Skip" on password screen
Wipe > Format Data > type "yes" to remove stock ROM encryption
Restore your TWRP backup
Done!
Phase 2 - Patch kernel DTB and TWRP
This requires Linux. I use ChaletOS in VirtualBox and have my home folder Samba shared, mapped to a network drive on my Windows host.
Probably when all this is finalized and working, we will use a custom kernel built from source. But for now lets just patch our existing kernel. I assume you already have TWRP installed.
Part 1 - Kernel DTB
Download the DTB split tool from:
https://github.com/dianlujitao/split-appended-dtb
...to your Linux machine. Just get the binary, not the .c source file.
Dump existing boot.img while in TWRP and pull from device:
Code:
adb shell dd if=/dev/block/bootdevice/by-name/boot of=/tmp/boot.img
adb pull /tmp/boot.img
Unpack this boot.img. I use AIK by @osm0sis from:
https://forum.xda-developers.com/showthread.php?t=2073775
... In this case, we need boot.img-zImage. Copy it to the Linux machine folder with DTB split.
Split DTB from zImage on Linux machine:
Code:
./split-appended-dtb boot.img-zImage
...should produce 1 DTB. Total output will be two files - "kernel" and "dtbdump_1.dtb".
Decompile DTB on Linux machine:
Code:
# if you need to install it
sudo apt install device-tree-compiler
dtc -O dts -I dtb -o dtbdump_1.dts dtbdump_1.dtb
Edit dtbdump_1.dts in whatever text editor. Search for fstab and edit the vendor entry, adding "slotselect" to fsmgr_flags (so it's the same as system):
Code:
fsmgr_flags = "wait,slotselect";
NOTE: This is on my RR kernel. I need to check any difference with stock or other kernels.
Recompile the dts to dtb and build a new zImage:
Code:
dtc -O dtb -I dts -o dtbdump_1_new.dtb dtbdump_1.dts
cat kernel dtbdump_1_new.dtb > boot.img-zImage.new
Copy the boot.img-zImage.new back to your kernel kitchen tool, replacing the old one.
That's the device tree patched to mount seamless/slot vendor. But don't repack the boot.img yet, we need to edit RAMDisk.
Part 2 - TWRP patch
This is just so we can see Vendor (and Persist, because why not) in TWRP. This is so:
Vendor can be formatted (required before use), backed up/restored and flashed to
[Bonus] Persist can be backed up/restored and flashed to (for e.g. Persist repair ZIP's that should come soon).
Only one step is needed - edit /etc/recovery.fstab to add vendor mount (and also persist because why not) with flags:
Code:
/vendor ext4 /dev/block/bootdevice/by-name/vendor flags=slotselect;backup=1;wipeingui;display="Vendor"
/persist ext4 /dev/block/bootdevice/by-name/persist flags=backup=1;display="Persist"
That's it.
For your convenience, I have attached a Treble-modded TWRP installer to this thread with these changes. Don't forget to flash Magisk after re-installing TWRP. Big thanks to @ghpranav
Phase 3 - Compile a Treble ROM (for Vendor files)
Already succeeded. We just need to cleanup and push.
Phase 4 - Treble-ize an installed ROM
Is this possible? Not sure... I'll check it out later sometime
Did I miss anything? Probably. Let me know!
I just realized we could use resize2fs to first shrink the system filesystem, and that would save a reboot step. Obviously a TWRP should be done first anyway, though.
Oh, but a reboot would still be necessary for TWRP to see the vendor partition so it can be written to. So... That seems pointless I think.
Hmm...
Just finished reading everything. You did a wonderful job explaining this and I'm eager to test this out even if my device is my daily driver. With that being said, I really hope inexperienced users would stay away from this thread and refrain asking silly questions. I especially want them to stay away from complaining that they bricked their device, etc etc. By the looks of this, it should be easy considering you got the partition sectors noted down and most if not all users have the 64GB variant. It should be fairly easy making the ROM boot as long as it caters to A/B partitioning (already available in XDA) and that the Vendor HALs wouldn't cause further trouble.
With all of that, I'm looking forward to testing Android P as soon as we got treble tested up and running.
Thanks for taking your time to explain this thoroughly and I appreciate all the efforts you've put into this, especially automating the process by making a backup tool and hopefully, a working TWRP for Treble.
Looking at the Treble threads, I see some devs have started working on Android P. Link here.
Sent from my Xiaomi Mi A1 using XDA Labs
joeyhuab said:
Just finished reading everything. You did a wonderful job explaining this and I'm eager to test this out even if my device is my daily driver. With that being said, I really hope inexperienced users would stay away from this thread and refrain asking silly questions. I especially want them to stay away from complaining that they bricked their device, etc etc. By the looks of this, it should be easy considering you got the partition sectors noted down and most if not all users have the 64GB variant. It should be fairly easy making the ROM boot as long as it caters to A/B partitioning (already available in XDA) and that the Vendor HALs wouldn't cause further trouble.
With all of that, I'm looking forward to testing Android P as soon as we got treble tested up and running.
Thanks for taking your time to explain this thoroughly and I appreciate all the efforts you've put into this, especially automating the process by making a backup tool and hopefully, a working TWRP for Treble.
Looking at the Treble threads, I see some devs have started working on Android P. Link here.
Sent from my Xiaomi Mi A1 using XDA Labs
Click to expand...
Click to collapse
Thanks mate! Yep I've seen them but based on Phh's work, at least Oreo Treble GSI depends on VTS which isn't released yet. So I'm not sure how long until we get it.
I just learned that in order to get stock GPT back you basically have to fully erase the device via flash_factory in MiFlash. Technical details added to the OP.
So, apart from low-level flash, you will also want to backup internal storage before reverting - since factory flash wipes absolutely everything and TWRP won't backup storage. Then of course you can use my low-level tool to restore partitions via EDL to get your (e.g.) persist and stuff back, then restore the associated TWRP backup.
Just a reminder ,
EDL mode uses rawprogram0 , prog_emmc_firehose_8953_ddr.mbn , patch0 or partition isn't it ? Flash_factory will erase all the partition and causes device lost of IMEI , ESN, PSN and others sensors settings . and only flash-able during Fastboot mode .
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *tissot" || @ECHO "error : Missmatching image and device" & exit /B 1
fastboot %* oem unlock || @ECHO "unlock error" & exit /B 1
fastboot %* flash partition %~dp0images\gpt_both0.bin || @ECHO "Flash gpt_both0 error" & exit /B 1
fastboot %* flash modem_a %~dp0images\NON-HLOS.bin || @ECHO "Flash modem_a error" & exit /B 1
fastboot %* flash modem_b %~dp0images\NON-HLOS.bin || @ECHO "Flash modem_b error" & exit /B 1
fastboot %* flash sbl1 %~dp0images\sbl1.mbn || @ECHO "Flash sbl1 error" & exit /B 1
fastboot %* flash sbl1bak %~dp0images\sbl1.mbn || @ECHO "Flash sbl1bak error" & exit /B 1
fastboot %* flash rpm %~dp0images\rpm.mbn || @ECHO "Flash rpm error" & exit /B 1
fastboot %* flash rpmbak %~dp0images\rpm.mbn || @ECHO "Flash rpmbak error" & exit /B 1
fastboot %* flash tz %~dp0images\tz.mbn || @ECHO "Flash tz error" & exit /B 1
fastboot %* flash tzbak %~dp0images\tz.mbn || @ECHO "Flash tzbak error" & exit /B 1
fastboot %* flash devcfg %~dp0images\devcfg.mbn || @ECHO "Flash devcfg error" & exit /B 1
fastboot %* flash devcfgbak %~dp0images\devcfg.mbn || @ECHO "Flash devcfgbak error" & exit /B 1
fastboot %* flash dsp %~dp0images\adspso.bin || @ECHO "Flash dsp error" & exit /B 1
fastboot %* flash fsg %~dp0images\fs_image.tar.gz.mbn.img || @ECHO "Flash fs_image error" & exit /B 1
fastboot %* flash sec %~dp0images\sec.dat || @ECHO "Flash sec error" & exit /B 1
fastboot %* flash splash %~dp0images\splash.img || @ECHO "Flash splash error" & exit /B 1
fastboot %* flash aboot %~dp0images\emmc_appsboot.mbn || @ECHO "Flash aboot error" & exit /B 1
fastboot %* flash abootbak %~dp0images\emmc_appsboot.mbn || @ECHO "Flash abootbak error" & exit /B 1
fastboot %* flash boot_a %~dp0images\boot.img || @ECHO "Flash boot_a error" & exit /B 1
fastboot %* flash boot_b %~dp0images\boot.img || @ECHO "Flash boot_b error" & exit /B 1
fastboot %* flash system_a %~dp0images\system.img || @ECHO "Flash system_a error" & exit /B 1
fastboot %* flash system_b %~dp0images\system.img || @ECHO "Flash system_a error" & exit /B 1
fastboot %* flash lksecapp %~dp0images\lksecapp.mbn || @ECHO "Flash lksecapp error" & exit /B 1
fastboot %* flash lksecappbak %~dp0images\lksecapp.mbn || @ECHO "Flash lksecappbak error" & exit /B 1
fastboot %* flash cmnlib %~dp0images\cmnlib.mbn || @ECHO "Flash cmnlib error" & exit /B 1
fastboot %* flash cmnlibbak %~dp0images\cmnlib.mbn || @ECHO "Flash cmnlibbak error" & exit /B 1
fastboot %* flash cmnlib64 %~dp0images\cmnlib64.mbn || @ECHO "Flash cmnlib64 error" & exit /B 1
fastboot %* flash cmnlib64bak %~dp0images\cmnlib64.mbn || @ECHO "Flash cmnlib64bak error" & exit /B 1
fastboot %* flash keymaster %~dp0images\keymaster.mbn || @ECHO "Flash keymaster error" & exit /B 1
fastboot %* flash keymasterbak %~dp0images\keymaster.mbn || @ECHO "Flash keymasterbak error" & exit /B 1
fastboot %* flash userdata %~dp0images\userdata.img || @ECHO "Flash userdata error" & exit /B 1
fastboot %* flash persist %~dp0images\persist.img || @ECHO "Flash persist error" & exit /B 1
fastboot %* erase modemst1
fastboot %* erase modemst2
fastboot %* erase config || @ECHO "Erase config error" & exit /B 1
fastboot %* reboot bootloader
ping 127.0.0.1 -n 5 -w 1000 > nul
fastboot %* set_active a
fastboot %* reboot
also , those code are NOT compatible for Mi A1 as modem uses modem.img not NON-HLOS.bin, sbl.img not sbl.mbn etc . for more information you may compare with flash_all with flash_factory .
well just curious i read whole thread but i didn't get that is
repartitioning affect A/B partition system or
we are lucky and have A/B and Treble both at same time?
also except developer if someone tries and flash this successfully then do post SS ???
p.s don't tell me to try it neither i am developer or researcher ?
Regards
JoKeRLeE said:
*snip*
Click to expand...
Click to collapse
Yes you are right, flash_factory is only for fastboot mode. It doesn't matter what is chose when in EDL mode as it will flash everything.
But I think EDL mode is still needed, since MiFlash recalculates the partition table. Maybe it does in fastboot mode too but I don't know, it just flashes to "partition" via fastboot.
YMMV. I do it in EDL and it works fine.
Don't know or care if any of the firmware files are incompatible (are you sure? That seems strange if so, why would they be in the A1 package if they're not) since we restore a backup from my tool anyway which does all partitions exactly how they were on your device. The only purpose of MiFlash in this case is to rewrite partition table.
murtaza1326 said:
well just curious i read whole thread but i didn't get that is
repartitioning affect A/B partition system or
we are lucky and have A/B and Treble both at same time?
also except developer if someone tries and flash this successfully then do post SS ??? regards
p.s don't tell me to try it neither i am developer or researcher ?
Regards
Click to expand...
Click to collapse
Yes, as you can see it's "vendor_a" and "vendor_b", one for each slot.
There are no screenshots lol, unless you want to see a screenshot of TWRP with a Vendor mount listing ? ?
CosmicDan said:
Yes, as you can see it's "vendor_a" and "vendor_b", one for each slot.
There are no screenshots lol, unless you want to see a screenshot of TWRP with a Vendor mount listing ? ?
Click to expand...
Click to collapse
well yeah i missed that
about screen shot that treble app on playstore or any other thing which state both
also i wonder if GSI images are flashable or moded treble roms should be there ?
Interesting.
As i know, we also need to work with .dts to make it possible with treble inside kernel source with A/B partition layout.
murtaza1326 said:
well yeah i missed that
about screen shot that treble app on playstore or any other thing which state both
also i wonder if GSI images are flashable or moded treble roms should be there ?
Click to expand...
Click to collapse
Not there yet mate, patience ?
khusika said:
Interesting.
As i know, we also need to work with .dts to make it possible with treble inside kernel source with A/B partition layout.
Click to expand...
Click to collapse
Really? This might be what I'm stuck on. No idea what it is though.
I just get recovery loop if I try to Treble-ize a ROM, and GSI's kick me to fastboot. I was suspecting that it could be kernel, but I am seeking help from Phh about it.
Do you have any links that might point me in the right direction? Meanwhile I'll see what I find in Google.
Great job. Just a question, if you restore by doing flash_factory.bat - it deletes your IMEI, or not?
CosmicDan said:
Really? This might be what I'm stuck on. No idea what it is though.
I just get recovery loop if I try to Treble-ize a ROM, and GSI's kick me to fastboot. I was suspecting that it could be kernel, but I am seeking help from Phh about it.
Do you have any links that might point me in the right direction? Meanwhile I'll see what I find in Google.
Click to expand...
Click to collapse
I'll try to provide treble for A/B with the kernel, in the next day
TrueMS said:
Great job. Just a question, if you restore by doing flash_factory.bat - it deletes your IMEI, or not?
Click to expand...
Click to collapse
Maybe. I don't know. It's kind of a moot point because if it does, my low-level backup tool will backup and restore it anyway.
khusika said:
I'll try to provide treble for A/B with the kernel, in the next day
Click to expand...
Click to collapse
Cool beans!
I was reading on Android source docs that it might be related to early mount (vboot or whatever our device uses) missing vendor. So there's still leads to work on. But no rush, whenever you can
Oh BTW, if it's compatible with stock blobs would be good (i.e. stock kernel/ROM). Using stock vendor seems like the ideal way to go.
We can use /b partition as vendor making phone /a system only without use of edl (this makes more easy recover this partition). Also if we have /cust we can use it as vendor without repartition only with recovery/kernel support.
I think it's not ideal
xemisxu said:
We can use /b partition as vendor making phone /a system only without use of edl (this makes more easy recover this partition). Also if we have /cust we can use it as vendor without repartition only with recovery/kernel support.
Click to expand...
Click to collapse
As no one wants to get rid of A/B in exchange of Treble! Both are important! And Google is pushing hard OEMs to implement A/B in near future! So, both are actually important! Moreover getting rid of it seems loosing integrity to me!
As far I know, A1 doesn't have a /cust partition!
BTW, as @CosmicDan has found a way to re-partiton, then there's no point of getting rid of anything!
And to me using /b as vendor is awful waste of space! 3 GB for vendor... Seriously?!?:cyclops:
He is using (or we need) 600*2=1200MB though!
I think he could shrink some spaces from /data instead of system! But it seems he got the 32 GB variant!
Just kidding LoL!:laugh::laugh::laugh:
SomratMJX said:
As no one wants to get rid of A/B in exchange of Treble! Both are important! And Google is pushing hard OEMs to implement A/B in near future! So, both are actually important! Moreover getting rid of it seems loosing integrity to me!
As far I know, A1 doesn't have a /cust partition!
BTW, as @CosmicDan has found a way to re-partiton, then there's no point of getting rid of anything!
And to me using /b as vendor is awful waste of space! 3 GB for vendor... Seriously?!?:cyclops:
He is using (or we need) 600*2=1200MB though!
I think he could shrink some spaces from /data instead of system! But it seems he got the 32 GB variant!
Just kidding LoL!:laugh::laugh::laugh:
Click to expand...
Click to collapse
LoL , Repartiton system is the best choice . i don't think user want to waste another 1.2GB for Vendor partition ... just my thought
JoKeRLeE said:
LoL , Repartiton system is the best choice . i don't think user want to waste another 1.2GB for Vendor partition ... just my thought
Click to expand...
Click to collapse
Just thinking how much space Android P and beyond will need in /system!
SomratMJX said:
As no one wants to get rid of A/B in exchange of Treble! Both are important! And Google is pushing hard OEMs to implement A/B in near future! So, both are actually important! Moreover getting rid of it seems loosing integrity to me!
As far I know, A1 doesn't have a /cust partition!
BTW, as @CosmicDan has found a way to re-partiton, then there's no point of getting rid of anything!
And to me using /b as vendor is awful waste of space! 3 GB for vendor... Seriously?!?:cyclops:
He is using (or we need) 600*2=1200MB though!
I think he could shrink some spaces from /data instead of system! But it seems he got the 32 GB variant!
Just kidding LoL!:laugh::laugh::laugh:
Click to expand...
Click to collapse
Sure,re-partition is the best option cause we dont have /cust partition.
I know that 5x have it but i didn know if A1 have it.
Ty for answer!
SomratMJX said:
Just thinking how much space Android P and beyond will need in /system!
Click to expand...
Click to collapse
Android P Dev Preview 2 for Mi Mix 2s is around 1.4GB in size.
Based it from here: http://bigota.d.miui.com/8.5.3/polaris_dp_global_images_8.5.3_20180503.0000.00_9.0_ef2f024b87.tgz
So it should be the around the same size for our treble.
Yeah guys, ROM's are not big anymore since Google themselves don't bother doing odex'ing (or ART'ing, whatever you want to call it now; you know like odex/deodex) since they know that most system apps just get updated from Play Store anyway and their odex goes on userdata. Also in modern Android apps can run fast before full odex/ART optimisation (that's why we have such fast booting)
Yeah I'm 32GB, it's fine I have plenty of space (we have microSD remember lol). But vendor_a and vendor_b is the way it should be for compatibility. It also keeps the doors open for dual boot in future
I don't want to mess around with resizing data. 2.4GB for System and 600MB for vendor is a comfortable figure.
Hello guys how's going?
I do own a Xiaomi MI8 Global Version (running in BRAZIL network/carrier)
I've been running xiaomi.eu BETA for the last 4 months and everything was fine, running fast, stable and reliable.
A few weeks ago a weekly update (9.5.16 beta i guess) just broke my data signal. So since version 9.5.16, i do experience network issues such as:
-no network
- no 3g/4g connection etc.
Sometimes it works and sometimes it doesn't work at all.
And there's always a message onscreen which says:
network connection failed
What should i do to fix this issue?
I've already tried some steps like:
- downgrade miui.eu to 9.5.9
- downgrande to miui.eu STABLE
But none of these steps fixed this issue.
AFAIK, its something related to a firmware update which almost destroyed my radio/modem.
Can i just update a new MODEM.IMG file? If so, what would be the correct step to do this?
I've just found a lot of firmwares XXX on xiaomifirmwareupdater website and i thought that i could update this one for example (V10.3.2.0.PEAMIX). Is that a good version to try or should i try V10.2.3.0.PEAMIXM ?
Would that fix my issue? Can i flash this firmware using TWRP dirty method?
Or do i need to extract all the files and just update the MODEM.IMG file. Again, how should i do it?
Sorry for all that questions but since i use my smartphone for business , i've been experience a nightmare for the last 3 weeks with 3G/4G signal failing constantly.
Thanks in advance
Aramys
aramyscampos said:
Hello guys how's going?
I do own a Xiaomi MI8 Global Version (running in BRAZIL network/carrier)
I've been running xiaomi.eu BETA for the last 4 months and everything was fine, running fast, stable and reliable.
A few weeks ago a weekly update (9.5.16 beta i guess) just broke my data signal. So since version 9.5.16, i do experience network issues such as:
-no network
- no 3g/4g connection etc.
Sometimes it works and sometimes it doesn't work at all.
And there's always a message onscreen which says:
network connection failed
What should i do to fix this issue?
I've already tried some steps like:
- downgrade miui.eu to 9.5.9
- downgrande to miui.eu STABLE
But none of these steps fixed this issue.
AFAIK, its something related to a firmware update which almost destroyed my radio/modem.
Can i just update a new MODEM.IMG file? If so, what would be the correct step to do this?
I've just found a lot of firmwares XXX on xiaomifirmwareupdater website and i thought that i could update this one for example (V10.3.2.0.PEAMIX). Is that a good version to try or should i try V10.2.3.0.PEAMIXM ?
Would that fix my issue? Can i flash this firmware using TWRP dirty method?
Or do i need to extract all the files and just update the MODEM.IMG file. Again, how should i do it?
Sorry for all that questions but since i use my smartphone for business , i've been experience a nightmare for the last 3 weeks with 3G/4G signal failing constantly.
Thanks in advance
Aramys
Click to expand...
Click to collapse
You certainly could extract the modem from the firm and reflash it, it just dirty reflash the rom that you are currently using.
Another option , that I would personally choose is to install Mi-Globe, its based on the same rom that you are using but its more up to date and has many additional features
Get the rom here: https://mi-globe.com/rom-builder-features/?id=14&codename=dipper&phone=Mi+8
Notice that you build your own rom and can choose which features you want. So make sure to choose your region and click which features you want or do not want.
By the way, this is the last beta build of Miui 10 per Xiaomi wanting to focus on the stable builds.
Thanks for the reply my friend.
What is the correct procedure to reflash the modem file? Can i do It using TWRP ir just using fastboot?
And next week i'll flash the MiGlobe ROM. Thanks for the tip.
Regards
Aramys
tsongming said:
You certainly could extract the modem from the firm and reflash it, it just dirty reflash the rom that you are currently using.
Another option , that I would personally choose is to install Mi-Globe, its based on the same rom that you are using but its more up to date and has many additional features
Get the rom here: https://mi-globe.com/rom-builder-features/?id=14&codename=dipper&phone=Mi+8
Notice that you build your own rom and can choose which features you want. So make sure to choose your region and click which features you want or do not want.
By the way, this is the last beta build of Miui 10 per Xiaomi wanting to focus on the stable builds.
Click to expand...
Click to collapse
aramyscampos said:
Thanks for the reply my friend.
What is the correct procedure to reflash the modem file? Can i do It using TWRP ir just using fastboot?
And next week i'll flash the MiGlobe ROM. Thanks for the tip.
Regards
Aramys
Click to expand...
Click to collapse
Agai, I would recommend that you simply dirty flash your current rom, as long as you have an updated root you will not have issues.
I have flashed separated image files a billion times on other phones but have never had the need to do it on my Mi8 so I will provide the steps to you and I am pretty sure that you will be fine, as I am not aware of any potential conflict. However, follow these steps at your own risk.
Download this fastboot rom, it's the global stable and I know for a fact that this file includes the flashall script so it also includes the separate images including the modem.img ( Just extract it from the room, after decompressing the zip file)
You can use ADB : fastboot flash modem modem.img
After booting, you need to reset your network mode to suit your location and carrier such as, Global or WCDMA/LTE etc.
See contents of my copy of that file. If I had time, I could make a flashable zip file. But I will get around to doing that sometime soon and make a post to share with the community.
Hello @tsongming how's going friend?
I've updated the modem.img file successfully but unfortunately it didn't fix my issue.
I've tried the modem files from those stable firmwares:
V10.3.2.0.PEAMIXM
V10.2.3.0.PEAMIXM
After each update, i've applied the "Reset nework settings "
But in the end, i still got that damned "network connection failed" error.
aramyscampos said:
Hello @tsongming how's going friend?
I've updated the modem.img file successfully but unfortunately it didn't fix my issue.
I've tried the modem files from those stable firmwares:
V10.3.2.0.PEAMIXM
V10.2.3.0.PEAMIXM
After each update, i've applied the "Reset nework settings "
But in the end, i still got that damned "network connection failed" error.
Click to expand...
Click to collapse
Have you tried deleting your Apn's and re- entering the one that you use?
If so, you will probably need to start fresh by wiping and formatting storage (type yes) reboot to twrp then reinstall your preferred rom....use the all in one tool to wipe encryption. You will lose all of your data, so back it up.
If that doesn't work, you may need to use qost and restore your qcn.
Not solved!!!
tsongming said:
Have you tried deleting your Apn's and re- entering the one that you use?
If so, you will probably need to start fresh by wiping and formatting storage (type yes) reboot to twrp then reinstall your preferred rom....use the all in one tool to wipe encryption. You will lose all of your data, so back it up.
If that doesn't work, you may need to use qost and restore your qcn.
Click to expand...
Click to collapse
Hello my friend @tsongming
I've done the steps above :
1-) Full backup, including a nandroid one.
2-) Formatting storage and then rebooted to recovery.
3-) Flashed MI-Globe and wiped cache/dalvik after the installation
Everything went fine and my problem seems to be fixed. I will run some test tomorrow , but for now, 3G/4G is fully operational.
Thanks a lot again.
Regards
UPDATE: STILL THE SAME DAMNED ERROR!!! GZUZ!!! NETWORK CONNECTION FAILED!!! NO WAY!!:crying::crying::crying::crying:
aramyscampos said:
Hello my friend @tsongming
I've done the steps above :
1-) Full backup, including a nandroid one.
2-) Formatting storage and then rebooted to recovery.
3-) Flashed MI-Globe and wiped cache/dalvik after the installation
Everything went fine and my problem seems to be fixed. I will run some test tomorrow , but for now, 3G/4G is fully operational.
Thanks a lot again.
Regards
UPDATE: STILL THE SAME DAMNED ERROR!!! GZUZ!!! NETWORK CONNECTION FAILED!!! NO WAY!!:crying::crying::crying::crying:
Click to expand...
Click to collapse
So it was working until it failed? and you deleted and manually re-entered your APN's?
That is strange, everything that you have tried should had worked. Are you sure that you didn't accidentally delete your persist file? Remove that file can cause issues like that.
Another possibility is that there could be an issue with your sim card. Try taking it out and restarting to phone to system then shut it down again.
Taka lint free cloth and wipe the card and reinsert it.
My brother had an issue similar to your issue on his Redmi Note 6 Pro, he ended up resolving his issue by getting a new sim card from his carrier...it happens.
There are still plenty of things to try
There are fast simple things to try and there are steps that are more difficult and potentially risky. Try what I mentioned and if that doesn't work , create a TWRP backup and check to see if you are able to backup the persist image.
When the persist image is deleted weird things can happen with WIFI, Bluetooth, Data, or Signals
You can read the persist solution here : https://forum.xda-developers.com/showpost.php?p=79824537&postcount=2
I expect that that will finally solve it. Unfortunately these types of issues are stressful because sometimes the resolution is simple and easy and other times the steps are more dramatic. its all part of troubleshooting, so we can't/shouldn't just jump to worst case scenario.
Which leaves the last method, if the above doesn't work you can use a tool called QPST. It's made by Qualcomm, and unless there is very unlikely hardware damage ( such as liquid) then QPST will usually fix the issue. The steps for using QPST are much more technical and I don't already have those steps typed. So try the above and let me know.
tsongming said:
So it was working until it failed? and you deleted and manually re-entered your APN's?
That is strange, everything that you have tried should had worked. Are you sure that you didn't accidentally delete your persist file? Remove that file can cause issues like that.
Another possibility is that there could be an issue with your sim card. Try taking it out and restarting to phone to system then shut it down again.
Taka lint free cloth and wipe the card and reinsert it.
My brother had an issue similar to your issue on his Redmi Note 6 Pro, he ended up resolving his issue by getting a new sim card from his carrier...it happens.
There are still plenty of things to try
There are fast simple things to try and there are steps that are more difficult and potentially risky. Try what I mentioned and if that doesn't work , create a TWRP backup and check to see if you are able to backup the persist image.
When the persist image is deleted weird things can happen with WIFI, Bluetooth, Data, or Signals
You can read the persist solution here : https://forum.xda-developers.com/showpost.php?p=79824537&postcount=2
I expect that that will finally solve it. Unfortunately these types of issues are stressful because sometimes the resolution is simple and easy and other times the steps are more dramatic. its all part of troubleshooting, so we can't/shouldn't just jump to worst case scenario.
Which leaves the last method, if the above doesn't work you can use a tool called QPST. It's made by Qualcomm, and unless there is very unlikely hardware damage ( such as liquid) then QPST will usually fix the issue. The steps for using QPST are much more technical and I don't already have those steps typed. So try the above and let me know.
Click to expand...
Click to collapse
Hello my friend @tsongming how's going?
Bad news.
I've just bought a new sim card, and i was expecting that it would fix my issue, but it didn't work.
I'm 100% sure that i didn't mess with that persist image. The smartphone was working perfectly and suddently after some OTA update from xiaomi.eu, it started showing that error message.
So my last option would be to use that QPST Tool that you mentioned on the last message? Do you have any tutorial for this tool?
Thanks in advance
Aramys
aramyscampos said:
Hello my friend @tsongming how's going?
Bad news.
I've just bought a new sim card, and i was expecting that it would fix my issue, but it didn't work.
I'm 100% sure that i didn't mess with that persist image. The smartphone was working perfectly and suddently after some OTA update from xiaomi.eu, it started showing that error message.
So my last option would be to use that QPST Tool that you mentioned on the last message? Do you have any tutorial for this tool?
Thanks in advance
Aramys
Click to expand...
Click to collapse
Hello
Just to update my problem.
I've done the partion.img trick, which u told me above.
The process was done perfectly on TWRP without issues.
But after that, i've tested the device again and i still got that error message.
aramyscampos said:
Hello
Just to update my problem.
I've done the partion.img trick, which u told me above.
The process was done perfectly on TWRP without issues.
But after that, i've tested the device again and i still got that error message.
Click to expand...
Click to collapse
Its very strange that those things have not resolved your network issue, I too have mostly used the beta builds since March, and I haven't encountered any issues.
To be clear, I am assuming that you have registered this device and linked to your Xiaomi Account?
That you are signing into your Mi-Cloud account after wiping and installing the new roms?
If your answer is no, you do not sign into the account then that is absolutely your issue, that issue even happens on custom roms, once the sim card is linked to the account, you have to reconnect it or connect to another sim card which will then be linked, or remove the device from your account.
If you have in fact been signing in , and syncing then it's also possible that you could have a hardware issue. But you may be able to resolve the issue with QPST as we have discussed.
(*) But first, QPST is risky, I want you try download a older version of the fastboot rom, such as 10.1.1.0, or 10.0.2.0 unpack and flash the modem's from those older versions before doing anything else, apparently this has worked for some people. Here is some people with Mi8 SE, go to the bottom to see that it worked for them.
You never responded back about deleting, the APN's and then re-entering...did you do that?
You never responded back about using the encrypted version of TWRP and whether or not you can create a backup of each image. I use this ( TWRP-3.2.3-0401-XIAOMI8-EN-wzsx150 ) From here I believe that the official version may fully work for encryption now, but I am not sure, the Xiaomi English version that I linked definitely does.
I don't mind trying to help you but I if I am writing a book of suggestions, I would like more feedback to be sure that you tried all of those suggestions.
Also, there is a program called Network Guru, please install that program and see if it recognises the sim card at all. You said that at times the issue is intermittent, unfortunately there could be a broken solder connection.
Next, yes you can use QPST but there is a risk of permanent issues , So try the older modem first. If that doesn't work , I will write up instructions for QPST, I am hoping that you don't have to resort to that, and I am concerned that QPST will work for a while, until it stops and never ever works again. Basically with QPST you are changing your IMEI which is illegal in some countries. Let me know and Good Luck
tsongming said:
So it was working until it failed? and you deleted and manually re-entered your APN's?
That is strange, everything that you have tried should had worked. Are you sure that you didn't accidentally delete your persist file? Remove that file can cause issues like that.
Another possibility is that there could be an issue with your sim card. Try taking it out and restarting to phone to system then shut it down again.
Taka lint free cloth and wipe the card and reinsert it.
My brother had an issue similar to your issue on his Redmi Note 6 Pro, he ended up resolving his issue by getting a new sim card from his carrier...it happens.
There are still plenty of things to try
There are fast simple things to try and there are steps that are more difficult and potentially risky. Try what I mentioned and if that doesn't work , create a TWRP backup and check to see if you are able to backup the persist image.
When the persist image is deleted weird things can happen with WIFI, Bluetooth, Data, or Signals
You can read the persist solution here : https://forum.xda-developers.com/showpost.php?p=79824537&postcount=2
I expect that that will finally solve it. Unfortunately these types of issues are stressful because sometimes the resolution is simple and easy and other times the steps are more dramatic. its all part of troubleshooting, so we can't/shouldn't just jump to worst case scenario.
Which leaves the last method, if the above doesn't work you can use a tool called QPST. It's made by Qualcomm, and unless there is very unlikely hardware damage ( such as liquid) then QPST will usually fix the issue. The steps for using QPST are much more technical and I don't already have those steps typed. So try the above and let me know.
Click to expand...
Click to collapse
Actually when I tried to modify my modem and failed, I had the same issue and reflashing only modem didn't really work.
It was about some other stuff that I didn't remember, so in this situation I'd remove system and a few images that will only affect the rom, and flash what I have.
Reflashing the stock miui after a complete wipe did the trick on my situation, but I'm glad that you solved the issue. On my older device, Zenfone 3 Max ZC553KL I accidentally wiped the modem or I broke the keyguard, and nothing did work since ASUS didn't decide to provide all system images for that device.
The War Profiteer said:
Actually when I tried to modify my modem and failed, I had the same issue and reflashing only modem didn't really work.
It was about some other stuff that I didn't remember, so in this situation I'd remove system and a few images that will only affect the rom, and flash what I have.
Reflashing the stock miui after a complete wipe did the trick on my situation, but I'm glad that you solved the issue. On my older device, Zenfone 3 Max ZC553KL I accidentally wiped the modem or I broke the keyguard, and nothing did work since ASUS didn't decide to provide all system images for that device.
Click to expand...
Click to collapse
Flashing the modem or the firmware alone will often work on some devices,such as my Leeco X727 and X522, and will sometimes work on Xiaomi devices.
But I agree that flashing the full stock rom and getting a fresh start is the route that we could had taken a little earlier. In retrospect it would had been much faster. Especially since fully wiping/format and re-installing Stock doesn't affect the bootloader status of being locked or unlocked.
tsongming said:
Flashing the modem or the firmware alone will often work on some devices,such as my Leeco X727 and X522, and will sometimes work on Xiaomi devices.
But I agree that flashing the full stock rom and getting a fresh start is the route that we could had taken a little earlier. In retrospect it would had been much faster. Especially since fully wiping/format and re-installing Stock doesn't affect the bootloader status of being locked or unlocked.
Click to expand...
Click to collapse
If system, cache and data images were removed on the batch file, it would just install the stock files without touching any of the OS files.
And another thing, if your phone is unusable, then you will want to give up on your files.
The War Profiteer said:
If system, cache and data images were removed on the batch file, it would just install the stock files without touching any of the OS files.
And another thing, if your phone is unusable, then you will want to give up on your files.
Click to expand...
Click to collapse
Absolutely agree
You could use this batch file. Does what I said previously, reflashes every image without touching the recovery or OS.
- boot.img
- system.img
- recovery.img
- cache.img
- userdata.img
was removed. Still, I want to warn the users that I won't accept any responsibility for the issues that will occur the use of this batch file. If it causes any, feel free to use the original batch file. DO NOT INTERRUPT WHILE FLASHING CONTINUES, OR IT PROBABLY WILL GET BRICKED.
Code:
fastboot %* flash crclist %~dp0images\crclist.txt || @echo "Flash crclist error" && exit /B 1
fastboot %* flash sparsecrclist %~dp0images\sparsecrclist.txt || @echo "Flash sparsecrclist error" && exit /B 1
fastboot %* flash xbl_ab %~dp0images\xbl.img || @echo "Flash xbl_ab error" && exit /B 1
fastboot %* flash xbl_config_ab %~dp0images\xbl_config.img || @echo "Flash xbl_config_ab error" && exit /B 1
fastboot %* flash abl_ab %~dp0images\abl.img || @echo "Flash abl_ab error" && exit /B 1
fastboot %* flash tz_ab %~dp0images\tz.img || @echo "Flash tz_ab error" && exit /B 1
fastboot %* flash hyp_ab %~dp0images\hyp.img || @echo "Flash hyp_ab error" && exit /B 1
fastboot %* flash devcfg_ab %~dp0images\devcfg.img || @echo "Flash devcfg_ab error" && exit /B 1
fastboot %* flash storsec_ab %~dp0images\storsec.img || @echo "Flash storsec_ab error" && exit /B 1
fastboot %* flash bluetooth %~dp0images\bluetooth.img || @echo "Flash bluetooth error" && exit /B 1
fastboot %* flash cmnlib_ab %~dp0images\cmnlib.img || @echo "Flash cmnlib_ab error" && exit /B 1
fastboot %* flash cmnlib64_ab %~dp0images\cmnlib64.img || @echo "Flash cmnlib64_ab error" && exit /B 1
fastboot %* flash modem %~dp0images\modem.img || @echo "Flash modem error" && exit /B 1
fastboot %* flash dsp %~dp0images\dsp.img || @echo "Flash dsp error" && exit /B 1
fastboot %* flash keymaster_ab %~dp0images\keymaster.img || @echo "Flash keymaster_ab error" && exit /B 1
fastboot %* flash logo %~dp0images\logo.img || @echo "Flash logo_ab error" && exit /B 1
fastboot %* flash misc %~dp0images\misc.img || @echo "Flash misc error" && exit /B 1
fastboot %* flash aop_ab %~dp0images\aop.img || @echo "Flash aop_ab error" && exit /B 1
fastboot %* flash qupfw_ab %~dp0images\qupfw.img || @echo "Flash qupfw_ab error" && exit /B 1
fastboot %* flash ImageFv %~dp0images\imagefv.elf || @echo "Flash imagefv error" && exit /B 1
fastboot %* flash vendor %~dp0images\vendor.img || @echo "Flash vendor_ab error" && exit /B 1
fastboot %* erase sec || @echo "Erase sec error" && exit /B 1
fastboot %* flash cust %~dp0images\cust.img || @echo "Flash cust error" && exit /B 1
The War Profiteer said:
You could use this batch file. Does what I said previously, reflashes every image without touching the recovery or OS.
- boot.img
- system.img
- recovery.img
- cache.img
- userdata.img
was removed. Still, I want to warn the users that I won't accept any responsibility for the issues that will occur the use of this batch file. If it causes any, feel free to use the original batch file. DO NOT INTERRUPT WHILE FLASHING CONTINUES, OR IT PROBABLY WILL GET BRICKED.
Code:
fastboot %* erase boot || @echo "Erase boot error" && exit /B 1
fastboot %* flash crclist %~dp0images\crclist.txt || @echo "Flash crclist error" && exit /B 1
fastboot %* flash sparsecrclist %~dp0images\sparsecrclist.txt || @echo "Flash sparsecrclist error" && exit /B 1
fastboot %* flash xbl_ab %~dp0images\xbl.img || @echo "Flash xbl_ab error" && exit /B 1
fastboot %* flash xbl_config_ab %~dp0images\xbl_config.img || @echo "Flash xbl_config_ab error" && exit /B 1
fastboot %* flash abl_ab %~dp0images\abl.img || @echo "Flash abl_ab error" && exit /B 1
fastboot %* flash tz_ab %~dp0images\tz.img || @echo "Flash tz_ab error" && exit /B 1
fastboot %* flash hyp_ab %~dp0images\hyp.img || @echo "Flash hyp_ab error" && exit /B 1
fastboot %* flash devcfg_ab %~dp0images\devcfg.img || @echo "Flash devcfg_ab error" && exit /B 1
fastboot %* flash storsec_ab %~dp0images\storsec.img || @echo "Flash storsec_ab error" && exit /B 1
fastboot %* flash bluetooth %~dp0images\bluetooth.img || @echo "Flash bluetooth error" && exit /B 1
fastboot %* flash cmnlib_ab %~dp0images\cmnlib.img || @echo "Flash cmnlib_ab error" && exit /B 1
fastboot %* flash cmnlib64_ab %~dp0images\cmnlib64.img || @echo "Flash cmnlib64_ab error" && exit /B 1
fastboot %* flash modem %~dp0images\modem.img || @echo "Flash modem error" && exit /B 1
fastboot %* flash dsp %~dp0images\dsp.img || @echo "Flash dsp error" && exit /B 1
fastboot %* flash keymaster_ab %~dp0images\keymaster.img || @echo "Flash keymaster_ab error" && exit /B 1
fastboot %* flash logo %~dp0images\logo.img || @echo "Flash logo_ab error" && exit /B 1
fastboot %* flash misc %~dp0images\misc.img || @echo "Flash misc error" && exit /B 1
fastboot %* flash aop_ab %~dp0images\aop.img || @echo "Flash aop_ab error" && exit /B 1
fastboot %* flash qupfw_ab %~dp0images\qupfw.img || @echo "Flash qupfw_ab error" && exit /B 1
fastboot %* flash ImageFv %~dp0images\imagefv.elf || @echo "Flash imagefv error" && exit /B 1
fastboot %* flash vendor %~dp0images\vendor.img || @echo "Flash vendor_ab error" && exit /B 1
fastboot %* erase sec || @echo "Erase sec error" && exit /B 1
fastboot %* flash cust %~dp0images\cust.img || @echo "Flash cust error" && exit /B 1
Click to expand...
Click to collapse
That's awesome, Thanks for helping and being a valuable member of the community!
@aramyscampos, if you still have the issue try this
The code erases BOOT which is KERNEL, removed the first line. Please be careful that the mentioned post didn't change.
Jumping in on this thread, any luck with fixing your radio issue? In some areas I get the message "No network connection" or similar even though I have full strength LTE according to the signal meter. I'm on miui 10 global 9.6.27 beta. Note: it only seems like this problem started 2 weeks ago for me.
pringlet said:
Jumping in on this thread, any luck with fixing your radio issue? In some areas I get the message "No network connection" or similar even though I have full strength LTE according to the signal meter. I'm on miui 10 global 9.6.27 beta. Note: it only seems like this problem started 2 weeks ago for me.
Click to expand...
Click to collapse
I don't know where this issue came from, but a lot of people have experienced this issue. I am very careful, about what I install and yet I have still had two bricks in one week.
The first time I used flashall.bat method with the stock fastboot rom. There after no issues for a week.
Today, I bricked my phone, this time using swift installer ( I use all the time and have never had an issue) Next, I could not boot back to system, and when I tried to wipe cache and flash recovery, I received errors about my persist image missing, and then immediately afterwards Twrp stopped working and I could only boot to fastboot.
So once again, I had to completely wipe the phone and start from scratch. This time I didn't have to use flashall.bat, I just used adb to flash TWRP, installed root and then the latest MiGlobe rom. Very Annoying!
But at least now the persist image is seen and working again and Wifi and cellular are both working, and everything is back to normal.
---------- Post added at 09:51 PM ---------- Previous post was at 09:50 PM ----------
pringlet said:
Jumping in on this thread, any luck with fixing your radio issue? In some areas I get the message "No network connection" or similar even though I have full strength LTE according to the signal meter. I'm on miui 10 global 9.6.27 beta. Note: it only seems like this problem started 2 weeks ago for me.
Click to expand...
Click to collapse
I forgot to mention that I have a theory that 9.6.27 is the problem. Switch to the latest 7/4
Hi all,
Need your help, 3 days ago, I unlocked my bootloader and via TWRP from this guide, managed to install MI EU rom V12.5.7.0.RKACNXM to my CN Mi 11 Ultra. All seems fine in the beginning.
But since yesterday I noticed, I can't use my front camera from Instagram, and then tried camera app, and also tried in CIT test menu (press Kernel version repeatedly from Settings), all are not working.
in CIT test menu, when accessing front camera, it will just stay blank white. other rear camera modules works fine though, only front cam is having this issue.
Already tried restarting phone, reflashing the recovery image from TWRP, clearing cache, still the same issue.
Is this 100% hardware issue?
Any help appreciated.
Update:
I tried reflashing the mi eu 12.5.7.0 recovery image from TWRP and format data, front camera still not working
then, i go to fastboot, and use the official fastboot CN ROM flash_all (clean_all), after done front camera still not working
so i think it's 100% percent the hardware issue. i have to return the phone to the seller, i want to re-lock the bootloader first.
what is the correct way to do it? when originally flashing the fastboot CN ROM, i wanted to try "Clean all and lock (flash_all_lock.bat). but i was afraid it'll brick my phone if i miss any step in making sure that it's ready for re-lock. (e.g. TWRP still in inactive slot maybe? i'm not so sure if this is a valid case)
note: i'm using official fastboot CN rom 12.5.7.0 because my device is the mi 11 ultra CN version, M2102K1C.
Also worth noting, in CIT test, first test menu (check version info), Ese Memory Total is showing number 0 in red on this device, while my other mi 11 ultra device, Ese Memory total is showing number 1 in green
Pics:
CIT test menu front camera:
https://imgur.com/YkpsjZs
Ese memory total:
https://imgur.com/kS0YpLG
iceddeath said:
Hi all,
Need your help, 3 days ago, I unlocked my bootloader and via TWRP from this guide, managed to install MI EU rom V12.5.7.0.RKACNXM to my CN Mi 11 Ultra. All seems fine in the beginning.
But since yesterday I noticed, I can't use my front camera from Instagram, and then tried camera app, and also tried in CIT test menu (press Kernel version repeatedly from Settings), all are not working.
in CIT test menu, when accessing front camera, it will just stay blank white. other rear camera modules works fine though, only front cam is having this issue.
Already tried restarting phone, reflashing the recovery image from TWRP, clearing cache, still the same issue.
Is this 100% hardware issue?
Any help appreciated.
Update:
I tried reflashing the mi eu 12.5.7.0 recovery image from TWRP and format data, front camera still not working
then, i go to fastboot, and use the official fastboot CN ROM flash_all (clean_all), after done front camera still not working
so i think it's 100% percent the hardware issue. i have to return the phone to the seller, i want to re-lock the bootloader first.
what is the correct way to do it? when originally flashing the fastboot CN ROM, i wanted to try "Clean all and lock (flash_all_lock.bat). but i was afraid it'll brick my phone if i miss any step in making sure that it's ready for re-lock. (e.g. TWRP still in inactive slot maybe? i'm not so sure if this is a valid case)
note: i'm using official fastboot CN rom 12.5.7.0 because my device is the mi 11 ultra CN version, M2102K1C.
Also worth noting, in CIT test, first test menu (check version info), Ese Memory Total is showing number 0 in red on this device, while my other mi 11 ultra device, Ese Memory total is showing number 1 in green
Pics:
CIT test menu front camera:
https://imgur.com/YkpsjZs
Ese memory total:
https://imgur.com/kS0YpLG
Click to expand...
Click to collapse
Mine is working fine. I also have the CN variant and unlocked my bootloader have have at varous time flashed all versions available. That includes the Global, EEA and Xiaomi.eu roms, both stable and weekly.
I would recommend, first installing an older Xiaomi.eu (12.5.4 from 4-30-2021) rom prior to installing TWRP and upgrading to the latest version available. Older Xiaomi.eu fastboot roms where developed before TWRP for this device was available. The bat file script will format your storage properly and install. Once installed and basic setup is run, upgrade to the latest by installing TWRP and flashing 12.5.7.
When flashing one of those fastboot roms, you need unlock the properties and then flash it using administrative rights on your PC. Do a search on documentation on how to perform this flash. You will probably find that information here or on the Xiaomi.eu site.
jim262 said:
Mine is working fine. I also have the CN variant and unlocked my bootloader have have at varous time flashed all versions available. That includes the Global, EEA and Xiaomi.eu roms, both stable and weekly.
I would recommend, first installing an older Xiaomi.eu (12.5.4 from 4-30-2021) rom prior to installing TWRP and upgrading to the latest version available. Older Xiaomi.eu fastboot roms where developed before TWRP for this device was available. The bat file script will format your storage properly and install. Once installed and basic setup is run, upgrade to the latest by installing TWRP and flashing 12.5.7.
When flashing one of those fastboot roms, you need unlock the properties and then flash it using administrative rights on your PC. Do a search on documentation on how to perform this flash. You will probably find that information here or on the Xiaomi.eu site.
Click to expand...
Click to collapse
hi jim262, I've tried xiaomi.eu 12.5.7 rom and china 12.5.7 rom, issue still there.
i don't think it's the problem of the rom, but the hardware itself.
i have 2 mi 11 ultra, one for me, one for my SO.
mine has no problem, currently on mi.eu 12.5.7.
so now i have to return the other one, but has to relock bootloader first, so, is it safe to just flash latest CN 12.5.7 rom via miflash and chose "Clean all and lock (flash_all_lock.bat)"? I'm afraid of potentially bricking the device
anyone with expertise kindly help me out
in recap, steps i did:
#1 unlock bootloader
#2 boot TWRP
#3 flash mi.eu 12.5.7. format data
#4 use for several days, realized front camera not working
#5 reflash mi.eu 12.5.7 via twrp. format data. front camera still not working
#6 flash fastboot CN 12.5.7 via miflash, using flash_all (clean_all.bat), front camera still not working
#7 decide wanting to return the phone
#8 how to relock bootloader, is it safe to just flash fastboot CN 12.5.7 via miflash using "Clean all and lock (flash_all_lock.bat)"? is there any step i missed? (e.g. inactive slot still having custom mi.eu rom?)
Sounds like a hardware issue tbh
Can you get warranty replacement or exchange?
speedtripler said:
Sounds like a hardware issue tbh
Can you get warranty replacement or exchange?
Click to expand...
Click to collapse
yes, that's what i want to try to do, but if you know, can please advise on how to safely relock my bootloader?
jim262 said:
Mine is working fine. I also have the CN variant and unlocked my bootloader have have at varous time flashed all versions available. That includes the Global, EEA and Xiaomi.eu roms, both stable and weekly.
I would recommend, first installing an older Xiaomi.eu (12.5.4 from 4-30-2021) rom prior to installing TWRP and upgrading to the latest version available. Older Xiaomi.eu fastboot roms where developed before TWRP for this device was available. The bat file script will format your storage properly and install. Once installed and basic setup is run, upgrade to the latest by installing TWRP and flashing 12.5.7.
When flashing one of those fastboot roms, you need unlock the properties and then flash it using administrative rights on your PC. Do a search on documentation on how to perform this flash. You will probably find that information here or on the Xiaomi.eu site.
Click to expand...
Click to collapse
To re-lock, just reflash
iceddeath said:
hi jim262, I've tried xiaomi.eu 12.5.7 rom and china 12.5.7 rom, issue still there.
i don't think it's the problem of the rom, but the hardware itself.
i have 2 mi 11 ultra, one for me, one for my SO.
mine has no problem, currently on mi.eu 12.5.7.
so now i have to return the other one, but has to relock bootloader first, so, is it safe to just flash latest CN 12.5.7 rom via miflash and chose "Clean all and lock (flash_all_lock.bat)"? I'm afraid of potentially bricking the device
anyone with expertise kindly help me out
in recap, steps i did:
#1 unlock bootloader
#2 boot TWRP
#3 flash mi.eu 12.5.7. format data
#4 use for several days, realized front camera not working
#5 reflash mi.eu 12.5.7 via twrp. format data. front camera still not working
#6 flash fastboot CN 12.5.7 via miflash, using flash_all (clean_all.bat), front camera still not working
#7 decide wanting to return the phone
#8 how to relock bootloader, is it safe to just flash fastboot CN 12.5.7 via miflash using "Clean all and lock (flash_all_lock.bat)"? is there any step i missed? (e.g. inactive slot still having custom mi.eu rom?)
Click to expand...
Click to collapse
Just reflash original stock rom using (flash_all_lock.bat).
jim262 said:
To re-lock, just reflash
Just reflash original stock rom using (flash_all_lock.bat).
Click to expand...
Click to collapse
from what i read, relocking bootloader with the incorrect rom not shipped with the device will cause brick
while i know that the current rom i'm on is the one it's shipped with (CN ROM), and the fastboot installation that i'm about to do for flash_all_lock.bat is also the very same 12.5.7.0 CN ROM, I'm still not sure about the a/b partition.
will it still have the remains of the custom EU rom i installed previously? thus resulted in bricking the device when relocking the bootloader?
i have to be absolutely sure about this because if the device is bricked, i'll lose my money for sure, cos the seller will not accept bricked device to be exchanged. i'm in southeast asian country with no official support for this device.
iceddeath said:
from what i read, relocking bootloader with the incorrect rom not shipped with the device will cause brick
while i know that the current rom i'm on is the one it's shipped with (CN ROM), and the fastboot installation that i'm about to do for flash_all_lock.bat is also the very same 12.5.7.0 CN ROM, I'm still not sure about the a/b partition.
will it still have the remains of the custom EU rom i installed previously? thus resulted in bricking the device when relocking the bootloader?
i have to be absolutely sure about this because if the device is bricked, i'll lose my money for sure, cos the seller will not accept bricked device to be exchanged. i'm in southeast asian country with no official support for this device.
Click to expand...
Click to collapse
Look at the box that comes with the phone. There will be clue where the phone comes from. The phone model can be a clue.
If you are sure it's from China, then flash official stable fastboot ROM without lock.
Re-Lock bootloader can be done separately after flashing ROMs.
https://c.mi.com/thread-1785641-1-1.html
pl1992aw said:
Look at the box that comes with the phone. There will be clue where the phone comes from. The phone model can be a clue.
If you are sure it's from China, then flash official stable fastboot ROM without lock.
Re-Lock bootloader can be done separately after flashing ROMs.
https://c.mi.com/thread-1785641-1-1.html
Click to expand...
Click to collapse
hi, thanks for your reply,
my concern is not really to make sure that it's a CN model phone or not.
but my question is about the A/B partition when relocking.
yes i know this phone came with CN rom as stated by seller and i can confirm it myself, first boot, all chinese, some parts of the box are in chinese, no charger in box, and the device model is M2102K1C.
if you read the steps that i did, at 1 point, i boot TWRP via fastboot and flashed mi.eu 12.5.7.0 rom, twice even.
before i reverted back to 12.5.7.0 CN rom via fastboot miflash.
now to relock, i have to be absolutely sure no trace of mi.eu rom? is it still residing in inactive slot (because of AB partition), which will brick my phone when relocking even when official CN rom active slot?
that's what i want to know.
iceddeath said:
hi, thanks for your reply,
my concern is not really to make sure that it's a CN model phone or not.
but my question is about the A/B partition when relocking.
yes i know this phone came with CN rom as stated by seller and i can confirm it myself, first boot, all chinese, some parts of the box are in chinese, no charger in box, and the device model is M2102K1C.
if you read the steps that i did, at 1 point, i boot TWRP via fastboot and flashed mi.eu 12.5.7.0 rom, twice even.
before i reverted back to 12.5.7.0 CN rom via fastboot miflash.
now to relock, i have to be absolutely sure not trace of mi.eu rom? is it still residing in inactive slot (because of AB partition) which will brick my phone when relocking even when official CN rom active slot?
that's what i want to know.
Click to expand...
Click to collapse
Still use fastboot to flash official MIUI ROMs.
Don't use TWRP to flash official MIUI ROMs.
As said, relock can be done once you flash the original official ROMs back into system with fastboot command.
If you have doubt, flash it twice or thrice.
If you are able to flash the official ROM back into phone and able to boot into MIUI with official ROM in it with the clean all option, then it should be clean.
The given link has info. Read it.
pl1992aw said:
Still use fastboot to flash official MIUI ROMs.
Don't use TWRP to flash official MIUI ROMs.
As said, relock can be done once you flash the original official ROMs back into system with fastboot command.
If you have doubt, flash it twice or thrice.
If you are able to flash the official ROM back into phone and able to boot into MIUI with official ROM in it with the clean all option, then it should be clean.
The given link has info. Read it.
Click to expand...
Click to collapse
i read it, but it doesn't mention anything regarding a/b partition.
that's my real concern is.
i know i'm on the CN official rom that came with the device, but what about the inactive slot? will it affect the relocking of bootloader?
iceddeath said:
i read it, but it doesn't mention anything regarding a/b partition.
that's my real concern is.
i know i'm on the CN official rom that came with the device, but what about the inactive slot? will it affect the relocking of bootloader?
Click to expand...
Click to collapse
A/B (Seamless) System Updates | Android Open Source Project
source.android.com
If you are so worried about slot A/B, downgrade to Official MIUI with an earlier version, then do OTA update. Check ARB protection yourself before downgrade.
It will overwrite both slots.
pl1992aw said:
A/B (Seamless) System Updates | Android Open Source Project
source.android.com
If you are so worried about slot A/B, downgrade to Official MIUI with an earlier version, then do OTA update. Check ARB protection yourself before downgrade.
It will overwrite both slots.
Click to expand...
Click to collapse
ah okay thanks, that's one way to make sure both slots have the CN official rom.
i;m now downloading the previous CN rom 12.5.4.0, hopefully arb version is still the same.
but from what you know, even if not doing this, relocking will still be fine? no matter what resides in inactive slot?
iceddeath said:
ah okay thanks, that's one way to make sure both slots have the CN official rom.
but from what you know, even if not doing this, relocking will still be fine? no matter what resides in inactive slot?
Click to expand...
Click to collapse
I don't know if relocking is fine or not.
A/B slot works as backup in case boot partition failed in one slot, there's still backup in the inactive slot that is probably bootable. (what I understand reading the Android link.)
Theoretically if you are able to boot into the system, one slot is bootable.
pl1992aw said:
I don't know if relocking is fine or not.
A/B slot works as backup in case boot partition failed in one slot, there's still backup in the inactive slot that is probably bootable. (what I understand reading the Android link.)
Theoretically if you are able to boot into the system, one slot is bootable.
Click to expand...
Click to collapse
ah i see, that;s why i hesitated to relock because of this a/b partition concern, cos i don't know what resides in the inactive slot, and if it's the custom one, i think there's a chance my relock of bootloader will fail.. if that's even how it works..
iceddeath said:
ah i see, that;s why i hesitated to relock because of this a/b partition concern, cos i don't know what resides in the inactive slot, and if it's the custom one, i think there's a chance my relock of bootloader will fail.. if that's even how it works..
Click to expand...
Click to collapse
There's fastboot command to flash into both a/b partition, but it might be more burden for you.
This code checks which slot the phone is currently using.
Code:
fastboot getvar current-slot
The safe way is just as said, downgrade after you check ARB index and Anti version is safe to do so. Then OTA update.
How A/B Partitions and Seamless Updates Affect Custom Development on XDA
You may have heard of Seamless Updates before. It involves something called "A/B partitions." What is it and how does it affect custom development on XDA?
www.xda-developers.com
pl1992aw said:
There's fastboot command to flash into both a/b partition, but it might be more burden for you.
This code checks which slot the phone is currently using.
Code:
fastboot getvar current-slot
The safe way is just as said, downgrade after you check ARB index and Anti version is safe to do so. Then OTA update.
How A/B Partitions and Seamless Updates Affect Custom Development on XDA
You may have heard of Seamless Updates before. It involves something called "A/B partitions." What is it and how does it affect custom development on XDA?
www.xda-developers.com
Click to expand...
Click to collapse
okay, regarding that fastboot command.
if i open the flash_all and flash_all_lock .bat files from the CN rom.
i think it's doing the flash for both ab, probably, from the commands
Code:
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *star" /c:"^product: *mars" || echo Missmatching image and device
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *star" /c:"^product: *mars" || exit /B 1
::check anti_version
if exist %~dp0images\anti_version.txt (for /f "delims==" %%a in (%~dp0images\anti_version.txt) do (set CURRENT_ANTI_VER=%%a))
if [%CURRENT_ANTI_VER%] EQU [] set CURRENT_ANTI_VER=0
for /f "tokens=2 delims=: " %%i in ('fastboot %* getvar anti 2^>^&1 ^| findstr /r /c:"anti:"') do (set version=%%i)
if [%version%] EQU [] set version=0
set anticheck="antirollback check pass"
if %version% GTR %CURRENT_ANTI_VER% set anticheck="Current device antirollback version is greater than this pakcage"
echo %anticheck% | findstr /r /c:"pass" || @echo "Antirollback check error" && exit /B 1
fastboot %* getvar crc 2>&1 | findstr /r /c:"^crc: 1" && if %errorlevel% equ 0 (
fastboot %* flash crclist %~dp0images\crclist.txt || @echo "Flash crclist error" && exit /B 1
fastboot %* flash sparsecrclist %~dp0images\sparsecrclist.txt || @echo "Flash sparsecrclist error" && exit /B 1
)
fastboot %* erase boot_ab || @echo "Erase boot_ab error" && exit /B 1
fastboot %* flash xbl_ab %~dp0images/xbl.elf || @echo "Flash xbl_ab error" && exit 1
fastboot %* flash xbl_config_ab %~dp0images/xbl_config.elf || @echo "Flash xbl_config_ab error" && exit 1
fastboot %* flash abl_ab %~dp0images/abl.elf || @echo "Flash abl_ab error" && exit 1
fastboot %* flash aop_ab %~dp0images/aop.mbn || @echo "Flash aop_ab error" && exit 1
fastboot %* flash tz_ab %~dp0images/tz.mbn || @echo "Flash tz_ab error" && exit 1
fastboot %* flash featenabler_ab %~dp0images/featenabler.mbn || @echo "Flash featenabler_ab error" && exit 1
fastboot %* flash hyp_ab %~dp0images/hypvm.mbn || @echo "Flash hyp_ab error" && exit 1
fastboot %* flash modem_ab %~dp0images/NON-HLOS.bin || @echo "Flash modem_ab error" && exit 1
fastboot %* flash bluetooth_ab %~dp0images/BTFM.bin || @echo "Flash bluetooth_ab error" && exit 1
fastboot %* flash dsp_ab %~dp0images/dspso.bin || @echo "Flash dsp_ab error" && exit 1
fastboot %* flash keymaster_ab %~dp0images/km41.mbn || @echo "Flash keymaster_ab error" && exit 1
fastboot %* flash devcfg_ab %~dp0images/devcfg.mbn || @echo "Flash devcfg_ab error" && exit 1
fastboot %* flash qupfw_ab %~dp0images/qupv3fw.elf || @echo "Flash qupfw_ab error" && exit 1
fastboot %* flash uefisecapp_ab %~dp0images/uefi_sec.mbn || @echo "Flash uefisecapp_ab error" && exit 1
fastboot %* erase imagefv_ab || @echo "Erase imagefv_ab error" && exit /B 1
fastboot %* flash imagefv_ab %~dp0images/imagefv.elf || @echo "Flash imagefv_ab error" && exit 1
fastboot %* flash shrm_ab %~dp0images/shrm.elf || @echo "Flash shrm_ab error" && exit 1
fastboot %* flash multiimgoem_ab %~dp0images/multi_image.mbn || @echo "Flash multiimgoem_ab error" && exit 1
fastboot %* flash cpucp_ab %~dp0images/cpucp.elf || @echo "Flash cpucp_ab error" && exit 1
fastboot %* flash qweslicstore_ab %~dp0images/qweslicstore.bin || @echo "Flash qweslicstore_ab error" && exit 1
fastboot %* flash logfs %~dp0images/logfs_ufs_8mb.bin || @echo "Flash logfs error" && exit 1
fastboot %* flash rescue %~dp0images/rescue.img || @echo "Flash rescue error" && exit 1
fastboot %* flash storsec %~dp0images/storsec.mbn || @echo "Flash storsec error" && exit 1
fastboot %* flash vendor_boot_ab %~dp0images/vendor_boot.img || @echo "Flash vendor_boot_ab error" && exit 1
fastboot %* flash super %~dp0images/super.img || @echo "Flash super error" && exit 1
fastboot %* flash cust %~dp0images/cust.img || @echo "Flash cust error" && exit 1
fastboot %* flash dtbo_ab %~dp0images/dtbo.img || @echo "Flash dtbo_ab error" && exit 1
fastboot %* flash vbmeta_ab %~dp0images/vbmeta.img || @echo "Flash vbmeta_ab error" && exit 1
fastboot %* flash vbmeta_system_ab %~dp0images/vbmeta_system.img || @echo "Flash vbmeta_system_ab error" && exit 1
fastboot %* erase metadata || @echo "Erase metadata error" && exit 1
fastboot %* flash metadata %~dp0images/metadata.img || @echo "Flash metadata error" && exit 1
fastboot %* erase userdata || @echo "Erase userdata error" && exit 1
fastboot %* flash userdata %~dp0images/userdata.img || @echo "Flash userdata error" && exit 1
fastboot %* flash boot_ab %~dp0images/boot.img || @echo "Flash boot_ab error" && exit 1
fastboot %* flash logo %~dp0images/logo.img || @echo "Flash logo error" && exit 1
fastboot %* set_active a || @echo "Set active a error" && exit 1
fastboot %* oem lock || @echo "Oem lock error" && exit /B 1
we can see above, flash modem_ab, bluetooth_ab, boot_ab. does that mean both slots already have the official CN rom?
iceddeath said:
okay, regarding that fastboot command.
if i open the flash_all and flash_all_lock .bat files from the CN rom.
i think it's doing the flash for both ab, probably, from the commands
Code:
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *star" /c:"^product: *mars" || echo Missmatching image and device
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *star" /c:"^product: *mars" || exit /B 1
::check anti_version
if exist %~dp0images\anti_version.txt (for /f "delims==" %%a in (%~dp0images\anti_version.txt) do (set CURRENT_ANTI_VER=%%a))
if [%CURRENT_ANTI_VER%] EQU [] set CURRENT_ANTI_VER=0
for /f "tokens=2 delims=: " %%i in ('fastboot %* getvar anti 2^>^&1 ^| findstr /r /c:"anti:"') do (set version=%%i)
if [%version%] EQU [] set version=0
set anticheck="antirollback check pass"
if %version% GTR %CURRENT_ANTI_VER% set anticheck="Current device antirollback version is greater than this pakcage"
echo %anticheck% | findstr /r /c:"pass" || @echo "Antirollback check error" && exit /B 1
fastboot %* getvar crc 2>&1 | findstr /r /c:"^crc: 1" && if %errorlevel% equ 0 (
fastboot %* flash crclist %~dp0images\crclist.txt || @echo "Flash crclist error" && exit /B 1
fastboot %* flash sparsecrclist %~dp0images\sparsecrclist.txt || @echo "Flash sparsecrclist error" && exit /B 1
)
fastboot %* erase boot_ab || @echo "Erase boot_ab error" && exit /B 1
fastboot %* flash xbl_ab %~dp0images/xbl.elf || @echo "Flash xbl_ab error" && exit 1
fastboot %* flash xbl_config_ab %~dp0images/xbl_config.elf || @echo "Flash xbl_config_ab error" && exit 1
fastboot %* flash abl_ab %~dp0images/abl.elf || @echo "Flash abl_ab error" && exit 1
fastboot %* flash aop_ab %~dp0images/aop.mbn || @echo "Flash aop_ab error" && exit 1
fastboot %* flash tz_ab %~dp0images/tz.mbn || @echo "Flash tz_ab error" && exit 1
fastboot %* flash featenabler_ab %~dp0images/featenabler.mbn || @echo "Flash featenabler_ab error" && exit 1
fastboot %* flash hyp_ab %~dp0images/hypvm.mbn || @echo "Flash hyp_ab error" && exit 1
fastboot %* flash modem_ab %~dp0images/NON-HLOS.bin || @echo "Flash modem_ab error" && exit 1
fastboot %* flash bluetooth_ab %~dp0images/BTFM.bin || @echo "Flash bluetooth_ab error" && exit 1
fastboot %* flash dsp_ab %~dp0images/dspso.bin || @echo "Flash dsp_ab error" && exit 1
fastboot %* flash keymaster_ab %~dp0images/km41.mbn || @echo "Flash keymaster_ab error" && exit 1
fastboot %* flash devcfg_ab %~dp0images/devcfg.mbn || @echo "Flash devcfg_ab error" && exit 1
fastboot %* flash qupfw_ab %~dp0images/qupv3fw.elf || @echo "Flash qupfw_ab error" && exit 1
fastboot %* flash uefisecapp_ab %~dp0images/uefi_sec.mbn || @echo "Flash uefisecapp_ab error" && exit 1
fastboot %* erase imagefv_ab || @echo "Erase imagefv_ab error" && exit /B 1
fastboot %* flash imagefv_ab %~dp0images/imagefv.elf || @echo "Flash imagefv_ab error" && exit 1
fastboot %* flash shrm_ab %~dp0images/shrm.elf || @echo "Flash shrm_ab error" && exit 1
fastboot %* flash multiimgoem_ab %~dp0images/multi_image.mbn || @echo "Flash multiimgoem_ab error" && exit 1
fastboot %* flash cpucp_ab %~dp0images/cpucp.elf || @echo "Flash cpucp_ab error" && exit 1
fastboot %* flash qweslicstore_ab %~dp0images/qweslicstore.bin || @echo "Flash qweslicstore_ab error" && exit 1
fastboot %* flash logfs %~dp0images/logfs_ufs_8mb.bin || @echo "Flash logfs error" && exit 1
fastboot %* flash rescue %~dp0images/rescue.img || @echo "Flash rescue error" && exit 1
fastboot %* flash storsec %~dp0images/storsec.mbn || @echo "Flash storsec error" && exit 1
fastboot %* flash vendor_boot_ab %~dp0images/vendor_boot.img || @echo "Flash vendor_boot_ab error" && exit 1
fastboot %* flash super %~dp0images/super.img || @echo "Flash super error" && exit 1
fastboot %* flash cust %~dp0images/cust.img || @echo "Flash cust error" && exit 1
fastboot %* flash dtbo_ab %~dp0images/dtbo.img || @echo "Flash dtbo_ab error" && exit 1
fastboot %* flash vbmeta_ab %~dp0images/vbmeta.img || @echo "Flash vbmeta_ab error" && exit 1
fastboot %* flash vbmeta_system_ab %~dp0images/vbmeta_system.img || @echo "Flash vbmeta_system_ab error" && exit 1
fastboot %* erase metadata || @echo "Erase metadata error" && exit 1
fastboot %* flash metadata %~dp0images/metadata.img || @echo "Flash metadata error" && exit 1
fastboot %* erase userdata || @echo "Erase userdata error" && exit 1
fastboot %* flash userdata %~dp0images/userdata.img || @echo "Flash userdata error" && exit 1
fastboot %* flash boot_ab %~dp0images/boot.img || @echo "Flash boot_ab error" && exit 1
fastboot %* flash logo %~dp0images/logo.img || @echo "Flash logo error" && exit 1
fastboot %* set_active a || @echo "Set active a error" && exit 1
fastboot %* oem lock || @echo "Oem lock error" && exit /B 1
we can see above, flash modem_ab, bluetooth_ab, boot_ab. does that mean both slots already have the official CN rom?
Click to expand...
Click to collapse
I don't know.
In fact, I never had an A/B slot phone before.
Do what you think is correct.
iceddeath said:
from what i read, relocking bootloader with the incorrect rom not shipped with the device will cause brick
while i know that the current rom i'm on is the one it's shipped with (CN ROM), and the fastboot installation that i'm about to do for flash_all_lock.bat is also the very same 12.5.7.0 CN ROM, I'm still not sure about the a/b partition.
will it still have the remains of the custom EU rom i installed previously? thus resulted in bricking the device when relocking the bootloader?
i have to be absolutely sure about this because if the device is bricked, i'll lose my money for sure, cos the seller will not accept bricked device to be exchanged. i'm in southeast asian country with no official support for this device.
Click to expand...
Click to collapse
Here's the reality, Xiaomi allows bootloader's to be unlocked. If you bought this thru a third party retailer, I'm not sure what their policy may be. What did it originally ship with? It was more than likely the CN rom if you imported the device from China. All the stock fastboot roms can be downloaded at MiFirm.net. As one of the other posters said, check your box. Another way to tell, is the back of the device. If it is plain and simply says Xiaomi, then it's the China version. If it has a bunch of regulatory script under the word Xiaomi, it's the Global variant. Just remember, Xiaomi got their start making custom roms and later phones, so they have always built phones that enable unlocking the bootloader.
jim262 said:
Here's the reality, Xiaomi allows bootloader's to be unlocked. If you bought this thru a third party retailer, I'm not sure what their policy may be. What did it originally ship with? It was more than likely the CN rom if you imported the device from China. All the stock fastboot roms can be downloaded at MiFirm.net. As one of the other posters said, check your box. Another way to tell, is the back of the device. If it is plain and simply says Xiaomi, then it's the China version. If it has a bunch of regulatory script under the word Xiaomi, it's the Global variant. Just remember, Xiaomi got their start making custom roms and later phones, so they have always built phones that enable unlocking the bootloader.
Click to expand...
Click to collapse
i've actually addressed this above.
thanks for your reply,
my concern is not really to make sure that it's a CN model phone or not.
but my question is about the A/B partition when relocking.
yes i know this phone came with CN rom as stated by seller and i can confirm it myself, first boot, all chinese, some parts of the box are in chinese, no charger in box, and the device model is M2102K1C.
if you read the steps that i did, at 1 point, i boot TWRP via fastboot and flashed mi.eu 12.5.7.0 rom, twice even.
before i reverted back to 12.5.7.0 CN rom via fastboot miflash.
now to relock, i have to be absolutely sure no trace of mi.eu rom? is it still residing in inactive slot (because of AB partition), which will brick my phone when relocking even when official CN rom active slot?
that's what i want to know.
one thing i know is, if i relock bootloader with a rom not originally made for that device (custom rom or other region rom), it'll cause a brick.
i know i'm on the CN official rom that came with the device, but what about the inactive slot? will it affect the relocking of bootloader that can cause a brick? this is what i'm not sure of
I am currently on V12.0.1.0.RJOMIXM with unlocked bootloader and magisk installed and have just updated my recovery to SHRP_v3.1-RedmiNote9-eng.ci.20210730.202740. How do I go about updating to V12.5.1.0.RJOMIXM while preserving my Magisk installation and root ( I think it's rooted through Magisk) and will all my files be safe or do I need to make copies to transfer back over once updated?
I suggest you to update your MIUI using fastboot ONLY !
I mean using the extracted tgz file.
Just avoid flashing the userdata partition (userdata.img) because it will overwrite your data, files and personal contents.
Before to update your system, just patch the boot.img using the magisk app and flash the magisk patched image to the boot partition and your system will be updated and rooted.
VD171 said:
I suggest you to update your MIUI using fastboot ONLY !
I mean using the extracted tgz file.
Just avoid flashing the userdata partition (userdata.img) because it will overwrite your data, files and personal contents.
Before to update your system, just patch the boot.img using the magisk app and flash the magisk patched image to the boot partition and your system will be updated and rooted.
Click to expand...
Click to collapse
I unpacked the fastboot ROM and patched the boot.img with magisk, replaced the original boot.img with the patched one and then flashed the ROM using
Code:
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *merlin*" || @echo "error : Missmatching image and device" && exit /B 1
set CURRENT_ANTI_VER=2
for /f "tokens=2 delims=: " %%i in ('fastboot %* getvar rollback_ver 2^>^&1 ^| findstr /r /c:"rollback_ver:"') do (set version=%%i)
if [%version%] EQU [] set version=0
if %version% GTR %CURRENT_ANTI_VER% (
@echo "error : current device antirollback version is greater than this package"
exit /B 1
)
fastboot %* erase boot || @echo "Erase boot error" && exit /B 1
fastboot %* flash preloader %~dp0\images\preloader_merlin.bin || @echo "Flash preloader error" && exit /B 1
:fastboot %* flash efuse %~dp0\images\efuse.img || @echo "Flash efuse error" && exit /B 1
fastboot %* flash logo %~dp0\images\logo.bin || @echo "Flash logo error" && exit /B 1
fastboot %* flash tee1 %~dp0\images\tee.img || @echo "Flash tee1 error" && exit /B 1
fastboot %* flash tee2 %~dp0\images\tee.img || @echo "Flash tee2 error" && exit /B 1
fastboot %* flash scp1 %~dp0\images\scp.img || @echo "Flash scp1 error" && exit /B 1
fastboot %* flash scp2 %~dp0\images\scp.img || @echo "Flash scp2 error" && exit /B 1
fastboot %* flash sspm_1 %~dp0\images\sspm.img || @echo "Flash sspm_1 error" && exit /B 1
fastboot %* flash sspm_2 %~dp0\images\sspm.img || @echo "Flash sspm_2 error" && exit /B 1
fastboot %* flash lk %~dp0\images\lk.img || @echo "Flash lk error" && exit /B 1
fastboot %* flash lk2 %~dp0\images\lk.img || @echo "Flash lk2 error" && exit /B 1
fastboot %* flash super %~dp0\images\super.img || @echo "Flash super error" && exit /B 1
fastboot %* flash cache %~dp0\images\cache.img || @echo "Flash cache error" && exit /B 1
fastboot %* flash recovery %~dp0\images\recovery.img || @echo "Flash recovery error" && exit /B 1
fastboot %* flash boot %~dp0\images\boot.img || @echo "Flash boot error" && exit /B 1
fastboot %* flash dtbo %~dp0\images\dtbo.img || @echo "Flash dtbo error" && exit /B 1
fastboot %* flash vbmeta %~dp0\images\vbmeta.img || @echo "Flash vbmeta error" && exit /B 1
fastboot %* flash spmfw %~dp0\images\spmfw.img || @echo "Flash spmfw error" && exit /B 1
fastboot %* flash md1img %~dp0\images\md1img.img || @echo "Flash md1img error" && exit /B 1
fastboot %* flash vbmeta_system %~dp0\images\vbmeta_system.img || @echo "Flash vbmeta_system error" && exit /B 1
fastboot %* flash vbmeta_vendor %~dp0\images\vbmeta_vendor.img || @echo "Flash vbmeta_vendor error" && exit /B 1
fastboot %* flash cust %~dp0\images\cust.img || @echo "Flash cust error" && exit /B 1 error" && exit /B 1
fastboot %* flash exaid %~dp0\images\exaid.img || @echo "Flash exaid error" && exit /B 1 error" && exit /B 1
fastboot %* reboot || @echo "Reboot error" && exit /B 1
but now my device is is just bootlooping on the redmi screen with the padlock at the top
Obviously, you need to replace stock vbmeta to patched vbmeta.
Otherwise, your device will be stucked in bootloop.
[VBMETA][IMG][PATCHED] VBMETA Image Partition: Disabled verity & Disabled verification for MERLIN (Xiaomi Redmi Note 9 / Xiaomi Redmi 10X 4G)
PATCHED VBMETA.IMG for MERLIN by VD171 For what do I need it ? If you try to flash any custom partition, your device can bricks or gets in bootloop. This patch with disabled verity and disabled verification avoid it and need to be flashed once...
forum.xda-developers.com
I suggest you to keep the preloader of the V12.0.4.0 because you can flash using spflashtool in download mode and avoid the bypass of the auth in EDL mode.
[PRELOADER][IMG][STOCK] PRELOADER Partition Binary for MERLIN (Xiaomi Redmi Note 9 / Xiaomi Redmi 10X 4G)
Original Stock PRELOADER_MERLIN.BIN for MERLIN Works with: - Xiaomi Redmi Note 9 - Xiaomi Redmi 10X 4G Firmware Versions: - (Engineering) AL2522-Merlin-V039-Q-0513 - (Engineering) AL2522-Merlin-V044-Q-0920 - V13.0.2.0.SJOMIXM (FLASHING EDL...
forum.xda-developers.com
Thanks, knew I would be missing something
You are welcome, my friend.
Enjoy
How to get back on Stock ROM V12.0.3.0.RKFEUXM
1. First of all, you need to download the Firmware,Flash Tool & Minimal ADB & Fastboot (Everything u need is in the .rar File)
2. After the Download is finished, unpack the Zip Folder
3. Put the Firmware Folder directly in the C:\ Folder to avoid the "Anti Rollback Check Error"
4. Install Minimal ADB & Fastboot & the Drivers
5. Put your phone into fastboot mode and plug it into your PC
6. Open Mi Flash Tool (And Install the Drivers)
7. Click "select" then navigate to your C:\ Drive and select the Firmware Folder
8. Choose either you want to clean and lock the bootloader or just clean and keep the bootloader.
9. Click flash and wait until the flashing is done, after the flashing process a "Error" Message shows up but don't worry
10. Now you're on the Stock Rom Version "V12.0.3.0" but after the Setup, a V12.5.4.0 will pop up
Download- Mega (3,79GB)
Hello,
Im trying to use your guide but I keep getting the antirollback error. I''ve put all the folders innto C: and it keeps coming up. Is it something on my end im not doing correctly? Should all the files be in one specific folder re MIUI Rollback or does that not matter?
Thank you
p0werbag said:
Hello,
Im trying to use your guide but I keep getting the antirollback error. I''ve put all the folders innto C: and it keeps coming up. Is it something on my end im not doing correctly? Should all the files be in one specific folder re MIUI Rollback or does that not matter?
Thank you
Click to expand...
Click to collapse
Whats your problem? Maybe someone could help. Why dont you want to install the latest MIUI provided by Xiaomi? If you want to use the latest MIUI rom you could use https://www.xiaomitool.com/V2/ this tool.
Always helped me without problems. Or do you need a specific solution?
p0werbag said:
Hello,
Im trying to use your guide but I keep getting the antirollback error. I''ve put all the folders innto C: and it keeps coming up. Is it something on my end im not doing correctly? Should all the files be in one specific folder re MIUI Rollback or does that not matter?
Thank you
Click to expand...
Click to collapse
I know I'm a little late for the party, but here's for future refference;
you can right-click the flash_all.bat file and remove the following lines:
Code:
if exist %~dp0images\anti_version.txt (for /f "delims==" %%a in (%~dp0images\anti_version.txt) do (set CURRENT_ANTI_VER=%%a))
if [%CURRENT_ANTI_VER%] EQU [] set CURRENT_ANTI_VER=0
for /f "tokens=2 delims=: " %%i in ('fastboot %* getvar anti 2^>^&1 ^| findstr /r /c:"anti:"') do (set version=%%i)
if [%version%] EQU [] set version=0
set anticheck="antirollback check pass"
if %version% GTR %CURRENT_ANTI_VER% set anticheck="Current device antirollback version is greater than this pakcage"
echo %anticheck% | findstr /r /c:"pass" || @echo "Antirollback check error" && exit /B 1
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *agate" /c:"^product: *amber"|| @echo "Missmatching image and device" && exit /B 1
@echo "Now Check Finished ......"
save file and flash!
I downloaded the fastboot ROM here https://xiaomirom.com/en/download/redmi-note-10-pro-sweet-stable-V13.0.13.0.SKFEUXM/
and the Miflash here https://xiaomirom.com/en/download-xiaomi-flash-tool-miflash/
Then edited the "flash_all_lock" bat file like above. I put the ROM folder in "C" drive to avoid getting the "can't find folder" error I was getting.
stonebear said:
I downloaded the fastboot ROM here https://xiaomirom.com/en/download/redmi-note-10-pro-sweet-stable-V13.0.13.0.SKFEUXM/
and the Miflash here https://xiaomirom.com/en/download-xiaomi-flash-tool-miflash/
Then edited the "flash_all_lock" bat file like above. I put the ROM folder in "C" drive to avoid getting the "can't find folder" error I was getting.
Click to expand...
Click to collapse
and did it work? also, the flash_all_lock also locks the device again
RadixMalum said:
and did it work? also, the flash_all_lock also locks the device again
Click to expand...
Click to collapse
Yes, it worked. I wanted the bootloader locked again.
stonebear said:
Yes, it worked. I wanted the bootloader locked again.
Click to expand...
Click to collapse
ah, perfect!