FORUMS

[Android 4.1+]Proxy/GateWay for Android Auto

3,038 posts
Thanks Meter: 2,457
 
By Emil Borconi, Recognized Developer on 6th July 2018, 07:00 PM
Post Reply Email Thread
16th January 2020, 09:11 PM |#2071  
Senior Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by JohnnyCanuck

There is no intent or shortcut within AA for starting or stopping the server. There is a shortcut that Tasker can use to open the AA settings page. From there you can use Autoinput to have Tasker simulate the button presses necessary.

Tasker code below (save as *.tsk.xml and then import into Tasker), but you have to have buy Autoinput from Autoapps to make this work.

Code:
<TaskerData sr="" dvi="1" tv="5.9.1">
	<Task sr="task6">
		<cdate>1575996528919</cdate>
		<edate>1579017829374</edate>
		<id>6</id>
		<nme>AAServer</nme>
		<pri>100</pri>
		<Kid sr="Kid">
			<eperm0>SYSTEM_ALERT_WINDOW</eperm0>
			<launchID>2</launchID>
			<pkg>com.aaserver.start</pkg>
			<vTarg>28</vTarg>
			<vnme>2.0</vnme>
			<vnum>13</vnum>
		</Kid>
		<Share sr="Share">
			<d>HUS Start</d>
			<p>false</p>
			<t></t>
		</Share>
		<Action sr="act0" ve="7">
			<code>20</code>
			<App sr="arg0">
				<appClass>com.google.android.projection.gearhead.companion.settings.DefaultSettingsActivity</appClass>
				<appPkg>com.google.android.projection.gearhead</appPkg>
				<label>Android Auto:Settings</label>
			</App>
			<Str sr="arg1" ve="3"/>
			<Int sr="arg2" val="0"/>
			<Int sr="arg3" val="0"/>
		</Action>
		<Action sr="act1" ve="7">
			<code>30</code>
			<Int sr="arg0" val="0"/>
			<Int sr="arg1" val="4"/>
			<Int sr="arg2" val="0"/>
			<Int sr="arg3" val="0"/>
			<Int sr="arg4" val="0"/>
		</Action>
		<Action sr="act2" ve="7">
			<code>1732635924</code>
			<Bundle sr="arg0">
				<Vals sr="val">
					<ActionId>More options</ActionId>
					<ActionId-type>java.lang.String</ActionId-type>
					<ActionType>16</ActionType>
					<ActionType-type>java.lang.String</ActionType-type>
					<EnableDisableAccessibilityService>&lt;null&gt;</EnableDisableAccessibilityService>
					<EnableDisableAccessibilityService-type>java.lang.String</EnableDisableAccessibilityService-type>
					<FieldSelectionType>0</FieldSelectionType>
					<FieldSelectionType-type>java.lang.String</FieldSelectionType-type>
					<IsFirstAction>false</IsFirstAction>
					<IsFirstAction-type>java.lang.Boolean</IsFirstAction-type>
					<IsTaskerAction>false</IsTaskerAction>
					<IsTaskerAction-type>java.lang.Boolean</IsTaskerAction-type>
					<NearbyText>&lt;null&gt;</NearbyText>
					<NearbyText-type>java.lang.String</NearbyText-type>
					<Password>&lt;null&gt;</Password>
					<Password-type>java.lang.String</Password-type>
					<RepeatInterval>&lt;null&gt;</RepeatInterval>
					<RepeatInterval-type>java.lang.String</RepeatInterval-type>
					<RepeatTimes>&lt;null&gt;</RepeatTimes>
					<RepeatTimes-type>java.lang.String</RepeatTimes-type>
					<StoredAction>&lt;null&gt;</StoredAction>
					<StoredAction-type>java.lang.String</StoredAction-type>
					<TextToWrite>&lt;null&gt;</TextToWrite>
					<TextToWrite-type>java.lang.String</TextToWrite-type>
					<com.twofortyfouram.locale.intent.extra.BLURB>Type: Text
Value: More options
Action : Click</com.twofortyfouram.locale.intent.extra.BLURB>
					<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
					<net.dinglisch.android.tasker.RELEVANT_VARIABLES>&lt;StringArray sr=""&gt;&lt;_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0&gt;%err
