yashsingh1/xdaforums huggingface dataset:
[Google Pixel 7] hammered58:
Posting my findings here on how I rooted my p7, no links ,,as always do your homework before attempting . Plus I did a complete factory image reset via adb flashall.bat, I hope I didn't miss a step, Iam coming from a pixel 4a so it's almost the same

1, install latest adb platform tools on computer

2, unlock bootloader on p7

3, Download latest release of pixel 7 factory image on computer

4, unzip and copy init_boot.img to folder in phone

5, install latest Magisk 25.2 on phone

6, patch the init_boot.img with magisk

7, transfer patched file back to adb platform tools folder

8, enter bootloader do a "fastboot flash init_boot magskpatchedfile.img.

9, reboot and test,

I have removed the _a in the cmd line as it appears its not needed

This is what finally worked for me after much testing and reading in the p7p forum. There may be additional steps to get safety net and such to work there is a lot of info on the p7p forum.

Ok,, this how I flashed ,and will flash, the new updates coming out so as not to lose data ,this will NOT do a wipe plus it's faster ,,,,, I know there are multiple other ways but for now I choose this,, hth

1. Download the correct ota file here

https://developers.google.com/android/ota and copy to adb folder

2. Place phone in factory recovery and toggle to apply update from adb,,

3. Open cmd prompt in adb folder type adb sideload factoryota.zip ,,,takes 5-10 minutes to complete, reboot ,,

if rooted,

1 download correct full image zip here

https://developers.google.com/android/images. That matches ota you just flashed,

2 extract the ini.boot.img , patch with magisk and reflash in adb for root
[Google Pixel 7] V0latyle:
Does the screen come on at all? In your other post you said it was black. If there's nothing at all on the screen, your phone is probably bricked.
[Google Pixel 7] V0latyle:
Have you tried a hard reset - hold the power button down for 10 seconds or so until the phone vibrates?
[Google Pixel 7] hammered58:
You didn't try the steps I listed as I never said to flash a rooted bootloader
[Google Pixel 7] twykomantis:
You may need to disable Verity and Verification. I flashed my stock image back to the phone using the tool here: https://flash.android.com/ and checked the boxes to disable verity and verification, then followed the steps above. Important to note that booting to Bootloader tells you which slot is active, and running the command fastboot flash init_boot magisk_patched_25205_GUID.img automatically patches the active boot slot. From there you just need to run the Universal Safety net fix from KDrag0n and the latest MagiskHide and you should be good to go
[Google Pixel 7] mnemonical:
Thank you for the help, turned out the _a was screwing me over, works great now!
[Google Pixel 7] hammered58:
I know ,,that was messing me up too, it did not work untill I put that part in,, don't ask me why! Lol
[Google Pixel 7] googletermsofservice:
Has anyone been able to get the root version of Vanced Youtube to install? I'm getting an error saying that stock app is too new and it can't be downgraded.
[Google Pixel 7] atom_jack:
I imagine if you can uninstall the stock youtube app you'd be able to install Vanced from there.
[Google Pixel 7] googletermsofservice:
I'll give it a try
[Google Pixel 7] Hitman478™:
Use the non replace version of revanced and disable stock YT
[Google Pixel 7] googletermsofservice:
Revanced Manager app is just going to black screen after install
[Google Pixel 7] AxelM:
Question: What did this command do? "fastboot flash init_boot_a magskpatchedfile.img" does it flash or just boot? Would it also be possible to do: "fastboot boot init_boot_a magskpatchedfile.img" and than install in inactive slot with magisk?
[Google Pixel 7] hammered58:
I don't know ,,I just posted what worked for me, your mileage may very!! The "fastboot boot" cmd was usually used for something like twrp afaik
[Google Pixel 7] Hitman478™:
I've it installed and it's working without any issue
[Google Pixel 7] Hitman478™:
Use fastboot flash init_boot "image.img" without quotes and without specific the partition, it will goes on the active one, for me it has working at first try
[Google Pixel 7] AxelM:
THX, in fact the "fastboot boot" command was used a lot with OnePlus devices because it is safer to boot in the rooted os and when there is an error you can just reboot without the command...and when you install it afterwards with magisk you know it will work :)
[Google Pixel 7] cliko:
Does Universal Safetynet Fix work?
[Google Pixel 7] atom_jack:
Just wanted to thank OP. My Pixel 7 arrived about an hour ago, got the bootloader unlocked no problem, then actually I flashed the latest System Image first, then had Magisk patch init_boot.img, flashed that, easy peasy.
[Google Pixel 7] jnss98b:
It's usually used to temporarily boot a patched boot image and then you can do direct install in magisk manager
[Google Pixel 7] sewage_fruit:
Thank you OP!! I was on slot b.
[Google Pixel 7] humb13:
Hey guys. I'm getting a Pixel 7 to replace the old Oneplus 8 and I'm reading the rooting instructions hammered58 posted.

