Help with rooted device. - Android Q&A, Help & Troubleshooting

This is my first time rooting a device. I am going to root my device soon (Poco X2) and need some help regarding updates. I plan on using miui even after rooting and won't be installing any custom roms. My question is how would i update the device. Do I have to flash a new rom and erase all data or would I be able to update over the current version? I am going to use TWRP recovery.

FumeRaven said:
This is my first time rooting a device. I am going to root my device soon (Poco X2) and need some help regarding updates. I plan on using miui even after rooting and won't be installing any custom roms. My question is how would i update the device. Do I have to flash a new rom and erase all data or would I be able to update over the current version? I am going to use TWRP recovery.
Click to expand...
Click to collapse
If your talking about OTA updates then you can't be rooted as they can be disabled by the system. Your best option would be to install a custom OS. When you install a new OS you'll need to wipe your data but if your in the same rom and are reflashing it you don't need to wipe data. That's called dirty flashing
---------- Post added at 12:13 AM ---------- Previous post was at 12:12 AM ----------
Don't worry about wiping /cache during the format as doing a factory data reset takes care of that

You can update your ROM version using TWRP without automatically using OTA from the settings.

BryanHafidz said:
You can update your ROM version using TWRP without automatically using OTA from the settings.
Click to expand...
Click to collapse
Yes but taking an OTA and having AVB enabled causes a soft brick. That or a hard brick that's why I always say avoid an OTA.

FumeRaven said:
This is my first time rooting a device. I am going to root my device soon (Poco X2) and need some help regarding updates. I plan on using miui even after rooting and won't be installing any custom roms. My question is how would i update the device. Do I have to flash a new rom and erase all data or would I be able to update over the current version? I am going to use TWRP recovery.
Click to expand...
Click to collapse
Rooting phone's Android is neither an update nor an upgrade: Rooting a phone's Android means giving user and/or applications administrative rights - superuser access, will say unrestricted access to Android's system files. The related executable is su binary. It's comparable to turn off UAC in Windows 10. Note: Rooting a phone's Android doesn't necessarily require to have su binary present on phone or even phone's boot-loader unlocked: you always can temporarily root any Android, what doesn't need Android's system files get touched.
AFAIK Xiaomi Poco X2 runs Android 10 ( MIUI 11 ). Chances to brick that phone by installing TWRP are extremely high.
Rooting phone's Android doesn't require TWRP or any other Custom Recovery gets installed beforehand.

Related

[Q] Unlock Bootloader, Custom Recovery and Root

Hey guys,
I am trying to prepare my Nexus 9 to receive root (when that happens) and I was wondering if unlocking the bootloader will suffice for the time being? That means it will wipe it once, and I can start using my Nexus 9 without worrying of wiping it in the future.
Then it means as soon as TWRP comes out with a version that supports Nexus 9 I just need to flash that (no need to wipe device) and then flash SuperSU (no wiping either)
Am I missing something here?
You're right but...
Hey ombadboy
I think this will work. Don't forget to enable the oem unlock in the developer settings before. Otherwise your try to unlock will fail. Maybe you shouldn't flash the first versions of twrp, because this will be the first one for Lollipop und encrypted storage. Just boot the image once and flash superSU. So you will still get OTA updates.
After unlocking you should be able to root without losing your data twice.
After a few time and if there are no more OTAs in the near future you can flash a stable TWRP image.
funatkill said:
Hey ombadboy
I think this will work. Don't forget to enable the oem unlock in the developer settings before. Otherwise your try to unlock will fail. Maybe you shouldn't flash the first versions of twrp, because this will be the first one for Lollipop und encrypted storage. Just boot the image once and flash superSU. So you will still get OTA updates.
After unlocking you should be able to root without losing your data twice.
After a few time and if there are no more OTAs in the near future you can flash a stable TWRP image.
Click to expand...
Click to collapse
See the guide here. http://www.theandroidsoul.com/unlock-bootloader-nexus-9/
Thanks for the replied guys. Yes, that's exactly what I did; now I have an unlocked bootloader.
So if I understood this well, can I get root without flashing a custom recovery? If so, what's the purpose of flashing one?
ombadboy said:
Thanks for the replied guys. Yes, that's exactly what I did; now I have an unlocked bootloader.
So if I understood this well, can I get root without flashing a custom recovery? If so, what's the purpose of flashing one?
Click to expand...
Click to collapse
The purpose of having a custom recovery is to flash custom roms.
Here's some info for root
http://forum.xda-developers.com/nexus-9/orig-development/root-t2929118/post56516599
Hogyoku said:
The purpose of having a custom recovery is to flash custom roms.
Here's some info for root
http://forum.xda-developers.com/nexus-9/orig-development/root-t2929118/post56516599
Click to expand...
Click to collapse
Recovery allows you to flash anything to device without doing manually with root explorer, adb or fastboot. Can do most anything you can do with recovery with these 3 tools.

