Describe the bug
Cannot connect to device. got below error log.
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 49.0 MB/s (24773 bytes in 0.000s)
java.io.FileNotFoundException: /data/system/theme_config/theme_compatibility.xml: open failed: ENOENT (No such file or directory)INFO: Initial texture: 1080x2400
at libcore.io.IoBridge.open(IoBridge.java:574)
at java.io.FileInputStream.<init>(FileInputStream.java:160)
at java.io.FileInputStream.<init>(FileInputStream.java:115)
at java.io.FileReader.<init>(FileReader.java:60)
at miui.content.res.ThemeCompatibilityLoader.getVersion(ThemeCompatibilityLoader.java:108)
at miui.content.res.ThemeCompatibilityLoader.getConfigDocumentTree(ThemeCompatibilityLoader.java:126)
at miui.content.res.ThemeCompatibilityLoader.loadConfig(ThemeCompatibilityLoader.java:59)
at miui.content.res.ThemeCompatibility.<clinit>(ThemeCompatibility.java:31)
at miui.content.res.ThemeCompatibility.isThemeEnabled(ThemeCompatibility.java:111)
at android.content.res.MiuiResourcesImpl.<clinit>(MiuiResourcesImpl.java:41)
at android.content.res.MiuiResources.<init>(MiuiResources.java:58)
at android.content.res.IMiuiResourceImpl.createResources(IMiuiResourceImpl.java:13)
at android.content.res.ThemeManagerStub.createMiuiResources(ThemeManagerStub.java:56)
at android.content.res.Resources.getSystem(Resources.java:235)
at android.app.LoadedApk.<init>(LoadedApk.java:243)
at android.app.ContextImpl.createSystemContext(ContextImpl.java:2980)
at android.app.ActivityThread.getSystemContext(ActivityThread.java:2727)
at java.lang.reflect.Method.invoke(Native Method)
at com.genymobile.scrcpy.Workarounds.fillAppInfo(Workarounds.java:66)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:56)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:34)
at com.genymobile.scrcpy.Server.main(Server.java:163)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:383)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:563)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:274)
at libcore.io.IoBridge.open(IoBridge.java:560)
... 23 more
WARN: Device disconnected
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplaySurface(SurfaceControl.java:75)
at com.genymobile.scrcpy.ScreenEncoder.setDisplaySurface(ScreenEncoder.java:178)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:70)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:34)
at com.genymobile.scrcpy.Server.main(Server.java:163)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:383)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplaySurface(SurfaceControl.java:73)
... 6 more
Caused by: java.lang.IllegalArgumentException: displayToken must not be null
at android.view.SurfaceControl$Transaction.setDisplaySurface(SurfaceControl.java:3224)
at android.view.SurfaceControl.setDisplaySurface(SurfaceControl.java:2263)
... 8 more
Environment
Describe the bug Cannot connect to device. got below error log.