Switch between active slot - LG V40 Questions & Answers

How do you switch between active slot?
I have installed custom rom and want to boot into TWRP (boot_a) but it only boots into Lineage recovery(boot_b).

Cookies_crumbly said:
How do you switch between active slot?
I have installed custom rom and want to boot into TWRP (boot_a) but it only boots into Lineage recovery(boot_b).
Click to expand...
Click to collapse
There are a few ways to accomplish this.
1) use TWRP
2) use v35 eng abl
3) use (laf nuked) fastboot (does not work on korean open roms)
1) In twrp, reboot section, choose which slot to make active.
2) In v35 eng abl, use fastboot --set-active=(a or b) (but of course having v35 eng abl in the abl partition makes that slot unbootable and it will only go to fastboot, so switch to that slot, use fastboot, then use fastboot to switch back to other slot, reboot).
3) If you nuke laf partition, any rom except korean open, when going to download mode, you get a watered down version of fastboot rather than download mode (save off original laf so you can restore it if u need d/l mode back). You can then use fastboot to change slots etc as you would in #2. The advantage here is that you don't have to change slots to use fastboot, as this can be on the current slot.
you have to decide which method is best for you.

Related

Xiaomi MI A2 -- TWRP can't be flashed

Hi I have Xiaomi mi A2. As it just arrived, I unlocked the bootloader, that was fine. Now I want to flash twrp, I was trying several versions and guides. I first started with classic command - fastboot flash recovery recovery.img (it was that 3.2.3 Jasmine) - OKAY...OKAY, no error. So I rebooted to recovery and what appeard was than android with text "no command". Then I tried some partition switching or whatever it is (flash recovery to non- active partition), but when I wanted to set my unused partition to use with command "fastboot set_active a" it didn't recognize the command. What I am doing wrong? I am noob with this, I flashed some other phones before, but I am really struggling with this. How should I flash it? Or is there some other way to root the phone (as my main goal is to root the phone)?
You should look at guides for Magisk. They basically say to flash a patched_boot.img (created by Magisk). It HAS to be the same version as your System (in other words, the boot image used to create patched_boot image has to be the same as the one you're replacing - else it won't boot).
And there is no 'recovery' partition anymore, not in dual slot phones (the other slot is now the recover).

TWRP and slots - I'm really confused now

