Skip to content

Instantly share code, notes, and snippets.

@GMMan
Last active April 14, 2019 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GMMan/235a16ebc70366cc2ee0443a6e1e1fad to your computer and use it in GitHub Desktop.
Save GMMan/235a16ebc70366cc2ee0443a6e1e1fad to your computer and use it in GitHub Desktop.
OTG flashing instructions

The install isn't too bad as long as you have shell access and can work your way around the command line. Assuming you have BleemSync payload installed:

  1. Download and place the new kernel image on a USB drive.
  2. Plug the PSC to your computer and turn it on.
  3. Plug in the USB drive to the PSC.
  4. Open a telnet connection to the PSC.
  5. Depending on whether you're booting a solution off the USB drive, you may need to mount it. If you don't see anything in /media, do this:
    systemctl stop usb_watch
    mount /dev/sda1 /media
  6. Backup the original kernel image:
    cat /dev/disk/by-partlabel/BOOTIMG1 > /media/BOOTIMG1_ORIGINAL
  7. Flash the new kernel image (note: this is different from honeylab's instructions to use fastboot; because the kernel is decompressed and loaded to memory at boot, it's not read from disk while it's running, and this saves you some trouble from having to crack open the device, install drivers and fastboot, and timing issues. You'll still need fastboot if you screw something up and have to restore the original kernel):
    cat /media/otg_sdp_disabled.img > /dev/disk/by-partlabel/BOOTIMG1
  8. Modify /usr/bin/start_pman to semi-intelligently put the port in the right mode. Replace line 12-18 with
    if [ "$CHG_INFO" -eq "3" ]; then
      echo change to hostmode
      echo idle > /sys/devices/platform/mt_usb/swmode
      sleep 1
      echo host > /sys/devices/platform/mt_usb/swmode
      sleep 1
    fi
  9. Unmount USB drive and reboot. If you're using a solution, hit the power button. Otherwise:
    cd
    umount /media
    reboot

It should boot the new kernel now. Note do not touch BOOTIMG2, that's for recovery boot and there's no good reason to mess with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment