Finally time for root and possibly ROM: best way? - Xiaomi Mi Note 10 Questions & Answers

Hi there
I always used to have a rooted phone, and most of the time with LineageOS/Cyanogenmod. Rooting is usually the very first thing I do. But since the Mi Note has stupid unlock limitations, I could not do that right when I bought the phone 1.5 years ago. And I let that be til now since there weren't any ROMs for a long time anyway, and I was always scared to lose data since restoring my data without my root backup was kinda scary (as I never did that before). Now it's time and I wanted to ask for the best way to unlock the phone without losing anything.
Is this the way I should proceed? Any suggestion and improvements are very welcome.
1. Copy all internal storage to my computer
Backup all data using the system backup tool to my computer.
Also backup using the google backup.
To be sure create a backup of contacts, phone log etc with "super backup".
2a. download Xiaomi Drivers http://pcsuite.mi.com/
2.b Download the unlock tool from Xiaomi, and unlock it using https://en.miui.com/unlock/download_en.html
3. Install TWRP(+OF_avb_patcher_mauronofrio.zip) & Magisk (after booting into system rename the magisk zip to apk and install it again)
NOTE: to install avb patch I had to start adb and "adb sideload OF_avb_patcher_mauronofrio.zip"
4. Restore everything (whats the best to start with? the google one can only be restored on a fresh install, right? So use that, if anything is missing, use the system backup tool?)
I then might decide to install LineageOS 18.1 (is it the most stable custom rom out there?)
5. Backup again everything a) with nandroid and b) with a root backup tool (is Titanium Backup still recommended? it's the one I used for many years). "Migrate"
6a. Flash latest (21.4.14) Firmware
6b. Flash LinageOS & NikGapps
7. Restore backup and enjoy finally a good rom
If anything goes wrong I can restore original rom with this guide if nandroid restore fails? https://c.mi.com/oc/miuidownload/detail?guide=2

Personally i don't do nandroids so no advice there, but i'd use Migrate instead of TIBU. TIBU is old now. Also when flashing magisk just flash the zip, then after booting into system rename the magisk zip to apk and install it again that way. Their readme will tell you to do it in a more complicated way but in my experience they way i described works just fine.
Also, if it's your first time installing twrp don't forget to flash OF_avb_patcher_mauronofrio.zip afterwards. You can download it in the twrp thread. You will have bootloop or be stuck on logo if you don't.

Thank you very much for this valuable feedback.
Did update the post to reflect that, for anyone finding this topic helpful too.
To see the device in the unlock tool I had to install pcsuite.
I had to sideload the avb patch and magisk in TWRP as the device on windows was mounted but showed a lot of strange folders (98sdjbdpa089j89we) and copy files over did not work.
But now I have TWRP and Magisk on it

I might still did something wrong Used magisk from magisk.me (damn duckduckgo) instead from github. It works but I'm a little scared now. (At least is has the same checksum)
Also SafetyNet does not work (I know the current check does not work but also apps relying on it don't work).
Should I reflash TWRP and install the renamed .apk (as .zip) again?
Edit: just did it, used the canary version with the hope that SafetyNet works, but that didn't change.
And is there that TWRP does not show my internal storage correctly (it works without problems after boot)?
Edit: "fastboot oem reboot-recovery" does not ask for encryption password, "fastboot boot twrp-3.3.1-xx-xxxxxx-mauronofrio.img" does and shows the sdcard

dedors said:
I might still did something wrong Used magisk from magisk.me (damn duckduckgo) instead from github. It works but I'm a little scared now. (At least is has the same checksum)
Also SafetyNet does not work (I know the current check does not work but also apps relying on it don't work).
Should I reflash TWRP and install the renamed .apk (as .zip) again?
Edit: just did it, used the canary version with the hope that SafetyNet works, but that didn't change.
And is there that TWRP does not show my internal storage correctly (it works without problems after boot)?
Edit: "fastboot oem reboot-recovery" does not ask for encryption password, "fastboot boot twrp-3.3.1-xx-xxxxxx-mauronofrio.img" does and shows the sdcard
Click to expand...
Click to collapse
For safetynet test this
MAGISK MODULE ❯ Universal SafetyNet Fix 2.4.0
Universal SafetyNet Fix Magisk module Magisk module to work around Google's SafetyNet attestation. This module works around hardware attestation and recent updates to SafetyNet CTS profile checks. You must already be able to pass basic CTS...
forum.xda-developers.com

I couldn't resist and went ahead with LineageOS, so that problem got solved

Related

CM Titanium Backup and SuperSU - a strange journey to apocalypse?

Dear community,
honestly I considered myself not a noob anymore when it comes to flashing, rooting and installing devices. But obviously I was wrong: Cyanogenmod, Titanium Backup and SuperSU are fooling me to madness. :silly: So I hope to find help here because all I want to do is to restore all apps' data. But I will start at the beginning:
I updated my rooted Nexus 7 LTE to CM 13.0-20151226-NIGHTLY-deb and it turned out that Google Play Services continue to crash, no PlayStore could be loaded and so on. I've searched for this issue and don't want to discuss this here as there are many threads for this already.
However, I deciced to switch to OpenGapps and downloaded the pico package for Android 6 on ARM.
By the way I also switched from CWM recovery to TWRP 2.8.7.1.
Finally, CM was running as expected and I danced my pants off!
During all this I formatted the device completely, but made a backup of all apps using Titanium Backup.
So, I re-installed Titanium Backup, copied the backup files to the device and started to "restore missing apps and data" from the bulk operations menu.
All selected apps were installed perfectly (danced again) but then I noticed that the apps' data was not restored.
I searched for this issue and found instructions saying that SuperSU is needed for Titanium Backup to restore data. That was new to me as TB worked fine without SuperSU on my device all the time.
However, I flashed the latest stable Version of SuperSU from chainfire.
After rebooting, the SuperSU app was installed and when it starts, an error popup appears saying that no su file is installed and this has to be done manually.
When I now start Titanium Backup, it prompts missing root access and consequently does not start up.
Furthermore CM is really unstable and freezes from time to time.
So, I lost root by flashing SuperSU? What irony!
Anyway, I am willing to format and re-install my device another time and I would gladly set SuperSU aside as I never needed it in the past. But I really need to get Titanium Backup working to restore the apps' data.
Can anyone of you help me on this, please? Is SuperSU really necessary or do you know a way to manage Titanium Backup without SuperSU on CM13?
cocororo said:
Dear community,
honestly I considered myself not a noob anymore when it comes to flashing, rooting and installing devices. But obviously I was wrong: Cyanogenmod, Titanium Backup and SuperSU are fooling me to madness. :silly: So I hope to find help here because all I want to do is to restore all apps' data. But I will start at the beginning:
I updated my rooted Nexus 7 LTE to CM 13.0-20151226-NIGHTLY-deb and it turned out that Google Play Services continue to crash, no PlayStore could be loaded and so on. I've searched for this issue and don't want to discuss this here as there are many threads for this already.
However, I deciced to switch to OpenGapps and downloaded the pico package for Android 6 on ARM.
By the way I also switched from CWM recovery to TWRP 2.8.7.1.
Finally, CM was running as expected and I danced my pants off!
During all this I formatted the device completely, but made a backup of all apps using Titanium Backup.
So, I re-installed Titanium Backup, copied the backup files to the device and started to "restore missing apps and data" from the bulk operations menu.
All selected apps were installed perfectly (danced again) but then I noticed that the apps' data was not restored.
I searched for this issue and found instructions saying that SuperSU is needed for Titanium Backup to restore data. That was new to me as TB worked fine without SuperSU on my device all the time.
However, I flashed the latest stable Version of SuperSU from chainfire.
After rebooting, the SuperSU app was installed and when it starts, an error popup appears saying that no su file is installed and this has to be done manually.
When I now start Titanium Backup, it prompts missing root access and consequently does not start up.
Furthermore CM is really unstable and freezes from time to time.
So, I lost root by flashing SuperSU? What irony!
Anyway, I am willing to format and re-install my device another time and I would gladly set SuperSU aside as I never needed it in the past. But I really need to get Titanium Backup working to restore the apps' data.
Can anyone of you help me on this, please? Is SuperSU really necessary or do you know a way to manage Titanium Backup without SuperSU on CM13?
Click to expand...
Click to collapse
lmao, your title is nice!
i believe your problem is you used the wrong su zip, you need the latest beta, not stable. should be .52 if im not mistaken. .52 is stable even though its not listed as, i have been using it for some time, and its whats needed for M. you may even find some .6 versions, dont use those, they are systemless, well you can if you want lol. i havent tried them yet, so i dont know what pitfalls may lurk.
Thank you for your help and I am happy to entertain
bweN diorD said:
i believe your problem is you used the wrong su zip, you need the latest beta, not stable. should be .52 if im not mistaken.
Click to expand...
Click to collapse
I will try to update SuperSU as soon as possible.
But sadly TWRP now freezes a few moments after I start the device in recovery mode. When the device starts normally, it freezes as well while showing the CM launcher screen. It stays animated but nothing happens. I will try to re-install TWRP via fastboot flash and then install SuperSU .52 and post my experiences here. :fingers-crossed:
Hi again bweN diorD,
bweN diorD said:
i believe your problem is you used the wrong su zip, you need the latest beta, not stable. should be .52 if im not mistaken.
Click to expand...
Click to collapse
Sorry to say so but SuperSU .52 does not solve the problem. In fact, after flashing the BETA-SuperSU-v2.52.zip using TWRP, CM does not start up anymore. The loading screen with the hypnotizing smiley appears and stays animated but even after 15 minutes CM does not start up. Even TWRP was freezing from time to time.
So I re-installed TWRP, CM and Gapps like in my first post again.
So, is the problem that my device is not rooted indeed? Could this be fixed with CF-autoroot or any tool like this?
I found this thread http://forum.xda-developers.com/showthread.php?t=2448352 although it is for the device deb-razor and my device's bootloader says it is a deb-zoo. By the way, the bootloader displays "LOCK STATE - unlocked".
cocororo said:
Hi again bweN diorD,
Sorry to say so but SuperSU .52 does not solve the problem. In fact, after flashing the BETA-SuperSU-v2.52.zip using TWRP, CM does not start up anymore. The loading screen with the hypnotizing smiley appears and stays animated but even after 15 minutes CM does not start up. Even TWRP was freezing from time to time.
So I re-installed TWRP, CM and Gapps like in my first post again.
So, is the problem that my device is not rooted indeed? Could this be fixed with CF-autoroot or any tool like this?
I found this thread http://forum.xda-developers.com/showthread.php?t=2448352 although it is for the device deb-razor and my device's bootloader says it is a deb-zoo. By the way, the bootloader displays "LOCK STATE - unlocked".
Click to expand...
Click to collapse
hmmm,
i havent used 2.52 on a cm rom, but i have used it on plenty aosp 6.0.* roms without issue.
clean things up so its booting again, then look in developer options and make sure root is turned on. i have seen a few times devs default it to off, but i have never seen a custom rom come not rooted at all.
bweN diorD said:
clean things up so its booting again, then look in developer options and make sure root is turned on.
Click to expand...
Click to collapse
Thanks for your support!
I cleaned everything up -- meaning re-installed everything -- so the device boots up. I checked the developer options and root is set to "apps only". That worked up to now.
Speaking of root: As I wrote I used to have CWM and switched to TWRP. Anyhow, CWM always asked to "fix root" when exiting. I think that's why things worked then and now with TWRP this "fix root" option is gone. But why is SuperSU not working for my Nexus 7 deb? I also tried to install older versions like advised in the Nexus 7 thread here but there was not even a SuperSU app.
So, I recap: CWM used to fix root, TWRP does not. That's why installing SuperSU seems to be a good idea. SuperSU's latest version freezes CM at start-up. Without SuperSU Titanium Backup does not restore app data while other apps do not have problems to get root access. I'm confused
cocororo said:
Thanks for your support!
I cleaned everything up -- meaning re-installed everything -- so the device boots up. I checked the developer options and root is set to "apps only". turn it on apps and adb and see if that helps, thats the preferred setting anywaysThat worked up to now.
Speaking of root: As I wrote I used to have CWM and switched to TWRP. Anyhow, CWM always asked to "fix root" when exiting. I think that's why things worked then and now with TWRP this "fix root" option is gone. its not gone in twrp, it sees that you have root and doesnt ask. really its unadvised to use the twrp generated root anyways But why is SuperSU not working for my Nexus 7 deb? I also tried to install older versions like advised in the Nexus 7 thread here but there was not even a SuperSU app.hmm, maybe thats the problem, maybe you need to install supersu to get things working properly. its on the play store, give it a shot
So, I recap: CWM used to fix root, TWRP does not. That's why installing SuperSU seems to be a good idea. SuperSU's latest version freezes CM at start-up. Without SuperSU Titanium Backup does not restore app data while other apps do not have problems to get root access. I'm confused
Click to expand...
Click to collapse
^^^^
so to clarify your last paragraph, when you say that installing supersu breaks things, were talking about the zip right?
i just want you to get the app from the play store, if you havent tried that alone yet. but change the root setting too.
bweN diorD said:
so to clarify your last paragraph, when you say that installing supersu breaks things, were talking about the zip right?
i just want you to get the app from the play store, if you havent tried that alone yet. but change the root setting too.
Click to expand...
Click to collapse
Correct, I was talking about the zip which is meant to be installed through TWRP.
So, I downloaded the SuperSU app after double-checking that root is set to "Apps & ADB" in the developer settings. Btw. debugging and installation from unknown sources (I hope this is the right translation for this feature) is enabled as well.
When I started the SuperSU app, it first says the binary SU needs an update and I could choose the installation method: When choosing "normal", the app tried to install but failed saying "Installation failed! Restart device and try again!" but even after restarting this was what the app gave me. When I chose "TWRP" the app rebooted the device to recovery but I assume this would end up in installing the zip file which crashed my CM.
Finally, I installed CF-autoroot for deb via the .bat file included in the CF-autoroot package. Now, SuperSU and Titanium Backup are not complaining anymore, so I think this root issue is fixed! :highfive: (couldn't find a dancing smiley).
However, Titanium Backup is not bringing back my app data The restore process seems good as Titanium Backup installs missing apps but even if I install an app the official way via PlayStore and then restore the app's data from my backup using Titanium Backup, there is no effect and the app acts like being installed freshly.
TB claims "restore successful" but the app's data is still missing. I will now check if the backup files are really sound and if I can get them to work on another device. The worst thing I could imagine is that TB did not backup data of apps which had been installed on sdcard. In that case, the data is lost, I'm afraid...
Do you have an idea how this could be or what I could try?
cocororo said:
Correct, I was talking about the zip which is meant to be installed through TWRP.
So, I downloaded the SuperSU app after double-checking that root is set to "Apps & ADB" in the developer settings. Btw. debugging and installation from unknown sources (I hope this is the right translation for this feature) is enabled as well.
When I started the SuperSU app, it first says the binary SU needs an update and I could choose the installation method: When choosing "normal", the app tried to install but failed saying "Installation failed! Restart device and try again!" but even after restarting this was what the app gave me. When I chose "TWRP" the app rebooted the device to recovery but I assume this would end up in installing the zip file which crashed my CM.
Finally, I installed CF-autoroot for deb via the .bat file included in the CF-autoroot package. Now, SuperSU and Titanium Backup are not complaining anymore, so I think this root issue is fixed! :highfive: (couldn't find a dancing smiley).
However, Titanium Backup is not bringing back my app data The restore process seems good as Titanium Backup installs missing apps but even if I install an app the official way via PlayStore and then restore the app's data from my backup using Titanium Backup, there is no effect and the app acts like being installed freshly.
TB claims "restore successful" but the app's data is still missing. I will now check if the backup files are really sound and if I can get them to work on another device. The worst thing I could imagine is that TB did not backup data of apps which had been installed on sdcard. In that case, the data is lost, I'm afraid...
Do you have an idea how this could be or what I could try?
Click to expand...
Click to collapse
sorry, i really dont know what happens as far as titanium when you put an app on the sd.
glad you got root working though, although i still dont understand why it wouldnt work the right way.
if you run into any more specific road blocks, ill try and help if i can, but this general problem with the data, i havent a clue the problem or solution, short of the data isnt there completely.
Hi again,
sorry for my late reply! I tried a couple of things but here's the most obvious one:
Apparently the backup files are kind of corrupt. I don't know what went wrong there but TB did not create a full backup. Indeed there is a .tar.gz file for every app but in fact none of these has more than 2 KB. So I strongly assume that this might be the mistake - which also means that all my app's data is lost.
bweN diorD said:
glad you got root working though
Click to expand...
Click to collapse
At least this is a success and I am happy to have TWRP, OpenGapps and Titanium Backup running on a fully rooted device :good:
Thank you for all your time and help! I really appreciate how supportive we "techies" are :highfive:
Have a great day and - a bit late but anyway - a happy new year!

FlashFire with HTC One A9?

Anyone used ChainFire's FlashFire with the One A9?
I've used it for backups successfully but have yet to restore anything with it (a little squeamish to do so :silly.
And I'll just add, if anyone has used it and could offer any tips or procedures that would be great.
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Special thanks to @Chainfire!
Sent from my HTC One A9 using XDA Free mobile app
CSnowRules said:
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Special thanks to @Chainfire!
Sent from my HTC One A9 using XDA Free mobile app
Click to expand...
Click to collapse
Were you already rooted? I'm rooted and xposed and want to update via flashfire. will it work?
theNdroid said:
Were you already rooted? I'm rooted and xposed and want to update via flashfire. will it work?
Click to expand...
Click to collapse
Of course. Root is required to use FlashFire. I use Xposed as well, and I've had no problems updating via FlashFire.
CSnowRules said:
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Click to expand...
Click to collapse
Just for my edification, flashing a firmware update like 1.57.617.41 will wipe my data partition, correct?
eelpout said:
Just for my edification, flashing a firmware update like 1.57.617.41 will wipe my data partition, correct?
Click to expand...
Click to collapse
No not at all. Flashing the OTA will not wipe your data. I've done the .41 and .52 OTAs via FlashFire.
***Warning--if you're not currently encrypted, flashing the OTA will update your boot partition, so be sure to use the preserve recovery option in FlashFire and reboot to TWRP to patch your boot image, or your device will encrypt data on first boot.***
CSnowRules said:
No not at all. Flashing the OTA will not wipe your data. I've done the .41 and .52 OTAs via FlashFire.
***Warning--if you're not currently encrypted, flashing the OTA will update your boot partition, so be sure to use the preserve recovery option in FlashFire and reboot to TWRP to patch your boot image, or your device will encrypt data on first boot.***
Click to expand...
Click to collapse
meaning, flash this A9 boot image patcher from TWRP?
Or does using the EverRoot SuperSU option patch the boot image for us on the A9 (and then does one check "preserve recovery" using that or not)?
This can all get a bit confusing.
eelpout said:
meaning, flash this A9 boot image patcher from TWRP?
Or does using the EverRoot SuperSU option patch the boot image for us on the A9 (and then does one check "preserve recovery" using that or not)?
This can all get a bit confusing.
Click to expand...
Click to collapse
Yes, that's one way to disable forceencrypt. You could also flash the latest SuperSU or Magisk. Either one will disable forceencrypt by default. Of course, if your data is already encrypted, you won't have a problem, but I'd assume that you would like to have root, so I'd recommend SuperSU or Magisk+phh root.
CSnowRules said:
Yes, that's one way to disable forceencrypt. You could also flash the latest SuperSU or Magisk. Either one will disable forceencrypt by default. Of course, if your data is already encrypted, you won't have a problem, but I'd assume that you would like to have root, so I'd recommend SuperSU or Magisk+phh root.
Click to expand...
Click to collapse
i'm already unecrypted and rooted, but on firmware from last year. just trying to find the most efficient way to bring things up to date.
eelpout said:
i'm already unecrypted and rooted, but on firmware from last year. just trying to find the most efficient way to bring things up to date.
Click to expand...
Click to collapse
Ok, this post will go a bit off topic. That being said, I can offer two courses of action. I take no responsibility for anything in this post.
Safest--almost no risk (my personal preference)
1. Backup your data partition, including internal SD via TWRP to ext SD or USB OTG drive. Flash the latest RUU from HTC. Boot stock and apply OTAs until there are no more updates available. Fastboot flash the latest TWRP, and finally restore your data and flash the latest SuperSU via TWRP. Reboot your fully updated, rooted A9 with all your data still intact.
A little risky and untested to my knowledge--could result in a hard brick if something partially fails. FLASHING BOOTLOADERS IN FLASHFIRE IS STILL ALPHA FOR HTC DEVICES!!! This may work with s-on...but may require s-off.
Your system partition must have never been mounted r/w for this to work.
2. Download the OTA zips for your phone from the first update available to the latest and the latest SuperSU and TWRP. Use FlashFire to do everything in one shot. Select allow flashing bootloaders in FlashFire settings, select your OTAs for installation from oldest to newest (don't select restore boot and recovery), select TWRP and SuperSU for installation, disable everroot and preserve recovery. Cross your fingers and timidly press flash... If all is successful, you should have the same end result as option 1.
I STRONGLY recommend the first method, but if you're feeling lucky and decide to try the second method, please share how it goes, since this post is FlashFire related and this would be the ultimate test of FlashFire for our devices.
For me, I've found that though TWRP backups take more time, and DON'T preserve internal storage, it's still the most reliable and consistent way to backup especially for OTAs.
I've previously tried FlashFire restore but it doesn't seem to restore internal storage as claimed; deal-breaker.
The real problem is we want OTA automation to:
1) disable lock-screen (pattern or fingerprint) so emergency restore of /data don't fail to unlock after boot
2) restore OEM recovery
3) flash OTA and let it do its things of updating /system, /boot, etc
4) reflash SuperSU before normal system boot so /boot doesn't try to re-encrypt /data
5) restore whatever the original recovery was
6) boot
The problem always is catching the step between 3 -> 4 in some automated way. If the OTA goes all the way through, /data is encrypted and so time is wasted to go back to recovery after full-boot, wipe /data, restore /data, lost internal storage contents and PICTURES. If pattern-lock / finger-print lock is not disabled (1), you won't be able to get past the lock screen as it won't recognize the correct lock-pattern nor fingerprint. Solution is to adb shell in, and move/delete some files as root. PITA and I don't think FlashFire does this.
If you did manually restore /data, then /data is corrupted for some apps that use it such as Waze, LINE, KakaoTalk, Whatsapp, etc where they can't write to their data directories anymore. A reinstall of the app is the only way to fix it.
NuShrike said:
For me, I've found that though TWRP backups take more time, and DON'T preserve internal storage, it's still the most reliable and consistent way to backup especially for OTAs.
I've previously tried FlashFire restore but it doesn't seem to restore internal storage as claimed; deal-breaker.
The real problem is we want OTA automation to:
1) disable lock-screen (pattern or fingerprint) so emergency restore of /data don't fail to unlock after boot
2) restore OEM recovery
3) flash OTA and let it do its things of updating /system, /boot, etc
4) reflash SuperSU before normal system boot so /boot doesn't try to re-encrypt /data
5) restore whatever the original recovery was
6) boot
The problem always is catching the step between 3 -> 4 in some automated way. If the OTA goes all the way through, /data is encrypted and so time is wasted to go back to recovery after full-boot, wipe /data, restore /data, lost internal storage contents and PICTURES. If pattern-lock / finger-print lock is not disabled (1), you won't be able to get past the lock screen as it won't recognize the correct lock-pattern nor fingerprint. Solution is to adb shell in, and move/delete some files as root. PITA and I don't think FlashFire does this.
If you did manually restore /data, then /data is corrupted for some apps that use it such as Waze, LINE, KakaoTalk, Whatsapp, etc where they can't write to their data directories anymore. A reinstall of the app is the only way to fix it.
Click to expand...
Click to collapse
The solution for problem 1 can be handled in TWRP. The files can be deleted via TWRP's file manager or the built in terminal, which may be easier for some people.
Also, the solution for the corrupted data and internal SD is to create an image of the data partition (just like the system image backup option). This can be done via dd in TWRP or adb. It requires a large amount of storage and it takes longer, but I've had to do it, since I use VIP Access by Symantec for work. A normal file based backup in TWRP breaks that app. This also keeps the pin/fingerprint data intact.
If we could have that implemented in a user friendly manner, that would be great, but I'm sure CaptainThrowback and Chainfire both have bigger issues to deal with. I could probably figure out a solution, but the work wouldn't be worth it for my own benefit, since I'm fluent with the Linux command line.

Snapchat on a rooted Pixel?

Hi,
Is there a current way to use snapchat on my rooted pixel? I tried unrooting to log in and re-root, but it didn't work as well.
I don't have another rooted device to do titanium back up and I am on android Nougat so I can't install xposed frameworks.
any suggestions people?
unrooting, logging in, and rerooting always works for me....is the app data being deleted somehow when you unroot/root?
Unrooting, logging in and rerooting also worked perfectly for me a couple of times. I don't know any other working method yet.
Don't forget to make a backup of Snapchat with Titanium Backup just after rerooting, so next time you face that issue you can just restore from TiBu.
Hey I just wrote a guide on this. No need to unroot! https://forum.xda-developers.com/pixel/how-to/guide-log-to-snapchat-stock-rooted-rom-t3590473
I'll copy and paste the steps from my thread to here so people can see it. You have to be on stock firmware for this to work.
1. Download the full system image for your device + build (https://developers.google.com/android/images)
This worked on my Pixel, it should work for other Nexus/Pixel/Pixel XL devices as well though.
2. Unzip the file
3. Unzip the image-sailfish-XXXXXX.zip inside the new folder
4. Connect your device to your computer with ADB and reboot to bootloader
5. fastboot boot path/to/boot.img (inside the folder from step 3.)
NOTE: Please make sure to fastboot BOOT, NOT fastboot FLASH.
6. Once booted, log in to Snapchat. It should work.
7. Reboot.
8. Backup Snapchat in Titanium Backup so you don't have to do this again.

Oneplus 6 bootloop after upgrade to 9.0.4 (+failed to restore the nandroid backup!)

So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
b217260 said:
So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
Click to expand...
Click to collapse
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Thank you for making the time writing this, it is relief to hear that you figure this out. Will try this first in the morning.
I did a bad mistake running the flash-all.bat thinking it will only flash the partitions of the system.
Well it is all gone now...Dam if only I wait until the morning I might not made this mistake.
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
This guide can also be used to restore from other roms;
b217260 said:
I did a bad mistake running the flash-all.bat thinking it will only flash the partitions of the system.
Well it is all gone now...Dam if only I wait until the morning I might not made this mistake.
Click to expand...
Click to collapse
What did you do?
---------- Post added at 02:14 PM ---------- Previous post was at 02:13 PM ----------
petran07 said:
This guide can also be used to restore from other roms;
Click to expand...
Click to collapse
I guess so. I never had to use a backup to restore on a custom ROM yet.
tabletalker7 said:
What did you do?
Click to expand...
Click to collapse
After extracting the stock zip flasher, there is file "flash-all.bat" on the root of the folder. (Guess I needed to use the "flash-all-partitions-fastboot.bat)
Thinking it will only flash the android system partitions I've run it and realize that my internal stoarge was formatted.
Really stupid mistake from my part, sorry for couldn't verify your guide.
Hoping that someone who read this in the future won't do my mistake.
b217260 said:
After extracting the stock zip flasher, there is file "flash-all.bat" on the root of the folder. (Guess I needed to use the "flash-all-partitions-fastboot.bat)
Thinking it will only flash the android system partitions I've run it and realize that my internal stoarge was formatted.
Really stupid mistake from my part, sorry for couldn't verify your guide.
Hoping that someone who read this in the future won't do my mistake.
Click to expand...
Click to collapse
It's my bad. I always store my backups on an SD card with my OTG card reader. I forget others don't think like I do sometimes
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
tabletalker7, can you please explain a little technical detail? If i follow your procedure, what is the difference from me just restoring boot, system and data from a Nandroid backup of a system that used to boot? What causes the restored system to no longer boot?
Because you seem to be suggesting a solution for the the problem I had. I normally do plenty of backups and play around with the system quite a lot, but Op6 burned me: I was unable to restore from a backup like I always did on other phones. I tried suggestions from other posters to no avail. So I set up a clean system from a fastboot rom and reinstalled everything from Titanium. I wonder, after I set pretty much identically, should I just risk and to once more try to restore from that Nandroid that was failing to restore (that only had system and data btw)? I'd greatly appreciate if you can enlighten.
b217260 said:
So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
Click to expand...
Click to collapse
Had faced this many times. ...after trying diff options and failed Qualcome MSM method works perfectly.
Yep, You cant restore data i think as it being already formated as per knowd based on your steps above on diff posts
ahacker said:
tabletalker7, can you please explain a little technical detail? If i follow your procedure, what is the difference from me just restoring boot, system and data from a Nandroid backup of a system that used to boot? What causes the restored system to no longer boot?
Because you seem to be suggesting a solution for the the problem I had. I normally do plenty of backups and play around with the system quite a lot, but Op6 burned me: I was unable to restore from a backup like I always did on other phones. I tried suggestions from other posters to no avail. So I set up a clean system from a fastboot rom and reinstalled everything from Titanium. I wonder, after I set pretty much identically, should I just risk and to once more try to restore from that Nandroid that was failing to restore (that only had system and data btw)? I'd greatly appreciate if you can enlighten.
Click to expand...
Click to collapse
1. Changing Android security updates makes changes to phone encryption. It will make the data itself on the backup unreadable to the operating system. That is why people playing with many different custom ROMs had problems with data stored on their phones.
2. By using the fastboot rom you ensure that both partitions have the same operating system. A/B partitioning seems like a great idea on paper but it seems to be executed in the most horrible way possible.
tabletalker7 said:
1. Changing Android security updates makes changes to phone encryption. It will make the data itself on the backup unreadable to the operating system. That is why people playing with many different custom ROMs had problems with data stored on their phones.
2. By using the fastboot rom you ensure that both partitions have the same operating system. A/B partitioning seems like a great idea on paper but it seems to be executed in the most horrible way possible.
Click to expand...
Click to collapse
Thanks a lot. It is plausible and I remeber seeing folder names to which random hex strings were appended (I did not see file contents though). But after last restores I verified that the folder names in /data/data folder were looking allright. Twrp apparently could decrypt the data partition, but the system would still not boot. If I were to encypr the data partition I'd use the whole partition as one encrypted block and not bother doing it on file or folder basis, which is more error-prone. Another sourse of doubt is that I never played with OS version upgrades nor with installing other roms.
Can you also please answer the following? Do you think I can try to restore my boot+system to a different slot and then come back to my original slot if my playing there is unsuccesfull? Being scared that restoring a previous state can fail is a major problem.
ahacker said:
Thanks a lot. It is plausible and I remeber seeing folder names to which random hex strings were appended (I did not see file contents though). But after last restores I verified that the folder names in /data/data folder were looking allright. Twrp apparently could decrypt the data partition, but the system would still not boot. If I were to encypr the data partition I'd use the whole partition as one encrypted block and not bother doing it on file or folder basis, which is more error-prone. Another sourse of doubt is that I never played with OS version upgrades nor with installing other roms.
Can you also please answer the following? Do you think I can try to restore my boot+system to a different slot and then come back to my original slot if my playing there is unsuccesfull? Being scared that restoring a previous state can fail is a major problem.
Click to expand...
Click to collapse
I would not recommend doing that. While you may have different roms on different partitions you only have one data partition. That is asking for trouble
tabletalker7 said:
I would not recommend doing that. While you may have different roms on different partitions you only have one data partition. That is asking for trouble
Click to expand...
Click to collapse
I would have data backed up, sure.
What bothers me is that an essential property of a digital automaton is that if you start it from the same state it will continue the same. Nandroid used to capture all that mattered for identical runs. It no longer does, something is missing, such as some encryption keys for data partition, as you seem to suggest. This bothers me.
ahacker said:
I would have data backed up, sure.
What bothers me is that an essential property of a digital automaton is that if you start it from the same state it will continue the same. Nandroid used to capture all that mattered for identical runs. It no longer does, something is missing, such as some encryption keys for data partition, as you seem to suggest. This bothers me.
Click to expand...
Click to collapse
What bothers you here are things I call "security". If the nandroid backup has the encryption keys to decrypt it, then the data is not secure.
tabletalker7 said:
What bothers you here are things I call "security". If the nandroid backup has the encryption keys to decrypt it, then the data is not secure.
Click to expand...
Click to collapse
Nandroid backups should be encrypted when created with a user supplied key. Twrp allowed this since ages ago. Not allowing the user to restore a backup is not a right substitution for this.
ahacker said:
Nandroid backups should be encrypted when created with a user supplied key. Twrp allowed this since ages ago. Not allowing the user to restore a backup is not a right substitution for this.
Click to expand...
Click to collapse
TWRP didn't do this. Android didn't do this. Ya know, if this is anywhere near as horrible for you as you are making it sound, my advise for you would be to buy Apple products. Bottom line is a new feature was added to Android, and your backup does work.
tabletalker7 said:
TWRP didn't do this. Android didn't do this. Ya know, if this is anywhere near as horrible for you as you are making it sound, my advise for you would be to buy Apple products. Bottom line is a new feature was added to Android, and your backup does work.
Click to expand...
Click to collapse
-It is as horrible as not being able to restore a full backup. No more, no less.
-Twrp has an ability to encrypt your backups, with your experience you must know this.
-You are suggesting someone to switch to iphone only because they point out that the things are wrong or dont add up.
-It is quite a common knowlege that you get good security out of encryption if you make things explicit and clear. And not how you may think it is. Cause you don't seem to know where the keys are stored for the data partition. Obviousely, because the phone eventually decrypts your data, the keys must be stored somewhere or derived from you swipe pattern.
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
Following these instructions seems to be the only way of restoring a nandroid backup (at least for my Op6 bought on AliExpress from China). Important: step 1 wipes your sdcard, so the backup you want to restore must be on otg usb stick.
After spending many hours I managed to restore a backup at least once. Fortunately for me I have no plans of upgarding Android and will likely forever stick with the following set:
1) 5.1.11-OREO-OnePlus6Oxygen_22_OTA_015_all_1808102118_770880-FASTBOOT.zip (found here)
2) twrp-3.2.3-x_blu_spark_v9.85_op6.img + twrp-3.2.3-x_blu_spark_v9.85_op6.zip (found here)
3) Magisk-v18.1.zip (found here)
My plan is to fully debloat the phone and then I will keep everything unchanged for years, because nowadays updates are more about twisting your arms than giving you usefull features. I almost got to that state, but one little glitch forced me to roll back and the whole hell with the Nandoid backups on Op6 started.
PS: It's very interesting what is really going on with this A/B system. There must be a storage where the encryption keys are stored (if it is the encryption that does prevent the phone from restoring. Which I doubt because Twrp sees the files fine). There also probbaly stored what slot is used. That information does not get captured by the Nandroid backup.
(Btw, It seems that blu_spark Twrp is really NOT encrypting your backups with the passwod you supply. Official Twrp does. I have plenty of old encypted backups, from wich I could not extract any personal data (/data/data folder) but yesterday I could extract my private information from a backup done by blu_spark Twrp. This is serious iussue. I'll double check and will post if confirmed.)
Not confirmed, I was looking at unencrypoted file.

How I fixed my bootloop problem without any format / data loss

Hello everyone, I was able to fix my bootloop occuring after flashing a zip on magisk, without any data loss. I wanted to share what I did to fix since it may be helpful for others. It is useful method worth trying if you know what caused the bootloop. It is definitely not a universal method of fixing bootloops or anything, but If you have a similar problem, you can try these steps.
The bootloop happened after I flashed a zip on Magisk that I downloaded using EdXposed Manager app. I remember downloading the latest alpha version zip and flashing it using Magisk (I had already had the riru core and riru edxposed modules installed on Magisk but on Edxposed manager app, it was showing some error, so I also flashed the zip that I downloaded using the app. I think this caused the bootloop somehow. ) I had no backups.
(I had also "unable to mount /data" problem on TWRP, I am explaining how I fixed that also, if you don't have the problem, you can skip this paragraph)
My TWRP version was 3.2.1.0. And when I was in recovery mode, I was getting "unable to mount /data" error. This is actually a well-known error, but I was able to fix it without a format by just updating my TWRP to 3.3.1.0. After the update, somehow, internal storage could be mounted and everything was fine. My goal by trying to fix this problem is to be able to have a backup using TWRP (using backup feature on TWRP) (just make sure that you didn't choose the compression option on options tab of TWRP backup page).
If you don't have "unable to mount data" problem at all, just make a TWRP backup. (just make sure that you didn't choose the compression option on options tab of TWRP backup page).
So, after having a TWRP backup of everything (actually just System and Data backup would also be fine), I tried to edit my backup files to fix the problem that caused the bootloop.
I changed 2 things in my backup files (you can edit the backup files ending with .win001 etc using 7zip on windows or anything similar. since the backup files are not compressed, you can just delete files) (I edited only the "Data" backup files due to my specific problem, but if your problem is something different, you may have to edit different files also):
1) I deleted everything about EDXposed manager(com.xx.edxposedmanager files) (It might have nothing to do with the fix, I am not sure)
2) In one of the data backup files (probably in the last one), there is a folder called "adb". In adb, there is a "modules" folder. I deleted riru core and riru edxmanager folders in modules.
After these steps, I restored "Data" and "System" using TWRP restore. Bootloop is fixed without any data loss.
If your bootloop is caused by something different, (the point I am trying to tell is) you can edit the nandroid backup files if you know the root of the problem and maybe fix your phone. When I was editing the backup files, I had no hope. As I said, I think this method is worth trying.
I Found this to be true. I also don't see the reason to reflash everything to fix a problem. Thank you for this tutrorial this is an undocumented tactic and i don't know why. Before i discovered this type of surgery i operated under the assumtion that android must be different from other operating systems in some way which would make this impossible. But like you i delved deeper and discovered that this is like a dark art the devs keep to themselves because of what ever but it works. I like this type of post and usually aside from asking for help or a little feed back this is the only type of post i ever make. I mean how do you expect people to learn how to do anything if you never teach them anything useful. EX: "You didn't do it exactly right from the beginning because if left out one thing in my tutorial so you would fail now erase everything and start over." "I only did that to teach you to backup" such bull ****! Thanks again for fighting the good fight.

Categories

Resources