Skip to content

Instantly share code, notes, and snippets.

@sergiusens
Last active August 29, 2015 14:05
Show Gist options
  • Save sergiusens/17d11843b9605feeb6bf to your computer and use it in GitHub Desktop.
Save sergiusens/17d11843b9605feeb6bf to your computer and use it in GitHub Desktop.
Install from recovery
function install_from_recovery {
adb shell mkdir /mnt
adb shell mount /data/ubuntu.img /mnt
adb push "$1" /mnt/
adb shell PATH=/bin:/usr/bin:/sbin:/usr/sbin chroot /mnt /usr/bin/dpkg -i "/$1"
adb shell "rm /mnt/$1"
adb shell sync
adb shell umount /mnt
adb shell rmdir /mnt
adb reboot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment