Install apk
adb install
In case that you have both simulator and device connected but you want to install the app on device, then use the global option “-d” just right after the “adb” command will help.
-d use USB device (error if multiple devices connected)
Update existing apk on device.
adb -d install -r
Uninstall apk
uninstall [-k] PACKAGE remove this app package from the device '-k': keep the data and cache directories
Run instrumented tests
Run all tests
./gradlew connectedAndroidTest
Run a particular test class
./gradlew connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.example.android.ExampleTest
Run a particular test case
./gradlew connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.example.android.ExampleTest#testCase_001