yashsingh1/xdaforums huggingface dataset:
[Google Pixel 6] guniens:
Hi all!

I would like to root my Pixel 6 but I've been out from the modding scene since 2017 and everything is different now! My Pixel 6 is bootloader-locked, stock Android 13 manual installed when it came out via adb (didn't want to wait for the ota).

I'm having difficult times understanding if I can root directly with this tool and also the slots thing, does it apply to my case too?

Thanks in advance!
[Google Pixel 6] badabing2003:
I encourage everyone to read up on the guides, learn the what it takes to mod manually before jumping into using automated tools that do it for you.

Granted the learning curve at first could be steep, but the benefits are enormous, if anything goes wrong or not according to the plans, you would know how to recover.

If you still want to use PF without investing in learning the manual way,

The Basic Usage steps on the Main page page or the Github page is what you need to follow.

However considering that you're bootloader is locked, you need to unlock it first, PF has a button to do it, but it is not part of the automated process, as one would probably do this once.

Furthermore to be able to unlock the bootloader, you need to enable developer mode, turn on OEM unlock and ADB Debugging ...

Details of all of these are mentioned in the Guide threads, there are few great such guides links in the Help menu of PF, and you probably could find other good guides as well.

Speaking of slots, it applies to your device, Pixel 6 has two slots, but you don't have to worry about it, the only recommendation I would make is flash to inactive slot, this way if anything goes wrong, you can still go back to the previous slot, and if everything goes well, the inactive becomes the current active and you're good,

You repeat that on next month's release, this way you always have something to fallback to.

Good luck and don't shy away to ask questions if anything is unclear.
[Google Pixel 6] guniens:
Hi there! First of all, thanks for your response

As I said I've been out for a while and things changed quite a bit, however I still understand basic things about root, adb and fastboot.

I've read the guide about unlocking bootloader and root here but I found it a bit confusing so I think I will follow the part about unlocking bootloader and then use your tool to root. Is this fine?

I still don't understand the part about slots, when should I enable "flash to inactive slot"? When I flash the boot.img or the patched_boot.img?

Thanks again!
[Google Pixel 6] badabing2003:
Yes this is fine

Typically with PF, you don't flash the boot.img, you flash the patched_boot.img, PF automates the process for you so that with one flash you're updated and patched.

The basic flow is as follows

- you download a firmware, and select it in PF, no need to unpack the zip or extract files from it, just point to it, PF does the rest.

- you process the firmware (just press the button) which extracts and shows the the boot.img

- you select the boot and press the patch button

- you select your flash options (this is when you choose flash to inactive slot, and keep data)

- you flash
[Google Pixel 6] guniens:
Did everything and all went like a charm! So easy and straightforward!

I still have a question about monthly updates: Which updates I'm allowed to do directly on phone and which need to be done via PF to preserve root?

Thanks again for your help!
[Google Pixel 6] badabing2003:
I wouldn't do anything on the phone,

Much easier / quicker / reliable to do on PF,

Repeat the process as you did now.
[Google Pixel 6] guniens:
Yes I think the same but if I remember correctly there're play system updates, security updates and system updates (maybe also feature drops or they count as system update?). Which of then is mandatory doing in PF?
[Google Pixel 6] badabing2003:
Nothing is mandatory to do it in PF, it's a choice.

Security update / System Updates / Feature drops are all part of the firmware updates / OTA updates.