Error Code
Only available if you select &amp;lt;b&amp;gt;Continue Task After Error&amp;lt;/b&amp;gt; and the action ends in error&lt;/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0&gt;&lt;_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1&gt;%errmsg
Error Message
Only available if you select &amp;lt;b&amp;gt;Continue Task After Error&amp;lt;/b&amp;gt; and the action ends in error&lt;/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1&gt;&lt;/StringArray&gt;</net.dinglisch.android.tasker.RELEVANT_VARIABLES>
					<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
					<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>ActionId FieldSelectionType ActionType plugininstanceid plugintypeid </net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
					<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
					<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
					<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
					<plugininstanceid>2aefa831-e13c-45db-a664-6e644b76bb41</plugininstanceid>
					<plugininstanceid-type>java.lang.String</plugininstanceid-type>
					<plugintypeid>com.joaomgcd.autoinput.intent.IntentPerformAction</plugintypeid>
					<plugintypeid-type>java.lang.String</plugintypeid-type>
				</Vals>
			</Bundle>
			<Str sr="arg1" ve="3">com.joaomgcd.autoinput</Str>
			<Str sr="arg2" ve="3">com.joaomgcd.autoinput.activity.ActivityConfigPerformAction</Str>
			<Int sr="arg3" val="23"/>
		</Action>
		<Action sr="act3" ve="7">
			<code>30</code>
			<Int sr="arg0" val="0"/>
			<Int sr="arg1" val="2"/>
			<Int sr="arg2" val="0"/>
			<Int sr="arg3" val="0"/>
			<Int sr="arg4" val="0"/>
		</Action>
		<Action sr="act4" ve="7">
			<code>1732635924</code>
			<Bundle sr="arg0">
				<Vals sr="val">
					<ActionId>Start head unit server</ActionId>
					<ActionId-type>java.lang.String</ActionId-type>
					<ActionType>16</ActionType>
					<ActionType-type>java.lang.String</ActionType-type>
					<EnableDisableAccessibilityService>&lt;null&gt;</EnableDisableAccessibilityService>
					<EnableDisableAccessibilityService-type>java.lang.String</EnableDisableAccessibilityService-type>
					<FieldSelectionType>0</FieldSelectionType>
					<FieldSelectionType-type>java.lang.String</FieldSelectionType-type>
					<IsFirstAction>false</IsFirstAction>
					<IsFirstAction-type>java.lang.Boolean</IsFirstAction-type>
					<IsTaskerAction>false</IsTaskerAction>
					<IsTaskerAction-type>java.lang.Boolean</IsTaskerAction-type>
					<NearbyText>&lt;null&gt;</NearbyText>
					<NearbyText-type>java.lang.String</NearbyText-type>
					<Password>&lt;null&gt;</Password>
					<Password-type>java.lang.String</Password-type>
					<RepeatInterval>&lt;null&gt;</RepeatInterval>
					<RepeatInterval-type>java.lang.String</RepeatInterval-type>
					<RepeatTimes>&lt;null&gt;</RepeatTimes>
					<RepeatTimes-type>java.lang.String</RepeatTimes-type>
					<StoredAction>&lt;null&gt;</StoredAction>
					<StoredAction-type>java.lang.String</StoredAction-type>
					<TextToWrite>&lt;null&gt;</TextToWrite>
					<TextToWrite-type>java.lang.String</TextToWrite-type>
					<com.twofortyfouram.locale.intent.extra.BLURB>Type: Text
Value: Start head unit server
Action : Click</com.twofortyfouram.locale.intent.extra.BLURB>
					<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
					<net.dinglisch.android.tasker.RELEVANT_VARIABLES>&lt;StringArray sr=""&gt;&lt;_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0&gt;%err
