Are we able to change slots in fastboot?
what are the fastboot commands?
Thanks!
This maybe?
Code:
fastboot --set-active=b (if your current active slot is a)
fastboot --set-active=a (if your current slot is b)
https://forum.xda-developers.com/pixel-xl/help/multiple-bootloader-slots-t3600228
lucky_strike33 said:
Are we able to change slots in fastboot?
what are the fastboot commands?
Thanks!
Click to expand...
Click to collapse
fastboot set_active a
fastboot set_active b
Either works
Related
Just wondering what the command would be to switch to slot A in terminal / cmd
tryfont said:
Just wondering what the command would be to switch to slot A in terminal / cmd
Click to expand...
Click to collapse
"fastboot set_active _a" or "_b"
I searched through threads on here, and the only similar one, there was no solution because OP could not unlock his bootloader.
I unlocked my device, and decided to revert back to stock. I want to retain Android Pay functionality and use Netflix, but do not want to be rooted. I flashed the latest factory images from Google, then locked the bootloader. When i went to boot the device, I was met with an error message saying that it could not find an OS, and I could not proceed from there. If i unlock the bootloader, the device will boot just fine.
Any advice? It's been a long time since i messed around with root etc. Any help would be greatly appreciated.
Flash the factory images to both slots and then lock the bootloader. Use lock_critical as well and see if that helps.
rickysidhu_ said:
Flash the factory images to both slots and then lock the bootloader. Use lock_critical as well and see if that helps.
Click to expand...
Click to collapse
Does using flash all flash to both slots? Pretty sure it says sending to slot a and b in the terminal output. I’ll try doing it manually, but thanks!
Sent from my iPhone using Tapatalk
beats4x said:
Does using flash all flash to both slots? Pretty sure it says sending to slot a and b in the terminal output. I’ll try doing it manually, but thanks!
Click to expand...
Click to collapse
No it doesn't, you have to use the set active command to manually switch slots. I forget the exact command but I'm sure you'll be able to find it with a quick search on XDA/Google.
So the steps would be:
Flash all
Let it boot at least once
Use the set active command to go to the other slot
Flash all again
Let it boot at least once again
Lock the bootloader using both lock and lock_critical
I haven't tried this myself but from researching on my own, these steps seem like the correct way to do things!
rickysidhu_ said:
No it doesn't, you have to use the set active command to manually switch slots. I forget the exact command but I'm sure you'll be able to find it with a quick search on XDA/Google.
So the steps would be:
Flash all
Let it boot at least once
Use the set active command to go to the other slot
Flash all again
Let it boot at least once again
Lock the bootloader using both lock and lock_critical
I haven't tried this myself but from researching on my own, these steps seem like the correct way to do things!
Click to expand...
Click to collapse
This was absolutely it. After doing this, I'm back to normal. Thank you!
As a side note, I also had to update adb/fastboot drivers.
beats4x said:
This was absolutely it. After doing this, I'm back to normal. Thank you!
As a side note, I also had to update adb/fastboot drivers.
Click to expand...
Click to collapse
could you tell me the commands you used to relock the bootloader or thread you used
xringo said:
could you tell me the commands you used to relock the bootloader or thread you used
Click to expand...
Click to collapse
fastboot flashing lock
fastboot flashing lock_critical
TheSt33v said:
fastboot flashing lock
fastboot flashing lock_critical
Click to expand...
Click to collapse
what about switching from a to b
xringo said:
what about switching from a to b
Click to expand...
Click to collapse
fastboot --set-active [a or b depending on which you want]
So if you want b to be active, fastboot --set-active b
rickysidhu_ said:
No it doesn't, you have to use the set active command to manually switch slots. I forget the exact command but I'm sure you'll be able to find it with a quick search on XDA/Google.
So the steps would be:
Flash all
Let it boot at least once
Use the set active command to go to the other slot
Flash all again
Let it boot at least once again
Lock the bootloader using both lock and lock_critical
I haven't tried this myself but from researching on my own, these steps seem like the correct way to do things!
Click to expand...
Click to collapse
I want to create auto process batch with this.
So is it possible to use this steps in this way ?
set active a
Flash all
Let it boot at least once
set active b
Flash all again
Let it boot at least once again
Lock the bootloader using both lock and lock_critical
thanks for your help
XiorgON said:
I want to create auto process batch with this.
So is it possible to use this steps in this way ?
set active a
Flash all
Let it boot at least once
set active b
Flash all again
Let it boot at least once again
Lock the bootloader using both lock and lock_critical
thanks for your help
Click to expand...
Click to collapse
Just modify the flash all bat. To skip reboot. And and you can save yourself some time by not having to boot both of them. Just remember after you fastboot set active slot, to A or B, reboot to Bootloader for it to make the change. Then run your flash all. I don't know if it's really necessary but I do it just in case.
thanks for your help !
is good now what do you think ?
please note that. i want to make batch that will factory restore for returning the phone to google for warranty and relock bootloader
i dont know if i need to set active partition for factory restore or just for the bootloader locking process.
adb reboot bootloader
fastboot --set-active a
fastboot flash bootloader bootloader-taimen-tmz12bb.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-taimen-g8998-00164-1710262031.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w update image-taimen-opm1.171019.021.zip
fastboot reboot-bootloader
fastboot --set-active b
fastboot flash bootloader bootloader-taimen-tmz12bb.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-taimen-g8998-00164-1710262031.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w update image-taimen-opm1.171019.021.zip
XiorgON said:
thanks for your help !
is good now what do you think ?
please note that. i want to make batch ta will factory restore and relock bootloader
i dont know if i need to set active partition for factory restore or just for the bootloader locking process.
adb reboot bootloader
fastboot --set-active a
fastboot flash bootloader bootloader-taimen-tmz12bb.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-taimen-g8998-00164-1710262031.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w update image-taimen-opm1.171019.021.zip
fastboot reboot-bootloader
fastboot --set-active b
fastboot flash bootloader bootloader-taimen-tmz12bb.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-taimen-g8998-00164-1710262031.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w update image-taimen-opm1.171019.021.zip
Click to expand...
Click to collapse
If you clean flash the factory image, that will wipe your phone and return it to stock. Then you can just run the bootloader locking commands. Not sure why you want to make a script to do that, but best of luck to ya :good:
Badger50 said:
If you clean flash the factory image, that will wipe your phone and return it to stock. Then you can just run the bootloader locking commands. Not sure why you want to make a script to do that, but best of luck to ya :good:
Click to expand...
Click to collapse
ok so why is telling that is needed to set active a or b ?
i need to set it or not ?
XiorgON said:
ok so why is telling that is needed to set active a or b ?
i need to set it or not ?
Click to expand...
Click to collapse
If your clean flashing the factory image via fastboot, then it doesn't matter. It'll wipe the phone and install the OS to both slots.
XiorgON said:
ok so why is telling that is needed to set active a or b ?
i need to set it or not ?
Click to expand...
Click to collapse
I flashed the developer preview using the flashall.sh file and did not have to flash to a then b. The script takes care of that.
how do i find out which partition is active and what is installed on each partition?
To find out which slot is active, go into bootloader state and type "fastboot getvar all".
aboodyaiman said:
To find out which slot is active, go into bootloader state and type "fastboot getvar all".
Click to expand...
Click to collapse
That will work and tell you far more than is needed. I humbly submit the following command:
fastboot getvar current-slot
Another way (if you don't have a computer)
Is to flash a module through magisk, you'll see at the top of the flash script, magisk will show you what slot it is flashing the module to.
That will be your current/active slot.
what does this command
fastboot --set-active=a
actually do ?
do i really need to type
fastboot --set-active=a
right after fastboot flash vendor_boot_ab vendor_boot_alioth.img ??
you have a partition a/b device. you are setting partition a as active
so its a good thing to do ?
reg66 said:
you have a partition a/b device. you are setting partition a as active
Click to expand...
Click to collapse
Does anyone have the full fastboot flashing steps from the Bootloader to everyfile in the image file.zip?
I'm not sure exactly what you're asking. To be rooted? To merely flash full stock firmware? If the latter, just extract the full firmware zip and the latest Platform Tools into the same folder. If you don't want to wipe your phone, edit the Flash-All.bat with Notepad (assuming you're running Windows) and remove the "-w ", and save the file. Then open a command prompt in that folder, type Flash-All.bat and press enter. That's it.
If you're asking what are the steps the Flash-All.bat takes to flash everything that's in the inner zip file that's unextracted, just open the Flash-All.bat with Notepad and take a look.
If you're wanting to be rooted, [GUIDE] Root Pixel 6 Pro with Magisk.
If none of my guesses are correct, please be more specific of what exactly you're asking.
Wouldn't it be just fastboot flash filename "file location" for each file?
spart0n said:
Wouldn't it be just fastboot flash filename "file location" for each file?
Click to expand...
Click to collapse
Every device is different, with Motorola we started with :
fastboot gat-var
and flashed each image seperately.
The "flash-all.bat" only does a "fastboot update <update.zip>" - so no individual flashing of image files.....
s3axel said:
The "flash-all.bat" only does a "fastboot update <update.zip>" - so no individual flashing of image files.....
Click to expand...
Click to collapse
Yea, but i cannot tell where the image.zip is getting hung up at if i run that.
AndroidAddict420 said:
Yea, but i cannot tell where the image.zip is getting hung up at if i run that.
Click to expand...
Click to collapse
You could open a command shell and run the flash-all.bat from there - then you at least see the output of the command.
Or you can enter the commands from the flash-all.bat manually in a commandline window (everything starting with "fastboot..." )....
s3axel said:
You could open a command shell and run the flash-all.bat from there - then you at least see the output of the command.
Or you can enter the commands from the flash-all.bat manually in a commandline window (everything starting with "fastboot..." )....
Click to expand...
Click to collapse
I am using LIX
AndroidAddict420 said:
I am using LIX
Click to expand...
Click to collapse
OK, I don't know LIX - is that some kind of Linux ?
I would still assume you can execute the dividual fastboot commands from the flash-all.bat (flash-all.sh) manually ?!
s3axel said:
OK, I don't know LIX - is that some kind of Linux ?
I would still assume you can execute the dividual fastboot commands from the flash-all.bat (flash-all.sh) manually ?!
Click to expand...
Click to collapse
LIX is short for Linux
I'm not sure if fastboot would work in a Linux terminal window as I've always used Windows... Best of luck finding a solution!
Oh, and by the way, you can use fastboot in CMD and flash individual partitions with it. An example command of flashing the bootloader file would be:
"fastboot flash bootloader bootloaderfilename.img"
You essentially just have to change the last word before the filename to flash different partitions (aside from when you're flashing the update image, as it's a little bit different then).
Also note that the bootloader.img file would have to be in the exact same location as your adb and fastboot files. But again, I'm not at all sure how it would work on Linux...
NippleSauce said:
I'm not sure if fastboot would work in a Linux terminal window as I've always used Windows... Best of luck finding a solution!
Oh, and by the way, you can use fastboot in CMD and flash individual partitions with it. An example command of flashing the bootloader file would be:
"fastboot flash bootloader bootloaderfilename.img"
You essentially just have to change the last word before the filename to flash different partitions (aside from when you're flashing the update image, as it's a little bit different then).
Also note that the bootloader.img file would have to be in the exact same location as your adb and fastboot files. But again, I'm not at all sure how it would work on Linux...
Click to expand...
Click to collapse
Why would anyone ever change their bootloader?
spart0n said:
Why would anyone ever change their bootloader?
Click to expand...
Click to collapse
To update it.
If you want to flash each image separately, you can follow these steps (for some images, sequence is important, so I suggest following the sequence below to avoid issues)
Code:
################################################
### Files from the root of the factory image zip
################################################
# bootloader (replace <version> with the bootloader file version)
fastboot flash bootloader bootloader-raven-slider-<version>.img
# reboot to bootloader
fastboot reboot bootloader
# radio (replace <version> with the radio file version)
fastboot flash radio radio-raven-<version>.img
# reboot to bootloader
fastboot reboot bootloader
#####################################################
### Files from the image zip in the factory image zip
#####################################################
# boot
fastboot flash boot boot.img
# dtbo
fastboot flash dtbo dtbo.img
# vbmeta
fastboot flash vbmeta vbmeta.img
# vbmeta_system
fastboot flash vbmeta_system vbmeta_system.img
# vbmeta_vendor
fastboot flash vbmeta_vendor vbmeta_vendor.img
# vendor_boot
fastboot flash vendor_boot vendor_boot.img
# reboot to fastboot
fastboot reboot fastboot
# super
fastboot flash super super_empty.img
# product
fastboot flash product product.img
# system
fastboot flash system system.img
# system_ext
fastboot flash system_ext system_ext.img
# system_other (replace <other> with the inactive slot)
fastboot flash system_<other> system_other.img
# vendor
fastboot flash vendor vendor.img
# vendor_dlkm
fastboot flash vendor_dlkm vendor_dlkm.img
# reboot
fastboot reboot