[Q] Flashing permanent TWRP to slot A and B? - OnePlus 6 Questions & Answers

Hi all,
I'm still a little unsure about the A and B slots and how it works.
If my device active slot is A with a custom ROM and permanent TWRP on it, then I flash another custom ROM and reboot to make my active slot B, and flash TWRP again will I have permanent TWRP on both slots at that point?
I understand that there is no recovery partition and recovery is included in the boot partition.....is the boot partition part of a custom ROM and therefore can a custom ROM include TWRP by default?
Thanks for any clarification you can provide.

with fastboot method u just boot to twrp (not flashing) when u install the TWRP installer zip, it installs to both partitions, so it does not matter which partition u are on or switch too, u will still have root until u flash a modified/stock/other boot img

Swatto86 said:
Hi all,
I'm still a little unsure about the A and B slots and how it works.
If my device active slot is A with a custom ROM and permanent TWRP on it, then I flash another custom ROM and reboot to make my active slot B, and flash TWRP again will I have permanent TWRP on both slots at that point?
I understand that there is no recovery partition and recovery is included in the boot partition.....is the boot partition part of a custom ROM and therefore can a custom ROM include TWRP by default?
Thanks for any clarification you can provide.
Click to expand...
Click to collapse
I get your question and it's a good one. I'm not here to give you answers but to expand a little based on some common knowledge. It does seem like (regarding you scenario) that you should have two working partitions at that point, just one a little behind the other. That's purely speculative on my part though because I really don't know what happens with the old active partition once the new one gets privilege. Maybe someone with more experience could come in. It seems to be basically like a dual boot setup, but I don't think that's actually how it works. If it did, we would be hearing more about dual booting and such.

Related

Boot.Img Question

I've flashed several One S roms with success and I wanted to see if someone could clarify the flashing of the boot.img.
1. If I've done it once, is it necessary that I flash the boot.img each time I flash a new ROM?
2. Some of the ROM pages say that I can skip the boot.img step if I use a TWRP, is that for all One S roms or just the ones which the developers indicate so?
Thanks
The boot image is part of the rom. It contains the kernel and the root file system on which the mmc partitions get mounted.
However, not all devices let you flash the boot image from recovery. (I dont think there is real consensus on the factors: hboot, twrp/cwm, ? but the fact remains that you may not be able to flash boot image from recovery.) So to be safe, it's better to always flash it through fastboot, since this always works.
The best time to do this is right before you boot into recovery to flash your rom, so that the first time it boots is right after you flash your rom.
I flash the boot.img every time even if it isnt necessary . I dont think it is hard to do so better flash safe then fast .

Google Pixel: Root + TWRP and basic understanding HELP!

