Unrooting Mi A1 [Android Oreo ] completely - Xiaomi Mi A1 Guides, News, & Discussion

complete unrooting procedure for Mi A1 [Android Oreo]
1) remove all magisk modules
I mean untick all magisk modules and click on delete icon beside them
After this reboot your device
2) then open magisk manager and uninstall using completely uninstall option
3) ‎then power off your device
4) ‎go to fastboot mode
‎ ( by pressing vol- + power buttons simultaneously)
5) ‎then unlock OEM using command
fastboot oem unlock
6) then check for current slot by using below command
fastboot getvar current-slot
7) then we should flash stock boot image
Using this command
fastboot flash boot_a boot.img
( If a is current slot )
Or
fastboot flash boot_b boot.img
( if current slot is b )
‎
‎Boot image file : https://drive.google.com/file/d/1EsuVTv5zIrfhDH7VG6uSyTXUWPS7Dvfl/view?usp=drivesdk
8) then lock your OEM using command
‎fastboot oem lock
9) then reboot using command
fastboot reboot
Congratulations your device is unrooted successfully !!
Suggested vedios for mi A1 users
Iam maintaing my channel for mi A1 related vedios and other technical stuff
Do subscribe for latest updates
Rooting using magisk :
Complete gcam setup :

#reserved

Or..
1. download fastboot ROM from Xiaomi, run flash_all_except_storage.bat (or flash it in MiFlash)
Congrats, you have stock device!
This way you are sure that you have correct boot.img corresponding to your ROM (otherwise OTA update will fail) and not some "random file from the Internet".

Thank you very much!!!! Was looking for this in a pretty long time!!!

Nope. This boot.img doesn't work for me. After completing the instructions I'm just getting the Mi logo and then restart and it goes on forever. Maybe my system.img is bad??? Can anybody give me a link to a perfect Oreo fastboot ROM, becuase I found two: the one is my current ROM and the other one's system.img "cannot be extracted".

nicolasmart said:
Nope. This boot.img doesn't work for me. After completing the instructions I'm just getting the Mi logo and then restart and it goes on forever. Maybe my system.img is bad??? Can anybody give me a link to a perfect Oreo fastboot ROM, becuase I found two: the one is my current ROM and the other one's system.img "cannot be extracted".
Click to expand...
Click to collapse
This one works for me https://forum.xda-developers.com/showpost.php?p=75027522&postcount=63
Currently I'm rooted, but I fully booted right after flashing it without any mods and ROM started fine.
It will show some sparse warning during flashing, but it will complete the process OK.

Really? Is that what you're using? That's the exact one with the system.img errors. Nah, maybe a bad download.

