[Google Pixel 3 Guides, News, & Discussion] underworld737:
PREREQUISITES:

UNLOCKED BOOTLOADER

AT LEAST 40% FREE STORAGE

A GENERAL SENSE OF PATIENCE

SOME EXPERIENCE OF USING A COMMAND LINE

Guide that might be pointless for most people, but here it is.

Story of how this started, SKIP IF YOU WANT TO GET STRAIGHT TO THE GUIDE.

Spoiler content hidden.

Spoiler content hidden.

NOW TO THE GUIDE:

1. Grab the latest version of DSU Sideloader, Termux, and Shizuku

DSU Sideloader: https://github.com/VegaBobo/DSU-Sideloader/releases

Shizuku: https://github.com/RikkaApps/Shizuku/releases

Termux: https://github.com/termux/termux-app/releases

NOTE: It Doesn't have to be specifically DSU Sideloader, practically anything that helps with sideloading GSI Images, and Isn't an old app will work too, your results can vary.

2. Grabbing a GSI Image, it can also be any GSI image that's android 11+,

make sure the tags for that particular GSI image are BvS, very important; Do not choose one with vndklite support

B meaning A/B Support

v meaning vanilla android "no GAPPS"

S meaning built in PHH Superuser "kind of like SuperSU"

I Preferably would use a LineageOS android 13 GSI ROM, with the tags mentioned above for the best chances of this guide working:

https://sourceforge.net/projects/andyyan-gsi/files/lineage-20-td/lineage-20.0-20231214-UNOFFICIAL-arm64_bvS.img.xz/download

3. Once downloaded, head over to the DSU Sideloader app you have installed earlier, grant it storage permissions by choosing a directory for the app to store the IMG files, acknowledge that you need an

unlocked bootloader

to sideload DSU images

[*]Locate your GSI image you've downloaded earlier "Typically in the Downloads Folder".

[*]Adjust your userdata size, 2GB is enough and is the default value if left unticked, DON'T TICK IMAGE SIZE.

[*]Recheck and make sure that you have at least 40% free storage, as mentioned in above, otherwise the DSU installation will fail.

[*]Proceed and now time to play the waiting game.

4. Once it's flashed, head over to shizuku, in the section "Start via Wireless debugging", make sure you have WiFi enabled

[*]Press Pairing, Grant it notification permissions, press the Developer options redirct, go back to the app and go back to the main screen, return to settings, scroll down until you see "Wireless debugging", enable and allow, press the setting text itself to get into the wireless debigging settings.

[*]Press "Pair device with pairing code", wait for a notification from shizuku saying "pairing serivce found", press "enter pairing code", and enter the Wi-Fi paring code that displays under it, usually a 6-digit code

[*] Once paired successfully, go back to shizuku, and press start, this could take a few tries, repeat from the last bulletin point if it keeps bringing up a dialong

5. A New option will appear "Use Shizuku in terminal apps", now exit shizuku and open termux

[*]Once in termux, type termux-setup-storage ,grant it storage permissions as redircted.

[*]Exit termux and open shizuku again and press "Export files", swipe right from the left side of the screen "or press the 3 horizontal lines on the top left" press the termux storage option, and export the files there by pressing "USE THIS FOLDER".

[*]Exit shizuku and open termux again, type nano rish

[*]Go to line 24, or press CTRL+W, and find "PKG", replace RISH_APPLICATION_ID="PKG" with RISH_APPLICATION_ID="com.termux"
, press CTRL+X, then press Y, then press enter on the keyboard.

[*]Now type in termux sh rish

6. Go back to shizuku, press "See commands", copy text from the 2nd textbox, which would look like this:

sh "/storage/emulated/0/Android/data/vegabobo.dsusideloader/files/install" copy that.

[*]Go back to termux, paste the text you just copied, press enter.

[*]Authenticate if needed, then the image should start installing in the background.

[*]Now to play the waiting game again.

7. Once finished, press "Restart" on the notification, you will eventually be rebooted into your GSI rom into the setup screen, setup as needed including connecting to wifi, adjust the settings as you needed.

8. Now go to browser, install the latest version of the following apps

Termux:

Releases · termux/termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages. - termux/termux-app

github.com

Magisk:

Releases · topjohnwu/Magisk

The Magic Mask for Android. Contribute to topjohnwu/Magisk development by creating an account on GitHub.

github.com

9. Once downloaded, install them via the notification you get after downloading them "or by the built in file manager"

[*]Open termux, allow notifications, then type termux-setup-storage, allow permissions as prompted

[*]Type su, allow superuser as prompted by the PHH superuser app.

[*]IMPORTANT: Now type dd if=/dev/block/by-name/boot_a of=/sdcard/boot.img and press enter,

do not repeat process for boot_b, due of it not being necessary

[

*]Exit Termux and enter Magisk, DENY SUPERUSER REQUEST, GRANTING IT WILL CAUSE THE APP TO BE STUCK ON THE SPLASH SCREEN.

[*]In Magisk, press install in the Magisk section, select "Select and Patch a File", go to the directory you extracted the file to and select your boot.img file from earlier, press "Let's Go" and wait for it to finish

[*]When it's done, return to termux and type cp /sdcard/Download/magisk_patched-xxxxx_xxxxx.img /dev/block/by-name/boot_a "or simply press tab after you typed cp /sdcard/Download/magisk then type the rest just to be precise". Repeat for boot_b by doing

cp /sdcard/Download/magisk_patched-xxxxx_xxxxx.img /dev/block/by-name/boot_b

10. Now reboot, it will return to stock android, you will get a prompt to finish installing magisk, and for it to restart to finish flashing some proprietary stuff.

THERE, YOU ARE NOW ROOTED, YOU CAN FLASH A TWRP INSTALLER FOR THIS DEVICE: https://dl.twrp.me/blueline/twrp-installer-3.7.0_12-0-blueline.zip.html

MAKE SURE AFTER YOU FINISH FLASHING TWRP VIA MAGISK, THAT YOU DON'T RESTART, RATHER GO TO THE HOME PAGE AND DIRECTLY INSTALL MAGISK AGAIN TO RETAIN ROOT BEFORE REBOOTING TO TWRP

There, you have both TWRP and Magisk, do whatever you want now, flash a custom rom, kernel or anything. I will be making a guide on how to root your custom rom without having to go through the DSU sideloader method again eventually in post 3.

I Hope this guide helps for anyone that has encountered the same situation as I have

I have no idea if this could possibly work on a bootloader locked device, if anyone is willing to try that, I would love to hear your results from that.

And this could theoretically work for most devices with an unlocked bootloader, but this guide is for the pixel 3 "and possibly the entire 3 series".