Ok, so I'm coming from the Nexus 6P which has a different file system, I get that. But, this is so confusing to me.
I have gotten TWRP to work and SuperSU, however, they both do not work at the same time.
If SuperSU is working correctly and I want to go to TWRP, TWRP is all encrypted it looks like. It is not until I boot to bootloader and manually use fastboot boot that I can get TWRP to work right. Doing this causes me to lose root and vice versa...
I guess I am wondering what steps people usually take to install a rom and kernel correctly while keeping twrp and root at the same time.
I realize this probably makes no sense, but it doesn't to me either and I'm trying to explain it as best I can.
GohanBurner said:
Ok, so I'm coming from the Nexus 6P which has a different file system, I get that. But, this is so confusing to me.
I have gotten TWRP to work and SuperSU, however, they both do not work at the same time.
If SuperSU is working correctly and I want to go to TWRP, TWRP is all encrypted it looks like. It is not until I boot to bootloader and manually use fastboot boot that I can get TWRP to work right. Doing this causes me to lose root and vice versa...
I guess I am wondering what steps people usually take to install a rom and kernel correctly while keeping twrp and root at the same time.
I realize this probably makes no sense, but it doesn't to me either and I'm trying to explain it as best I can.
Click to expand...
Click to collapse
Your problem with TWRP isn't related to root. When you boot TWRP you have to enter your pin or pattern lock (whatever you use to unlock the phone when it's booted up) before it can decrypt the data. If you don't get offered the chance to unlock, reboot recovery until the lockscreen appears. It's a bug in TWRP. I don't have much trouble with it myself but once in a while I have the same thing happen. It might take one reboot, it might take several. Eventually it'll work for you though.
robocuff said:
Your problem with TWRP isn't related to root. When you boot TWRP you have to enter your pin or pattern lock (whatever you use to unlock the phone when it's booted up) before it can decrypt the data. If you don't get offered the chance to unlock, reboot recovery until the lockscreen appears. It's a bug in TWRP. I don't have much trouble with it myself but once in a while I have the same thing happen. It might take one reboot, it might take several. Eventually it'll work for you though.
Click to expand...
Click to collapse
I fastboot booted TWRP and installed the zip so I would keep TWRP, then I flashed the SR4 SuperSU zip. I rebooted and tried going back into TWRP though my ROM and all my folders looked like this:
a9239xwhg802348
8208dncbjs8d0s99
3n9c8bnd8s0s93n3
8db0xndne8s8n3n
nz0sd8fn2308df0n
etc...
I used fastboot boot twrp again and everything went back to normal, but then I lost root. I did the exact same thing again and now it seems I have both working at the same time. You can see how this is so confusing lol. I have no idea why it didn't work the first time when I did the exact same thing.
GohanBurner said:
I fastboot booted TWRP and installed the zip so I would keep TWRP, then I flashed the SR4 SuperSU zip...
Click to expand...
Click to collapse
It could be that you didn't use the latest SuperSU. 2.78SR4 is not the newest. Flash 2.79SR3 and see is that works.
I installed the latest SuperSU and all is working correctly, yet there are still some issues I am having...
-Randomly, TWRP will reboot into some kind of encrypted state. Where all the folders listed are like "asd8a0b93eea9dnb9" instead of what's actually in there like the Download folder. Rebooting a few times sometimes fixes it.
-Sometimes phone will just boot into stock recovery even though I have flashed the TWRP installer.
-Need confirmation on what exactly Slot A and Slot B are. Are those just states? Like installing one rom on Slot A and installing one rom on Slot B allows the ability to switch between the two?
-Do I basically need to have a computer handy any time I want to install a ROM because of the fact TWRP sometimes doesn't stick? Or can I run fastboot boot (terminal) commands from inside the system?
-Is there any specific order I need to flash things? Vendor, SuperSU, TWRP, etc?

[Recovery Release] Working TWRP for Sony L1 (G3311 Single SIM others to be confirmed)

