RikkaApps / Shizuku-API

The API and the developer guide for Shizuku and Sui.
MIT License
950 stars 223 forks source link

<uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" /> <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE"/> #71

Closed shahawi closed 5 months ago

shahawi commented 7 months ago

I think Shizuku can expose these permissions,

I was wondering if someone can offer a general guidance on how to request these permissions for an app that could offer call recording without root?

Thanks in advance, I know this is not essentially an issue.

RikkaW commented 5 months ago

Seems adb has these permissions.

Use UserService, your code will run under shell (adb) user (uid 2000), no need to request these permissions as they are already granted to adb.

Unless the API you want to use requires the calling process a valid Android application process, or have some extra checks, you could use them directly without problem.

However, the User Service process is not a valid Android application process. Therefore, even if you can acquire a Context instance, many APIs, such as Context#registerReceiver and Context#getContentResolver will not work. You will need to dig into Android source code to find out how things work.

shahawi commented 5 months ago

Thank you for your reply