Error Code
Only available if you select &amp;lt;b&amp;gt;Continue Task After Error&amp;lt;/b&amp;gt; and the action ends in error&lt;/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0&gt;&lt;_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1&gt;%errmsg
Error Message
Only available if you select &amp;lt;b&amp;gt;Continue Task After Error&amp;lt;/b&amp;gt; and the action ends in error&lt;/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1&gt;&lt;/StringArray&gt;</net.dinglisch.android.tasker.RELEVANT_VARIABLES>
					<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
					<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>ActionId FieldSelectionType ActionType plugininstanceid plugintypeid </net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
					<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
					<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
					<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
					<plugininstanceid>a6d62208-fb22-4ff6-8f15-f49a13eb6db9</plugininstanceid>
					<plugininstanceid-type>java.lang.String</plugininstanceid-type>
					<plugintypeid>com.joaomgcd.autoinput.intent.IntentPerformAction</plugintypeid>
					<plugintypeid-type>java.lang.String</plugintypeid-type>
				</Vals>
			</Bundle>
			<Str sr="arg1" ve="3">com.joaomgcd.autoinput</Str>
			<Str sr="arg2" ve="3">com.joaomgcd.autoinput.activity.ActivityConfigPerformAction</Str>
			<Int sr="arg3" val="23"/>
		</Action>
		<Action sr="act5" ve="7">
			<code>30</code>
			<Int sr="arg0" val="0"/>
			<Int sr="arg1" val="1"/>
			<Int sr="arg2" val="0"/>
			<Int sr="arg3" val="0"/>
			<Int sr="arg4" val="0"/>
		</Action>
		<Action sr="act6" ve="7">
			<code>25</code>
			<Int sr="arg0" val="0"/>
		</Action>
		<Img sr="icn" ve="2">
			<uri>content://com.android.providers.media.documents/document/image%3A42</uri>
		</Img>
	</Task>
</TaskerData>

Hello again.
I have tasker and autoimput bought.
I import your task and try to play. but only open Android Auto developers setings. but nothing more not enable de server
i need to setup something more?
thanks a lot!!
16th January 2020, 09:27 PM |#2072  
smoki3's Avatar
Senior Member
Flag Heidenheim
Thanks Meter: 1,250
 
Donate to Me
More
I noticed that Google assistant is not working. Looks like the microphone is not working.

And one other thing, I get a huge time difference between the screen and Spotify audio. The audio was around 30s to late
16th January 2020, 10:02 PM |#2073  
OP Recognized Developer
Flag Tg. Secuiesc / Kezdivasarhely
Thanks Meter: 2,457
 
Donate to Me
More
Quote:
Originally Posted by smoki3

I noticed that Google assistant is not working. Looks like the microphone is not working.

And one other thing, I get a huge time difference between the screen and Spotify audio. The audio was around 30s to late

Was that with root or non-root mode?
16th January 2020, 10:32 PM |#2074  
Member
Thanks Meter: 19
 
More
Quote:
Originally Posted by Klinge85

I Email to you.

Quote:
Originally Posted by Emil Borconi

Definitely a step forward. Glad you got to the bottom of it. Now can I request a bug report from the slave when the usb is being switched on and off?
I think it might be something with the socket not being closed correctly on the slave, which prevents a reopening of it, which prevents AAGAteWay to function as normal.
This would be one advantage of the TV Stick that it always has a clear shutdown/startup every time you stop/start the car, so chances are that will connect 99% of the time.

When I sent you 2 the test version I did see this, that there was a listening port stuck on IPV6, which could not be closed which prevented a new start, but I thought I've managed to fix that, maybe I was wrong...

It is definitely progress because toggling the bluetooth on the master now reliably causes the AA picture to appear on the car screen, but as you are trying to automate everything, to my mind the toggling of the master bluetooth when there is a wifi connection between the master and the slave hotspot but there is no AA connection (no AA picture on car screen), could be done by wifi launcher surely. I should not have to do it manually because it means I have to take the master out of my pocket in the car and check whether there is a connection to the slave hotspot and then manually toggle the bluetooth.
16th January 2020, 10:53 PM |#2075  
OP Recognized Developer
Flag Tg. Secuiesc / Kezdivasarhely
Thanks Meter: 2,457
 
Donate to Me
More
Quote:
Originally Posted by martin.armstrong

It is definitely progress because toggling the bluetooth on the master now reliably causes the AA picture to appear on the car screen, but as you are trying to automate everything, to my mind the toggling of the master bluetooth when there is a wifi connection between the master and the slave hotspot but there is no AA connection (no AA picture on car screen), could be done by wifi launcher surely. I should not have to do it manually because it means I have to take the master out of my pocket in the car and check whether there is a connection to the slave hotspot and then manually toggle the bluetooth.

Normally the launcher should only ever fire up when you connect to the BT (aka you get in the car) and then it should connect to tha slaves hotspot, once both conditions are met it should bring up AA.

Are you saying that if the master connect to the car's BT before the slave creates the hotspot it's not able to connect and you need to toggle the BT on the mast?
16th January 2020, 11:08 PM |#2076  
Senior Member
Flag Vancouver
Thanks Meter: 58
 
More
Quote:
Originally Posted by Marshy33

I'm also having audio issue. I've spent the whole of today trying to figure them out. It seems a common issue with android auto, the google forums are flooded with people looking for a fix.

I've tried different ROMs on both slave and master, 5ghz and 2.4ghz hotspots. Different slave phones running different versions of android. Removing Bluetooth altogether from the slave. Changing multiple settings on Bluetooth on the master and in spotify. Also factory reset my head unit. All number of things suggested online, but still no luck.

Next up is a new cable and/or updating my master to android 10 and my phones new firmware. And also trying a different master.

I'm starting to think its either my head unit or my master.

If I plug in by cable there is no issue.

I will carry on trying though, as think this app is awesome.

Sent from my MI 8 using Tapatalk

So, Emil's response that he thinks dropouts are related to the wifi speed between the devices got me looking into that. One that pops up is increase TCP buffer size (only works on a rooted phone which would be my slave) which I might try (but might not have time for a day or two). You might want to try and see if it helps.
The Following User Says Thank You to JohnnyCanuck For This Useful Post: [ View ] Gift JohnnyCanuck Ad-Free
16th January 2020, 11:35 PM |#2077  
Member
Thanks Meter: 19
 
More
Quote:
Originally Posted by Emil Borconi

Normally the launcher should only ever fire up when you connect to the BT (aka you get in the car) and then it should connect to tha slaves hotspot, once both conditions are met it should bring up AA.

Are you saying that if the master connect to the car's BT before the slave creates the hotspot it's not able to connect and you need to toggle the BT on the mast?

Yes. when I turn on the ignition of the car (equivalent to starting the car engine in my case of my car) the master BT connects quite quickly to the car and the slave hotspot starts up fairly quickly but it takes some time quite often for the master to connect to the slave wifi hotspot (several secs), even when normally before the testing I get the master to forget the home wifi so the slave hotspot is the only wifi connection that it has the password of. Obviously if I do not do that it would take even longer. Quite often the AA screen then does not appear on the car and I have to manually toggle the master bluetooth to cause it to appear and this now pretty reliably happens after my latest tweaks. If that could be automated it would be good because it is the only manual thing remaining, apart from starting the AA headunit server initially which I see from recent posts could be done in tasker, possibly when the car bluetooth is detected, and maybe stopping it again when the car's bluetooth is out of range.
The Following User Says Thank You to martin.armstrong For This Useful Post: [ View ] Gift martin.armstrong Ad-Free
17th January 2020, 09:02 AM |#2078  
smoki3's Avatar
Senior Member
Flag Heidenheim
Thanks Meter: 1,250
 
Donate to Me
More
Quote:
Originally Posted by Emil Borconi

Was that with root or non-root mode?

It was in root mode
17th January 2020, 09:06 AM |#2079  
Member
Thanks Meter: 19
 
More
Quote:
Originally Posted by DAVIZINHO

Hello again.
I have tasker and autoimput bought.
I import your task and try to play. but only open Android Auto developers setings. but nothing more not enable de server
i need to setup something more?
thanks a lot!!

You have to enable the accessibility service in Autoinput, by running the Autoinput app and clicking on the message in red which says accessibility service not enabled, then on the subsequent screen tap on
Autoinput and tap on enable on the next screen.
Restart tasker for good measure.
The Following User Says Thank You to martin.armstrong For This Useful Post: [ View ] Gift martin.armstrong Ad-Free
17th January 2020, 09:43 AM |#2080  
fma965's Avatar
Senior Member
Thanks Meter: 1,663
 
Donate to Me
More
Quote:
Originally Posted by fma965

Well when i checked it was showing it correctly again. Still couldn't get it working.

Flashed Project Spaghet to my J5 and then installed a Treble ROM Pixel Experience 9.0 and rooted and it still wouldn't work, disabled USB debugging and it works The quality seems bad though is it supposed to be? it's like it's bit rate is mega low?

Quality seems better today thing it was just a random quirk, running 5ghz and it's extremely smooth i do wonder though, 2.4ghz should have more than enough bandwidth for this stream how come 5ghz is needed for this, doesn't matter just curious
17th January 2020, 09:49 AM |#2081  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by Emil Borconi

No that setting is for those with master running Android 10.
I will look at the bug report a bit later.

I have exactly the same issue. I use Pixel 4 XL non-root as master and Nexus 5 root as slave. Apparently I should follow case 3, so I use it. My HU is Skoda Bolero MIB2. I haven't collected logs yet.
Post Reply Subscribe to Thread

Tags
android auto wifi

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes