[Android Head-Units] p33t-r:
I've given the access to root for terminal emulator and FX file explorer. I've tried both of those apps to execute the launcher.sh. In terminal emulator I did the "su" command first. In FX I've executed the script as root. Same results.

Here's the output from ShellCheck. The only thing missing is the "$music_press" command reference, but that was missing in the original script as well, so it's not the case.

$ shellcheck myscript

Line 1:
# V3.0 - 2/26/2017 - Simple Example script for Joying 2GB Sofia
^-- SC2148: Tips depend on target shell and yours is unknown. Add a shebang.

Line 23:
back="input keyevent 4"
^-- SC2034: back appears unused. Verify it or export it.

Line 32:
recent="input keyevent KEYCODE_APP_SWITCH"
^-- SC2034: recent appears unused. Verify it or export it.

Line 35:
web="am start -a android.intent.action.VIEW -n com.android.browser/.BrowserActivity http://images.intellicast.com/WxImages/RadarLoop/spi_None_anim.gif"
^-- SC2034: web appears unused. Verify it or export it.

Line 38:
scrflt="am start com.haxor/com.haxor.ScreenFilter"
^-- SC2034: scrflt appears unused. Verify it or export it.

Line 41:
gvc="am start com.google.android.googlequicksearchbox/com.google.android.googlequicksearchbox.VoiceSearchActivity"
^-- SC2034: gvc appears unused. Verify it or export it.

Line 47:
yanosik="am start pl.neptis.yanosik.mobi.android/pl.neptis.yanosik.mobi.android.common.ui.activities.launcher.LauncherActivity"
^-- SC2034: yanosik appears unused. Verify it or export it.

Line 53:
iheart="am start com.clearchannel.iheartradio.controller/com.clearchannel.iheartradio.controller.activities.NavDrawerActivity"
^-- SC2034: iheart appears unused. Verify it or export it.

Line 54:
iheart_press=$play
^-- SC2034: iheart_press appears unused. Verify it or export it.

Line 57:
pandora="am start com.pandora.android/com.pandora.android.Main --activity-single-top --activity-brought-to-front"
^-- SC2034: pandora appears unused. Verify it or export it.

Line 60:
pandora_press="input swipe 550 580 555 585 500";
^-- SC2034: pandora_press appears unused. Verify it or export it.

Line 63:
spotify="am start com.spotify.music/com.spotify.music.MainActivity"
^-- SC2034: spotify appears unused. Verify it or export it.

Line 66:
spotify_press="input swipe 945 500 950 505 200"
^-- SC2034: spotify_press appears unused. Verify it or export it.

Line 72:
torque="am start org.prowl.torque/org.prowl.torque.landing.FrontPage"
^-- SC2034: torque appears unused. Verify it or export it.

Line 82:
x=`dumpsys activity activities | grep "Run #" | cut -f 13 -d" "| head -1 | grep maps`
^-- SC2006: Use $(..) instead of legacy `..`.

Line 87:
am start `dumpsys activity activities | grep "Run #" | cut -f 13 -d" " | grep -v launcher | grep -v systemui | grep -v maps |head -1`
^-- SC2046: Quote this to prevent word splitting.
^-- SC2006: Use $(..) instead of legacy `..`.

Line 99:
found=`busybox find /data/$key.cnt -mmin -1 | wc -l`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.

Line 103:
next=`cat /data/$key.last`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.

Line 107:
next=`cat /data/$key.cnt`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.

Line 112:
echo $next > /data/$key.last
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.

Line 115:
0) echo 1 > /data/$key.cnt
^-- SC2086: Double quote to prevent globbing and word splitting.

Line 118:
1) echo 2 > /data/$key.cnt
^-- SC2086: Double quote to prevent globbing and word splitting.

Line 120:
( [ $keypress = 1 ] && sleep 3 && $music_press)
^-- SC2154: music_press is referenced but not assigned.

Line 123:
*) echo 0 > /data/$key.cnt
^-- SC2086: Double quote to prevent globbing and word splitting.

Line 124:
echo 0 > /data/$key.last
^-- SC2086: Double quote to prevent globbing and word splitting.

Line 153:
input keyevent $key
^-- SC2086: Double quote to prevent globbing and word splitting.

$

About the "case $key in" error - I was trying to run the script with parameter (key) 9 or 37 - these are the 2 keys I've left from the original script and modified them a little bit.

Again - even if I upload the original script from gutsden the script doesn't work either.

I've tried some google search and the only thing I've found was some vague info that pointed me to some issues with Busybox... Strange, because it looks like it's installed correctly (to system/xbin) and it was working fine on 5.1.1...