Android Permission interaction issue on system app on android 8

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Android Permission interaction issue on system app on android 8

vivek.gupta2

I have created an android system app and the system does not have a screen to interact with it. Currently, it is asking for permission at the first time after installation open ex for location and storage and if I want to install any app using it / uninstall it will ask for permission again in it. I want to give it all the permission using adb or in app without user interaction in it

permission: android.permission.INTERNET
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.CHANGE_WIFI_STATE'
permission: android.permission.CHANGE_NETWORK_STATE
permission: android.permission.ACCESS_FINE_LOCATION
permission: android.permission.CHANGE_WIFI_MULTICAST_STATE
uses-permission: name='android.permission.WRITE_SETTINGS'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
permission: android.permission.WRITE_SYNC_SETTINGS
uses-permission: name='android.permission.INTERNET'
permission: android.permission.WAKE_LOCK
uses-permission: name='android.permission.REQUEST_INSTALL_PACKAGES'
permission: android.permission.REQUEST_DELETE_PACKAGES
permission: android.permission.SET_DEBUG_APP
permission: android.permission.INSTALL_PACKAGES
permission: android.permission.REBOOT
permission: android.permission.SHUTDOWN
permission: android.permission.DEVICE_POWER
permission: android.permission.WRITE_SECURE_SETTINGS
permission: android.permission.UPDATE_DEVICE_STATS
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'

i try to give permission using this commands but didn't succeed in it

adb shell pm grant com.xxx.remotemanagementservice android.permission.INTERNET adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_WIFI_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_NETWORK_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.CHANGE_WIFI_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.CHANGE_NETWORK_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_FINE_LOCATION adb shell pm grant com.xxx.remotemanagementservice android.permission.CHANGE_WIFI_MULTICAST_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_SETTINGS adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_EXTERNAL_STORAGE adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_SYNC_SETTINGS adb shell pm grant com.xxx.remotemanagementservice android.permission.WAKE_LOCK adb shell pm grant com.xxx.remotemanagementservice android.permission.REQUEST_INSTALL_PACKAGES adb shell pm grant com.xxx.remotemanagementservice android.permission.REQUEST_DELETE_PACKAGES adb shell pm grant com.xxx.remotemanagementservice android.permission.SET_DEBUG_APP adb shell pm grant com.xxx.remotemanagementservice android.permission.INSTALL_PACKAGES adb shell pm grant com.xxx.remotemanagementservice android.permission.REBOOT adb shell pm grant com.xxx.remotemanagementservice android.permission.SHUTDOWN adb shell pm grant com.xxx.remotemanagementservice android.permission.DEVICE_POWER adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_SECURE_SETTINGS adb shell pm grant com.xxx.remotemanagementservice android.permission.UPDATE_DEVICE_STATS adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_COARSE_LOCATION

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Android Permission interaction issue on system app on android 8

Liran Barsisa
Not all permissions are runtime permissions.
Some are normal ones so you get them by themselves, and some need a different kind of command.
For example:

appops set --uid PACKAGE_NAME_OF_THE_APP REQUEST_INSTALL_PACKAGES allow


And some I don't know if it's possible to grant via adb command, sadly (admin? accessibility?)

On Friday, June 22, 2018 at 7:32:17 PM UTC+3, [hidden email] wrote:

I have created an android system app and the system does not have a screen to interact with it. Currently, it is asking for permission at the first time after installation open ex for location and storage and if I want to install any app using it / uninstall it will ask for permission again in it. I want to give it all the permission using adb or in app without user interaction in it

permission: android.permission.INTERNET
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.CHANGE_WIFI_STATE'
permission: android.permission.CHANGE_NETWORK_STATE
permission: android.permission.ACCESS_FINE_LOCATION
permission: android.permission.CHANGE_WIFI_MULTICAST_STATE
uses-permission: name='android.permission.WRITE_SETTINGS'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
permission: android.permission.WRITE_SYNC_SETTINGS
uses-permission: name='android.permission.INTERNET'
permission: android.permission.WAKE_LOCK
uses-permission: name='android.permission.REQUEST_INSTALL_PACKAGES'
permission: android.permission.REQUEST_DELETE_PACKAGES
permission: android.permission.SET_DEBUG_APP
permission: android.permission.INSTALL_PACKAGES
permission: android.permission.REBOOT
permission: android.permission.SHUTDOWN
permission: android.permission.DEVICE_POWER
permission: android.permission.WRITE_SECURE_SETTINGS
permission: android.permission.UPDATE_DEVICE_STATS
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'

i try to give permission using this commands but didn't succeed in it

