How to restore to stock on a Mac? - Xiaomi Mi A2 / 6X Questions & Answers

Currently running Android 10 custom ROM, want to go back to latest stock + lock bootloader and everything as it was out-of-the-box.
I'm on a Mac so I can't run auto-tools, need to do it manually.
I downloaded platform-tools and miui_JASMINEGlobal_V11.0.5.0.QDIMIXM_e2c5e49de6_10.0.zip
But not sure which commands to run first, don't want to bootloop my device accidentally...
Many thanks!

Related

Getting my rooting concepts straight

I just traded up from an iPhone 3G to a Europe model Nexus One and am considering rooting for unrestricted access to the App Market (I am using in China), but I wanted to make sure that I've got all my facts straight about the rooting process. My bootloader is unlocked and I have flashed upgrade packages manually before, but everything else appears to be stock.
So first, root access actually only involves installing the Superboot update over the stock ROM, if there is a superboot for that ROM version, right?
This then lets you install apps that require root access (such as Market Enabler or MarketAccess), so if I just wanted unrestricted market access, then this is all that I would have to do, right?
However, getting root also lets me install a custom recovery, which gives me some nifty functions from the recovery boot, such as backing up my phone (does it do anything else? Why does Amon_RA's recovery have Busybox if it already comes with superboot?). It also allows me to install a custom ROM.
So far so good? Am I missing anything?
Are there any other methods to root? I have heard that you can install the SDK and go through ADB to manually do root, but I have not found any detailed information about this method. I have FRF91 OTA, and since there is no superboot for that yet, could I potentially got the ADB route?
Didn't miss anything.
You can go several ways: since your bootloader is unlocked, to save yourself the pain with ADB loop method, which is completely unneeded, you can just use the regular method, skipping the "unlock bootloader" part, which leaves you with "flash custom recovery" part (totally independent) and then just flash whatever ROM you like, pre-rooted. You don't need to flash a rooting file over your ROM, you just can change your ROM to pre-rooted one.
So you are saying that I can flash a custom recovery, then load a custom rom that is pre-rooted?
How do I flash a custom recovery if I am not rooted? I thought that in order to get the recovery you needed to root via superboot?
And I must have a custom recovery in order to have a pre-rooted rom, otherwise the phone will reject the package, right?
So the only thing that prevents root on the Android is the rom and recovery partition's own integrity check for whatever you are flashing? In other words, people can lose root by flashing a stock rom, and you can get root by flashing a pre-rooted rom. I seem to remember seeing some pre-rooted packages saying that you must have previously had root in order for it to work. Is that not correct, then?
Thanks.
hgcrpd said:
I just traded up from an iPhone 3G to a Europe model Nexus One and am considering rooting for unrestricted access to the App Market (I am using in China), but I wanted to make sure that I've got all my facts straight about the rooting process. My bootloader is unlocked and I have flashed upgrade packages manually before, but everything else appears to be stock.
So first, root access actually only involves installing the Superboot update over the stock ROM, if there is a superboot for that ROM version, right?
Click to expand...
Click to collapse
Not exactly - root access simply indicates having the su and superuser.apk binaries installed, and the suid bit set on su. But you are close enough. If you are running FroYo, Cyanogen and Lox have published flashable rooters.
You will already need a custom recovery to flash either of these - but since your bootloader is unlocked, a custom recovery does not pose any problem - see below...
hgcrpd said:
This then lets you install apps that require root access (such as Market Enabler or MarketAccess), so if I just wanted unrestricted market access, then this is all that I would have to do, right?
Click to expand...
Click to collapse
Yes.
hgcrpd said:
However, getting root also lets me install a custom recovery, which gives me some nifty functions from the recovery boot, such as backing up my phone (does it do anything else? Why does Amon_RA's recovery have Busybox if it already comes with superboot?). It also allows me to install a custom ROM.
Click to expand...
Click to collapse
Couple of points here:
1. No, you don't need root to install a custom recovery - you need an unlocked bootloader. In fact, you have reversed them - you usually need a custom recovery to get root! Since you have that bootloader already unlocked, you can go ahead and install Amon's recovery (or another one) and get what you need to get.
2. Recovery does not use the same shell and variables as /system. Busybox is usually installed in recovery to allow you to run things via ADB or scripts when in recovery mode without manually calling them off of system (something that would be a problem if you were formatting and rewriting system, for example).
hgcrpd said:
Are there any other methods to root? I have heard that you can install the SDK and go through ADB to manually do root, but I have not found any detailed information about this method. I have FRF91 OTA, and since there is no superboot for that yet, could I potentially got the ADB route?
Click to expand...
Click to collapse
You need to have the SDK installed (which includes adb) to unlock the bootloader in any case, right? Or did someone unlock the bootloader for you? In any case, I would just install the SDK - it's free, fast and gives you access to fastboot and adb. You need fastboot to install a custom recovery, and adb is useful for lots of things.
And there are plenty flashable root zips for FRF91. You need to first install a custom recovery!
http://forum.xda-developers.com/showthread.php?t=715799
http://forum.xda-developers.com/showthread.php?t=686627
So, if I were you:
1. Install the Android SDK on your computer to get ADB, fastboot and the necessary drivers.
2. Download and flash a custom recovery using fastboot.
3. Reboot into recovery.
4. Copy Lox or Cyan's rooter to your SD card using adb push.
5. On the phone, in recovery, do a nandroid backup!
6. Flash the zip from step 4.
7. Reboot your phone and confirm that you have root - the easiest way is to start up a terminal session and type "su". The Superuser authorization program should pop up and ask you to approve the application's request for root access. Grant it. If the prompt turns from "$" to "#", you have root.
1. No, you don't need root to install a custom recovery - you need an unlocked bootloader. In fact, you have reversed them - you usually need a custom recovery to get root! Since you have that bootloader already unlocked, you can go ahead and install Amon's recovery (or another one) and get what you need to get.
Click to expand...
Click to collapse
I see. So the post on modaco is not quite correct when it says that root is a pre-req for Amon_RA's recovery. I'm guessing that's only a pre-req if you flash via a terminal session on the phone? (By the way, is there an official terminal app? The only one I could find was Terminal Emulator.)
You need to have the SDK installed (which includes adb) to unlock the bootloader in any case, right? Or did someone unlock the bootloader for you?
Click to expand...
Click to collapse
Bootloader was unlocked when I bought it. The phone is a grey-market item that I purchased here in China, and every grey-market phone that comes in gets modified by the importers in order to add Chinese language support and such. I think that's all they did, since I've been able to do updates and get OTA without a problem.
Thanks! I will give the SDK route a try, if I get time before the superboot for FRF91 comes out.

[Q] bl unlocked, su & cwm installed, still no full root?

Using the super tool, I managed to unlock bootloader, install superuser, and the modified cwm, but can't achieve Su permissions and can't flash Roms...
This is all after unbricking the device... Lol. I failed to properly install the android SDK tools, but proceeded to unlock bootloader, then flashed the holicakes kernel with the thought that it was a full Rom, lol... Needless to say, it was bricked... So I downloaded the HTC ics ruu and brought it back to stock. From there I re-unlocked the bootloader, flashed modified cwm, and installed superuser... Now what?
Installed su in recovery?
Sent from my HTC PH39100 using Tapatalk 2
Mr_Random said:
Using the super tool, I managed to unlock bootloader, install superuser, and the modified cwm, but can't achieve Su permissions and can't flash Roms...
This is all after unbricking the device... Lol. I failed to properly install the android SDK tools, but proceeded to unlock bootloader, then flashed the holicakes kernel with the thought that it was a full Rom, lol... Needless to say, it was bricked... So I downloaded the HTC ics ruu and brought it back to stock. From there I re-unlocked the bootloader, flashed modified cwm, and installed superuser... Now what?
Click to expand...
Click to collapse
If your goal is to flash a new modified rom then you can already proceed to do so with the unlocked bootloader and custom recovery. Your new modified ROM will have root access built in already. Just make sure when you flash a new ROM, you also flash the accompanying kernel (boot.img) as it is not flash automatically (unless you have already s-offed and the ROM chef has it written in his installation script) regardless it won't hurt to install the accompanying kernel just prior or after the ROM install.
Here is something important, if you are flashing ICS and you don't have the right bootloader, you have to get the new bootloader BEFORE flashing any ICS ROMs. You can do this by flashing the correct RUU with ICS (which requires you to relock and blah blah blah, but you already know this). Good luck with your flashing.
Thank you guys! I did install su from recovery, but I forgot that stock Roms still show as unrooted. I was hoping to just use flash image GUI to flash the kernel, boot into recovery, then Rom, but now I realize that without s-off/custom Rom, I need to use the supertool to flash the kernel.
However, supertool won't recognize the device when trying to push kernels... Should I check for and remove htc sync on the computer? Otherwise the right usb drivers and android SDK tools are present :-/
Also, when I go to flash the kernel for the Rom I choose, do I just unzip and pull the boot.img from within and replace the stock kernel in the supertool file? I've never successfully flashed an alternate kernel on to a device before, how do I know what is compatible?
If I ran the ruu, I should have the right bootloader, correct?
http://forum.xda-developers.com/showthread.php?t=1676787
How to ROOT Stock ICS
Root is working now, thanks! Now flash some custom rom's.

Uninstall ROM

Hello. I need help!! I want my htc sense 3.6 back on my phone but I am not sure how to uninstall MIUI ROM. In other words, I wanted what I had right after I rooted my phone, before I installed MIUI ROM. Anyone know how to do this? Thanks!
If you made a recovery file in the recovery then just install the file if not then relock the bootloader and run the Stock ruu file and then just re unlock root ect.
menachemt said:
Hello. I need help!! I want my htc sense 3.6 back on my phone but I am not sure how to uninstall MIUI ROM. In other words, I wanted what I had right after I rooted my phone, before I installed MIUI ROM. Anyone know how to do this? Thanks!
Click to expand...
Click to collapse
I imagine you would have rooted your phone, unlocked bootloader (maybe), and flashed a custom recovery (like clockworkmod or wcx). I don't think any of those things would have changed during your use of MIUI.
Easiest way? Relock your bootloader (if you had unlocked it), and then run the stock RUU for your phone to revert your phone to stock. Then you can unlock bootloader again and then root your stock rom (I believe there is the all-in-one tool that makes rooting quite easy).
Or... if you want to try another custom rom, download the rom zip, copy it on your SDCard, and....
1) Pull the battery, and re-insert
2) Boot phone by holding VOLDOWN and POWER. You are in bootloader. At this screen you can see if you are S-ON or S-OFF (good to know for the later steps)
3) Choose recovery
4) If you're in WCX recovery or ClockWorkMod recovery, then you can do the 4 wipes (Data/Cache/Dalvik/System). ** But if you see you are NOT in a custom recovery, stop now.
5) Then you can flash the custom rom zip.
6) *At this point - if you are S-OFF, then the rom's kernel would have flashed with the rom, so you're done.
*But if you're S-ON, you will now need to flash the rom's kernel manually via fastboot. (on your computer, just extract the boot.img from the rom's zip, put it in the same folder where your fastboot.exe is, and run
Code:
fastboot flash boot boot.img

[Q] Finding the right original Firmware

Tried to root and install CWM, CWM installed fine but I am stuck at the unlocked bootloader warning.
I've also tried installing stock roms and Pi-Llama's and Omar's custom roms using CWM, but neither would work (P-Llama would stop at the lying down android (in CWM) and Omar's finishes installing but brings me no further).
Now I think I should flash the original boot.img but I don't know which version to flash (I don't know my device info), what steps can I take?
Also is there any way to know the software version of the phone (for use with RSD Lite)?
Fastboot -> recovery brings me to CWM
Installing stock recovery and then Fastboot -> recovery brings me to the lying down android
Update: found and installed (Through RSD Lite) the right original firmware
jns1986 said:
Tried to root and install CWM, CWM installed fine but I am stuck at the unlocked bootloader warning.
I've also tried installing stock roms and Pi-Llama's and Omar's custom roms using CWM, but neither would work (P-Llama would stop at the lying down android (in CWM) and Omar's finishes installing but brings me no further).
Now I think I should flash the original boot.img but I don't know which version to flash (I don't know my device info), what steps can I take?
Also is there any way to know the software version of the phone (for use with RSD Lite)?
Fastboot -> recovery brings me to CWM
Installing stock recovery and then Fastboot -> recovery brings me to the lying down android
Update: found and installed (Through RSD Lite) the right original firmware
Click to expand...
Click to collapse
Did you wipe system/data on every install?
Intel device - Razr i Owner
Hit thanks if i help you or you like my style

