18 useful commands for Android

I had written some useful commands for Android testers. Please give your valuable feedback. 

1. Command to install application into Device
Adb install .apk file path

2. To list all the devices
adb devices

3. To list all AVDs (emulators)
android list avds

4. help
adb –help

5. To Terminates the adb server process
Adb kill –server

6. To start sevrer
Adb start -server

7. If both emulator and device are open and u want to install build on only device
adb –d install apk file path

To install build on only emulator
adb –e install apk file path

8.to print the adb version number
adb version

9. To update the app (to put new apk over old apk)
adb install –r apk file path

10. To list all device apps package names
Adb shell pm list package

11. To pull app
adb pull system/app/Browser.apk "c:\kalyan"

12. If you want to create emulator using command prompt
Give the command
  • Android list targets
  • Command lists the target ids
Now write this command
  • android create avd -n [name] -t [target] 
  • - android creare avd – n divya –t 3
  • emulator created
13. To launch the emulator
emulator -avd [e-name]
emulator -avd kalyan

14. To move the app to SD card or device memory (only on 2.2 or above)
Install Applications to the SD Card by Default
adb shell pm setInstallLocation 2
Android will now install apps to the SD card by default.
To switch back to storing software on the internal memory, enter adb shell pm setInstallLocation 0.

15.to run monkey tool
adb shell monkey -p packagename -v 100

16. To uninstall app
adb uninstall packagename

17. To see the logcat
adb logcat

18. To list all the package names of application present in the device
adb shell pm list packages

Comments

Popular posts from this blog

Online Selenium Training With Real Time Scenario

Online Tricentis Tosca Automation Training with Real Time Scenarios

Online Training for Manual/Functional