android:adb

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
android:adb [2022/08/25 07:08] – [バックアップ [backup]] ともやんandroid:adb [2024/04/17 12:42] (現在) – [ヘルプ [help]] ともやん
行 6: 行 6:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<b class=GRN>$</b> <b class=HIY>dnf</b> install android-tools+<font color="#FF8700"><b>$</b></font> <font color="#26A269"><u style="text-decoration-style:single">sudo</u></font> <font color="#26A269">dnf</font> install android-tools
 </pre></html></WRAP> </pre></html></WRAP>
-<WRAP color_result><html><pre> +<WRAP color_result_hlong><html><pre>メタデータの期限切れの最終確認: 4:50:25 前の 20240417日 074458秒 に実施しました。
-メタデータの期限切れの最終確認: 2:41:47 時間前の 20220819日 090859秒 に実施しました。+
 依存関係が解決しました。 依存関係が解決しました。
-==================================================================================================== +============================================================================================================== 
- パッケージ                アーキテクチャー   バージョン                   リポジトリー       サイズ + パッケージ                  アーキテクチャー     バージョン                      リポジトリー          サイズ 
-====================================================================================================+==============================================================================================================
 インストール: インストール:
- <b class=GRN>android-tools</b>             x86_64             1:31.0.2-3.fc36              fedora             1.M+ <font color="#26A269"><b>android-tools              </b></font> x86_64               1:34.0.4-4.fc39                 updates               1.M
  
 トランザクションの概要 トランザクションの概要
-====================================================================================================+==============================================================================================================
 インストール  1 パッケージ インストール  1 パッケージ
  
-ダウンロードサイズの合計: 1.+ダウンロードサイズの合計: 1.
-インストール後のサイズ: 4.M+インストール後のサイズ: 5.M
 これでよろしいですか? [y/N]: y これでよろしいですか? [y/N]: y
 パッケージのダウンロード: パッケージのダウンロード:
-android-tools-31.0.2-3.fc36.x86_64.rpm                              493 kB/s | 1.MB     00:03     +android-tools-34.0.4-4.fc39.x86_64.rpm                                        1.7 MB/s | 1.MB     00:01     
----------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------------------------------- 
-合計                                                                289 kB/s | 1.MB     00:05     +合計                                                                          1.2 MB/s | 1.MB     00:01     
 トランザクションの確認を実行中 トランザクションの確認を実行中
 トランザクションの確認に成功しました。 トランザクションの確認に成功しました。
行 33: 行 32:
 トランザクションのテストに成功しました。 トランザクションのテストに成功しました。
 トランザクションを実行中 トランザクションを実行中
-  準備             :                                                                            1/1  +  準備             :                                                                                      1/1  
-  インストール中   : android-tools-1:31.0.2-3.fc36.x86_64                                       1/1  +  インストール中   : android-tools-1:34.0.4-4.fc39.x86_64                                                 1/1  
-  scriptletの実行中: android-tools-1:31.0.2-3.fc36.x86_64                                       1/1  +  scriptletの実行中: android-tools-1:34.0.4-4.fc39.x86_64                                                 1/1  
-  検証             : android-tools-1:31.0.2-3.fc36.x86_64                                       1/1 +  検証             : android-tools-1:34.0.4-4.fc39.x86_64                                                 1/1 
  
 インストール済み: インストール済み:
-  android-tools-1:31.0.2-3.fc36.x86_64                                                              +  android-tools-1:34.0.4-4.fc39.x86_64                                                                        
  
 完了しました! 完了しました!
行 48: 行 47:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<b class=GRN>$</b> <b class=HIY>adb</b> version+<font color="#FF8700"><b>$</b></font> <font color="#26A269">adb</font> version
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
 Android Debug Bridge version 1.0.41 Android Debug Bridge version 1.0.41