[Q] Only boots to bootloader or recovery, no fastboot

Hi guys. I recently flashed a boot image via the Flashify app, which had worked in the past. After it flashed, I chose to reboot. Now my phone boots to the bootloader. I can't get fastboot to recognize my device on any PC (which is why I was trying another hboot). I can boot into recovery (cwm touch for now) but restoring roms etc. fails due to "no files found". ADB detects the phone in recovery. Can I repair my phone via adb without fastboot? I had a recent cwm and titanium backup on my sd card.
xpurtwitness said:
Hi guys. I recently flashed a boot image via the Flashify app, which had worked in the past. After it flashed, I chose to reboot. Now my phone boots to the bootloader. I can't get fastboot to recognize my device on any PC (which is why I was trying another hboot). I can boot into recovery (cwm touch for now) but restoring roms etc. fails due to "no files found". ADB detects the phone in recovery. Can I repair my phone via adb without fastboot? I had a recent cwm and titanium backup on my sd card.
Click to expand...
Click to collapse
are those computers all windows 8? There some issue with windows 8 and fastboot. better to use 7, linux or mac.
you can restore a backup or install a rom using adb, no need to use fastboot (except for recovery, RUU and firmware flashing)
you can transfer a rom to your sdcard using adb from custom recovery:
Code:
adb push name_of_rom.zip /sdcard/
I recommend you to use twrp 2.6.3.3 instead of cwm (required for arhd rom i.e) when you get fastboot working again.
alray said:
are those computers all windows 8? There some issue with windows 8 and fastboot. better to use 7, linux or mac.
you can restore a backup or install a rom using adb, no need to use fastboot (except for recovery, RUU and firmware flashing)
you can transfer a rom to your sdcard using adb from custom recovery:
Code:
adb push name_of_rom.zip /sdcard/
I recommend you to use twrp 2.6.3.3 instead of cwm (required for arhd rom i.e) when you get fastboot working again.
Click to expand...
Click to collapse
I am stuck in the same boat - I can't use fastboot., but I need it to flash a new recovery before updating to cm11. I don't have access to any Win7 computers to use, only have Win8.1. Are there updated drivers for the HTC One yet? Or any way to get fastboot working properly on Win8.1?
Artemicion said:
I am stuck in the same boat - I can't use fastboot., but I need it to flash a new recovery before updating to cm11. I don't have access to any Win7 computers to use, only have Win8.1. Are there updated drivers for the HTC One yet? Or any way to get fastboot working properly on Win8.1?
Click to expand...
Click to collapse
windows 8.1 doesnt work with early hboot version like 1.44 and if irc 1.54.
if you can't access another computer, use a live cd of ubuntu 12.04 32bit (no installation required, only boot from the disc or from a bootalb usb drive) and use fastboot from there.
alray said:
windows 8.1 doesnt work with early hboot version like 1.44 and if irc 1.54.
if you can't access another computer, use a live cd of ubuntu 12.04 32bit (no installation required, only boot from the disc or from a bootalb usb drive) and use fastboot from there.
Click to expand...
Click to collapse
So is it possible to upgrade my hboot to 1.55 (currently 1.54)?
EDIT: Ok, actually, examining things, it looks like this should work:
a) Go to Ubuntu for fastboot, flash new recovery
b) Back to windows, into recovery, wipe everything, push ROM over using adb, clean install of cm11
c) new cm ROM will include updated hboot so fastboot will now work in Win8.1
....that seem logical/like it should work to you? Thanks
Artemicion said:
So is it possible to upgrade my hboot to 1.55 (currently 1.54)?
Click to expand...
Click to collapse
yes, via fastboot :laugh:
EDIT: Ok, actually, examining things, it looks like this should work:
a) Go to Ubuntu for fastboot, flash new recovery
b) Back to windows, into recovery, wipe everything, push ROM over using adb, clean install of cm11
c) new cm ROM will include updated hboot so fastboot will now work in Win8.1
....that seem logical/like it should work to you? Thank
Click to expand...
Click to collapse
yes except c)
a rom doesn't update firmware so hboot will not be updated by flashing a custom rom. If you want to update hboot you must do it via an ota update, a complete ruu install (higher version) or manually flashing the firmware using fastboot. with s-on, you must use signed firmware only (the correct version for your device) and you bootloader must be locked or re-locked to flash it (s-on)
alray said:
yes, via fastboot :laugh:
yes except c)
a rom doesn't update firmware so hboot will not be updated by flashing a custom rom. If you want to update hboot you must do it via an ota update, a complete ruu install (higher version) or manually flashing the firmware using fastboot. with s-on, you must use signed firmware only (the correct version for your device) and you bootloader must be locked or re-locked to flash it (s-on)
Click to expand...
Click to collapse
Wow, ok, I think that sounds like far too much effort to just update my phone. Guess I'll use the ubuntu fastboot trick once, then just hope I never need to flash anything from fastboot again on this phone. Why is it always such an effort with these damn things? Thanks for the help, won't have a chance to try this for a couple of days but doubtless I'll be back with some other failed horror scenario then.
alray said:
are those computers all windows 8? There some issue with windows 8 and fastboot. better to use 7, linux or mac.
you can restore a backup or install a rom using adb, no need to use fastboot (except for recovery, RUU and firmware flashing)
you can transfer a rom to your sdcard using adb from custom recovery:
Code:
adb push name_of_rom.zip /sdcard/
I recommend you to use twrp 2.6.3.3 instead of cwm (required for arhd rom i.e) when you get fastboot working again.
Click to expand...
Click to collapse
Yeah, that's pretty much the extent of what I knew, but I really appreciate your response. I did manage to get my old Win7 laptop running and with some effort got all the drivers working. I used htc1guru reset, but sadly I did lose the entire contents of my SD, despite its message that nothing would be touched. :-/ Luckily, most photos were auto-backed up by G+ and it's just a few settings and such that I can't get back or figure out. Least of my concerns after having a functional phone!
alray said:
yes, via fastboot :laugh:
yes except c)
a rom doesn't update firmware so hboot will not be updated by flashing a custom rom. If you want to update hboot you must do it via an ota update, a complete ruu install (higher version) or manually flashing the firmware using fastboot. with s-on, you must use signed firmware only (the correct version for your device) and you bootloader must be locked or re-locked to flash it (s-on)
Click to expand...
Click to collapse
Hey, so I'm trying to do this, have got linux up and running and fastboot recognizes the phone, but I couldn't flash the recovery image as the terminal couldn't see it. What location does it need to be in within linux? I put it on the root of the usb drive and it wouldn't work from there...
Artemicion said:
Hey, so I'm trying to do this, have got linux up and running and fastboot recognizes the phone, but I couldn't flash the recovery image as the terminal couldn't see it. What location does it need to be in within linux? I put it on the root of the usb drive and it wouldn't work from there...
Click to expand...
Click to collapse
the answer is always the same, in the same folder you have adb in.
so in ubuntu it should be androidsdk/platform-tools/

Categories

Resources