admin管理员组文章数量:1313251
I have connected my Android smartphone in debugging USB mode with my Linux. Running this shell command:
adb shell content query --uri content://sms
leads to
Error while accessing provider:sms
java.lang.SecurityException: Permission Denial: reading com.android.providers.telephony.SmsProvider uri content://sms from pid=15666, uid=2000 requires android.permission.READ_SMS, or grantUriPermission()
at android.os.Parcel.createException(Parcel.java:1959)
at android.os.Parcel.readException(Parcel.java:1927)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:418)
at com.androidmands.content.Content$QueryCommand.onExecute(Content.java:619)
at com.androidmands.content.Content$Command.execute(Content.java:470)
at com.androidmands.content.Content.main(Content.java:690)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:371)
There is no su command in my adb shell:
/system/bin/sh: su: not found
and I have not rooted my smartphone (which seems rather complicated).
Is there any way to allow adb to read SMS? I have read about granting permissions but this can only be done for packages and am not running any app to read SMS. Besides, I want to avoid rooting the device. I would expect being able to read SMS since I have enabled the USB debugging mode anyway and can do all kinds of other stuff like starting phone calls with adb.
The smartphone has Android 9 and is rather old. Using a newer smartphone with a newer Android version would be another option.
本文标签: androidHow to avoid quotPermission Denialquot when reading SMS via adbStack Overflow
版权声明:本文标题:android - How to avoid "Permission Denial" when reading SMS via adb? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741944736a2406344.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论