-
-
Save mikklfr/1573244348820a72a0ec2f927cb82b0d to your computer and use it in GitHub Desktop.
Flashing Android By Hand
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this comes from the Apache2-Licensed AOSP script. | |
| # filenames in this script represent the Pixel 3 ("blueline") | |
| # first Android 11 (RP1A) release. | |
| # This didn't actually work, in my experience, but an almost | |
| # identical (save the filenames) process worked for Android 9-10. | |
| # you should update your SDK tools first. | |
| if ! [ $($(which fastboot) --version | grep "version" | cut -c18-23 | sed 's/\.//g' ) -ge 2802 ]; then | |
| echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" | |
| exit 1 | |
| fi | |
| # reboot your device into the bootloader mode: | |
| adb reboot bootloader | |
| # flash latest bootloader | |
| fastboot flash bootloader bootloader-blueline-b1c1-0.3-6623201.img | |
| # reboot | |
| fastboot reboot-bootloader | |
| # the script has sleep 5 here. I advise copy/paste, or if you want to script it | |
| # add a "ready for next step" wait, because it might take longer than 5s. | |
| # now the modem | |
| fastboot flash radio radio-blueline-g845-00107-200702-b-6648703.img | |
| fastboot reboot-bootloader | |
| # Why are we doing this bit? Well, firstly you'll want the boot partition to root with | |
| # magisk. Secondly, you want a clean boot.img partition (unless you signed your | |
| # boot.img) otherwise rescue won't work and you won't be able to get to userspace | |
| # fastbootd. | |
| # If you never rooted your device this should be safe to skip. | |
| # fastbootd magic hack. At the bootloader prompt: | |
| mkdir -p img && pushd img | |
| unzip ../image-blueline-rp1a.200720.009.zip | |
| popd | |
| fastboot flash boot img/boot.img | |
| fastboot reboot-bootloader | |
| # now, at the bootloader screen pick the "rescue" option and wait a bit. | |
| # it will complain no command. Give it some help to find fastbootd | |
| # in the new usermode fashion: | |
| adb reboot fastboot | |
| # wait for fastbootd to display. It is an up/down style menu, not | |
| # the red fastboot screen at boot. Then run this: | |
| fastboot update image-blueline-rp1a.200720.009.zip | |
| # NOTE: I have removed -w from the AOSP script. If you leave this in it will | |
| # wipe your userdata. Add it if you want a factory reset as part of the | |
| # process. | |
| # if you did this at the fastboot screen, Android 10+ will refuse to flash it | |
| # because it wants fastbootd. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment