yashsingh1/xdaforums huggingface dataset:
[Android Head-Units] surfer63:
What you see is a package name followed by an "intent". Most of the time this intent is the main activity to open the app to it's main screen.

All info can be derived from the apk in several ways.

However, the package name itself is the easiest one.

Say if I search for that "Hybrid Assistant" via my browser in the https://play.google.com/store/apps, I get a list of apps. If I click the one and only (in my case) "Hybrid Assistant" I amlead to that page. If you look at the address bar in your browser you see "https://play.google.com/store/apps/details?id=priusfan.info.bthsd10".

This "priusfan.info.bthsd10" is the package name. You can check for yourself with pandora and the others in the launcher.

To get all the other data from the apk you need to download the apk to your pc, one way or another. With adb you can simply pull it to your pc from your head unit/phone/tablet.

You need either the apktool to decompile the apk, or the aapt tool to directly display the relevant info.

With aapt you do "aapt dump badging <name_of_apk>"

With apktool you decompile the apk (apktool d <name_of_apk>) and in the unpacked folder you will find the AndroidManifest.xml. That also contains all the intents/activities.

If you unzip an apk you also get the AndroidManifest.xml, but then in binary form which you can't read. You need to convert it from binary to UTF-8 text then.

This is to give your the basics and based on this info you can try and google the web based on the terms and tools I have given you to find complete howto's. I will not repeat that or search and list them for you. :)
[Android Head-Units] naplesbill:
I have ok Google working by using Google Now Launcher
[Android Head-Units] surfer63:
You need the google app: https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox

See the package name in the link ;)

---------- Post added at 06:28 PM ---------- Previous post was at 06:26 PM ----------

Be aware that the Google Now launcher will be discontinued in the very near future.

See here (and other places on the web).
[Android Head-Units] gustden:
Are you able to get Google to talk back when you ask a question? That's what I would really like to get working :)
[Android Head-Units] naplesbill:
Sadly no, but I think I know why. When you install the Google app, not launcher just app, there is an option to download tts voices. It states no downloads available. On my phone there multiple options for download. I imagine there is something in the build.prop that might resolve this.
[Android Head-Units] surfer63:
TTS voices are downloaded from the settings -> Language and Input->Text2Speak->GoogleTTS

Is that where you downloaded/tried to download AND activated them? I downloaded Dutch and English on my head unit.
[Android Head-Units] naplesbill:
You need the voice for the google app and i bet that it wont use the system voice. In the Google app that is a separate download. I am at work or I would go look and walk through it.
[Android Head-Units] surfer63:
The Google app needs the system TTS engine, be it GoogleTTS, Acapella, or another to speak back to you.

[MENTION=3076686]gustden[/MENTION]: I checked my navi_app.txt "patch" for the SofiaServer and it misses the Google app (com.google.android.googlequicksearchbox). Even though GoogleTTS is used by most other apps, the Google Now might need to be added as well.

As I can't make your steering wheel mod I will await your modded apk and add it.

And I still hope the UI03 supports Google app now.

---------- Post added at 07:14 PM ---------- Previous post was at 06:56 PM ----------

I just checked. GoogleTSS and the Google app share the same voices. If I download another voice in settings it is immediately available in the Google app, and vice-versa.

---------- Post added at 07:18 PM ---------- Previous post was at 07:14 PM ----------

Or you can use Manifest Viewer. I used that long time on my phone but forgot completely about it here as you can easily unpack the ROMs and have all info available.
[Android Head-Units] gustden:
I tried a test including the googlequicksearchbox. Still nothing. It seems like this just allows it to speak over the radio, that was the only place I had problems. Seems like the "com.google.android.tts" covers most things I use. Any other apps we want to include with the new version?

assets/property/navi_app.txt

# ÒÔŸ®ºÅ¿ªÊŒÎª×¢ÊÍ:µŒºœÓŠÓÃ
cn.com.tiros.android.navidog	#µŒºœÈ®
cn.com.tiros.android.navidog4x	#µŒºœÈ®2013
com.autonavi.xmgd.navigator	#žßµÂµŒºœ
com.mapbar.android.mapnavi	#µŒºœÐ¡Ã×
com.pdager	#ÌìÒíµŒºœ
com.raxtone.flynavi	#·ÉÂ¬¿ìµŒºœ
com.uu.uunavi	#ÓÆÓÆµŒºœ
com.baidu.navi	#°Ù¶ÈµŒºœ
cld.navi.mobile.mainframe	#¿*Á¢µÂ
com.mapbar.android.mapbarmap	#ÍŒ°ÉµŒºœ
#com.mapbar.android.carnavi	#ÍŒ°ÉÆû³µµŒºœ
title.navi	#µÀµÀÍš
cld.navi.c2802.mainframe	#¿*Á¢µÂ
cld.navi.c3525.mainframe	#¿*Á¢µÂ
cld.navi.c2198.mainframe	#¿*Á¢µÂ 2015/12/24ÔÃžèÌíŒÓ
com.navngo.igo.javaclient	#IGO
com.basarsoft.igo.javaclient	#IGO
com.mxnavi.mxnavi	#ŒÑÒÕÌï¶šÖÆµÄÃÀÐÐµØÍŒ
#com.txznet.txz	#ÔÆÖ®ÉùµŒºœ
com.autonavi.amapauto	#žßµÂ³µ»ú°æ
ru.yandex.yandexnavi
com.navitel
com.google.android.apps.maps	#¹ÈžèµŒºœ
com.turboled.enhancedtts	#EnhancedTTS
com.mapfactor.navigator	#Mapfactor Navigator Free
com.generalmagic.magicearth	#Magic Earth
net.osmand	#OsmAnd Free
net.osmand.plus	#OsmAnd Plus
com.here.app.maps	#HERE WeGo
com.mapswithme.maps.pro	#MAPS.ME
com.waze	#Waze
com.navfree.android.OSM.ALL	#Navmii
com.navigon.navigator_one	#Navigon
com.tomtom.gplay.navapp	#TomTom Mobile Go
com.sygic.aura	#Sygic GPS
com.alk.copilot.mapviewer	#CoPilot GPS
cz.aponia.bor3.offlinemaps	#Offline Maps & Navigation
com.google.android.tts	#Google TTS
com.google.android.googlequicksearchbox	#Google Quicksearch
com.turboled.enhancedtts	#Enhanced TTs improves TTS
[Android Head-Units] naplesbill:
I took a screenshot of what I am talking about. Whether you go that through settings or the app there are no offline voice files available to download or downloaded.

If you go the the all tab it states none are available to download.
[Android Head-Units] bogdi1988:
I saw the same thing on my car. Curious if by any chance the Google app does not register that the TTS system is there, hence it doesn't allow you to download any dictionaries?

