[Android 4.1+]Proxy/GateWay for Android Auto

Search This thread

bethencsoft

Member
Jan 26, 2019
6
0
You are mainly right and this is why it's being ported to Linux and this is why we try to make an embedded device to eliminate many of the variables. Master phones are a problem as well but that is the smaller one, and to eliminate most of master phones potential problems we are going to stick with Android 9+ on the master, but even that is not as simple as it should be. Android Auto Wireless has many problems, because some phones (Samsung) disable data usage when Wifi is active, or better said it forces the user to answer the question about the WiFi every time and much much more.

The bigger problem of the project was car & slave combination, with limits imposed by Android, which are being eliminated with the move to Linux and tweaking the OS on the device to make is compatible across the board.

All that being said, you are still right this project have dragged its feet way longer then it should have, and it will probably need maintenance for long period of time, if Google does decide to change something, things will need to be tweaked.

In my humble opinion, would not be better focus in another way? Raspberry Pi has android stable rom, for example. Could not be used like slave one of them and focus the app on this device and rom?

Another point would be interesting is using slave to install AA on it and try make comunication between master and slave only for internet connection and calls. I think that would be possible, like Android Chinese Radio Stereos works. This connects android phone to android radio for calls by bluetooth and you can connect android phone to android radio by wifi for data transfer at the same time
 

WilcoSnel

Senior Member
Nov 20, 2011
115
21
Thats not a mistake, you should select the slaves BT.

In that case can the troubleshooting guide be changed?
Because the step On the master did you select the cars BT in the Wifi Launcher app?: (Yes/No) seems to contradict this.

Maybe change that to On the master, did you only select the slave's BT in the Wifi Launcher app?
That confirms the step instead of contradicting it. And since all the other troubleshooting questions are answered "yes" if you did it right it. It feels like you did something wrong if you have to answer it with "no".

The next step seems to contradict this as well.
When the master connected to the car's BT did the Wifi launcher app started up?: (Yes/No)
It should only start up the Wifi Launcher based on the BT signal you selected right? So the Wifi Launcher should start on connecting to the slave's BT as you said, not the car's BT. Or am I missing something here?

Just a thought :)
 
Last edited:
  • Like
Reactions: Emil Borconi

Lucas_Skyline

Senior Member
May 11, 2011
153
15
Fortaleza - CE
You are mainly right and this is why it's being ported to Linux and this is why we try to make an embedded device to eliminate many of the variables. Master phones are a problem as well but that is the smaller one, and to eliminate most of master phones potential problems we are going to stick with Android 9+ on the master, but even that is not as simple as it should be. Android Auto Wireless has many problems, because some phones (Samsung) disable data usage when Wifi is active, or better said it forces the user to answer the question about the WiFi every time and much much more.

The bigger problem of the project was car & slave combination, with limits imposed by Android, which are being eliminated with the move to Linux and tweaking the OS on the device to make is compatible across the board.

All that being said, you are still right this project have dragged its feet way longer then it should have, and it will probably need maintenance for long period of time, if Google does decide to change something, things will need to be tweaked.

Hi Emil,

For Samsung phones, I think you can force data to remain on on developer settings (networks, mobile data always on). Does that solves the problem? I don't know, just trying to help :)

Thank you for all the updates!
 

Emil Borconi

Recognized Developer
Feb 18, 2008
3,278
3,138
Tg. Secuiesc / Kezdivasarhely
In my humble opinion, would not be better focus in another way? Raspberry Pi has android stable rom, for example. Could not be used like slave one of them and focus the app on this device and rom?

Another point would be interesting is using slave to install AA on it and try make comunication between master and slave only for internet connection and calls. I think that would be possible, like Android Chinese Radio Stereos works. This connects android phone to android radio for calls by bluetooth and you can connect android phone to android radio by wifi for data transfer at the same time

I'll order a Pi3 and play around with it making sure Android app works fine on it.
 
  • Like
Reactions: wbedard and clavit

LLStarks

Senior Member
Jun 1, 2012
2,264
1,685
Only downsides to the Pi 3 would be size and uncertainty regarding its USB modes. Everything else? It's perfect.
  • Cases
  • Throw any OS or version on it until things work (Android Things as a lightweight option!)
  • Well-understood hardware

Is there anything the Pi 4 adds on top of that other than even more unused ports?
 
Last edited:
  • Like
Reactions: wbedard

Rag3

Member
Sep 5, 2008
27
5
I think major downside is power consumption. The pi3 is way oversized in term of performance I guess. Not sure if all radio usb ports will provide sufficient power. Unfortunately bt and wifi are not on board on the older pi versions. Maybe the nano version would work?
Anyway, ordered a mk809v hoping it will run smooth.
 

Emil Borconi

Recognized Developer
Feb 18, 2008
3,278
3,138
Tg. Secuiesc / Kezdivasarhely
That is my worry point with the Pi3, the power consumption, many cars have 500mA max current which is too low for the Pi board.
The size is quite big as well, Android performance is so-so, lack of EMMC made it a really unfit candidate for the job. A Raspberry Pi Zero W with EMMC would be a much nicer candidate for the Linux version as well, but sadly they don't exist.
 

SOFO888

Senior Member
Jan 28, 2013
433
83
For the Pi3 the solution could be a wire which connects the power contacts to the cigarette lighter plug and the data contacts to the USB port.
 

LLStarks

Senior Member
Jun 1, 2012
2,264
1,685
My MK809V came in. Can't get the car to detect it at all. And yes, it's plugged into the right USB on both ends.

Is there a setting I'm missing to set the USB port a certain way?
 
Last edited:

ScrapMaker

Senior Member
Jan 23, 2008
983
95
Has anyone run into a situation where they have audio working, but the vehicle headunit remains dark? This seems to happen regardless of using Launcher, or just the HU server, and despite swapping between master/slave for tethering.

Pixel 4 XL Master (rooted)
Galaxy S8 *and* Galaxy S9+ Slaves (both unrooted)
 

Emil Borconi

Recognized Developer
Feb 18, 2008
3,278
3,138
Tg. Secuiesc / Kezdivasarhely
Reason the app is not on playstore as despite all the attempts it is not something easy to configure and use. People who use XDA generally are slightly more advance users and even they find it difficult at times to get it all running. Adding it to PlayStore will mean much more support needed from my side, which I'm not sure I can offer without a hit in the quality level of support I try to give to everyone.
@ScrapMaker - Press the home button on the unit and then go back to AA
@LLStarks - Car should only detect the unit after it established the connection with the master. Email me for help.

This is the last update from @Snirpo I've got today: "I completed the refactoring. Aasdk is completely gone now except for the protobuf stuff. Now i'm squashing bugs I introduced because of the refactoring. I have a lot more confidence in the code right now. Probably will have it working very soon :)"
 
  • Like
Reactions: clavit

Emil Borconi

Recognized Developer
Feb 18, 2008
3,278
3,138
Tg. Secuiesc / Kezdivasarhely
Reason the app is not on playstore as despite all the attempts it is not something easy to configure and use. People who use XDA generally are slightly more advance users and even they find it difficult at times to get it all running. Adding it to PlayStore will mean much more support needed from my side, which I'm not sure I can offer without a hit in the quality level of support I try to give to everyone.
@ScrapMaker - Press the home button on the unit and then go back to AA
@LLStarks - Car should only detect the unit after it established the connection with the master. Email me for help.

This is the last update from @Snirpo I've got today: "I completed the refactoring. Aasdk is completely gone now except for the protobuf stuff. Now i'm squashing bugs I introduced because of the refactoring. I have a lot more confidence in the code right now. Probably will have it working very soon :)"
 

legendarycom

Member
Nov 10, 2012
22
1
hi to all,

I am a new user and I am staring with stable release. I follow the instruction but I how no luck for succesfull connection and need some help.

Slave = OnePlus One non-rooted (Andorid 6.1):
- AAWifiGateway installed
- connected to master BT phone

Master = Huawei P30pro non-rooted (Android 10)
- Wifi launcher installed
- start app when slave BT is detected


What happens:
- Connect slave to the car unit (VW radio unit). The connection is succesfull second time and it says connect master on car unit and on slave I see Headunit Reloaded Wifi Service connected to car unit.
- on master I get a notification Wifi direct enabled,m then disabled and I see HUR wifi connection with no internet. AA is starting but before the screen is shown on car unit everything disconnects (on slave Headunit Reloaded restarts and I need to connect again with car unit and on Master AA crashes and also the phone automatically unlocks and goes to app drawer)

any help and tips apriciated :)
 

Emil Borconi

Recognized Developer
Feb 18, 2008
3,278
3,138
Tg. Secuiesc / Kezdivasarhely
Just pushed a beta version out for WiFi Launcher.
Some user might have experienced Master connecting to slave for a second then sudden disconnect (only when slave was tethering), the update on WiFi Launcher will probably help fix this issue.
 
  • Like
Reactions: IlD4nX

Emil Borconi

Recognized Developer
Feb 18, 2008
3,278
3,138
Tg. Secuiesc / Kezdivasarhely
Last edited:
  • Like
Reactions: IlD4nX

lottjam11

Member
Jun 5, 2020
12
3
Just pushed a beta version out for WiFi Launcher.
Some user might have experienced Master connecting to slave for a second then sudden disconnect (only when slave was tethering), the update on WiFi Launcher will probably help fix this issue.

Edit: - The beta was pushed to XDA Labs only: https://labs.xda-developers.com/store/app/com.borconi.emil.wifilauncherforhur

With this release I was able to make it all work. It takes a little over a minute from the time I start the car until the MK809V boots up and starts the hotspot. There was very little skipping/lagging when I did a short test drive around town. I played Pandora and the SiriusXM apps while using Waze for navigation.

I did encounter a couple issues. The first is that the phone won't switch to the HUR hotspot if I'm in range of my home WiFi (like in the garage). I used MacroDroid to force the switch to HUR anytime it's SSID is broadcast, so this wasn't a big deal.

The bigger issue is that when I shutoff the car and the MK809V powers off, the phone won't reconnect to my home WiFi. It tries briefly, but immediately drops and tries over again (indefinitely). I noticed that the Headunit Reloaded WiFi Service keeps running after disconnecting from the HUR hotspot. If I manually Exit from it thru it's notification, my home WiFi connects immediately. It would be nice if the service would stop automatically.

Master: Samsung Galaxy S9 (unrooted) with Android 10. WiFi Launcher v2.3 installed.
Slave: MK809V TV Stick (factory rooted) with Android 5.1. AAGateway v2.2 installed.
Vehicle: 2019 Ford Mustang with Sync3

---------- Post added at 07:15 PM ---------- Previous post was at 06:58 PM ----------

With this release I was able to make it all work. It takes a little over a minute from the time I start the car until the MK809V boots up and starts the hotspot. There was very little skipping/lagging when I did a short test drive around town. I played Pandora and the SiriusXM apps while using Waze for navigation.

I did encounter a couple issues. The first is that the phone won't switch to the HUR hotspot if I'm in range of my home WiFi (like in the garage). I used MacroDroid to force the switch to HUR anytime it's SSID is broadcast, so this wasn't a big deal.

The bigger issue is that when I shutoff the car and the MK809V powers off, the phone won't reconnect to my home WiFi. It tries briefly, but immediately drops and tries over again (indefinitely). I noticed that the Headunit Reloaded WiFi Service keeps running after disconnecting from the HUR hotspot. If I manually Exit from it thru it's notification, my home WiFi connects immediately. It would be nice if the service would stop automatically.

Master: Samsung Galaxy S9 (unrooted) with Android 10. WiFi Launcher v2.3 installed.
Slave: MK809V TV Stick (factory rooted) with Android 5.1. AAGateway v2.2 installed.
Vehicle: 2019 Ford Mustang with Sync3

By the way, I did disable a bunch of apps on the MK809V. There are probably a couple more I could disable based on the list from the OP.

Here is what I left ENABLED:
root@HX_3229:/ # pm list packages -e
package:android
package:com.android.apkinstaller
package:com.android.providers.settings
package:com.android.inputdevices
package:com.android.packageinstaller
package:com.android.inputmethod.latin
package:com.android.settings
package:uk.co.borconi.emil.aagateway
package:eu.chainfire.supersu
package:com.android.shell
package:com.android.systemui
package:com.amlogic.mediaboxlauncher
package:com.android.bluetooth



Here is what I DISABLED:
root@HX_3229:/ # pm list packages -d
package:com.android.providers.telephony
package:com.android.providers.calendar
package:com.android.providers.media
package:com.google.android.onetimeinitializer
package:com.mxtech.videoplayer.pro
package:com.android.wallpapercropper
package:com.android.documentsui
package:com.android.galaxy4
package:com.android.externalstorage
package:com.android.htmlviewer
package:com.android.quicksearchbox
package:com.android.mms.service
package:com.hx.guardservice
package:com.android.providers.downloads
package:com.android.browser
package:com.google.android.configupdater
package:com.android.defcontainer
package:com.android.providers.downloads.ui
package:com.android.vending
package:com.android.pacprocessor
package:com.android.certinstaller
package:android.rockchip.update.service
package:com.android.contacts
package:com.android.camera2
package:com.android.rockchip
package:com.android.backupconfirm
package:com.rockchip.gamecontrolsetting
package:com.android.wallpaper.holospiral
package:com.android.calendar
package:com.android.phasebeam
package:com.android.sharedstoragebackup
package:com.hx.launcher
package:com.google.android.email
package:com.android.printspooler
package:com.android.dreams.basic
package:com.android.webview
package:com.android.musicfx
package:com.android.onetimeinitializer
package:com.android.server.telecom
package:com.android.keychain
package:com.android.gallery3d
package:com.google.android.gms
package:com.google.android.gsf
package:com.google.android.partnersetup
package:com.svox.pico
package:com.android.proxyhandler
package:com.netflix.mediaclient
package:com.google.android.feedback
package:com.android.musicvis
package:com.android.managedprovisioning
package:com.android.rk.mediafloat
package:com.android.dreams.phototable
package:com.android.noisefield
package:com.google.android.gsf.login
package:com.android.smspush
package:com.android.wallpaper.livepicker
package:com.cghs.stresstest
package:com.google.android.backuptransport
package:jp.co.omronsoft.openwnn
package:com.android.calculator2
package:com.droidlogic.mboxlauncher
package:com.android.wallpaper
package:com.android.vpndialogs
package:com.hx.videotest
package:com.rockchip.mediacenter
package:com.android.music
package:com.android.phone
package:com.android.providers.userdictionary
package:com.android.location.fused
package:com.android.deskclock
package:com.android.Listappinfo
package:com.android.exchange
package:com.DeviceTest
package:com.android.providers.contacts
package:com.android.captiveportallogin
package:android.rk.RockVideoPlayer
package:com.cloudtv
 
  • Like
