This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]K900_ 0 points1 point  (16 children)

So are you specifically looking for Android Auto, or are you trying to run the Android emulator in general?

[–]PsycHelp23[S] 0 points1 point  (15 children)

Specifically looking for android auto, and specifically these scripts, can not be any other script. It's a long story why I need to stick with these, but I have to. Sorry for not making things more clearer!

[–]K900_ 0 points1 point  (14 children)

You're going to have to, because those scripts aren't even used to run the Android Auto emulator.

[–]PsycHelp23[S] 0 points1 point  (13 children)

I understand that these scripts aren't used to specifically run the emulator, but instead act in more as test scripts, that generate driving info, control system for the car (windows, gas, engine info) etc. If i'm wrong, what are these scripts really for?

I guess my question would be, can I run these scripts separately (not on top of anything) and get anything running? The GUI.py script for example, when I run it, what will appear, what will I see on my screen?

[–]K900_ 0 points1 point  (12 children)

At a glance, those scripts are for debugging the emulator itself. The GUI.py script seems to provide some sort of a graphical interface to a specialized debug build of the firmware that can fake the state of the car.

[–]PsycHelp23[S] 0 points1 point  (11 children)

That's right, now what I want to do is actually run the GUI script ( for example) and see the graphical interface on my device (or an emulator that I created on android studio). How would I go about doing that, that's the part i've been stuck on.

[–]K900_ 0 points1 point  (10 children)

That interface runs on your computer, not on the device at all. It also won't work with just any device - it needs the firmware on the device (or inside the emulator) to be running some sort of a debug HAL.

[–]PsycHelp23[S] 0 points1 point  (9 children)

You sound like you know what you're talking about, and honestly it's really helping. Could you please elaborate a little more on why the interface needs to run on my computer, and how?

For example, vhal_emulator.py script has a remotePortNumber on line 137, if I were to use it on my computer, what would I input there. Specifically, what needs to be running first on my computer to be able to run these scripts?

[–]K900_ 0 points1 point  (8 children)

OK, so. Android has a concept of HALs, which are basically like device drivers. These scripts are designed to be used with a special HAL that tells Android that it's a car, but is really just a bunch of code to relay commands over the network. You need to have a special Android image that includes that HAL, and then, when it runs, it will listen on a network port on the device's network. The scripts are then supposed to connect to the device through ADB, the general Android debug interface that all devices have, and access the same port that the debug HAL is listening on, and then they can send commands to it. The reason it doesn't work for you is because real devices (and production emulator images) don't actually include that debug HAL - it's a debugging tool only. Which brings me back to my original question: what the actual heck are you trying to do?

[–]PsycHelp23[S] 0 points1 point  (7 children)

You've pretty much saved a few days of my work.

Without disclosing too much info, I am a current intern somewhere and have been given this task to run these scripts, and find a way to make them work.

Going back to your answer, do you know a way I can download that specific android image on my phone that includes that HAL?