How to launch android app?

RoyN's Avatar Topic Author
User User
  • Posts: 69
  • Thanks: 2

Re: How to launch android app?

2 years 5 months ago
#2330
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 or Create an account to join the conversation.

davep's Avatar
Admin Admin
  • Posts: 371
  • Thanks: 98

Re: How to launch android app?

2 years 4 months ago
#2353
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 or Create an account to join the conversation.

RoyN's Avatar Topic Author
User User
  • Posts: 69
  • Thanks: 2

Re: How to launch android app?

2 years 4 months ago
#2460
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 or Create an account to join the conversation.

Time to create page: 0.276 seconds