[Q] I'm about to do this... - Huawei MediaPad M2

So before everything was messed up, i managed to get a backup, but ONLY for DATA.
Here's my build number status:
Before: V100R001C209B006 (taken from the data backup name)
Current: V100R001C00B000 (just checked using fastboot)
And I'm about to flash this boot.img and recovery.img using TWRP from: V100R001C209B007CUSTC209D003 firmware.
It has a same model as mine, M2 801L.
I'm doing these because:
-I have no OS due to accidental wipe
-Fastboot not working (even if my bootloader is UNLOCKED)
-Can't get a system backup from TWRP
This is what I'm about to do:
1. flash boot.img and stock recovery.img using TWRP
2. assuming I got stock recovery back
3. I will do vol+,vol-,power and force update the UPDATE.APP
4. Now I got everything back to normal
The questions are:
-How do I know if I need to flash the boot.img (because I can boot into TWRP and bootloader)
-Should I proceed with this process? (look at the build numbers)

Related

[Q] HTC M8 Developer edition

Hi
I own a HTC M8 Developer edition with TWRP recovery.
Pretty new to thisforum, so any guidance/help would be much appreciated.
I am getting OTA updates on mobile, but when i try to install it; it takes me to TWRP screen and update doesnt get installed.
Currently, i am running on android 4.4.2 And i badly want to update my Android
Please guide me, how to install the update and any future updates(steps to follow)
Thanks
prashanal said:
Hi
I own a HTC M8 Developer edition with TWRP recovery.
Pretty new to thisforum, so any guidance/help would be much appreciated.
I am getting OTA updates on mobile, but when i try to install it; it takes me to TWRP screen and update doesnt get installed.
Currently, i am running on android 4.4.2 And i badly want to update my Android
Please guide me, how to install the update and any future updates(steps to follow)
Thanks
Click to expand...
Click to collapse
All Your Ques/Ans Goes Here : HTC One M8 Help Forums
prashanal said:
Hi
I own a HTC M8 Developer edition with TWRP recovery.
Pretty new to thisforum, so any guidance/help would be much appreciated.
I am getting OTA updates on mobile, but when i try to install it; it takes me to TWRP screen and update doesnt get installed.
Currently, i am running on android 4.4.2 And i badly want to update my Android
Please guide me, how to install the update and any future updates(steps to follow)
Thanks
Click to expand...
Click to collapse
it depends on how much you have done to the phone while it's rooted
the system / and recovery must be completely stock for the OTA to work
if your s-off it's easy to flash an older RUU to restore your phone to stock
I have all the Developer Edition files needed here >> https://www.androidfilehost.com/?w=files&flid=21320
the steps if your s-on are
fastboot flash recovery recovery.img (use the one that matches your current firmware version)
then attempt to install the OTA
if the OTA fails just use the RUU for the latest version
for s-on you have to fastboot oem lock the bootloader to flash the RUU
fastboot oem rebootRUU
fastboot flash zip RUU.zip
fastboot flash zip RUU.zip
fastboot reboot
Hi
Thanks man, had some errors and mistakenly deleted the OS on TWRP...
now im stuck without a OS.
So just posted another thread...help me if you can
Connect your phone in fastboot, the post the output of fastboot getvar all (but remove your IMEI and serial number) and we can go from there
EddyOS said:
Connect your phone in fastboot, the post the output of fastboot getvar all (but remove your IMEI and serial number) and we can go from there
Click to expand...
Click to collapse
im currently in office, as soon as i hit home!! i will post the necessary stuff man...
thanks
Prashan
found the details... eddyOS please have a look and guide me..
OK, for a start you do not have the Developer Edition. you first need to get back to stock which will more likely involve restoring this backup using TWRP 2.8.1.0 https://mega.co.nz/#!sYQFjSYK!Q6BZ4FxxQj7raBSxQFHBGRPYBFO69PwrjQxMo1bJaoA
You'll then need the stock recovery for 1.60.708.2 (that's the backup build) and then get the OTAs to get to Lollipop
@ckpv5 might be better to ask as he is the backup king but he is busy
clsA said:
it depends on how much you have done to the phone while it's rooted
the system / and recovery must be completely stock for the OTA to work
if your s-off it's easy to flash an older RUU to restore your phone to stock
I have all the Developer Edition files needed here >> https://www.androidfilehost.com/?w=files&flid=21320
the steps if your s-on are
fastboot flash recovery recovery.img (use the one that matches your current firmware version)
then attempt to install the OTA
if the OTA fails just use the RUU for the latest version
for s-on you have to fastboot oem lock the bootloader to flash the RUU
fastboot oem rebootRUU
fastboot flash zip RUU.zip
fastboot flash zip RUU.zip
fastboot reboot
Click to expand...
Click to collapse
Do this. Your firmware version is a few versions old and this will update it for you. You should probably learn how to return to stock (RUU) and use fastboot/adb if you are going to start flashing things, because things like this happen.
Sent from my HTC M8
Keithn said:
Do this. Your firmware version is a few versions old and this will update it for you. You should probably learn how to return to stock (RUU) and use fastboot/adb if you are going to start flashing things, because things like this happen.
Sent from my HTC M8
Click to expand...
Click to collapse
It won't work as the OP doesn't have the DE
EddyOS said:
It won't work as the OP doesn't have the DE
Click to expand...
Click to collapse
thanks for the reply... please can you tell me steps to follow after i download the zip.
i have very limited idea on installing the stuff
would appreciate your, help on steps to follow.
Prashan
1. Install TWRP 2.8.1.0 - http://techerrata.com/browse/twrp2/m8
command fastboot flash recovery openrecovery-twrp-2.8.1.0-m8.img
2. Download TWRP backup 1.60.708.2 from the link that EddyOS gave you
3. Download stock 1.60.708.2 recovery - http://sourceforge.net/projects/htconem8/files/Recovery/recovery_1.60.708.2.img/download
4. Extract the downloaded M8_CID_HTC__622_1.60.708.2.7z on PC
5. Boot to TWRP recovery and make a backup of boot only, this is to see where the backup goes on your device.
6. Reboot, connect device to PC then open Internal Storage, TWRP/BACKUPS/SerialNo./
7. Transfer the extracted [M8_CID_HTC__622_1.60.708.2 folder (the last folder) and its content to the backup path on your device
TWRP/BACKUPS/SerialNo./BackupFolderHere
8. Reboot to TWRP, wipe your device - in TWRP go to wipe - advance - select dalvik cache, cache, data, system (only these)
9. Restore the transferred backup - make sure all boot, data & system are ticked - swipe to restore
10. In reboot menu select bootloader
11. fastboot flash stock recovery that you downloaded - command fastboot flash recovery recovery_1.60.708.2.img
12. reboot - check for OTA, download, install
13. repeat step 12 until the last OTA 4.18.708.12
14. done
If you want to flash TWRP again, use the latest TWRP 2.8.5.0 after last OTA 4.18.708.12
ckpv5 said:
1. Install TWRP 2.8.1.0 - http://techerrata.com/browse/twrp2/m8
command fastboot flash recovery openrecovery-twrp-2.8.1.0-m8.img
2. Download TWRP backup 1.60.708.2 from the link that EddyOS gave you
3. Download stock 1.60.708.2 recovery - http://sourceforge.net/projects/htconem8/files/Recovery/recovery_1.60.708.2.img/download
4. Extract the downloaded M8_CID_HTC__622_1.60.708.2.7z on PC
5. Boot to TWRP recovery and make a backup of boot only, this is to see where the backup goes on your device.
6. Reboot, connect device to PC then open Internal Storage, TWRP/BACKUPS/SerialNo./
7. Transfer the extracted [M8_CID_HTC__622_1.60.708.2 folder (the last folder) and its content to the backup path on your device
TWRP/BACKUPS/SerialNo./BackupFolderHere
8. Reboot to TWRP, wipe your device - in TWRP go to wipe - advance - select dalvik cache, cache, data, system (only these)
9. Restore the transferred backup - make sure all boot, data & system are ticked - swipe to restore
10. In reboot menu select bootloader
11. fastboot flash stock recovery that you downloaded - command fastboot flash recovery recovery_1.60.708.2.img
12. reboot - check for OTA, download, install
13. repeat step 12 until the last OTA 4.18.708.12
14. done
If you want to flash TWRP again, use the latest TWRP 2.8.5.0 after last OTA 4.18.708.12
Click to expand...
Click to collapse
step 5: when i try this, it shows as back up fail(E im unable to see device on the PC to transfer the downloaded file!! any help?
EddyOS said:
It won't work as the OP doesn't have the DE
Click to expand...
Click to collapse
Ah okay. Thought it was because of how it was listed. There might still be an RUU for whichever model that is.
Sent from my HTC M8
Thank you
prashanal said:
step 5: when i try this, it shows as back up fail(E im unable to see device on the PC to transfer the downloaded file!! any help?
Click to expand...
Click to collapse
@EddyOS @ckpv5 you guys are great!! you guys just restored faith in online forums......advise and file from eddy and steps from ckpv5 just worked like a charm...
Thank you guys......thanks isnt enough for this help......
Prashan
:victory: :victory: :victory: :victory:

[How-to]: OTA updates with (Magisk) rooted devices

Hi,
I present here my last guide for OTA upgrades with rooted devices, in this case with Magisk.
Previous similar work:
http://forum.xda-developers.com/g5-plus/how-to/guide-simple-ota-update-rooted-unlocked-t3610895
http://forum.xda-developers.com/moto-g4/how-to/guide-simple-ota-update-rooted-unlocked-t3510126
This guide is tested by me for an upgrade from NPNS25.137-33-5 to NPNS25.137-33-11 using the incremental OTA (the official upgrade you get in the smartphone). Please, note that this guide is for advanced users!
Starting point:
- STOCK ROM with an untouched SYSTEM partition.
- Flashed custom TWRP as recovery.
- Flashed custom kernel with disabled Data encryption enforcement.
- MagiskSU installed, and any other changes that you like (i.e. Xposed) but all Systemless.
- USB Debug mode enabled in Developer Options and access granted from your PC.
- One SD card with almost 16GB of size.
Warning: If you use PIN or any other lock procedure, I recommend to disable it before backups and enable after restore!
PROCEDURE:
Step 1:
Backup your SD-Internal (to PC or SD-CARD). This is required because the TWRP backup doesn't backup this data.
Step 2:
Reboot to TWRP, Make backup of "Data", "Logo" & "Boot" (you will restore them after the upgrade).
Step 3:
Reboot to Bootloader and flash ORIGINAL partitions "Recovery", "Logo" & "Boot" using a PC:
Code:
# fastboot flash logo logo.bin
# fastboot flash boot boot.img
# fastboot flash recovery recovery.img
Or if you have a TWRP backup of these patitions, then you could restore them from TWRP (instead of using a PC).
Note: If you have modified SYSTEM and/or OEM partitions, then also flash them (or restore them from a TWRP backup):
Code:
# fastboot flash system system.img
# fastboot flash oem oem.img
Step 4:
Reboot.
Note: from this point your "Data" partition is now fully encrypted, so not execute any relevant command as you will lose any update when restore the "Data" after the OTA update. At this point you have the smartphone in "pure" Stock mode.
Step 5:
Go to check "System Updates", download the update & install the OTA (the device reboots).
Step 6:
After rebooting the OTA file is executed. If it ends with an "ERROR" message, then something is erroneous (check your partitions!).
If the device reboots without an error check your new firmware. The upgrade is completed!
Step 7:
From this point you would like to restore your previous state: data, root, Magisk, etc.
If you like to save a TWRP backup of current partitions (for the next OTA upgrade) then do this:
- Reboot to bootloader mode and boot a non-flashable TWRP (like then Multi-ROM version: "fastboot boot mr-twrp-3.1.1-potter-20170521.img") and complete a backup of the new "Recovery", "Boot", "Logo", "System" & "Oem" partitions to the SDCard.
NOTE: The Multi-ROM TWRP can't backup/mount the OEM partition! Use another method or complete the backup after (you can backup SYSTEM and OEM after).
ALTERNATIVE: Open Terminal and do a manual dump of "Recovery", "Boot", "Logo" and/or "System", "OEM":
Code:
# dd if=/dev/block/bootdevice/by-name/recovery of=/external_sd/recovery.img
# dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/boot.img
# dd if=/dev/block/bootdevice/by-name/logo of=/external_sd/logo.img
Code:
# dd if=/dev/block/bootdevice/by-name/system of=/external_sd/system.img
# dd if=/dev/block/bootdevice/by-name/oem of=/external_sd/oem.img
Step 8:
a) Restore or Flash a recent version of TWRP: "fastboot flash recovery twrp-3.1.1-4-GtrCraft.img" (this version has support for backup/restore OEM!)
b) Reboot to the TWRP recovery and inside it...
c) I recommend first to make now a backup of SYSTEM and OEM paritions (for the next OTA).
d) Format your "Data" partion with "f2fs".
e) Restore your "Data" (and "Logo" & "Cache") from the backup at step #2.
f) Install the ZIP of your custom kernel (or as alternative apply "disable dm-verity").
g) Install the ZIP of Magisk for root.
Step 9:
Re-boot an enjoy your upgraded system!
Remeber to restore your Internal SD card data (from the step #1).
Enable your preferable security option.
:victory:
Nice guide!
One question: How do we flash original items (e.g. OEM, system, boot) if we are on a version with no official firmware? For example, I'm on NPN25.137-83. As far as I know, there is no full firmware for that version; it's only offered as an OTA. If I'm offered an OTA, how can I restore an unmodified system, boot, recovery, etc?
Jrhotrod said:
Nice guide!
One question: How do we flash original items (e.g. OEM, system, boot) if we are on a version with no official firmware? For example, I'm on NPN25.137-83. As far as I know, there is no full firmware for that version; it's only offered as an OTA. If I'm offered an OTA, how can I restore an unmodified system, boot, recovery, etc?
Click to expand...
Click to collapse
If you lost your original SYSTEM, OEM and BOOT partitions, then you need to flash from another place.
For example, you can use download from this post
http://forum.xda-developers.com/g5-plus/how-to/firmwares-moto-g5-plus-t3593160
In any case, I recommend to:
- Use OTAs for upgrading, as it's safe for update your modem and other device stuff (IMEI, etc.) in sync.
- If you like to go from Custom ROM to Stock ROM then restore the last Stock version in your device and apply OTAs from this point.
Regards!
Hi,
More than a week with this GUIDE and only one user puts feedback?
Which TWRP?
manos78 said:
Hi,
More than a week with this GUIDE and only one user puts feedback?
Click to expand...
Click to collapse
This is because we are all still stunned by this cool guide!
However, before I give it a try: in Step 7, why does it have to be
"fastboot boot mr-twrp-3.1.1-potter-20170521.img"?
Can't I use
"fastboot boot twrp-3.1.1-4-GtrCraft.img" here, already? What is it, the craft TWRP cannot do? At least I am able to boot it that way.
Thanks in advance,
Nick.
G5 Plus Mate said:
This is because we are all still stunned by this cool guide!
However, before I give it a try: in Step 7, why does it have to be
"fastboot boot mr-twrp-3.1.1-potter-20170521.img"?
Can't I use
"fastboot boot twrp-3.1.1-4-GtrCraft.img" here, already? What is it, the craft TWRP cannot do? At least I am able to boot it that way.
Thanks in advance,
Nick.
Click to expand...
Click to collapse
Yes, the Fastboot boot command will work for any TWRP image for this phone.
Jrhotrod said:
Yes, the Fastboot boot command will work for any TWRP image for this phone.
Click to expand...
Click to collapse
Cool, so as it seems, we now only need two tools for rooting, unrooting and OTA updates. The Craft TWRP and Magisk v14.0 (or higher). Well, or SuperSU. Booth seem to remove "force encryption" and the "dm-verify-test".
So, we also do not need any further custom kernel or anything else anymore(?)
Well, my XT1687 (which will replace my XT1685, I need a compass!) is supposed to arrive tomorrow. :fingers-crossed:
I'll give it all a try and some comments, too...
G5 Plus Mate said:
Cool, so as it seems, we now only need two tools for rooting, unrooting and OTA updates. The Craft TWRP and Magisk v14.0 (or higher). Well, or SuperSU. Booth seem to remove "force encryption" and the "dm-verify-test".
So, we also do not need any further custom kernel or anything else anymore(?)
Well, my XT1687 (which will replace my XT1685, I need a compass!) is supposed to arrive tomorrow. :fingers-crossed:
I'll give it all a try and some comments, too...
Click to expand...
Click to collapse
Most people with this phone use custom kernels in order to be able to use magisk modules. The stock kernel does not allow for neither passing safetynet nor installing modules. If you would like to use something like systemless Xposed Framework, I'd recommend flashing ElementalX.
Jrhotrod said:
Yes, the Fastboot boot command will work for any TWRP image for this phone.
Click to expand...
Click to collapse
OK, thank you for confirm it!
G5 Plus Mate said:
Cool, so as it seems, we now only need two tools for rooting, unrooting and OTA updates. The Craft TWRP and Magisk v14.0 (or higher). Well, or SuperSU. Booth seem to remove "force encryption" and the "dm-verify-test".
So, we also do not need any further custom kernel or anything else anymore(?)
Click to expand...
Click to collapse
Hi,
If you save a full dump of the SYSTEM partition, then you can use "dm-verity" disable. However, I don't recomment it. Use MagiskSU with a custom kernel (like ElementalX). A custom kernel que provide: Magisk loop mount, non forced encryption, and SafetyNet pass with Magisk running.
Summarizing, you need: custom kernel, Magisk and TWRP.
Slightly modified
Hi.
first of all, thanks again, Manos 78, for the wonderful guide. Playing around with it for several days, I have come up with a slightly modified solution that might be easier to handle. However, it's based on your guide.
So, this guide is for people who (like me) want
- a rooted Moto G5 Plus (might work on other phones, too)
- an unencrypted data partition (e.g. to be able to backup it)
- a relatively easy way to do a system upgrade.
Also, this guide goes for categories of people who start from here with a phone
Cat-1
- with an unencrypted data partition (rooted)
Cat-2
- which is a blank new phone
Cat-3
- with an encrypted data partition
Instead of Magisk, you can probably use SuperSU as well. Also, it doesn't matter if you flash or load TWRP with fastboot. I would recommend flashing it like described below. I have tested it once with XT1687 only, and then with transferring images from my XT1685. Both worked.
So, first you should find yourself a stock-rom suitable for your phone. As for now (let's hope that this won't change) you need to download it once and then use it again for all upcoming future updates as we do the OTA-update.
I used for
XT1687 : POTTER_NPNS25.137-35-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC
XT1685: POTTER_NPN25.137-35_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC
After transferring from XT1685 to XT1687, the Dual-SIM handling app froze automatically and I am now on software channel reteu. However, as we update as described below, it doesn't matter.
Let's start with
Cat-1:
01. Disable PIN or any other lock procedure and TWRP-Backup of all partitions (precaution, but you will definitely need data, boot and logo!). Also backup all data of your internal SD-card as it will be wiped. External SD-card will stay untouched.
02. Flash latest elementalX Kernel (optional) and Magisk (14.0 or later) to be on the same version before and after the update (precaution).
Either
03a. Flash any valid old(er) Stock-Rom, fitting to the update channel of your phone. If one works, use it again each time you update.
03b. Perform OTA update (after reboot wait for the message saying it's done!)
or
04. Download and install latest Stock-Rom and install
05. Flash TWRP "twrp-3.1.1-4-GtrCraft.img"
06. Flash latest elementalX Kernel(optional, but recommended) and then MAGISK (14.0 or later)
07. Reboot to TWRP
08. Format data
09. Reboot to TWRP
10. Restore data, boot und logo
11. Reboot
12. In Developer Options disable automatic update
13. Install / upgrade Magisk Manager app
14. Flash logo.bin (optional to get rid of the ugly initial warning screen)
done.
Cat-2
Perform steps 03a/b, 5,6,7,8,9,12,13,14. Boot-loader needs to be unlocked, of course.
Cat-3
As you cannot backup an unencrypted partition (for now) you will have to backup your data conventionally. Titanium Backup and app's own functionalities might help. However, this needs to be done only once as you will be unencrypted afterwards.
After this, re-flash Stock-Rom and proceed like for Cat-2.
Note:
Once again: this is a system-less variant, so it doesn't touch the system partition. If you want to keep it that way, then in TWRP never swipe to allow modifications! Choose system partition read only.
The following might need to be confirmed, but I believe, that if you do it once, the device will recognize it and when you go into boot loader the device will from now on display the system to be modified. I haven't found a way to get rid of that again.
If you leave it untouched, then this message will not come up and after locking the boot loader again you will have a device like new again. I think you will not get into any warranty trouble once something is broken.
Maybe some one can comment on this to be right or wrong…
And, just in case you have similar problems:
On windows I was not able to unlock my boot-loader.. I got the message that the boot-loader cannot be unlocked. On Mint Linux it just worked fine. Also flashing logo.bin did not work on windows but on Linux.
On Linux again flashing the stock-rom does not work, but on windows. I am not sure if I want a comment on that.
Stuck in Your device will boot in 5 seconds screen
Hi,
At step 3, I didnt have the original partitions. So I used the partitions from the firmware POTTER_AMZ_7.0_NPNS25.137-35-5_cid18_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip.
After rebooting it, my phone is stuck in the screen. At one point it showed error.
What should I do??
Help
Why data partition format to f2fs
Is it important to format data partition to f2fs? Can I just wipe data partition and restore from the backup without formatting?
manos78 said:
Hi,
I present here my last guide for OTA upgrades with rooted devices, in this case with Magisk.
Previous similar work:
http://forum.xda-developers.com/g5-plus/how-to/guide-simple-ota-update-rooted-unlocked-t3610895
http://forum.xda-developers.com/moto-g4/how-to/guide-simple-ota-update-rooted-unlocked-t3510126
This guide is tested by me for an upgrade from NPNS25.137-33-5 to NPNS25.137-33-11 using the incremental OTA (the official upgrade you get in the smartphone). Please, note that this guide is for advanced users!
Starting point:
- STOCK ROM with an untouched SYSTEM partition.
- Flashed custom TWRP as recovery.
- Flashed custom kernel with disabled Data encryption enforcement.
- MagiskSU installed, and any other changes that you like (i.e. Xposed) but all Systemless.
- USB Debug mode enabled in Developer Options and access granted from your PC.
- One SD card with almost 16GB of size.
Warning: If you use PIN or any other lock procedure, I recommend to disable it before backups and enable after restore!
PROCEDURE:
Step 1:
Backup your SD-Internal (to PC or SD-CARD). This is required because the TWRP backup doesn't backup this data.
Step 2:
Reboot to TWRP, Make backup of "Data", "Logo" & "Boot" (you will restore them after the upgrade).
Step 3:
Reboot to Bootloader and flash ORIGINAL partitions "Recovery", "Logo" & "Boot" using a PC:
Code:
# fastboot flash logo logo.bin
# fastboot flash boot boot.img
# fastboot flash recovery recovery.img
Or if you have a TWRP backup of these patitions, then you could restore them from TWRP (instead of using a PC).
Note: If you have modified SYSTEM and/or OEM partitions, then also flash them (or restore them from a TWRP backup):
Code:
# fastboot flash system system.img
# fastboot flash oem oem.img
Step 4:
Reboot.
Note: from this point your "Data" partition is now fully encrypted, so not execute any relevant command as you will lose any update when restore the "Data" after the OTA update. At this point you have the smartphone in "pure" Stock mode.
Step 5:
Go to check "System Updates", download the update & install the OTA (the device reboots).
Step 6:
After rebooting the OTA file is executed. If it ends with an "ERROR" message, then something is erroneous (check your partitions!).
If the device reboots without an error check your new firmware. The upgrade is completed!
Step 7:
From this point you would like to restore your previous state: data, root, Magisk, etc.
If you like to save a TWRP backup of current partitions (for the next OTA upgrade) then do this:
- Reboot to bootloader mode and boot a non-flashable TWRP (like then Multi-ROM version: "fastboot boot mr-twrp-3.1.1-potter-20170521.img") and complete a backup of the new "Recovery", "Boot", "Logo", "System" & "Oem" partitions to the SDCard.
NOTE: The Multi-ROM TWRP can't backup/mount the OEM partition! Use another method or complete the backup after (you can backup SYSTEM and OEM after).
ALTERNATIVE: Open Terminal and do a manual dump of "Recovery", "Boot", "Logo" and/or "System", "OEM":
Code:
# dd if=/dev/block/bootdevice/by-name/recovery of=/external_sd/recovery.img
# dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/boot.img
# dd if=/dev/block/bootdevice/by-name/logo of=/external_sd/logo.img
Code:
# dd if=/dev/block/bootdevice/by-name/system of=/external_sd/system.img
# dd if=/dev/block/bootdevice/by-name/oem of=/external_sd/oem.img
Step 8:
a) Restore or Flash a recent version of TWRP: "fastboot flash recovery twrp-3.1.1-4-GtrCraft.img" (this version has support for backup/restore OEM!)
b) Reboot to the TWRP recovery and inside it...
c) I recommend first to make now a backup of SYSTEM and OEM paritions (for the next OTA).
d) Format your "Data" partion with "f2fs".
e) Restore your "Data" (and "Logo" & "Cache") from the backup at step #2.
f) Install the ZIP of your custom kernel (or as alternative apply "disable dm-verity").
g) Install the ZIP of Magisk for root.
Step 9:
Re-boot an enjoy your upgraded system!
Remeber to restore your Internal SD card data (from the step #1).
Enable your preferable security option.
:victory:
Click to expand...
Click to collapse
androidgeek121 said:
Is it important to format data partition to f2fs? Can I just wipe data partition and restore from the backup without formatting?
Click to expand...
Click to collapse
Hi,
- The "f2fs" is the default format in Stock ROM. If you don't select it in TWRP it will be formated as "ext4".
- The "f2fs" filesystem it's better than "ext4" for the internal eMMC storage (faster writes and more robust).
- If you format as "ext4" it will continue working. So, if you restore without forcing the format perhaps you don't care that the filesystem it's changed.
Regards!
Are OTA updates possible 1. without TWRP and 2. with preserved encryption?
I have a Samsung Galaxy S7 edge, international version, Android 6, unlocked bootloader, first rooted with CF-auto-root, now installed Magisk via modified boot.img, pure stock rom.
Forgive me for sounding dense but this method could work on a Moto G4 Plus (athene) correct? ?
G5 Plus Mate said:
Hi.
first of all, thanks again, Manos 78, for the wonderful guide. Playing around with it for several days, I have come up with a slightly modified solution that might be easier to handle. However, it's based on your guide.
So, this guide is for people who (like me) want
- a rooted Moto G5 Plus (might work on other phones, too)
- an unencrypted data partition (e.g. to be able to backup it)
- a relatively easy way to do a system upgrade.
Also, this guide goes for categories of people who start from here with a phone
Cat-1
- with an unencrypted data partition (rooted)
Cat-2
- which is a blank new phone
Cat-3
- with an encrypted data partition
Instead of Magisk, you can probably use SuperSU as well. Also, it doesn't matter if you flash or load TWRP with fastboot. I would recommend flashing it like described below. I have tested it once with XT1687 only, and then with transferring images from my XT1685. Both worked.
So, first you should find yourself a stock-rom suitable for your phone. As for now (let's hope that this won't change) you need to download it once and then use it again for all upcoming future updates as we do the OTA-update.
I used for
XT1687 : POTTER_NPNS25.137-35-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC
XT1685: POTTER_NPN25.137-35_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC
After transferring from XT1685 to XT1687, the Dual-SIM handling app froze automatically and I am now on software channel reteu. However, as we update as described below, it doesn't matter.
Let's start with
Cat-1:
01. Disable PIN or any other lock procedure and TWRP-Backup of all partitions (precaution, but you will definitely need data, boot and logo!). Also backup all data of your internal SD-card as it will be wiped. External SD-card will stay untouched.
02. Flash latest elementalX Kernel (optional) and Magisk (14.0 or later) to be on the same version before and after the update (precaution).
Either
03a. Flash any valid old(er) Stock-Rom, fitting to the update channel of your phone. If one works, use it again each time you update.
03b. Perform OTA update (after reboot wait for the message saying it's done!)
or
04. Download and install latest Stock-Rom and install
05. Flash TWRP "twrp-3.1.1-4-GtrCraft.img"
06. Flash latest elementalX Kernel(optional, but recommended) and then MAGISK (14.0 or later)
07. Reboot to TWRP
08. Format data
09. Reboot to TWRP
10. Restore data, boot und logo
11. Reboot
12. In Developer Options disable automatic update
13. Install / upgrade Magisk Manager app
14. Flash logo.bin (optional to get rid of the ugly initial warning screen)
done.
Cat-2
Perform steps 03a/b, 5,6,7,8,9,12,13,14. Boot-loader needs to be unlocked, of course.
Cat-3
As you cannot backup an unencrypted partition (for now) you will have to backup your data conventionally. Titanium Backup and app's own functionalities might help. However, this needs to be done only once as you will be unencrypted afterwards.
After this, re-flash Stock-Rom and proceed like for Cat-2.
Note:
Once again: this is a system-less variant, so it doesn't touch the system partition. If you want to keep it that way, then in TWRP never swipe to allow modifications! Choose system partition read only.
The following might need to be confirmed, but I believe, that if you do it once, the device will recognize it and when you go into boot loader the device will from now on display the system to be modified. I haven't found a way to get rid of that again.
If you leave it untouched, then this message will not come up and after locking the boot loader again you will have a device like new again. I think you will not get into any warranty trouble once something is broken.
Maybe some one can comment on this to be right or wrong…
And, just in case you have similar problems:
On windows I was not able to unlock my boot-loader.. I got the message that the boot-loader cannot be unlocked. On Mint Linux it just worked fine. Also flashing logo.bin did not work on windows but on Linux.
On Linux again flashing the stock-rom does not work, but on windows. I am not sure if I want a comment on that.
Click to expand...
Click to collapse
Many thanks for this method. I used Cat -1 today and ran into a little problem with repeated com.android.phone has stopped working errors after just flashing the partitions listed here. So I just did a complete Stock reflash and that resolved that error. Then was able to proceed with the rest of the steps without any issues!
I am on RETUS and applied the November 1st update. Surprised on how well it worked!
manos78 said:
Hi,
I present here my last guide for OTA upgrades with rooted devices, in this case with Magisk.
Previous similar work:
http://forum.xda-developers.com/g5-plus/how-to/guide-simple-ota-update-rooted-unlocked-t3610895
http://forum.xda-developers.com/moto-g4/how-to/guide-simple-ota-update-rooted-unlocked-t3510126
This guide is tested by me for an upgrade from NPNS25.137-33-5 to NPNS25.137-33-11 using the incremental OTA (the official upgrade you get in the smartphone). Please, note that this guide is for advanced users!
Starting point:
- STOCK ROM with an untouched SYSTEM partition.
- Flashed custom TWRP as recovery.
- Flashed custom kernel with disabled Data encryption enforcement.
- MagiskSU installed, and any other changes that you like (i.e. Xposed) but all Systemless.
- USB Debug mode enabled in Developer Options and access granted from your PC.
- One SD card with almost 16GB of size.
Warning: If you use PIN or any other lock procedure, I recommend to disable it before backups and enable after restore!
PROCEDURE:
Step 1:
Backup your SD-Internal (to PC or SD-CARD). This is required because the TWRP backup doesn't backup this data.
Step 2:
Reboot to TWRP, Make backup of "Data", "Logo" & "Boot" (you will restore them after the upgrade).
Step 3:
Reboot to Bootloader and flash ORIGINAL partitions "Recovery", "Logo" & "Boot" using a PC:
Code:
# fastboot flash logo logo.bin
# fastboot flash boot boot.img
# fastboot flash recovery recovery.img
Or if you have a TWRP backup of these patitions, then you could restore them from TWRP (instead of using a PC).
Note: If you have modified SYSTEM and/or OEM partitions, then also flash them (or restore them from a TWRP backup):
Code:
# fastboot flash system system.img
# fastboot flash oem oem.img
Step 4:
Reboot.
Note: from this point your "Data" partition is now fully encrypted, so not execute any relevant command as you will lose any update when restore the "Data" after the OTA update. At this point you have the smartphone in "pure" Stock mode.
Step 5:
Go to check "System Updates", download the update & install the OTA (the device reboots).
Step 6:
After rebooting the OTA file is executed. If it ends with an "ERROR" message, then something is erroneous (check your partitions!).
If the device reboots without an error check your new firmware. The upgrade is completed!
Step 7:
From this point you would like to restore your previous state: data, root, Magisk, etc.
If you like to save a TWRP backup of current partitions (for the next OTA upgrade) then do this:
- Reboot to bootloader mode and boot a non-flashable TWRP (like then Multi-ROM version: "fastboot boot mr-twrp-3.1.1-potter-20170521.img") and complete a backup of the new "Recovery", "Boot", "Logo", "System" & "Oem" partitions to the SDCard.
NOTE: The Multi-ROM TWRP can't backup/mount the OEM partition! Use another method or complete the backup after (you can backup SYSTEM and OEM after).
ALTERNATIVE: Open Terminal and do a manual dump of "Recovery", "Boot", "Logo" and/or "System", "OEM":
Code:
# dd if=/dev/block/bootdevice/by-name/recovery of=/external_sd/recovery.img
# dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/boot.img
# dd if=/dev/block/bootdevice/by-name/logo of=/external_sd/logo.img
Code:
# dd if=/dev/block/bootdevice/by-name/system of=/external_sd/system.img
# dd if=/dev/block/bootdevice/by-name/oem of=/external_sd/oem.img
Step 8:
a) Restore or Flash a recent version of TWRP: "fastboot flash recovery twrp-3.1.1-4-GtrCraft.img" (this version has support for backup/restore OEM!)
b) Reboot to the TWRP recovery and inside it...
c) I recommend first to make now a backup of SYSTEM and OEM paritions (for the next OTA).
d) Format your "Data" partion with "f2fs".
e) Restore your "Data" (and "Logo" & "Cache") from the backup at step #2.
f) Install the ZIP of your custom kernel (or as alternative apply "disable dm-verity").
g) Install the ZIP of Magisk for root.
Step 9:
Re-boot an enjoy your upgraded system!
Remeber to restore your Internal SD card data (from the step #1).
Enable your preferable security option.
:victory:
Click to expand...
Click to collapse
Thank you so much you wonderful person. Successfully upgraded to NPNS25. 137-93-4 and security patch January, 1 2018 with an unlocked bootloader. I had to flash recovery, logo, boot, system.parts & oem for it succeed. I won't forget this anytime soon.
Just a little hint:
In step 8 you say
e) Restore your "Data" (and "Logo" & "Cache") from the backup at step #2.
Click to expand...
Click to collapse
It should be "Boot" instead of "Cache" as we made a backup of "Data", "Logo" & "Boot" in step 2.
manos78 said:
Hi,
I present here my last guide for OTA upgrades with rooted devices, in this case with Magisk.
Previous similar work:
http://forum.xda-developers.com/g5-plus/how-to/guide-simple-ota-update-rooted-unlocked-t3610895
http://forum.xda-developers.com/moto-g4/how-to/guide-simple-ota-update-rooted-unlocked-t3510126
This guide is tested by me for an upgrade from NPNS25.137-33-5 to NPNS25.137-33-11 using the incremental OTA (the official upgrade you get in the smartphone). Please, note that this guide is for advanced users!
Starting point:
- STOCK ROM with an untouched SYSTEM partition.
- Flashed custom TWRP as recovery.
- Flashed custom kernel with disabled Data encryption enforcement.
- MagiskSU installed, and any other changes that you like (i.e. Xposed) but all Systemless.
- USB Debug mode enabled in Developer Options and access granted from your PC.
- One SD card with almost 16GB of size.
Warning: If you use PIN or any other lock procedure, I recommend to disable it before backups and enable after restore!
PROCEDURE:
Step 1:
Backup your SD-Internal (to PC or SD-CARD). This is required because the TWRP backup doesn't backup this data.
Step 2:
Reboot to TWRP, Make backup of "Data", "Logo" & "Boot" (you will restore them after the upgrade).
Step 3:
Reboot to Bootloader and flash ORIGINAL partitions "Recovery", "Logo" & "Boot" using a PC:
Code:
# fastboot flash logo logo.bin
# fastboot flash boot boot.img
# fastboot flash recovery recovery.img
Or if you have a TWRP backup of these patitions, then you could restore them from TWRP (instead of using a PC).
Note: If you have modified SYSTEM and/or OEM partitions, then also flash them (or restore them from a TWRP backup):
Code:
# fastboot flash system system.img
# fastboot flash oem oem.img
Step 4:
Reboot.
Note: from this point your "Data" partition is now fully encrypted, so not execute any relevant command as you will lose any update when restore the "Data" after the OTA update. At this point you have the smartphone in "pure" Stock mode.
Step 5:
Go to check "System Updates", download the update & install the OTA (the device reboots).
Step 6:
After rebooting the OTA file is executed. If it ends with an "ERROR" message, then something is erroneous (check your partitions!).
If the device reboots without an error check your new firmware. The upgrade is completed!
Step 7:
From this point you would like to restore your previous state: data, root, Magisk, etc.
If you like to save a TWRP backup of current partitions (for the next OTA upgrade) then do this:
- Reboot to bootloader mode and boot a non-flashable TWRP (like then Multi-ROM version: "fastboot boot mr-twrp-3.1.1-potter-20170521.img") and complete a backup of the new "Recovery", "Boot", "Logo", "System" & "Oem" partitions to the SDCard.
NOTE: The Multi-ROM TWRP can't backup/mount the OEM partition! Use another method or complete the backup after (you can backup SYSTEM and OEM after).
ALTERNATIVE: Open Terminal and do a manual dump of "Recovery", "Boot", "Logo" and/or "System", "OEM":
Code:
# dd if=/dev/block/bootdevice/by-name/recovery of=/external_sd/recovery.img
# dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/boot.img
# dd if=/dev/block/bootdevice/by-name/logo of=/external_sd/logo.img
Code:
# dd if=/dev/block/bootdevice/by-name/system of=/external_sd/system.img
# dd if=/dev/block/bootdevice/by-name/oem of=/external_sd/oem.img
Step 8:
a) Restore or Flash a recent version of TWRP: "fastboot flash recovery twrp-3.1.1-4-GtrCraft.img" (this version has support for backup/restore OEM!)
b) Reboot to the TWRP recovery and inside it...
c) I recommend first to make now a backup of SYSTEM and OEM paritions (for the next OTA).
d) Format your "Data" partion with "f2fs".
e) Restore your "Data" (and "Logo" & "Cache") from the backup at step #2.
f) Install the ZIP of your custom kernel (or as alternative apply "disable dm-verity").
g) Install the ZIP of Magisk for root.
Step 9:
Re-boot an enjoy your upgraded system!
Remember to restore your Internal SD card data (from the step #1).
Enable your preferable security option.
:victory:
Click to expand...
Click to collapse
I am kind'a novice at this - also it's my first time installing the latest RETUS OTA update 93-10. Would someone please clarify the questions below?
I do not recall if I modified SYSTEM and/or OEM partitions when I rooted the phone, is it OK to go ahead and flash? :
Code:
# fastboot flash system system.img
# fastboot flash oem oem.img
In Step 7 - do I restore "Data", "Logo" & "Boot" with TWRP from back-up in Step 2?
Everything else from Step 8 down is optional?

Just a few questions...

Hello, I'm interested in few things about Moto G5.
1st question: Will be possible for developers to make Oreo ROMs fully functional after release of official Oreo by Motorola? I mean fixing camera, USB tethering etc.
2nd question: If I'd like to try official Oreo after its release with 4G working, is this the correct order? I'd preffer to install it as OTA update. Now, I'm running LineageOS 14.1 with 4G working fine.
- flash TWRP 64bit (currently using TWRP 32bit)
- backup EFS partition
- put phone into bootloader mode to lock bootloader (flash OEM, boot and system only - requirement to lock BL)
- boot into system
- put phone into bootloader mode to flash full Nougat stock ROM
- boot into system and install Oreo OTA update
- once again, put phone into bootloader mode to unlock bootloader
- flash TWRP 64bit
- flash no-verity-opt zip file
- restore EFS partition
- perform a factory reset
- reboot into system
Or would be better to wait for fastboot flashable ROM and use this order?
- flash TWRP 64bit (currently using TWRP 32bit)
- backup EFS partition
- put phone into bootloader mode
- flash Oreo stock ROM with fastboot comands (including erase modemst1; modemst2) and boot it up
- once again, put phone into bootloader mode
- flash TWRP 64bit
- flash no-verity-opt zip file
- restore EFS partition
- perform a factory reset
- reboot into system
I know, the best option would be waiting for TWRP install zip/backup, but... I'm such an impatient person.
3rd question: There's an performance limitation, if battery gets lower or equal to 10%. Is there any possibility of keeping full performance even with low battery?

LeTV x800 CN - no img will boot up

Hi everyone,
I try to upgrade my stock img (EUI 5.5.013S) on LeTV x800 CN to newer version.
I flashed TWRP 3.2.3 recovery img and it runs fine - I am able to boot to recovery and flash img I choose.
I tried flashing img from this thread: https://forum.xda-developers.com/le.../cm-14-1-android-7-1-unofficial-letv-t3530173 (version X800_CN_RR585CLEAN_11NOV17-02)
However after flashing I am stucked on fastboot (penguin sign).
I tried it couple times but without any luck.
So I restored backup copy of my stock img and decided to try offcial upgrade to 5.9.028S.
I downloaded the *.zip file (1523510744_X1_X800-CN-FN-BEXCNFN5902803208S-5.9.028S.zip) and opened it in file manager.
Phone rebooted into recovery (which now is TWRP) and TWRP finished flashing new img.
However after flashing I am stucked on fastboot (penguin sign) again.
I feel like I am doing something wrong - can somebody give me some advice ?
Also I do not have original stock recovery img as I did overwrite it with TWRP - could someone please share it with me?
It seems that we cannot jump directly from 13S Stock ROM (final Lollipop) to 28S Stock ROM (Marshmallow) or RR/ABM30 (Nougat). You may have to install firstly some other MM stock ROM, for example - 18S, 20S or 26S...
So, after full wipe (without Internal Storage!) in TWRP: (1) install e.g. 26S Stock ROM, (2) make full wipe (without Internal Storage!), (3) install RR/ABM30 ROM (or 28S), Open GApps and (if you want) Magisk/SuperSU, and (4) firstly Reboot in Recovery (TWRP), after that Reboot in System...
Don't forget to clean Dalvik/Cache after each zip installation! And Install ROM without Sim Card...
Thank you, I'll try that and post how it went.
Alright,
I tried LeGi0NeeR suggestion to first flash lower version of Marshmallow stock ROM and try flashing go-to img - It worked!
More specific info:
1. I used EUI 5.5.020S and updated it by clicking update in File manager.
phone did reboot and went into (before-flashed) TWRP recovery where it finished the installation.
2. phone successfully booted to OS (took couple of minutes due to first time boot and apps optimization)
3. I took EUI 5.5.028S and repeated the process.

Question Latest Twrp pros and cons

Today the unlock time for bootloader to unlock will complete and I Intend to install TWRP. I have found the latest officially supported twrp-3.6.1_11-0-alioth.img at https://eu.dl.twrp.me/alioth/. How does it compare to TWRP-3.5.1 https://forum.xda-developers.com/t/recovery-unofficial-twrp-3-5-1-20210702.4300189/.
Can anyone guide me what are the pros and cons of using twrp-3.6.1_11-0-alioth.img and its limitations as compared to TWRP-3.5.1 as I can not find any documentation on twrp-3.6.1_11-0-alioth.img. Any help will be appreciated.
Also does the following limitations of TWRP-3.5.1 also apply to twrp-3.6.1_11-0-alioth.img ?
KNOWN LIMITATIONS:
The following are some known limitations due to either the design nature of Virtual A/B or a problem with ROM themselves. Please read carefully :-
You cannot format data after flashing a ROM zip (Limitation of Virtual A/B). If you want to format, then reboot recovery after flashing ROM. Additionally, if you are encrypted, the newly flashed ROM must be able to decrypt your device. If not, then you have to format data before flashing the ROM It appears, you can actually format data after reboot even if the new ROM cannot decrypt.
You can flash only one ROM in one boot. If you wanna flash another ROM, you must boot to system once. This is again a limitation of Virtual A/B.
Once you have rebooted after flashing a ROM, you cannot write to the data partition until you boot successfully to the new ROM. Android seals the data partition after a ROM flash to prevent any accidental brick since the newly flashed ROM is actually stored in /data. Only data format is allowed in this case. Once you successfully boot to the new ROM, your storage becomes ready for writing again.
Ideally, after flashing a new ROM, you should only need to wipe your data rather than format. But, due to a problem in the device trees current ROMs are using, you will have to format data if you are currently on miui and want to switch to a custom ROM. Specifically, the roms need this commit and to set vendor security patch level to fix this issue. Switching between custom ROMs should not need format, except for hentai OS.
If you are currently on hentai OS, then before using TWRP, you must flash vendor_boot from the link provided in every hentai OS release. Otherwise, you will get black screen. This is only needed when you boot to TWRP for the first time. Do not repeat this step again. Also, do not try this with beta version of the ROM. Use it only with stable.
If you reboot to older slot after flashing new ROM, the new ROM will be cancelled and you will have to reflash again. This is because of how Virtual A/B works.
If you must flash magisk via recovery (it's not recommended now), please uncheck "Inject TWRP after install" else TWRP will remove magisk.
Do not flash magisk after flashing a ROM before reboot. Magisk's zip detects slot in a different way that will cause issues.
Backuptool (used to persist magisk and gapps across ROM updates) will also not work in recovery due to A/B. You will have to flash gapps (or any other zips) everytime after flashing a ROM.
you dont search enough...
this is latest A12 TWRP....
https://dl.akr-developers.com/?dir=skkk/TWRP
Installation:
activateUSB DEBUGGIN and OEM unlocked on Poco
(copy all files in Adb folder) rename the long TWRP file to twrp.img
Disable all security settings like PIN, pattern, fingerprint
start Poco in fastboot
fastboot boot twrp.img"
copy twrp.img to Poco or "adb push twrp.img /sdcard/"
TWRP Menü -> Advanced -> Flash Current TWRP or Install Recovery Ramdisk -> you must test it... both should work
TWRP Menü -> Reboot -> recovery
Magisk and safety net working great...
see also....
Xiaomi devices on Android 12 via Fastboot only:
- Download our ROM zip file
- Unpack downloaded zip file in the PC using WinRAR
- Reboot your device to fastboot mode (press volume down + power)
- Connect to PC via USB cable
- Run fastboot installation script from unpacked zip according your PC operating system:
--- For Windows OS - windows_fastboot_update_rom.bat
--- For Linux - linux_fastboot_update_rom.sh
--- For MacOS - macos_fastboot_update_rom.sh
greeting
hofi01 said:
you dont search enough...
this is latest A12 TWRP....
https://dl.akr-developers.com/?dir=skkk/TWRP
Installation:
activateUSB DEBUGGIN and OEM unlocked on Poco
(copy all files in Adb folder) rename the long TWRP file to twrp.img
Disable all security settings like PIN, pattern, fingerprint
start Poco in fastboot
fastboot boot twrp.img"
copy twrp.img to Poco or "adb push twrp.img /sdcard/"
TWRP Menü -> Advanced -> Flash Current TWRP or Install Recovery Ramdisk -> you must test it... both should work
TWRP Menü -> Reboot -> recovery
Magisk and safety net working great...
see also....
Xiaomi devices on Android 12 via Fastboot only:
- Download our ROM zip file
- Unpack downloaded zip file in the PC using WinRAR
- Reboot your device to fastboot mode (press volume down + power)
- Connect to PC via USB cable
- Run fastboot installation script from unpacked zip according your PC operating system:
--- For Windows OS - windows_fastboot_update_rom.bat
--- For Linux - linux_fastboot_update_rom.sh
--- For MacOS - macos_fastboot_update_rom.sh
greeting
Click to expand...
Click to collapse
I know where the lastest TWRP for Poco F3 is and how to install it as I have already installed it. That was not the question. The question was that "does limitations of TWRP-3.5.1 also apply to twrp-3.6.1_11-0'? Limitattions like being forced to reboot TWRP after flashing a every single zip file and other limitations like it as mentioned above. Thanks for your reply anyways.
so for me, TWRP does not start again, after installing a file.
I install TWRP, boot into TWRP again and install Magisk. after that I boot into the ROM.
TWRP does not restart itself
So, still no decryption on A12?
I wanted to test new custom roms but i dont want to have to reinstall everything from scratch if i go back to my current rom (.EU).
Can twrp make a full backup and restore it despite not having decryption?
If it cant, can I make a full back up of my phone from cmd in fastboot mode? (so i can just flash it from fastboot to restore everything as it is now)

Categories

Resources