Replace TWRP with stock recovery to install OTA

Today I've flashed the recovery with TWRP to install SuperSU.
Is there any possibility of installing the stock recovery to be able to install Android updates normally again without losing all data and SuperSU?
You sir, are not alone with this question. Been eagerly looking for an answer for the same question..
reconman said:
Today I've flashed the recovery with TWRP to install SuperSU.
Is there any possibility of installing the stock recovery to be able to install Android updates normally again without losing all data and SuperSU?
Click to expand...
Click to collapse
Use the search function, it has already been covered.
Anarchist77 said:
Use the search function, it has already been covered.
Click to expand...
Click to collapse
I can't find anything for the G5, only for other phones.
The only option I currently know of is to flash the whole KDZ and then install TWRP and SuperSU again. Is there another way?
As long as the system is modified in any way, the only way to install ota updated is through LGUP because before applying the update there is a system integrity check ran and if that fails you will most likely get into bootlops or worst
Here is what I did to get a 10D rooted system
Thank you @gwolfu.

best non-root backup before unlocking bootloader?

Hi,
I can finally unlock the bootloader - which AFAIK wipes user data. Now, since I've used the phone heavily over the waiting period, there's a lot to backup and reintegrate later on.
What's the quickest way to do so?
MTP-copy all of Internal Storage to PC -> unlock -> copy back?
(I am experienced with unlocking, rooting, flashing Roms and recoveries, but haven't had a non-rooted phone for about 8 years, so I am a bit out of the loop on non-root backup procedures)
TIA!
Using adb pull, you could probably get your internal storage.
Iirc the canonical dirs are:
/storage/emulated/0
/storage/emulated/legacy​Helium should be sufficient for apps.
For me unlocking didn't wipe data.
Only wipe was when I installed developer rom to be able to unlock.
So the process should be unlock, flash twrp and then flash magisk to maintain twrp and avoid the bootloop. Then you can backup with root and clean flash if you want.
Twrp can't decrypt data but it's not needed to flash magisk. Anyway you can flash orangefox (latest version, beta 6) from twrp and it can decrypt data to access it from recovery.
omnomnomkimiiee said:
Using adb pull, you could probably get your internal storage.
Iirc the canonical dirs are:
/storage/emulated/0
/storage/emulated/legacy​Helium should be sufficient for apps.
Click to expand...
Click to collapse
Thanks.
Any advantage of using adb vs. just mounting the device via mtp? Last I've used adb for file transfer it was slower than even mtp...
jes0411 said:
For me unlocking didn't wipe data.
Only wipe was when I installed developer rom to be able to unlock.
Click to expand...
Click to collapse
do you mean "to be able to root"? because otherwise I don't follow...
So the process should be unlock, flash twrp and then flash magisk to maintain twrp and avoid the bootloop. Then you can backup with root and clean flash if you want.
Twrp can't decrypt data but it's not needed to flash magisk. Anyway you can flash orangefox (latest version, beta 6) from twrp and it can decrypt data to access it from recovery.
Click to expand...
Click to collapse
Thanks. This is gonna sound very noob, but since I'm new to MIUI - is data already encrypted in stock MIUI? Otherwise I'll need orangefox only for switching between future custom ROMs, right?
santoo said:
do you mean "to be able to root"? because otherwise I don't follow...
Thanks. This is gonna sound very noob, but since I'm new to MIUI - is data already encrypted in stock MIUI? Otherwise I'll need orangefox only for switching between future custom ROMs, right?
Click to expand...
Click to collapse
I mean to unlock because I can't bind my mi account in stable and had to install developer rom to bind account.
Yes data is already encrypted on stock rom. If you need to access data partition in recovery you need orangefox. But it's not needed to flash magisk.
To use custom roms you don't need orangefox because you can format data from twrp and then flash the rom. I started using orangefox since I tried miui 10 oreo beta because I was unable to avoid encryption on that rom.
jes0411 said:
I mean to unlock because I can't bind my mi account in stable and had to install developer rom to bind account.
Yes data is already encrypted on stock rom. If you need to access data partition in recovery you need orangefox. But it's not needed to flash magisk.
To use custom roms you don't need orangefox because you can format data from twrp and then flash the rom. I started using orangefox since I tried miui 10 oreo beta because I was unable to avoid encryption on that rom.
Click to expand...
Click to collapse
Thanks for the explanations!
I plan on just unlocking bootloader, enabling cam2 and installing a current gcam today - I'll wait with flashing until miui10 stable is released in the next week or so, so I can do a "fair" comparison between Lineage and Miui (and possibly some others)
jes0411 said:
For me unlocking didn't wipe data.
Click to expand...
Click to collapse
A quick heads-up, just in case anyone stumbles upon this thread:
As of MIUI 9.5.17 global stable, using official MIUI unlock 3.3.525.23, unlocking the bootloader DOES WIPE user data & factory-resets the phone (to be more precise - it wipes the complete internal storage).
SD is, as expected, left alone.
santoo said:
A quick heads-up, just in case anyone stumbles upon this thread:
As of MIUI 9.5.17 global stable, using official MIUI unlock 3.3.525.23, unlocking the bootloader DOES WIPE user data & factory-resets the phone (to be more precise - it wipes the complete internal storage).
SD is, as expected, left alone.
Click to expand...
Click to collapse
I only shared my experience.
My data was wiped when I installed developer rom to bind account but when I unlocked bootloader after 360h data remained intact. When I flashed twrp phone didn't boot but I solved it flashing magisk.
jes0411 said:
I only shared my experience.
Click to expand...
Click to collapse
Yes, and I thank you for it.
I was not accusing you of anything - things may well have changed with different versions of MIUI or different versions of the unlock tool, or between chinese/global versions. Just a warning for others that, at least with the versions I posted, having a backup is reaaaaally nice :good:

What is the steps of keeping TWRP and Flashing OTA through TWRP?

I have read basically all the posts here on xda related to this matter. But, being a noob in "rom,kernel, recovery" world, I need to get spoon-fed in some area. Can any kindhearted fellow answer the following questions?
1. I will always use latest official MIUI global beta rom. I need to have the MOST stable custom recovery installed all the time (preferably TWRP official if possible). I want to receive OTA and flash them via custom recovery. Can it be done? if so, what are the MOST hassle-free steps? (want to have root for sum lucky pather action)
2. What are these "encryption", "force disable encryption treble" stand for and what it means for a user like me who wants to run latest Magisk all the time with custom recovery?
3. I can manage to flash OTA and then flash magisk again if needed to maintain root status, is that all I need to do before booting into the new updated and rooted system?
If someone can explain and provide insights, that will be a great help.
1. The most hassle free to do OTA updates is to revert back to stock recovery when the update.zip package is ready to be flashed because
2. Every OTA update in MIUI will encrypt /data partition. (This is Xiaomi's standard data protection). I didn't tried to do OTA updates with Official Twrp but you can try. That is why everyone when trying to flash custom rom, flashing DFE.zip (Disable Force Encryption) will of course disables the system to encrypt data during boot.
3. Magisk has OTA survival script so when there is OTA updates, Magisk will automatically install after OTA update is finished.

About keeping OTA and TWRP

Just unlocked the bootloader , latest MIUI global beta. Here are the questions which needs valid answers
1. Need to flash TWRP and root. Which twrp image will not need any encryption disabler flashed every time I flash a rom? please give the link of the most stable and recent version of it.
2. I will flash magisk. How will it behave with OTA on miui global beta?
3. Will I receive OTA update? If I do, how to flash it properly? I dont want to roll back to stock recovery just to flash an ota and then again flash twrp. And I dont want to flash full rom either.
4. If I am able to flash OTA through twrp, do I have to wipe anything? Im asking if I will loose any data or not.
5. As far as I know, I need to unroot everytime before I flash OTA? what does that mean actually? If im rooted, will I not be notified of the OTA update through the updater app? Or do I have to manually downlaod the ota from the web?
6. And one more thing. I dont want the clock on the top left in any screen, lock or home. Which mod will remove the clock and add regular notification icon? (working with miui beta ofcourse)
Sohan_Saymum said:
Just unlocked the bootloader , latest MIUI global beta. Here are the questions which needs valid answers
1. Need to flash TWRP and root. Which twrp image will not need any encryption disabler flashed every time I flash a rom? please give the link of the most stable and recent version of it.
2. I will flash magisk. How will it behave with OTA on miui global beta?
3. Will I receive OTA update? If I do, how to flash it properly? I dont want to roll back to stock recovery just to flash an ota and then again flash twrp. And I dont want to flash full rom either.
4. If I am able to flash OTA through twrp, do I have to wipe anything? Im asking if I will loose any data or not.
5. As far as I know, I need to unroot everytime before I flash OTA? what does that mean actually? If im rooted, will I not be notified of the OTA update through the updater app? Or do I have to manually downlaod the ota from the web?
6. And one more thing. I dont want the clock on the top left in any screen, lock or home. Which mod will remove the clock and add regular notification icon? (working with miui beta ofcourse)
Click to expand...
Click to collapse
I can answer your questions partially.
2 & 3. Flashing TWRP and Magisk will result in OTA zip not being downloaded. Instead, the full ROM will be downloaded automatically.
4. AFAIK, you can't flash the OTA zip through TWRP.
5. If you want the OTA, you will have to be completely stock, no modifications to system files. Only then the OTA zip will download and only then you can flash it. You will ofcourse be notified of the availability of the OTA zip even if you are rooted but it will not download because it does a check of your system before downloading. Only the full zip will download if you are rooted.
It is much easier (atleast for me) to accept the full download and flash it through TWRP and then boot back to TWRP (to preserve it and to avoid overwriting by stock recovery) before booting into system. If you only wipe Dalvik and cache, there is no need to reflash TWRP and Magisk. Ofcourse if TWRP gets overwritten somehow, then flashing it and Magisk again is not a big thing.
tnsmani said:
I can answer your questions partially.
2 & 3. Flashing TWRP and Magisk will result in OTA zip not being downloaded. Instead, the full ROM will be downloaded automatically.
4. AFAIK, you can't flash the OTA zip through TWRP.
5. If you want the OTA, you will have to be completely stock, no modifications to system files. Only then the OTA zip will download and only then you can flash it. You will ofcourse be notified of the availability of the OTA zip even if you are rooted but it will not download because it does a check of your system before downloading. Only the full zip will download if you are rooted.
It is much easier (atleast for me) to accept the full download and flash it through TWRP and then boot back to TWRP (to preserve it and to avoid overwriting by stock recovery) before booting into system. If you only wipe Dalvik and cache, there is no need to reflash TWRP and Magisk. Ofcourse if TWRP gets overwritten somehow, then flashing it and Magisk again is not a big thing.
Click to expand...
Click to collapse
Thanx a bunch. Now I am ready to flash, but not sure which recovery should I use? and what about that force encryption disabler.zip thing? which recovery wont need that thing? its just too complex to flash various things everytime I update miui rom
Sohan_Saymum said:
Thanx a bunch. Now I am ready to flash, but not sure which recovery should I use? and what about that force encryption disabler.zip thing? which recovery wont need that thing? its just too complex to flash various things everytime I update miui rom
Click to expand...
Click to collapse
OrangeFox Recovery has a feature to disable force encryption without flashing the DFE.zip everytime you flash a custom rom.
And it supports MIUI OTA Updates.
Darklouis said:
OrangeFox Recovery has a feature to disable force encryption without flashing the DFE.zip everytime you flash a custom rom.
And it supports MIUI OTA Updates.
Click to expand...
Click to collapse
can i said like this.
unlock bl and install magisk will not lose any feature of MIUI.
how about custom rom? what feature i need to abandon from stock rom?
locolyric said:
can i said like this.
unlock bl and install magisk will not lose any feature of MIUI.
how about custom rom? what feature i need to abandon from stock rom?
Click to expand...
Click to collapse
unlock bl and install magisk will not lose any feature of MIUI.
Click to expand...
Click to collapse
You will not lose any feature
how about custom rom? what feature i need to abandon from stock rom?
Click to expand...
Click to collapse
Some custom roms are AOSP based so all MIUI bloatware or features are not available in AOSP based custom roms.
Darklouis said:
You will not lose any feature
Some custom roms are AOSP based so all MIUI bloatware or features are not available in AOSP based custom roms.
Click to expand...
Click to collapse
from my last experience unlock bootloader will wipe all f my data. is that same on poco f1?
locolyric said:
from my last experience unlock bootloader will wipe all f my data. is that same on poco f1?
Click to expand...
Click to collapse
Ohh yeah.. Unlocking Bootloader will wipe all data (internal partition and data partition) except on the sdcard partition

Categories

Resources