Umesh

Untitled Document

Tuesday, 6 November 2012

Android : ADB Command Line Tricks

1. Open the AVD Manager and launch a virtual device 

    From your SDK's platform-tools/ directory, execute the android tool 

    with the avd options :

    android avd 

    In the Virtual Device view, Select an AVD and click Start. 

2. Install your application


    From your SDK's tools/ directory, install the .apk on the emulator : 


    adb install apkfilename.apk

3. If there is more than one emulator running, you must specify the emulator

    which to install the application, by its serial number, with the -s option. :


    adb -s emulator -5554 install apkfilename.apk

4. To see a list of available device serial numbers use : 

     adb devices


5. Install already installed app through adb command
    without uninstalling it in android emulator. 

     abd install -r test.apk

     It updates and keeps databases and stored preferences

6. Run your app directly on your attached device :


  1. Enable USB Debugging on your device. Use this way : Settings > Applications >         Development > USB debugging
  2. Check whether device connected or not. 
  3. Once your device connected, use fallowing command line 
    adb -d install apkfilename.apk

   -d flag specifies that you want to run your app on connected device....

No comments:

Post a Comment