New installation of Ubuntu, the first time to install the Android SDK, enter the command will appear not found
~$ adb
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'zdb' from package 'zfs-fuse' (universe)
Command 'mdb' from package 'mono-debugger' (universe)
Command 'kdb' from package 'elektra-bin' (universe)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'ab' from package 'apache2-utils' (main)
Command 'ad' from package 'netatalk' (universe)
adb: command not found
No configuration required
vim .bashrc
Then add the following content:
export ANDROID_HOME=/home/jerikc/tools/android/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
Then run it
. .bashrc
$ adb
Android Debug Bridge version 1.0.29
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
The problem has been solved
Similar Posts:
- How to Solve Android wireless debug Error
- The method of eliminating “more than one device and emulator” in ADB
- Serial port debugging assistant open error [How to Solve]
- [Solved] PANIC: Missing emulator engine program for ‘x86’ CPUS.
- Initialization of react native Android [How to Solve]
- Install and run Android in Androidx86 emulator – This adb server’s $ADB_VENDOR_KEYS is not set
- How to connect Android mobile phone with ADB & reasons and solutions of unable to connect to 192.168.1.100:5555
- adb server version (31) doesn’t match this client (41); killing…
- Android Studio: Waiting target device come online
- Android Studio Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT (Solved)