I need to have some questions answered please. I want to start an app called WebDAV and have it start the server automatically. Do I find out the com.example.MyApp in the Settings/Apps section so I can reference it correctly? I also need to know what the adb command that I need to use and the correct syntax to use. I think it should be something along the lines of "adb shell am start -a android.intent.action.VIEW" but once the app is started how to make it start the WebDAV server. Any help would be appreciated! Thanks.


There is no universal way. It all depends upon how the app is designed. For example, the app Servers Ultimate Pro (I use it) offers the option to start a server automatically during app startup. While I'm unable to recall the name, I remember coming across an app which allowed toggling the status of a server through intent.

Your concerned app may or may not be designed to start the server once a particular Activity is launched. Simplest way is to understand the functioning of the app and reach the conclusion. Seeking assistance from app's developer vis-à-vis concerned feature may also help.

As for starting an app, use the package name with am.

adb shell am start <pkg>  # <pkg> refers to package name of the app to be launched. Its Main activity would be launched

If you want the app to launch into a particular Activity, do

adb shell am start -n <comp>  # <comp> refers to app's activity (a component) to be launched into. E.g. com.example.app/com.example.app.NewServerActivity
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.