-Version 31.0.2-android-tools+Version 34.0.4-android-tools
 Installed as /usr/bin/adb Installed as /usr/bin/adb
 +Running on Linux 6.8.5-201.fc39.x86_64 (x86_64)
 </pre></html></WRAP> </pre></html></WRAP>
 </WRAP> </WRAP>
行 82: 行 82:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<b class=GRN>$</b> <b class=HIY>adb</b> help+<font color="#FF8700"><b>$</b></font> <font color="#26A269">adb</font> help
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result_long><html><pre> <WRAP color_result_long><html><pre>
 Android Debug Bridge version 1.0.41 Android Debug Bridge version 1.0.41
-Version 31.0.2-android-tools+Version 34.0.4-android-tools
 Installed as /usr/bin/adb Installed as /usr/bin/adb
 +Running on Linux 6.8.5-201.fc39.x86_64 (x86_64)
  
 global options: global options:
- -a         listen on all network interfaces, not just localhost + -a                       listen on all network interfaces, not just localhost 
- -d         use USB device (error if multiple devices connected) + -d                       use USB device (error if multiple devices connected) 
- -e         use TCP/IP device (error if multiple TCP/IP devices available) + -e                       use TCP/IP device (error if multiple TCP/IP devices available) 
- -s SERIAL  use device with given serial (overrides $ANDROID_SERIAL) + -s SERIAL                use device with given serial (overrides $ANDROID_SERIAL) 
- -t ID      use device with given transport id + -t ID                    use device with given transport id 
- -H         name of adb server host [default=localhost] + -H                       name of adb server host [default=localhost] 
- -P         port of adb server [default=5037] + -P                       port of adb server [default=5037] 
- -L SOCKET  listen on given socket for adb server [default=tcp:localhost:5037]+ -L SOCKET                listen on given socket for adb server [default=tcp:localhost:5037] 
 + --one-device SERIAL|USB  only allowed with &apos;start-server&apos; or &apos;server nodaemon&apos;, server will only connect to one USB device, specified by a serial number or USB device address. 
 + --exit-on-write-error    exit if stdout is closed
  
 general commands: general commands:
行 113: 行 116:
  forward [--no-rebind] LOCAL REMOTE  forward [--no-rebind] LOCAL REMOTE
      forward socket connection using:      forward socket connection using:
