ADB is very well known as the tool to manually install APK’s, but there are some other useful commands.
ADB is a command line tool that acts as the bridge between you and your android device. I want to show you some of them, but first, let’s make sure we have everything needed to use ADB.
First, you need to have Java and the Android SDK installed on your PC, you can download it from here:
Java SDK: Java SE - Downloads | Oracle Technology Network | Oracle
Android SDK: http://developer.android.com/sdk/index.html
Once it is installed, it is recommended to update the SDK Manager
Once you have done this, flash the Freescale Android BSP onto your board…
Once you have installed it, you need to enable USB Debugging in the Developer Options of your board.
Here's the steps to enable USB debugging:
Once you enable it, your OS (assuming you are using Windows) will look for the Android ADB Interface driver. Windows systems are the only ones that need this ADB driver.
After this procedure, you can now start using ADB.
Open a terminal window and go to the platform-tools directory of your SDK installation to find the ADB program.
The usual path to find it would be:
adt-bundle-windows-x86 >> sdk >>platform-tools
:: Starts the ADB server in case it is not running already
:: Terminates de ADB server
:: Checks and prints the status of each device plugged to your PC (If you don’t see your device, make sure USB debugging is enabled in your tablet.)
adb install 'apk file'
:: It will install an apk to the tablet. This apk must be located in the same folder where the adb is.
adb uninstall 'apk file'
:: It will uninstall an apk
adb pull 'file'
:: It copies a file or directory (and sub-directories) from your device to the PC.
adb push 'file'
:: It copies a file of directory (and sub-directories) from your PC to the device.
:: Prints the logdata to the screen
adb logcat –c
:: Clears the buffer to remove any old log data.
:: Prints dumpsys, dumpstate and logcat.
adb shell pm list packages –f
:: List all installed packages
adb shell input keyevent 26
:: Send the power button event to turn on/off the device
adb shell screencap –p /sdcard/screen.png
:: Takes a screenshot of the android display
adb shell screenrecord /sdcard/demo.mp4
:: Records any activity on the android display
Using the window manager
There is also a very useful tool to manage the display. This can be ran through a terminal connection to your board.
You run this command from the following path /system/bin of your android BSP
These are some of the commands available:
wm density 'density number'
:: Changes the display density
wm size 'display size'
:: Changes your display’s resolution
Using the activity manager
In the same path is the activity manager which has several other commands for use:
am start 'package'
:: Starts an activity
:: Monitors activities
:: Requests a bug report
:: Restarts the OS