Reactions: ci6i

Emil Borconi

Recognized Developer
Feb 18, 2008
3,278
3,138
Tg. Secuiesc / Kezdivasarhely
With this release I was able to make it all work. It takes a little over a minute from the time I start the car until the MK809V boots up and starts the hotspot. There was very little skipping/lagging when I did a short test drive around town. I played Pandora and the SiriusXM apps while using Waze for navigation.

I did encounter a couple issues. The first is that the phone won't switch to the HUR hotspot if I'm in range of my home WiFi (like in the garage). I used MacroDroid to force the switch to HUR anytime it's SSID is broadcast, so this wasn't a big deal.

The bigger issue is that when I shutoff the car and the MK809V powers off, the phone won't reconnect to my home WiFi. It tries briefly, but immediately drops and tries over again (indefinitely). I noticed that the Headunit Reloaded WiFi Service keeps running after disconnecting from the HUR hotspot. If I manually Exit from it thru it's notification, my home WiFi connects immediately. It would be nice if the service would stop automatically.

Master: Samsung Galaxy S9 (unrooted) with Android 10. WiFi Launcher v2.3 installed.
Slave: MK809V TV Stick (factory rooted) with Android 5.1. AAGateway v2.2 installed.
Vehicle: 2019 Ford Mustang with Sync3

---------- Post added at 07:15 PM ---------- Previous post was at 06:58 PM ----------



By the way, I did disable a bunch of apps on the MK809V. There are probably a couple more I could disable based on the list from the OP.

Here is what I left ENABLED:
root@HX_3229:/ # pm list packages -e
package:android
package:com.android.apkinstaller
package:com.android.providers.settings
package:com.android.inputdevices
package:com.android.packageinstaller
package:com.android.inputmethod.latin
package:com.android.settings
package:uk.co.borconi.emil.aagateway
package:eu.chainfire.supersu
package:com.android.shell
package:com.android.systemui
package:com.amlogic.mediaboxlauncher
package:com.android.bluetooth



Here is what I DISABLED:
root@HX_3229:/ # pm list packages -d
package:com.android.providers.telephony
package:com.android.providers.calendar
package:com.android.providers.media
package:com.google.android.onetimeinitializer
package:com.mxtech.videoplayer.pro
package:com.android.wallpapercropper
package:com.android.documentsui
package:com.android.galaxy4
package:com.android.externalstorage
package:com.android.htmlviewer
package:com.android.quicksearchbox
package:com.android.mms.service
package:com.hx.guardservice
package:com.android.providers.downloads
package:com.android.browser
package:com.google.android.configupdater
package:com.android.defcontainer
package:com.android.providers.downloads.ui
package:com.android.vending
package:com.android.pacprocessor
package:com.android.certinstaller
package:android.rockchip.update.service
package:com.android.contacts
package:com.android.camera2
package:com.android.rockchip
package:com.android.backupconfirm
package:com.rockchip.gamecontrolsetting
package:com.android.wallpaper.holospiral
package:com.android.calendar
package:com.android.phasebeam
package:com.android.sharedstoragebackup
package:com.hx.launcher
package:com.google.android.email
package:com.android.printspooler
package:com.android.dreams.basic
package:com.android.webview
package:com.android.musicfx
package:com.android.onetimeinitializer
package:com.android.server.telecom
package:com.android.keychain
package:com.android.gallery3d
package:com.google.android.gms
package:com.google.android.gsf
package:com.google.android.partnersetup
package:com.svox.pico
package:com.android.proxyhandler
package:com.netflix.mediaclient
package:com.google.android.feedback
package:com.android.musicvis
package:com.android.managedprovisioning
package:com.android.rk.mediafloat
package:com.android.dreams.phototable
package:com.android.noisefield
package:com.google.android.gsf.login
package:com.android.smspush
package:com.android.wallpaper.livepicker
package:com.cghs.stresstest
package:com.google.android.backuptransport
package:jp.co.omronsoft.openwnn
package:com.android.calculator2
package:com.droidlogic.mboxlauncher
package:com.android.wallpaper
package:com.android.vpndialogs
package:com.hx.videotest
package:com.rockchip.mediacenter
package:com.android.music
package:com.android.phone
package:com.android.providers.userdictionary
package:com.android.location.fused
package:com.android.deskclock
package:com.android.Listappinfo
package:com.android.exchange
package:com.DeviceTest
package:com.android.providers.contacts
package:com.android.captiveportallogin
package:android.rk.RockVideoPlayer
package:com.cloudtv
You don't need macrodroid WiFi launcher will eventually disconnect your from your home WiFi and connect you to the HUR Wifi.
With the second problem its a bit of catch 22...
I can terminate the connection when the BT is dropped, but this is not reliable method, sometimes its dropped earlier. Sometimes the BT reconnects several times (this was the problem actually every new connection forced WiFi Launcher to restart the whole process, hence the problems). Now WiFI Launcher stays on and it's waiting for a CARMODE EXIT to terminate (this should be triggered when AA close itself). I will try to improve the logic a bit but it's almost always ending up in some race/edge condition... That being said I'm happy to read that it's connecting as it's supposed too.
 

