yashsingh1/xdaforums huggingface dataset:
[Paid Software Announcement and Discussion] Emil Borconi:
First of thanks for those who submitted logs, they do help in solving issues. Gush sometimes I wish Android was more universal, but no....

Anyway one of the issues I have fond and which I will be addressing soon is caused by background service limitations introduced in Android Oreo and above.

Basically, if your app runs in background there is a high chance of the OS to kill the app/service, which is ok, that's why there is ForeGround service where you have to have a notification displayed while your app/service is running. However the ugly part in this is, that if your app uses multiple threads, and those are background threads, and your main app thread which created the foregraound service is not doing any work, the OS will still consider the app as a background app and kill it. The beauty in this is that heavy network operation is only permitted in background threads to don't block the UI, and AAGateWay does all the work on this background threads, the main foreground thread was only created to keep the service alive, but apparently that's not enough. Goes without saying that if the OS kills the service, we can expect it to crash or to result in errors.

I'm going to work on a fix for this, and I will be also looking into the other bug reports I have received.

I'll keep you updated.
[Paid Software Announcement and Discussion] fezster:
Is there any plan to put this IP setting in beta?

I'd like to try setting up the hotspot on the slave and see if the app works, without any modification. This would be in preparation for Android Pie, where mobile data and wifi can be used simultaneously on master.
[Paid Software Announcement and Discussion] Emil Borconi:
Yes I will added it to the next beta release.
[Paid Software Announcement and Discussion] alexo95:
I have noticed if i keep my masters screen on and on the aagateway appI have better results, I'm looking forward to a fix :)
[Paid Software Announcement and Discussion] Gunde:
Doesn't most phones have an 'allow background activity' setting, or is that only Samsung?
[Paid Software Announcement and Discussion] odl:
Allowing does not mean "keep alive" ;)
[Paid Software Announcement and Discussion] Emil Borconi:
As pointed out that doesn't guarantee that the process won't be killed, not even a foreground process is guaranteed to be kept alive, if the OS is running low on resources it is possible that even a foreground process will be killed but it will be brought back to life as well, though that won't help this case because the connection chain will be broken, however the chances of the system running that low on resources are slim to none.
[Paid Software Announcement and Discussion] bbobbity5:
Not sure if the following issue is a bug or something I've missed in the setup, but my car can't detect my master on Bluetooth unless my slave is unplugged from usb. This is what happens:

Since installing the latest beta, my car Bluetooth doesn't automatically detect my master (Pixel). I can go into my phone and force it to connect, and then it works fine. However, without intervention from me, the car never finds and connects to my master over Bluetooth.

I then tried unplugging the slave phone's (galaxy S3) usb connection and then turned on my ignition, and the master connected with the car Bluetooth straight away. Was able to repeat this consistently. Same issue using my wife's Opportunity r11s as the master.

Am i doing something wrong here? My slave phone has no Bluetooth connection set up - is this the issue?

If anyone has any advice, it would be much appreciated!
[Paid Software Announcement and Discussion] Emil Borconi:
Well every car is different so this will be indeed difficult to make universal I think I will need to add loads of options. From what you are describing, the car thinks it's connected to the phone, and when there is an AA connection in place the cars Bluetooth works slightly different. Other units don't seem to care at this early stage of the connection about the BT, but it looks like your car does. What car/headunit are we talking about?
[Paid Software Announcement and Discussion] bbobbity5:
A 2018 VW golf. Yeah,I think the car wants to connect to the Bluetooth of the slave, as that is what is plugged in via usb (maybe?) Also wondering if this is similar to thofkes problem from 7 days ago. Its soooo close to working great in my car, but, as you say, every head unit is different.
[Paid Software Announcement and Discussion] fezster:
I've seen this happen on my Audi 2018, albeit very rarely. However, I do not think it has anything to do with the slave connected, as I have seen it happen without it also. When the car's bluetooth is detected by the phone, it is the phone which initiates the connection (or should do), so it shouldn't matter what is connected to the headunit.

Try unpairing/repairing the phone to see if that solves it.
[Paid Software Announcement and Discussion] bbobbity5:
Thanks Fezster, I have unpaired and repaired multiple times, cleared cache on phone, etc all before posting on this thread this morning. Yes, it has happened in the past on my car without this app, but on testing it today it has been really consistent - unplug the slave and it connects, plug in the slave and it doesn't. What you say makes sense - I just wish my car agreed :)
[Paid Software Announcement and Discussion] fezster:
Try giving this app a go:

https://play.google.com/store/apps/details?id=org.myklos.btautoconnect

I do appreciate what you're saying about the consistency of the slave being connected, but this may be a workaround for you.
[Paid Software Announcement and Discussion] chrisonline:
Thanks for the latest updates. Connecting is now always working fine.

But I have now a new problem.

After successful connect to the slave from the master the app AAGateway is closed without error or crash report.

But not immediately after connection. It takes sometimes a few seconds and sometimes a few minutes.

I can use Android Auto as long as the app does not close on the master. Afterwards Android Auto freezes.

I have send you a bug report from the master phone to borconie@gmail.com.

Master: Pixel 3

Slave: Nexus 5
[Paid Software Announcement and Discussion] Emil Borconi:
New update available.

Changes:

- Tweaks to try prevent app being killed by OS due to mainly background activity

- Fixed crash on "OK Google" (thanks to [MENTION=4670039]LLStarks[/MENTION] for the help with bug reports)

- Fixed Toggle options on Slave

- Added option for master IP (to be used over a WiFi router rather then Tethering)

In detail (info also available in OP):

VAG Cars

Maybe other cars/units as well, but VAG for sure. While most cars can be tricked to wait for the slave any amount of time after a handshake, the vag cars resets the USB after 20 seconds. To work around this, please do use a slave with ROOT and make sure you toggle both options Toggle USB and Toggle Wifi, this way when there is no power coming from the headunit the Wifi and USB will be switched off, then when you start the car, first the Wifi will be turned on and as soon as you have a connection with the master the USB will be activated so AA connection kicks in.

MK809

It works, finally. I have messed around with my MK809 quite a lot and tried quite a few roms, they all have the "Connect to PC" usb setting. During the messing I managed to lose the Wifi on the device, I finally found a ROM which did enable the Wifi again, but it's very very poor quality, not like it was originally, but was sufficient for testing. With today's release you should be able to install the app, grant root, select slave, enable all 3 options (toggle USB, Wifi and MK809V workaround) and it should connect properly to the master. Before I can advice that this method really works I will like to ask those who already have an MK809 device at hand to give it a try. Also to improve the boot up time as I have describe it in the OP FAQ I suggest you disable every other package which is not used. This devices are full of all kind of apps which are not needed. Boot time can be approximately halved, if all other apps are disabled.

Please let me know how it goes.

Thanks.
[Paid Software Announcement and Discussion] LLStarks:
Thanks. I'll be testing. Looking out for whether the calendar/maps issue is also gone.

One thing I've noticed so far is the new constant "waiting for slave" notifications. I had to minimize the app's ability to notify since it was doing it every minute.
[Paid Software Announcement and Discussion] Emil Borconi:
Yeah but it shouldn't be visible when AA is running. I agree it's annoying but that should prevent the OS to kill the app.
[Paid Software Announcement and Discussion] LLStarks:
Ah ok. Might be worth having a toggle for that. I've been leaving my master app on all day.
[Paid Software Announcement and Discussion] Emil Borconi:
Will consider better ways to do that, maybe something like download progress or similar....
[Paid Software Announcement and Discussion] fezster:
Compacted notification? Like Automate has.

I've not seen any problems with AAGateway being terminated on master as yet. Must be if phone is running low on resources.
[Paid Software Announcement and Discussion] Emil Borconi:
Potentially. Yeah I did see it in one report and it happened to me as well one time, with a 6t plus 8gb of ram so surely I'm not low on resources.... But in my case was oxygen which did the kill.
[Paid Software Announcement and Discussion] LLStarks:
No luck with the new build for OK Google. Same symptoms: Master app crashes and the Android Auto rendering freezes.

I'm sending over new logs.
[Paid Software Announcement and Discussion] alexo95:
After the latest update i cannot get the slave and master to connect to eachother. Slave to headunit is fine

Master notifocation:waiting for slave

Slave:listening to state changes

Managed to fix this by clearing data and cahce on aagateway @ AA on master and slave
[Paid Software Announcement and Discussion] Jaihoidundso:
On the new beta slave app doesn't work. It always crashes :/

Master: Oneplus 6 - Android 9

Slave: LeEco Phone 2 - Android 6
[Paid Software Announcement and Discussion] Emil Borconi:
Can I have a bug report please?
[Paid Software Announcement and Discussion] odl:
for me it fortunately still works. I also tested the new feature with predefined IP address of master and created hotspot on slave (toggle automated with tasker). on master I set static IP for connecting to that hotspot - works great :).

custom DPI still does not work (since RC2) - I don't know if it is because of AAGateWay changes, or because latest version of AA on master. Was working fine with RC1.
[Paid Software Announcement and Discussion] Emil Borconi:
RC2 I moved back from Protobuf 3 to protobuf 2, I might be missing something on reconstructing the message, it does work on my Sony, but I guess something is not 100% there with that function. Can you send me a bug report from the master please?
[Paid Software Announcement and Discussion] NYZack:
Same problem here when I try to get the Google Assistant by pressing the button on my steering wheel. AA hangs, all sound (from any source) is interrupted, and it stays this way.
[Paid Software Announcement and Discussion] Emil Borconi:
Can I have bug reports please from both Slave and Master?
[Paid Software Announcement and Discussion] jasperbleumink:
Hi Emil,

Tried the new RC3 version, unfortunotly still the same issue here. I will send you some bug reports.

The issue is as follows:

Slave connects to car and to master. AAGateway says on master that everything is OK.

But than a message from AAGateway says "Headunit server not running, or stuck. Please (re)start ir from Android Auto developer mode."

But Headunit server is running, already installed AA again, but same issue.

Hopefully you can find something in the logfiles.
[Paid Software Announcement and Discussion] Sn4pdragon:
It seemes to be working by for me now
[Paid Software Announcement and Discussion] Jaihoidundso:
Sure. I will make one.
[Paid Software Announcement and Discussion] nodgel:
I am having strange problem, phone is being restarted randomly while connected to aagateway and on wireless charging at the same time, doesn't happen if being charged wirelessly on connected to aagateway and not charging wirelessly

Does anyone else experience this?

Master pixel 3 xl, slave nexus 6
[Paid Software Announcement and Discussion] Thofkes:
Well my first post was only a little over a week ago and was about the first Beta release, but now it is buried 20 pages back! There is some great development being done on this app and it's awesome to see all the support from users! I just wanted to post an update about my experience now on the third Beta release. As a reminder I am using:

Master: Samsung Galaxy S8+ (no root, Verizon, 8.0)

Slave: Samsung Galaxy S6 Edge (no root, Verizon, 7.0)

Head unit: Chevy MyLink (OEM, 2014 Chevy Impala)

The experience is even more streamlined now. All I have to do is leave the Head unit server running 24/7 and make sure I enable my hotspot before getting into my car since it cannot be done programmatically on my phone. Within 15-30 seconds of starting my car, Android Auto is up and running on my head unit without me having to do anything besides tap the icon on the screen! I've been testing for a few days in a row now and it is running very smoothly. It does still have issues with some hiccups during music playback- especially while running maps. If my phone's hotspot could be started automatically when connecting to my car's bluetooth, this would be the easiest way to use Android Auto ever! Hopefully a future release is able to make a connection between the devices without needing to use a Wifi hotspot. I look forward to the PlayStore app and new features to be added! Thanks Emil!
[Paid Software Announcement and Discussion] aim2miss@gmail.com:
The last two betas have been working great for me except lagging GPS. When navigating the location of the vehicle is slightly slow to update. For example if I turn a corner it takes the map 4 or 5 seconds longer than usual to show the new direction. Everything else seems to be working including music, Google Assistant, phone calls etc... I haven't driven anywhere that I might lose my phone signal which was a problem in the past.

Nothing is rooted.

Head unit:. Honda Accord

Master:. LG V30

Slave: Nexus 5x or LG G2 (I have tried to remove as much non-essential stuff as possible from both.)

Any suggestions are appreciated.

Update: I did lose my cellular signal while driving and my screen froze and never recovered until I restarted the system.
[Paid Software Announcement and Discussion] SLAB_8002:
[MENTION=842765]Emil Borconi[/MENTION], the new setting to use my truck's WiFi instead of the phone's hotspot is a huge win. I timed it tonight from a cold start - 50 seconds from the time I put my key in the ignition until AA was running, and no requirement for me to manipulate anything on the master. Just turn the truck on, wait for my phone to connect to the truck's WiFi and for the slave to finish booting, and it's off and running. I also feel like the connection is "cleaner", i.e. less interruptions in music playback.

I'm considering shopping around for a TV stick with a better processor and 5 ghz WiFi to see if that doesn't reduce the hiccups, but it would mean going back to the phone's hotspot since the truck's hotspot is 2.4 ghz only.

For those who care:

Master: Verizon Samsung Galaxy S7 Edge (no root)

Slave: MK809V (rooted)

Headunit: Chevy MyLink on a 2016 Colorado
[Paid Software Announcement and Discussion] rpgreentree:
I have this come up each time I do a fresh install of gateway on the master. Just open AA, turn off head unit server, turn it back on again and close AA. After this it should work each time. In saying that I haven't installed the latest update yet.
[Paid Software Announcement and Discussion] sibesaver:
Hi guys,

Anyone using pdanet+ to connect slave to the master or familiar with its protocol? I gave this a try last night with RC3 as my carrier (Verizon) locks down their hotspot and even if you pay for its use they throttle it once you use a certain amount of data. I still have the grandfathered UDP and am not willing to change yet for various reasons.

Anyway, my question is using pdanet+ for the connection, I suspect is actually using wifi direct protocol which Emil mentioned is coming in a later release instead of hotspot protocol, can anyone confirm this?

master - LG V20 Verizon (not rooted)

slave - LG G3 (not rooted, no sim)

head unit - Kenwood dx9704s
[Paid Software Announcement and Discussion] epsonix:
I would like to add some supplementary information to my post #1073 (https://xdaforums.com/showpost.php?p=78682309&postcount=1073).

Yesterday morning all was working fine on first ride, but on later runs and tries not. I think major problem is related with my headunit, which based on my experience via USB cable, timouts too quickly. I mentioned in last post that on slower phone it was always hard to establish connection via USB, it tries AA was nearly loaded up, blinked bottom bar on headunit, and then it was interrupting and exiting while phone AA app was still reporting it is connected to the car. On faster phone it was working better. I know that some other guys who have the same firmware as me, but top spec phones (like Samsung Galaxy S8+) have no problems. On Alfa Romeo Giulia with newer radio firmware there were no issues with either of my phones. SO this is something where I expect at best (if possible) Emil could try to speed up some actions, maybe do as much as he can before slave starts talking to headunit, so other things are preloaded and no delaying connection of slave with headunit? Anyway, I'm in the middle of process of guarranty replace of my headunit for newer one (as they said they have no newer firmware for my headunit) - current aside of issues with AA has a few other problems. Replace was granted, it is just problem to get new unit - was ordered but not available (4 months already) - hope that by the time I get new headunit, AAGateWay will be polished and all minor issues will be resolved.

I would like to report 2 more things which are odd or annoying in AAGateWay app:

1.Currently (but it happened good a few times over last days) my master phone keeps popping up with notifications - say every 20-30seconds. Hotspot is disabled, no BT link with the car since ~30 minutes - why would it keep doing so? I had to click EXIT to stop that loop of notifications.

2.That notification says "Waiting for slave" when minimized, but when I expand it, it says something completely wrong: "Slave successfully connected. Connected to AA Server" - I guess at least first part of this expanded notification is inaccurate.
[Paid Software Announcement and Discussion] NaterTots:
Master- Essential PH-1