-       tcp:<port(<localmay be "tcp:0to pick any open port) +       tcp:&lt;port&gt; (&lt;local&gt; may be &quot;tcp:0&quot; to pick any open port) 
-       localabstract:<unix domain socket name> +       localabstract:&lt;unix domain socket name&gt; 
-       localreserved:<unix domain socket name> +       localreserved:&lt;unix domain socket name&gt; 
-       localfilesystem:<unix domain socket name> +       localfilesystem:&lt;unix domain socket name&gt; 
-       dev:<character device name> +       dev:&lt;character device name&gt; 
-       jdwp:<process pid(remote only) +       jdwp:&lt;process pid&gt; (remote only) 
-       vsock:<CID>:<port(remote only) +       vsock:&lt;CID&gt;:&lt;port&gt; (remote only) 
-       acceptfd:<fd(listen only)+       acceptfd:&lt;fd&gt; (listen only)
  forward --remove LOCAL   remove specific forward socket connection  forward --remove LOCAL   remove specific forward socket connection
  forward --remove-all     remove all forward socket connections  forward --remove-all     remove all forward socket connections
- ppp TTY [PARAMETER...]   run PPP over USB 
  reverse --list           list all reverse socket connections from device  reverse --list           list all reverse socket connections from device
  reverse [--no-rebind] REMOTE LOCAL  reverse [--no-rebind] REMOTE LOCAL
      reverse socket connection using:      reverse socket connection using:
-       tcp:<port(<remotemay be "tcp:0to pick any open port) +       tcp:&lt;port&gt; (&lt;remote&gt; may be &quot;tcp:0&quot; to pick any open port) 
-       localabstract:<unix domain socket name> +       localabstract:&lt;unix domain socket name&gt; 
-       localreserved:<unix domain socket name> +       localreserved:&lt;unix domain socket name&gt; 
-       localfilesystem:<unix domain socket name>+       localfilesystem:&lt;unix domain socket name&gt;
  reverse --remove REMOTE  remove specific reverse socket connection  reverse --remove REMOTE  remove specific reverse socket connection
  reverse --remove-all     remove all reverse socket connections from device  reverse --remove-all     remove all reverse socket connections from device
行 141: 行 143:
      --sync: only push files that are newer on the host than the device      --sync: only push files that are newer on the host than the device
      -n: dry run: push files to device without storing to the filesystem      -n: dry run: push files to device without storing to the filesystem
-     -z: enable compression with a specified algorithm (anynonebrotli)+     -z: enable compression with a specified algorithm (any/none/brotli/lz4/zstd)
      -Z: disable compression      -Z: disable compression
  pull [-a] [-z ALGORITHM] [-Z] REMOTE... LOCAL  pull [-a] [-z ALGORITHM] [-Z] REMOTE... LOCAL
      copy files/dirs from device      copy files/dirs from device
      -a: preserve file timestamp and mode      -a: preserve file timestamp and mode
-     -z: enable compression with a specified algorithm (anynonebrotli)+     -z: enable compression with a specified algorithm (any/none/brotli/lz4/zstd)
      -Z: disable compression      -Z: disable compression
  sync [-l] [-z ALGORITHM] [-Z] [all|data|odm|oem|product|system|system_ext|vendor]  sync [-l] [-z ALGORITHM] [-Z] [all|data|odm|oem|product|system|system_ext|vendor]
      sync a local build from $ANDROID_PRODUCT_OUT to the device (default all)      sync a local build from $ANDROID_PRODUCT_OUT to the device (default all)
      -n: dry run: push files to device without storing to the filesystem      -n: dry run: push files to device without storing to the filesystem
-     -l: list files that would be copied, but don't copy them +     -l: list files that would be copied, but don&apos;t copy them 
-     -z: enable compression with a specified algorithm (anynonebrotli)+     -z: enable compression with a specified algorithm (any/none/brotli/lz4/zstd)
      -Z: disable compression      -Z: disable compression
  
行 158: 行 160:
  shell [-e ESCAPE] [-n] [-Tt] [-x] [COMMAND...]  shell [-e ESCAPE] [-n] [-Tt] [-x] [COMMAND...]
      run remote shell command (interactive shell if no command given)      run remote shell command (interactive shell if no command given)
-     -e: choose escape character, or "none"; default '~' +     -e: choose escape character, or &quot;none&quot;; default &apos;~&apos; 
-     -n: don't read from stdin+     -n: don&apos;t read from stdin
      -T: disable pty allocation      -T: disable pty allocation
      -t: allocate a pty if on a tty (-tt: force pty allocation)      -t: allocate a pty if on a tty (-tt: force pty allocation)
行 177: 行 179:
      -p: partial application install (install-multiple only)      -p: partial application install (install-multiple only)
      -g: grant all runtime permissions      -g: grant all runtime permissions
-     --abi ABI: override platform's default ABI+     --abi ABI: override platform&apos;s default ABI
      --instant: cause the app to be installed as an ephemeral install app      --instant: cause the app to be installed as an ephemeral install app
      --no-streaming: always push APK to device and invoke Package Manager as separate steps      --no-streaming: always push APK to device and invoke Package Manager as separate steps
行 190: 行 192:
  uninstall [-k] PACKAGE  uninstall [-k] PACKAGE
      remove this app package from the device      remove this app package from the device
-     '-k': keep the data and cache directories+     &apos;-k&apos;: keep the data and cache directories
  
 debugging: debugging:
行 196: 行 198:
      write bugreport to given PATH [default=bugreport.zip];      write bugreport to given PATH [default=bugreport.zip];
      if PATH is a directory, the bug report is saved in that directory.      if PATH is a directory, the bug report is saved in that directory.
-     devices that don't support zipped bug reports output to stdout.+     devices that don&apos;t support zipped bug reports output to stdout.
  jdwp                     list pids of processes hosting a JDWP transport  jdwp                     list pids of processes hosting a JDWP transport
  logcat                   show device log (logcat --help for more)  logcat                   show device log (logcat --help for more)
行 212: 行 214:
      TRANSPORT: usb, local, or any [default=any]      TRANSPORT: usb, local, or any [default=any]
  get-state                print offline | bootloader | device  get-state                print offline | bootloader | device
- get-serialno             print <serial-number> + get-serialno             print &lt;serial-number&gt; 
- get-devpath              print <device-path>+ get-devpath              print &lt;device-path&gt;
  remount [-R]  remount [-R]
       remount partitions read-write. if a reboot is required, -R will       remount partitions read-write. if a reboot is required, -R will
行 235: 行 237:
  reconnect offline        reset offline/unauthorized devices to force reconnect  reconnect offline        reset offline/unauthorized devices to force reconnect
  
 +usb:
 + attach                   attach a detached USB device
 + detach                   detach from a USB device to allow use by other processes
 environment variables: environment variables:
  $ADB_TRACE  $ADB_TRACE
行 244: 行 249:
  $ADB_LOCAL_TRANSPORT_MAX_PORT max emulator scan port (default 5585, 16 emus)  $ADB_LOCAL_TRANSPORT_MAX_PORT max emulator scan port (default 5585, 16 emus)
  $ADB_MDNS_AUTO_CONNECT   comma-separated list of mdns services to allow auto-connect (default adb-tls-connect)  $ADB_MDNS_AUTO_CONNECT   comma-separated list of mdns services to allow auto-connect (default adb-tls-connect)
 +
 +Online documentation: https://android.googlesource.com/platform/packages/modules/adb/+/refs/heads/master/docs/user/adb.1.md
 +
 </pre></html></WRAP> </pre></html></WRAP>
 </WRAP> </WRAP>
行 842: 行 850:
 [[https://cartman0.hatenablog.com/entry/2020/09/08/Android%E3%82%A2%E3%83%97%E3%83%AA%E5%8D%98%E4%BD%93%E3%82%92adb%E3%81%A7%E3%83%90%E3%83%83%E3%82%AF%E3%82%A2%E3%83%83%E3%83%97/%E3%83%AA%E3%82%B9%E3%83%88%E3%82%A2%E3%81%99%E3%82%8B|Androidアプリ単体をadbでバックアップ/リストアする - はしくれエンジニアもどきのメモ]]\\ [[https://cartman0.hatenablog.com/entry/2020/09/08/Android%E3%82%A2%E3%83%97%E3%83%AA%E5%8D%98%E4%BD%93%E3%82%92adb%E3%81%A7%E3%83%90%E3%83%83%E3%82%AF%E3%82%A2%E3%83%83%E3%83%97/%E3%83%AA%E3%82%B9%E3%83%88%E3%82%A2%E3%81%99%E3%82%8B|Androidアプリ単体をadbでバックアップ/リストアする - はしくれエンジニアもどきのメモ]]\\
 [[https://maku77.github.io/p/uh84kfj/|ADB で Android 端末にインストールされているパッケージの一覧を取得する (pm list packages) - まくまくAndroidノート]]\\ [[https://maku77.github.io/p/uh84kfj/|ADB で Android 端末にインストールされているパッケージの一覧を取得する (pm list packages) - まくまくAndroidノート]]\\
 +
 +==== 付録 ====
 +[[tw>tomoyan596sp/status/1562564167277871104|]]\\
  
  • android/adb.1661378881.txt.gz
  • 最終更新: 2022/08/25 07:08
  • by ともやん