Mnemonical: You said it was the _a that was causing the trouble. I don't understand the error. Did you fix the problem by omitting the _a or did you get confused and flash to the inactive slot (_b)?

Hitman478: Let me make sure I understand. You're saying you can skip the _a (or _b) entirely and it will default to the active slot? Just making sure.

Also: Magisk is easy to find. But where exactly do you download the factory image from? Would it be the boot.img file or the whole thing and then extract boot.img with Payload Dumper?

I'm assuming unlocking the bootloader is the same as on the Oneplus. On it you go into Developers Options, then Unlock Bootloader and activate USB Debugging. Plug in and type "fastboot oem unlock". Is this correct on the Pixel too?

Thanks,
[Google Pixel 7] hammered58:
Hello

Factory images here, unzip and you will find init file https://developers.google.com/android/images

unlocking cmd " fastboot flashing unlock"

the "_a " slot add on is the only way I could get the cmd to work and give me root, I tried the cmd without it, but it was not recognized, you can try not adding it and see if yours works

hth
[Google Pixel 7] Hitman478™:
Yes indeed is what i've sayd. I came from a long time experience of flashing firmwares over custom roms.

What i did was:

1)Connect phone with android booted on my PC

2)enabled ADB and oem unlock

3)rebooted with adb to bootloader

4)then typed in windows prompt "fastboot flashing unlock" (like it is sayd from google on factory image page)

5)bootloader unlocked

6)boot android and make first configuration again

7)install magisk apk

8)extract init_boot.img from factory image

9)patched it with magisk

10)then from bootloader "fastboot flash init_boot magisk_patched_bla_bla_bla.img (if you're on slot A it will be flashed on slot A and vice-versa)

11)rebooted to android to check root and was successfully done.

Make sure during the flashing operation you're on bootloader and not on fastbootD (i did not even know for sure if this device have the fastbootD)
[Google Pixel 7] daggorlad:
I just used the guide for the Pixel 7 Pro, of course subbing in the correct factory image rather. No issues at all
[Google Pixel 7] AxelM:
Could you check whether this command worked on the pixel?
[Google Pixel 7] jnss98b:
I've always rooted my pixel this way. Boot the magisk patched image and then perform a direct install in magisk manager. Not sure if it works with the pixel 7 series using init_boot tho. I wouldn't risk it bc it's just a different way to do the same thing
[Google Pixel 7] AxelM:
You are probably right...but as far as I understand this is a flash command: "fastboot flash init_boot magisk_patched.img" which should be by definition more difficult or not?

Did anybody know whether the command "fastboot boot init_boot_a magskpatchedfile.img" work? Or is it not recomanded and might lead to problems?
[Google Pixel 7] humb13:
Hey again,

Thanks to all you guys for help. I ordered the Pixel 7. Let's wait a few days for it to get here.

On past Android phones I've had, you can get to the bootloader mode by pressing the power key together with the volume-down key (vol-up on Samsung). You can't do that on the Pixel? Must you plug in and type "adb reboot bootloader" to do that? Incidentally, I have no idea what the fastbootD mode is or how to even get there if I wanted to.(?)

Also, should you update the phone before unlocking and flashing init_boot.img? Or should you extract the image zip file to the platform tools folder and run the flash-all.bat file?
[Google Pixel 7] hammered58:
Good choice,You will like it ,So far no complaints on my end,

You can still get to bootloader by the power key and vol ,I just tried it, I have assist disabled in gestures so it will work like normal.

You can actually toggle fastboot on in factory recovery mode, you will also see it when flashing factory images via flashall.bat or android flash tool.

