TWRP issue with stock moto fimrware :/ - Moto G5 Questions & Answers

Hi so I was using resurrection remix but after finding my stock phone software NPP25.137-15 online I erased everything and flashed through fastboot it went perfectly and I re-locked my bootloader
but I decided to unlock my bootloader again so I could use magisk on stock firmware
my bootloader unlocked and phone still booted but my problem is with twrp
I powered off my phone
held power and volume down
connected my phone to pc while in bootloader
typed fastboot devices
typed fastboot flash recovery twrp.img
pressed power button on phone to reboot phone ( I didn't boot into recovery )
my Moto G5 XT1675 halts at phone can't be trusted ( bootloader is unlocked screen )
any idea why I can't flash twrp?

Because you haven't disabled dm verity on your device, you can't boot stock firmware with twrp while verity is still enabled, flash this: https://androidfilehost.com/?fid=673368273298927206
If it still doesn't boot, flash stock firmware again via fastboot, then flash twrp and boot DIRECTLY into twrp after it is finished installing, then trying flashing no-verity-opt-encrypt again.

Exanneon said:
Because you haven't disabled dm verity on your device, you can't boot stock firmware with twrp while verity is still enabled, flash this: https://androidfilehost.com/?fid=673368273298927206
If it still doesn't boot, flash stock firmware again via fastboot, then flash twrp and boot DIRECTLY into twrp after it is finished installing, then trying flashing no-verity-opt-encrypt again.
Click to expand...
Click to collapse
What exactly does this file do?
Also I flashed magisk which I knew modifies the boot image and the device booted perfectly with TWRP using the magisk modified boot image if that's anything interesting?
Pretty much I was working on a way to install stock firmware through twrp a few weeks ago so people would not have to use fastboot ( I know how to convert a phone backup to a flashable zip )
The flashable zip worked fine but it only booted using a modified boot file, could this be because it needs DM verity disabled?

Although twrp can restore the system image and what is on the internal storage, it will never be a fully functioning substitute for restoring stock firmware via fastboot, twrp can not run scripts that fastboot can, such as 'fastboot oem lock', I also believe that although it can restore bootloader.img and oem.img via a flashable zip, it would most likely cause the device to brick, so simply put; do not try to use twrp for what it's not meant for, twrp is a recovery for flashing zips, restoring only the system image and storage, flashing recoveries and reformatting partitions (which can be risky), just use fastboot for restoring stock firmware.
And yes, your device will boot with magisk installed as it serves the same purpose as no verity opt 5.1 and later versions, though it is usually recommended to disable dm verity before flashing magisk to stay on the safe side.
The flashable zip you installed on your device only booted with a modified boot file as it is not fully stock firmware, twrp is only capable of flashing some elements of stock firmware, this is why you can boot with dm verity still active after restoring with fastboot, again do not use twrp for restoring stock, use fastboot.

Exanneon said:
Although twrp can restore the system image and what is on the internal storage, it will never be a fully functioning substitute for restoring stock firmware via fastboot, twrp can not run scripts that fastboot can, such as 'fastboot oem lock', I also believe that although it can restore bootloader.img and oem.img via a flashable zip, it would most likely cause the device to brick, so simply put; do not try to use twrp for what it's not meant for, twrp is a recovery for flashing zips, restoring only the system image and storage, flashing recoveries and reformatting partitions (which can be risky), just use fastboot for restoring stock firmware.
And yes, your device will boot with magisk installed as it serves the same purpose as no verity opt 5.1 and later versions, though it is usually recommended to disable dm verity before flashing magisk to stay on the safe side.
The flashable zip you installed on your device only booted with a modified boot file as it is not fully stock firmware, twrp is only capable of flashing some elements of stock firmware, this is why you can boot with dm verity still active after restoring with fastboot, again do not use twrp for restoring stock, use fastboot.
Click to expand...
Click to collapse
it's not meant to be a substitute, and I know only fastboot can do OEM lock, flash partition files, modem files,etc, I've been testing my TWRP version for a while, the oem.img partition is not needed in the TWRP versionas the majority of custom roms for Moto G5 don't touch the oem partition and the oem.img file hasn't changed between the stock updates, the TWRP version is for people who want stock firmware but still want to keep twrp, flash magisk, etc, also because TWRP is a portable method and much faster flashing the system back than through fastboot flashing the system back, my twrp version is only meant to restore the system partition and a dm-verity disabled boot.img I wouldn't even think of flashing a bootloader through anything other than fastboot, I've tested a lot and have not bumped into any problems using TWRP that has caused me to use a computer, actually there has been no problems + I'm also testing on 3 other moto G5's all 3 which are also XT1675 models and same there no problems

Then your query has been resolved.

Exanneon said:
Then your query has been resolved.
Click to expand...
Click to collapse
yes, how do I go about closing this discussion well if you know how to?

Rename it to [closed], that's what many do.

Related

Flashing OTA failed. I need help to restore my phone.

Hi,
My phone is rooted and the DPI was customized. I tried to manually flash the OTA but the installation got stuck so I cannot boot into Android anymore. I tried those restore tutorials but when I try to flash using fastboot I get a "FAILED (remote: Permission denied). I tried to clear the cache in the recovery and then it got also stuck and now I can't access recovery.
This is what I can read in the bootloader
---------------------------
FASTBOOT MODE
PRODUCT_NAME - Z00A
VARIANT - ASUS_Z00A
HW_VERSION -
BOOTLOADER VERSION - unknown
IFWI - 0094.0177
SERIAL NUMBER - Xxxxx....
SIGNING - ?
SECURE_BOOT - ?
continue fastboot process
-----------------------------
I just been successful in installing TWRP recovery using the toolkit.
Edit: I installed the latest CM 13 build and it can't boot to Android. It goes straight to TWRP recovery no matter how I turn on the phone. My bootloader still looks the same.
Edit: I tried flashing a prerooted .img and stock recovery and I can go back to recovery but I still can't boot into Android or factory reset or nothing.... I'm desperate!
manlord said:
I just been successful in installing TWRP recovery using the toolkit.
Edit: I installed the latest CM 13 build and it can't boot to Android. It goes straight to TWRP recovery no matter how I turn on the phone. My bootloader still looks the same.
Edit: I tried flashing a prerooted .img and stock recovery and I can go back to recovery but I still can't boot into Android or factory reset or nothing.... I'm desperate!
Click to expand...
Click to collapse
You may need to flash boot.img and droidboot.img for the same version of rom you flashed, ie. if you flashed 139 then you must flash the recovery, boot and droidboot images for 139...
As you found the pre-root rom files, download the whole file and flash these image files too making sure you use the right commands or you will brick your phone...
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash fastboot droidboot.img
fastboot flash system system.img
Just remember, flashing these partitions can, potentially, brick your phone. You do this at your own risk...
Happy flashing....
ultramag69 said:
You may need to flash boot.img and droidboot.img for the same version of rom you flashed, ie. if you flashed 139 then you must flash the recovery, boot and droidboot images for 139...
As you found the pre-root rom files, download the whole file and flash these image files too making sure you use the right commands or you will brick your phone...
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash fastboot droidboot.img
fastboot flash system system.img
Just remember, flashing these partitions can, potentially, brick your phone. You do this at your own risk...
Happy flashing....
Click to expand...
Click to collapse
Thanks for your help. I did that earlier with the latest pre-rooted OTA and now it gets stuck on the splashscreen. I tried going to recovery (stock now) and doing a factory reset after flashing system.img and it still the splashscreen after I reboot. I know the 1st boot after flahing a ROM can be long, but now it's been an hour and I'm still on the splash screen...
The only other thing I can recommend is to flash a RAW rom image. As I have never needed to do this I can't say how this works but if you do a search you should find out the procedure...
This may relock your bootloader so just be aware....

Stock recovery automatically replace

Goodmorning, I've a strange problem with flashing recovery.
I used lastest fastboot
I've flashed the recovery (fastboot flash...) Then booted into it directly (fastboot boot recovery...) And obviously problems with mounting data.
The real problem is that when I reboot system , twrp is automatically erased and stock recovery is mounted.
I've tried everything, new recovery,new fastboot...
Please help me
That's standard with a lot of OEM ROMS on many different phones. You can flash magisk or SuperSU to preserve your flashed twrp.
sbeaber4 said:
That's standard with a lot of OEM ROMS on many different phones. You can flash magisk or SuperSU to preserve your flashed twrp.
Click to expand...
Click to collapse
That won't work, the no-verity-opt zip is needed to preserve twrp or it will always revert back to the stock one.
Go here
https://forum.xda-developers.com/mi-mix-2/how-to/guide-mi-mix-2-unroot-restore-recovery-t3770690
And DL the TWRP & no-verity-opt-encrypt 1.6
follow the directions starting with
Open a command prompt and verify your device appears in fastboot
Then run
Code:
fastboot flash recovery C:\Twrp__chinese_Android8.img
Click to expand...
Click to collapse
Pitrino said:
Goodmorning, I've a strange problem with flashing recovery.
I used lastest fastboot
I've flashed the recovery (fastboot flash...) Then booted into it directly (fastboot boot recovery...) And obviously problems with mounting data.
The real problem is that when I reboot system , twrp is automatically erased and stock recovery is mounted.
I've tried everything, new recovery,new fastboot...
Please help me
Click to expand...
Click to collapse
- flash latest twrp https://twrp.me/xiaomi/xiaomimimix2.html
- reboot to recovery with hardware keys (volume-up + power) immediately after flashing
That solved the problem for me.

Might have ****ed up the Recovery partition, any solution to restore it?

So I've held off software updates and decided to upgrade to OOS 9, but I didn't realise that there were treble compatiability flags. I then tried to install a newer version of codeworkx's TWRP with the compatiability check disabled but then had a kernel panic. Since then, flashing the original recovery I had (codeworx TWRP universal) and even the stock OnePlus recovery failed to work. I also tried
Code:
fastboot erase recovery
hoping that it would wipe the partition to allow me to reset the recovery, but still does not work.
To make it clear, I can boot into the OS fine, and fastboot works perfectly fine as well. It's just that the recovery partition that's ****ed and seems to not load at all.
Is there any way that this could be fixed?
rysx said:
So I've held off software updates and decided to upgrade to OOS 9, but I didn't realise that...
Is there any way that this could be fixed?
Click to expand...
Click to collapse
Hi, have you tried to flash the recovery within fastboot mode?
fastboot flash recovery 'recovery.img'

Unable to encrypt after root

Hi everyone.
I had a issue and i really want help
I had unlock the OEM,and after installing the twrp and format data (to remove the forced encrypt), i had flash the Disable_Dm-Verity_ForceEncrypt zip file.
Okay, after that i have restarted the device and configure as my away to use, after that, booted on recovery again and flashed the magisk.
But i wanna encrypt my device, and when i go to configs->security and encrypt area, says that my device its not encrypted. Okay, i followed the steps and when i gonna try to encrypt the device, the process start and... some seconds after, the phone just restart and nothing has done.
The onlys changes that i have made on system is: root and flashed a splash.img(without that stupid warning of unlocked bootloader)
I really want to encrypt my device, so, if i get stolen, the thief wont get my user data.
Can anyone help me?
Flash the stock rom and and don't flash the encryption disabler next time. You don't need to install TWRP to flash Magisk either, you can just boot it and then flash Magisk. Also you don't even need TWRP, you can just follow the guide in the forum to install Magisk by booting the magisk patched boot.img for your version of the stock ROM and then install Magisk manually via Magisk Manager.
TL;DR : Flash stock ROM and do the same things except flashing dm-verity-disabler, you don't need that for Magisk or TWRP.
marstonpear said:
Flash the stock rom and and don't flash the encryption disabler next time. You don't need to install TWRP to flash Magisk either, you can just boot it and then flash Magisk. Also you don't even need TWRP, you can just follow the guide in the forum to install Magisk by booting the magisk patched boot.img for your version of the stock ROM and then install Magisk manually via Magisk Manager.
TL;DR : Flash stock ROM and do the same things except flashing dm-verity-disabler, you don't need that for Magisk or TWRP.
Click to expand...
Click to collapse
Thanks sir, i will try!
marstonpear said:
Flash the stock rom and and don't flash the encryption disabler next time. You don't need to install TWRP to flash Magisk either, you can just boot it and then flash Magisk. Also you don't even need TWRP, you can just follow the guide in the forum to install Magisk by booting the magisk patched boot.img for your version of the stock ROM and then install Magisk manually via Magisk Manager.
TL;DR : Flash stock ROM and do the same things except flashing dm-verity-disabler, you don't need that for Magisk or TWRP.
Click to expand...
Click to collapse
Sir, i really need twrp now, its there any way i can enable encrypt after rooting the device? (to sure that, if gets stolen, the data need to be wipped out or the password must be given on twrp)
Same issue, i tried to encrypt on security menu,reboot and nothing was done.
@edit
Better, without TWRP, i can flash other zips via magisk/stock recovery?
mrkeitsuke said:
Sir, i really need twrp now, its there any way i can enable encrypt after rooting the device? (to sure that, if gets stolen, the data need to be wipped out or the password must be given on twrp)
Same issue, i tried to encrypt on security menu,reboot and nothing was done.
@edit
Better, without TWRP, i can flash other zips via magisk/stock recovery?
Click to expand...
Click to collapse
I'm not sure what you're trying to do here, do you want to have TWRP + stock encryption?
If so you can just boot TWRP and flash the TWRP installer package (.zip) inside TWRP to do that. And you don't need to change anything, currently I have TWRP installed and encryption enabled on my Stock ROM.
But if you're trying to get TWRP's own encryption, sadly that doesn't work.
You can also use TWRP without flashing/installing it, just go to the directory TWRP is stored in, open a command line, connect your phone and boot it with this command :
Code:
fastboot boot twrp.img
then flash whatever you'd like.
DO NOT lock your bootloader after you flash something on TWRP, this will most probably brick the device.
marstonpear said:
I'm not sure what you're trying to do here, do you want to have TWRP + stock encryption?
If so you can just boot TWRP and flash the TWRP installer package (.zip) inside TWRP to do that. And you don't need to change anything, currently I have TWRP installed and encryption enabled on my Stock ROM.
But if you're trying to get TWRP's own encryption, sadly that doesn't work.
You can also use TWRP without flashing/installing it, just go to the directory TWRP is stored in, open a command line, connect your phone and boot it with this command :
Code:
fastboot boot twrp.img
then flash whatever you'd like.
DO NOT lock your bootloader after you flash something on TWRP, this will most probably brick the device.
Click to expand...
Click to collapse
I want to stick with the stock rom rooted, with the twrp installed and the user data encrypted
So i can flash things through TWRP even i have encrypt enabled?
@edit
dont worry about bootloader, i will keep unlocked
It's perfectly fine to have TWRP and/or Magisk and encryption using stock ROM.
Flash stock ROM (erase user data)
Install TWRP
install Magisk
Don't flash the encryption Disabler. As its name implies, it disables the automatic encryption of the userdata partition.
a1291762 said:
It's perfectly fine to have TWRP and/or Magisk and encryption using stock ROM.
Flash stock ROM (erase user data)
Install TWRP
install Magisk
Don't flash the encryption Disabler. As its name implies, it disables the automatic encryption of the userdata partition.
Click to expand...
Click to collapse
:highfive: i had done this and... i think its working!!! :crying::crying::crying:
(crying for emotion, almost thirty factory resets to get an good result :crying::crying::crying
Anyway, if anything bad occurs, i will update here, thanks a1291762 and marstonpear

OP7T ROM Installing Partition Error

After trying to install a custom ROM (PixelExperience for OnePlus 7T [hotdogb]) via fastboot, the installation flashing ended with errors with "no such partition" for odm, product and system I tried everything to get out of the fastboot screen loop. After finding a bat file with IMG files which got me on the Android 11 Beta 1. build (still no WiFi)
What can I do to fix the partition error to get on the Pixel Experience ROM or even get back to the stable build - I did try MSM but it isn't listing the phone even after pressing ENUM.
Please help...
Context (can skip): The latest stable build OOS for my 7T had issues with the microphone not working and so I decided to do a factory reset which resulted in having a clean install but now, WiFi doesn't connect for some reason. After trying some fixes I decided to install a custom ROM.
U need to flash stock recovery (fastboot flash recovery recovery.img) as twrp prevents fastbootD entry. Then type fastboot reboot fastboot to enter fastbootD. Then flash your rom. Personally, I just flash roms via Chinese twrp or 3.5.10 twrp
HueyT said:
U need to flash stock recovery (fastboot flash recovery recovery.img) as twrp prevents fastbootD entry. Then type fastboot reboot fastboot to enter fastbootD. Then flash your rom. Personally, I just flash roms via Chinese twrp or 3.5.10 twrp
Click to expand...
Click to collapse
that was my process for the first try - entered fastbootD for the flashing process which ended with the mentioned partition error and the fastboot loop. I realised that TWRP version I got from TOOL ALL IN ONE wasn't going to work as it couldn't access data no matter what.
No twrp can decrypt oos or a11 custom roms data. Chinese twrp can access data only on a10 custom roms if u remove screen lock before booting into twrp for backup
What do you reckon I try this time then?
itssata said:
What do you reckon I try this time then?
Click to expand...
Click to collapse
[OP7T][OOS 11.0.5.1 HD65AA/BA] Unbrick tool to restore your device to OxygenOS
Disclaimer: By attempting any of the processes listed in this thread you accept full responsibility for your actions. I will not be held responsible if your device stops working, catches fire, or turns into a hipster and claims to have been...
forum.xda-developers.com

Categories

Resources