Requirements:
1. Bootloader Must Be Unlocked.
2. Have a backup of your working Magisk Patched boot.img saved to your External SDcard.​A little INFO:
The Sony L1 recovery seems to be disabled by SONY for some unknown and Probably stupid reason.
I have tried all ways to get the TWRP and Stock recovery to boot up from the fotakernel partition (recovery) but TWRP and even the stock recovery refuse to boot.
Anyway to cut a very long story short I am releasing this TWRP which is 95% functional and needs to be flashed to the boot partition
Working Method/flow:
Make sure you have a Back up of your working Boot.img "You know the one you used to root the device in the first place".
For ease of use You can use this app by XDA dev @wanam (Thread here) app on playstore Here You can also use this app to flash the v5-twrp-l1.img to your "boot" partition or you can go old skool and use dd (Via adb shell) or use the Magisk patched_boot.img you first rooted with..
Make SURE to Copy this working boot.img to your External SDcard.
When you require TWRP flash the downloaded TWRP to your boot partition using Fastboot (cmd's below) or the above app then reboot
You will now boot to TWRP.
Do what you need to do in TWRP.
IMPORTANT:
Remember Just before you leave TWRP go to INSTALL choose your external SDCard choose "image" from the install screen find your boot.img and select "boot" with the little radio button.
Once flashed choose reboot system.
Now when you boot you will be back to normal :good:
Things Not Working:
1. You will not be able to mount encrypted data therefore you would need to FORMAT your data and then leave it unencrypted.
SuperSU and Magisk will disable forceencrypt for you.
2. Does not Charge or show battery % so I don't know if it's actually charging. (Probably Qnovo battery module used by sony)
It will probably work on all variants but I am not able to test that.
It's use is for backups and restores wipes and installs for which it seems fully functional. :good:
Install Instructios.
Boot to the bootloader then
Code:
fastboot flash boot v5-twrp-l1.img
Then
Code:
fastboot reboot
Download HERE v5-twrp-l1.img
Hi @bigrammy!! I have it booting ok, obviously encryption is not working! I was able to do a backup but couldn't boot back into system, just keeps going back to twrp! I had to flashi the patched 3313 boot image from another post to get back into system! Good work though! Tested on g3311
Chronic2k13 said:
Hi @bigrammy!! I have it booting ok, obviously encryption is not working! I was able to do a backup but couldn't boot back into system, just keeps going back to twrp! I had to flashi the patched 3313 boot image from another post to get back into system! Good work though! Tested on g3311
Click to expand...
Click to collapse
:laugh:
Ok maybe I should update the OP as it seems it's not really clear enough that obviously the boot is replaced by the recovery.
Method would be make sure you have a Back up your working Boot.img You know the one you used to root the device in the first place.
You can also use dd (Via adb shell) or a app from the playstore or better still use the Magisk patched_boot.img .
Copy this working boot.img to your External SDcard.
When required flash the recovery to your boot partition using Fastboot then reboot
You will now boot to TWRP.
Do what you need to do in TWRP.
Then just before you leave TWRP go to INSTALL choose your external SDCard choose "image" from the install screen find your boot.img and select "boot" with the little radio button.
Once flashed choose reboot system.
Now when you boot you will be back to normal :good:
OP Updated let me know if it's clearer to understand now.
Thanks for reporting back. :good:
I'll give it a go! Many thanks! Just one question though. How do I enter recovery mode from then on? Is it still power down, power and volume down yeah?
Chronic2k13 said:
I'll give it a go! Many thanks! Just one question though. How do I enter recovery mode from then on? Is it still power down, power and volume down yeah?
Click to expand...
Click to collapse
I don't think you have really read or understood the OP
You are only ever flashing the "boot partition".
When you need to use TWRP you flash the TWRP.img to the boot partition and when your done you flash back your boot.img again to the boot partition as in the OP.
BTW Have you ever been able to enter the STOCK recovery using Power and Volume Down or using any commands
My phone could not enter the STOCK recovery at all let alone a custom one and since no one ever replied to my question about this I assumed this was the case for everyone as many sony devices from 7.0 had the recovery disabled?
I'm unable to get into stock recovery too!
So,
If we don't have a Recovery partition maybe we can
Create one...
Tutorial in here
https://iwf1.com/how-to-re-partitio...-all-options-included-change-size-fs-type-etc
I'll try it if i have time.
I tested twrp 2 times
Worked every time.
I've tried to install superSu.zip via twrp, looked all right, rebooted the phone and now it's in bootloop for over 2 hours...
It's getting hotter... i ca't turn it off
The only thing that works is keeping Power and Volume Up pressed and it looks restarting...
What can i do to revive it safely?
alegatorul said:
I tested twrp 2 times
Worked every time.
I've tried to install superSu.zip via twrp, looked all right, rebooted the phone and now it's in bootloop for over 2 hours...
It's getting hotter... i ca't turn it off
The only thing that works is keeping Power and Volume Up pressed and it looks restarting...
What can i do to revive it safely?
Click to expand...
Click to collapse
Mate you really need to be careful unless you really know what your doing
You will likely brick the phone if you continue to blindly mess with re-partitioning and the like.
If you were in TWRP which was flashed to the boot partition as directed in the OP then flashing the supersu.zip will simply modify your TWRP.img not your boot.img since TWRP is living in the boot partition at the time you run the .zip hence your looping.
This device has bootloader issues since it will not allow the booting of another partition except "boot" recovery, fotakernel, rdimage, all tested all failed to boot the TWRP recovery and stock recovery.
There is another method used by some sony devices but this will need to be heavily modified for this MediaTek SoC and will require a lot of study and script re-writes.
Spending all this time on a device that's pretty much obsolete before it was launched since it's not planned to receive oreo and Sony 90% locked down the bootloader is kinda futile so use the phone for what it is then throw it in the bin when done in a year or two.
Mate, you are right
Hi, please make recovery for L1 G3312 i hope you can do it.
tweak8 said:
Hi, please make recovery for L1 G3312 i hope you can do it.
Click to expand...
Click to collapse
I think this one may very well work for the dual SIM also so please try it and then report back with some actual details.
eg: bootloader status, firmware version, your region, etc etc.
Thanks.
Works great on the G3113 model, thank you for developing this! Now hoping to find a custom rom to install via .zip.
This "HERE v5-twrp-l1.img" is working in my Xperia L1 G3312.
But, after installing TWRP, phone does not get into boot normally. Everytime it boots into recovery mode. I think that it needs separate twrp partition. This twrp is overwriting the main boot. If anyone can make separate partition for TWRP recovery. This problem will be solved.
Hello. I ignored all your post like a retard and basically just went to the last step to flash the image. The twrp works but it wouldn't boot into normal mode but just boot to twrp everytime so I downloaded some random boot image I saw online and installed it. Now it's just stuck in the sony logo and won't even turn off. Is there anything I can do or is it rip for good?
dumb person said:
Hello. I ignored all your post like a retard and basically just went to the last step to flash the image. The twrp works but it wouldn't boot into normal mode but just boot to twrp everytime so I downloaded some random boot image I saw online and installed it. Now it's just stuck in the sony logo and won't even turn off. Is there anything I can do or is it rip for good?
Click to expand...
Click to collapse
No it's only the boot.img Flash the boot.img in this thread https://forum.xda-developers.com/xperia-l1/how-to/root-l1-g3313-magisk-t3693350 if you can get into fastboot that is.
If not then use FlashTool to flash the stock boot.sin and system.sin only. That should get you working again.
This "HERE v5-twrp-l1.img" is working in my Xperia L1 G3312.
But, after installing TWRP, phone does not get into boot normally. Everytime it boots into recovery mode. I think that it needs separate twrp partition. This twrp is overwriting the main boot. If anyone can make separate partition for TWRP recovery. This problem will be solved.
In twrp mode, I can do everything smoothly..... but phone does not get into boot normally..... After installing stock boot again, phone boot into normally, but twrp has gone completely..... So, it is clear that boot & twrp partition overwrites each other due to no separate partition.... So, we need separate partition for boot & twrp.... then everything will be solved...
bigrammy said:
No it's only the boot.img Flash the boot.img in this thread https://forum.xda-developers.com/xperia-l1/how-to/root-l1-g3313-magisk-t3693350 if you can get into fastboot that is.
If not then use FlashTool to flash the stock boot.sin and system.sin only. That should get you working again.
Click to expand...
Click to collapse
I downloaded the boot from the link you posted and flashed it. Now it phone works again. Many thanks!!
riadjblicd said:
This "HERE v5-twrp-l1.img" is working in my Xperia L1 G3312.
But, after installing TWRP, phone does not get into boot normally. Everytime it boots into recovery mode. I think that it needs separate twrp partition. This twrp is overwriting the main boot. If anyone can make separate partition for TWRP recovery. This problem will be solved.
In twrp mode, I can do everything smoothly..... but phone does not get into boot normally..... After installing stock boot again, phone boot into normally, but twrp has gone completely..... So, it is clear that boot & twrp partition overwrites each other due to no separate partition.... So, we need separate partition for boot & twrp.... then everything will be solved...
Click to expand...
Click to collapse
Yes but Sony Disabled the recovery partition (fotakernel) by design so you can not boot from it.
The OP is clear about the need to flash the TWRP to your boot partition and the reason I also give full instruction in the workflow/method but people simply don't read anymore it seems. :crying:
TWRP can be injected into the boot.img so you can boot normally or boot TWRP using the volume keys at boot time but I can't be bothered working on this since Sony are not going to update the Android Version.
While the phone is OK I have far better phones to spend my time on at the moment.
how to backup boot.img without root? if its impossible then how do i root this phone?

Can't flash custom ROMs

I got my phone yesterday, and I can't flash custom roms. My phone gets stuck on the boot screen (the animation is working as expected) for over thirty minutes, then I give up. I am/was rooted on the latest stock image. In the Download folder, I put the ROM (I have tried with crDroid and Bliss), twrp.zip, nano gapps, and Magisk. I flash the ROM and TWRP and reboot into recovery. Whenever I do this, I no longer have a Downloads folder or files. So, not knowing what to do, I sideload gapps and Magisk and reboot system. Then, I inevitably get stuck on the boot screen animation. What am I doing wrong?
Hello have you try to format data before or after flash custom rom? Some rom don’t work if not do.
Are you familiar with A/B slot partitions and their related behaviors? It's markedly different from single slot systems.
c3drik 67 said:
Hello have you try to format data before or after flash custom rom? Some rom don’t work if not do.
Click to expand...
Click to collapse
I tried this. Unfortunately, no luck.
Dungeon47 said:
Are you familiar with A/B slot partitions and their related behaviors? It's markedly different from single slot systems.
Click to expand...
Click to collapse
I am not familiar with A/B slot partitions. I followed a guide step-by-step, so I wasn't too concerned about my ignorance. Should I be doing something special? Thanks.
Kama45 said:
I tried this. Unfortunately, no luck.
I am not familiar with A/B slot partitions. I followed a guide step-by-step, so I wasn't too concerned about my ignorance. Should I be doing something special? Thanks.
Click to expand...
Click to collapse
Yes. A lot. Get very familiar with how A/B slots work. It changes many things about the whole flashing process. Trying to do things the same way as before leads to exactly what you're experiencing.
Kama45 said:
I got my phone yesterday, and I can't flash custom roms. My phone gets stuck on the boot screen (the animation is working as expected) for over thirty minutes, then I give up. I am/was rooted on the latest stock image. In the Download folder, I put the ROM (I have tried with crDroid and Bliss), twrp.zip, nano gapps, and Magisk. I flash the ROM and TWRP and reboot into recovery. Whenever I do this, I no longer have a Downloads folder or files. So, not knowing what to do, I sideload gapps and Magisk and reboot system. Then, I inevitably get stuck on the boot screen animation. What am I doing wrong?
Click to expand...
Click to collapse
Same thing happened to me, I had to forced the phone off (Volume + and Power) without plug-in the USB after is off I went into EDL mode (Volume +- together and Power) then immediately plug in to your ready PC with msm already ready to go.
You might have to try it a few times...
That's what I did a while back.

How to get into twrp / reinstall neccessary?

Hello,
i have a question about getting into Recovery or maybe i have to install it again?
So i installed twrp following this guide
Install LineageOS on walleye | LineageOS Wiki
wiki.lineageos.org
At first i installed the Lineage OS recovery but wasnt able to flash a ROM with that so i switched and installed twrp.
It was installed to slot A.
I then went ahead and installed an ASOP ROM.
Now the ROM is working fine and i wanted to go into TWRP and do a Backup.
However i cant get into TWRP. Not with key combos nor with adb reboot recovery.
All i get is the fallen Android Robot picture.
I guess i wrote the image to Slot A as well and now have no recovery left.
Do i have to flash TWRP again and this time to Slot B?
I dont wanna brick anything by accident as i have seen some posts where people switched Slots and got bricks / semi bricks.
Thanks for any help or clarification.
Kind Regards
Hello mate, i never reinstalled twrp on my pixel 2 after catching a bootloop after installing it and then flashing magisk so stuck with using fastboot to fastboot boot twrp when I wanted to flash a ROM/mod.
Sounds strange that twrp was only on 1 slot as the twrp installer zip should flash both slots when flashed?
With regard to losing twrp you'll probably find that the new ROMs recovery has overwritten your twrp recovery during the flashing process giving you a stock recovery again (Fallen android). When I was using a 6T which is an A/B slot device you always had to reflash the twrp installer after a ROM flash to keep twrp installed.
I'd check the official twrp thread re backing up with twrp as it did have problems either backing up or restoring last I used it.
Hope that's some help.

Categories

Resources