TWRP Gone after a Reboot - Moto G5 Plus Questions & Answers

Whenever I flash twrp in, it's gone after a reboot and again returns to the stock recovery
I'm using fastboot method (fastboot flash recovery recovery.img) Please help me out of this prob.

Assuming that you have not flashed any other rom, and are on pure stock, then it is because dm-verity is restoring the stock recovery. That's how it works.
Were you intending to install custom roms / kernels or root your phone? If so, these will disable dm-verity, but at the expense of not being able to take OTAs and automatically upgrade stock. What is your intention with unlocking the bootloader?
Edit: Whilst you have your bootloader unlocked, you may as well back up your efs and persist partitions before doing anything else. There's a million reasons why in the forums (people losing IMEI, etc).

what is the solution of this prob cz i don't use stock rom anymore im always using custom roms & kernel. and actually i even don't knw what is dm verity

dm-verity (a.k.a verified boot) checks certain places to make sure they haven't been tampered with. So if it detects a recovery image it doesn't expect, it restores the original. That's what you're seeing.
Try flashing magisk, as it disables dm-verity. If that doesn't work and you're on custom roms and kernels then maybe ask in those threads to see if people face that issue.

Related

nandroid before unlocking. possible?

I have my phone on the way and the first thing I would like to do is backup before unlocking anything so that I can always go back to original. Possible?
just an fyi: "unlocking" means making your phone work on any carrier that uses GSM technology (in the states it means opening up a phone that was once T-Mobile-only OR ATT-only to both att or t-mobile).
"rooting" (or if you're an iphone user, "jailbreaking") means gaining permissions to the underlying filesystem of the phone that the shipped phone usually locks you out of.
and sorry, no dice. you have to flash the recovery partition to do a nandroid backup.
Sorry for that. I meant unlocking, the bootloader to be exact. I do know it is possible to boot to a custom recovery without flashing it. What I want to know is if I can do that without unlocking the bootloader, or maybe some other method?
You can boot a custom recovery image without flashing it: fastboot boot recovery.img
You cannot do this until you've unlocked the bootloader, however.
The bootloader unlock process does not modify the boot, recovery, or system partitions, so you could still back them up as they originally were.
We had hoped to have an official factory image made available (perhaps through developer.htc.com) for restoring the device to it's original state, should you install a custom build that doesn't work, or otherwise want to get back to the original build. We're till working out the details on this.

[Q] Root after unlocking bootloader, retain stock rom & bootloader

I am sorry if this is a dupe of other threads but I couldn't find a complete answer to my problem anywhere else.
I have a nexus 7 (2012), on stock 4.4.2, unlocked bootloader (i think, unlocked padlock on startup).
I want to root. I gather this will not wipe? (or will it?) and what tool should i use? I already have N7 toolkit and android sdk, so i can use that most easily, otherwise any other program needed is fine. I want to use stock bootloader and stock rom and ensure ota updates will occur. (i understand i may lose root through ota updates, but i assume i can just reroot as i have unlocked the bootloader?)
Thanks
Since your tab has already gone through the bootloader unlocking process, there is neither a need nor a requirement to wipe the device.
And since you want to stay as close to Stock as possible, you can even "root" without ever flashing a recovery: you just soft-boot a recovery image rather than flashing one. That is - "fastboot boot (...etc)" instead of "fastboot flash (...etc)". That allows you to use a custom recovery every once in a while while leaving a stock recovery on the tablet. That preserves maximum compatibility with future OTAs.*
And with that soft-booted recovery, immediately take a Nandroid backup including the Stock recovery (which is still on the tablet because you soft-booted the recovery you are using). In the same session, use "adb pull" to get a copy of your 100% pure-stock Nandroid backup off the tablet. (Make sure you name it clearly so you will know exactly what it is 12 or 24 months later)
Finally, use a flashable .zip installer package for SuperSU to "flash root".
After an OTA, you can just reinstall root by soft-booting a custom recovery and using the same (or updated) flashable .zip installer method for reinstalling SuperSU. And just like above, capture a new 100% pure-stock Nandroid backup (including the new stock recovery) *before* re-rooting.
This strategy allows you to roll back to any version of stock you please at any time in the future.
good luck
* flashaholics prefer to have a recovery hard-flashed on their device so they can flash things on a whim, wherever they are. The approach here is a bit more restrictive as you have to have a PC handy in order to soft-boot a recovery in order to do any flashing. I would say that the biggest limitation of this approach is that it tends to reduce the number of Nandroid backups of your ROM personalization.
Backup are a good thing. You can always throw them away later, but you can't create a missing one that is urgently needed.

How to fix screen freeze bug when using new ROM

Ive never seen it before. Ive installed 3 cook ROM and they all have screen freeze bug (inspite they are stable ROMs). Pls help me out of this loop. I just typed about 400 words and it freeze and I have to type this again. Im writting with angry pls help this newbie.
Im using zenfone 5 T00F
This bug cannot be fixed . Its due to booloader.lock your bootloader and get back to stock rom . Or else use custom roms that works with locked bootloader .
Thank you! But.. How to lock bootloader? With fastboot?
You can use any automated script for that . Or manually lock it by flashing the dnx and ifwi files through fastboot .
But after I relock the bootloader, can I flash new ROM? And after relock, does it affect to the ROM which im using?
You are facing screen freeze issue because of your unlocked bootloader. There is no way to fix this issue. Only solution is just revert back to stock firmware. Otherwise there is no option for that.
You can also use any ROM which required locked bootloader. But I don't guaranty you about stability and performance .
No. After relocking the bootloader you will not able to flash the custom ROMs. And also after relocking the bootloader, twrp recovery will also not work.
Custom ROMs, custom kernel, twrp recovery needs unlocked bootloader.

The phone won't boot and I can't use MiFlash

Well, it's not so bad.
Yesterday I bought this phone and applied the October update. Then I flashed TWRP by @mohancm (I wasn't sure about that but I did it anyway). And then I flashed Magisk. But because I couldn't get Xposed to work, I tried to remove Magisk (unsuccessfully it seems) and flash SuperSU. I played around by switching from slot B to A. I am not sure exactly what I did.
The end result is that the phone won't boot when I turn it on. (I think I might still have TWRP installed, but I am not sure.) I tried flashing stock boot.img via fastboot, but I get get an error (I think it's something to do with the partition table). I can't flash using MiFlash because it says I don't have the permission. (I've had bad experiences with MiFlash before.)
However, I am able to boot the phone manually. When I boot to bootloader I can just boot stock boot.img (flashing doesn't work like I said), and then the system boots properly and I'm rooted.
Any ideas what I can do now to fix the issue. I just need to try to avoid random reboots and I can use my phone just fine, but is there a way to fix it? Should I just wait for the November update? Any hope of getting a ROM that I can flash using TWRP?
Edit: I'm dumb. Of course you can flash an image via TWRP. I flashed the stock image via TWRP and now the phone boots properly. Problem solved.

Clarify ZIP kernel flashing in A/B partitions

Hi,
Why can I not successfully flash a zip kernel such as Elemental X or the Rey kernel? The .img file from the Neutrino kernel via fastboot works great. But with zips I get stuck on boot animation regardless of how long it sits. I've flashed in twrp or sideloaded in both twrp or stock recovery. In most cases I'm rooted and on custom ROM, and i especially liked B2 Android P (but no fling navigation and it didn't want to allow root for some reason?) Here's my understanding of the way it goes. As I'm just a novice, please correct my understanding of any concept or feel free to share any extra tips. I feel confident in getting from BTS to rooted custom rom and .img kernel. So my problems are probably in the way it works flashing zips in twrp. My questions are:
Say I'm on partition A running AICP rooted with Magisk and I want to install the ElementalX kernel. So I reboot to boatloader, fastboot flash boot twrp , staying on the same partition (side A) (switch sides here?).... i generally dont. Here is where the confusion comes. I know TWRP will flash a rom to the oppsite partition, so if I flash under this current scenario where i booted into TWRP on side A it will flash a ROM to side B. Additionally: Do I first need to flash the stock boot image here? It seems yes and no people include this as a step. Assuming i should, flashing an image file will stay on the same side, right?So I have flashed the stock boot image and now am installing the kernel zip. Do I flash the zip kernel to the same side (side A) it will be used on, or does it flash to the opposite side like a ROM will? Do all non-ROM zips flash in the same manner? If sideloading, does it have the same result as flashing within twrp?[/I]
To my knowledge I've never gotten past this and, "essentially" lol, have to use a kernel that is installed with fastboot, otherwise I get either bootlooped or stuck on the boot animation. I can get it booted by flashing a kernel via fastboot, but not a zip in twrp. thanks for the read. bonus question is below.
thanks
BONUS- it KILLS me not having a built in option on any ROM to reboot into the other partition to use twrp. Why is there not a mod for this? And i've seen with the Pixel phone and others they have gotten twrp to stick, but that involved using a flashable zip lol if feel ilike
KingBeefy said:
Hi,
Why can I not successfully flash a zip kernel such as Elemental X or the Rey kernel? The .img file from the Neutrino kernel via fastboot works great. But with zips I get stuck on boot animation regardless of how long it sits. I've flashed in twrp or sideloaded in both twrp or stock recovery. In most cases I'm rooted and on custom ROM, and i especially liked B2 Android P (but no fling navigation and it didn't want to allow root for some reason?) Here's my understanding of the way it goes. As I'm just a novice, please correct my understanding of any concept or feel free to share any extra tips. I feel confident in getting from BTS to rooted custom rom and .img kernel. So my problems are probably in the way it works flashing zips in twrp. My questions are:
Say I'm on partition A running AICP rooted with Magisk and I want to install the ElementalX kernel. So I reboot to boatloader, fastboot flash boot twrp , staying on the same partition (side A) (switch sides here?).... i generally dont. Here is where the confusion comes. I know TWRP will flash a rom to the oppsite partition, so if I flash under this current scenario where i booted into TWRP on side A it will flash a ROM to side B. Additionally: Do I first need to flash the stock boot image here? It seems yes and no people include this as a step. Assuming i should, flashing an image file will stay on the same side, right?So I have flashed the stock boot image and now am installing the kernel zip. Do I flash the zip kernel to the same side (side A) it will be used on, or does it flash to the opposite side like a ROM will? Do all non-ROM zips flash in the same manner? If sideloading, does it have the same result as flashing within twrp?[/I]
To my knowledge I've never gotten past this and, "essentially" lol, have to use a kernel that is installed with fastboot, otherwise I get either bootlooped or stuck on the boot animation. I can get it booted by flashing a kernel via fastboot, but not a zip in twrp. thanks for the read. bonus question is below.
thanks
BONUS- it KILLS me not having a built in option on any ROM to reboot into the other partition to use twrp. Why is there not a mod for this? And i've seen with the Pixel phone and others they have gotten twrp to stick, but that involved using a flashable zip lol if feel ilike
Click to expand...
Click to collapse
Sup guy:
A: sides won't switch, if you flash twrp on a, you will stay on A, just make sure you have disabled all locks, pins, swipes, and fingerprint s in room prior...which leads me to B
B: you must flash a stock boot.img (just ex doesn't help, due to system as root), then flash EX, then magisk, in that order, every time.
So.... Flash twrp-->get into twrp recovery-->FLASH STOCKBOOT.IMG VERY IMPORTANT-->flash custom kernel (this is obviously optional)--->magisk--->reboot
Additionally, I recall having issues getting kernels to flash if I didn't swipe all modifications in twrp. I would have the same issues as the OP when I didn't.
Milly7 said:
Additionally, I recall having issues getting kernels to flash if I didn't swipe all modifications in twrp. I would have the same issues as the OP when I didn't.
Click to expand...
Click to collapse
I promise the way above works
aer0zer0 said:
Sup guy:
A: sides won't switch, if you flash twrp on a, you will stay on A, just make sure you have disabled all locks, pins, swipes, and fingerprint s in room prior...which leads me to B
B: you must flash a stock boot.img (just ex doesn't help, due to system as root), then flash EX, then magisk, in that order, every time.
So.... Flash twrp-->get into twrp recovery-->FLASH STOCKBOOT.IMG VERY IMPORTANT-->flash custom kernel (this is obviously optional)--->magisk--->reboot
Click to expand...
Click to collapse
with roms that have built in updates, do i lose root and have to repeat this procedure every time a weekly update happens? the lack of a permanent twrp recovery is so inconvenient
envizion58 said:
with roms that have built in updates, do i lose root and have to repeat this procedure every time a weekly update happens? the lack of a permanent twrp recovery is so inconvenient
Click to expand...
Click to collapse
Like LOS and whatever, yeah, but it takes like 2 minutes. Stock won't flash, since magisk is there anyways
aer0zer0 said:
Sup guy:
A: sides won't switch, if you flash twrp on a, you will stay on A, just make sure you have disabled all locks, pins, swipes, and fingerprint s in room prior...which leads me to B
B: you must flash a stock boot.img (just ex doesn't help, due to system as root), then flash EX, then magisk, in that order, every time.
So.... Flash twrp-->get into twrp recovery-->FLASH STOCKBOOT.IMG VERY IMPORTANT-->flash custom kernel (this is obviously optional)--->magisk--->reboot
Click to expand...
Click to collapse
Thanks! the instruction you gave worked splendidly. I'm only a few months into modding and there are things that become so clear when someone tells you something that answers multiple questions. Thanks in specific for the "whatever side you boot into twrp with is the side you will flash on" . The rebooting sides in twrp doesnt function like an actual reboot.. no one has said that. so , one question down.
staying on topic with twrp, why can someone not write a script or something to reboot to the other side. I've been attempting to install it permanently to that partition like other a/b devices but the hangup for that is they all start with booting twrp using fastboot boot .file instead of flashboot flash boot command. is there an alternative way ti biit without flashing as the ph-1 bootloader doesnt recognize that command? the rest seems easy. but needing to have a computer any time something goes awry is really an inconvenience and if a patch exists I havent found it. you opened the door for this question by giving me the Thomas Edison moment in the first answer. Can't wait for a repeat cuz I'm dying to know this answer. Thanks again bud
Milly7 said:
Additionally, I recall having issues getting kernels to flash if I didn't swipe all modifications in twrp. I would have the same issues as the OP when I didn't.
Click to expand...
Click to collapse
Hopefully I'm reading this correctly, but if you are referring to swiping as opposed to sideloading I've noticed that too. i do still sideload the ROMs but I swipe all mods and kernels. commonly I would get an error regarding /system not remounting after some flashes but that stopped a while back. @topjohnwu commented in a magisk thread to mount system before flashing as a fix. Its worked great.
Thanks for the response and if i read your question wrong fire it back at me for a second attempt lol
KingBeefy said:
Thanks! the instruction you gave worked splendidly. I'm only a few months into modding and there are things that become so clear when someone tells you something that answers multiple questions. Thanks in specific for the "whatever side you boot into twrp with is the side you will flash on" . The rebooting sides in twrp doesnt function like an actual reboot.. no one has said that. so , one question down.
staying on topic with twrp, why can someone not write a script or something to reboot to the other side. I've been attempting to install it permanently to that partition like other a/b devices but the hangup for that is they all start with booting twrp using fastboot boot .file instead of flashboot flash boot command. is there an alternative way ti biit without flashing as the ph-1 bootloader doesnt recognize that command? the rest seems easy. but needing to have a computer any time something goes awry is really an inconvenience and if a patch exists I havent found it. you opened the door for this question by giving me the Thomas Edison moment in the first answer. Can't wait for a repeat cuz I'm dying to know this answer. Thanks again bud
Click to expand...
Click to collapse
with our TWRP being janky as it is, trust me, you dont want living in the other slot.

Categories

Resources