最終更新:2024-08-13 (火) 13:08:44 (34d)  

adb shell
Top / adb shell

shell [-e ESCAPE] [-n] [-Tt] [-x] [COMMAND...]     Run remote shell command (interactive shell if no command given).

https://android.googlesource.com/platform/packages/modules/adb/ /refs/heads/master/docs/user/adb.1.md

デバイス指定

  • adb -s <device> shell

su

  • adb shell "su -c 'やりたいこまんど'"

グローバルオプション

  • -a         listen on all network interfaces, not just localhost
    -d         use USB device (error if multiple devices connected)
    -e         use TCP/IP device (error if multiple TCP/IP devices available)
    -s SERIAL  use device with given serial (overrides $ANDROID_SERIAL)
    -t ID      use device with given transport id

help

  • shell [-e ESCAPE] [-n] [-Tt] [-x] [COMMAND...]
        run remote shell command (interactive shell if no command given)
        -e: choose escape character, or "none"; default '~'
        -n: don't read from stdin
        -T: disable pty allocation
        -t: allocate a pty if on a tty (-tt: force pty allocation)
        -x: disable remote exit codes and stdout/stderr separation

rootになるdefault.propの項目