Scrcpy: Android 11: could not set settings value

Created on 2 Jun 2020  ·  7Comments  ·  Source: Genymobile/scrcpy

_(this issue has been reported to me privately)_

Environment

  • OS: any
  • scrcpy version: 1.14
  • installation method: manual
  • device model: Google Pixel 3
  • Android version: 11 preview

Describe the bug

$ scrcpy --show-touches
[server] INFO: Device: Google Pixel 3 (Android 10)  // note: it is in fact Android 11 preview
[server] ERROR: Could not invoke method
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at com.genymobile.scrcpy.wrappers.ContentProvider.call(ContentProvider.java:69)
    at com.genymobile.scrcpy.wrappers.ContentProvider.getValue(ContentProvider.java:110)
    at com.genymobile.scrcpy.wrappers.ContentProvider.getAndPutValue(ContentProvider.java:126)
    at com.genymobile.scrcpy.Server.scrcpy(Server.java:31)
    at com.genymobile.scrcpy.Server.main(Server.java:225)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:396)
Caused by: java.lang.SecurityException: The authority unknown does not match the one of the contentProvider: settings
    at android.os.Parcel.createExceptionOrNull(Parcel.java:2285)
    at android.os.Parcel.createException(Parcel.java:2269)
    at android.os.Parcel.readException(Parcel.java:2252)
    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
    at android.content.ContentProviderProxy.call(ContentProviderNative.java:732)
    at android.content.IContentProvider.call(IContentProvider.java:115)
    ... 8 more
Caused by: android.os.RemoteException: Remote stack trace:
    at android.content.ContentProvider.validateIncomingAuthority(ContentProvider.java:2505)
    at android.content.ContentProvider.access$200(ContentProvider.java:115)
    at android.content.ContentProvider$Transport.call(ContentProvider.java:511)
    at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:295)
    at android.os.Binder.execTransactInternal(Binder.java:1159)

[server] ERROR: Could not invoke method
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at com.genymobile.scrcpy.wrappers.ContentProvider.call(ContentProvider.java:69)
    at com.genymobile.scrcpy.wrappers.ContentProvider.putValue(ContentProvider.java:122)
    at com.genymobile.scrcpy.wrappers.ContentProvider.getAndPutValue(ContentProvider.java:128)
    at com.genymobile.scrcpy.Server.scrcpy(Server.java:31)
    at com.genymobile.scrcpy.Server.main(Server.java:225)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:396)
Caused by: java.lang.SecurityException: The authority unknown does not match the one of the contentProvider: settings
    at android.os.Parcel.createExceptionOrNull(Parcel.java:2285)
    at android.os.Parcel.createException(Parcel.java:2269)
    at android.os.Parcel.readException(Parcel.java:2252)
    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
    at android.content.ContentProviderProxy.call(ContentProviderNative.java:732)
    at android.content.IContentProvider.call(IContentProvider.java:115)
    ... 8 more
android11

Most helpful comment

:heavy_check_mark: Ok on Pixel 3 Android 11 Release

All 7 comments

I can confirm this on Google Pixel 4a as well.

Thank you for the reminder. I have no device with Android 11 to test, but now the AOSP sources are available, so I think this commit fixes it: bb760be58ba0d41ad9ef320a0c61623198bf4221

Here is the server with the fix:

  • scrcpy-server
    _SHA256: d5737014d433b26209eeb68b99ad718fc9dc251afac0a68dd6a691fbebd56c5b_

(to replace in v1.16 release)

Thank you so much for this!

I'm on snap beta channel, and unfortunately have no idea how to easily update scrcpy-server to do a test, since all snap apps are protected via SquashFS. I've checked this (https://askubuntu.com/questions/1035127/cannot-modify-files-installed-by-snap), but not comfortable to hack away for a test.

The following are read-only:

/snap/scrcpy/251/usr/local/share/scrcpy/scrcpy-server
/snap/scrcpy/249/usr/local/share/scrcpy/scrcpy-server

I'm on beta channel:

channels:
  latest/stable:    v1.16            2020-09-03 (254) 86MB -
  latest/candidate: ↑                                      
  latest/beta:      v1.16-4-g0be766e 2020-09-03 (251) 86MB -
  latest/edge:      v1.12-1-g71df317 2019-12-10 (202) 81MB -
installed:          v1.16-4-g0be766e            (251) 86MB -

If it isn't too hard to push your change to edge channel I could do tests. Thanks again!

You could provide an alternative path to the server:

SCRCPY_SERVER_PATH=scrcpy-server scrcpy

:heavy_check_mark: Ok on Pixel 3 Android 11 Release

✔️ Ok on Pixel 4a Android 11 Release (both --show-touches and --stay-awake checked).

Thank you for resolving this promptly!!!

Thank you for your tests :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

behzadpooldar picture behzadpooldar  ·  4Comments

SamuelBlickle picture SamuelBlickle  ·  3Comments

targor picture targor  ·  3Comments

npes87184 picture npes87184  ·  3Comments

fleytman picture fleytman  ·  4Comments