nicolasmart said:
Really? Is that what you're using? That's the exact one with the system.img errors. Nah, maybe a bad download.
Click to expand...
Click to collapse
Yep, working fine (well, except the video recording bug, but that is most probably Xiaomi's fault). I downloaded this file as well (https://forum.xda-developers.com/mi-a1/development/tool-aosp-8-0-ql1515-dec-8-2017-t3722184) and extracted and compared both system.img files and they are exactly the same except the very small difference - second one allows encryption as optional (modified) vs. forced (stock) in fstab. It might cause bootloop if you try to lock the bootloader with that system. Try to redownload files from Mega..

_mysiak_ said:
Yep, working fine (well, except the video recording bug, but that is most probably Xiaomi's fault). I downloaded this file as well (https://forum.xda-developers.com/mi-a1/development/tool-aosp-8-0-ql1515-dec-8-2017-t3722184) and extracted and compared both system.img files and they are exactly the same except the very small difference - second one allows encryption as optional (modified) vs. forced (stock) in fstab. It might cause bootloop if you try to lock the bootloader with that system. Try to redownload files from Mega..
Click to expand...
Click to collapse
Hmm... redownloaded from Mega, says
Code:
error: cannot load '.\system.img'
Yes, I'm sure the file is in the current folder.
I tried a different fastboot.exe and the error is more specific this time :
Code:
target reported max download size of 534773760 bytes
Invalid sparse file format at header magi
Edit: The weird thing is that all other images from this Fastboot ROM install and work just fine. I've even used the boot.img from it. It works without any problems. The system is problematic.

nicolasmart said:
Hmm... redownloaded from Mega, says
Code:
error: cannot load '.\system.img'
Yes, I'm sure the file is in the current folder.
I tried a different fastboot.exe and the error is more specific this time :
Code:
target reported max download size of 534773760 bytes
Invalid sparse file format at header magi
Edit: The weird thing is that all other images from this Fastboot ROM install and work just fine. I've even used the boot.img from it. It works without any problems. The system is problematic.
Click to expand...
Click to collapse
First fastboot.exe is probably old, second one seems to be fine. Just wait until it starts flashing system.img, it will take a minute or two and will look like frozen (fastboot has to split file into 6 smaller ones, probably has something to do with missing sparse format), be patient and don't interrupt the process.

_mysiak_ said:
First fastboot.exe is probably old, second one seems to be fine. Just wait until it starts flashing system.img, it will take a minute or two and will look like frozen (fastboot has to split file into 6 smaller ones, probably has something to do with missing sparse format), be patient and don't interrupt the process.
Click to expand...
Click to collapse
THANK YOU!!!! IT WORKED!!! I AM NOW WITH LOCKED BOOTLOADER AGAIN! :victory: :victory: :victory:

nicolasmart said:
THANK YOU!!!! IT WORKED!!! I AM NOW WITH LOCKED BOOTLOADER AGAIN! :victory: :victory: :victory:
Click to expand...
Click to collapse
You saved me too.
presented error in the "no command" and did not accept the January update

Thank it worked for me!
After this unroot method i could install the january ota.
Then I used this https://forum.xda-developers.com/mi-a1/how-to/root-mi-a1-oreo-8-0-disabling-ota-magisk-t3728654 method to root again

_mysiak_ said:
Or..
1. download fastboot ROM from Xiaomi, run flash_all_except_storage.bat (or flash it in MiFlash)
Congrats, you have stock device!
This way you are sure that you have correct boot.img corresponding to your ROM (otherwise OTA update will fail) and not some "random file from the Internet".
Click to expand...
Click to collapse
No need to uninstall modules and magisk
Just download & flash stock rom is enough to return to stock unrooted rom.
Is this you saying?

rkview37 said:
No need to uninstall modules and magisk
Just download & flash stock rom is enough to return to stock unrooted rom.
Is this you saying?
Click to expand...
Click to collapse
If you want to return to stock ROM and never use Magisk again, then you might want to uninstall Magisk first. But if you are only unrooting to apply OTA for example, it is enough to flash stock ROM and then reinstall Magisk - all your modules and settings will be kept.

_mysiak_ said:
If you want to return to stock ROM and never use Magisk again, then you might want to uninstall Magisk first. But if you are only unrooting to apply OTA for example, it is enough to flash stock ROM and then reinstall Magisk - all your modules and settings will be kept.
Click to expand...
Click to collapse
Actually sir
I have flashed patched boot image not just just boot
is your method work then
&Of course I just unroot to apply ota

rkview37 said:
Actually sir
I have flashed patched boot image not just just boot
is your method work then
&Of course I just unroot to apply ota
Click to expand...
Click to collapse
For OTA update, just reflash the latest stock ROM (keep data), apply OTA and root with Magisk again.

camerlengo said:
Thank it worked for me!
After this unroot method i could install the january ota.
Then I used this https://forum.xda-developers.com/mi-a1/how-to/root-mi-a1-oreo-8-0-disabling-ota-magisk-t3728654 method to root again
Click to expand...
Click to collapse
Ok bro

_mysiak_ said:
Or..
1. download fastboot ROM from Xiaomi, run flash_all_except_storage.bat (or flash it in MiFlash)
Congrats, you have stock device!
This way you are sure that you have correct boot.img corresponding to your ROM (otherwise OTA update will fail) and not some "random file from the Internet".
Click to expand...
Click to collapse
Can u link me to the latest fastboot rom? , The link in the thread on the mi forums is too old I guess

AlwaysWin said:
Can u link me to the latest fastboot rom? , The link in the thread on the mi forums is too old I guess
Click to expand...
Click to collapse
http://ru.miui.com/thread-1308-1-1.html
This website is in Russian but download from this site
Rom is Oreo Jan official rom flash it using mi flash tool

Related

[Tutorial][S4/S3] How to use OTA zip to get back to Stock OS

Lately, many people, including myself, have been at a disadvantage of not having an official RUU for JellyBean so that stock environment can be achieved. Although sometimes, OTA's are available which can do the job. Hence this Tutorial. Also this saves the effort to do S-OFF/SuperCID which often brings along more problems.
This Tutorial, in principle, can be applied to both S4 and S3 variants.
All thanks to @xander1993 at the VilleC2 Development Section who created the original thread Here. Though somewhat unclear and related to VilleC2, I thought of making a thorough guide for Ville with some minor changes.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
For T-MOBILE UK Users: (UK people with other operators e.g Three, Vodafone etc can also try the Jellybean Nandroid backup IF their firmware is upgraded to that of Jellybean)
ICS Users: Those stuck on ICS custom ROMs and can't get stock, Use This RUU to get to stock ICS and then update to Jellybean via System Updates Check. Thanks to @ppm48
Jellybean Users:Those stuck on Jellybean custom ROMs wanting to get stock, I have a Stock Jellybean 4.1.1 Nandroid backup for you guys Here Since there isn't any OTA.zip for T-Mobile UK for Jellybean. You can just flash this Nandroid right away without using this tutorial. Again, Thanks to @ppm48 for this. Also, if you have bootloops after restoring this backup, flash a Jellybean Sense boot.img.
Additionally refer to this post by @mkoev , should prove a lot helpful. Then you can follow the tutorial.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
For OPTUS Users with CID OPTUS001: (All thanks to @salac)
Get the modified OTA.zip Here. by @salac
salac said:
Follow the instructions from step 12.
Step 14. Flashing the firmware.zip worked the second try for me
Step 22. I did flash the boot.img to make sure it will work since I don't think I had the original one.
Good Luck
Click to expand...
Click to collapse
Optus users please follow @salac 's post above to flash the OTA.zip
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Pre-requisites:
1. Notepad++
2. 7-Zip (Recommended)
3. ADB+Fastboot (Get it Here)
4. HTC drivers (Standalone OR HTC Sync Manager Drivers)
5. Unlock_code.bin from HTCDev to unlock bootloader.
6. Any OS (Custom/Stock) present on the phone. (I have not tested it for phones without any OS, you may try it at your own risk and post results here) Not Needed anymore.
Common Steps:
In this guide, I will ask you to go to fastboot/adb so you should know how you would do that. (All fastboot/adb commands are to be given via Command Prompt from PC)
To execute Fastboot Commands:
- Go to fastboot folder on your PC
- Go to fastboot via bootloader on your phone
- Connect the Phone to PC and on the Phone it should say Fastboot - USB Mode
- Now in the fastboot folder on your PC, Hold Shift + Right-Click and click Open Command Window Here
- Now you can enter commands given in the guide for fastboot.
To execute ADB Commands:
- Same procedure except that you don't need to go to fasboot on your phone. You can execute adb commands while in Android OS/desktop.
To boot into Bootloader:
- While the phone is turned off, Press Volume Down + Power Button simultaneously.
OR
- If you are in Android OS, use the following adb command to boot into bootloader:
Code:
adb reboot bootloader
OR
- If you want to reboot into bootloader from fastboot:
Code:
fastboot reboot-bootloader
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Caution for SuperCID users: Please click the CROSS button on your Browser Tab, as flashing this is not intended for you. Either don't flash the OTA.zip, which will brick your phone if you do, OR change your CID to original one. e.g. H3G__001, BM___001, ORANG001
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Procedure:
- ** - ** - ** - Make Nandroid Backups before you do anything, remember you are doing this at your own risk - ** - ** - ** -
1. Download a OTA.zip – Most likely from Here. (You can rename the OTA file which usually has a long name to simply OTA.zip for ease)
2. Extract firmware.zip from OTA.zip. Then extract boot.img from firmware.zip. For now, copy Boot.img to ADB+Fastboot Folder..
3. Now to match the CID of your phone. You can get the CID of your phone via CID Getter from Play Store. Once opened, at the top will be your CID in Red color.
Alternatively, You can also get CID of your phone via Fastboot. Command for that is:
Code:
fastboot getvar cid
and it should display your CID.
4. Inside firmware.zip, look for android-info.txt. Supported CIDs should be mentioned inside this file. If it matches with that of your phone, Proceed otherwise stop and don't put yourself into more problems. (CID Match Exception: This 4th step may not be applicable to you if & only if you are to skip steps 11 to 16, if this is the case, you may flash OTA.zip skipping steps 11 to 16; Read step 10 for more info and then come back here)
5. We need to remove some code lines from inside the OTA.zip. For this, Open the OTA.zip with 7-zip (Right-click ---> 7-zip ---> Open Archive).
6. Head over to META-INF\com\google\android and find a file named updater-script. Drag it out of the archive to the folder/desktop where you can edit it. You should make an extra copy of this file.
7. Once you drag it out, delete the original updater-script inside the archive. It will recompress OTA.zip.
8. Edit with Notepad++ the extracted updater-script file. Find these lines (in the beginning of the file) and delete them altogether:
Code:
[COLOR="Purple"]assert(check_cid(getprop("ro.cid"), "00000000" , "11111111" ,
"22222222" , "33333333" , "44444444" , "55555555" , "66666666" ,
"77777777" , "88888888" , "99999999" ,
"BM___001") == "t");[/COLOR]
ifelse( is_ship_bootloader(getprop("ro.bootloader")) == "t" ,
assert(check_mid("full", "PJ4011000") == "t");,
assert(check_mid("simple", "PJ4011000") == "t");
);
You should delete these lines up to exact semi-colon ; at the end. (the purple lines with different CIDs can be different from those mentioned here, so no need to panic, just delete them)
9. Once edited, Copy this edited updater-script into the OTA.zip archive at the same location from which it was removed. It will recompress OTA.zip. You may now transfer OTA.zip to your SD-Card on your phone.
10. If you previously updated to JellyBean via OTA (Or if you have the exact or newer firmware on your phone than that present inside OTA.zip), skip steps 11 to 16. For example, if you have HBOOT Version 2.15.0000/2.13.0000 or above, it means you have already upgraded to Jellybean firmware so no need for Steps 11 to 16.
In case, if you are to proceed to step 11, that is if you are to flash firmware.zip, make sure to match CID as mentioned in step 4 to avoid any bricks. This is especially useful for those who have ICS and want to get stock JB or those on JB but want complete stock HBOOT, recovery etc.
11. Place firmware.zip extracted from OTA.zip inside ADB + Fastboot Folder.
12. Lock the bootloader, if unlocked. For this, go to fastboot on your phone and give the command:
Code:
fastboot oem lock
The phone reboots after this.
13. While in Android OS/Desktop, fire up Command window on PC to give the following ADB command to boot into OEM Update Mode.
Code:
adb reboot oem-78
OR (if you can't access OS to execute adb)
From Fastboot:
Code:
fastboot oem rebootRUU
You should be seeing HTC logo.
14. While in OEM Update Mode, give the following fastboot command to flash firmware:
Code:
fastboot flash zip firmware.zip
If it fails with error and doesn't show any Green Progressbar, keep trying the above command. Usually works after a few tries.
********** DO NOT REBOOT MANUALLY UNTIL IT FINISHES FLASHING FIRMWARE OR YOU'LL BRICK YOUR PHONE *************
15. Once firmware is updated, reboot into bootloader. Go into fastboot.
16. Place Unlock_code.bin inside ADB + Fastboot Folder. Use the following fastboot command to unlock your bootloader again. (This will wipe your phone except for SD, so you must make a backup before doing this)
Code:
[COLOR="Blue"]fastboot flash unlocktoken Unlock_code.bin[/COLOR]
17. Download a recovery. Preferred Recovery is TWRP 2.3.3.0 and I have not tested this guide with any other version. Put the recovery in the ADB + Fastboot folder.
18. Now go into bootloader again. This time to flash the recovery anew.
Code:
fastboot flash recovery recovery.img
19. Now go to the recovery via bootloader. Wipe data/factory reset, cache, dalvik.
20. Restore the Nandroid backup you had made earlier.
21. Now Flash the OTA.zip which is on your SD-Card. It should flash fine.
22. Go to fastboot via bootloader. We are now going to flash kernel with the following command, boot.img you had earlier copied to ADB+Fastboot folder.
Code:
fastboot flash boot boot.img
23. Reboot to the OS and you should see complete stock JB OS.
--------------------------------------------------------------------------------------------------------------------------------------------------------
Please Rate the thread and Hit the Thanks button if this tutorial helped you!
I am trying to use your method to get back to stock instead of the RUU method since I am on Mac.
The problem I am running into is that the best OS X alternative to 7zip is an app called BetterZip with wich the recompressed OTA.zip is of different size compared to the original (633MB vs. 647.3MB).
Do you think this is likely to cause problems when flashing the modified OTA.zip?
mortek said:
I am trying to use your method to get back to stock instead of the RUU method since I am on Mac.
The problem I am running into is that the best OS X alternative to 7zip is an app called BetterZip with wich the recompressed OTA.zip is of different size compared to the original (633MB vs. 647.3MB).
Do you think this is likely to cause problems when flashing the modified OTA.zip?
Click to expand...
Click to collapse
Well, When I edited OTA.zip, it was the same size before/after. But maybe OS X uses different compression values.
I think you should go ahead with it and try it.
I am stuck.
Since my phone is bricked and it can't boot into the ROM I cannot issue the ADB command from step 13 while in fastboot :/
mortek said:
I am trying to use your method to get back to stock instead of the RUU method since I am on Mac.
.......................
Do you think this is likely to cause problems when flashing the modified OTA.zip?
Click to expand...
Click to collapse
Can you use Winzip/Winrar? Might want to check with those two..
mortek said:
I am stuck.
Since my phone is bricked and it can't boot into the ROM I cannot issue the ADB command from step 13 while in fastboot :/
Click to expand...
Click to collapse
last time you flashed was a Viper rom I think. So What firmware did you flash? if it was that of JB firmware then it's ok to skip the Firmware Flashing steps.
Edit: I have updated step 13. If you can't use ADB, use the fastboot command.
khan.orak said:
last time you flashed was a Viper rom I think. So What firmware did you flash? if it was that of JB firmware then it's ok to skip the Firmware Flashing steps.
Edit: I have updated step 13. If you can't use ADB, use the fastboot command.
Click to expand...
Click to collapse
The OTA.zip was flashed successfully but in the recovery's log there is a line which reads "E:unknown command [firmware]".
The last ROM i flashed was indeed ViperRom but I didn't flash any firmware manually. Should I have done so? I didn't see such an instruction in the respective thread.
Edit:
I just saw your edit. I'll try the fastboot command and report back asap. Thanks.
mortek said:
The OTA.zip was flashed successfully but in the recovery's log there is a line which reads "E:unknown command [firmware]".
The last ROM i flashed was indeed ViperRom but I didn't flash any firmware manually. Should I have done so? I didn't see such an instruction in the respective thread.
Edit:
I just saw your edit. I'll try the fastboot command and report back asap. Thanks.
Click to expand...
Click to collapse
Actually, I had read your post where you mentioned that you used AOSP firmware. Maybe that is a bit different than the stock firmware. If it poses problems, you might need to flash the stock one, present inside OTA.zip.
Also flash the stock kernel if you find that the ROM is behaving oddly.
khan.orak said:
Actually, I had read your post where you mentioned that you used AOSP firmware. Maybe that is a bit different than the stock firmware. If it poses problems, you might need to flash the stock one, present inside OTA.zip.
Also flash the stock kernel if you find that the ROM is behaving oddly.
Click to expand...
Click to collapse
The fastboot command worked fine so I flashed the stock firmware and the stock kernel, flashed the OTA.zip, rebooted and I am again stuck in a bootloop :/
Might be the OS X recompression. I will try again with different options.
Most likely the solution should be to get stock recovery, perform a "clear storage" command and then resume flashing. Problem is I am not aware of an alternative to the RUU method for that.
mortek said:
The fastboot command worked fine so I flashed the stock firmware and the stock kernel, flashed the OTA.zip, rebooted and I am again stuck in a bootloop :/
Might be the OS X recompression. I will try again with different options.
Most likely the solution should be to get stock recovery, perform a "clear storage" command and then resume flashing. Problem is I am not aware of an alternative to the RUU method for that.
Click to expand...
Click to collapse
Hmmm that's strange.
I had read somewhere that formatting SD card with Stock Recovery corrects some problems while using SD.
Stock Recovery is present inside firmware.zip by the name of recovery.img. might want to flash it and clear storage. Stock recovery can be flashed using the same method as custom recovery. Refer to Steps 17,18 to flash it.
khan.orak said:
Hmmm that's strange.
I had read somewhere that formatting SD card with Stock Recovery corrects some problems while using SD.
Stock Recovery is present inside firmware.zip by the name of recovery.img. might want to flash it and clear storage. Stock recovery can be flashed using the same method as custom recovery. Refer to Steps 17,18 to flash it.
Click to expand...
Click to collapse
I flashed the stock recovery but I am still having bootloops with the stock ROM
Although, I flashed Viper rom and after several reboots it finally booted!
The truth is that I am not sure the sdcard won't get corrupt the next time my phone reboots, but its better than having a bricked phone.
I'll keep on digging on the sdcard corruption by reboot issue.
Thanks again.
mortek said:
I flashed the stock recovery but I am still having bootloops with the stock ROM
Although, I flashed Viper rom and after several reboots it finally booted!
The truth is that I am not sure the sdcard won't get corrupt the next time my phone reboots, but its better than having a bricked phone.
I'll keep on digging on the sdcard corruption by reboot issue.
Thanks again.
Click to expand...
Click to collapse
After this, the last thing on my mind is the HBOOT. You can flash original HBOOT 2.15 anew with the help of this post http://forum.xda-developers.com/showpost.php?p=39216236&postcount=274
But if the bootloops persist even after trying all of this, maybe the car charger has done something to the battery or some other hardware part.
Best of luck!
khan.orak said:
After this, the last thing on my mind is the HBOOT. You can flash original HBOOT 2.15 anew with the help of this post http://forum.xda-developers.com/showpost.php?p=39216236&postcount=274
But if the bootloops persist even after trying all of this, maybe the car charger has done something to the battery or some other hardware part.
Best of luck!
Click to expand...
Click to collapse
I rebooted the phone in order to flash an OTA for the Viper ROM and I went into the familiar bootloop again.
So I tried flashing the original HBOOT 2.15 using the method you pointed out and I got this reply:
sending 'zip' (400 KB)...
OKAY [ 0.226s]
writing 'zip'...
(bootloader) zip header checking...
(bootloader) zip info parsing...
FAILED (remote: 99 unknown fail)
finished. total time: 1.735s
I then tried clearing storage with stock recovery but once again I am stuck with that bootloop. :s
mortek said:
I rebooted the phone in order to flash an OTA for the Viper ROM and I went into the familiar bootloop again.
So I tried flashing the original HBOOT 2.15 using the method you pointed out and I got this reply:
...........
I then tried clearing storage with stock recovery but once again I am stuck with that bootloop. :s
Click to expand...
Click to collapse
I suspect hardware failure.
Sent from my HTC One S using Tapatalk 4 Beta
Trying to get back to stock so I can send my phone in for repairs, followed all your steps, and I'm coming from TrickDroid 10. Previously, I had the Rogers/Fido 4.1.1 OTA which brought my hboot to 2.15. I downloaded this OTA , followed all your steps exactly but when I tried flashing the OTA.zip I get the following error:
E:Error in /sdcard/OTA.zip
(Status 6)
Error flashing zip '/sdcard/OTA.zip'
Updating partition details...
Then in bold, red letter it says "Failed" near the menus.
booenson said:
Trying to get back to stock so I can send my phone in for repairs, followed all your steps, and I'm coming from TrickDroid 10. Previously, I had the Rogers/Fido 4.1.1 OTA which brought my hboot to 2.15. I downloaded this OTA , followed all your steps exactly but when I tried flashing the OTA.zip I get the following error:
E:Error in /sdcard/OTA.zip
(Status 6)
Error flashing zip '/sdcard/OTA.zip'
Updating partition details...
Then in bold, red letter it says "Failed" near the menus.
Click to expand...
Click to collapse
What recovery did you use? And did you edit updater script using notepad++?
Edit: Yup, after searching, Error Status 6 appears when you edit the UPDATER-SCRIPT using wordpad/windows editor which messes all that is inside it. Use Notepad++
khan.orak said:
What recovery did you use? And did you edit updater script using notepad++?
Click to expand...
Click to collapse
TWRP 2.4.1.0. No, I used notepad, but after googling and reading the differences between notepad++ and notepad, I will have to re edit with notepad++. Will try again tomorrow when I have more time, I still need to use this phone for work and can't have it bricked lol
Tried this again, flash went through and then flashed the boot.img included with the OTA zip, and my phones stuck at the "htc one" loading screen
Edit: relocked, flashed the stock recovery, thought it was still stuck at the loading screen so I unlocked it then went to install TWRP again to restore my nandroid, and it decided to finally boot. I guess I just needed to give it more time, currently back on 4.1.1, time to send this thing in under warranty so I can get my 3G/HSPA+ fixed. Thanks!
Just wondering, am I able to use an ota from another carrier to update my firmware and hboot as long as it fits my Cid? I believe my Cid is the global 001
Sent from my One S using xda app-developers app
asdfasdfvful said:
Just wondering, am I able to use an ota from another carrier to update my firmware and hboot as long as it fits my Cid? I believe my Cid is the global 001
Sent from my One S using xda app-developers app
Click to expand...
Click to collapse
I think yes. You can check if you CID is supported. It is inside the OTA.zip\firmware.zip, a file named android-info.txt and the supported CIDs will be there.
Edit: You should first check your CID. Download CID GETTER from Play Store. Shows CID in red on top.

Marshmallow Rom that will update all??

I'm currently on Verizon Version :5.0.1 Software :4.17.605.5. Is there a Marshmallow Rom that I can flash that will update firmware and give me the security/stagefrieght patches that verizon put out months ago? I'm rooted and S-off.
beeper10 said:
I'm currently on Verizon Version :5.0.1 Software :4.17.605.5. Is there a Marshmallow Rom that I can flash that will update firmware and give me the security/stagefrieght patches that verizon put out months ago? I'm rooted and S-off.
Click to expand...
Click to collapse
You can run MM ROMs, yes. There is one from Santod040 that is based off HTC Sense, and one by enewman17 that is based off GPe (Google Play edition)
There is no MM firmware however, until HTC releases it to us.
You can flash the latest 4.17.605.9 LP firmware, and run those above said MM ROMs
Where would I find and how would I flash the firmware..... Through twrp?
beeper10 said:
Where would I find and how would I flash the firmware..... Through twrp?
Click to expand...
Click to collapse
Verizon m8 Development forum: LINK
Latest Verizon firmware and instructions: LINK
Marshmallow Google Play Edition for Vzw m8: LINK
Marshmallow Sense 7 for Vzw m8: LINK
I tried updating the firmware with installing the above zip and it fails.
I've tried to flash the all in one update a bunch of times and it continuously fails.
beeper10 said:
I've tried to flash the all in one update a bunch of times and it continuously fails.
Click to expand...
Click to collapse
Need more info then "it fails".
Exact error or issue you encounter.
Pasting the terminal input and output here would be most useful.
Hard to instruct you any further from what little info you gave.
I'm doing it from the phone and there's no way I can copy and paste the results..... I tried to take a screen shot but that wouldn't work either. It doesn't give a reason it just goes to install and fails. Not sure how to give more info?
Here's a couple pictures of the issue.
beeper10 said:
Here's a couple pictures of the issue.
Click to expand...
Click to collapse
You don't flash it in recovery...
It fails because you aren't following the instructions given...
Copied from Santods thread:
http://forum.xda-developers.com/showpost.php?p=62734094&postcount=2
Place the zip in your fastboot/adb directory on your computer.
Put the device in fastboot mode
(Volume down and power until menu appears, select fastboot using power button)
Connect the device to the computer
Enter the following commands from terminal/command prompt in the fastboot directory, one at a time:
fastboot oem rebootRUU (this puts the device in RUU mode)
fastboot flash zip firmware.zip (rename file to firmware.zip to make it simple/optional)
It will say that the update did not finish, to flush again, so repeat the above step:
fastboot flash zip firmware.zip
Important: the flash process halts at around 75% to 90% on phone screen! This is normal and a safety precaution!
The last few percent is the reboot, which is NOT happening automatically, so you get a chance to check the console output before reboot to make sure it is safe to reboot!
The bar will only fill up to 100% once you type the following command:
fastboot reboot-bootloader (this reboots the device to bootloader)
I left my computer at work... Is there anyway to do it from the phone?
beeper10 said:
I left my computer at work... Is there anyway to do it from the phone?
Click to expand...
Click to collapse
Yes... By using an sdcard...
Rename file to 0P6BIMG.zip and Copy 0P6BIMG.zip to root of a physical SD. No exfat! No internal storage!
Reboot phone to bootloader and follow prompts once furmware is detected by phone.
That I have! That's were I was trying to flash it from.
beeper10 said:
That I have! That's were I was trying to flash it from.
Click to expand...
Click to collapse
Again.... You do NOT flash in recovery.
And I'll post again...
Please follow the instructions.
Rename file to 0P6BIMG.zip and Copy 0P6BIMG.zip to root of a physical SD. No exfat! No internal storage!
Reboot phone to bootloader and follow prompts once firmware is detected by phone.

[N_7.0][NPJ25.93-14][TWRP][Boot]TWRP Backup of Stock Boot Partition

DISCLAIMER: I AM NOT LIABLE TO ANY DAMAGE THAT HAPPENS TO YOUR DEVICE BECAUSE OF DOING ANYTHING WRONG.
MOTO G4 PLUS [XT1643]
This is for those who had flashed a custom kernel on their stock ROM and now want to revert to stock.
REQUIREMENTS:
1. TWRP 3.0.3-n2 by @Shreps .
https://forum.xda-developers.com/mo...covery-twrp-3-0-2-r3-moto-g4-g4-plus-t3494337
This one is more updated/maintained than the official 3.0.2 version.
2. 7Zip Compression Utility:
Download and install on your PC. I use this as it gives the maximum ultra level compression. See Downloads below.
PROCEDURE:
1. Download and extract the TWRP.7z using 7Zip.
2. Place the TWRP folder it in the root directory of your INTERNAL STORAGE.
2. Just reboot TWRP once and choose Restore and then choose this: athene_93-14_boot
3. Swipe to restore.
NOTE: As a general recommendation for all zip installations and backup/restore using twrp, Wipe Cache and ART Cache before you Reboot to System.
4. You're DONE
DOWNLOADS:
Google Drive Link for the file:
https://drive.google.com/open?id=0B25DpDahxm52MDlBRlVqNElkaUE
7-ZIP Download Link:
http://www.7-zip.org/download.html
IF YOU WANT ENTIRE STOCK ROM ( TWRP BACKUP) VISIT THIS THREAD BY @Greekgodmerwyn .
https://forum.xda-developers.com/moto-g4-plus/how-to/android-7-0-moto-g4-plus-npj25-93-14-t3544601
HIT LIKE IF I HELPED YOU! :fingers-crossed: :good:
Hey I need the file bit it is in bin so give a alternative link
Can i install this to xt1644 retus?
Dont know bro I just want the 1643 one
dedik46 said:
Can i install this to xt1644 retus?
Click to expand...
Click to collapse
Not tried. Make additional backups and try. :good:
https://drive.google.com/open?id=0B25DpDahxm52MDlBRlVqNElkaUE
Not Found
Error 404
Please re-upload.
nextheart said:
https://drive.google.com/open?id=0B25DpDahxm52MDlBRlVqNElkaUE
Not Found
Error 404
Please re-upload.
Click to expand...
Click to collapse
Oh wait. Try this, @nextheart
https://www.androidfilehost.com/?fid=745425885120722570
@tywinlannister7 Thanks for quick reply.
As far as I can understand, this file should be flashed (restored) after restoring my TWRP back up of nougat stock rom taken in January-2017. Currently I am on RR-MM.
Shall I able to take OTA then?
nextheart said:
@tywinlannister7 Thanks for quick reply.
As far as I can understand, this file should be flashed (restored) after restoring my TWRP back up of nougat stock rom taken in January-2017. Currently I am on RR-MM.
Shall I able to take OTA then?
Click to expand...
Click to collapse
For OTA updates to work, you'd need a stock recovery on your device too; TWRP is a no go. Once you've restored your TWRP backup of your Nougat stock ROM (which hopefully may have the stock boot still), you can flash the stock recovery linked here https://forum.xda-developers.com/moto-g4-plus/how-to/how-to-ota-rooting-nougat-npj-25-93-14-t3601747
I imagine the easiest option is to flash the recovery in fastboot (same as you did with TWRP) using 'fastboot flash recovery recovery.img', then rebooting into recovery.
I think, though I've not tried it with a stock recovery, that you should be able to flash the recovery image in TWRP:
tap Install in the TWRP menu
Select 'install image's
Find your stock recovery image and select
Choose recovery as the image type
Flash and reboot to recovery.
Then, provided your system has a stock kernel, no modifications to your system and a stock recovery (bootloader doesn't matter), you should be able to update via OTA.
@echo92 Thanks for detailed guide.
I had flashed SuperSU on Nougat stock ROM, so stock boot might be affected. Am I right?
In short, I want to sell the device, so I want to return to stock.
nextheart said:
@echo92 Thanks for detailed guide.
I had flashed SuperSU on Nougat stock ROM, so stock boot might be affected. Am I right?
In short, I want to sell the device, so I want to return to stock.
Click to expand...
Click to collapse
You could have directly flashed the latest March 1 Security firmware via fastboot and lock your bootloader too.
tywinlannister7 said:
You could have directly flashed the latest March 1 Security firmware via fastboot and lock your bootloader too.
Click to expand...
Click to collapse
Thank you for pointing out.
Will I lose my IMEI or WIFI MAK or any thing else by fastboot method? Because I have read that some users are losing such things by fastboot method.
nextheart said:
Thank you for pointing out.
Will I lose my IMEI or WIFI MAK or any thing else by fastboot method? Because I have read that some users are losing such things by fastboot method.
Click to expand...
Click to collapse
Shouldn't create any such issues. Anyways, you can make an entire backup of the fsg and other partitions in twrp.
Yes, your data will be wiped though.

[ROOT][TRIAL][MAGISK] P20 Pro - Try out on Rooting Method

Hi Guys,
Note : By doing this, you know that you're gonna do a modification to your phone, and im not in any way, responsible for what happen after. Escape Route for if something wrong happen is provided, but YOU DO THIS ON YOUR OWN RISK
since this phone is fairly new, at this moment a clear rooting method haven't established yet. This is what this thread for.
Based on information gathered from P20 Lite Forum (the rooting guide for that device even already up - here), it seems the old trick of rooting (from Mate 10 Pro) using Patched Boot Method is working fine. And Magisk is working
Basically this method need few pre-requisites :
1. Unlocked Bootloader (by getting the code here ) - and if you not sure how to do it, go here for the guide
2. Stock Boot (or RAMDISK to be precise for this phone) - I managed to extract it from 8.1.0.106 ROM version for CLT-L29 (download here)
3. Magisk Manager 5.5.4 (from Magisk Thread) to patch the .img above, or
4. Patched RAMDISK image (i patched it) from here
5. and of course computer with ADB & Fastboot installed (make sure you have latest SDK to prevent something not working)
Now, to Root it, all you need to do is,
1. Boot into bootloader
2. Type
Code:
fastboot flash ramdisk patched_boot.img
(patched_boot.img is the file you download from prerequisites number 4, placed it in the same directory with your adb & fastboot - i assume you know that already)
3. Reboot
4. You now should have root access, download Magisk Manager to manage modules and superuser
(you might need to flash this module if you failed to pass safetynet)
In case something go wrong, flash back the stock RAMDISK from pre-requistes number 2 above using same method as what u did to flash the patched one.
That way worked. Thanks.
Edit:
Just as a hint. To get magisk work as it should..
After boot into the system and installed Magisk Manager, install Magisk from there again, so you dont get any /data/magisk problems.
SafteyNet passed then.
Fingers crossed twrp is possible soon
Works on CLT-L09
I have a German single Sim from Vodafone tested the root yesterday and works very well
Would this method work on CLT-L09 model? Thanks
danifilth4king said:
Would this method work on CLT-L09 model? Thanks
Click to expand...
Click to collapse
The post before you just confirmed yourbquestion, LoL
Yes it does
This is awesome, thanks for sharing! I thought I could live without root but after only half a day, I've decided I can't!
Before I do this, I was wondering where you managed to get the stock rom (quote below)?
otonieru said:
2. Stock Boot (or RAMDISK to be precise for this phone) - I managed to extract it from 8.1.0.106 ROM version for CLT-L29 (download here)
Click to expand...
Click to collapse
fl4r3 said:
This is awesome, thanks for sharing! I thought I could live without root but after only half a day, I've decided I can't!
Before I do this, I was wondering where you managed to get the stock rom (quote below)?
Click to expand...
Click to collapse
It's from www.allrom.ir (its in persian) and there's another site, rusian one if am not mistaken, but i forget the exact address
Great, thanks for that! I managed to find it on allrom.ir
Hey guys, I need some help please! I unlocked bootloader through Huawei website which went fine and then when I flashed the patched boot.img through fastboot and tried to reboot my phone has told me there was a critical error while booting. It won't boot to system and just loops a few times and then boots to Huawei eRecovery. This is my first Huawei device and I'm clueless as to how to recover
Any ideas would be much appreciated! Thanks
**EDIT*** false alarm! I managed to boot to fastboot and restore the ramdisk from the first post
danifilth4king said:
Hey guys, I need some help please! I unlocked bootloader through Huawei website which went fine and then when I flashed the patched boot.img through fastboot and tried to reboot my phone has told me there was a critical error while booting. It won't boot to system and just loops a few times and then boots to Huawei eRecovery. This is my first Huawei device and I'm clueless as to how to recover
Any ideas would be much appreciated! Thanks
**EDIT*** false alarm! I managed to boot to fastboot and restore the ramdisk from the first post
Click to expand...
Click to collapse
What is your phone model ? CLT-L29 or L09 ? And what is your ROM version ?
otonieru said:
What is your phone model ? CLT-L29 or L09 ? And what is your ROM version ?
Click to expand...
Click to collapse
It's CLT-L09, build number 8.1.0.103(C782)
It's and EE UK handset. Any ideas why it wouldn't have worked? Thanks
danifilth4king said:
It's CLT-L09, build number 8.1.0.103(C782)
It's and EE UK handset. Any ideas why it wouldn't have worked? Thanks
Click to expand...
Click to collapse
The ramdisk.img was taken from .106 ROM, so its actually newer than what installed on your phone. That might become issue,
But, do you managed to revive the phone using the stock ramdisk from first post ?
otonieru said:
The ramdisk.img was taken from .106 ROM, so its actually newer than what installed on your phone. That might become issue,
But, do you managed to revive the phone using the stock ramdisk from first post ?
Click to expand...
Click to collapse
Yes thank you, the stock ramdisk from the first post allowed my phone to boot normally again. Do you think if I use magisk manager app to patch the stock ramdisk it will work for me? Or is that the same as what you did to make the patched boot.img anyway?
danifilth4king said:
Yes thank you, the stock ramdisk from the first post allowed my phone to boot normally again. Do you think if I use magisk manager app to patch the stock ramdisk it will work for me? Or is that the same as what you did to make the patched boot.img anyway?
Click to expand...
Click to collapse
If you have the 103 rom, and able to extract the ramdisk yourself, you can try patch it yourself.
Have you tried to flash the patch ramdisk one more time ? In case it just a bad flash.
Because if you manage to boot using stock one. It means your system has no problem using .106 boot image and the patched one should work as well
otonieru said:
If you have the 103 rom, and able to extract the ramdisk yourself, you can try patch it yourself.
Have you tried to flash the patch ramdisk one more time ? In case it just a bad flash.
Because if you manage to boot using stock one. It means your system has no problem using .106 boot image and the patched one should work as well
Click to expand...
Click to collapse
Ok I will try again and report back. How do you boot into fastboot from device off state by the way? I had difficulty doing it earlier. Thanks again!
danifilth4king said:
Ok I will try again and report back. How do you boot into fastboot from device off state by the way? I had difficulty doing it earlier. Thanks again!
Click to expand...
Click to collapse
Its better to do it from ON state, and use adb reboot bootloader command
otonieru said:
Its better to do it from ON state, and use adb reboot bootloader command
Click to expand...
Click to collapse
I mean if the patched boot.img still doesn't work again and the device won't boot to system? I did it before when I flashed back to stock ramdisk, but I don't know how I entered fastboot exactly lol
danifilth4king said:
I mean if the patched boot.img still doesn't work again and the device won't boot to system? I did it before when I flashed back to stock ramdisk, but I don't know how I entered fastboot exactly lol
Click to expand...
Click to collapse
Put the device off and hold power button and volume down. You should come directly into the rescue mode.
danifilth4king said:
I mean if the patched boot.img still doesn't work again and the device won't boot to system? I did it before when I flashed back to stock ramdisk, but I don't know how I entered fastboot exactly lol
Click to expand...
Click to collapse
Ah, sorry, i got it wrong. Yes, its power n volume down.

[Tutorial] Magisk on GSI on devices with dynamic partition

I hope you already know how to flash GSI on devices with dyamic partition already. If not then you can follow this guide: https://forum.xda-developers.com/t/...ynamic-super-partition.4256667/#post-85271987
If youre on stock before flashing GSI then dont "fastboot delete-logical-partition product" like other tutorials may suggest. Just flash the product image (fastboot flash product [insert img here]) attached below and it will get resized automatically as well, giving you plenty of space to flash your GSI.
If youve already flashed GSI before following this guide and have done "fastboot delete-logical-partition product" then just create product partition (fastboot create-logical-partition product [size]) and flash the img on product.
whichever course youve taken you can now flash magisk through twrp or patch the boot img and flash that.
Please note that this product image wasnt made by me and the credit for it goes to: @Allexwin50
tested on infinix zero 8 X687
Thanks for the tutorial, I will give it a try but have one question: you said to" create product partition and give size " I don't understand about size!
shjeanpy said:
Thanks for the tutorial, I will give it a try but have one question: you said to" create product partition and give size " I don't understand about size!
Click to expand...
Click to collapse
when you create partition you also need to specify its size, just add some number
kusti420 said:
when you create partition you also need to specify its size, just add some number
Click to expand...
Click to collapse
What size would you advise me please
shjeanpy said:
What size would you advise me please
Click to expand...
Click to collapse
idk, i used 400000000
Thank you very much for your great tutorial. it worked for me on my device.
Thanks a lot for putting this together. I was stuck for a day and a half trying to figure out how to flash Magisk with no product partition. Great work.
nickelnine said:
Thanks a lot for putting this together. I was stuck for a day and a half trying to figure out how to flash Magisk with no product partition. Great work.
Click to expand...
Click to collapse
and i was stuck for multiple months...
@kusti420 if I've flashed a GSI on to stock (apart from flashing vbmeta and TWRP) can I fastboot flash that product.img and then successfully TWRP flash magisk or patch with app (using Phh SU temporarily for root) ? is that enough ?
EDIT 1: thought I'd just see for myself, flashed the product_gsi.img and my phone (S20FE 5G) still booted. tried flashing magisk 21.4 zip from TWRP and got a bootloop. will check later if I can patch my boot.img and post.
Hey, where did you take this product_gsi.img? I think it does not work with Android 12, I wonder if it can be updated or something like that.
felipecassiors said:
Hey, where did you take this product_gsi.img? I think it does not work with Android 12, I wonder if it can be updated or something like that.
Click to expand...
Click to collapse
it was sent to me in telegram, where i also traced it back to @Allexwin50, afaik he made it. worked fine on android 10 and 11. asking him for img for a12 could be an option
Sir, When I Flashed any GSI rom A11 , any way to remove the standard superuser root from rom ? if some solution , please advise me , (my device use fastboot commands not use twrp)
gamal001 said:
Sir, When I Flashed any GSI rom A11 , any way to remove the standard superuser root from rom ? if some solution , please advise me , (my device use fastboot commands not use twrp)
Click to expand...
Click to collapse
idk wtf u mean by "standard superuser root" prolly phh su, if yes then there is definetly a way to get rid of that
Right, so what to do after installing the GSI like this. How to install Magisk? I don't have TWRP. Do I have to "securize" first? Help.
K1569GHENT said:
Right, so what to do after installing the GSI like this. How to install Magisk? I don't have TWRP. Do I have to "securize" first? Help.
Click to expand...
Click to collapse
maybe, cant remember by heart, dont have enough time to test it out myself
Working on Nippon Android Tiramisu SGSI on Pixel 3a, very nice
K1569GHENT said:
Right, so what to do after installing the GSI like this. How to install Magisk? I don't have TWRP. Do I have to "securize" first? Help.
Click to expand...
Click to collapse
Obtain a stock copy of your boot.img.
Patch it through the magisk app before you do your whole thing installing your chosen gsi.
Once you have the patched image, you can fastboot it using fastboot flash boot boot.img in cmd onto your gsi ROM.
Make sure to install the boot.img to both slots A and B. Then go back to your active slot.
ninjasinabag said:
Obtain a stock copy of your boot.img.
Patch it through the magisk app before you do your whole thing installing your chosen gsi.
Once you have the patched image, you can fastboot it using fastboot flash boot boot.img in cmd onto your gsi ROM.
Make sure to install the boot.img to both slots A and B. Then go back to your active slot.
Click to expand...
Click to collapse
he talked about removing phh-superuser
kusti420 said:
he talked about removing phh-superuser
Click to expand...
Click to collapse
It's locked to your boot image, so using 100% stock image removes superuser since it's no longer system as root.
kusti420 said:
I hope you already know how to flash GSI on devices with dyamic partition already. If not then you can follow this guide: https://forum.xda-developers.com/t/...ynamic-super-partition.4256667/#post-85271987
If youre on stock before flashing GSI then dont "fastboot delete-logical-partition product" like other tutorials may suggest. Just flash the product image (fastboot flash product [insert img here]) attached below and it will get resized automatically as well, giving you plenty of space to flash your GSI.
If youve already flashed GSI before following this guide and have done "fastboot delete-logical-partition product" then just create product partition (fastboot create-logical-partition product [size]) and flash the img on product.
whichever course youve taken you can now flash magisk through twrp or patch the boot img and flash that.
Please note that this product image wasnt made by me and the credit for it goes to: @Allexwin50
Click to expand...
Click to collapse
Hello kusti420
I had already deleted the product partition when I found your post.
The GSI was not cool.
I reflash the product partition and reflash the GSI, now it's good.
Thanks for the file and the tip.

Categories

Resources