Flashing TWRP - Will it clear the data and apps? - Bootloader is already unlocked - Google Pixel XL Questions & Answers

I unlocked the bootloader on my device previously. I hadn't rooted it yet, just haven't had the time. I'm ready to do so now, and i've read that you need to boot to this modified version of TWRP and use it to flash the TWRP image to the device, in doing so it flashes it to both the A/B partition of the device. I know you are always supposed to do good backups when you are doing these types of mods, BUT is it by functionality going to clear the device when it writes TWRP to both the A/B partition? When flashing TWRP to any other device that has never been the case. I just wondered if this works differently given the dual partition setup?
Afterwards I plan on using TWRP to flash magisk beta 14.3 to my pixel xl.
Thanks in advance.

Flashing TWRP will not wipe your dsevice.

Using the unofficial modified twrp is no longer necessary. Use twrp 3.1.1.1 img and 3.1.1.1 zip.

Related

Flashing TWRP - decryption mandatory?

I come from a Nexus. So I am bit confused regarding the process of flashing TWRP on the Z2 play. On Nexus devices I could flash TWRP but did not have to decrypt anything. However in the TWRP post (dev forum) I could read:
"Force encryption is enabled by default in stock OS and twrp will successfully decrypt /data at first boot if all goes well"
Why does TWRP (have to) decrypt /data on the Z2 play?
TWRP supports encrypted phones. The early versions required you to leave the phone decrypted or you couldn't read anything in recovery. DM verity seems to go both ways too.
Thanks for your response! Yes, TWRP supports encrypted phones (I did that on my Nexus). However in the TWRP topic you can read:
twrp will successfully decrypt /data at first boot if all goes well
Click to expand...
Click to collapse
So I am wondering whether it is possible to disable decryption when you flash twrp on the z2p?
Normally I would have tried it already and re-flashed the stock image if something went wrong (but there is no stock-image yet ...)

Twrp and flashing a Rom

So I've done a lot of reading and there are multiple threads with steps that aren't exactly clear or contradict each other or are outdated. I just want clarification on what I believe are the steps to flash a custom rom (7.1.2 since I can wait for 8) on a brand new Pixel XL.
Setup phone to the point of enabling adb debugging and oem unlock
Fastboot unlock
Fastboot boot twrp RC1 img
Flash twrp RC2 zip in twrp
Reboot to installed twrp
Wipe system, data, caches
Flash ROM
Flash twrp again
Reboot to twrp
Flash gapps and root method (magisk working for 7.1.2 or should I be using supersu? Also which versions?)
Flash twrp again??
Boot to ROM then setup and use like normal
Should this give me custom ROM, root and twrp that I can boot directly to without a pc again? As long as I do twrp flashing after a ROM each time it'll stick? Also, I keep seeing things for setting a pin before initial twrp boot but without spending 4 days reading I can't find the reason for it. Should I be flashing vendor, bootloader and radio for the latest Nougat release BEFORE unlocking or can I do it through fastboot prior to unlocking?
Coming from Nexus 6P and that was my first run in with the bootloader, radio and vendors so I want to avoid issues for myself. Phone should be here tomorrow and want to get down to business right away lol.
Any and all information is greatly appreciated. If all of this is answered in a centralized area please point me to it and tell me I'm stupid for missing it.
Sent from my SM-N910P using Tapatalk
Found this over in PN thread. Is it accurate? Seems similar to my process.
https://forum.xda-developers.com/showthread.php?p=73846565
wgrant said:
Fastboot boot twrp RC1 img
Flash twrp RC2 zip in twrp
Reboot to installed twrp
Wipe system, data, caches
Flash ROM
Flash twrp again
Reboot to twrp
Flash gapps and root method (magisk working for 7.1.2 or should I be using supersu? Also which versions?)
Flash twrp again??
Boot to ROM then setup and use like normal
https://forum.xda-developers.com/showthread.php?p=73846565
Click to expand...
Click to collapse
Assuming the bootloader is already unlocked and disregarding the unlocking instruction, these instructions are dead on accurate. I personally dont use magisk, but maybe another user will chime in. For 7.1.2 id use supersu 2.82.
You dont have to flash twrp again after flashing gapps and supersu, but its a good practice to have.
noidea24 said:
Assuming the bootloader is already unlocked and disregarding the unlocking instruction, these instructions are dead on accurate. I personally dont use magisk, but maybe another user will chime in. For 7.1.2 id use supersu 2.82.
You dont have to flash twrp again after flashing gapps and supersu, but its a good practice to have.
Click to expand...
Click to collapse
Thank you very much. I'm about to unlock and go nuts on my phone. New phones are so fun to fiddle with!
if you want to use magisk you'll need to flash a custom kernel before you flash magisk. Also you'll need a modified magisk zip. Search around the thread you'll find one, the latest version I found was magisk v13.3.
Edit: Just found out magisk is officially support for pixel on version 14.1 Check out the magisk beta thread.

TWRP issue with stock moto fimrware :/

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.

Seeking a better understanding

