- Back to Home »
- Android »
- How to use adb
Tuesday, June 26, 2012
Android Debug Bridge (ADB) is a good tool,
It allows you to access the action directly on the Android,
For example, to delete the Android files within a file on Android under
You can also get some information, or singled out the Android files within the ... and so on.
Some people will say, Eclipse can do these functions,
I guess, the Eclipse should also use adb to access it?
Eclipse can do the command seems to only a few.
According to the official website
http://developer.android.com/guide/developing/tools/adb.html
It can be seen, adb super multi-functional.
For several commonly used to illustrate the good:
ADB on the Android SDK platform-tools under, before version 2.1 is on the tools under
Cmd under should always call the adb, you must set the environment variable
Set an environment variable to set the environment variable under Linux in the Window
adb shell
Allows you to enter the android system inside the console above to see
# Represents a gain root privileges if you see
The $ represents the only shell access
If you get an apk, may not be caught from the market down.
Caught from the computer down.
Then can use the adb install instructions, and install it to your phone.
Can be under the command:
adb install path / xxx.apk
Will be installed by default in the / system / the app / under
Enter
# Adb shell
# Cd / system / app
# Ls
Will enter the shell and then to the / system / app folder below, the contents of the folder is displayed.
If you want a file, such as pictures, movies or music to put the phone,
You can use the adb push command.
Command is as follows
adb push xxx.avi / sdcard / movies
adb push xxx.mp3 / sdcard / music
adb push xxx.jpg / sdcard / image
If the sdcard below the specified folder will be out of the error message,
Therefore, we can enter adb shell to establish a
Command is as follows
adb shell
# Cd / sdcard
# Mkdir image
# Exit
adb push xxx.jpg / sdcard / image
Can be successful.
If you want an existing apk taken out to a friend
Then you can use adb pull instruction fetch it out.
Instruction as follows:
the path you want to place the adb pull / system / app / xxx.apk
Such as
window the following commands
adb pull / system / app / xxx.apk c: \
The following instructions under linux
adb pull / system / app / xxx.apk ~ /
This will be placed under the path you specified.
Want to see the computer there are several connections with the device,
You can use this command adb devices.
Want to see the current Android message
You can under adb logcat this command.
It allows you to access the action directly on the Android,
For example, to delete the Android files within a file on Android under
You can also get some information, or singled out the Android files within the ... and so on.
Some people will say, Eclipse can do these functions,
I guess, the Eclipse should also use adb to access it?
Eclipse can do the command seems to only a few.
According to the official website
http://developer.android.com/guide/developing/tools/adb.html
It can be seen, adb super multi-functional.
For several commonly used to illustrate the good:
ADB on the Android SDK platform-tools under, before version 2.1 is on the tools under
Cmd under should always call the adb, you must set the environment variable
Set an environment variable to set the environment variable under Linux in the Window
adb shell
Allows you to enter the android system inside the console above to see
# Represents a gain root privileges if you see
The $ represents the only shell access
If you get an apk, may not be caught from the market down.
Caught from the computer down.
Then can use the adb install instructions, and install it to your phone.
Can be under the command:
adb install path / xxx.apk
Will be installed by default in the / system / the app / under
Enter
# Adb shell
# Cd / system / app
# Ls
Will enter the shell and then to the / system / app folder below, the contents of the folder is displayed.
If you want a file, such as pictures, movies or music to put the phone,
You can use the adb push command.
Command is as follows
adb push xxx.avi / sdcard / movies
adb push xxx.mp3 / sdcard / music
adb push xxx.jpg / sdcard / image
If the sdcard below the specified folder will be out of the error message,
Therefore, we can enter adb shell to establish a
Command is as follows
adb shell
# Cd / sdcard
# Mkdir image
# Exit
adb push xxx.jpg / sdcard / image
Can be successful.
If you want an existing apk taken out to a friend
Then you can use adb pull instruction fetch it out.
Instruction as follows:
the path you want to place the adb pull / system / app / xxx.apk
Such as
window the following commands
adb pull / system / app / xxx.apk c: \
The following instructions under linux
adb pull / system / app / xxx.apk ~ /
This will be placed under the path you specified.
Want to see the computer there are several connections with the device,
You can use this command adb devices.
Want to see the current Android message
You can under adb logcat this command.