All i can say is updating via flashall.bat or android flash tool will be a heck of alot quicker the taking the ota update but I dont think its nessasary to update first but I would so your not hit with the nag screens. hth
[Google Pixel 7] humb13:
After doing some research I bought a Pixel 6 for my lady and it works great. I decided to wait for the 7 to upgrade mine. Hers doesn't really need root. Mine does. And of course I'm done with Oneplus, which is why I'm here.

Based on what I'm seeing there's really no need to even bother with Power-Vol at all. Just plug the phone in and type "adb reboot bootloader". There seems to be no need to bother with that other FastbootD (or whatever) mode. I'm assuming that's the recovery mode. Pls correct me if I'm wrong.

Upgrading the Oneplus via OTA would fail if the phone was rooted. You had to reflash the stock boot.img file, perform the upgrade, patch the new boot.img file and reflash. This does not appear to the case with the Pixel. It seems upgrades will install regardless of whether or not the phone is rooted. All you need to do is reflash init_boot.img. Another thing that surprises me is that OTA updates take forever on the Pixel. Oneplus has only OTA updates, and it took maybe 5 to 10 minutes. Be that as it may, I'll follow your advice and use flash-all.bat when upgrades become available.

Rooting the Pixel with Magisk isn't all that different than the Oneplus. That's why all this wasn't really hard to understand. However, it's not exactly the same. It's precisely the differences I'm focusing on.
[Google Pixel 7] djkurious:
Does "fastboot flash init_boot_a magskpatchedfile.img blah blah" flash both slots?
[Google Pixel 7] Hitman478™:
No, as you can see there, you're specifing that you want to flash in boot_a

