Tutorial - Rooting Mi 5 without wiping data - Xiaomi Mi 5 Guides, News, & Discussion

Dear All,
WARNING: I'm no developer, just a regular user. SO PLEASE ONLY TRY THE BELOW PROCEDURE AT YOUR OWN RISK. I'm not responsible if you end up with a device that doesn't work the way it is originally meant to.
Recently I decided to root my Mi 5 running Global Dev ROM (Version: 6.5.30 (MIUI7)).
Read a few threads.
Mainly (link A): http://en.miui.com/forum.php?mod=viewthread&tid=260976
Then I posted a Q&A thread: http://en.miui.com/forum.php?mod ... 0&page=1#pid5799160
I noticed that according to link A, we needed to wipe data to root successfully.
Here's what I did:
1. Unlock BootLoader via Xiaomi Official Method. - Important Step
2. Temporarily flash TWRP (link mentioned in link A) [fastboot boot *recoveryname*.img].
3. Selecetd English as the language.
4. Left the System partition unmodified when promted (Keep Read Only).
5. Mounted System + Cache.
6. Enabled ADB sideload.
7. SIdeloaded the superSU file (link mentioned in link A).
8. Rebooted device.
9. SuperSU was installed.
10. To check this I tried out SElinuxmodechanger + V4A (use apps with Root access at your own risk and evaluation of safe / unsafe nature of the app/apps).
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Conclusion: I was able to root my Mi 5 (Global Dev Rom) without permanent flashing of TWRP + without modification to system partition (Keep Read Only)) + without wiping data in TWRP before installing SuperSU.

Hey, great tutorial, but after, the OTA update will work and / or remove root ?

Is the sideload necessary ? Can't the SuperSU file be stored in an internal folder beforehand ?

@hmnk: can you please post links for SElinuxmodechanger and V4A? Thanks.

flavien317 said:
Hey, great tutorial, but after, the OTA update will work and / or remove root ?
Click to expand...
Click to collapse
Thanks.. The OTA updates work. You will only have to root the phone via my tutorial again.
lapocompris said:
Is the sideload necessary ? Can't the SuperSU file be stored in an internal folder beforehand ?
Click to expand...
Click to collapse
Sideload was necessary at the time of the tutorial being posted as the MIUI version / TWRP didn't allow data partition to be mounted without formatting it. Hence, the flashable zips had to be sideloaded.
However, currently, I'm on MIUI Version: V8.0.2.0.MAAMIDG (MIUI8) and twrp-3.0.2-0-gemini, this combination allows data partition to be mounted without formatting it.
Burs said:
@hmnk: can you please post links for SElinuxmodechanger and V4A? Thanks.
Click to expand...
Click to collapse
www.google.com

Personally tested myself on Mi5 Pro and it works with MIUI Version: V8.0.2.0.MAAMIDG (MIUI8) and twrp-3.0.2-0-gemini.
Huge huge thanks!

Thanks very much for this worked a treat. I'm on 6.10.13 Global, used ZCX-TWRP and SuperSU v2.76. No problems at all.

Many thanks for your guide. I'll try it on the next update

This has been working well for me, thank you. Now I'm wondering if the same method could be used to install things like Xposed without flashing TWRP too. Has anyone tried it? I'm scared. ::laugh:

thanks

Bootloop
Tried this over MIUI Global BETA 7.4.27 (Mi5) and got a bootloop
I've downloaded the required files and TWRP 3.0.2.0 and SuperSU 2.76

Thanks, it worked!

I just tested this on the MI5s Plus and it works on that phone as well.

Related

Allview v2 viper x+ root process.

