There is a quite lengthy topic about Anbox on UT: https://forums.ubports.com/post/12443
And if you search for "anbox" in topic titles you'll find a few more with focus on specific aspects of anbox.
Fiddling around with the ubports-installer and anbox on my Fairphone 2
I was wrong, it still works
1. Pull the APKs of your Android phone
Connect your Android phone with USB debugging enabled.
Get the package name of Spotify:
> adb shell pm list packages | grep spotify package:com.spotify.music
Get the file location of the APK:
> adb shell pm path com.spotify.music package:/data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/base.apk package:/data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/split_config.armeabi_v7a.apk package:/data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/split_config.de.apk package:/data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/split_config.xxhdpi.apk
Pull all the files to your computer:
adb pull /data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/base.apk spotify.base.apk adb pull /data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/split_config.armeabi_v7a.apk spotify.split_config.armeabi_v7a.apk adb pull /data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/split_config.de.apk spotify.split_config.de.apk adb pull /data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/split_config.xxhdpi.apk spotify.split_config.xxhdpi.apk
2. Push the APK files to the UT phone
Now disconnect your Android phone and connect your UT phone with USB debugging enabled.
Push the files to the phone:
adb push spotify* /home/phablet/Downloads
3. Install the APK files on the UT phone
While the UT phone is still connected via USB, first open a shell on the phone:
Next commands are executed on the phone!
cd Downloads adb install-multiple -p spotify*
Unfortunately the new app drawer (which has replaced the old app scope) doesn't refresh and I don't know how to refresh the installed app icons manually.
So it seems you have to reboot the UT phone before you can tap on the Spotify icon and start listening to music.
Unfortunately I don't have Spotify on my UT phone anymore so I can't check which version it was.
When I try to get the APK from my Lineage phone now, I get this
> adb shell pm list packages | grep spotify package:com.spotify.music > adb shell pm path com.spotify.music package:/data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/base.apk package:/data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/split_config.armeabi_v7a.apk package:/data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/split_config.de.apk package:/data/app/com.spotify.music-PrDoHptneXuzOEGlVbRlqg==/split_config.xxhdpi.apk
I'm pretty sure back when I had it working on UT, it was a single APK file, not a split APK like this.
I guess this won't work anymore
IIRC when the adb command shows that the device is offline, try to start one of the pre-installed android apps. That should get it "online".
If that still doesn't work, there is an alternative method to install apps as described in https://forums.ubports.com/post/12491
Found the place where I posted an example: https://forum.fairphone.com/t/ubports-16-04-updates-feature-tests/36656/90?u=ingo
adb shell pm list packages
adb shell pm path com.example.someapp
adb pull /data/app/com.example.someapp /path/to/desired/destination/com.example.someapp.apk
If you change something in the rootfs it will be overwritten with the next OTA update.
The design of ubuntu touch is that you don't change the rootfs.
In case you want to install software packages with apt, you need to setup a libertine container and install it there. It can be done from the settings app.