How to launch android app?

More
2 years 3 months ago #2330 by RoyN
Replied by RoyN on topic How to launch android app?
Hi Dave, thanks for pointing this out!! This has worked!!

Can you point me to how I'd find the equivalent command for another app? I was able to identify the package name from running ps through adb as com.mm.droid.livetv.btvapp. This app isnt in the myserver json, how would I go about finding the "full command" to execute it?

Thanks!!

Please Log in to join the conversation.

More
2 years 3 months ago #2353 by davep
Replied by davep on topic How to launch android app?
You need to find the main Activity.
From a terminal window on the Pi controller run this adb command

adb -s <<shield ip address>>:5555 shell dumpsys package | grep -i com.mm.droid.livetv.btvapp | grep Activity

look for a list of app activities being listed. Then grab the activity name and try to launch the app using a combination of the app and activity names.

For example if I run this command against the Netflix app
adb -s 192.168.0.112:5555 shell dumpsys package | grep -i com.netflix.ninja | grep Activity

I get com.netflix.ninja/.MainActivity reported as the activity.

the launch command then becomes
adb -s 192.168.0.112:5555 shell am start -n com.netflix.ninja/.MainActivity

From within myServer the AV command is AV|<id>~Launch~com.netflix.ninja/.MainActivity

I could remote in and look if this doesn't help.



 
The following user(s) said Thank You: andrew

Please Log in to join the conversation.

More
2 years 3 months ago #2460 by RoyN
Replied by RoyN on topic How to launch android app?
Hi,

sorry for the delay, been out of town for a while (and leaving again tomorrow)...anyways, I think the "Launch" command may not be working with package.name/.ActivityName...

I have tried running 

AV|4~Launch~com.mm.droid.livetv/.load.LiveLoadActivity (to load the app I'm trying to get to work) - doesnt do anything
I also tried:
AV|4~Launch~com.valor.mfc.droid.tvapp.generic/com.cv.media.app.ui.SplashStub (the same command from My Family Cinema) and this doesnt do anything...

However if I run "adb shell am start -n com.mm.droid.livetv/.load.LiveLoadActivity" I get the App i'm trying... (also if I run the same command with the com.valor.mfc.droid.tvapp.generic/com.cv.media.app.ui.SplashStub option it opens my family cinema as expected)...

It seems the android Package/Activity is correct, but perhaps the launch command isnt working?  I'm trying this on the IrUSB driver in case that changes anything...it seems to perform like other android drivers...  (The Launch command itself works, just not with a Package/Activity, it works with an app defined in tvapps.json)... Maybe adding my combo to tvapps.json is the way?  Will this be overwritten in an update? can you add it on your side or is that not something that would be viable (as I imagine only me and a tiny percentages of users watch this obscure brazilian tv lol)
 

Please Log in to join the conversation.

Time to create page: 0.188 seconds