Ok, so I don't want to continue with this after I get some specified things in order to pursue the root methods.
My phone is Allview V2 viper x+ 3 gb ram bla bla (http://allview.ro/produse/telefoane/viper/v2-viper-x-plus-gold.html)
I'm backing up now few things and after that will backup the system files like recovery, imgs and more so, just for to be sure I have some back up in order to get it back to life if something gone's wrong.
I have 2 problems to solve with this phone.
1. After I changed my sd card to be the default internat storage for apps, everytime I try to install some app from market it's says something about hardwer is not compatible or something like this, but If i'll download the apk from some site (same apk) is working, well this is the first problem and is unsolved.
2.I want to have the phone rooted, I saw many posts with this method of supersu beta root and I have to flash some recovery img (I'm always trying and I see if is working, but I have a lot to save from my phone, so I'll have to wait to finish the full backup, reset the phone, get the sd card off and so on).
I tried to search a good version of TWRP for my phone, but I don't find any good compatbile.
My question for you is :
1.Did anybody had a successful root with this phone?
2.Which method is better to root an marshmallow? (6.0)
3.There is some recovery of twrp compatbile with this phone?
4.Does the ota update will work after the root process? (because I'm thinking that they could have some update to 6.0.1, but Idk when).
##Update##
I came back to previous version of 5.1 and root it and then I'll try the method from here with flashfire.
http://www.howtogeek.com/192402/why-androids-ota-updates-remove-root-and-how-to-keep-it/
Click to expand...
Click to collapse
##Update-2##
Failed every method I tried.
- Failed installing custom recovery carliv, cwm, twrp (all failing, is not booting after flashing custom recovery, the only one who works is that carliv touch but if I install it, will not boot anymore)
- Failed kingroot (suppose to have some 6 method of rooting one click root)
- Failed flashing supersu, not working without a custom recovery .
- Tried to search for some custom rom to install with carliv, but I didn't find any good, all had errors that I didn't find to solve. and is crazy that I can't root the phone.
Note : What method remains?
If someone know..
##Update-3##
After many many unsucessful custom recoverys, successful bootloader unlock and many resets, didn't get any luck.
I'll remain on 5.1 till I have a clearly method of rooting the marshmallow without having to change the custom recovery, or maybe till I find a good custom recovery that works with anything I need.
Or till they update the android 6.0 to 6.0.1 (I saw that they have some root access option).
Maybe someday someone will text here with some method or similar, so I'll look here everyday till I find a way ;3
Ps. : Even if is a gionee s plus, the methods I saw for it, didn't worked aswell.
Cya.
##Up1x##
Tried this too and voilla .. ..
Another error ^^
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
##Final Update (Can close this)##
After a lot of of of of searching and mental stress and a lot of digging, I finally find a very one and good solution to get supersu flashed by a custom recovery.
For those who have problems like me and have same phone (Gionee Splus), follow this guide : https://atozhacks.blogspot.ro/2016/08/gionee-splus-marshmallow-philz-touch.html

Error mode

It has reached me a Mate 10 Lite with error when unlocking the Bootloader ... once made it sends you to the custom recovery TWRP but it shows in its description that they wipe the system and do not load it, I have tried to recover with backups uploaded by other users but it does not ... someone has gone through this ... and what suggestion they give ... The same does not allow to install the Stock recovery, to use the file update.app ... Nor does it allow to i
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
nstall other types of recoverys.
Try a different twrp that has helped me kingmezi is working for my but keep in mind you need to format data (and check the mount setting and swipe to modify at start)
Thks
KOALAaufPILLEN said:
Try a different twrp that has helped me kingmezi is working for my but keep in mind you need to format data (and check the mount setting and swipe to modify at start)
Click to expand...
Click to collapse
Thanks for the answer, but it does not allow as the previous message says ... it does not allow to install any type of recovery either stock or custom ...
It does not allow to mount any partition, Boot, Recoery, etc ... from the TWRP Menu
Unlock bootloader install via command
thks
I do not think I'm spying.
1. The Bootlaoder even if it is released ... it sends you immediately to the TWRP ... once inside it says no OS installed, and it does not allow doing anything because it does not load any of the partitions.
2. Even if you release the Bootloader, it does not allow you to install another type of TWRP ... nor restore backup files ... it only allows you to flash the different OEMINFOs as if it were a rebrand.
KOALAaufPILLEN said:
Unlock bootloader install via command
Click to expand...
Click to collapse
Then you might try dc phoenix but its not free
That can install even if you have a locked bootloader firmware or even if you are bricked like your cellphone
you can download the latest firmware without problems googe it and try it (cost about 15dollar to unbrick)
If the twrp dont work cause the parameters are wrong what twrp are you using we have here 3 differents for the Huawei if im right try kingmezi twrp its working fro my l21-b432 i think it was
Thks
I managed to install another custon recovery, that allows to see the partitions, and that the team has a system ... but at the time of restart the bootloader error comes out ... and giving low CMD fastboot has the same unlocked ... perfect ... when I send the command fastboot flash (Boot, recovery, recovery2) it says Failed ... and I can not install the recovery stock.
P.S: Thanks for the advice of DC Phoenix ... I had seen it and I will try ...
KOALAaufPILLEN said:
Then you might try dc phoenix but its not free
That can install even if you have a locked bootloader firmware or even if you are bricked like your cellphone
you can download the latest firmware without problems googe it and try it (cost about 15dollar to unbrick)
If the twrp dont work cause the parameters are wrong what twrp are you using we have here 3 differents for the Huawei if im right try kingmezi twrp its working fro my l21-b432 i think it was
Click to expand...
Click to collapse
solved?
hi men, please you can solved this?, i have de same problem

[RECOVERY][UNOFFICIAL] TWRP 3.2.3-0 for aries [01-09-2018]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Introduction
Hi to all dear Z3c users. This is my first TWRP build, I used omni minimal TWRP source and kernel from Sony git.
I hope you enjoy this.
How to install
Fist of all you MUST flash lastest 23.5.A.1.291 firmware with FlashTool at least one time, for upgrade the bootloader (You need this upgrade for boot on recovery).
Via fastboot
Reboot your phone on fastboot mode.
Flash recovery using this command:
Code:
fastboot flash FOTAKernel <filename>
Via zip (You need a working recovery installed)
Download the zip and put it on your internal or external memory.
Reboot to recovery.
Flash the zip.
Via Official TWRP App (You need root)
Install the app from Google Play Store and download the zip.
Extract recovery.img and copy it to your internal or external memory.
Open the app, give root permissions and tap on TWRP FLASH.
Tap on Select a file to flash...
Select the recovery.img and flash it.
Download
TWRP
Thanks to
@GreyLeshy a lot of thanks for this great dev, he helped me a lot for make this possible, build this recovery and he had a lot of patience with this noob dev.
@Dees_Troy for TWRP.
omni Team for TWRP Minimal Source.
XDA:DevDB Information
TWRP for aries, Tool/Utility for the Sony Xperia Z3 Compact
Contributors
ShadowElite, GreyLeshy
Source Code: https://github.com/ShadowElite117/android_sony_shinano_twrp/tree/aries
Version Information
Status: Stable
Created 2018-09-01
Last Updated 2018-09-02
FAQs
Q. How boot on recovery?
A. With the device turned off, press power and vol- at same time until it vibrates.
Q. Does it works with stock or custom ROMs?
A. At this momment I know that it is fully compatible with stock ROMs (or stock based ROMs) but at this momment is not tested with custom ROMs, so you users have to test it and report.
Installed the TWRP 3.2.3-0 on CarbonROM 6.1 (Android 8.1). So far so good, seems alright to me.
neckronus said:
Installed the TWRP 3.2.3-0 on CarbonROM 6.1 (Android 8.1). So far so good, seems alright to me.
Click to expand...
Click to collapse
Yeah but the question is if this recovery works for flash custom ROMs, I know that it work perfectly with stock roms, if you can test it and report here, I really apreciate.
ShadowElite said:
Yeah but the question is if this recovery works for flash custom ROMs, I know that it work perfectly with stock roms, if you can test it and report here, I really apreciate.
Click to expand...
Click to collapse
Just tried flashing the latest Carbon and it worked for me. Haven't tested flashing stock ROMs myself though
Just tried to install the zip on my Z3 compact.
My phone has full encryption enabled (complete including the sd card).
Your build of TWRP is not able to decrypt the phone.
It always tells me "Password failed, please try again!" even though the given passsword is correct (I can start the system with the same one).
amazing
Installed on OMNI with TWRPapp, flahed Carbon and then RR.
All it was fine and, finally, no "Error 7".
Thank you for this!
I have a question, I have encrypted my device (CarbonRom cr6) and now when I try to access TWRP I draw my security pattern and I get a failed to decrypt message.
The pattern is the one I use on a daily basis to use my device so this is related to TWRP. Any suggestion?
Maybe this twrp has a problem with support encription?
Carbon ROM expects TWRP with ro.build.product or ro.product.device equal z3c (not aries) . Modified original image using this method https://forum.xda-developers.com/t/...because-of-empty-system.3554252/post-85881113
For Lineage (18.1), this (3.3.1) TWRP version is recommended, but it seems to have issues preserving the survival scripts (e.g. of Magisk) over OTAs. Unfortunately, the device isn't supported on twrp.me

[TOOL][DIPPER] TOOL ALL IN ONE (Drivers|TWRP|Factory Image|Stock Recovery)

This is the Xiaomi Mi 8's TOOL ALL IN ONE Discussion Thread more info and download go to the Original Thread
TOOL ALL IN ONE
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
ADVANCED OPTIONS
FUNCTIONS
Install Drivers
Install Drivers
Unlock Bootloader
Lock Bootloader (use carefully)
Flash TWRP Recovery
Flash Stock Recovery
Flash Stock Factory Image
Automatic ROOT
Install APKs
Uninstall APKs
Take a Screenshot
Take a Screen Reocrd
Flash Partitions
Erase All Data (This function can decrypt the phone)
Reboot Phone
Update the Tool to latest version
Update Adb and Fastboot to latest version
Set Adb and Fastboot priviliges in system wide
Install Zip directly from PC (Required TWRP on phone)(These functions work perfectly on my pc but i have perfect adb drivers on my pc and perfect TWRP on my phone)
Flash Fastboot ROM
Delete downloaded files
ADB File Manager
DEVICE LIST
If you want you can send a request to add a new device here:
New Device Request Form
Device List
DOWNLOAD
Original Thread
DONATE LINK
If you want to support the project please consider making a donation, thanks.
​
Dreams come true ! Great work
Wow! Great stuff man
does the bootloader unlock and lock actually work from this? i thought that with xiaomi devices the only way to unlock bootloader was by using the mi flash unlock tool?
Konskl said:
does the bootloader unlock and lock actually work from this? i thought that with xiaomi devices the only way to unlock bootloader was by using the mi flash unlock tool?
Click to expand...
Click to collapse
Yes actually the only way to unlock your bootloader is with mi unlock tool
Great!!!
I guess the "Reboot EDL" feature doesn't work with Dipper, does it?
Cool.
Does it work to return full stock including original recovery? I don't want to brick my device so I better ask.
descarao81 said:
I guess the "Reboot EDL" feature doesn't work with Dipper, does it?
Click to expand...
Click to collapse
Someone tell me it doesn't work, actually i have not a xiaomi mi 8 so i'm unable to test it
catalindobre said:
Does it work to return full stock including original recovery? I don't want to brick my device so I better ask.
Click to expand...
Click to collapse
Actually the tool is able to flash a full fastboot factory image, so it will also flash the stock recovery, the problem is the arb, the tool is unable to read the arb version and if the rom can be flashed or not, so before flash it you should be sure you are flashing the right rom
For example would it work to flash Global 10.2.2 also to restore the stock recovery, or any considering that now I am rooted + twrp on custom rom? Been also on latest MIUI versions bit want to regain my stock again.
catalindobre said:
For example would it work to flash Global 10.2.2 also to restore the stock recovery, or any considering that now I am rooted + twrp on custom rom? Been also on latest MIUI versions bit want to regain my stock again.
Click to expand...
Click to collapse
Yes the problem is not the rom but the arb, if there is not an arb problem you can flash the rom without problems
How can I find it out?

I am so done....

I just want to finally try and install a custom rom into my Mi A3 which I rooted a while ago. I know I need this tool called TWRP, after encountering a myriad of errors trying to follow this guide step-by-step, I finally got to the point when I need to type "fastboot boot twrp.img" to boot into TWRP temporarily. But alas that couldn't be so easy now could it... Now I get this thing
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
and it's 11:41 PM and I'm about to burst a vein. I made an account solely to make this post because I can't seem to get an actual answer anywhere else... Any ideas before I give up?
is the bootloader unlocked ?
i think i got same message and it was because i forgot this.
I think there are better guides. Not sure what state your system is in. I would re-install the stock rom and start afresh. Unlock your bootloader, check which slot 'a' or 'b' is the current slot, and then follow the instruction of the Custom ROM you are trying to install. It might need TWRP but Lineage Recovery is equally as good.
#1jonna said:
is the bootloader unlocked ?
i think i got same message and it was because i forgot this.
Click to expand...
Click to collapse
Yes sir it very much is, don't think it'd have been possible to get this far otherwise
bjlabuk said:
I think there are better guides. Not sure what state your system is in. I would re-install the stock rom and start afresh. Unlock your bootloader, check which slot 'a' or 'b' is the current slot, and then follow the instruction of the Custom ROM you are trying to install. It might need TWRP but Lineage Recovery is equally as good.
Click to expand...
Click to collapse
how do I do this?
2. does Lineage Recovery even work on Mi A3s? I don't find anything about this device on their website
Follow the guide in the thread 'Slot A is destroyed'.
bjlabuk said:
Follow the guide in the thread 'Slot A is destroyed'.
Click to expand...
Click to collapse
I assume this means I can just go back to magisk and hit restore images, then return to fastboot and switch to slot b and install twrp there?
ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ said:
View attachment 5554333
I assume this means I can just go back to magisk and hit restore images, then return to fastboot and switch to slot b and install twrp there?
Click to expand...
Click to collapse
As I said, as I am not sure what state your system is in I would suggest 're-installing' the stock rom from your PC, rather than 'restoring' an image from your phone. If you have backed up your data etc (eg on Google Drive) you can restore it after you have re-installed the stock rom. You can then start again from scratch.
The latest stock rom fastboot images can be found here
https://xiaomifirmwareupdater.com/miui/laurel/
Tbh I haven't restored an image from magisk myself so I can't confirm what you are proposing, though yes I switched to slot b and installed TWRP.
You might also want to read this article on A/B partitions
https://www.xda-developers.com/how-...ess-updates-affect-custom-development-on-xda/
Try this
https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
Flash TWRP installer through the app
Just a few tips when you do get to TWRP:
Disable dm-verity
Format data and wipe cache after you flash the new rom before first boot
Use a patched boot method instead of flashing magisk in TWRP on custom ROMs. High chance of soft brick.
DM me if you need help.

Categories

Resources