adb shell pm grant com.xxx.remotemanagementservice android.permission.INTERNET adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_WIFI_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_NETWORK_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.CHANGE_WIFI_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.CHANGE_NETWORK_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_FINE_LOCATION adb shell pm grant com.xxx.remotemanagementservice android.permission.CHANGE_WIFI_MULTICAST_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_SETTINGS adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_EXTERNAL_STORAGE adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_SYNC_SETTINGS adb shell pm grant com.xxx.remotemanagementservice android.permission.WAKE_LOCK adb shell pm grant com.xxx.remotemanagementservice android.permission.REQUEST_INSTALL_PACKAGES adb shell pm grant com.xxx.remotemanagementservice android.permission.REQUEST_DELETE_PACKAGES adb shell pm grant com.xxx.remotemanagementservice android.permission.SET_DEBUG_APP adb shell pm grant com.xxx.remotemanagementservice android.permission.INSTALL_PACKAGES adb shell pm grant com.xxx.remotemanagementservice android.permission.REBOOT adb shell pm grant com.xxx.remotemanagementservice android.permission.SHUTDOWN adb shell pm grant com.xxx.remotemanagementservice android.permission.DEVICE_POWER adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_SECURE_SETTINGS adb shell pm grant com.xxx.remotemanagementservice android.permission.UPDATE_DEVICE_STATS adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_COARSE_LOCATION

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/f709aca8-1153-4a08-beeb-971e16f49784o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Android Permission interaction issue on system app on android 8

Liran Barsisa
In reply to this post by vivek.gupta2
Try:


Example:

appops set --uid PACKAGE_NAME_OF_THE_APP REQUEST_INSTALL_PACKAGES allow

On Friday, June 22, 2018 at 7:32:17 PM UTC+3, [hidden email] wrote:

I have created an android system app and the system does not have a screen to interact with it. Currently, it is asking for permission at the first time after installation open ex for location and storage and if I want to install any app using it / uninstall it will ask for permission again in it. I want to give it all the permission using adb or in app without user interaction in it

permission: android.permission.INTERNET
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.CHANGE_WIFI_STATE'
permission: android.permission.CHANGE_NETWORK_STATE
permission: android.permission.ACCESS_FINE_LOCATION
permission: android.permission.CHANGE_WIFI_MULTICAST_STATE
uses-permission: name='android.permission.WRITE_SETTINGS'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
permission: android.permission.WRITE_SYNC_SETTINGS
uses-permission: name='android.permission.INTERNET'
permission: android.permission.WAKE_LOCK
uses-permission: name='android.permission.REQUEST_INSTALL_PACKAGES'
permission: android.permission.REQUEST_DELETE_PACKAGES
permission: android.permission.SET_DEBUG_APP
permission: android.permission.INSTALL_PACKAGES
permission: android.permission.REBOOT
permission: android.permission.SHUTDOWN
permission: android.permission.DEVICE_POWER
permission: android.permission.WRITE_SECURE_SETTINGS
permission: android.permission.UPDATE_DEVICE_STATS
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'

i try to give permission using this commands but didn't succeed in it

adb shell pm grant com.xxx.remotemanagementservice android.permission.INTERNET adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_WIFI_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_NETWORK_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.CHANGE_WIFI_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.CHANGE_NETWORK_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_FINE_LOCATION adb shell pm grant com.xxx.remotemanagementservice android.permission.CHANGE_WIFI_MULTICAST_STATE adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_SETTINGS adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_EXTERNAL_STORAGE adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_SYNC_SETTINGS adb shell pm grant com.xxx.remotemanagementservice android.permission.WAKE_LOCK adb shell pm grant com.xxx.remotemanagementservice android.permission.REQUEST_INSTALL_PACKAGES adb shell pm grant com.xxx.remotemanagementservice android.permission.REQUEST_DELETE_PACKAGES adb shell pm grant com.xxx.remotemanagementservice android.permission.SET_DEBUG_APP adb shell pm grant com.xxx.remotemanagementservice android.permission.INSTALL_PACKAGES adb shell pm grant com.xxx.remotemanagementservice android.permission.REBOOT adb shell pm grant com.xxx.remotemanagementservice android.permission.SHUTDOWN adb shell pm grant com.xxx.remotemanagementservice android.permission.DEVICE_POWER adb shell pm grant com.xxx.remotemanagementservice android.permission.WRITE_SECURE_SETTINGS adb shell pm grant com.xxx.remotemanagementservice android.permission.UPDATE_DEVICE_STATS adb shell pm grant com.xxx.remotemanagementservice android.permission.ACCESS_COARSE_LOCATION

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/3a1b0111-3386-4021-a783-539b747b8c65o%40googlegroups.com.