Hi there.
After flashing some custom roms (lineage and Arrow, both for like 5 minutes xD) (from zip files via Orange Fox), I wanted to go back to MIUI (don't ask xD).
After flashing a stock rom via miflash, I started getting errors about device storage being corrupted, the device being unsafe and my sensors stopped working (like all of them, proximity, light, gyroscope, etc.)
THIS I FIGURED OUT:
I figured that my persist partition is broken and I restored it from persistbak. (dd if=/dev/block/mmcblk0p%% of=/dev/block/mmcblk0p$$)
But even after doing so, my proximity sensor does not work.
Moreover, it does not work in the most annoying way: In CIT it shows as permanent 0.0 no matter if sth is close to it or not. So whenever I light up the screen I get the message about not covering the earphone area(the one you can override by pressing vol +) and my screen is PERMANENT OFF during calls which does not let me use speakerphone, mute microphone, etc. Does anyone have any idea on how to fix it? Yes, I've seen the post with the tasker solution that disables the sensor in "screen permanent on" mode. It does not satisfy me (I'd much rather have a fully functional phone), will try that if nothing else works. Also, the phone is under warranty, I pray to God for if I maybe flash back stock, lock the bootloader and say to them "my proximity sensor does not work" they'd fix it under warranty. Or maybe someone knows which part of software is responsible for the proximity sensor and is able to provide a dump for me?
You f....up your "persist" partition !
If you haven't already did a backup with TWRP, then there is only one solution !
This is how to restore it :
- download the latest .tar and .zip firmware (the same version+++) from here ... according to "your phone region" [mandatory]
- don't choose an old version : always the latest one, don't mix the numbers
- don't use xiaomi.eu in any case
- extract persist.img from .tar
- you need to flash it with TWRP/OF (use my twrp.zip)... yes this will reset the whole "persist" partition.
- flash now the whole MIUI firmware .zip in TWRP/OF
- flashing .tar in MiFlash Tool is bugged and a high risky business
- format /data (type yes)
- reboot to fastboot from TWRP/OF
- extract stock recovery.img from .tar +++
- flash it :
fastboot flash recovery recovery.img
- you need now to lock the bootloader to restore the original state of your phone, and this is the only way to rewrite again "persist" partition from scratch by the bootloader !
type :
fastboot oem lock
fastboot reboot
- Later you can still restore your DRM Keys again in MIUI ... don't worry about them !
See you
Restore stock using fastboot files through miflash. The fastboot files should contain everything and therefore restore everything.
Xiaomi Firmware Updater
The ultimate script that provides firmware packages for Xiaomi devices.
xiaomifirmwareupdater.com
Lu5ck said:
Restore stock using fastboot files through miflash. The fastboot files should contain everything and therefore restore everything.
Xiaomi Firmware Updater
The ultimate script that provides firmware packages for Xiaomi devices.
xiaomifirmwareupdater.com
Click to expand...
Click to collapse
You are misleading this guy ....
Restoring persist partition doesn't work like that.
It is always ignored by default in the bat/sh scripts... and can't be flashed through fastboot !!!
Furthermore, as i said, MiFlash Tool is bugged and he can hard brick his device +++
Don't say things that you don't understand. very well !!!
gringo80 said:
You f....up your "persist" partition !
If you haven't already did a backup with TWRP, then there is only one solution !
This is how to restore it :
- download the latest .tar and .zip firmware (the same version+++) from here ... according to "your phone region" [mandatory]
- don't choose an old version : always the latest one, don't mix the numbers
- don't use xiaomi.eu in any case
- extract persist.img from .tar
- you need to flash it with TWRP/OF ... yes this will reset the whole "persist" partition.
- flash now the .zip firmware in TWRP/OF
- flashing .tar in MiFlash Tool is bugged and a high risky business
- format /data (type yes)
- reboot to fastboot from TWRP/OF
- extract recovery.img from .tar
- flash it :
fastboot flash recovery recovery.img
- you need now to lock the bootloader to restore the original state of your phone, and this is the only way to rewrite again "persist" partition from scratch by the bootloader !
type :
fastboot oem lock
fastboot reboot
- Later you can still restore you DRM Keys again in MIUI ... don't worry about them !
I will post later the zip to flash persist.img with TWRP/OF ... as i'm now in the bed.
Don't take any action now by yourself ... just wait for tomorrow !
See you
Click to expand...
Click to collapse
Dunno who you are or where you live but if your solution works, I owe you a beer. You're my savior! XD I'm at work now, will try your solutions in the evening/on the weekend
gringo80 said:
You are misleading this guy ....
Restoring persist partition doesn't work like that.
It is always ignored by default in the bat/sh scripts... and can't be flashed through fastboot !!!
Furthermore, as i said, MiFlash Tool is bugged and he can hard brick his device +++
Don't say things that you don't understand. very well !!!
Click to expand...
Click to collapse
My bad.
You are right that the .bat file does not contain commandline to flash persist despite the img being in the file.
I just downloaded to check.
On the other hand, miflash is just a one click fastboot UI to flash base on commands indicated in the .bat files so I don't know why your instructions imply it can flash things like recovery can.
@Guzior2137
With that said, OP would need to flash the persist.img to persist partition. Given that despite the .img is in the fastboot zip but not in the .bat command can only suggest that the fastboot does not accept "fastboot flash persist persist.img" which means you will need a recovery that can do that. I would recommend using orangefox to do that as orangefox is tailored for xiaomi devices and on a bonus side, it doesn't get replaced during official MIUI ota like others do.
Guzior2137 said:
Dunno who you are or where you live but if your solution works, I owe you a beer. You're my savior! XD I'm at work now, will try your solutions in the evening/on the weekend
Click to expand...
Click to collapse
(.zip) added : extract and put persist.img in firmware-update forlder and re-zip again.
- read carefully the guide up
- don't skip any step / add extra-step
- don't use MiFlash Tool
- don't flash xiaomi.eu
gringo80 said:
You f....up your "persist" partition !
If you haven't already did a backup with TWRP, then there is only one solution !
This is how to restore it :
- download the latest .tar and .zip firmware (the same version+++) from here ... according to "your phone region" [mandatory]
- don't choose an old version : always the latest one, don't mix the numbers
- don't use xiaomi.eu in any case
- extract persist.img from .tar
- you need to flash it with TWRP/OF (use my twrp.zip)... yes this will reset the whole "persist" partition.
- flash now the whole MIUI firmware .zip in TWRP/OF
- flashing .tar in MiFlash Tool is bugged and a high risky business
- format /data (type yes)
- reboot to fastboot from TWRP/OF
- extract stock recovery.img from .tar +++
- flash it :
fastboot flash recovery recovery.img
- you need now to lock the bootloader to restore the original state of your phone, and this is the only way to rewrite again "persist" partition from scratch by the bootloader !
type :
fastboot oem lock
fastboot reboot
- Later you can still restore your DRM Keys again in MIUI ... don't worry about them !
See you
Click to expand...
Click to collapse
Wait. Could you please explain to me: what is the file you attached used for? Is it TWRP? if I then have already OF installed, no need to use it?
Guzior2137 said:
Wait. Could you please explain to me: what is the file you attached used for? Is it TWRP? if I then have already OF installed, no need to use it?
Click to expand...
Click to collapse
it's a flashable zip :
. open it
. put persist.img in fimware-update folder
. rezip and flash
. then flash your miui firmware in twrp
. format /data
...
Crap. Once again, just to confirm: I should:
-put the persist.img in the empty folder firmware-update of your persist-twrp-reset.zip
-flash your zip that I just modified using OF
-flash the zip I downloaded from xiaomifirmwareupdater.com using OF
-format /data in OF (type yes)
-extract stock recovery.img from .tar +++
- flash it : fastboot flash recovery recovery.img
-lock bootloader: fastboot oem lock fastboot reboot
Right? (sorry, better to confirm a dozen times and not screw anything up I think xD)
- use fastboot to flash the recovery.img and not TWRP/OF
- fastboot oem lock
- fastboot reboot
well, nope, did not help, my proximity sensor still does not work
Guzior2137 said:
well, nope, did not help, my proximity sensor still does not work
Click to expand...
Click to collapse
are you using a screen protector with black edges ??? like this one ???
Nope. Stock plastic screen protector that was applied from the factory when I got the phone in September. Worked just fine until now. Also, if I point another phone's camera at the earpiece, I can see the blinking infrared LED while I run the proximity sensor test in CIT, which leads me to think that hardware is ok...
If the sensor is red and blinking ... that means it works +++
Now, run a proximity test in Device Info HW
You should know that the proximity sensor works only when the earpiece is used in phone call ... when you switch to the speaker, the sensor goes off.
That's normal !
gringo80 said:
If the sensor is red and blinking ... that means it works +++
Now, run a proximity test in Device Info HW
Click to expand...
Click to collapse
It's 0,0 cm in your Device Info HW app. No matter if I put sth by the earpiece or not...
I think I'll turn the phone up for a warranty fix. But then, so that they don't know like RIGHT AWAY that the phone's been tampered with, do you know a way for it to pass safetynet test? It currently errors out at CTS profile. I've heard that installing this from link: https://github.com/kdrag0n/safetynet-fix/releases/tag/v1.0.2 via magisk and turning magisk hide on will fix the problem. But then the phone will be rooted which also obviously means it's been played with. Gringo80, any suggestions?
You will laugh, but at first all the sensors stopped working for me too. I flashed persist and they worked, but the proximity sensor always showed zero, and now it always shows the maximum.
Your browser is not able to display this video.
I can't figure out what's going on. Yes, the sensor works, where in 1 case out of 100 it shows 0 instead of 5, but even through the service menu I can't calibrate it, it just always shows 5
Guzior2137 said:
...to pass safetynet test? It currently errors out at CTS profile. I've heard that installi...
Click to expand...
Click to collapse
I have the same problem. I've tried installing different firmware, modules, instructions, but I get this.
Related
Guys i have a really really big problem with mate 9 (MHA-L29). I broke both twrp and system same time (please don't ask why.)
Now, my phone don't open, just fastboot&rescue mode, useless huawei recovery (which can't format data neither install stock rom). Besides, i can't install stock rom because i tried once, and i downloaded wrong system file, and i can't format the phone now. Because of that, stock rom that i download sd card not working too. Because there is a dload file in phone.
worst of all, i can't install twrp again, because my fastboot screen tell me that: "Phone Unloced" (with red) "FRP Lock" (with green). When i try to install twrp, adb says "Failed, remote command not allowed"
Now, if can install the twrp, all my problems will be solve. There is 1 custom rom (RomAur) and 1 system backup.
How can i install twrp with this situation?
Please someone help me i spend 2 days and still nothing! How can i open this phone? Stock rom, with/without root, custom rom whatever, just tell me how can i open this phone
up
You get that command when trying to flash the wrong recovery partition, was your room nougat or Oreo based?? If nougat it's fastboot flash recovery recovery.img and Oreo fastboot flash recovery_ramdisk recovery.img I think you are trying to flash the wrong partition
shae23 said:
You get that command when trying to flash the wrong recovery partition, was your room nougat or Oreo based?? If nougat it's fastboot flash recovery recovery.img and Oreo fastboot flash recovery_ramdisk recovery.img I think you are trying to flash the wrong partition
Click to expand...
Click to collapse
No, my twrp is not wrong, i installed before, and i used long time, till broken. I installed wrong twrp recovery over correct recovery (i was trying to chance recovery because project treble). Thats why my twrp broken. Now i try to correct one, but adb says "not allowed". My custom rom nougat based.
cannurkars said:
No, my twrp is not wrong, i installed before, and i used long time, till broken. I installed wrong twrp recovery over correct recovery (i was trying to chance recovery because project treble). Thats why my twrp broken. Now i try to correct one, but adb says "not allowed". My custom rom nougat based.
Click to expand...
Click to collapse
With FRP lock you'll have to use DC-Phoenix.
But it costs €19 (For 3 days usage).
Simply put you can bypass FRP with it by force closing DC-Phoenix when it has activated the backdoor, after this you can flash anything from fastboot (until you reboot).
So you could use it to flash back TWRP.
Or you can use it to install stock firmware
ante0 said:
With FRP lock you'll have to use DC-Phoenix.
But it costs €19 (For 3 days usage).
Simply put you can bypass FRP with it by force closing DC-Phoenix when it has activated the backdoor, after this you can flash anything from fastboot (until you reboot).
So you could use it to flash back TWRP.
Or you can use it to install stock firmware
Click to expand...
Click to collapse
I will try it. Thank you very much.
cannurkars said:
Guys i have a really really big problem with mate 9 (MHA-L29). I broke both twrp and system same time (please don't ask why.)
Now, my phone don't open, just fastboot&rescue mode, useless huawei recovery (which can't format data neither install stock rom). Besides, i can't install stock rom because i tried once, and i downloaded wrong system file, and i can't format the phone now. Because of that, stock rom that i download sd card not working too. Because there is a dload file in phone.
worst of all, i can't install twrp again, because my fastboot screen tell me that: "Phone Unloced" (with red) "FRP Lock" (with green). When i try to install twrp, adb says "Failed, remote command not allowed"
Now, if can install the twrp, all my problems will be solve. There is 1 custom rom (RomAur) and 1 system backup.
How can i install twrp with this situation?
Click to expand...
Click to collapse
During startup the menu there is a option to go in Huawei e-recovery, when you are at the start up menu hold volume up for about 5 second.
ConnerZhao929 said:
During startup the menu there is a option to go in Huawei e-recovery, when you are at the start up menu hold volume up for about 5 second.
Click to expand...
Click to collapse
No it wasn't work for me. But thank for your attention. I'm glad to find a good person to help me and my problem solved about 1-2 hour ago.
Special Request
Hey ante . Is it possible to help me ? I rooted my phone 2 days back and messed it up while downloading a framework app which ended me up in a bootloop. I have been reading and following your posts of you helping others. I don't really get the steps what I should follow.
My phone is unlocked. FRP shows Unlock.
Rooted on oreo and I tried e-recovery and fastboot steps you mentioned in other threads using kernel and ramdisk etc. ( After this I have lost access to TWRP and I am simply getting EMUI Screen with options for Factory Data Reset and Wipe Cache Partition. I don't know where it is going to lead me next :-/.
Also downloaded Huawei Extractor and tried to extracted specific files but the firmware file I have doesn't have CUST.img file.
Also the site link you mentioned for download firmware is in some other language and I am unable to search for my firmware.
I also tried the placing update file in the dload on my sd card but fails at 5%. The file was correct and I am sure I did'n download the wrong firmware.
Currently it shows this on the fastboot screen.
Andorid reboot reason
: AP_S_ABNORMAL 32
NA
Just don't know what I should be doing ? PLEASE HELP BRO?
ante0 said:
With FRP lock you'll have to use DC-Phoenix.
But it costs €19 (For 3 days usage).
Simply put you can bypass FRP with it by force closing DC-Phoenix when it has activated the backdoor, after this you can flash anything from fastboot (until you reboot).
So you could use it to flash back TWRP.
Or you can use it to install stock firmware
Click to expand...
Click to collapse
AniMaL92 said:
Hey ante . Is it possible to help me ? I rooted my phone 2 days back and messed it up while downloading a framework app which ended me up in a bootloop. I have been reading and following your posts of you helping others. I don't really get the steps what I should follow.
My phone is unlocked. FRP shows Unlock.
Rooted on oreo and I tried e-recovery and fastboot steps you mentioned in other threads using kernel and ramdisk etc. ( After this I have lost access to TWRP and I am simply getting EMUI Screen with options for Factory Data Reset and Wipe Cache Partition. I don't know where it is going to lead me next :-/.
Also downloaded Huawei Extractor and tried to extracted specific files but the firmware file I have doesn't have CUST.img file.
Also the site link you mentioned for download firmware is in some other language and I am unable to search for my firmware.
I also tried the placing update file in the dload on my sd card but fails at 5%. The file was correct and I am sure I did'n download the wrong firmware.
Currently it shows this on the fastboot screen.
Andorid reboot reason
: AP_S_ABNORMAL 32
NA
Just don't know what I should be doing ? PLEASE HELP BRO?
Click to expand...
Click to collapse
What's your firmware now?
You can get that info in Fastboot using
Code:
fastboot oem get-product-model
fastboot oem get-build-number
Since your recovery and fastboot still functions you probably will only need to use HWOTA to get back to stock.
It can be found here: https://forum.xda-developers.com/mate-9/how-to/guide-mate-9-flash-oreo-update-package-t3699522
But post your cust/build before proceeding.
Also cust.img is found in UPDATE.APP in the hw data zip.
Problem Solved - Somewhat
Hey ante. Thanks for the promt reply. I got it solved by using CHIMERA tool.
Would like to suggest others also stuck with same issue to use CHIMERA.
Note - It is a paid tool and 100% legit and it can help with all problems related to FRP, Bootloader Lock / Unlock & also flashes back to factory firmware.
However what I am facing now I have flashed another version of firmware which isn't my region and some features of my phone like fingerprint scanner and other things are not working but phone is back to live. So Im glad and looking forward to searching for clean Oreo Firmware for my region to flash using CHIMERA Again.
Also, the sick and stupid part of it. I went to the service center and a person non-technical told me straight that you lost your device and it's of no use now. We cannot fix such issues 99% but I'll still ask my team and let you know after 3 days.
Thank God I didn give them and wasted my time and money.
As soon as I returned, I followed up to things and got it done myself. :good:
Anybody can possibly suggest a official firmware Oreo EMUI for Middle East Region!? If not which one can be flashed instead and where to download from?
Note:This will only work with anti rollback v3 and below and an unlocked boot-loader. For V4 and above you would need an authorized Mi account.
Check anti rollback version by fastboot command fastboot getvar anti
Download and install Miflash tool http://api.en.miui.com/url/MiFlashToolCredits : Xiaomi
Download Fastboot rom. https://en.miui.com/thread-2340434-1-1.html Credits : Aarow9, Xiaomi
Download XiaomiADBFastbootTools.jar https://github.com/Saki-EU/XiaomiADBFastbootTools/releases/tag/3.0.2 Credits: Saki-EU
Java run-time environment is required https://java.com/en/download/
Now extract the fastboot rom and locate rawprogram0.xml inside images folder. Edit it with Notepad++ and search for persist. You will see it among line 57 with filename="" . Add persist.img inside quotation marks. So final will be like filename="persist.img"
Now save it.
Now power on the phone while pressing volume down button in order to get into fastboot menu.
While in fastboot menu, connect your phone to pc and run XiaomiADBFastbootTools.jar
Click on menu--> Check for device , when device is found click menu-->Reboot device to edl
Now run XiaoMiFlash.exe and press refresh. device will be detected as com , where n is the port number. If device is not detected, click on driver menu on miflash and reinstall driver.
Now select the extracted fastboot rom folder. click clean all and click flash.
It takes some time to flash and when flashing is done reboot device by long pressing power button for 10-20 Seconds.
Good luck.
9.2.4 Anti rollback version 2
9.5.17 Anti rollback version 3
9.5.19 Anti rollback version 4 (Avoid flashing this version and what ever comes after it). You can flash firmware less version though.
When ever persist partition gets corrupted (and it will get corrupted) you would need to visit a service center to fix this. Before anti rollback v4 it could be done easily with a pc. now, not so much.
Every solution for any problem with Mi service center is to change the motherboard. lol . If you are not in warranty , it would cost you a lot. May be that is why anti rollback has been implemented in such a wicked way.
NB:
If you come across hellopacket error on anti roll back 3, go back to fastboot menu by long pressing power button and during restart press volume down button to enter fastboot menu.
Now boot twrp recovery either by fastboot command or by using XiaomiADBFastbootTools.jar
Now copy recovery rom 9.2.4 with anti rollback version 2 to internal memory and install it using twrp. now reboot to fast boot menu and follow the procedure. good luck
I can't understand this. You just flashed a new persist image downloaded from https://en.miui.com/thread-2340434-1-1.html. Which file has been changed?
Jerry981028 said:
I can't understand this. You just flashed a new persist image downloaded from https://en.miui.com/thread-2340434-1-1.html. Which file has been changed?
Click to expand...
Click to collapse
You cant just directly flash persist partition from fastboot mode.
For flashing persist partiton you would need to edit rawprogram0.xml , enter EDL MODE , and flash using flash tool, all when anti roll back version is below 3.
arunmohan16 said:
You cant just directly flash persist partition from fastboot mode.
For flashing persist partiton you would need to edit rawprogram0.xml , enter EDL MODE , and flash using flash tool, all when anti roll back version is below 3.
Click to expand...
Click to collapse
What do you mean by `sensor issues`?
Jerry981028 said:
What do you mean by `sensor issues`?
Click to expand...
Click to collapse
All kind of sensors such as proximity sensor, gravity sensor, accelerometer, step counter etc face issues from time to time. Before anti roll back implementation such sensor issues can be cleared by flashing persist partition by using fastboot command "fastboot flash persist persist.img". But after anti rollback implementation persist partition can only be accessed either by EDL mode or by TWRP terminal. EDL flashing procedure of persist partition is explained above in op.
arunmohan16 said:
All kind of sensors such as proximity sensor, gravity sensor, accelerometer, step counter etc face issues from time to time. Before anti roll back implementation such sensor issues can be cleared by flashing persist partition by using fastboot command "fastboot flash persist persist.img". But after anti rollback implementation persist partition can only be accessed either by EDL mode or by TWRP terminal. EDL flashing procedure of persist partition is explained above in op.
Click to expand...
Click to collapse
Thanks for your information. I'd like to know, if I have anti 3, is it possible to dd directly into the persist block device?
Jerry981028 said:
Thanks for your information. I'd like to know, if I have anti 3, is it possible to dd directly into the persist block device?
Click to expand...
Click to collapse
You wont be able to flash directly on fastboot or edl mode using dd command. But after booting into twrp you can use dd command from adb shell to access persist partition.
Sorry OP, but there is an easier way to do this if you have UBL and works in all anti version; without test point or mi authorized account. Simply flash it via TWRP : https://forum.xda-developers.com/re.../tutorial-fix-sensors-wifi-bluetooth-t3823622
This will cure 3 symptoms at once : the OIIMIFA, sensor not working and the warning of unofficial ROM.
Jerry981028 said:
Thanks for your information. I'd like to know, if I have anti 3, is it possible to dd directly into the persist block device?
Click to expand...
Click to collapse
No, you can't fastboot img file is sparse img. You need to convert it to raw img first before dd-ing. You can dd the img using TWRP terminal emulator or the usual terminal emulator app. But to convert the sparse img, you have to use simg2img binary which currently exist in TWRP. You need to redownload it again if you use terminal emulator app, which is too hassle. Just use TWRP and the persist.img from the corresponding fastboot ROM.
Desmanto said:
Sorry OP, but there is an easier way to do this if you have UBL and works in all anti version; without test point or mi authorized account. Simply flash it via TWRP : https://forum.xda-developers.com/re.../tutorial-fix-sensors-wifi-bluetooth-t3823622
This will cure 3 symptoms at once : the OIIMIFA, sensor not working and the warning of unofficial ROM.
No, you can't fastboot img file is sparse img. You need to convert it to raw img first before dd-ing. You can dd the img using TWRP terminal emulator or the usual terminal emulator app. But to convert the sparse img, you have to use simg2img binary which currently exist in TWRP. You need to redownload it again if you use terminal emulator app, which is too hassle. Just use TWRP and the persist.img from the corresponding fastboot ROM.
Click to expand...
Click to collapse
I tried flashing recovery rom 9.5.17 using twrp, but was stuck in boot screen due to corrupted partition. So I used this method and it worked. Luckily I was on Anti roll back v3 , so all it took was to edit xml file.
Thanks for your manual!! I successfully flashed Mi MIX 2! https://forum.xda-developers.com/mi-mix-2/help/proximity-sensor-how-to-flash-persist-t3867462
I just took persist.img from Fastboot rom Miui10 and flashed it on persist partition using ORANGE FOX recovery
I am on anti var 4
And i am typing this message from same device
Now I have problem with compass and gyroscope(( maybe persist-region wasn't flash correctly by this method?
arunmohan16 said:
Note:This will only work with anti rollback v3 and below and an unlocked boot-loader. For V4 and above you would need an authorized Mi account.
Check anti rollback version by fastboot command fastboot getvar anti
Download and install Miflash tool http://api.en.miui.com/url/MiFlashToolCredits : Xiaomi
Download Fastboot rom. https://en.miui.com/thread-2340434-1-1.html Credits : Aarow9, Xiaomi
Download XiaomiADBFastbootTools.jar https://github.com/Saki-EU/XiaomiADBFastbootTools/releases/tag/3.0.2 Credits: Saki-EU
Java run-time environment is required https://java.com/en/download/
Now extract the fastboot rom and locate rawprogram0.xml inside images folder. Edit it with Notepad++ and search for persist. You will see it among line 57 with filename="" . Add persist.img inside quotation marks. So final will be like filename="persist.img"
Now save it.
Now power on the phone while pressing volume down button in order to get into fastboot menu.
While in fastboot menu, connect your phone to pc and run XiaomiADBFastbootTools.jar
Click on menu--> Check for device , when device is found click menu-->Reboot device to edl
Now run XiaoMiFlash.exe and press refresh. device will be detected as com , where n is the port number. If device is not detected, click on driver menu on miflash and reinstall driver.
Now select the extracted fastboot rom folder. click clean all and click flash.
It takes some time to flash and when flashing is done reboot device by long pressing power button for 10-20 Seconds.
Good luck.
9.2.4 Anti rollback version 2
9.5.17 Anti rollback version 3
9.5.19 Anti rollback version 4 (Avoid flashing this version and what ever comes after it). You can flash firmware less version though.
When ever persist partition gets corrupted (and it will get corrupted) you would need to visit a service center to fix this. Before anti rollback v4 it could be done easily with a pc. now, not so much.
Every solution for any problem with Mi service center is to change the motherboard. lol . If you are not in warranty , it would cost you a lot. May be that is why anti rollback has been implemented in such a wicked way.
NB:
If you come across hellopacket error on anti roll back 3, go back to fastboot menu by long pressing power button and during restart press volume down button to enter fastboot menu.
Now boot twrp recovery either by fastboot command or by using XiaomiADBFastbootTools.jar
Now copy recovery rom 9.2.4 with anti rollback version 2 to internal memory and install it using twrp. now reboot to fast boot menu and follow the procedure. good luck
Click to expand...
Click to collapse
What is the persist partition and why it WILL break? My phone is working fine, I just ask since I'm already on ARB4 anyway and f**** up when anything goes wrong someday.
xell75 said:
What is the persist partition and why it WILL break? My phone is working fine, I just ask since I'm already on ARB4 anyway and f**** up when anything goes wrong someday.
Click to expand...
Click to collapse
Persist-region contains information about compass, gyro, proximity sensor, camera and other sensors
"why it WILL break"- hard to say, but some users haved problem with persist-region after flashing new ROM or manipulations with Mi-account
Antik86 said:
Persist-region contains information about compass, gyro, proximity sensor, camera and other sensors
"why it WILL break"- hard to say, but some users haved problem with persist-region after flashing new ROM or manipulations with Mi-account
Click to expand...
Click to collapse
So, means I'm safe when I'm staying locked with the original Stable Global MIUI and not ever modify anything?
xell75 said:
So, means I'm safe when I'm staying locked with the original Stable Global MIUI and not ever modify anything?
Click to expand...
Click to collapse
you can install the firmware, but only carefully
Before flashing new rom you can backup persist-region files like at this topic https://forum.xda-developers.com/mi-mix-2/help/mi-mix-2-sensors-expect-proximity-sensor-t3777015
Anti-rollback is big problem))
Antik86 said:
you can install the firmware, but only carefully
Before flashing new rom you can backup persist-region files like at this topic https://forum.xda-developers.com/mi-mix-2/help/mi-mix-2-sensors-expect-proximity-sensor-t3777015
Anti-rollback is big problem))
Click to expand...
Click to collapse
Seems good, but I wanted to avoid rooting.
xell75 said:
Seems good, but I wanted to avoid rooting.
Click to expand...
Click to collapse
Maybe OTA-update after wiping data/cache in recovery
Hello, this is not a guide for noobs.
At this point, i assume your BlackShark 1 is running a custom ROM, or a modification, and not it cannot update over OTA.
This guide helps you restore your BS1 SKR-H0 to Stock ROM, hopefully you can update it when the next OTA comes out.
This guide sets one of your partitions at system update G66X1906170OS00MPX.
You agree that by performing these operation, you risk bricking your device. I will probably not be there to help you recover.
There are a few steps:
Flash the stock images
Re-encrypt storage
Re-flash the stock files
Flash the stock images
Download the full backup from here: https://mega.nz/#!IZFAEAoC!UMHJ0drlhoHyGtV-0KYrtteC1VMP8-eqFWWrMXLZikQ
Extract the backup
Enter fastboot mode on your phone
Check which slot you are on, and which slot is definitely working. Try this on a slot that is broken, or that is not 100% working (in my case, slot a)
Run the following command for every partition:
Code:
fastboot flash <partitionname>_<slotname> <filename>
example: fastboot flash boot_a boot_a (if the slot you are overwriting is slot a)
or fastboot flash boot_b boot_a (if the slot you are overwriting is slot b)
Once finished, boot twrp, flash disableforceencrypt and magisk, and reboot into the system.
Reencrypt storage
First of all, backup ALL YOUR INTERNAL STORAGE, as it WILL GET WIPED IN THIS STEP. i warned you.
Once the system boots with the new version, go into stock recovery (adb reboot recovery, or enter bootloader > select start recovery)
Then reboot into the system. once the system boots, go to settings, security, encryption, and enable encryption. The phone should encrypt now. Wait for it to start encryption, finish, and get stuck at boot animation. This is the end of step 2.
Re-flash the stock files
This is the final and easiest step. If previous steps were performed correctly, then all you have to do now it the following:
from the stuck bootanimation, reboot to bootloader.
Flash 1 more time system, boot and vendor partition. This time DO NOT flash disableforceencrypt and magisk.
reboot into stock recovery
perform a wipe 1 more time.
reboot the system.
If done correctly, your phone should go into first time setup, with the stock OS, no internal error on boot, and you should be able to accept OTAs when they come. If OTA fails, Follow step 4:
(Optional) OTA Shows up again after finishing, and keep failing
If you restored your BlackShark to stock, and OTA does not finish (keeps coming back up), do the following:
If your backup is from slot a, and you are on it right now, run the following commands:
Make sure you are on the correct slot, with the correct backup!
Code:
fastboot flash boot boot_a.img
fastboot flash system system_a.img
fastboot flash vendor vendor_a.img
fastboot flash dsp dsp_a.img
fastboot flash devcfg devcfg_a.img
fastboot flash bluetooth bluetooth_a.img
fastboot flash dtbo dtbo_a.img
fastboot flash modem modem_a.img
fastboot flash vbmeta vbmeta_a.img
For the partitions dtbo and devcfg, i'm not sure if they need reflashing, however i found out that the others might be changed indirectly, and cause OTA to fail.
So just reflash those partitions from backup (Make sure to use the correct version/slot!)
Finally, if update still fails, you can connect your phone to pc, run adb logcat, and watch the logs just after update download is finished. If it fails, you will find some lines about a failed partition, with the partition name.
Special thanks to @leipnacht who provided me with stock file, so that i could restore my phone.
Big Thanks to this! I'm glad the stock files helped restoring your phone. This will surely help xda users as well when somethings go wrong with root coz some games will ban you if your phone is detected as rooted phone. This is very useful reference for everyone.
i need this for CN version too:crying::crying:
help
How do I install and recover my black shark please?
when I have install via fastboot I get a message
FAILED remote flashing is not allowed for critical partitions.
way of doing the command on fastboot
fastboot flash partitionabl_a abl_a
fastboot flash partitionsystem_a system_a
Sorry, I do not understand much about this.
metamorfose123 said:
How do I install and recover my black shark please?
when I have install via fastboot I get a message
FAILED remote flashing is not allowed for critical partitions.
way of doing the command on fastboot
fastboot flash partitionabl_a abl_a
fastboot flash partitionsystem_a system_a
Sorry, I do not understand much about this.
Click to expand...
Click to collapse
It's fastboot flash abl_a abl_a
Etc... If you want to overwrite slot a, or
Fastboot flash abl_b abl_a
If you want to overwrite B.
needful guide for restoring black shark. Big thumb up for this post.
@gilbert32 thanks for your hard work! I'll check to see if I can find someone with a stock CN rom and see if this will work for it. I haven't had the phone until now because a family member temporarily needed one :good:
hi, i have a problem, after flash system i get only on S logo
geed301 said:
hi, i have a problem, after flash system i get only on S logo
Click to expand...
Click to collapse
What version are you on? Which black shark?
SKR-H0 in oreo 8.1, but i resolved hahaha, i was used
fastboot flash boot boot_a.img
fastboot flash system system_a.img
fastboot flash vendor vendor_a.img
Just copy and pasted hahaha , today i updated to P and its great
Thnks for the tutorial and sorry for my bad english
Hi! I do not understand. One month ago I used this tutorial and I could get the previous little OTA update. Now I tried again do the same steps, all of them, and I can't get the OTA. I tried it 5 times… I have a question, in this new update of android Pie is the camera slow motion enabled? Can someone upload the android Pie backup for flashing directly?
FasterBit said:
Hi! I do not understand. One month ago I used this tutorial and I could get the previous little OTA update. Now I tried again do the same steps, all of them, and I can't get the OTA. I tried it 5 times… I have a question, in this new update of android Pie is the camera slow motion enabled? Can someone upload the android Pie backup for flashing directly?
Click to expand...
Click to collapse
I didn't find any slow motion option in camera. When you try OTA, open adb logcat at the same time. It should show you an error regarding which partition was modified when OTA fails.
It's probably one of: Boot, System, Modem, DSP, DTBO, Bluetooth, Vendor (maybe also other ones)
i need stock global ota package
do you have it yet?
hoangtieubao said:
i need stock global ota package
do you have it yet?
Click to expand...
Click to collapse
I have a backup of the global pie rom, i can upload it within this week.
gilbert32 said:
I have a backup of the global pie rom, i can upload it within this week.
Click to expand...
Click to collapse
i have solution to full convert rom to global
but i still dont have skr-h0 ota package full base
i need it to do
i have cn version OTA package, after flash
it can use *#1027# to fully convert to chinese version , ota works fine.
maybe you need to ask blackshark to provide a Full OTA request to your phone. just say your phone is rooted ,and cannot update anymore, need a full ota to restore it.
we use this trick to get cn version full ota package and it works
Vlin.Wang said:
i have cn version OTA package, after flash
it can use *#1027# to fully convert to chinese version , ota works fine.
maybe you need to ask blackshark to provide a Full OTA request to your phone. just say your phone is rooted ,and cannot update anymore, need a full ota to restore it.
we use this trick to get cn version full ota package and it works
Click to expand...
Click to collapse
this trick is very nice
and could you do it to get full ota for us?
i think too many people to want it
Any chance to find the global rom for black shark 2 pro.. DLT-A0
Any chance to find the global rom for black shark 2 pro.. DLT-A0
I need to make the phone supports multi language
Please help
Help Needed
Hi All,
Hope all is well.
Could anyone please help post a noob guide for this. I've flashing rooting etc thinf before but this one's really confusing for me. I would appreciate it greatly. I have a facebook group of BS1 Global user and they all wanted to restore their smartphone, I referred them to this thread but none of them seems to understand this tutorial. Pardon our ignorance. We would really appreciate it greatly.
Thanks in advance!
Hi Gilbert,
Thank you so much for posting this.
Your effort is greatly appreciated by us.
I am new to BS1 Global and I haven't done flashing rooting etc to this phone.
It would really help if there could be a step by step tutorial for users like me.
I would like to ask what files/tools are needed for this tutorial. I probably need pc? And probably need to install something on pc like drivers? What are they?
I'm guessing I need to unlock bootloader and root my bs1 global?
Also need to install twrp for bs1 global? And I don't know this disablforceencrypt and magisk thing.
Please please help post a noob tutorial for bs1 global that haven't been modified yet.
That would really be helpful, I look forward to your response. Thank you so much in advance.
341 redmi 10x 5G
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
www.mediafire.com
https://unofficialtwrp.com/wp-content/uploads/2019/11/vbmeta.zip
1 flash miui recovery img
Go to fastboot and type fastboot flash recovery recovery1.img
After that hold power button and volume up button until you see a Chinese menu with three options first select option two after that option one and after that option two after wiping data you will see that three options again select option one and select option one then hold volume down button until you see fastboot
Type fastboot reboot fastboot
Wait
You will see fastbootd then rename corvus image to system.img
Then type
Fastboot flash system.img
Click power button
Wait
When you see corvus boot animation hold power button and volume down button until you see fastboot
Rename twrp image to recovery.img
Then type
Fastboot flash recovery recovery.img
Fastboot flash vbmeta vbmeta.img
Fastboot flash misc misc.bin
Fastboot boot recovery.img
In twrp flash permissiver 5 then reboot to system
Done.
If you want gapps download magisk app
Downloading Magisk App... | Magisk Manager
The download will automatically start in 5 seconds, please click here to access the download URL directly. If you are confused and want to know how to install the Magisk Manager on your phone you can click here.
magiskmanager.com
When it's download rename it to magisk.zip
Go to twrp
Flash it
Reboot to system rename it to magisk.apk and install it after that download this file
https://sourceforge.net/projects/magiskgapps/files/r/Core/MagiskGApps-core-V1.0.zip/download
After that go to magisk in modules go to install from storage and select zip you downloaded flash it with magisk after reboot you will see play store is added to your app drawer install Google apps you need from play store
https://sourceforge.net/projects/tipzbuilds/files/GSIs/CorvusROM/Alpha/20210329/Corvus_v15.0-RavenClaw-treble_arm64_ab-nonlite-29032021-Unofficial-1117.img.xz/download
While this technique certainly appears to have been researched. Running though the instructions has resulted in my device caught in a boot-loop. A pretty serious one too. I can no longer access the bootloader or recovery/
I fear the state my device is in is 'soft bricked/ I have no clue have to resolve this and without access to the bootloader I can't rollback anything.
Some friendly notes for Hsnmastoor:
You should re-format the post. Writing the instructions then at the end supply the links and file attachments in the order in which they should be run As it is, the instructions are confusing .
If anyone has any ideas how to correct the boot loop, plug me in
resirch26 said:
While this technique certainly appears to have been researched. Running though the instructions has resulted in my device caught in a boot-loop. A pretty serious one too. I can no longer access the bootloader or recovery/
I fear the state my device is in is 'soft bricked/ I have no clue have to resolve this and without access to the bootloader I can't rollback anything.
Some friendly notes for Hsnmastoor:
You should re-format the post. Writing the instructions then at the end supply the links and file attachments in the order in which they should be run As it is, the instructions are confusing .
If anyone has any ideas how to correct the boot loop, plug
Click to expand...
Click to collapse
You flashed permissive in twrp?
Hsnmastoor said:
You flashed permissive in twrp?
Click to expand...
Click to collapse
If not flash it
Hsnmastoor said:
If not flash it
Click to expand...
Click to collapse
sim card inactive
Hsnmastoor said:
You flashed permissive in twrp?
Click to expand...
Click to collapse
I can't flash anything. I no longer have access to the bootloader or recovery. Phone is stuck in a bootloop.
resirch26 said:
I can't flash anything. I no longer have access to the bootloader or recovery. Phone is stuck in a bootloop.
Click to expand...
Click to collapse
Hold power button and volume down for fastboot. Power with volume up for recovery
dothaison said:
sim card inactiv
Click to expand...
Click to collapse
Can you check IMEI?
Hsnmastoor said:
Bạn có thể kiểm tra IMEI không?
Click to expand...
Click to collapse
I can't test IMEI
Hsnmastoor said:
Can you check IMEI?
Click to expand...
Click to collapse
can you give me nvdata backup? . I have lost my IMEI.
Hsnmastoor said:
Can you check IMEI?
Click to expand...
Click to collapse
I have lost IMEI. Can you give me a backup nvram ? thank you.
dothaison said:
I have lost IMEI. Can you give me a backup nvram ? thank you.
Click to expand...
Click to collapse
Nvram.img
drive.google.com
Has anyone flashed this successfully?
any bugs? i flashed crdroid. it's too buggy
Hi everybody,
Still mad at myself for buying this phone (with MediaTek SOC) because of the lack of custom ROM support. Never had this issue before with any of my phones. If only i knew this before. The hardware of the phone is great, but the software makes it really frustrating to work with.
So i've tried a lot of things to either mod the original (Chinese) ROM so it's at least functional. And i have also tried multiple of these GSI ROM install methods. Everytime without succes.
I've tried your previous method with the 'GSI installer' and the one from this guide. Neither of them worked. (Boot loop). I have a feeling i run into trouble because (if i'm correct) the original ROM uses a 'super' partition and not a 'system' partition.
If i remember correctly the GSI installer couldn't continue because it couldn't find the system partition.
In this guide (for corvus) i figured i'd flash the system.img to my super partition. Of cource that doesn't work either. If only it was that simple.
Everytime it fails i have to flash back to a standard xiaomi ROM and start all over again. Because for some reason the TWRP backups also dont work for me.
So maybe i'm missing a step in the guide or i've already tried so much to mod my phone i've changed settings/partitions that shouldn't have been changed for this guide to work.
My bootloader is unlocked, i have/had TWRP 3.41 installed.
After a fail i flash back to the original ROM using Xiaomi ABD/Fastboot Tools (xiaomiABDFastbootTools.jar)
Any help would be appreciated!
I never had issue when I flashed the GSI from the crdroid guide did you make sure that you put the GSI installer.zip and the image file rename to system.img to the root internal storage??
Yes i did. It could also find the system.img file, but just wasn't able to flash it.
Can you tell mw what ROM you were flashing from?
Abducted23 said:
Yes i did. It could also find the system.img file, but just wasn't able to flash it.
Can you tell mw what ROM you were flashing from?
Click to expand...
Click to collapse
First I flashed crdroid. but did not like it. then I flashed blissrom using the same guide for crdroid. i just downloaded the rom posted on the guide. while for the bliss rom the arm64-bgN
Did you wipe data first before flashing?
So I've been pulling hair for 2 days. I can flash everything fine recovery boots fastboot. But it consistently says no OS on either slots. Tried flashing stock to both went all the way through loading lineage and same thing. I'm at wits end. Also not a single password I put in decrypts data.
Also Metro/Tmob variant xt2131-1 bootloader unlocked.
Have you tied fastboot -w? It sounds like the partitions are messed up.
I have. I've done all of the above just still a persistent boot loop.
Fandroid Tech said:
Have you tied fastboot -w? It sounds like the partitions are messed up.
Click to expand...
Click to collapse
Currently retrying to flash stock firmware with a Motorola flashing program. Will let you know here in about 2 min.
Fandroid Tech said:
Have you tied fastboot -w? It sounds like the partitions are messed up.
Click to expand...
Click to collapse
Yep. Again boot loop. Says no OS. Stock recovery says last installation failed. Flashing the service flash package to see if that makes a difference. Hopefully because it says it reflashed my bootloader and stock recovery.
Spedwardo said:
Yep. Again boot loop. Says no OS. Stock recovery says last installation failed. Flashing the service flash package to see if that makes a difference. Hopefully because it says it reflashed my bootloader and stock recovery.
Click to expand...
Click to collapse
The motorola program formats the partitions before flash unlike an automated fastboot flash. The only issue I can see is a physical issue with the UFS/EMMC 5.1 chip, maybe even the ram(very unlikely). Had there been any warning signs such as the phone rebooting randomly or freezing? Motorola has a one year warranty for all devices.
No nothing of the sort. I did a factory reset because I was gonna try out lineage and this is where I'm at now. Still no OS. Even after flashing 3 times. I did have a remote access trojan that rewrote my partition data and resized one and added one and used the root hidden partition to store the data in while it was being transferred.
This drive folder has the system, system_ext, vandor and product of the xt2131-1 that can be flashed in twrp or orangefox. Make sure you make the partitions rw in twrp or OF using 100 rw zip (search for it) then mount as rw in terminal. Flash these images or image,whichever you believe to be needing. Then try and reboot. If all else fails then download the firmware from LMSA and use tinyfastboot tools to flash it. Always worked for me. Let me know how it goes. Heres the link to the files.
XT2131-1_Denver-Osaka_04-2022_RRE31.60-47-2-2 - Google Drive
drive.google.com
!!!!!Make Sure you have verity and verification disabled before trying to flash these. Hence the 100 rw zip is necessary. And must be flashed correctly. 73 error can be flashed with Ubuntu!!!!!!!!
**Edit**
Make sure you always
Fastboot -w then
Factory reset in recovery then format data for a full clean install. This vendor build is made for the boost mobile variant but it is universal. The firmware is incremental based as well so it knows which build to install or activate on the tmo/metro variant. I have all the apps and files for all carriers that have this model.
sosthenisRR said:
This drive folder has the system, system_ext, vandor and product of the xt2131-1 that can be flashed in twrp or orangefox. Make sure you make the partitions rw in twrp or OF using 100 rw zip (search for it) then mount as rw in terminal. Flash these images or image,whichever you believe to be needing. Then try and reboot. If all else fails then download the firmware from LMSA and use tinyfastboot tools to flash it. Always worked for me. Let me know how it goes. Heres the link to the files.
XT2131-1_Denver-Osaka_04-2022_RRE31.60-47-2-2 - Google Drive
drive.google.com
!!!!!Make Sure you have verity and verification disabled before trying to flash these. Hence the 100 rw zip is necessary. And must be flashed correctly. 73 error can be flashed with Ubuntu!!!!!!!!
**Edit**
Make sure you always
Fastboot -w then
Factory reset in recovery then format data for a full clean install. This vendor build is made for the boost mobile variant but it is universal. The firmware is incremental based as well so it knows which build to install or activate on the tmo/metro variant. I have all the apps and files for all carriers that have this model.
Click to expand...
Click to collapse
If this doesnt work you can try a blankfile flash via edl, if that does not work nothing will.
Fandroid Tech said:
The motorola program formats the partitions before flash unlike an automated fastboot flash. The only issue I can see is a physical issue with the UFS/EMMC 5.1 chip, maybe even the ram(very unlikely). Had there been any warning signs such as the phone rebooting randomly or freezing? Motorola has a one year warranty for all devices.
Click to expand...
Click to collapse
Not at home. Staying the night at my mom's. Get home early tomorrow and I will try the advised steps. I went through my previous flashing steps and am now just missing the persist partition. I'll report back as for the edl mode and I have 2 blank flash files just cannot get into edl mode. Have qfil rsd and motoflashpro
Spedwardo said:
just cannot get into edl mode.
Click to expand...
Click to collapse
What have you tried thus far? Have you tried fastboot commands to get into edl, I think it may also also a boot menu option in twrp but I don't remember. Also now that I think about, after flashing the firmware(to both lots as you say) have you tried fastboot set_active a (or) b? Also where did you find the firehose file for it, I could not find one on other forums?
So far im downloading the files and will try what you suggested now. I'll let you know in 30 min. But I've tried factory reset. Flash. Formatting then flashing. Blank flash. Formatting then flashing. I've also used fastboot --force -slot=all flash ***. *****. Etc. Tried flashing. Flashing the copy partitions and tried flashing a gsi an aosp. Got to lineages recovery but still the same issue. Some partition are unmountable. At this point now it refuses to charge while off.. and if I do plug it in while off it continues to boot loop from the battery/charging screen.
Spedwardo said:
At this point now it refuses to charge while off.. and if I do plug it in while off it continues to boot loop from the battery/charging screen.
Click to expand...
Click to collapse
Sorry to tell you this but the phone is definitely ****ed on a hardware level, no amount of reflashing the firmware will fix that. The partition issue is likely caused by the EMMC/UFS malfunctioning, however the charging issue is definitely not caused by software as the battery has a separate controller. Your best bet would be to replace the motherboard, your phone's warranty is however void anyways since you unlocked the bootloader so you would have to do it yourself.
Fandroid Tech said:
Sorry to tell you this but the phone is definitely ****ed on a hardware level, no amount of reflashing the firmware will fix that. The partition issue is likely caused by the EMMC/UFS malfunctioning, however the charging issue is definitely not caused by software as the battery has a separate controller. Your best bet would be to replace the motherboard, your phone's warranty is however void anyways since you unlocked the bootloader so you would have to do it yourself.
Click to expand...
Click to collapse
How do I disable anti-rollback???? Might be the issue with it not flashing vb* files. Assuming those control vendor persiste etc
Spedwardo said:
How do I disable anti-rollback???? Might be the issue with it not flashing vb* files. Assuming those control vendor persiste etc
Click to expand...
Click to collapse
You can't, the manufacture prevents you from doing so due to "security issues". Make sure you get the latest firmware at https://mirrors.lolinet.com/firmware/moto/denver/official/. This will restore all partitions including vendor and persist as it generates from the modem partition, also android 11 and up does not use regular persist partitions anymore, it is now in the "super" images so don't worry about it. When you extract the latest firmware from this site there will be an XML file, go to https://forum.xda-developers.com/t/...e-with-motorola-devices.4042039/post-82186933 and follow the instructions, before flashing made sure to select slot A, after you are done flashing slot A set it to slot B and flash again, then reboot regularly. To set the slot run the fastboot command before flashing, for example fastboot set_active a, flash firmware, fastboot set_active b, flash firmware, reboot.