Slave- HTC First (4.1)

Also - Op5 (Oreo)

Head unit - Sony XAV-XA5000

I can get my master to connect to the slave and everything works, but I can't get past the head unit saying to pull over and finish setup on my Android device.

I've tried it for a few days and even on the latest build i still get the issue.
[Paid Software Announcement and Discussion] Emil Borconi:
Hi guys.

Sorry for being radio silent, I'm buried in work and probably will be for quite a while, then at and of February I will be travelling and trying to sort out the refurbishment of a house, so in a nutshell my time will be limited.

That being said I'm quite confident that I managed to catch / fix another bug related to "OK Google" experience and potentially to some other things caused by this. I was missing 4 bytes of data in some scenarios, and while head units apparently ignore this, AA was more picky on it.

If this the fix is confirmed I will look to update the beta this weekend.

I will also try to read trough the posts from the last few days, I see some of them are pretty lengthy.

[MENTION=4482304]NaterTots[/MENTION] - Yours looks simple, make sure you master is unlocked when you connect you should see AA screen asking you to configure the new car.

Oh I forgot to say the Banana Pi Zero has arrived so I will give it a test to see how usable it is.
[Paid Software Announcement and Discussion] NaterTots:
Thanks. I'll try it tomorrow hopefully

Greatly appreciated
[Paid Software Announcement and Discussion] bbobbity5:
Thanks Fezster, l'll give it a go. Also, I'm now pretty certain the Bluetooth issue is definitely because of my car. As the screenshot shows, because my slave is connected via usb, my master can't connect via Bluetooth! And this stops the whole process from starting. However, interestingly, my wife's phone without aagateway on it can connect to the Bluetooth while the slave is plugged in.
[Paid Software Announcement and Discussion] rpgreentree:
Do you have AA installed on your slave by chance as your screenshot says it is connected via AA. Or is it possible when you first set u gateway you selected AA as default instead of gateway. Both of these scenarios will cause what you are experiencing.
[Paid Software Announcement and Discussion] bbobbity5:
Nope, aa isn't on there. It thinks aagateway is aa.
[Paid Software Announcement and Discussion] odl:
it happend to me once or twice when I was playing with AAGateWay in the car and was toggling BT on master to test automatic actions. I couldn't connect my master BT to HU because it was claiming I'm already connected (with slave name popping up). What you can try - leave slave connected to USB, get out of the car, lock it and try again after 15min or something, so you're sure HU turned off completely before next try. And remember to have BT enabled on master all the time.

I think it's important that master connect to HU BT before it (master) connects to slave.
[Paid Software Announcement and Discussion] Emil Borconi:
Is your slave rooted? if not try to disable Google Play Services on the slave manually, Android Auto is only part of the game the core of Android Auto is in Google Play Services and if that's active it can give you quite some trouble.
[Paid Software Announcement and Discussion] Emil Borconi:
Banana Pi Zero test, it works but same like Orange Pi Zero performance is poor, and it's getting to hot. I haven't tried with any radiator or cooling system yet, but still not massively impressed by this devices.

In the quest to find the perfect slave, I've made another purchase: https://www.ebay.co.uk/itm/28287166...il&pgrp=main:email&e=op&mchn=em&s=ci&mail=sys waiting for item to arrive (I haven't realised when I press the button that it can take up to 10 days :( ) but I strongly hope the wait will be worth it. The stick is supposed to support 5Ghz Wifi so that should make the whole experience way smoother.

Till now my device endorsement is as follows (for slave):

- MK808 - GOOD

- MK809 - OK

- Banana Pi Zero, Orange Pi Zero - not recommended.
[Paid Software Announcement and Discussion] bbobbity5:
Hi odl

Thanks but that doesn't work. I've left slave on it the car the entire time, car locked, and my master bt is also always on. No dice I'm afraid. Really strange though that my wife's phone without aagateway auto connects to the bt normally with the slave plugged in. And if I install aagateway on her phone, then she gets the same problem.