Created
May 25, 2018 19:56
-
-
Save SkypLabs/af5e18de8bbb846438f45315552007c8 to your computer and use it in GitHub Desktop.
Script used to chroot into a Debian system from an Android system - See https://blog.skyplabs.net/2012/01/20/allier-android-en-gui-et-debian-en-cli-sur-la-asus-transformer-prime/ (French)
This file contains 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
ROOT=/data/local/tmp/mydebian | |
BB=/system/xbin | |
if ! ls $ROOT/proc/1 > /dev/null | |
then | |
$BB/mount --bind /dev $ROOT/dev | |
$BB/mount --bind /proc $ROOT/proc | |
$BB/mount --bind /sys $ROOT/sys | |
$BB/mount --bind /dev/pts $ROOT/dev/pts | |
fi | |
export PATH=/bin:/sbin:/usr/bin:/usr/sbin | |
$BB/chroot $ROOT /bin/su -c "/bin/bash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment