[Android Head-Units] swanie2000:
Thanks Gustden,

I have been working with this idea for a few days now. I did have some success with locating the (am start) commands using your instructions:

abd shell

dumpsys activity activities | grep "Run #"

I went back to my first post and added my findings so as to maybe help the next person.

I took my new (am start) commands and edited the launcher file.

First I added this commands to the variables list:

***************************************************************************************************

# Joying Video Player

video="am start com.syu.video/com.syu.media.act.ActPlayer"

video_press=$play

# YouTube

youtube="am start com.google.android.youtube/com.google.android.apps.youtube.app.WatchWhileActivity"

youtube_press=$play

# PowerAmp

poweramp="am start com.maxmpz.audioplayer/.PlayerUIActivity"

poweramp_press=$play

***********************************************************************************************

Then I edited the source/mode code to add 2 more rotations

**************************************************************************************************

37) # SOURCE/MODE

#

# Toggle between applications Pandora, Spotify, Stock Music App,

# and Radio. If longer than 1m, then bring up the last one

# called before continuing cycle

#

# Check if key press in last minute by checking if key file was modified

found=`busybox find /data/$key.cnt -mmin -1 | wc -l`

if [ "$found" = "0" ]

then

# More than 1 minute bring current player to front

next=`cat /data/$key.last`

# Do not send pause or play

keypress=0

else

next=`cat /data/$key.cnt`

keypress=1

# Send pause before changing to next

$pause

fi

echo $next > /data/$key.last

case $next in

0) echo 1 > /data/$key.cnt

$pandora

( [ $keypress = 1 ] && sleep 3 && $pandora_press)

;;

1) echo 2 > /data/$key.cnt

$poweramp

( [ $keypress = 1 ] && sleep 3 && $poweramp_press)

;;

2) echo 3 > /data/$key.cnt

$video

( [ $keypress = 1 ] && sleep 3 && $video_press)

;;

3) echo 4 > /data/$key.cnt

$youtube

( [ $keypress = 1 ] && sleep 3 && $youtube_press)

;;

4) echo 0 > /data/$key.cnt

$radio

;;

*) echo 0 > /data/$key.cnt

echo 0 > /data/$key.last

$home

;;

esac

;;

**************************************************************************************************

I added two more rotations in the source routine. see above. I'm not sure if it is correct?

I saved the file as (Launcher.sh). Next, I did not have success with the install script. So I went to root browser, and copied the files where they needed to be, and changed permissions. Then rebooted.

Pretty much as I expected, it didn't work. I lost all the buttons on the radio.

So I deleted the Launcher file, and the APK.

Then I copied over the newest modified APK you created that only stops the radio from killing all aps on sleep.

After a reboot, the buttons worked again.

Not sure what I am doing wrong?

I copied the Launcher.sh file to:

/data/launcher.sh ---> and then changed permissions to 644.

I copied the Sofia--1-C9-Server-V1.0 file to:

/system/app/Sofia--1-C9-Server-V1.0/Sofia--1-C9-Server-V1.0.apk ---> and changed permissions to 755

I must have pissed of the launcher.sh file? That's why I am back at my desk now, trying to modify it again from the start.

Any thoughts?