Skip to content

Instantly share code, notes, and snippets.

@azkadev
Forked from qb0C80aE/android_chroot.sh
Created August 9, 2024 23:41
Show Gist options
  • Save azkadev/6ddd20a44056a00c0ca47ea1cf9fa172 to your computer and use it in GitHub Desktop.
Save azkadev/6ddd20a44056a00c0ca47ea1cf9fa172 to your computer and use it in GitHub Desktop.

Revisions

  1. @qb0C80aE qb0C80aE revised this gist Dec 2, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion android_chroot.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ mount -o bind /dev /data/local/tmp/linux_root/dev
    mount -o bind /dev/pts /data/local/tmp/linux_root/dev/pts
    mount -t sysfs /sys /data/local/tmp/linux_root/sys
    mount -t proc /proc /data/local/tmp/linux_root/proc
    export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
    export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/system/bin:/system/xbin
    export TERM=xterm
    export HOME=/root
    chroot /data/local/tmp/linux_root /bin/bash
  2. @qb0C80aE qb0C80aE renamed this gist May 11, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gistfile1.txt → android_chroot.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    #!/system/bin/sh
    cd /data/local/tmp
    mount -o bind /dev /data/local/tmp/linux_root/dev
    mount -o bind /dev/pts /data/local/tmp/linux_root/dev/pts
  3. @qb0C80aE qb0C80aE created this gist Jul 23, 2015.
    9 changes: 9 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    cd /data/local/tmp
    mount -o bind /dev /data/local/tmp/linux_root/dev
    mount -o bind /dev/pts /data/local/tmp/linux_root/dev/pts
    mount -t sysfs /sys /data/local/tmp/linux_root/sys
    mount -t proc /proc /data/local/tmp/linux_root/proc
    export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
    export TERM=xterm
    export HOME=/root
    chroot /data/local/tmp/linux_root /bin/bash