lottjam11

Member
Jun 5, 2020
12
3
You don't need macrodroid WiFi launcher will eventually disconnect your from your home WiFi and connect you to the HUR Wifi.
With the second problem its a bit of catch 22...
I can terminate the connection when the BT is dropped, but this is not reliable method, sometimes its dropped earlier. Sometimes the BT reconnects several times (this was the problem actually every new connection forced WiFi Launcher to restart the whole process, hence the problems). Now WiFI Launcher stays on and it's waiting for a CARMODE EXIT to terminate (this should be triggered when AA close itself). I will try to improve the logic a bit but it's almost always ending up in some race/edge condition... That being said I'm happy to read that it's connecting as it's supposed too.

After further experimenting, I can confirm that WiFi Launcher 2.3 does in fact enable the HUR connection (without using the MacroDroid macro I made), but only when it's a fresh install of the app. With a fresh install, everything works as designed for creating the connection to HUR and starting AA. However, upon ending the HUR hotspot, the Wifi Service does not exit automatically, and I cannot reconnect to my home WiFi. If I exit the WiFi Service via the notification, my home WiFi reconnects immediately. But if I restart HUR, WiFi Launcher doesn't restart (no notification for WiFi Service) and reinitiate the connection to HUR. If I uninstall/reinstall WiFi Launcher it works as expected for the initial connection, but again won't exit cleanly.
 

Rag3

Member
Sep 5, 2008
27
5
With the second problem its a bit of catch 22...
I can terminate the connection when the BT is dropped, but this is not reliable method, sometimes its dropped earlier. Sometimes the BT reconnects several times (this was the problem actually every new connection forced WiFi Launcher to restart the whole process, hence the problems)..

