LoginSignup
1
2

More than 3 years have passed since last update.

[Android] adbコマンドが覚えられない。。。

Last updated at Posted at 2019-09-26

adbコマンド便利なんだけど、機能多すぎて覚えられない。。。
そんな折、AOSPでbashの補完スクリプトを用意してくれていることに気づいて感動したので、備忘メモ。

source等で読み込むと、adbのサブコマンドに対してTAB補完が効くようになる(そのまま)。

$ source sdk/bash_completion/adb.bash

asciicast

上記動画のように、dumpsysの引数まで補完可能。
他にも、ターゲット側のファイルパスやパッケージ名など、かなり幅広く補完してくれる。
bashを使っている場合はとりあえず有効にしておくことをオススメします。

確認環境は、Android 8.1、PCはUbuntu18.04です。

参考

adb.bash
adb command reference - Android Developer
記事にAsciinemaを埋め込むことができるようになりました

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2