Skip to content

Can't access call log using the shell #103

Description

@egeres

System:

  • Android version: 12
  • One UI version: 4.1
  • Brand: Samsung

My problem is that running this code:

from ppadb.client import Client as AdbClient

client = AdbClient(host="127.0.0.1", port=5037)
device = client.devices()[0]
o      = device.shell("content query --uri content://call_log/calls")
print(o)

Retrieves this error:

Error while accessing provider:call_log
java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.CallLogProvider from (null) (pid=18174, uid=2000) requires android.permission.READ_CALL_LOG or android.permission.WRITE_CALL_LOG
        at android.os.Parcel.readException(Unknown Source:63)
        at android.os.Parcel.readException(Unknown Source:10)
        at android.app.IActivityManager$Stub$Proxy.getContentProviderExternal(Unknown Source:31)
        at com.android.commands.content.Content$Command.execute(Content.java:441)
        at com.android.commands.content.Content.main(Content.java:664)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(Unknown Source:25)

Which is weird, because I can access this information pretty easily running the ADB shell manually, can I escalate AdbClient's permissions?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions