yashsingh1/xdaforums huggingface dataset:
[Android Head-Units] gustden:
I just put an update on the first page (v6.2) that has a fix from [MENTION=7329495]xdamember2[/MENTION] for the google navigation not speaking.

Sofia-1-C9-Server-V1.0.apk/app/ToolkitApp.java/

public static void setStreamVol(int streamType, int vol) {
AudioManager am = ObjApp.getAudioManager();
int value = am.getStreamVolume(streamType);
if (CmdSound3702.debug3702 || CmdSound8288.debug8288 || CmdSoundSys.debugSys) {
Log.d("sound", "streamType = " + streamType + " currtVol = " + value + " toVol = " + vol);
}
if (value != vol [B]&& vol != 0[/B]) {
am.setStreamVolume(streamType, vol, 0);
}
}
[Android Head-Units] alexyie:
Hi, I am new with Joying Sofia Head Unit, and the first thing that I wanted to do is to change the SRC button to call Android App/Task Switcher instead, is that possible to do this modification?
[Android Head-Units] gustden:
It should be possible. You will need to modify case 37) of the launcher.sh script to run the following:

input keyevent KEYCODE_APP_SWITCH

I haven't tried it, but it should work :)
[Android Head-Units] gustden:
It should be possible to check to use the 'dumpsys activity activities' command to build logic to issue a pause if spotify if more recent in the task list than Norwegian radio.

Not sure if your a shell programmer, but here are a couple of examples how dumpsys can be used in the launcher.sh script:

https://xdaforums.com/showpost.php?p=71533284&postcount=256

https://xdaforums.com/showpost.php?p=70790715&postcount=11
[Android Head-Units] chammock:
[MENTION=3076686]gustden[/MENTION], did you ever get anywhere with the above request? I can confirm that the steering wheel buttons in question do a scan (it goes through all the frequencies until it finds a sufficiently strong signal). Personally I would say the benefit of being able to customise these buttons far out way the cost of loosing this feature on the radio (which can also be executed by holding the onscreen scroll buttons). Is it possible to do this?
[Android Head-Units] Cr4zyMan:
how to install this ? thanks !
[Android Head-Units] romanchenko:
Hello all. I have VW customised one JY-VL130N2. It has following buttons on the face: HOME, BACK, MUTE, BAND, NAVI, MEDIA, PLAY/PAUSE, PREV, NEXT.

And I can't assign all of it. When I flash custom_keys_v6.2 works only back and home. Customising buttons by keycodes from comments don't have result. I've tried to learn key codes, but all apps I used show only BACK button. Maybe somebody can recommend me app that really works? Later I'll upload my config for check.
[Android Head-Units] gustden:
It sounds like launcher.sh is not being executed. Did you modify it?
[Android Head-Units] romanchenko:
Yes I did, but with unmodified launcher.sh same result.

Написан с Redmi Note 2. Работает на XDA Forums PRO
[Android Head-Units] surfer63:
I have the exact same unit with the exact same buttons. It works fine for me.

How did you copy the launcher.sh script onto the unit? With the script or manually?

And what happens if you open a terminal and type something like "/data/launcher.sh 33"?

This should launch the application you assigned to key 33 (MEDIA)
[Android Head-Units] p33t-r:
As I mentioned in a different thread, I have the same issue, seems like the launcher script is not working. I've tried with my custom script and with the original and simple script. Like it's not being executed. I've installed it with the script. Also busybox updated to the newest version, still no luck.

I will try the terminal and will update.
[Android Head-Units] surfer63:
When you use that terminal please also do a "ls -l /data/launcher.sh". The laucher.sh should have the following "mode bits": "-rwxr-xr-x", being 0755
[Android Head-Units] romanchenko:
surfer63, gustden Please check my launcher.sh.

And is it possible to bind on first press of BAND play stock radio and on the next presses switch saved stations?

Why stop at what has been achieved? :)

If playing TuneIn radio - switch its favorites...
[Android Head-Units] wanb1i:
I'm having similar issues with poweramp with the 6.0 (GVS) version and in the newest update (6.0.1), the GVS opens the Google app, it listens, but the mic doesn't pickup anything. This worked fine in 5.1.1 & 6.0. I also use ProjectM for my Live Wallpaper and I noticed starting in 6.0 AND in 6.0.1, that the wallpaper shows up and wanders around the screen, but doesn't "move with the music". It also doesn't move with the music in the ProjectM app. Not sure if the GVS not hearing and ProjectM, not hearing are related or not, but I thought I'd mention it.

One more thing as an FYI, the 6.2 version sofia app (GVS) doesn't work in the 6.0.1 update, except vol+/vol-. None of the other keys work at ALL, even after reprogramming them.
[Android Head-Units] romanchenko:
I put my config to HU, reboot, set permissions(ls -l /data/launcher.sh) and when i try to launch "/data/launcher.sh 33" through the terminal it swears on permissions.: [251]: cat... permission denied.

It can't write to /data.
[Android Head-Units] surfer63:
I asked in one of the previous posts "did you use the script to install, or did you copy it manually?"

I also asked: please do a "ls -l /data/launcher.sh". The laucher.sh should have the following "mode bits": "-rwxr-xr-x", being 0755

I didn't get an answer.

Anyway: Open a terminal and please do

su
chmod a+x /data/launcher.sh

And try again to execute the "/data/launcher.sh 33"

If this fixes it, it is because of the incorrect copying, which I asked for twice in two separate ways. Please also read my questions and answer them
[Android Head-Units] romanchenko:
Sorry, it seemed to me that the fact that I put permissions aside undoes the importance of information about how the config was installed. The config was installed by the script, but since it did not work, I set the permissions with my hands, using esexplorer.
[Android Head-Units] surfer63:
Your error " permission denied" points to the fact that it doesn't have the execute mode bit set.

Without answering my questions, it stops here. You only ask but don't give the required info to be able to troubleshoot further.
[Android Head-Units] xxBrun0xx:
So have been looking at the example script included and am a bit confused. If all I want to do is play and pause music when car starts/stops, but want to leave the rest of the buttons alone, can I just remove all other lines from the example script, or will that break my buttons? Have the Toyota specific unit with a bunch of hardware buttons.

Also, have noticed head unit sometimes reboots after being shut down with the latest no kill server. Did anyone every figure out how to fix this?
[Android Head-Units] edit:
[MENTION=3076686]gustden[/MENTION] is working to modify his mod to work with the latest firmware. I can't say for sure but from the looks of it, it's a bit more complicated that it used to be and it takes more time.
[Android Head-Units] romanchenko:
Sorry again, it's because i'm novice in BASH and Linux. I did, what you say (su, chmod...). Now it works, but my launcher.sh is so buggy. It's don't exexute 1x press, only 2x. App rotate by MEDIA not work. Can you give me your launcher.sh? And big thanx for your help.
[Android Head-Units] gustden:
I am having some issues in general with the May 27 release. With or without the no-kill patch my unit is rebooting almost every time I turn the key on. It is also 'hanging' long enough to pause any music playing.

I have made the updates the new no-kill on the latest release, but want to see if I can figure out the hanging and rebooting before posting.

I'm probably going to wipe my unit and start from scratch to see if I have the same issue.
[Android Head-Units] midd33:
I have a request for version 4.1. I'm still running Android 5.1.1. I use the app ALPConnect but the sound is not coming through the Joying. Is it possible the app can be added to the Navi_App.txt to allow the sound to come over? It's kind of important that the audio works.
[Android Head-Units] romprod:
Ditto but I guess it's not working with the latest firmware which I'm also on.

I'll revert to V3 which seemed to work OK for me and try again, but maybe I was mistaken so I'll check again.
[Android Head-Units] surfer63:
= First press -> play stock radio; Next press -> switch saved stations

There are 2 intents called "<service android:name="com.syu.radio.PrevService">" and "<service android:name="com.syu.radio.NextService">". I can't detect from the smali code whether these are used for prev/next frequency, prev/next band (FM/MW/LW), prev/next preset station, or whatever. Someone with more knowledge should take a look at those functions.

(an intent can be used to start an app and make it do something specific: open main screen, open app settings, etc)

= For TuneIn Radio: do an "apktool d tunein.apk" and see which intents are available in the AndroidManifest.xml.

Your shell script is syntactically correct. That means that there are no errors in the shell script. That doesn't mean that every function used will do what you hope it will do. That will need quite some testing.

(For some syntax checking of bash/shell scripts you could use https://www.shellcheck.net/. It will throw a lot of warnings at you as it is very strict. This launcher script for example doesn't contain a "shabang" as first line of the script (like #/system/bin/sh for example). It also contains both posix and non-posix code (bash contains non-posix functions btw). Actually that should be corrected (but I make these "errors" as well. You simply use the functions you know and most shell interpreters work fine with it).

[MENTION=3076686]gustden[/MENTION], who created this script, also has currently issues with the launcher script. Not because of errors in the script, but because this (still buggy?) 6.0.1 android version behaves differently.
[Android Head-Units] surfer63:
Duplicate of #441

probably due to the issues in the forum this afternoon
[Android Head-Units] romanchenko:
By the way, I do not know if it was mentioned earlier, but: if you press simultaneously BAND and NAVI buttons with a slight delay, first the BAND and then NAVI, then the radio presets switch forward. If you first press NAVI then BAND - switch back...

surfer63 Do you know keycodes for MUTE and EQ buttons?
[Android Head-Units] gustden:
I just added updates for the latest Joying ROM dated 5/27/2017 to the first post of the thread.

It is working real good on my unit with the latest ROM.

All include additional navigation apps listed in the navi_app.txt file within the apk.

V6.3-Sofia-1-C9-Server_NOKILL.zip - Original file with task killer removed, pauses music before sleep .

V6.3-Sofia-1-C9-Server_NOKILL_GVS.zip - Task killer removed, Google Voice Search on 'SRC' key, pauses music before sleep.

V6.3-Custom_Keys-Mods.zip - Complete key modifications ( requires launcher.sh )[/QUOTE]
[Android Head-Units] gustden:
Can you supply the android package name? It should something like:

com.google.android.apps.maps	#Google maps
[Android Head-Units] midd33:
I believe this is it: com.alpriority.alpconnect

Thanks.
[Android Head-Units] gustden:
Here is 4.1 with alpriority added to the navi_app.txt. It should work, but I have no way to test.
[Android Head-Units] midd33:
[MENTION=3076686]gustden[/MENTION] Thank You. I have never installed this apk file. So I would use the wireless adb to do so, correct?
[Android Head-Units] gustden:
I suggest that you install the 4.1 package from the first post and make sure everything working correctly for you ( that has been tested and known working :) )

If that is working, you can replace the file with the one I just made using adb.
[Android Head-Units] CampbellLTZ:
Dumb question but I am new to rooting and adb commands. Once I root it (fingers crossed), what commands do I use to install these mods?
[Android Head-Units] edit:
If you look in the arhives there are scripts that do that for you...
[Android Head-Units] shanetrainST:
Hi Gustden

Would it be at all possible to add alp to the V6.3 Navi_app.txt, would really appreciate it alot
[Android Head-Units] mantamanta:
Is this compatible with MTCD units?
[Android Head-Units] gustden:
Nope
[Android Head-Units] midd33:
I finally figured out the connecting my laptop to my joying via adb. I connect using the ip address:5555 port. But I can't launch the install.bat file to do the install once I change to the custom keys folder. When I try to install, I get the adb command is not recognized.
[Android Head-Units] akuma148:
Hello gusten, thank you for all your great work and support here.

I wanna ask if it would be possible to make an apk that doesn't pass the CALL/BT softkey or the HANG softkey.

I'm currently using the No Kill/Google Voice mod, but would love to be able to have custom keys without compromising the CALL or HANG key because I use those keys a lot to pick up calls and hang up calls. I haven't figured out a way to assign the stock functions for those keys, so I figured the best is to keep the stock functions by not passing them.

Thank you for any help.
[Android Head-Units] surfer63:
You do not connect to adb and then start install.bat.

The install.bat does connect using adb and installs "the stuff"
[Android Head-Units] fabien_m2002:
Hello

i have installed V6.3-Sofia-1-C9-Server_NOKILL_GVS on 5/25 firm but how it works?

When i press SRC button, it switchs between apps as before but no Google search triggering. I notice that if i press on Google icon then it does not work (dialog box opens but the mic doesn't pickup anything).

Another question: How to uninstall your server app?

Thanks
[Android Head-Units] surfer63:
Did you reboot your unit after the Google app install? That is absolutely necessary.

You can take the sofiaServer app out of the allapp.pkg and copy that one back onto your unit.
[Android Head-Units] fabien_m2002:
What i did in that order:

- Install of V6.3-Sofia-1-C9-Server_NOKILL_GVS

- Install of Google app

- Reboot

Maybe it's wrong?
[Android Head-Units] midd33:
ok thanks.

when I launch the bat file, I get a bunch of adb errors then it tells me to reboot my unit.

I did open the bat file with an editor and noticed it looks for an sd card. I didn't have one inserted at the time. I'll try when i get home from work.
[Android Head-Units] surfer63:
That doesn't matter. It is a symlink. The /sdcard is ALWAYS internal memory. on EVERY phone/tablet/android device. It is simply how android calls it already since 2.2
[Android Head-Units] fabien_m2002:
How to reinstall allapp.pkg without flashing firmware again?
[Android Head-Units] midd33:
ok then I'm at a loss. because when I type install.bat followed by my joying's ip address, I get multiple adb errors followed by a message to reboot my unit.

Is that supposed to happen?

I'm on the same network when connecting my laptop to my unit. 10.0.1.xxx
[Android Head-Units] surfer63:
On 6.0.1 the adb over tcpip is not enabledby default.

Did you download a terminal app and entered in the terminal "setprop persist.adb.tcp.port 5555", and then rebooted your unit?

And on the other hand: when adb over tcpip is not enabled, adb over usb is. So in this case you could also use a usb cable.

or activate adb over tcpip
[Android Head-Units] midd33:
I think I got it. I did "install.bat 10.0.1.11:5555". Had to do it twice for it to push the file. Going to try to move the modified file you did for me now.

---------- Post added at 09:34 PM ---------- Previous post was at 08:59 PM ----------

I got it to work. Thanks for adding ALP and thanks to everyone who helped me get it installed!
[Android Head-Units] edit:
I tried to switch to Poweramp player from PlayerPro because Poweramp has a better interface, more customisable, can download missing album art and so on.

I found 2 problems that are a deal breaker...

1. If it's left playing when I turn off the car it does not start when I start the car. I am not using it on daily basis, I use other apps to play music. I want to start the music only when left active.

2. there are some moments when out of the blue it stops, I press play and it goes on....

Have you managed to find a solution?

Later edit :

I kinda found what I needed :

1. this worked :

97) # ACC_ON - execute on key on

( $poweramp && sleep 2 && $play ) &

;;

but has a 15 seconds delay till the music starts when the app is in background (had Google Maps in front)

2. this had something to do with the phone pairing, bluetooth... I don't know why exactly but once I disconnected BT from my phone it did not stopped at random... but I need to test more.
[Android Head-Units] dayanandgp:
I have same issues with poweramp :

1. Poweramp doesn't auto start unless you add it to resume with Acc, what you already did now

2. I have only usb port and the stupid unit scans all usb drive everytime it resumes hence I had to set delay to 15 seconds to allow the scanning

I wish I could solve the usb scanning bug... Joying Support says it normal and usb is scanned every wakeup :rolleyes:
[Android Head-Units] rosillo1:
I tried on my HU 130n2 but Bluetooth doesnt work if i press SWC button...

Radio button ( hard) it shows nothing.

Back button shows "navi"
[Android Head-Units] surfer63:
First: Please don't copy such a huge post if you only need a couple of lines out of it. It is pure "page filling garbage" and makes your post hard to read.

Second: Read the forum rules above every sub forum, also above this forum. That would prevent my point "third".

Third: Please tell us what you did and how you did it: Did you use the full screen-mod sofia apk? Which version? On which Android version/release? How did you install it? Did you make modifications to the launcher.sh (if you installed it)?
[Android Head-Units] midd33:
I'm back. After using the joying for a few days with the 4.1 apk file installed, I don't need the custom keys. I had Waze assigned to the Navi button. My only source of music is Poweramp and bluetooth music.