Maybe store the BT connection state with a timeout, i.e. only when the connection is gone for e.g. 10 consecutive seconds, launcher will exit? (In addition to aa exit as a second way to detect)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 114
    Background
    - Couple of years ago Google have launched Android Auto, but up till recently the only way to connect your device to the car/head unit was to plug in a USB cable. As of 2018 this starts to change, BUT it looks like you will need to get new hardware for this and older cars/head units won't be upgraded to support this, neither phones with older OS.

    Concept
    - Since many of us will like to have this wire free but not ready / willing or have the possibility to upgrade the units/cars/phones I have thought of a way to achieve this, by using a small auxiliary device, like for example a very cheap and basic Android TV stick, which can be plugged in/mounted in the car and which can fulfil the roll of a Wifi antenna for your car.

    This app should allow you to transform any android powered device into a Wifi receiver for your Android Auto compatible Car/Headunit. Please do not confuse Android Auto, with Android powered headunit (usually Chinese, like MTCB, MTCD, Joying, etc).

    AAGateWay Documentation.

    Beta released (04.01.2020)

    What is it?

    AAGateWay is a an app which should allow you to use an auxiliary (slave) device to connect your existing Android Auto compatible car to your phone (master) using a hotspot created on your phone.

    How to use it?

    SLAVE SETUP


    1) Install the app using XDA Labs (Only on SLAVE) : https://www.b3itlabs.com/prod.php?id=3
    2) Configure

    • FOR BOTH ROOTED AND NOT-ROOTED SLAVES
      • CASE 1: Master is running Pie or higher
        1. Pair Master and Slave over BT (do this from the normal BT settings)
        2. Open app
        3. If slave is ROOTED and ONLY if you are using a TV STICK convert the app to system app. (if app not visible after conversion, reboot device)
        4. Enable the start tethering option (If asked make sure you manually configure the hotspot, to have the name HUR and the password AndroidAutoConnect)
        5. Select the masters phone BT MAC
        6. Exit
      • CASE 2: Master is running Android 8 or lower
        1. Create a Wifi hotspot from the master
        2. Connect slave to it
        3. Reopen AAGateWay and select the masters hotspot from the "Phone Wifi SSID" list
    • Slave is ROOTED - This will give a much bigger compatibility with cars, it should work with any car/unit (but depends a lot on the slave used, read below)
    • Slave is NOT ROOTED - This mode won't work on all cars and it has caveats.


    MASTER SETUP


    • CASE 1: Master is running Pie or higher
      1. Install WiFi Launcher for HUR (https://play.google.com/store/apps/details?id=com.borconi.emil.wifilauncherforhur)
      2. Make sure WiFi Launcher is version 2.1 or higher!!!
      3. Open WiFi Launcher
      4. FOR Android 10, set permission location to ALWAYS!!!!!!
      5. Select slaves BT from the BT list and exit
      6. DO NOT ENABLE ANY OF THE OTHER OPTIONS!!!!
    • If you do not want to use WiFi Launcher you can use the following Tasker task to launch AA on any condition you want: https://drive.google.com/file/d/1UO-Z5P0oQpHEdrQjYqvSM48L1TI-K5g8/view?usp=sharing
    • CASE 2: Master is running Android 8 or lower
      1. Open Android Auto, go to Settings, scroll down tap the version 10 times, then from the 3 dotted top right corner select start headunti server.
      2. Exit Android Auto
      3. Leave the Headunit Server running
      4. When you get into the car turn on the hotspot on the master (or use Tasker, automate or anything else do that for you)



    CONNECTING
    • Go to the car, plug in the slave to the car's USB and start the car
    • Slave is ROOTED
      • Nothing should happen, car should NOT detect the phone (SLAVE) at this stage. If the car does detect the slave being connected, it means your slave doesn't allow a proper USB toggle, in which case you should try enabling non-root mode.
      • Master is Pie and above
        1. If you selected to tether from the slave, at this point you should see the slave turning on the hotspot, otherwise you might see the slave trying to connect to a Wifi network.
        2. Slave will notify master
        3. Master will automatically start WiFi Launcher
        4. Master will connect to slaves hotspot
        5. Master will start AA on the phone and notifies slave
      • Slave will enable USB
      • If you are using a phone as slave you will get a prompt if you want to use AAGW as the default app for this action, make sure you select ALWAYS ans yes. (TV stick should work automatically)
      • Projection should start
    • Slave is NOT-ROOTED (or running in non-root mode)
      • You will get a prompt to use AAGateWay for this action, make sure you select always.
      • Car should display a splah-screen saying waiting for master. (on some car's screen you might see a scrambled image)
      • After splash-screen is displayed, the slave will start tethering, or will try to connect to the masters hotspot depending on the setting.
      • Once a network connection is established between the 2 devices, you will see the AA icon turning on on the master and Android Auto should be displayed on the car's screen. It is possible that the screen will stay /turn black, if that happens, you can try to press the home button on the infotainment system, then re-open Android Auto on it.

    Troubleshoot and getting help

    As the thread has so much information it will be really nice if we can try to stick to one format of troubleshooting, by using one of this 2 templates:

    • Master is running Pie or above and slave is tethering:
      1. Running in root mode: (Yes/No)
      2. If running in non-root mode, is the splashscreen visible on the car: (Yes/No)
      3. If running in non-root mode, did you set the masters BT inside AAGW app?: (Yes/No)
      4. Did the slave actually turned on the hotspot on the slave: (Yes/No)
      5. On the master did you select the slaves BT in the Wifi Launcher app?: (Yes/No)
      6. When the master connected to the car's BT did the Wifi launcher app started up?: (Yes/No)
      7. Did the master connected to the slaves hotspot?: (Yes/No)
      8. Did the AA icon appeared on the master at all (in the notification bar)?: (Yes/No)
    • Master is running Oreo or below and master is tethering:
      1. Running in root mode: (Yes/No)
      2. If running in non-root mode, is the splashscreen visible on the car: (Yes/No)
      3. If running in non-root mode, did you set the masters BT inside AAGW app?: (Yes/No)
      4. Did you select the masters hotspot name in AAGW?: (Yes/No)
      5. Have you started the Headunit server on the master?: (Yes/No)
      6. On the master did you select the cars BT in the Wifi Launcher app?: (Yes/No)
      7. When the master connected to the car's BT did the Wifi launcher app started up (notification bar)?: (Yes/No)
      8. Did the master turned on the hotspot?: (Yes/No)
      9. Did the slave connected to the masters hotspot?: (Yes/No)

    • Getting rid of all automation and manually starting it all (regardless of Android version on master and slave):
      1. Uninstall AAGW on the master
      2. Start the headunit server from within Android Auto on the master
      3. Create a hotspot on the master
      4. Open AAGW on the slave and make sure it's not set to tether
      5. in AAGW make sure you select the masters hotspot
      6. If AAGW is set to non-root mode make sure you select the masters BT (just press the button AAGW will do a BT scan of nearby devices and you can pick it from the list)
      7. Go to the car and plug the slave in
      8. Start the car
        • If slave is running in ROOT mode, slave will first try to connect to the masters Wifi and you will see a notification on the master that AA is running, only then the car should recognise a plugged in device.
        • If the slave is running in non-root mode, first you will see a splash screen on the car, then you will see slave connects to masters Wifi (if not already connected), then you will see AA starting on the master.
    • How do I collect a bug report / logcat
      1. Open Settings > About phone.
      2. Scroll down to the Build number.
      3. Tap the Build number 7 times in quick succession until "You're now a developer" appears.
      4. Return to the Settings menu and select Developer options.
      5. At the top of the screen, make sure 'Developer options' is set to On (green).
      6. Scroll down to Debugging and enable both USB debugging and Bug Report Shortcut on (green).
      7. Tab on Logger buffer sizes: Default setting is 256K. Select 16M to help capture more information for debugging. Of note, it can affect the apps performance especially with lower spec phone, so change it back after you have finished submitting bug reports.
      8. On slave make sure you enable debugging inside AAGW, on master open Android Auto go to developer settings and make sure force logging is enabled.
      9. Reproduce the problem
      10. Hold the Power button down until the menu appears.
      11. Select Take bug report. and wait for the device to capture the bug report.
      12. Tap the 'Bug report captured' notification when it appears.
      13. Send the bug report by email to borconie@gmail.com



    Know problems, workaround:
    • - Latency & lag. This will be really down to the devices you are using. I have tested it with a MK808B Plus, it work’s ok most of the time but occasionally you will get the odd lag. I’ve also tested it with a Nexus 7 tablet, and there was no lag at all, so device does matter, as well as probably ROM.
    • - I get random disconnection. There can be 2 causes for this, one the USB connection fails between the car and the auxiliary device, or the Wifi fails between the phone and the auxiliary device. In my tests I saw a few Wifi disconnections without any reason on the MK808, but non on the Nexus. Changing the tethering option from WPA2 to Open did help with this.
    • - App is closed without error or reason. The app runs in a background process, with a minimal interaction with the foreground, some devices/OS will kill background apps. I saw this happening on Nokia and I saw this happening on OnePlus as well. Try disabling battery optimisation for AAGateWay, that might help.
    • - I just cannot get it to work… Try using a phone, that will at least give you some visual guidance. Make sure that your device connects to the phone Wifi hotspot, make sure that AA Headunit server is running on the phone (try to force stop Goolge Play Services, stop and restart the headunit server)… All fails contact me
    • - Nothing happens on the master, using Wifi Launcher for HUR app. In this case, try to manually start the headunit server on the master, and manually turn on a hotspot, then reconfigure you're slave to connect to the masters hotspot (even if the master is running Pie or higher).


    Device compatibility:
    Master:

    Any phone which normally works with Android Auto

    Slave with ROOT:
    • - Tested and know to work: - MK809V, Nexus 7 (depending on rom), Sony X Compact (depending on rom)
    • -Tested and not working as expected: Pixel 2, MK808B
    • - While root is necessary, not all phones can toggle USB port on and off by software. And there can be other problems, for example on some devices when you turn off the USB the phone loses the ability to detect the power connection as well, which is use as trigger to start the whole process. It is almost impossible to predict if a phone will be a good slave candidate or not.

    Other things
    - Xiaomi phones (MIUI makes a mess), try not to use it for Slave
    - Generally older phones (pre oreo) are more likely to work fine as a slave device.

    Any suggested slave?
    - Yes, use an MK809V TV stick, as the experience with it, is pretty slick and it should work out of the box. If you get a MK809IV try to get the one with Android 5.1.1 as the one with Android 7.1 has problems with the tethering.

    FAQ.
    Q: Can I use this with any car and phone combination?
    A: Assuming your car is already Android Auto compatible, then YES.


    Q: Can I also automate the start of the Headunit server?
    A: Only with a rooted phone, using the following shell command: am startservice -W com.google.android.projection.gearhead/com.google.android.projection.gearhead.companion.DeveloperHeadUnitNetworkService

    Q: Can I use Wifi-Direct to connect instead of WIfi?
    A: No.

    Q: Does the traffic come out from my monthly data allowance?
    A: NO, traffic between auxiliary device and phone hotspot does NOT count as internet traffic, HOWEVER if you do have other apps on the auxiliary device which download updates, etc in the background that WILL be counted as internet traffic. So I suggest double check the apps on the aux device and disable all those which aren’t needed.


    Q: Will the car/head unit provide enough power?
    A: It should provide at least 500mA that’s the standard USB current, while I cannot guarantee that will be enough in all cases, it should do, assuming you do turn off all unneeded services on the TV stick.

    Q. What about start up time?
    A. It will depend a lot on the device you are using. A low-entry TV stick boot time is about 1 minute, which can be a bit too much for an initial car setup. As mentioned earlier, these devices usually have 2 USB ports, you can for example connect the power USB port to a continues power supply in the car, in which case the boot time will be non-existent since the device is always running. If you are using a phone, the phone battery will probably hold the charge just fine for a couple of days, if you disable all apps on it and you set up a profile to go into aeroplane mode when it’s not charging. Tasker or Automate are your friends for that. If you cannot connect the TV stick to a continues power source, you might consider using a small portable power pack which powers the tv stick (should hold power for a few days) and the power pack can be charged while the car is running.

    Q. Can I decrease boot time for TV Sticks/Phones by removing all unrelated software.
    A. Yes, actually quite a lot. Once you have your configuration ready and everything is working as expected, you can uninstall/disable all packages beside this ones:
    • package:android
    • package:com.android.apkinstaller
    • package:com.android.providers.settings
    • package:com.android.packageinstaller
    • package:com.notriddle.null_launcer (or any other launcher, but NULL launcher has no memory consumption, no app drawer no nothing, perfect for headless - see: https://github.com/notriddle/null-launcher )
    • package:com.android.inputmethod.latin
    • package:com.android.settings
    • package:uk.co.borconi.emil.aagateway
    • package:com.android.shell
    • package:com.android.systemui
    Easy way to list / disable all apps will be using a computer and following commands
    Code:
     adb shell pm list packages
    This will list all installed packages
    Code:
     adb shell pm disable xxxx
    where you replace xxxx with the package name (Ex: com.android.shell )


    Q. Will using Wifi 5Ghz give me better performance?
    A. Well if both of your devices support it, SURE!

    Q. Is the source code available?
    A. Sort-of, please see: https://github.com/borconi/AAGateWay this is only for the sketch, however new version does contain code which lift restrictions on 3rd party apps in Android Auto. To prevent the abuse of this by some, further code won't be updated to GitHub, however if you want to build your own version, please do contact me for details.


    Guarantee or Warranty
    - Due to the fact that there are so many possibilities and combinations of cars, head units, slave and master devices, there is no way for me to test all of them, however if you did purchase the software and you are not able to get it to work for any reason, please email me on borconie@gmail.com and I'm more then happy to refund the purchase.


    Teaser:
    24
    Good news, I've made the breakthrough I needed on the slave side, waiting for more confirmations but looks very promising.
    If all goes well I should be able to update the app on the next week or so, possibly to RC or stable state.
    22
    Updates from the Netherlands, CP & EB IT is officially opened :) next week I will start the work on the promo video then Kickstarter campaign is on....
    21
    Just got off the phone with the guys who are going to shoot the promo video, we should have that by no later then 23rd of August done, so I really hope that by that day the kick-starter will be live.
    21
    Hi guys.

    Sorry to be radio silent, indeed I was relatively busy with HUR and OBD2AA as well as other non Android Auto related work. Today I have finally managed to push out a stable release for HUR, and obd2aa is also doing pretty well, so in the next period I will continue to develop the AAGateWay, that being said my schedule looks like this:

    - This weekend, working all weekend, preparing photos from 5 different events across the UK so that will tied me up till Tuesday
    - Wednesday morning hitting the road (travelling to Romania - 3 days road trip)
    - I'm not sure how much I will be in Romania
    - October 20 I'm flying to the States for 2 weeks.

    So as you can see I will be quite a lot on the road, but I will take my Sony headunit and some dev tools with me to Romania and will carry on working, my target is to have a stable version of this app before I fly to the states.

    I will try to put together a list of most common problems I saw here and wishes tomorrow so you can all see and know what's happening as well as input new ideas if you have any.