Using Bluestacks to run an android app directly from Windows command line or Desktop Shortcut

6

After installing Bluestacks is there a way of launching an android app without going through the Bluestacks interface? Is there an API or something that would allow this?

Actually I found where it stores shortcuts.

This is the command line of the shortcut

"C:\Program Files (x86)\BlueStacks\HD-RunApp.exe" Android zok.android.phonics zok.android.phonics.SplashScreenActivity

Anybody con help with what it means?

user2437294

Posted 2014-04-09T18:09:13.387

Reputation: 61

Answers

6

There is a way. I forgot exactly how I did it before, but in Win 7, my computer had a "My Apps" folder for the apps I downloaded for the BlueStack somewhere (maybe MyDocuments? MyComputer? Favorites? Not really sure), and all I did was double click on the app to execute the app. Now? I'm not entirely sure. Trying to figure out myself on Win 8.

Edit: I found a way

C:\ProgramData\BlueStacks\UserData\Library\My Apps

This address contains the apps you should be able to open up from your desktop, and will open up in BlueStacks.

links to the apps

C:\ProgramData\BlueStacks\UserData\Library\My Apps[file name].lnk

for example

C:\ProgramData\BlueStacks\UserData\Library\My Apps\FlappyBird.lnk

user332589

Posted 2014-04-09T18:09:13.387

Reputation: 61

0

I used multiple iterations and combinations of the command line instruction listed by previous users and none worked but BlueStacks would open up with "HD-RunApp.exe" and the apps would appear on the BlueStacks desktop. Later I was looking at windows desktop and the following shortcut appeared which opened my BlueStacks app. (I have no idea how that occurred)

"C:\Program Files\BlueStacks\HD-RunApp.exe" -json "{\"app_icon_url\": \"\", \"app_name\": \"Integra\", \"app_url\": \"\", \"app_pkg\": \"com.onkyo.integraRemote4A\"}"

I put it into a batch file and put the file into Users > "myname" > AppData > Roaming > Microsoft > Windows > Start Menu > Programs > Startup

When I now start my Window computer the app automatically opens. Coop

Gary Cooper

Posted 2014-04-09T18:09:13.387

Reputation: 1

I’m a little confused by this  — I don’t see anything in the question about getting it to start automatically when the user logs in. – Scott – 2019-05-06T00:56:53.797

0

It seems you cannot, Bluestack provides an emulation or virtual layer for android apps to run inside itself, not to be executed by the OS.

yorodm

Posted 2014-04-09T18:09:13.387

Reputation: 171

0

You have to run your apk file within BlueStacks. and you are telling BlueStacks to run which application to run from outside by that command. it sends os, app package name, starter activity's class name as parameter to HD-RunApp.exe

moni as

Posted 2014-04-09T18:09:13.387

Reputation: 101

0

on Win 8.1 a Folder "Apps" with the BlueStack-Icon will be created on the Desktop automatically. Inside the "Apps"-Folder are links to all installed apps. You can start directly by double-click on them.

Uwe

Posted 2014-04-09T18:09:13.387

Reputation: 1

0

@Uwe is right and the command you can use in command line is what you said:

"C:\Program Files (x86)\BlueStacks\HD-RunApp.exe" Android zok.android.phonics zok.android.phonics.SplashScreenActivity

which is:

Bluestacks application launcher:

"C:\Program Files (x86)\BlueStacks\HD-RunApp.exe"

Android that came after the above line is a keyword which tells an application info to the launcher and those information are:

zok.android.phonics

the phonics application and it package name in reverse and:

zok.android.phonics.SplashScreenActivity

the activity which is named SplashScreenActivity inside the app. note that activities are like windows in your computer for android os.

in my version of bluestacks it uses -p switch for app name and -a switch for that app activity. like:

"C:\Program Files (x86)\BlueStacks\HD-RunApp.exe" -p zok.android.phonics -a zok.android.phonics.SplashScreenActivity

user416091

Posted 2014-04-09T18:09:13.387

Reputation: 1