Persist.img and battery drain - Xiaomi Mi CC9 / Mi 9 Lite Questions & Answers

I had a problem with restoring an android 9 backup over installed android 10 and I had to flash Chinese android 9 in edl mode.
Then I flashed eu fastboot version of miui. At some point I noticed a problem with gyroscope and as a tutorial stated I flashes persist.img and the problem was gone. Then I had a problem with a toast notification saying the data was corrupted and find my phone can't be used. Again I flashed persist.img and the problem is gone.
But my battery is draining fast. I won't put the numbers here but is unreasonable fast. I read that it has to do with persist also.
I've dumped my persist partition and it looks like just a bunch of data and variables for sensors, unencrypted. Nothing about battery.
Moreover, global fastboot rom does not contain persist and even the EU one, which comes with a persist.img, no script tells fastboot to flash it.
Whats the deal with this persist partition and why does it create so much problems?
Also, I did a factory reset then I restore an older backup but my encryption data got messed up so I had to format userdata.
It's not a rogue app, it's not a permission setting. It is something I can't debug.
Anyone experienced any of these?

No one?

editheraven said:
No one?
Click to expand...
Click to collapse
Idk why you wanted to downgrade. MIUI Q works great. I never tried to do it, so it never happened to me

Related

Big problem with persist.img partition, ruined my phone :(

Hello friends!
I come with a big problem that happened to me a few days ago, I flashed the Android10 rom of Xiaomi.eu but in that process I accidentally lost my persist.img partition and practically ruined my phone:crying: (DON'T FLASH THE WEEKLY OF XIAOMI.EU YET WITHOUT PERSIST BACKUP) the gyroscope and compass of my phone are not working and I lost my Netflix L1 certification, I am having a hard time.
So I think I have a solution to this and is to have made a backup of my persist.img partition (which I did not do and it was my mistake) could someone bring me a TWRP backup of a persist partition of yours? to restore it on my phone and test if that way I can revive my compass, gyroscope and L1 .. it would help me a lot and I would appreciate it very much.
Thanks in advance from El Salvador!
Pablo_AK47 said:
Hello friends!
I come with a big problem that happened to me a few days ago, I flashed the Android10 rom of Xiaomi.eu but in that process I accidentally lost my persist.img partition and practically ruined my phone:crying: (DON'T FLASH THE WEEKLY OF XIAOMI.EU YET WITHOUT PERSIST BACKUP) the gyroscope and compass of my phone are not working and I lost my Netflix L1 certification, I am having a hard time.
So I think I have a solution to this and is to have made a backup of my persist.img partition (which I did not do and it was my mistake) could someone bring me a TWRP backup of a persist partition of yours? to restore it on my phone and test if that way I can revive my compass, gyroscope and L1 .. it would help me a lot and I would appreciate it very much.
Thanks in advance from El Salvador!
Click to expand...
Click to collapse
It is the first time I try to upload something, I hope I have achieved it and also, I hope it serves you
- EU rom is based on the chinese ROM, your device will get L3, not possible currently to get L1 with EU.
- Don't use anyone's persist partition, it can make things worse. Download the fastboot ROM for the Mi 9 lite, extract it and find the persist file and then flash that one.
My suggestion is to wipe everything in TWRP, flash persist file and then flash EU ROM. If you're having problems no choice but to flash fastboot ROM and start fresh.
TWRP-3.3.1-0709-XIAOMI_CC9-CN-wzsx150
This is the recovery that I used for the copy
hi
eeemmmbiz said:
- EU rom is based on the chinese ROM, your device will get L3, not possible currently to get L1 with EU.
- Don't use anyone's persist partition, it can make things worse. Download the fastboot ROM for the Mi 9 lite, extract it and find the persist file and then flash that one.
My suggestion is to wipe everything in TWRP, flash persist file and then flash EU ROM. If you're having problems no choice but to flash fastboot ROM and start fresh.
Click to expand...
Click to collapse
persist.img is not allowed to be flashed by fastboot even if the bootloader is unlocked. there is a specific technique to do that with TWRP. Falshing the whole firmware will not resolve the problem
---------- Post added at 12:09 AM ---------- Previous post was at 12:08 AM ----------
Pablo_AK47 said:
Hello friends!
I come with a big problem that happened to me a few days ago, I flashed the Android10 rom of Xiaomi.eu but in that process I accidentally lost my persist.img partition and practically ruined my phone:crying: (DON'T FLASH THE WEEKLY OF XIAOMI.EU YET WITHOUT PERSIST BACKUP) the gyroscope and compass of my phone are not working and I lost my Netflix L1 certification, I am having a hard time.
So I think I have a solution to this and is to have made a backup of my persist.img partition (which I did not do and it was my mistake) could someone bring me a TWRP backup of a persist partition of yours? to restore it on my phone and test if that way I can revive my compass, gyroscope and L1 .. it would help me a lot and I would appreciate it very much.
Thanks in advance from El Salvador!
Click to expand...
Click to collapse
wich device do you have ? mi 9 lite or mi cc9 ?
ALdelSol said:
It is the first time I try to upload something, I hope I have achieved it and also, I hope it serves you
Click to expand...
Click to collapse
Thank you my friend! really
But.. bad news, it didn't work D: I think I'm fried
ALdelSol said:
TWRP-3.3.1-0709-XIAOMI_CC9-CN-wzsx150
This is the recovery that I used for the copy
Click to expand...
Click to collapse
exactly the same as me bro, I use that one
eeemmmbiz said:
- EU rom is based on the chinese ROM, your device will get L3, not possible currently to get L1 with EU.
- Don't use anyone's persist partition, it can make things worse. Download the fastboot ROM for the Mi 9 lite, extract it and find the persist file and then flash that one.
My suggestion is to wipe everything in TWRP, flash persist file and then flash EU ROM. If you're having problems no choice but to flash fastboot ROM and start fresh.
Click to expand...
Click to collapse
I use xiaomi.eu actually man, but in global firmware after have installed android10 eu rom my device name has changed to CC9 and lost the L1 drm and google play certification..
gringo80 said:
persist.img is not allowed to be flashed by fastboot even if the bootloader is unlocked. there is a specific technique to do that with TWRP. Falshing the whole firmware will not resolve the problem
---------- Post added at 12:09 AM ---------- Previous post was at 12:08 AM ----------
wich device do you have ? mi 9 lite or mi cc9 ?
Click to expand...
Click to collapse
Mi 9 Lite man, but after installed android10 xiaomi.eu weekly rom has changed to CC9 in my google account devices, lost the certification of google play and L1 drm and the compass and gyroscope calibrations
gringo80 said:
persist.img is not allowed to be flashed by fastboot even if the bootloader is unlocked. there is a specific technique to do that with TWRP. Falshing the whole firmware will not resolve the problem
---------- Post added at 12:09 AM ---------- Previous post was at 12:08 AM ----------
wich device do you have ? mi 9 lite or mi cc9 ?
Click to expand...
Click to collapse
That's not what I said, I said he can flash persist.img through twrp, but to get the persist file I suggested he download the fastboot rom, extract it and use the persist.img found inside. I had the same issue and even after flashing the correct persist.img it wasn't working, I had to wipe everything in TWRP, flash persist.img and flash the rom again for it to work correctly.
Thanks for your replies ! I had the same problem and flash persist.img worked
ALdelSol said:
It is the first time I try to upload something, I hope I have achieved it and also, I hope it serves you
Click to expand...
Click to collapse
My friend, I tried with backup but not worked I have another idea: the folder metod ^^ can you with a file explorer copy the /persist folder and share me as you did with backup? I will thank you very much
eeemmmbiz said:
- EU rom is based on the chinese ROM, your device will get L3, not possible currently to get L1 with EU.
- Don't use anyone's persist partition, it can make things worse. Download the fastboot ROM for the Mi 9 lite, extract it and find the persist file and then flash that one.
My suggestion is to wipe everything in TWRP, flash persist file and then flash EU ROM. If you're having problems no choice but to flash fastboot ROM and start fresh.
Click to expand...
Click to collapse
Which TWRP version you used to do that ?
Can you post step by step how to erase "everything" in TWRP and then flash fastboot ROM ?
What do you mean by wipe everything ??
So many people mess with loss of gyroscope etc. and they can't fix it. Online solutions with using terminal commands in TWRP to flash persist.img do not work. Nothing happens.
Cheers !

Xiaomi Mi 9T Pro Issues - Rebooting and Crashing

For 3 or 4 months the phone worked great. Could play hours any kind of game with no issues. Then all of a sudden the phone begun to reboot randomly 3, 4 or 5 times straight for no reason. Would even reboot while in my pocket. Another frecuent issue is apps crashing. All the apps and extensions frequently crash (facebook, instagrame, Chrome, Gboard, Mi apps) might be those I am using as well as the ones I am not. Another issue is that it won't install updates, the system downloads them but fails to install, I had to use fastboot option.
I tried wiping the phone to factory, installing EU ROM, Global ROM, Changing to MIUI 12. When wiping the phone I even tried installing apps manually to see if there was a particular one messing with the phone.
NOTHING WORKS!!!
Do not know what else to do... I am about to throw the phone a buy a new one... planning to move out of Xioami...:crying:
ANY IDEAS???
femarini said:
For 3 or 4 months the phone worked great. Could play hours any kind of game with no issues. Then all of a sudden the phone begun to reboot randomly 3, 4 or 5 times straight for no reason. Would even reboot while in my pocket. Another frecuent issue is apps crashing. All the apps and extensions frequently crash (facebook, instagrame, Chrome, Gboard, Mi apps) might be those I am using as well as the ones I am not. Another issue is that it won't install updates, the system downloads them but fails to install, I had to use fastboot option.
I tried wiping the phone to factory, installing EU ROM, Global ROM, Changing to MIUI 12. When wiping the phone I even tried installing apps manually to see if there was a particular one messing with the phone.
NOTHING WORKS!!!
Do not know what else to do... I am about to throw the phone a buy a new one... planning to move out of Xioami...:crying:
ANY IDEAS???
Click to expand...
Click to collapse
Have you tried formatting (completely different to wiping) data partition before you've flashed any of these roms.
A few things 1st though, just to confirm anyways
Is your bootloader unlocked? Also you have stated you have tried eu rom, is this the xiaomi.eu custom rom you are referring to and if so what type of custom recovery do you have.
Based on my experience with my previous phones, frequent random reboot would only mean:
1) Your battery is bad
2) Flash storage is bad
3) Chip gone bad (CPU, IC, probably anything)
No amount of reset, flash would fix this issue. You need to bring the phone to the service center. Usually they'll change the whole motherboard or battery depending on the issue.
You can try to flash any AOSP rom and see if still having those issues.
sofir786 said:
Have you tried formatting (completely different to wiping) data partition before you've flashed any of these roms.
A few things 1st though, just to confirm anyways
Is your bootloader unlocked? Also you have stated you have tried eu rom, is this the xiaomi.eu custom rom you are referring to and if so what type of custom recovery do you have.
Click to expand...
Click to collapse
I used Mi Unlock to unlock the bootloader, and yes the roms I used were official ones. I tried downloading the OTA and the Recovery files but can't install those. The Phone starts installing and at 7 or 8% is stops and reboots. So in order to install the different roms I downloaded Mi flash and used the fastboot files. Installing the roms through Mi flash from my computer into the phone does get me to the end of the installation.
How would the formatting work?
femarini said:
How would the formatting work?
Click to expand...
Click to collapse
Use custom recovery like TWRP or orangefox. Backup your data to any external drive, then boot into recovery and use format data option. Also, as someone stated above, try aosp roms as well.
Mi 9T Pro ll Tapatalk

Another corrupted Persist partition question thread

Hiya. So, here's the story:
Xiaomi Mi 9T Pro EEA, bought from Amazon, not a shady reseller
I made a Google Backup of my apps, because I decided to try out some Android 11 roms.
After trying them out, I wanted to go back to Android 10, so I clean flashed my rom, GApps and disable force encrypt, the usual stuff. But the Google Backup, that I previously used on all the A11 roms was suddenly gone.
I thought, that wouldn't be a problem, since I still had my Android 10 TWRP Backup that I made, before I started experimenting with A11.
I restored that backup and couldn't unlock my phone. So I deleted /data/system/locksettings.db and finally my phone would unlock.
But: My sensors didn't work anymore. I searched the internet for info and found out, that my persist partition got corrupted.
tl; dr: I restored a TWRP backup and my Persist partition corrupted.
Until yesterday, I didn't even know, what the Persist partition was. I never touched it.
I know how to get my sensors working again. But I guess my Widevine L1 is gone now, isn't it?
Seki_ said:
Hiya. So, here's the story:
Xiaomi Mi 9T Pro EEA, bought from Amazon, not a shady reseller
I made a Google Backup of my apps, because I decided to try out some Android 11 roms.
After trying them out, I wanted to go back to Android 10, so I clean flashed my rom, GApps and disable force encrypt, the usual stuff. But the Google Backup, that I previously used on all the A11 roms was suddenly gone.
I thought, that wouldn't be a problem, since I still had my Android 10 TWRP Backup that I made, before I started experimenting with A11.
I restored that backup and couldn't unlock my phone. So I deleted /data/system/locksettings.db and finally my phone would unlock.
But: My sensors didn't work anymore. I searched the internet for info and found out, that my persist partition got corrupted.
tl; dr: I restored a TWRP backup and my Persist partition corrupted.
Until yesterday, I didn't even know, what the Persist partition was. I never touched it.
I know how to get my sensors working again. But I guess my Widevine L1 is gone now, isn't it?
Click to expand...
Click to collapse
Yes, it's gone. Share what you did to get the sensors working.
mauam said:
Yes, it's gone. Share what you did to get the sensors working.
Click to expand...
Click to collapse
Unfortunate. Oh well.
There's actually multiple ways. You could:
Flash persist from Xiaomi's full fastboot package
Flash persistbak to persist
Flash a working persist image from another Mi 9T Pro
All those things worked for me. In the end, I settled with the persistbak method.
Seki_ said:
Unfortunate. Oh well.
There's actually multiple ways. You could:
Flash persist from Xiaomi's full fastboot package
Flash persistbak to persist
Flash a working persist image from another Mi 9T Pro
All those things worked for me. In the end, I settled with the persistbak method.
Click to expand...
Click to collapse
could you tell me how you flashed and dumped persistbak?
wavychris said:
could you tell me how you flashed and dumped persistbak?
Click to expand...
Click to collapse
It's almost been a year, so I don't fully remember what I did exactly, but there's some tutorials around you can find pretty easily.
The only thing I remember is going into fastboot and dumping and flashing my partitions via command line, I think.
Seki_ said:
It's almost been a year, so I don't fully remember what I did exactly, but there's some tutorials around you can find pretty easily.
The only thing I remember is going into fastboot and dumping and flashing my partitions via command line, I think.
Click to expand...
Click to collapse
ive been searching for a month and im still not sure which tutorial to follow, all i want is to fix my sensors and get widevine l1 back in case it gets void when i flash persist, any help would be phenomenal!
wavychris said:
ive been searching for a month and im still not sure which tutorial to follow, all i want is to fix my sensors and get widevine l1 back in case it gets void when i flash persist, any help would be phenomenal!
Click to expand...
Click to collapse
Well if you didn't make a backup before, L1 is L Gone. I didn't get it back. Following any tutorial should get you your sensors back though.
And remember: The first thing to do when getting a new phone is to backup that persist partition, so you don't need to worry about something like this happening again.
Seki_ said:
Well if you didn't make a backup before, L1 is L Gone. I didn't get it back. Following any tutorial should get you your sensors back though.
And remember: The first thing to do when getting a new phone is to backup that persist partition, so you don't need to worry about something like this happening again.
Click to expand...
Click to collapse
if i remember correctly you can get widevine l1 back via a magisk module or flashing xiaomi.eu rom and you can download the certificate from there, try it out if you dont got nothing to lose, by the way, if i flash persist will the sensors work permanently or do i have to do this again every once in a while?
wavychris said:
if i remember correctly you can get widevine l1 back via a magisk module or flashing xiaomi.eu rom and you can download the certificate from there, try it out if you dont got nothing to lose, by the way, if i flash persist will the sensors work permanently or do i have to do this again every once in a while?
Click to expand...
Click to collapse
Oh, interesting. Definitely gotta try that, thanks. How do you download the certificate in MIUI? Does it happen automatically?
Since I flashed my persistbak, I didn't flash anything else and my sensors are still working, so I guess it sporadically happens... sometimes?
Btw, if you aren't already, you should use OrangeFox recovery instead of TWRP on Xiaomi devices. It usually doesn't kill itself by wiping partitions or flashing roms, especially when coming from MIUI. Also, you can make persist backups with it. For some reason they removed that feature from TWRP.
Seki_ said:
Oh, interesting. Definitely gotta try that, thanks. How do you download the certificate in MIUI? Does it happen automatically?
Since I flashed my persistbak, I didn't flash anything else and my sensors are still working, so I guess it sporadically happens... sometimes?
Btw, if you aren't already, you should use OrangeFox recovery instead of TWRP on Xiaomi devices. It usually doesn't kill itself by wiping partitions or flashing roms, especially when coming from MIUI. Also, you can make persist backups with it. For some reason they removed that feature from TWRP.
Click to expand...
Click to collapse
in case you got it wrong xiaomi.eu is a custom miui based rom, not official, just to clarify that, and to download the certificate you must enroll fingerprint then go to fingerprint payments and youll find widevine l1 there, then click on certificate in widevine l1, pretty easy stuff, also how do i install orangefox?
wavychris said:
in case you got it wrong xiaomi.eu is a custom miui based rom, not official, just to clarify that, and to download the certificate you must enroll fingerprint then go to fingerprint payments and youll find widevine l1 there, then click on certificate in widevine l1, pretty easy stuff, also how do i install orangefox?
Click to expand...
Click to collapse
Oh, I can't read. For some reason, I thought you said xiaomi.eu or stock, that's why I said MIUI. Anyway, thanks for telling me. I never heard of that.
To install OrangeFox, just download the zip, make backups if you want to be extra sure and flash the zip. Here's the thread: https://forum.xda-developers.com/t/recovery-official-orangefox-recovery-project-r11-1.4308019/
The UI is different, so it took me a little while to get used to it, but ultimately, OrangeFox is a smoother experience than TWRP, at least on Xiaomi.
wavychris said:
if i remember correctly you can get widevine l1 back via a magisk module or flashing xiaomi.eu rom and you can download the certificate from there, try it out if you dont got nothing to lose, by the way, if i flash persist will the sensors work permanently or do i have to do this again every once in a while?
Click to expand...
Click to collapse
No, you cannot get L1 through Magisk module - because you need a (paid) certificate for your hardware
To the contrary, there is a Magisk module that disables L1, dropping you to default L3.
Although I never understood who/why needs that
wavychris said:
could you tell me how you flashed and dumped persistbak?
Click to expand...
Click to collapse
See here how to backup and/or dump Persist and restore/flash it back.
Of course, if you didn't backup a working Persist on time, you have nothing to restore:
Extracting stock Boot, Recovery and Persist images
Talking here about how to extract the stock Boot, Recovery and Persist images, needed in case of e.g. bootloop upon flashing Magisk or TWRP, to reflash the stock image(s). Also, boot image is needed for patching from Magisk Manager (and flashing...
forum.xda-developers.com
Seki_ said:
Oh, I can't read. For some reason, I thought you said xiaomi.eu or stock, that's why I said MIUI. Anyway, thanks for telling me. I never heard of that.
To install OrangeFox, just download the zip, make backups if you want to be extra sure and flash the zip. Here's the thread: https://forum.xda-developers.com/t/recovery-official-orangefox-recovery-project-r11-1.4308019/
The UI is different, so it took me a little while to get used to it, but ultimately, OrangeFox is a smoother experience than TWRP, at least on Xiaomi.
Click to expand...
Click to collapse
its alright lol, thanks for your help btw have a nice day/night
zgfg said:
No, you cannot get L1 through Magisk module - because you need a (paid) certificate for your hardware
To the contrary, there is a Magisk module that disables L1, dropping you to default L3.
Although I never understood who/why needs that
Click to expand...
Click to collapse
that sucks man, thanks for the news anyway i might use xiaomi.eu rom to get it back that way at least
zgfg said:
See here how to backup and/or dump Persist and restore/flash it back.
Of course, if you didn't backup a working Persist on time, you have nothing to restore:
Extracting stock Boot, Recovery and Persist images
Talking here about how to extract the stock Boot, Recovery and Persist images, needed in case of e.g. bootloop upon flashing Magisk or TWRP, to reflash the stock image(s). Also, boot image is needed for patching from Magisk Manager (and flashing...
forum.xda-developers.com
Click to expand...
Click to collapse
alright thanks i might try it out tommorow ill update you on the process if you want

Sensors not working

I have just installed Havoc Os custom rom on my Mi 4x and here I guess sensors are not working properly as I'm not getting fingerprint option under security in settings.
So on googling It, I found that persist img is not fixed.
And I checked my phone's root folder, there is a file named "persist img"...So here at this point what should I do to make my sensors working without loosing widevinel3.
Just flash persist backup your problem should be solved.
If you don't have backup then please search over forum someone has already shared and that might also help.
I myself solved my problem...
Just wiped my phone's internal Storage through TWRP and installed file(Clean Flash) of my custom rom.
And problem solved
TheDeaDKiLLer said:
I myself solved my problem...
Just wiped my phone's internal Storage through TWRP and installed file(Clean Flash) of my custom rom.
And problem solved
Click to expand...
Click to collapse
Well that is good to hear you that your problem solved.
Just in case for future consider keeping backup of persist as havoc os maintainer recommends keeping the backup to avoid such issue{s}

Razer 2 phone won't boot after disabling a couple apps

I thought I would just casually go through my installed apps and clean some up. I disabled the following...
1. Accessibility Suite
2. Gmail
3. Google TV
4. Google Music
5. Chroma
6. Razor Store
7. Logo+ (Uninstalled)
I then thought to myself that I would probably need the Accessibility Suite for apps that needed that as a permission to work. So I re-enabled it and it updated. I then rebooted and now the phone hangs at the Razor logo. I do have TWRP installed so I can get to that. I also have a complete backup from about a year ago using TWRP which I would like to use as my last resort. I am thinking that by disabling one of the above apps caused this issue. So, can I fastboot and re-enable them using adb? If so what is the command and the name for each app above? I am not an adb guru so the exact commands and names would help. Or if someone can think of another way to get my phone working besides a complete wipe I would greatly appreciate it! I am running MR1 stock with Magisk/art97. I do remember back in the day having a similar problem and I ended up re-flashing the ROM or something and it kept all my data but I think it just repaired the OS or something and that fixed a not booting issue. That was a long time ago so I cannot remember all the specifics but if that rings any bells for anyone as to another way I can approach this I am all ears. Thank you!
Logo+ - you uninstalled it. I dont think any others will prevent booting. If there is no logo, it will sit till it gets one. Reflash logo+ if at all possible. (I have a logo.img in my firmware, but different fone.
Pachacouti said:
Logo+ - you uninstalled it. I dont think any others will prevent booting. If there is no logo, it will sit till it gets one. Reflash logo+ if at all possible. (I have a logo.img in my firmware, but different fone.
Click to expand...
Click to collapse
Thanks for your reply. Logo+ is not a system app and shouldn't have anything to do with the Razor logo when booting up. Logo+ is a 3rd party app that allows to manipulate the colored logo on the back of the phone. For example when a notification comes in Logo+ can light up the colored logo on the back of the phone or make it flash. The app is from here. I've actually uninstalled and reinstalled Logo+ in the past when updating and such with no adverse effects. I can't imagine Logo+ would be the culprit here. What do you think?
I think only logo+ is capable of preventing boot, because your bootlooping. all other apps should NOT cause ANY bootloop, because they do not access anything previous to logo+, your first step in your problem.
Try this...
Logo+ if incorrect in any way will not show. This CAN cause bootloops. No other app you mention can. Perhaps your fone took a silent update, maybe it checked for the Logo+ and 'kicked' you for messing with it. Maybe google decided not to like it, so silently ordered your fone to delete the logo you installed leaving you with no logo+, and until you can see a logo+ your fone will stay there, so try my suggestion, seems your only choice. I have been flashing chips for years so can help, just go with my suggestion, reflash ONLY stock system.img/.bin using your stock flashing application, you'll be glad you did.
Pachacouti said:
I think only logo+ is capable of preventing boot, because your bootlooping. all other apps should NOT cause ANY bootloop, because they do not access anything previous to logo+, your first step in your problem.
Try this...
Logo+ if incorrect in any way will not show. This CAN cause bootloops. No other app you mention can. Perhaps your fone took a silent update, maybe it checked for the Logo+ and 'kicked' you for messing with it. Maybe google decided not to like it, so silently ordered your fone to delete the logo you installed leaving you with no logo+, and until you can see a logo+ your fone will stay there, so try my suggestion, seems your only choice. I have been flashing chips for years so can help, just go with my suggestion, reflash ONLY stock system.img/.bin using your stock flashing application, you'll be glad you did.
Click to expand...
Click to collapse
I will follow your instructions but I am needing some clarification please.
The app Logo+ never came with the stock OS or the Razor Phone 2. It is a separate app made by a 3rd party. So flashing the system.img will not bring back Logo+. So should I first attempt to flash the Logo+ app using TWRP?
If you want me to reflash the stock system.img, I don't believe I have that. How can I obtain this? And could you please provide me with the steps to reflash? Should I use TWRP or fastboot and use Windows adb?
So the Logo+ is only an app. Not a zip. So I don't believe I can flash that. Should I attempt to sideload it? Can I install an app on the phone when the phone cannot boot?
So logo+ IS your prob. Personally I would never use an app to do such work, I'd edit and flash it myself, but hey, you prob know this by now.
Go to (motorola?) Razor support, look for your firmware, it may help if you have phone plugged in while doing so in case they have a detector script to detect firmware for your fone.
Regardless, grab stock offered for your fone. This should also point you in the direction of the correct flashing frmware. once you have them, get back to me.
Or look at what I found using startpage/google:
Need help in flashing stock rom on Razer Phone 2 ! (Stuck in Bootloop)
Hello Everyone , I have ran into a very bad problem and would appreciate some help. I tried rooting my phone (Razer Phone 2 Atnt varient) with the following method...
forum.xda-developers.com
Take your pick, so many stock firmares online here:
Startpage Search Results
www.startpage.com
(I use startpage for these results)
Choose what you believe is for your fone, then read the XDA razor thread I linked to above, I will guide you once you have your files if you still need it, but read the razor thread first
Pachacouti said:
So logo+ IS your prob. Personally I would never use an app to do such work, I'd edit and flash it myself, but hey, you prob know this by now.
Go to (motorola?) Razor support, look for your firmware, it may help if you have phone plugged in while doing so in case they have a detector script to detect firmware for your fone.
Regardless, grab stock offered for your fone. This should also point you in the direction of the correct flashing frmware. once you have them, get back to me.
Or look at what I found using startpage/google:
Need help in flashing stock rom on Razer Phone 2 ! (Stuck in Bootloop)
Hello Everyone , I have ran into a very bad problem and would appreciate some help. I tried rooting my phone (Razer Phone 2 Atnt varient) with the following method...
forum.xda-developers.com
Take your pick, so many stock firmares online here:
Startpage Search Results
www.startpage.com
(I use startpage for these results)
Choose what you believe is for your fone, then read the XDA razor thread I linked to above, I will guide you once you have your files if you still need it, but read the razor thread first
Click to expand...
Click to collapse
The Razer Phone 2 is made by Razer https://www.razer.com/mobile. Motorola makes the Razr which can be confusing.
I don't know how to edit and flash the Logo+ app. Can you do this for me and I'll test? The app is located here https://github.com/CurtisMJ/LogoPlus/releases.
As I understand it as soon as I flash the stock rom it'll put me back to factory settings right? So I'll have to re-personlize my entire phone from scratch. I'd like to leave this as my last resort if possible. So if we can I'd like to flash the Logo+ if you can make that zip for me.
Hi, developer of Logo+ here
I think there's maybe some misunderstanding as to what the app does. It doesn't work on the bootloader splash in any way (this can actually cause failed boots). It's for controlling the RGB on the Razer logo on the back of the device. I named it "Logo+" to avoid any legal issues with caling it "Chroma" since thats a trademark of Razer. The app is entirely user space and is not active during boot. It modifies the lights via sysfs values (with root) that are entirely in RAM so they're cleared on boot.
You can typically just put the .apk in /data/app in recovery mode to install it. I think this may have changed slightly with newer android versions.
Ultimately I don't think Logo+ is needed for or can interfere with boot. I would suggest flashing the system image as suggested for a clean slate.
EDIT: You may end up having to use your last resort backup if you're not keen to loose *too* much data. Not booting is a difficult thing to troubleshoot because there's no feedback as to what went wrong on Android. If its a data thing and not a system thing that is. You could try fastboot flash each system image part to maybe fix any corruption
EDIT2: Take another backup before you do anything though. Titanium back can extract app data from TWRP backups so you can restore your user data at least
CurtisMJ said:
Hi, developer of Logo+ here
I think there's maybe some misunderstanding as to what the app does. It doesn't work on the bootloader splash in any way (this can actually cause failed boots). It's for controlling the RGB on the Razer logo on the back of the device. I named it "Logo+" to avoid any legal issues with caling it "Chroma" since thats a trademark of Razer. The app is entirely user space and is not active during boot. It modifies the lights via sysfs values (with root) that are entirely in RAM so they're cleared on boot.
You can typically just put the .apk in /data/app in recovery mode to install it. I think this may have changed slightly with newer android versions.
Ultimately I don't think Logo+ is needed for or can interfere with boot. I would suggest flashing the system image as suggested for a clean slate.
EDIT: You may end up having to use your last resort backup if you're not keen to loose *too* much data. Not booting is a difficult thing to troubleshoot because there's no feedback as to what went wrong on Android. If its a data thing and not a system thing that is. You could try fastboot flash each system image part to maybe fix any corruption
EDIT2: Take another backup before you do anything though. Titanium back can extract app data from TWRP backups so you can restore your user data at least
Click to expand...
Click to collapse
Thank you for taking the time to chime in here @CurtisMJ. I did end up gettijg it to boot now in partition a. I went into TWRP and switched to partition a and phone boots but no longer has root or magisk. I'm not sure how the partitions work but it looks like there are two that the Razer uses. A and b. And I guess I've been using b since the beginning and since b won't boot now I tried booting off partition a and the phone seems to work as it did. All apps and widgets are in the same place except magisk and phone isn't rooted. I could reflash the system image but the amount of time to re-personalize everything will be extensive. So I just wanted to make sure I did everything I could before that. I'll try copying the apk as suggested and see if that works.
Do you know if there is a way to enable system apps when they've been disabled like I did when phone won't boot? I am in partition a right now and booted and I reinstalled logo+ and saw that all the apps I disabled in OP are back to being enabled. So I am not sure if partition a and b share the same system and user data but everything is exactly what it looks like from partition b. So it is a good chance they share everything except magisk which I guess is flashed at the partition level. Just trying to make sense. Thanks for everyone's time.
So the A-B partition layout is a thing that was introduced by google for more reliable system updates. Effectively the phone has 2 copies of the OS, including system partition,kernel,vendor etc and the phone flip-flops between them on every update, updating the "other" partition to the one its running so if it fails it can boot to the still good one. So you effectively went a system update backwards, but using the same user data partition (or Magisk kept an old copy of the system around). System apps disabled status is stored in /data/system/users/0/package-restrictions.xml which can edited in TWRP with some effort. Magisk is likely flashed to kernel B so you're correct in that its a partition level thing.
CurtisMJ said:
So the A-B partition layout is a thing that was introduced by google for more reliable system updates. Effectively the phone has 2 copies of the OS, including system partition,kernel,vendor etc and the phone flip-flops between them on every update, updating the "other" partition to the one its running so if it fails it can boot to the still good one. So you effectively went a system update backwards, but using the same user data partition (or Magisk kept an old copy of the system around). System apps disabled status is stored in /data/system/users/0/package-restrictions.xml which can edited in TWRP with some effort. Magisk is likely flashed to kernel B so you're correct in that its a partition level thing.
Click to expand...
Click to collapse
Thank you so much for that explanation. That makes a lot of sense. My OS has been MR1 for a long time and OTA has been turned off so I guess there hasn't been any OS updates so there's been no reason to switch between partition a and b I guess. So I guess there's technically been a backup of my OS all this time with the double partition thing which is cool. And I guess I could magisk and root partition a. If I reflash the system image to partition b will that effect partition a?
I think he's talking bootloaders re: a/b partitioning, The point of A/B being if your using 'A' to boot, and you update, the updated BOOTLOADER is flashed to 'B' and when you reboot the f'n, 'B' becomes your main bootloader until next update where that update will use 'A' having been 'emptied' after the previous update sort of thing, I dont have a/b, but this is my understanding of the a/b partitioning,,,?
Opens up the options for dual booting fone with or without magisk, If I had a/b, i'd flash magisk to one and stock to the other...
Pachacouti said:
I think he's talking bootloaders re: a/b partitioning, The point of A/B being if your using 'A' to boot, and you update, the updated BOOTLOADER is flashed to 'B' and when you reboot the f'n, 'B' becomes your main bootloader until next update where that update will use 'A' having been 'emptied' after the previous update sort of thing, I dont have a/b, but this is my understanding of the a/b partitioning,,,?
Opens up the options for dual booting fone with or without magisk, If I had a/b, i'd flash magisk to one and stock to the other...
Click to expand...
Click to collapse
I was thinking the same. I believe I have the opportunity to stick with the working partition which is a, and magisk that. And then for the partition b I could put the official lineage OS on there. My only concern is if lineage had an update does it update both a and b partitions which I would lose my original OS then. I guess I'll have to research.
I think it's safe to assume that when an update takes place, upon reboot, whichever bootloader you WERE using, a OR b, is now empty... it's staring you in the face
Just remember what we agreed on. Once you magisk your current bootloader, make a backup of said bootloader, store it on main computer, because when you flash lineage, your magisk in your current slot will be wiped. Once you have installed Lineage, you will need to boot into fastboot to re-flash magisk, and then use fastboot boot a or b for dual booting until you get an app or sumat to choose in gui what you choose to boot into
What I am thinking I will do for the time being is stick with booting into partition a which is currently not rooted and I am fine with that. At least it works unlike partition b. This is my main phone, my only phone, and I need it to work right now so would rather not risk causing issues flashing stuff. I know enough about flashing to be dangerous.
Currently the official release of lineage for the Razer Phone 2 is still not stable yet according to the forum here. So camera still doesn't work and I need the camera to work. So I'll wait until the camera is fixed which hopefully will be soon.
You stated in your previous post "sumat to choose in gui what you choose to boot into" can you clarify? Are you saying there is a GUI that helps choose what to boot into? Currently I am using TWRP to select partition a or b to boot into. It takes about a minute to load into TWRP but I wouldn't be doing it often. I don't think I really have a use for dual booting.
I appreciate the help. As soon as I am ready to proceed I'll update this post and If you're still around I'll receive your assistance. Thank you for your time.

Categories

Resources