Can I just go into a copy of the apk and remove the launcher.sh and reinstall the modified version that you provided me? I need the Navi_app.txt file you previously provided me with the alpriority.
[Android Head-Units] Shiwantha:
Can you pls guide me how to get "SOURCE/MODE" will only go to home screen and keep everything else as stock level features? Cheers.
[Android Head-Units] midd33:
Is there a version 4 apk file with no custom keys? I want to try and move the update Navi-app.txt file into it. I tried moving the file into the V3 apk with no custom keys using apktools. But the sound was muted again even though the buttons worked. I'd like to have the best of both worlds
[Android Head-Units] rknuette:
I've installed V6.3-Sofia-1-C9-Server_NOKILL.zip yesterday and since then the unit does not got into standby when I switch of ignition, it switches of completely after about 2 or 3 minutes. Before it was for days (I guess, at least a very long time). Dormacy setting is untouched.

Any idea what to do?
[Android Head-Units] edit:
It switches off (goes to sleep) in 5 minutes instead of the usual 1. Unfortunately there is no solution for that. The only solution to make it sleep in 1 minute again is to cut the power (all power) for a few seconds.

But the problem comes back as I wrote in my Q&A.
[Android Head-Units] rknuette:
If I understood your explanation to FAQ "07" correct than this behavior can be caused by any misbehaving application, it is not an issue of the May 25 update itself (which would surprise me since I haven't had this behavior before).

So it could be due to installing V6.3-Sofia-1-C9-Server_NOKILL.zip (or -I have to check this - other software (like Super SU) I've installed since then).

Uninstalling the software or reverting back to the original Sofia Server could resolve THIS issue?
[Android Head-Units] surfer63:
Reverting back to the original would prevent the issue, not solve the issue.

It is not the SofiaServer apk itself. It is some other misbehaving app.

The original SofiaServer apk has a "kill switch" when the unit goes to sleep. All applications are killed apart from a few mentioned in the unkill txt file.

So the original SofiaServer kills your misbehaving app as well.

The NoKill versions doesn't kill apps. It means that this misbehaving app that prevents the unit from going into sleep mode, remains misbehaving. As the Joying unit has some power management it detects that some "rogue" app prevents the unit from going into sleep, there by draining the battery, and therefore switches off the unit completely.

You should try to find that misbehaving app and I can almost guarantee that it isn't SuperSu either.
[Android Head-Units] rknuette:
Thanks for explaining, understood.

This could be fairly difficult as it could be every application on the radio.

The main reason for me using a different SofiaServer was the updated navi_app.txt, since I didn't get voice directions from my navi-apps with the original SofiaServer due to missing entries in navi_app.txt (and maybe other txt files). With the "nokill" apk this works very well., but the "nokill" feature seems to be counterproductive for my requirements.

If I'm not mistaken, I'll have to find a way how to get the modified navi_app.txt into the original SofiaServer apk in order to get voice directions working and the "sleep" feature back again (which is more important for me than having apps not being killed).
[Android Head-Units] surfer63:
Not every app. Only the one of the apps you downloaded and installed yourself.

Which app do you use for navigation?
[Android Head-Units] rknuette:
I haven't finally decided yet, I've installed and tested

- Mapfactor Navigator

- Sygic GPS Navigation

- igo (the one from play store, not the cracked Joying one)
[Android Head-Units] surfer63:
I added all three to the navi_app.txt some months ago.

Please find attached the original SofiaServer app with a modified navi_app.txt.

This one is for the May 25th ROM.

Note though that you should really assign the app you use to the navi assignment.

Otherwise you will here the instructions, but might miss the first 0.2-0.3 seconds as the Radio only really "coorporates" with the assigned navi app.
[Android Head-Units] rknuette:
That's great, thanks a lot, I will test it later today.
[Android Head-Units] midd33:
UGGHHH!!!

I am pulling my hair out. I tried [MENTION=2851538]sonof[/MENTION] simple launcher.sh (post #59 I believe) . I have tried other launcher.sh files. And I have even deleted the launcher.sh all together. My side buttons still do not work. I just want them stock.

After any change or file replacement, I have rebooted. I really don't like using the soft home and back buttons at the top of the screen. My fingers miss too many times. I don't have the joying steering wheel adapter.

gustden provided me with an updated server1.0.apk file that had the alppriority added to navi_app.txt so I could hear the sounds from ALPConnect app. (post 447)
[Android Head-Units] edit:
[MENTION=5941858]Gusten[/MENTION] do you know how to send a stop command at unit shutdown to a specific app (Xiialive in my case)?

Is this correct : "( $xiialive && sleep 2 && $stop ) & " ?

and defined earlier the $stop like this

# Stop

stop="input keyevent 86"