Skip to content

Instantly share code, notes, and snippets.

@mikklfr
Forked from diagprov/flash.sh
Created April 4, 2021 06:33
Show Gist options
  • Select an option

  • Save mikklfr/1573244348820a72a0ec2f927cb82b0d to your computer and use it in GitHub Desktop.

Select an option

Save mikklfr/1573244348820a72a0ec2f927cb82b0d to your computer and use it in GitHub Desktop.

Revisions

  1. @diagprov diagprov revised this gist Sep 26, 2020. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion flash.sh
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,12 @@ fastboot reboot-bootloader
    fastboot flash radio radio-blueline-g845-00107-200702-b-6648703.img
    fastboot reboot-bootloader

    # fastbootd magic hack. At the bootloader prompt
    # 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
  2. @diagprov diagprov revised this gist Sep 26, 2020. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions flash.sh
    Original file line number Diff line number Diff line change
    @@ -40,6 +40,9 @@ 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.
  3. @diagprov diagprov revised this gist Sep 26, 2020. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions flash.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,8 @@
    # 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
  4. @diagprov diagprov revised this gist Sep 26, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flash.sh
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ if ! [ $($(which fastboot) --version | grep "version" | cut -c18-23 | sed 's/\./
    fi

    # reboot your device into the bootloader mode:
    adb reboot bootloder
    adb reboot bootloader

    # flash latest bootloader
    fastboot flash bootloader bootloader-blueline-b1c1-0.3-6623201.img
  5. @diagprov diagprov renamed this gist Sep 26, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. @diagprov diagprov created this gist Sep 26, 2020.
    41 changes: 41 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    # this comes from the Apache2-Licensed AOSP script.

    # 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 bootloder

    # 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

    # 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

    # if you did this at the fastboot screen, Android 10+ will refuse to flash it
    # because it wants fastbootd.