On a similar note, have you guys looked into clean master app? (http://forums.androidcentral.com/nexus-6p/662953-why-do-i-hear-no-sound-when-i-call-ok-google-2.html)

EDIT: did not work. :(

I will try it later today if I have the time.
[Android Head-Units] gustden:
This is because the Joying ships with the pico version of gapps. I have been down the path of installing the the complete gapps package manually over adb. It does add accessibility options, ok google from any screen, voice training, additional tts downloads, etc.

But in the end, google search still would not speak :(
[Android Head-Units] wanb1i:
I used the one that Surfer linked in his post above mine. He (Surfer) indicated (or I thought he did) that "Voice Reply" was working over other apps like music. I may have misunderstood his post. At any rate, I think I'm just going to go back to Your December sofia file that gives me ptt for Google Search. I'd love to have resume and voice response, but its not worth the inconvenience of the multiple button push to get to the app I want (most of which I don't use), isn't worth the effort required to get there.

I appreciate all the work you & Surfer have done to make this HU better, unfortunately, I don't have the skills required to deploy them.

---------- Post added at 07:26 PM ---------- Previous post was at 07:17 PM ----------

Woe! WAY over my head and skill level! Thanks for the detailed information, but I have no idea what you're talking about or the skills to deploy it. I'll just go back to the December sofia apk that was working before, but without the resume function.

I'll keep an eye on this thread to see if a script or app comes out that will allow someone with my skillset to make the necessary changes.

Thanks again for your work! :good:

---------- Post added at 07:30 PM ---------- Previous post was at 07:26 PM ----------

Google Search is installed by default in the ROM,but the tts function doesn't work.
[Android Head-Units] gtxaspec:
How do you install Gapps without being in recovery using ADB? Does ADB sideload work? Probably need to remount rw. Please share details!

---------- Post added at 10:57 PM ---------- Previous post was at 10:50 PM ----------

Check and change languages for google TTS:

Settings ( must be using full settings apk ) > Text-to-Speech Output> Click on gear icon next to Google Text-to-Speech Engine>Install Voice Data>English (United States) or whatever language you need>Voice Set 1>Female (or whatever gender you prefer)
[Android Head-Units] windowsdan4216:
I see you're having the same issue as me. Do you ever get it fixed?
[Android Head-Units] surfer63:
I did not even know there was a pico gapps version and a GoogleTTS gapps version.

I said that I tested and I did: on 2 phones as my son had my car last night. I never thought there was a difference.

Which gapps do you use: The official 5.1.1 download (like from http://www.android.gs/download-install-and-flash-google-apps-for-android/) or some mixed bag (like fromhttp://opengapps.org/) or one you created yourself? And do you have a link if you don use the official 5.1.1 pack?

I already started writing on my complete install script and this definitely need to go in.
[Android Head-Units] bogdi1988:
So I just got an interesting spin to this whole TTS issue...

As I was finishing up my upgrade on the 3/14 update... Had the sound up to like 20 or so. Really quiet in the garage. As I was testing the voice search...

- press voice search button

- say a command (what is the weather like right now)

- starts searching

- brings up the google page and shows the weather

- I can hear in the speakers as the audio "turns on" to output something, but it is only a slightly louder static than the background one.

- stays on like that for a few seconds, then it turns back "off" to normal static.

Any possibility that the audio is just not routed to the right output device?
[Android Head-Units] gustden:
In the process of working on the next version, I saved off a less modified copy with one button ( SRC ) for the google search, added the TTS changes, and nokill. The google voice search is hard coded in the APK, so no launcher.sh is needed.

I posted it here with the original mod. It's built on the 3/14 rom. Several people asked for mod on the latest ROM. Sounds like it might be useful to you.

https://xdaforums.com/showpost.php?p=70480258&postcount=549
[Android Head-Units] surfer63:
Thanks again.

However, there are quite a few units out there that do not have the "src" button like my own JY-VL130N2. It means that we still need to add it as key in our launcher.sh.

(or examine your version and connect it to one of the other hardware buttons that are on my unit and not on yours, e.g. BAND/MEDIA).
[Android Head-Units] gustden:
On my unit, the 'SRC' hard button is also tied to the 'SRC' soft key in the steering key mapper.

Even if you don't have the hard key, you should still be able to assign it directly to a steering wheel key.
[Android Head-Units] surfer63:
I don't have steering wheel keys :)
[Android Head-Units] wanb1i:
Cool :cool:, EXACTLY what I needed! Works perfectly! Thank you! :good:
[Android Head-Units] gtxaspec:
Audi A4 2006

In my Audi 2006 A4, the Scroll Button on the left hand side of the steering wheel only controls the radio stations within the Joying radio program. Scroll up changes the radio station backward, Scroll down changes it forward. It doesn't seem to work in any other Joying program or in any media programs. I was able to use the debug APK to get the key codes, are you able to add it to your program?

The keys only seem to be displayed in the debug log when I am using it within the radio program. Very puzzling. If the radio is not active, they won't show.
[Android Head-Units] surfer63:
[MENTION=3076686]gustden[/MENTION]

The navi_app.txt is still missing the Google Now Launcher and the Google app.

This might be the issue [MENTION=503463]AssassinsLament[/MENTION] is mentioning here.

I added them to the navi_app.txt.

I already put it in my "own" Sofiaserver apk, but I can't test everything :). Can you please make a V4.1 (or so).

see attached txt file.
[Android Head-Units] WILD9:
Hope you don't mind but I added:

com.tomtom.speedcams.android.map	#TomTom Speed Cameras

which is a speed camera warning/overlay for any App so quite useful to be able to hear.
[Android Head-Units] gustden:
I added the following to my local copy of the file:

com.tomtom.speedcams.android.map	#TomTom Speed Cameras

com.google.android.googlequicksearchbox	#Google Quicksearch

com.google.android.launcher	#Google Now Launcher

Anything else we want to add?
[Android Head-Units] AssassinsLament:
[MENTION=3076686]gustden[/MENTION] did you happen to see any volume knob interaction in Server apk also? What I found out with using an external usb dac is that the volume can not be controlled using joying's volume knob. The usb dac's volume can be controlled for a moment with the underlying Android sound settings but it gets taken over again by joying's software. Basically, the volume knob (and systemUI taskerbar volume icon) controls the volume of all the joying outputs instead of Android itself. Which is a problem for a usb dac because while using a dac (for better sound quality), you can not use the volume knob to control it. I was wondering if there was a way to intercept volume knob turns, the same way you intercepted the buttons? If so, then we could maybe send those to the android system and basically control the system's volume. I know you're a busy person, so I'm not asking you to do it, just if you've seen it in Server apk since you've been inside of it. Thanks!
[Android Head-Units] gustden:
Looking at the code the MCU does send messages to the server package to display the volumeUI and issue CAN bus messages if needed:

dev/ReceiverMcu.java: OnHandleMain

case 7:

HandlerMain.mcuKeyVolUp();

return;

case 8:

HandlerMain.mcuKeyVolDown();

return;

case 9:

HandlerMain.mcuKeyVolMute();

There might be a better place, but this is the most obvious. The code to change volume could either be done in java, or possibly from a script using keycodes.

KEYCODE_VOLUME_UP (24)

KEYCODE_VOLUME_DOWN (25)

KEYCODE_VOLUME_MUTE (164)

It certainly *looks* possible :) Can you try keycodes in a terminal or ADB and see if it does what you want? Sometimes standard android keycodes do very unexpected things on these units.

It would be a fairly quick hack to issue the keycodes from launcher.sh, but not sure how fast it would react to a quick change in volume.
[Android Head-Units] AssassinsLament:
Thanks for the info! I'm wondering if those keys are just for the physical buttons or does the knob work the same?

I was using a usb remote to turn the volume up and down, and it does work on the android system itself, and it controls the usb dac, but not on joying's output's volume. As it seems, whoever joying gets their software from, overlays android's volume with their own that only controls their output in the back of the headunit. The other thing that happens is that one of joying's software packages takes back control over android's volume control. Like I can turn the volume down on the usb dac, but within a second or two, android's volume goes back to max. So even if we intercept those keypresses and turn up and down android's volume, we have to find which apk is changing the volume back.

I'll try your suggestions, thanks!

EDIT:

Just tried shell keycodes and it works, but like I said, something changes the volume back to max after a few seconds. Half way there though!

EDIT2:

Did the little hack to intercept volume up/down and it works but does not react fast enough for a knob, so it probably isn't a good solution. Also, there's still the issue of Joying's software automatically maxing the system volume shortly after any change. Guess I'll do more when I have more time.
[Android Head-Units] bogdi1988:
Take a look at one of the Sofia server apps. I am thinking it is the one that manages the backup camera input and stuff, since the audio gets reduced when in reverse.
[Android Head-Units] AssassinsLament:
It's probably in the Sofia-1-C9-Server-V1.0.apk as when I disable this app, it essentially turns off all button interactions, and all sound routing through the joying outputs in the back... and it magically stops changing android's sound levels when it's manually changed. I'll have to dig in the code more.
[Android Head-Units] bogdi1988:
BTW, which DAC are you using? I am curious how I could improve the quality of my audio if we get this one figured out...
[Android Head-Units] AssassinsLament:
I'm using a Behringer UCA202.
[Android Head-Units] bogdi1988:
We'd need something with a few more channels to do front/back and sub
[Android Head-Units] AssassinsLament:
Yeah, that was something I had when I did a Nexus 7 set up in my car. Just wanted to test it out to see if a usb dac was something that could be done. Looks promising to me. Would like to get it working before investing in something new.
[Android Head-Units] bogdi1988:
What device would you be looking for multi channel support?
[Android Head-Units] AssassinsLament:
I haven't even begun looking yet, so I don't know.
[Android Head-Units] swanie2000:
When I was messing with the Nexus 7 install in my dash, I used a cheap 20W 7band EQ to provide the front read fader.

The USB DAC provided the left right balance.

Plus the output of this Joying unit is pretty low, and I needed to keep the pre-amp EQ to bump up the volume to feed my stock Bose amps.
[Android Head-Units] gustden:
I have never used a USB DAC, but just curious where/how the volume level should be set. I assume this is no different than analog sources, where the best place to adjust volume is at the final amplifier.

If you change the volume in andorid ( digitally ) doesn't this force it to be re-processed by android prior to being sent to the DAC? For the cleanest sound, wouldn't the best thing to do is essentially "dump" the music file to the DAC and avoiding any processing in andorid? Going back to the analog model, isn't the signal sent via the USB essentially the same as a preamp output level?

I know on my home stereo which is digitally fed from a PC (optical), you can crank the amplifier up and adjust the sound level on the PC, but from everything I have read that is the *wrong way* of doing it.

Are there any provisions or signaling in android to change the volume on the final/external amplifier?
[Android Head-Units] AssassinsLament:
I'm probably not the right person to answer specifics about how android interacts with a usb dac, sorry. Plus, I would imagine every dac interacts with android differently, then throw in different android versions.

What I do know is that android can and does control the volume of what my dac (UCA202) outputs. No need for an external volume control. Although I've seen reports where some say they can not control the volume with android. So I don't know if it does the processing and then sends it to the dac, or if it actually does the processing on the dac (which I think should be happening). Also what I do know is that the sound quality is a lot better from the dac's outpots than from Joying's outputs.

I found the method that keeps maxing android's volume, but I haven't found where it's being called from. If I could find that, I could probably use that to set the volume to match what ever joying's volume is set at. More searching...
[Android Head-Units] surfer63:
The navi_app.txt contains the programs by package name that can play their "sound" by reducing the radio app output.

The discussion started here (post 16 to 20) about taking that file outside the Sofiaserver apk, but the discussion was off-topic there, so I continue it here.

I modified the Sofiaserver apk by removing the navi_app.txt, updating the smali/app/DataApp$2.smali setting it to "/data/navi_app.txt" and put the navi_app.txt on the /data folder with -rw-rw-rw- (666) but this didn't work.

Maybe because the file is referred to in the AndroidManifest.xml.

So I renamed the file to mod_navi_app.txt and also in the smali, but this didn't work either.
[Android Head-Units] gustden:
The path name is referencing an internal asset of the package, and not a physical file path.
[Android Head-Units] surfer63:
That's my lack of knowledge. After the failed attempts I did a "grep -r launcher" in the decompiled apk to see how you call the launcher.sh script but couldn't find it in the smalis .

And then I decided to wait for the grandmaster. :D
[Android Head-Units] Xaadi316:
hi

is it possible to make source button programmable like adding the possibility for us to add our own programs

example i want it to cycle between mx player, power amp, spotify, radio and may be youtube as well ....

i dont know programming so can any one help me editing the code to make this work please

thanks
[Android Head-Units] surfer63:
Now that you are working on this I have a question. You now create 2 versions of the same apk: a NoKill version and a NoKill-SteeringWheelKeyMod version.

Is it possible for you to create one "universal" version? A version that checks on startup for the launcher.sh. If it can't find it, it will behave as the normal NoKill-only version. If it finds the launcher.sh, it will use that file.

It will:

reduce maintenance of multiple versions

simplify selection for users: only one apk.

if something goes "wrong" with copying of the launcher.sh, the apk will work as default

If I had to write this in python or bash shell or the like, I would certainly help with this, but in this case I can only ask. Also whether it is possible at all.

The zip could come with a "nokill_only_install.sh/bat" and a "nokill_keymod_install.sh/bat" for example.
[Android Head-Units] frankienones:
Hi

Would you mind adding the "DAB+1V1-20160801Sofia.apk" to your list of apps.. This is the radio app , which we HAVE to use in Norway :) (FM radio is of no use any longer)

It is in the "OEM" folder of the unit..

Tia

Frank
[Android Head-Units] gustden:
When I started working with this, I was originally going to have a file (read at startup) to indicate which of the triggers would be sent to the shell script vs handled internally. If the file didn't exist it would behave exactly as stock.

Right now, it is fairly simple changes to the smali code

- Add completely new functions

- For each trigger replace the existing function call with the new function call

It gets much harder trying to change the logic within existing code. Each trigger point would have to include additional logic to decide to continue or call the new function. Not a simple task to do purely in smali code.
[Android Head-Units] gustden:
I was under the impression the files listed in the file navi_app.txt make it so the packages listed can 'speak' during radio playback. No problem adding it, but not sure if it would do any good if you not using the built in radio (AM/FM) functions of the unit.

com.ex.dabplayer.pad
[Android Head-Units] frankienones:
..my mistake :o

I am not very familiar with how you implement app's in the launcher script , I wanted to have the DAB app - as an option.

similar to :

---------------

# Radio

radio="am start com.syu.radio/com.syu.radio.Launch"

--------------

The other part of the script , i think i can manage (select which key - to start which app..)

Sorry for my misleading question in the first place

Frank
[Android Head-Units] gustden:
dab="am start com.ex.dabplayer.pad"

-OR-

dab="am start com.ex.dabplayer.pad/.activity.MainActivity"

One of these should work.
[Android Head-Units] frankienones:
Thank you :)

I will try tonight

Frank
[Android Head-Units] surfer63:
That's correct. It is not useful to add it to the navi_app.txt. It will only create confusion.
[Android Head-Units] gustden:
I don't think we want this entry in the navi_app.txt either:

com.google.android.googlequicksearchbox	#Google Quicksearch

On my unit, it prevents lowering of the music volume when invoking the google voice search.