this post was submitted on 24 Oct 2023
35 points (100.0% liked)
Free and Open Source Software
18019 readers
40 users here now
If it's free and open source and it's also software, it can be discussed here. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
How to do this?
I built a custom app to do it since I couldn't manage to fire the relevant intents from an adb shell without root.
I lifted the code from AAAD
Specifically the InstallAPK method in MainActivity.java
Basically you construct an Intent
ACTION_INSTALL_PACKAGE
with data pointing to the APK file and the extrasEXTRA_NOT_UNKNOWN_SOURCE=true
andEXTRA_INSTALLER_PACKAGE_NAME="com.android.vending"
which tells the installer that this APK is not sideloaded and it's the play store asking to install it.You might still need to enable unknown sources in Android Auto developer settings (separate from phone developer settings).
If I remember, I'll try to pull the code for my app from my PC and post it.
Now that you mentioned AAAD, i found out about the other app for root devices - https://github.com/shmykelsa/AA-Tweaker
This works for me, so now OsmAnd is showing up in my Android Auto screen.
Thanks for the tip