Play store updates are not part of it. I personally choose firmware updates through PF, I stay away from OTA (but that's my choice), if you choose to do OTA update and retain root, you have to follow the guides.
[Google Pixel 6] guniens:
Sorry mandatory was more like recommended. I must be dumb as I still don't understand.

Will my P6, now rooted, receive the otas? I won't do them and use PF instead

What's the factory image? A system update, a system update w/ latest security/play system updates?

Basically everytime there's a new factory image (monthly?) I repeat the process and I'm fully updated then?

Thanks and sorry to bother you!
[Google Pixel 6] badabing2003:
Please generate Sanitized support.zip from the help menu and submit that.

Thanks
[Google Pixel 6] badabing2003:
Possibly you would be prompted for updated, unless you turn it of in Developer Options.

But install of OTA will fail because you are rooted.

Hence turn it off in Developer options and never be bothered by it.

Yes, you repeat it every month and you would be updated,

Play store updates (apps) you do them in Playstore, they are not part of the firmware.
[Google Pixel 6] guniens:
Is the "Automatic system updates" in developer options? Sorry I'm italian so things may have different names.

Got it!

Yes, I was referring to the Play System Updates, not apps updates but understood anyway!

Well, thanks a lot!
[Google Pixel 6] badabing2003:
Yes

View attachment 5763939
[Google Pixel 6] badabing2003:
@thekdub

Here's I'll make it easier for you.

Just run this and it should tell us.
[Google Pixel 6] thekdub:
Microsoft Windows [Version 10.0.19043.1586]

(c) Microsoft Corporation. All rights reserved.

C:\Users\Kirk>"C:\Users\Kirk\AppData\Local\Temp\_MEI81482\bin\7z.exe" x -bd -y "C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip"

7-Zip 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26

Codec Load Error: C:\Users\Kirk\AppData\Local\Temp\_MEI81482\bin\7z.dll : The specified module could not be found.

Scanning the drive for archives:

1 file, 2421109643 bytes (2309 MiB)

Extracting archive: C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip

ERROR: C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip

Cannot open the file as archive

Can't open as archive: 1

Files: 0

Size: 0

Compressed: 0
[Google Pixel 6] thekdub:
Here is the output from the app:

Connect your device

==============================================================================

Preparing Package

==============================================================================

Found a previous package oriole-sp2a.220305.013.a3 deleting ...

Found Bundled 7zip.

zip/unzip operations will be faster

Unzipping Image: C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip into C:\Apps\PixelFlasher ...

debug: "C:\Users\Kirk\AppData\Local\Temp\_MEI139482\bin\7z.exe" x -bd -y "C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip"

Unzip time1: 0.15623927116394043

ERROR: Unzipped folder oriole-sp2a.220305.013.a3 not found.

debug: returncode is: 2

debug: stdout is:

7-Zip 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26

Codec Load Error: C:\Users\Kirk\AppData\Local\Temp\_MEI139482\bin\7z.dll : The specified module could not be found.

Scanning the drive for archives:

1 file, 2421109643 bytes (2309 MiB)

Extracting archive: C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip

Can't open as archive: 1

Files: 0

Size: 0

Compressed: 0

debug: stderr is: ERROR: C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip

Cannot open the file as archive

Disabling bundled 7zip ...

Trying unzip again with python libraries ...

Unzip time1.1: 22.784156322479248

Unzipped into oriole-sp2a.220305.013.a3 folder.

Extracting image-oriole-sp2a.220305.013.a3.zip ...

Unzipped into C:\Apps\PixelFlasher\oriole-sp2a.220305.013.a3\image-oriole-sp2a.220305.013.a3 folder.

Unzip time2: 42.36825108528137

Deleting boot.img from phone in /storage/emulated/0/Download ...

Making sure boot.img is not on the phone in /storage/emulated/0/Download ...

Deleting magisk_patched.img from phone in /storage/emulated/0/Download ...

Making sure magisk_patched.img is not on the phone in /storage/emulated/0/Download ...

Transfering boot.img to the phone in /storage/emulated/0/Download ...

debug: "C:\Users\Kirk\Desktop\platform-tools\adb.exe" -s 1A061FDF600H0X push "C:\Apps\PixelFlasher\oriole-sp2a.220305.013.a3\boot.img" /storage/emulated/0/Download/boot.img

C:\Apps\PixelFlasher\oriole-sp2a.220305.013.a3\boot.img: 1 file pushed, 0 skipped. 103.0 MB/s (67108864 bytes in 0.622s)

Making sure boot.img is found on the phone in /storage/emulated/0/Download ...

Magisk Tools not found on the phone

Looking for Magisk app ...

Unable to find magisk on the phone, perhaps it is hidden?

User pressed cancel.

Aborting ...
[Google Pixel 6] badabing2003:
@thekdub

Thanks for testing, I'm hoping this would fix the issue for good, let me know if it does, I'll clean up the code and make a new release.
[Google Pixel 6] thekdub:
It worked. Thanks.
[Google Pixel 6] badabing2003:
New Release:

March 22, 2022 v1.1.5-alpha release.

Some users were having issues with 7zip, add 7z.dll to the bundle.

Add fallback mechanism to use python libraries for unzipping when 7zip fails (it would be slower)
[Google Pixel 6] thekdub:
Sorry, stupid question...

The console says it's rebooting the phone into bootloader mode and waiting for device. My phone is sitting in fastboot mode. Am I supposed to wait or do I need to do something?
[Google Pixel 6] badabing2003:
What flash mode did you choose?

It is supposed to start flashing.

No errors no output?

Can you paste the last 10 lines of console?
[Google Pixel 6] thekdub:
Keep data.

The app is busy so I can't copy from the console. The last few lines are

Flashing phone

Rebooting the phone into bootloader mode

Flash mode: Keep data

Waiting for device
[Google Pixel 6] badabing2003:
weird, it feels like the fastboot command is waiting for the device and not seeing it that it is in fastboot mode.

open a windows command shell and type

fastboot devices, see if you see it.

Also what is your version of android platform tools?

fastboot --version

or

adb --version
[Google Pixel 6] thekdub:
Microsoft Windows [Version 10.0.19043.1586]

(c) Microsoft Corporation. All rights reserved.

C:\Users\Kirk\Desktop\platform-tools>fastboot devices

C:\Users\Kirk\Desktop\platform-tools>fastboot --version

fastboot version 33.0.1-8253317

Installed as C:\Users\Kirk\Desktop\platform-tools\fastboot.exe

C:\Users\Kirk\Desktop\platform-tools>
[Google Pixel 6] badabing2003:
fastboot devices returned nothing, so no wonder it is stuck there, maybe bad connection.

Unplug / replug the phone and do fastboot devices again and see if it detects it.

I'm assuming that the phone is still in fastboot mode.

if that still does not work, are you able to select on the phone to reboot back to bootloader?
[Google Pixel 6] thekdub:
Replug didnt work. If I restart bootloader, it goes back to fastboot mode.
[Google Pixel 6] badabing2003:
But still the fastboot devices shows no device?

I wonder if it is a regression in version 33.0.1

I'm on Version 33.0.0-8141338

Update: I just switched to Version 33.0.1-8253317 and it still worked for me

See this thread about adb working but fastboot not seeing devices

This also looks promising (driver issue)
[Google Pixel 6] thekdub:
I followed the steps from one of those threads and got fastboot devices to work, but now I'm stuck in a boot loop.
[Google Pixel 6] badabing2003:
You had it rooted before doing this?

What magisk modules did you have?
[Google Pixel 6] thekdub:
Since I had fastboot working, I went ahead and ran the flash-keep-data.bat and it seems to have worked.
[Google Pixel 6] thekdub:
Sorry for the aggravation and thanks for your help.
[Google Pixel 6] badabing2003:
New Release:

March 24, 2022 v1.2.0.1-alpha release.

Added Advanced Configuration menu which unlocks advanced features such as:

- Flashing to both slots

- Disabling Verity

- Disabling Verification

- (More features to come)

The UI will now display the chosen Android Platform Tool's version.

Added an option to toggle verbose console output (help troubleshooting, more verbosity to come).

Stability fixes.
[Google Pixel 6] freonchill:
first of all, thanks for making this, I was nervous after having some confusing conversations about the rooted updating process and have put it off for a while.

had a random adb disconnect at the start, but after I replugged and started again - it worked perfectly

rooted, flashed shipping firmware (12.0.0 (SD1A.210817.019.C2,Oct 2021) to current ((SP2A.220305.013.A3, Mar 2022))

did the package prep, dry run, keep data / dirty flash
[Google Pixel 6] guniens:
Hi @badabing2003

Sorry to bother you again but I have a question.

I ****ed up my phone installing Pixelify module (my bad, great module btw!) and I would like to format my phone and root again doing a clean setup.

First time I rooted I chosed: flash to inactive slot, wipe data so rooted image become active slot and non-rooted image the inactive one.

Is it possible to flash to the active slot? So I still have the non-rooted image in the inactive slot and I overwrite the image (****ed up) in the active one?

Thanks!
[Google Pixel 6] badabing2003:
Yes,

I suggest, the following

Flash to both slots with wipe , but don't choose a patched boot image, just select the stock boot. (the first entry in the boot list)

You will have stock on both slots.

After that, select the patched boot change flash options to custom

paste it and flash it.

View attachment 5769211
[Google Pixel 6] guniens:
Got it!

But why not wiping again when flashing the patched boot.img? I won't have any data as I wiped earlier

EDIT:

Not sure about this
[Google Pixel 6] badabing2003:
Wipe twice does not achieve anything, besides to get a patched image you would install Magisk, and that would be removed if you wipe again.

See the image I pasted, follow those steps, it would be self explanatory, let me know if it is still not clear.
[Google Pixel 6] guniens:
Will do like you said then!

Will do tomorrow and get back to you if I need help. Thank you so much for your help!
[Google Pixel 6] badabing2003:
New Release:

Dec 04, 2022 v4.5.0 release

New look (Artwork / Icons), compliments of @t-ryder (thank you), based on Material design icons.

New Feature: Package Manager, Install / Uninstall / Freeze (disable) / Unfreeze (enable) packages even system ones (root not required). Handy with Wifi ADB.

Use latest Python updated packages.

Ubuntu 22.04 support.

Miscellaneous improvements.
[Google Pixel 6] badabing2003:
New Release:

Dec 05, 2022 v4.6.0 release

Added single click button to easily flash just the boot/init_boot (stock or patched) to the phone.

#39 Display Flash Option changes in the console, and allow flashing to inactive slot in basic mode.

#39 Do the Magisk backup only when rooted.

Decouple OTA sideload from needing factory image.

Other minor improvements.
[Google Pixel 6] v.konvict:
any way i can use this to flash my pixel while in fastboot or adb recovery. i messed up my pixel 6 now i just want to restore it.
[Google Pixel 6] badabing2003:
Yes, If you're in fastboot, you can follow the steps and flash stock.

No need to create a patch, just select the stock boot.
[Google Pixel 6] Jaitsu:
Sorry to take so long to come back to this, but I had a lot of clutter from past use in my logs and wanted to try everything from scratch, but didn't want to reflash again at the time.

It still appears to be happening, with the latest PixelFlasher (from today) and the latest (December, non-beta) factory image. In fact, it also happened with another ROM installed without using PixelFlasher, so I think this is a bug with the device rather than PixelFlasher itself, especially since I don't see any errors in PixelFlasher, but I'll provide the logs nonetheless in case there's anything interesting to you. Here's my support zip: https://drive.google.com/open?id=1D...5584HL&authuser=fzdrgn@gmail.com&usp=drive_fs

Step-by-step:

* I had riceDroid installed to both slots, and at least the active slot was booting fine.

* I used PixelFlasher to extract and patch boot.img from the latest factory image.

* I selected the patched boot.img, set PixelFlasher to wipe data and install to both slots, then hit Flash Pixel Phone and let it work until it was finished. There were no errors.

* When it was done, the phone was set to slot B, and successfully booted.

* I then immediately rebooted to the bootloader, had PixelFlasher switch the phone to slot A, then rebooted to system.

* The phone did not boot. (Gets to the Google logo, then reboots back to the bootloader with reboot reason "reboot bootloader")

* This is where I generated support.zip, but after this, I switched back to slot A and confirmed that the phone DOES still boot from that slot.

What seems to be happening is that when I flash a system image to either slot, the other slot stops booting. If A is working and I flash B, then B works and A stops working. I have to flash the entire system image to fix it again; reflashing boot.img doesn't do this.

It's not the end of the world, since I always have one working slot, but it is strange. I might make a separate thread about this.
[Google Pixel 6] badabing2003:
New Release:

Dec 06, 2022 v4.6.1 release

#40 Handle locale related exceptions which were causing PixelFlasher to not launch on some Windows 11 systems.

Add the ability to download and install a special Magisk version that has modules loading intentionally disabled. Required to get out of bootloops and manage to disable modules.

Credit to gecowa6967 at XDA.
[Google Pixel 6] badabing2003:
I don't know much about riceDroid and if it does anything to your phone that could directly or indirectly cause this.

To be honest @V0latyle in another thread hinted that we need special tools to be able to boot to inactive slots, and that merely setting the other slot is not enough.

I need to learn the details of the process, right now PF simply does the switching of slots and does not set anything special, and of course it does it through fastboot.

If you end up creating a separate thread, post the link here so that I could follow or tag me.

If there anything I need to do in addition to just setting the slot, and if it is doable, I'll add it to PF.
[Google Pixel 6] V0latyle:
It's not so much special tools as the way the Android boot manager handles things. If you manually set a slot as active, it gets confused, so we have to "tell" it which slot to use. To do this we use bootctl.
[Google Pixel 6] V0latyle:
The -successful flag is set once the device has successfully booted from that slot. Meaning, it doesn't affect whether the device can boot from that slot, but rather is a marker to say whether it did

The odd thing here is that when a slot is set active, it's supposed to reset everything and presumably try to boot. But, this is the limit of my knowledge.
[Google Pixel 6] badabing2003:
If my interpretations are: According to the official document.

The first highlighted block tells us that if the flag is not set, the slot will not be picked for boot.

And @capntrips here reported that he manually toggled the flag and it booted fine.

View attachment 5779789

See the second highlighted block

When --set-active is used, the successful flag is cleared

Which answers why it was clearing, but then it is a catch 22

If it is cleared, it won't boot to it?

I don't get it.

Or does clearing means setting it to True?
[Google Pixel 6] V0latyle:
Or maybe it clears the value entirely and it's left at null?

I have no idea :(

IIRC, it's not possible to set variables in fastboot, correct? For example, you can't just use fastboot setvar?
[Google Pixel 6] V0latyle:
Reading up on source...Kernel slot arguments

In the BootControl.hal:

/**
* markBootSuccessful() marks the current slot as having booted successfully.
*
* Returns whether the command succeeded.
*/
markBootSuccessful() generates (CommandResult error);
/**
* setActiveBootSlot() marks the slot passed in parameter as the active boot
* slot (see getCurrentSlot for an explanation of the "slot" parameter). This
* overrides any previous call to setSlotAsUnbootable.
* Returns whether the command succeeded.
*/
setActiveBootSlot(Slot slot) generates (CommandResult error);
[Google Pixel 6] Jaitsu:
(bootloader) slot-count:2
(bootloader) slot-fastboot-ok:a:yes
(bootloader) slot-fastboot-ok:b:yes
(bootloader) slot-retry-count:a:2
(bootloader) slot-retry-count:b:2
(bootloader) slot-successful:a:yes
(bootloader) slot-successful:b:no
(bootloader) slot-suffixes:_a,_b
(bootloader) slot-unbootable:a:no
(bootloader) slot-unbootable:b:no

Yeah, seeing pretty much the same thing, so far as I can tell. Most recently I reflashed slot A to see what'd happen to slot B, and sure enough, B's no longer booting, and more testing yielded the same pattern of results you got. I see a setActiveBootSlot(Slot slot) function in what @V0latyle is researching - does that function do something different than fastboot --set-active=x?

At any rate, that pretty much confirms this doesn't actually have anything to do with PixelFlasher doing anything *wrong*; I guess I was just misunderstanding the nature of A/B device slots, and they're intended more solely for seamless OTAs than for having two actual functional boot slots at the same time? If there's no way to have both slots bootable and switchable from the phone itself, it seems like flashing both slots might be redundant anyway.
[Google Pixel 6] badabing2003:
Looks like it.

One would hope that at least flashing to inactive slot, and something goes wrong during the flashing, the system will still be able to boot to the previously valid slot, in which case choosing that option is still usefull, but yeah, flashing both slots would be riskier in case anything goes wrong during the flashing.

@V0latyle

Do you know if anyone has ever successfully switched slots and booted to it after dirty flashing?
[Google Pixel 6] V0latyle:
Yes, dual booting was never supposed to be possible. Note that there is only one slot for /data - the A/B layout only applies to the "critical" partitions - /bootloader, /radio, /boot, /system, /vbmeta, etc

It is. But if one slot fails to boot for whatever reason, the other slot will be up to date.
[Google Pixel 6] badabing2003:
Correct, that is my understanding as well.

Yes I'm aware of that, however I was hoping it would be possible to boot both slots with the same data.

For example one with patched boot, the other stock.

Given the findings

I think one time flashing to both slots would be more dangerous than flashing to inactive slot.

I can see the following scenarios.

Initial state:

slot a active and operational

slot b in good state, but not bootable (based on the above)

Scenario 1:

Something happens to slot a while in normal operation, and it becomes unbootable

we won't be able to boot to slot b because of the above findings.

Scenario 2:

We flash to both slots, and something goes wrong during flashing

Both slots are bad, hence not bootable.

Scenario 3:

We flash to Inactive slot b, and something goes wrong during flashing

Expectation is that slot a is still good and hence bootable

To get to the initial state on a factory device that only has one slot bootable we have two options:

Flash to both slots and hope nothing goes wrong during flashing

Flash to inactive slot

In case of 1, if something goes wrong, we're toast (similar to scenario 2)

In case of 2, if something goes wrong, hopefully we're still good (scenario 3)

So in all cases, flashing to both slots is worse than flashing to inactive slot.

However one needs to be mindfull of not attempting to boot to switched slot on a factory shipped phone before completing the flashing.

Did I get anything wrong?
[Google Pixel 6] tiiiit74:
Hello everyone, subject probably already discussed but I can't find despite my research :

What is the difference between a tP1a factory image versus a tQ1a ?

I am currently under the version 13.0.0 (TP1A.221105.002, Nov 2022) on my Pixel 6, flashed with Pixel Flasher.

But this month there is only the 13.0.0 (TQ1A.221205.011, Dec 2022) available.

Thank you in advance.