Android, USB Dac, UAPP, Spotify, Tasker and Switching between apps
May 26, 2021 at 2:44 PM Thread Starter Post #1 of 1

secretsubscriber

New Head-Fier
Joined
Mar 24, 2008
Posts
24
Likes
17
Hello,
I've decided to migrate from using a Fiio M6 to my old, rooted, Galaxy S4 and a USB Dac.
I've tried that setup before, but got annoyed with the process of switching between USB Audio Player Pro and other apps. The process requires exiting apps and reconnecting the DAC to switch around.
I've been looking for a smoother solution and haven't never found one. Then i remembered that I have a license for Tasker.
Tasker is an Android app for creating scripts that can be automated or launched from a shortcut.

So I figured out how to switch back and forth between UAPP and Spotify without reconnecting my DAC.
I am working at the moment and will get some screenshots and give more details when i have a moment.
The basic idea is that I created 2 tasks, UAPP Mode and Spotify Mode.
Both Task basically do the sames thing. Root is required for this to work. The Tasker app says theres a way to activate root for the app via ADB without having a rooted device

1)Kill Spotify
2)Kill UAPP
3)For Spotify Mode, Freeze UAPP with the following Shell Command:
pm disable com.extreamsd.usbaudioplayerpro
For UAPP Mode, Enable UAPP:
pm enable com.extreamsd.usbaudioplayerpro
4)This is the piece I just figured out today to refresh the USB connection. I downloaded the app USB Device Info to get the linux device path. You need one action to disable and another to enable the device. The portion in bold is from USB Device Info:
a)echo 0 > /sys/bus/usb/devices/1-4.6/authorized
b)echo 1 > /sys/bus/usb/devices/1-4.6/authorized
5)Launch the app associated with the Mode.

I've been using these tasks today and they've been working well for me. When my S4 dies, my next dap will be a rootable android device with these scripts setup.

I was excited that I figured this out and wanted to share. Hopefully I'm not repeating something someone else has already shared.
 

Users who are viewing this thread

Back
Top