I need to start the installation of an apk on an android 8 phone, but this should not be silent (adb install). The behavior should be as if the user has touched the apk file on the device. Before android 8 it was possible to launch the installation of an apk by adb like this:
adb shell am start -d file:"///sdcard/foobar.apk" -p com.google.android.packageinstaller
This is not possible anymore on android 8. According to the log file the permission android.permission.REQUEST_INSTALL_PACKAGES is necessary.
09-25 16:39:55.691 6066 6066 E InstallStart: Requesting uid 2000 needs to declare permission android.permission.REQUEST_INSTALL_PACKAGES
I know that since android 8 apps that requests installing other apps needs this permission, but this shouldn't be the case by doing it via adb, right?
Is this a bug in android 8? Is it somehow possible to do it in an other way?