But, as i wrote up, i suggest you to do not specific that, only write "fastboot flash init_boot init_boot.img" it will be automatic flashed on the current active slot (its not discounted that you're on slot A, you can check on bootloader screen)
[Google Pixel 7] djkurious:
Thank you for the info!
[Google Pixel 7] rspkt:
Followed the Pixel 7 Pro guide here and everything including SafetyNet went flawlessly. It's basically the same as the OP but uses only "fastboot flash init_boot magisk_patched.img" removing the "_a" or "_b" (whichever the case may be) designation on the "init_boot" portion of that line:

https://xdaforums.com/t/unlock-boot...net-working-again-all-relevant-links.4502805/

I may suggest the OP update their guide to reflect using the command "fastboot flash init_boot etc..." instead of the one they have which specifies that "init_boot_a" command.
[Google Pixel 7] hammered58:
I took your advice and changed my wording to exclude the _a on the patched init.img file.

I just blew everything away on my phone and reinstalled root without the _a and it worked great, I don't know what happened the first time when I thought I needed it.
[Google Pixel 7] Dracozirion:
If you get "FAILED (remote: partition (init_boot) not found)", just use CMD to address fastboot instead of PowerShell.
[Google Pixel 7] humb13:
Well, I finally received my Pixel 7. After 2½ hours of head-butting I finally got the damn thing to work. Let me explain what happened for the benefit of those who might run into the same issues.

After bringing up Developers Options, the Unlock Bootloader entry was grayed out. Fortunately the Pixel Pro rooting site had a fix: get online and type *#*#2432546#*#* into the phone's dialer. It worked.

As has been mentioned many times, unlocking the bootloader resets everything. Once again you have to bring up Developers Options and activate USB Debugging to continue. Even the device's MAC address changes in case you have access control on your router.

There was an update available. Despite the fact that the amount of data downloaded was a mere 75 MB, the update took forever. I waited until it finished.

Installing Magisk and patching the init_boot.img file was pretty easy. When attempting to root I misread the instructions and believed init_boot on the command line was part of the filename. Upon realizing the mistake, and since the error messages used the word "partition", I used init_boot_b after using the getvar command. It worked! It's now clear that the use of _a or _b after init_boot is optional. It'll work with or without mentioning the active slot.

For the benefit of those of you who might not know, I strongly suggest installing a Magisk module called Shamiko. It's an excellent root hider and it worked for me. I stumbled upon it by accident. Get it at magiskroot.net or from Github. Zygisk must be enabled and Enforced Denylist disabled. After you install it go to Configure Denylist and pick out the apps you want to hide root from.

Hope all his helps.
[Google Pixel 7] humb13:
My previous message was a little long so let me ask a quick question. To update, is it a simple matter of looking to see if newer Panther files are available? If so, then do we just download them, unzip to the same folder as the platform tools and run the flash-all batch file after removing the -w (or use the online flash tool)? Then for rooting just extract the init_boot.img file, patch and flash??

Not to be redundant, but it's hard to believe it's that easy. In all previous rooted Android phones I've had, upgrades were much more difficult. If indeed this is all it takes, then Pixel rulez!!
[Google Pixel 7] forever_lol:
I came to Pixel 7 from OP 9 Pro. I second this. Yesterday i rollled back from beta to last stable. Ota size was merely 500 mb and it took over an hour to install, unbelievable!

Regarding rooting pixel 7 vs op is very very close (of course op doesn't have init_boot partition) however I mostly used fastboot boot patched boot.img and then direct installation from magisk app.
[Google Pixel 7] hammered58:
You a correct , and if your rooted you can add a cmd to keep root, plus there are a few more ways to update , 1,, is the pixel flasher tool . Ty dev!

https://xdaforums.com/t/pixelflasher-for-google-pixel-7-support-thread.4505289/

And you could also flash the appropriate ota via adb sideload in the stock recovery mode.
[Google Pixel 7] :
I've rooted my Pixel already using the initial method on this thread but I still see a notification for a 75 MB update. The image I used was already the October 2022 one, but I redownloaded and patched it again with PixelFlasher. The update is still there, what should I do about it?

Also is it necessary to download the latest factory image for every monthly update going forward or is there a smaller file available with just the updates?
[Google Pixel 7] hammered58:
I would take the update to lose the nag screen, it may take awhile they are slow , also if your rooted you will loose root., Unless you follow a specific procedure, but it's pretty easy to re-root.
[Google Pixel 7] :
How would I re-root it? Do I have to get the image from the phone after it's updated?
[Google Pixel 7] hammered58:
If u do lose root just make sure phone build matches the build from the factory firmware page, down load the correct image ,,,pull the init_boot.img ,, patch it and then flash it via fastboot cmd,,

Factory Images for Nexus and Pixel Devices | Google Play services | Google for Developers

developers.google.com
[Google Pixel 7] humb13:
I ran into another issue with my new Pixel 7. The phone would eat battery like there's no tomorrow. Also, when you plug in to charge it, the battery level would barely move up a percentage point. Using a higher capacity charger didn't help and I started to believe I got stuck with a bad phone. Then I stumbled upon the problem. It seems some nitwit at Google added a "feature" called "battery share". Supposedly it enables you to use your battery to charge other devices. Since other devices are being charged, it gobbles up your battery in no time. And no, it DOES NOT automatically turn itself off if no devices are detected. To put the icing on the cake, there is NO NOTIFICATION - your battery is being eaten alive and you have no idea what's going on. I turned it off manually and the problem was solved. Gotta be careful though -- plug the phone in and it turns itself back on. Does anybody know a way to disable this garbage permanently?
[Google Pixel 7] hammered58:
Mine stays off all the time,unless I click it on,
[Google Pixel 7] humb13:
Thanks for your input. Based on this and on the fact that nobody else is complaining, I can only assume that I got lucky and ended up with a bad phone. I chatted with Google and they can't identify the issue either. They suggested I swap it out. Fortunately Amazon is very flexible. My new phone arrives in a few days, then I send this one back.

I've never need to do this before, so let me ask: What is the best way to back up my user apps (and settings) to a file and restore them to the new phone? Better than than having to reinstall and configure one by one. User apps only please.
[Google Pixel 7] hammered58:
Having 90 plus user apps I can only tell you what I use and am completely satisfied with it , It is not perfect ,,,Swift Backup, it's not 100 percent in app data restore but it does the job for the most part, it is a pay for app
[Google Pixel 7] humb13:
Oh, I agree! Other than this issue with battery share turning on (and staying on), the phone is awesome. That's why I swapped it out instead of returning it and ordering another. Hopefully this one won't have the same problem. I hate the trial and error method when looking for a solution.

Incidentally, I saw a Youtube video that you can simply connect a cable between the old and new phone and it's transfer the data and everything else. Hopefully it won't transfer the bug too.
[Google Pixel 7] nikitasius:
works perfectly.

before reading that i patched and flashed boot.img :)

Then i've seen "there are no root!", so flashed back vanilla boot.img, patched init_boot.img and flashed init_boot.
[Google Pixel 7] hammered58:
same thing I did when I first flashed , it put my phone in a bootloader bootloop, had to reflash original boot.img, did my homework then flash init_boot.img
[Google Pixel 7] nikitasius:
Hmm, strange, mine is loaded well. Thanks for sharing btw, good to know that it can create a bootloop.

On weekend i'd like to try rooted GrapheneOS. After having LoS of my previous phone "google's android w/ gapps" looks crazy for me :|
[Google Pixel 7] humb13:
My new phone arrived. This one appears to work great. For starters the Unlock entry in developers option is not grayed out like the first phone (none of this *#*#24.. garbage). I'm noticing it runs faster and better. Battery share comes on when you plug the phone in and disables itself after a few minutes. According to Google this is normal. Everything looks OK.

Now the bad news. In order to return the first phone I wanted to essentially bring it back to stock. Everything I read said this could be done by simply relocking the bootloader, i.e., it would wipe the phone just like unlocking does. That's all I did and now the entire operating system is gone. I can't even communicate with the device to try flashing the big file we download from Google.

I told Amazon the phone had a problem because of the battery share issue. They swapped it out. Now I'm afraid to return it the way it is. I have until Nov 19th to send it back. Can anybody help?
[Google Pixel 7] hammered58:
You could try the android flash tool or the pixel flasher to see if one of those recognize your phone, but I am afraid if it's indeed oem bootloader relocked your options are not good imho ,, can you get to the bootloader screen by holding power and and vol down, then once in bootloader toggle to recovery hit the power and tap the vol up button , and in recovery you could try factory reset again hth
[Google Pixel 7] Ma61187:
Am currently rooted on the factory stock image that arrived with the phone. Wanted to check that if I install the 75mb update that I can take the init_boot.img that I patched with Magisk before and reflash it to re-root after installing.
[Google Pixel 7] humb13:
I did manage to get to the fastboot screen. It was locked. Typing "fastboot flashing unlock" solved that problem. Flash-all.bat didn't work. I then went to the Android Flash Tool. At first it couldn't find the phone. After clicking search it did. Then it reported the original Google OS couldn't be flashed and offered an alternative, called AOSP Panther. I flashed it and the phone is working, only with a different version of Android 13. Since it's no longer bricked and can boot, decided to quit while I'm ahead and send it back. This phone is jinxed! The new one works fine.

Also, both phones sometimes when plugged in it says "Connected - Not Charging". Since it's highly irregular that 2 different phones have the same issue when none of the others do, it seem to me this is a feature designed to improved battery life. This would especially apply to me because I do deliveries on the side and the phone is almost always plugged it to a car inverter with a charger.
[Google Pixel 7] humb13:
AFAIK the update will work but it will reroot your phone. Simply download the latest OS zip file from Google, extract init_boot.img and reflash. You're back in business.
[Google Pixel 7] Ma61187:
Ok will try this weekend when I have time
[Google Pixel 7] valeri_s_k:
Just a warning for all rooted to increase security immediately...

I have always used my phones rooted. This is my first Pixel and I have also did it. I was a little lazy to take some extra security measures immediately and left it for next day. Everething went smoot and working, until same evening. First my Facebook was attacked/hacked and later during the night one of my Fintech apps with some money stollen (hacker was able to read confirmation sms').

I am surprised how fast hackers catch it... Less than 12 hours after bootloader unlock/root !!!

After this robbery I made clear flash of factory rom, relocked bootloader and installed everything from scratch, hoping the phone is protected now...
[Google Pixel 7] hammered58:
Thanks for the heads up, I did not know that rooting would actually make it easier to get hacked unless you would install a already hackable piece of software that would help the would be hacker such as a unofficial custom ROM or the like. Maybe someone with better knowledge of how this would be possible can help explain
[Google Pixel 7] nikitasius:
I think it's a classic scenario with "xposed & chinese modules" or "free magisk non-opensource modules with 1 star". Thats for direct root access.

non-direct-root case: if that guy was lucky to not win the lottery, but got 0-day in one for the tools he use.. that will work on every phone under android 13 rooted it or not.

Also 3rd is he have a "virusfull pc" and simply loaded modded init_boot with dirty stuff inside :)

upd: case4 it's grapheneos dev or someone related who against the rooting as is.