Hey all,
I'm trying to better understand what I'm doing with my phone here. Currently I have my OP3 rooted (aka unlocked bootloader, correct?) and on 8.0.0.
1. If I wanted to keep it rooted and reinstall the OS, is this as simple as downloading whichever ROM I want, copying it to my phone's internal storage, and flashing it in recovery using TWRP?
2. Is stock recovery (recovery_OP3.img on the oneplus.net website) the same part of the software as TWRP? As in the stock recovery is locked bootloader and TWRP is unlocked bootloader?
3. I've been searching for the most recent root guide, can I get a recommendation? I've read that SuperSU is not the thing to use any longer, but rather Magisk. Correct?
4. What is boot.img?
Thanks all
Shoruk3n said:
Hey all,
I'm trying to better understand what I'm doing with my phone here. Currently I have my OP3 rooted (aka unlocked bootloader, correct?) and on 8.0.0.
1. If I wanted to keep it rooted and reinstall the OS, is this as simple as downloading whichever ROM I want, copying it to my phone's internal storage, and flashing it in recovery using TWRP?
2. Is stock recovery (recovery_OP3.img on the oneplus.net website) the same part of the software as TWRP? As in the stock recovery is locked bootloader and TWRP is unlocked bootloader?
3. I've been searching for the most recent root guide, can I get a recommendation? I've read that SuperSU is not the thing to use any longer, but rather Magisk. Correct?
4. What is boot.img?
Thanks all
Click to expand...
Click to collapse
1. If you switch roms, always do a clean install (wipe all partitions) . If you want to get rid off all the mods wipe system and flash the same rom + gapps + root. You won't loose data since you are only modifying the system partition.
2. Stock recovery by Oneplus is as if says stock, you littery can't do anything with it apart from upgrading your OOS, wiping cache partitions and doing a factory reset. I do recommend the TWRP provided by Bluspark since that seems to be the only one I tried without any issues whatsoever.
3. Magisk is the new root method in my opinion, it supports Magisk modules which simply are mods that can be installed and removed with a single click (reboot required tho). You can compare it to xposed but very limited when compared.
4. Boot.img is your kernel, never flash standalone img files apart from TWRP since the kernel modifies more the only the boot img. Always flash the full zip.

How to upgrade O+5T to OxygenOS 5.1.0 when rooted with stock recovery?

Greetings. I received the OTA update (which I did not install!) on my OnePlus 5T today. I'm on OxygenOS 5.0.4 with magisk installed, phone is rooted, bootloader unlocked, stock recovery (no TWRP).
What's the right path to upgrade to 5.1.0?
I'm experienced with the command line and have no problems with it.
Based on my ideas, I think the path should be:
- Download full Oxygen OS 5.1.0 Full Zip
- Start TWRP using adb
Code:
fastboot boot
(which TWRP version?)
- Wipe dalvik and cache
- Flash the downloaded file
- Wipe dalvik and cache
- Flash magisk
That's it. Am I missing something? Do I need to reinstall magisk as specified as last step? Which TWRP version should I use (from the official website?)?
Thanks for your help :good:
Please go through the dedicated update thread that ive made for the update
https://forum.xda-developers.com/oneplus-5t/how-to/official-oxygenos-4-7-2-7-1-1-ota-t3709265
The thread has all the instructions and files needed to update. As far as twrp is concerned i recommend latest codeworkx or or bluspark recovery. The links are available on the thread.
Feel free to post on the thread if you have any further doubts.
Thanks @Funk Wizard , I read that thread (I linked it in my post) but it mentions "For Stock Non Rooted Users with Stock Recovery" and "For Rooted Users with TWRP Recovery" while in my case I'm rooted with STOCK recovery, which doesn't fit any of those 2 sentences. Which one should I follow?
As you are rooted you can flash the full zip from stock recovery that would remove root or you need follow and flash via twrp. If rooted stock recovery is no good TBH and i recommend staying on TWRP.
You can flash twrp from fastboot and then follow the instructions on the flashing post.
In case you dont need root anymore you can just flash the full zip from stock recovery. It will remove root and you will stay on stock recovery. In both the cases, use the full zip to flash via twrp or stock recovery.
No good? Please be more specific, why it's no good? From my understanding keeping stock recovery with magisk installed and bootloader unlocked allows me to pass all SafetyNet checks, which is very helpful if you don't want to deal with apps complaining that you are rooted. I can easily boot to TWRP as long as I can plug my phone into my computer by just using the fastboot command. The only downside I could see is if I brick my phone and have usb debugging disabled, I can't fastboot from adb.
Flashing TWRP would make me fail SafetyNet checks, which I'm not interested into.
After I flash the full zip, do I also need to flash the OTA update?
Thanks by the way, basically the only real "special" thing I need to do is install Magisk again after flashing.
Flashing twrp doesn't break safety net. So it's upto you if you want to stay on stock recovery with no additional benefits or on twrp.
Also, if have full time zip then you don't need to flash ota zip again.
That's good! I'll definitely flash twrp in that case.
@sshivampp Sorry to resurrect this thread, but looks like it's important. On TWRP website itself it's stated that installing TWRP would break dm-verity. What's the consequence of this? https://twrp.me/oneplus/oneplus5t.html

Categories

Resources