Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start an application using Android ADB tools

Tags:

android

adb

How do I send an intent using Android's ADB tools?

like image 443
Sean Avatar asked Dec 31 '10 03:12

Sean


People also ask

How do I run adb application?

Enable adb debugging on your device To make it visible, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom. On some devices, the Developer options screen might be located or named differently. You can now connect your device with USB.

How do I launch an activity from adb?

You can use the start command from Activity Manager (am) a.k.a the adb shell am start -n command (via adb) specifying the app package name and the component name as defined in the manifest. You can add other parameters like ACTION (-a android. intent. action.

How do I run Android adb tools?

To use ADB with your Android device, you must enable a feature called “USB Debugging.” Open your phone's app drawer, tap the Settings icon, and select “About Phone”. Scroll all the way down and tap the “Build Number” item seven times. You should get a message saying you are now a developer.

Can I run adb commands on Android?

Finally, you can run ADB commands on your Android device without any computer. You don't need to add adb or adb shell initializers in this app as you are already within the local ADB shell. Just run the operative part of the command and then tap the “Enter” button on the keyboard.


1 Answers

adb shell am start -n com.package.name/com.package.name.ActivityName 

Or you can use this directly:

adb shell am start -n com.package.name/com.package.name.ActivityName 

You can also specify actions to be filter by your intent-filters:

am start -a com.example.ACTION_NAME -n com.package.name/com.package.name.ActivityName  
like image 116
Cristian Avatar answered Sep 17 '22 21:09

Cristian