I'm a long time user of custom roms. I've bricked and subsequently rescued more android phones than I can remember and I always managed to get myself out of trouble before. But, I've been away from them for a while and I never had a phone with this dual slot setup before, and I'm stumped with this one
Before I start with the real issue, can I ask what the purpose of two slots is? Is it for dual booting, or something to do with the dual sims??
So, I'm on Lineageos. When I first flashed it I used the lineageos recovery. Now I would like TWRP permanently installed but can't get it to stick.
I've flashed the rom, and TWRP, so many times now. It's been a mess. My rom is working so no panic but if I go into recovery I'm back on the lineageos recovery and the text is too tiny to read (it wasn't like that when I used it before - the text was big).
Anyway, about half an hour ago I flashed the TWRP image in fastboot mode.
Then started twrp and copied the twrp zip over to the phone.
Then I flashed the zip and it flashed to both slots.
Then I couldn't get into my rom. It seemed to overwrite the boot.
So then I reflashed lineage and my rom is back and working fine, but I have the lineageos recovery again.
I thought that with TWRP in both slots, and me then flashing the rom, that the rom would only use one slot and TWRP would remain in the other and would be accessed when I boot to recovery.
Another thing. In fastboot mode (or the bootloader I should say) I have a black screen. The only feedback I get is from the terminal window on my linux computer. I can't see **** on the phone.
buachaille said:
I'm a long time user of custom roms. I've bricked and subsequently rescued more android phones than I can remember and I always managed to get myself out of trouble before. But, I've been away from them for a while and I never had a phone with this dual slot setup before, and I'm stumped with this one
Before I start with the real issue, can I ask what the purpose of two slots is? Is it for dual booting, or something to do with the dual sims??
So, I'm on Lineageos. When I first flashed it I used the lineageos recovery. Now I would like TWRP permanently installed but can't get it to stick.
I've flashed the rom, and TWRP, so many times now. It's been a mess. My rom is working so no panic but if I go into recovery I'm back on the lineageos recovery and the text is too tiny to read (it wasn't like that when I used it before - the text was big).
Anyway, about half an hour ago I flashed the TWRP image in fastboot mode.
Then started twrp and copied the twrp zip over to the phone.
Then I flashed the zip and it flashed to both slots.
Then I couldn't get into my rom. It seemed to overwrite the boot.
So then I reflashed lineage and my rom is back and working fine, but I have the lineageos recovery again.
I thought that with TWRP in both slots, and me then flashing the rom, that the rom would only use one slot and TWRP would remain in the other and would be accessed when I boot to recovery.
Another thing. In fastboot mode (or the bootloader I should say) I have a black screen. The only feedback I get is from the terminal window on my linux computer. I can't see **** on the phone.
Click to expand...
Click to collapse
1. Don't use lineage official because many users have had different problems. Use the unofficial one from the Telegram chat
2. The reason for the two slots is for updating your stock ROM without any risk of bricking
*When you get a stock update the system flashes it to the dormant slot ..if it bricks it boots back to active slot ...if it boots fine you switch slots and your dormant becomes your active .So you have a duplicate of all partitions but only one data partition ..so regardless of which slot you're using your data is there ..(+ and importantly doesn't get wiped ) so the concept is/was that you can flash stuff without bricking nor losing any data
3.The concept is simple : *usually because not always* your recovery flashes a rom or update to the slot you are not using ... But be careful .. ANYTHING ELSE like magisk or gapps or whatever gets flashed to the active slot ..so after flashing your ROM you need to change to the other slot in recovery then continue flashing gapps and magisk there ...so
SLOT A - flash ROM zip to B
*Reboot to slot B RECOVERY
SLOT B - flash gapps & magisk
___BOOT TO NEW ROM
*YOU ARE NOW USING SLOT B
#your old rom is still sleeping in slot A
In emergency you could go back there
4. Recovery ...this and other A/B devices and even other devices dont have a recovery partition ..so the recovery is inside the boot partition or recovery_ramdisk partition...which yes gets overwritten when flashing a new ROM or kernel etc
_the solution is easy_
Flash recovery back in recovery after flashing a custom ROM
*Some have twrp included and it gets flashed automatically
5. The not booting with recovery must have something to do with either bugs in the rom you are using or an old or bugged recovery or encryption/secure boot data problem ...either way you need to try different roms and recoveries and kernels - magisk combos
#see 7 # maybe you can't boot cos ARB 4 needs custom kernel on pie roms to boot
6. The black screen in fastboot is not a good sign ...sounds like your device got converted from Android 1 to MIUI and it triggered ARB 4
fastboot getvar anti
7. YOU CAN READ UP ON THAT ..all this info is available for our device in this forum and this is very lazy of you and I shouldn't be spoon feeding you .
***You can always sideload or backup sideways
fastboot boot recovery.img
*Go to advanced tab activate adb sideload
adb sideload "filename"
*File must be in adb folder
KevMetal said:
1. Don't use lineage official because many users have had different problems. Use the unofficial one from the Telegram chat
2. The reason for the two slots is for updating your stock ROM without any risk of bricking
*When you get a stock update the system flashes it to the dormant slot ..if it bricks it boots back to active slot ...if it boots fine you switch slots and your dormant becomes your active .So you have a duplicate of all partitions but only one data partition ..so regardless of which slot you're using your data is there ..(+ and importantly doesn't get wiped ) so the concept is/was that you can flash stuff without bricking nor losing any data
3.The concept is simple : *usually because not always* your recovery flashes a rom or update to the slot you are not using ... But be careful .. ANYTHING ELSE like magisk or gapps or whatever gets flashed to the active slot ..so after flashing your ROM you need to change to the other slot in recovery then continue flashing gapps and magisk there ...so
SLOT A - flash ROM zip to B
*Reboot to slot B RECOVERY
SLOT B - flash gapps & magisk
___BOOT TO NEW ROM
*YOU ARE NOW USING SLOT B
#your old rom is still sleeping in slot A
In emergency you could go back there
4. Recovery ...this and other A/B devices and even other devices dont have a recovery partition ..so the recovery is inside the boot partition or recovery_ramdisk partition...which yes gets overwritten when flashing a new ROM or kernel etc
_the solution is easy_
Flash recovery back in recovery after flashing a custom ROM
*Some have twrp included and it gets flashed automatically
5. The not booting with recovery must have something to do with either bugs in the rom you are using or an old or bugged recovery or encryption/secure boot data problem ...either way you need to try different roms and recoveries and kernels - magisk combos
#see 7 # maybe you can't boot cos ARB 4 needs custom kernel on pie roms to boot
6. The black screen in fastboot is not a good sign ...sounds like your device got converted from Android 1 to MIUI and it triggered ARB 4
fastboot getvar anti
7. YOU CAN READ UP ON THAT ..all this info is available for our device in this forum and this is very lazy of you and I shouldn't be spoon feeding you .
***You can always sideload or backup sideways
fastboot boot recovery.img
*Go to advanced tab activate adb sideload
adb sideload "filename"
*File must be in adb folder
Click to expand...
Click to collapse
Thanks. I really appreciate your detailed reply. Sorry I didn't answer sooner. I've been unbelievably busy with work and other things and only just logged into XDA again 10 minute ago.
Yes I know it's lazy of me, BUT, a problem I always have with information on roms is that there is so much contradictory information. One post contradicts another a lot of the time, often because methods change over time. Anyway, this leads to me doing the wrong thing and bricking my phones
Thanks again :good:
I got to this link from telegram chat after searching it up. Is this where you are saying I should get Lineageos?
https://github.com/LineageOS
buachaille said:
I got to this link from telegram chat after searching it up. Is this where you are saying I should get Lineageos?
https://github.com/LineageOS
Click to expand...
Click to collapse
https://sourceforge.net/projects/shoukolate-los17-1-builds/files/jasmine_sprout/
KevMetal said:
https://sourceforge.net/projects/shoukolate-los17-1-builds/files/jasmine_sprout/
Click to expand...
Click to collapse
Thanks. Once I get TWRP to stick I will flash this.
buachaille said:
Thanks. Once I get TWRP to stick I will flash this.
Click to expand...
Click to collapse
Sure . It will be easy . Put magisk and twrp.zip and gapps on your PC .
Put recovery.img in the adb folder
1. Connect phone to pc in normal mode and enable adb
2. Open adb and authorize device
3. Adb reboot bootloader
4. Fastboot boot recovery.img
5. Transfer recovery.zip to phone internal
6. Wipe - flash zip - format data - reboot recovery - transfer lineage ROM to phone - flash - flash recovery.zip - format data - reboot to the INACTIVE slot in reboot section ..then choose reboot recovery - flash gapps and magisk - reboot to lineage ...then recovery should be stuck
*If you wanna keep data back it up when you boot recovery first time
**Restore it after all the steps
***Recovery will only stick if you do the data formatting
Use this recovery:
https://drive.google.com/drive/mobile/folders/1NRlv58EiQ_YlMjrpLYKzOqIob2Vq3kYE
I'm on linux but I don't think that makes any difference here.
I've got the fastboot screen fixed. I downloaded and flashed the stock MI image. So I'm pleased with that.
I've flashed 3 different versions of TWRP. 3.4.0.0 and a couple of older ones. 3.4.0.0 gives me the TWRP screen but doesn't actually load into TWRP. With the other I get a black screen. Trying as we speak to fix.
I believe I have the command correct - sudo fastboot boot twrp-3.4.0-0-jasmine_sprout.img
<<edit>> This one worked ------ twrp-3.3.0-0-jasmine_sprout.img
In TWRP now and following your instructions. Would be done by now but rom taking ages to download. Anyway, thanks. I'll post back once I'm done and let you know what happened.
I owe you a post to let you know what happened. It took me hours and hours but it's finally done. I now have the following:
Bootloader image showing as it should (fixed this by using the MI flash tool and restoring a stock rom.
TWRP is installed and hasn't disappeared. I had a hard time with TWRP. The older version, that was the only one I could get to boot up initially, refused to flash a rom. I tried the Lineageos unofficial and the official, but no way. So I used TWRP, to flash the newest version of TWRP, and then it worked.
Lineageos unofficial is installed and rooted with Magisk.
Your list of instructions (quoted below) was extremely useful and I wouldn't have managed with it. Many thanks :good:
Put recovery.img in the adb folder
1. Connect phone to pc in normal mode and enable adb
2. Open adb and authorize device
3. Adb reboot bootloader
4. Fastboot boot recovery.img
5. Transfer recovery.zip to phone internal
6. Wipe - flash zip - format data - reboot recovery - transfer lineage ROM to phone - flash - flash recovery.zip - format data - reboot to the INACTIVE slot in reboot section ..then choose reboot recovery - flash gapps and magisk - reboot to lineage ...then recovery should be stuck
*If you wanna keep data back it up when you boot recovery first time
**Restore it after all the steps
***Recovery will only stick if you do the data formatting
Click to expand...
Click to collapse
I would say that flashing roms has become more complicated during the time I've been away. I think the last phone I used a custom rom on was my Galaxy S5. I can't believe how hard a time I had getting this to work.
buachaille said:
I owe you a post to let you know what happened. It took me hours and hours but it's finally done. I now have the following:
Bootloader image showing as it should (fixed this by using the MI flash tool and restoring a stock rom.
TWRP is installed and hasn't disappeared. I had a hard time with TWRP. The older version, that was the only one I could get to boot up initially, refused to flash a rom. I tried the Lineageos unofficial and the official, but no way. So I used TWRP, to flash the newest version of TWRP, and then it worked.
Lineageos unofficial is installed and rooted with Magisk.
Your list of instructions (quoted below) was extremely useful and I wouldn't have managed with it. Many thanks :good:
I would say that flashing roms has become more complicated during the time I've been away. I think the last phone I used a custom rom on was my Galaxy S5. I can't believe how hard a time I had getting this to work.
Click to expand...
Click to collapse
No yes I understand I had to pick up all what was discussed by trial and error.
Therr are two big changes ..more security measures ...more complicated workarounds.
But the A/B thing is a mission. I converted my phone completely and repartitioned it to A only . Now it has a dedicated recovery partition. And I have an extra 4GB of space .
By the way .Please remember you will need to reflash the twrp zip after every ROM if you don't want to lose it.
KevMetal said:
No yes I understand I had to pick up all what was discussed by trial and error.
Therr are two big changes ..more security measures ...more complicated workarounds.
But the A/B thing is a mission. I converted my phone completely and repartitioned it to A only . Now it has a dedicated recovery partition. And I have an extra 4GB of space .
By the way .Please remember you will need to reflash the twrp zip after every ROM if you don't want to lose it.
Click to expand...
Click to collapse
Thanks for the reminder about reflashing TWRP. I will keep that in mind. I shouldn't be reflashing much now though. I hope I got that out my system last time. I was always changing roms - constantly.
I mainly wanted TWRP installed as I remember sometimes my roms would just go into a bootloop for no reason that I could discover, and I'd need my TWRP backups.
How do you re-partition a Xiaomi. With the MI flash tool? I'm guessing that as I remember I had to do that once with Odin (I always had Samsung phones back then). I was forced to do it as I had bricked my phone much MUCH more seriously than usual. Got it fixed though
I still am quite confused with the A/B thing, but I'll pick it up as I go along I'm sure. For now I'm happy. Rom working fine so I can get on with other things in life.
And thanks again - you totally got me out of the **** :good::good:

How To Guide How to flash custom rom AND revert Miui

Hey there, first post here,
Got several higs with my RN10S playing a bit.
How to flash a custom rom in Xiaomi phones?
-First unlock your BL with MiFlashUnlocker.
MiFlashUnlocker
-assuming you're on 12.5.16.eu and wants to go to custom rom;
-first of all you need to be on 12.5.16global, only global version works atm.
So MiFU was useless atm. Or No:
Open MiFlashTool 2018.5.28.0 and Select the folder where you previously extracted 12.5.16global tzg .
Connect your phone in fastboot mode, rescan beward to the corner right.
You could clean all and flash 12.5.16 and MiFU would have been usefull
You could save your "user data"
Or you could clean all and lock flash and lock- BL, for just security purpose telling yourself you would Re-unlock in the future and thus you would need to Unlock it again, so MiFU again..
For tho who still follow, you just fastboot flashed 12.5.16global,
Boot it, i assume that this part is important, cause flashing TWRP just after a fastboot rom flash could end up in unmounted partitions,
Flash TWRP with phone in fastboot mode:
fastboot flash boot recovery.img
To temporarely replace the boot by recovery,
fastboot reboot recovery to boot onto it
Once in there, Switch to slot B;
(Reboot button- there you have option to use either slots)
Flash your rom and reflash TWRP by using the tick next to the digest, while flashing the rom.
Reboot Recovery to get things settled,
Format data to just keep the freshly installed rom, (Wipe, Data, yes) and get it working and running
Reboot and enjoy!
To revert simply fire up MiFlashTool and an original 12.5.16 tgz file, for security purpose,
You may wants to format, flash, lock.
The same technique could be applyied if running Miui 13 and wants to revert to 12.5
There is ARB but doesn't seem to be taken onto consideration bout the program
I got a red !Phone is destroyed, press power to power off! And my phone is still working actually.
I take absolutely no credits for that,
Just figured out the messy workaround and gathered informations,
These roms are not from me, and i Can confirm their bootability,
Beside that, lightweight, but no fast charge.
Got back to stock, cause of banking app, fast charge
Go feel free to post your techniques to get yourself out if situation
twrp is not on redmi note 10 s yet is it ?

Question How To Repair / Extract BOOT img For SPES/SPESN ?

While I was in a hurry, I made a serious mistake and did this :
fastboot flash boot filename.img
( I wrote the TWRP recovery image, into the boot partition ! )
Now, I need to reverse this, and getting stuck.
My Note 11 [SPES] (without NFC) has this current image :
• V13.0.15.0.RGCMIXM
I have re-downloaded this Xiaomi ROM as a Fastboot image and a Recovery image as well.
So, I'm looking for advice on how to get the original boot img
back into my phone, eg. with Fastboot method or Recovery method (if possible)
PS:
I'm using a Windows PC (and not a Mac)
Thank You.
metaxda said:
While I was in a hurry, I made a serious mistake and did this :
fastboot flash boot filename.img
( I wrote the TWRP recovery image, into the boot partition ! )
Now, I need to reverse this, and getting stuck.
My Note 11 [SPES] (without NFC) has this current image :
• V13.0.15.0.RGCMIXM
I have re-downloaded this Xiaomi ROM as a Fastboot image and a Recovery image as well.
So, I'm looking for advice on how to get the original boot img
back into my phone, eg. with Fastboot method or Recovery method (if possible)
PS:
I'm using a Windows PC (and not a Mac)
Thank You.
Click to expand...
Click to collapse
Just flash the boot image that is inside the fastboot ROM, and then, if you want back TWRP, boot to it, through fastboot, and then, through TWRP, flash it to the ramdisk partition.
SubwayChamp said:
Just flash the boot image that is inside the fastboot ROM, and then, if you want back TWRP, boot to it, through fastboot, and then, through TWRP, flash it to the ramdisk partition.
Click to expand...
Click to collapse
@SubwayChamp ,
Thank You for that advice.
It saved me.
( The work PC I was using, had some 'security restrictions' set by the company,
where I could not open the Fastboot image at first, but I managed to work it all out
and grab the boot.img file , and then proceeded as your suggestion )

Question Unstoppable bootloop after flashing bad boot img

Hi everyone, I wanted to root my phone because my google pay way not working after I unlocked the bootloader of my phone.
I used magisk to flash a version for my redmi 2201117TY, but after using fastboot to flash my "patched" rom back to my phone, it is now booting over and over again.
I installed twrp to try to install another ROM, but I'm not sure it'll work.
I installed several redmi note 11 img to see if it would fix it but i did not (V13.0.6.0.SGKEUXM, V14.0.2.0.TGKMIXM and V13.0.3.0.SGKEUSF which was my original one i suppose)
I just want to have an usable phone even if it means cleaning everything. How can I format everything back to make it usable?
I have access to adb, fastboot, TWRP. (usb debugger on)
I am not sure I can find the exact rom as it was a really wierd version from my operator (SGKEUSF) and I can only find one on internet which happen to not work. How can I unbrick my phone now?
NOTE : the SGKEUSF is an overlayer of the SFR (Altis) network so i would rather not use it
Format (not wipe) data in twrp, flash a rom that fits your needs (on sdcard), reboot recovery (!), reboot system. If fastboot access is given it's fixable. Had the same thing many times with spesn. This is the way it always works for me.
When you say "flash a rom", you mean a recovery or a fastboot one? Does it have an influence?
Just download latest version of MiFlash, download RN11 fastboot ROM, flash the ROM via MiFlash. In MiFlash make sure to to check the box whether of not to lock the bootloader after flash. Just to be safe leave it unlocked until after the phone is safe.

Categories

Resources