Run a service with Root privileges or adding permissions with root

后端 未结 7 987
Happy的楠姐
Happy的楠姐 2021-02-05 16:12

I am currently developing an app that reads out SMS/Emails while driving. Many users wished support for WhatsApp / KakaoTalk.

However, as there is no \"official\" way to

7条回答
  •  南笙
    南笙 (楼主)
    2021-02-05 16:51

    you can use

    pm grant your.permission
    

    as a shell command to grant additional permissions to your app. I think that command was added quite recently, so if you target older versions you may have to directly alter the 'packages.xml'.

    It is possible to execute an app/dex file as root with the app_process command, but I haven't figured out yet how to get a valid context (with this you can use the java.io.File api to access all files, but non static android methods like bindService etc. will fail because you are running without an app context).

提交回复
热议问题