pion / webrtc

Pure Go implementation of the WebRTC API
https://pion.ly
MIT License
13.08k stars 1.6k forks source link

Permission issue with PION WebRTC under GOMOBILE Android >= 11 (SDK 30) - EDIT: SOLVED BY https://github.com/golang/go/pull/61089 #2640

Open neilyoung opened 6 months ago

neilyoung commented 6 months ago

Your environment.

What did you do?

I did choose https://github.com/pion/webrtc/tree/master/examples/custom-logger

Took the code from main.go and used it to build an *.AAR to import that into my Android app. Main was exported Android called Main and this is what I got:

I/GoLog: Creating logger for pc 
I/GoLog: Creating logger for ice 
I/GoLog: Creating logger for ortc 
I/GoLog: Creating logger for DTLSTransport 
I/GoLog: Creating logger for ortc 
I/GoLog: Creating logger for pc 
I/GoLog: Creating logger for ice 
I/GoLog: Creating logger for ortc 
I/GoLog: Creating logger for DTLSTransport 
I/GoLog: Creating logger for ortc 
I/GoLog: Creating logger for ice 
W/Thread-2: type=1400 audit(0.0:48): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c157,c256,c512,c768 tcontext=u:r:untrusted_app:s0:c157,c256,c512,c768 tclass=netlink_route_socket permissive=0 bug=b/155595000 app=com.vx.myapplication
E/Go: panic: failed to create network: route ip+net: netlinkrib: permission denied
A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 28814 (Thread-2), pid 28615 (x.myapplication)

What did you expect?

I think there should be no permission issue. This permission thing btw is only affecting Android devices with Android > 10 (as documented in the Android SDK). I don't know who has to work around, I would just like to raise this problem (and of course get a solution on a longer run, if possible)

What happened?

Permission issue as shown above, likely because of the new restrictions introduced by Android SDK 30. More details in discussions:

#2636 Permission issue with PION WebRTC under GOMOBILE Android >= 11 https://github.com/[pion/webrtc](https://github.com/pion/webrtc)|pion/webrtcpion/webrtc | 13. Dez. | Hinzugefügt von GitHub

suutaku commented 6 months ago

Fu...ng hell. It works!!! What kind of magic is this?

BTW: I changed the parameter to "unix" and it works too.

The app now works on Android > 11... You need to explain me, what I did here...

Congratulations! If we have time one day, we can find a perfect solution.

neilyoung commented 6 months ago

No, congrats to you, my friend. Well done...

BTW: I still don't have an updated go.sum in my version of transport, that concerns me.

neilyoung commented 6 months ago

And I still don't see the relationship between MDNS and Listen permissions...

neilyoung commented 6 months ago

I'm pretty baffled... It works...

suutaku commented 6 months ago

No, congrats to you, my friend. Well done...

BTW: I still don't have an updated go.sum in my version of transport, that concerns me.

i don't know, transfer just fixed interfaces issue at create offer:

create network: route ip+net: netlinkrib: permission denied

and ice (ListenUDP) fixed bind permission which not returned in go process. android logs only show a warning about it. so listen has returned a socket connection, but it was not bind. it's a broken connection and make process hangs. so we make a error tell webRTC mDNS was broken.

neilyoung commented 6 months ago

Stunning... What I'm doing is pretty cool (I guess): The ordinary LifeKit client for Android (which works on libwebrtc) doesn't really support H.264 hardware encoded simulcast and you will run into licensing issues if you are doing OpenH264 (which works fine, but is a software codec). I found, that the Android inbuilt MediaCodec API perfectly allows for 3 simultaneous hardware encoding sessions. So what I tried first on Python is now also running on Android: Having three simultaneous H.264 hardware codecs running on Android and feeding an embedded GO module via UnixSockets. From there the H.264 NAL units directly go into the LifeKit stack. No transcoding, nothing. This already worked on lower Android devices, but was stuck on Android >= 11 due to the permission issue (nobody else did care about).

If you once need such a thing, let me know. I owe you something.

suutaku commented 6 months ago

thanks, my friend. i'm working with crypto things. it's a self-sovereign identity application. because i don't want server relay my information, so i diced exchange credentials via WebRTC. BTW, i have a little experience on android JNI, HAL, especially camera module. maybe some day will can share experience.

neilyoung commented 6 months ago

Perfect. Good luck with your projects. Now, that you have a solution, will you take care of the PRs necessary? In the end it seems to be all just "PION's bad" (ofc not, how should they know about the GOMOBILE issues with that). Anyway, I tried to trigger a lot of communities, GOLANG, GOMOBILE, PION, to no avail, just you where about to help. If would be awesome if this fix now finds its path into the PION mainstream...

neilyoung commented 6 months ago

I posted your solution in the LifeKit Slack and got this comment

image

The setengine.go link is here https://github.com/pion/webrtc/blob/master/settingengine.go#L265

But I wouldn't know from where to issue this setting.

suutaku commented 6 months ago

call webrtc.WithSettingEngine() can setting your custom engine. that's the way to make your configure works.

itpan8067 commented 6 months ago

patches https://github.com/golang/go/pull/61089. Use this method to solve the problem. i already tried。

neilyoung commented 6 months ago

@itpan8067 No it does not fix the issue in our case. We already discussed and tried this solution earlier. This only patches the GOLANG compiler. We are dealing with external go modules here, having the same problem. Check the entire thread here, we started from this patch to no avail.

neilyoung commented 6 months ago

@suutaku But based on @itpan8067's trigger we could try to solve this issue again on another way. You patched transport by making it use anet instead of net. It might be possible, that that the a.m. anet fix (which comes from the same guy, who issued that fix @itpan8067 quoted (and you initially)) makes the transport fix obsolete. This would prevent the requirement to patch PION transport. Then in order to drop the requirement for having to patch PION ice, we could try to apply the disable MDNS hint. If that could be done on a configurative way somehow, we could at least get rid of the PION patches and come away with just a compiler patch.

itpan8067 commented 6 months ago

@neilyoung Okay, I didn't use gomobile, I implemented it through cgo + ndk. I aslo encountered a network error in android > 11, but this method can solve it. I posted it for everyone.

neilyoung commented 6 months ago

@itpan8067 And have you been using PION WebRTC? I m not sure if GOMOBILE is to blame, but for sure PION and this patch is not working at least not even with the simplest sample code mentioned in the beginning of this thread

itpan8067 commented 6 months ago

@itpan8067 And have you been using PION WebRTC? I m not sure if GOMOBILE is to blame, but for sure PION and this patch is not working at least not even with the simplest sample code mentioned in the beginning of this thread

I do use pion webrtc. and my import is as follows:

package main
import (
        "io"
        "log"
        "os"
        "time"
        janus "github.com/notedit/janus-go"
        "github.com/pion/webrtc/v4"
        "github.com/pion/webrtc/v4/pkg/media"
        "github.com/pion/webrtc/v4/pkg/media/h264reader"
        "github.com/pion/interceptor"
        "github.com/pion/interceptor/pkg/cc"
        "github.com/pion/interceptor/pkg/gcc"
)

import "C"

//export StartJanus
func StartJanus(logFile *C.char, videoFile *C.char) {

}
func main(){}

compile into a dynamic library and reference .so/.h by Android NDK。

neilyoung commented 6 months ago

Would be awesome if you could try your module with this code instead:

https://github.com/pion/webrtc/blob/master/examples/custom-logger/main.go

This example did not work here after the mentioned compiler patch.

TIA

neilyoung commented 6 months ago

In the meantime I will try to return to the mentioned compiler patch and make the transport patch at least obsolote.

suutaku commented 6 months ago

@itpan8067 thanks, my friend. your method can fix half of our problems. once it's merged, i'll happy to use it. @neilyoung about another half of our problems, disable mDNS by SettingEngine also not the best way to use. i know you are developing on android. my application both running on Android, Web, iOS, Mac, Linux. i found settingengine_js.go not defined SetICEMulticasetDNSMode . so i cannot write one code for all platforms but yon can just use it. And the hardest problem is once we disabled mDNS, the connectivity was suck in some network environment. for now, i have no idea how to fix it bcs Android 11+ blocked socket bingding.

neilyoung commented 6 months ago

@suutaku Agreed so far. But from may WebRTC knowledge mDNS is just an obfuscation of local private web addresses not not let them appear in the ICE negotiations. WebRTC before worked w/o this so it is just higher level privacy bullshit. Disabling it one way or the other you already mentioned shouldn't break everything.

I'm still trying to apply this patch and see if this works somehow.

neilyoung commented 6 months ago

@suutaku One think I could imagine to break w/o MDNS is if you are trying to communicate with Firefox in a local environment only. Firefox by default only delivers MDSN addresses by default. If these are the only candidates and the GO side cannot cope with this due to the hack, the connection might not be properly established.

But AFAIK all browsers have away to disable local address obfuscation by some flag

itpan8067 commented 6 months ago

Would be awesome if you could try your module with this code instead:

https://github.com/pion/webrtc/blob/master/examples/custom-logger/main.go

This example did not work here after the mentioned compiler patch.

TIA

I simply wrote a demo, hope it will be helpful to you. https://github.com/itpan8067/customloggerdemo

neilyoung commented 6 months ago

@itpan8067 Thank you very much. Meanwhile I can confirm your claim here

patches https://github.com/golang/go/pull/61089. Use this method to solve the problem. i already tried。

The reason why it works now and not a couple of days ago - unclear. But I must have made some mistakes.

At least now it is no longer necessary to patch PION transport and ice or to mess with disabling MDNS. The changes to GOLANG published here https://github.com/golang/go/pull/61089/commits by @wlynxg are fully sufficent to solve the problem with getting the networks and the listen/bind issue we had with PION. Really strange that we didn't see it.

At least this makes the problem easier to handle. I have a contact to @wlynxg, will inform him.

BTW: Why aren't u using GOMOBILE? It seems to be easier to use instead of messing with JNI and NDK, IMHO.

neilyoung commented 6 months ago

One thing remains. I see a bunch of these traces on Android in proximity to ICE negotiation.

W/Thread-2: type=1400 audit(0.0:731): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c220,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c220,c257,c512,c768 tclass=netlink_route_socket permissive=0 bug=b/155595000 app=com.vx.myapplication
W/Thread-2: type=1400 audit(0.0:732): avc: denied { nlmsg_readpriv } for scontext=u:r:untrusted_app:s0:c220,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c220,c257,c512,c768 tclass=netlink_route_socket permissive=0 bug=b/155595000 app=com.vx.myapplication
W/Thread-2: type=1400 audit(0.0:733): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c220,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c220,c257,c512,c768 tclass=netlink_route_socket permissive=0 bug=b/155595000 app=com.vx.myapplication
W/Thread-2: type=1400 audit(0.0:734): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c220,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c220,c257,c512,c768 tclass=netlink_route_socket permissive=0 bug=b/155595000 app=com.vx.myapplication
W/Thread-2: type=1400 audit(0.0:735): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c220,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c220,c257,c512,c768 tclass=netlink_route_socket permissive=0 bug=b/155595000 app=com.vx.myapplication

But it works seemingly

suutaku commented 6 months ago

https://github.com/itpan8067/customloggerdemo

this bcs UPD not bind but android not returned any error message, just warning logs, so GO side didn't know what happened and continue use a broken mDNS service. but in your network environment, that's fine.

neilyoung commented 6 months ago

You mean the errors I see?

suutaku commented 6 months ago

You mean the errors I see?

yes. it's come from ListenUDP, if you disabled mDNS, it's gone.

neilyoung commented 6 months ago

OK, but despite the fact, that MDNS will not work: Can you confirm, that just applying the compiler PR now seems to be sufficient to overcome the "permission" issue. And that - except for MDNS - there need to be no patch required for ice and transport anymore?

suutaku commented 6 months ago

if compiler PR patched, we don't need changes for ice and transport.

neilyoung commented 6 months ago

Where do you see the MDNS problem? In the GO module for outgoing MDNS candidates or for incoming candidates? Looks like for incoming, right?

suutaku commented 6 months ago

Something like oncandidate callback not called. Tomorrow i will put more details with my office network environment.

neilyoung commented 6 months ago

Would be awesome if you could try your module with this code instead: https://github.com/pion/webrtc/blob/master/examples/custom-logger/main.go This example did not work here after the mentioned compiler patch. TIA

I simply wrote a demo, hope it will be helpful to you. https://github.com/itpan8067/customloggerdemo

What is this app supposed to do?

I was running it on my OnePlus. Nothing happened so far. Just this as trace. Pressed START and SEND, not sure what shall happen. At least I see the same traces I saw w.r.t the avc denied issue


2024-01-04 18:43:33.229 18171-18171 studio.deploy           installer                            E  Could not get package user id: run-as: unknown package: com.pc.cgodemo
2024-01-04 18:43:33.256 18171-18171 studio.deploy           installer                            E  Could not find apks for this package: com.pc.cgodemo
2024-01-04 18:43:33.293 18171-18171 studio.deploy           installer                            E  Could not get package user id: run-as: unknown package: com.pc.cgodemo
2024-01-04 18:43:33.325 18171-18171 studio.deploy           installer                            E  Could not find apks for this package: com.pc.cgodemo
2024-01-04 18:43:34.260  1682-1899  PackageMan...ilsExtImpl system_server                        E  Fix up user restrict data of pkg: com.pc.cgodemo
2024-01-04 18:43:34.390  1682-1899  ArtManagerService       system_server                        E  Failed to prepare profile for com.pc.cgodemo:/data/app/~~I7dJyozGS1orTsZNGQnjfQ==/com.pc.cgodemo-OnrMEniCqUxuLpziPtkcow==/base.apk
2024-01-04 18:43:34.737  1682-1891  VerityUtils             system_server                        E  Failed to measure fs-verity, errno 1: /data/app/~~I7dJyozGS1orTsZNGQnjfQ==/com.pc.cgodemo-OnrMEniCqUxuLpziPtkcow==/base.apk
2024-01-04 18:43:34.968 13855-13855 libc                    com.pc.cgodemo                       I  SetHeapTaggingLevel: tag level set to 0
2024-01-04 18:43:34.988 13855-13855 com.pc.cgodemo          com.pc.cgodemo                       I  Late-enabling -Xcheck:jni
2024-01-04 18:43:35.007 13855-13855 com.pc.cgodemo          com.pc.cgodemo                       E  Unknown bits set in runtime_flags: 0x40000000
2024-01-04 18:43:35.007 13855-13855 com.pc.cgodemo          com.pc.cgodemo                       I  Using CollectorTypeCC GC.
2024-01-04 18:43:35.017 13855-13855 ziparchive              com.pc.cgodemo                       W  Unable to open '/system/framework/mediatek-framework.dm': No such file or directory
2024-01-04 18:43:35.018 13855-13855 ziparchive              com.pc.cgodemo                       W  Unable to open '/system/framework/mediatek-framework.dm': No such file or directory
2024-01-04 18:43:35.022 13855-13855 OneTrace                com.pc.cgodemo                       I  Mark active for pid=13855? true
2024-01-04 18:43:35.022 13855-13855 cutils-dev              com.pc.cgodemo                       D  otrace_set_tracing_enabled? true
2024-01-04 18:43:35.023 13855-18360 cutils-dev              com.pc.cgodemo                       D  properties changed in otrace_seq_number_changed!
2024-01-04 18:43:35.046 13855-13855 Compatibil...geReporter com.pc.cgodemo                       D  Compat change id reported: 171979766; UID 10401; state: DISABLED
2024-01-04 18:43:35.047 13855-13855 oplus.andr...actoryImpl com.pc.cgodemo                       I  get feature:IOplusAutoResolutionFeature
2024-01-04 18:43:35.047 13855-13855 oplus.andr...actoryImpl com.pc.cgodemo                       I  getOplusAutoResolutionFeature
2024-01-04 18:43:35.048  1682-1780  OplusThermalStats       system_server                        E  Error getting package info: com.pc.cgodemo
2024-01-04 18:43:35.070 13855-13855 OplusFeatureCache       com.pc.cgodemo                       I  Milliseconds spent on init(): 23
2024-01-04 18:43:35.072 13855-13855 CompactWindowAppManager com.pc.cgodemo                       D  initCompactApplicationInfo 
2024-01-04 18:43:35.084 13855-13855 libc                    com.pc.cgodemo                       W  Access denied finding property "ro.odm.prev.product.name"
2024-01-04 18:43:35.085 13855-13855 ActivityThread          com.pc.cgodemo                       W  Application com.pc.cgodemo is waiting for the debugger on port 8100...
2024-01-04 18:43:35.086 13855-13855 System.out              com.pc.cgodemo                       I  Sending WAIT chunk
2024-01-04 18:43:37.397 18073-18073 adbd                    adbd                                 E  failed to connect to socket 'localabstract:/com.pc.cgodemo-0/platform-1704390216400.sock': could not connect to localabstract address 'localabstract:/com.pc.cgodemo-0/platform-1704390216400.sock'
2024-01-04 18:43:37.424  1329-1329  OPLUS_KEVENT_RECORD     oplus_kevent                         E  OPLUS_KEVENT payload:10401,path@@/data/data/com.pc.cgodemo/lldb/bin/start_lldb_server.sh
2024-01-04 18:43:37.478  1329-1329  OPLUS_KEVENT_RECORD     oplus_kevent                         E  OPLUS_KEVENT payload:10401,path@@/data/data/com.pc.cgodemo/lldb/bin/lldb-server
2024-01-04 18:43:37.938  1329-1329  OPLUS_KEVENT_RECORD     oplus_kevent                         E  OPLUS_KEVENT payload:10401,path@@/data/data/com.pc.cgodemo/lldb/bin/lldb-server
2024-01-04 18:43:46.839 13855-13855 System.out              com.pc.cgodemo                       I  Debugger has connected
2024-01-04 18:43:46.839 13855-13855 System.out              com.pc.cgodemo                       I  waiting for debugger to settle...
2024-01-04 18:43:47.040 13855-13855 System.out              com.pc.cgodemo                       I  waiting for debugger to settle...
2024-01-04 18:43:47.255 13855-13855 System.out              com.pc.cgodemo                       I  waiting for debugger to settle...
2024-01-04 18:43:47.458 13855-13855 System.out              com.pc.cgodemo                       I  waiting for debugger to settle...
2024-01-04 18:43:47.660 13855-13855 System.out              com.pc.cgodemo                       I  waiting for debugger to settle...
2024-01-04 18:43:47.861 13855-13855 System.out              com.pc.cgodemo                       I  waiting for debugger to settle...
2024-01-04 18:43:48.063 13855-13855 System.out              com.pc.cgodemo                       I  waiting for debugger to settle...
2024-01-04 18:43:48.266 13855-13855 System.out              com.pc.cgodemo                       I  waiting for debugger to settle...
2024-01-04 18:43:48.468 13855-13855 System.out              com.pc.cgodemo                       I  waiting for debugger to settle...
2024-01-04 18:43:48.671 13855-13855 System.out              com.pc.cgodemo                       I  debugger has settled (1409)
2024-01-04 18:43:48.691 13855-13855 LoadedApk               com.pc.cgodemo                       D  mApplicationInfo overrideDisplayId:null
2024-01-04 18:43:48.704 13855-13855 ApplicationLoaders      com.pc.cgodemo                       D  Returning zygote-cached class loader: /system/framework/android.test.base.jar
2024-01-04 18:43:48.711 13855-13855 ziparchive              com.pc.cgodemo                       W  Unable to open '/data/app/~~I7dJyozGS1orTsZNGQnjfQ==/com.pc.cgodemo-OnrMEniCqUxuLpziPtkcow==/base.dm': No such file or directory
2024-01-04 18:43:48.711 13855-13855 ziparchive              com.pc.cgodemo                       W  Unable to open '/data/app/~~I7dJyozGS1orTsZNGQnjfQ==/com.pc.cgodemo-OnrMEniCqUxuLpziPtkcow==/base.dm': No such file or directory
2024-01-04 18:43:48.793 13855-13855 nativeloader            com.pc.cgodemo                       D  Configuring clns-4 for other apk /data/app/~~I7dJyozGS1orTsZNGQnjfQ==/com.pc.cgodemo-OnrMEniCqUxuLpziPtkcow==/base.apk. target_sdk_version=29, uses_libraries=, library_path=/data/app/~~I7dJyozGS1orTsZNGQnjfQ==/com.pc.cgodemo-OnrMEniCqUxuLpziPtkcow==/lib/arm64:/data/app/~~I7dJyozGS1orTsZNGQnjfQ==/com.pc.cgodemo-OnrMEniCqUxuLpziPtkcow==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.pc.cgodemo
2024-01-04 18:43:48.794 13855-13855 nativeloader            com.pc.cgodemo                       D  Extending system_exposed_libraries: libapuwareapusys.mtk.so:libapuwareapusys_v2.mtk.so:libapuwarexrp.mtk.so:libapuwarexrp_v2.mtk.so:libapuwareutils.mtk.so:libapuwareutils_v2.mtk.so:libapuwarehmp.mtk.so:libmcv_runtime_usdk.mtk.so:libneuron_graph_delegate.mtk.so:libneuronusdk_adapter.mtk.so:libtflite_mtk.mtk.so:libarmnn_ndk.mtk.so:libcmdl_ndk.mtk.so:libnir_neon_driver_ndk.mtk.so:libmvpu_runtime.mtk.so:libmvpu_runtime_pub.mtk.so:libmvpu_engine_pub.mtk.so:libmvpu_pattern_pub.mtk.so:libmvpuop_mtk_cv.mtk.so:libmvpuop_mtk_nn.mtk.so:libteeservice_client.trustonic.so:libSloganJni.oplus.so:libsuperNight.oplus.so
2024-01-04 18:43:49.002 13855-13855 GraphicsEnvironment     com.pc.cgodemo                       V  ANGLE Developer option for 'com.pc.cgodemo' set to: 'default'
2024-01-04 18:43:49.003 13855-13855 GraphicsEnvironment     com.pc.cgodemo                       V  ANGLE GameManagerService for com.pc.cgodemo: false
2024-01-04 18:43:49.004 13855-13855 GraphicsEnvironment     com.pc.cgodemo                       V  App is not on the allowlist for updatable production driver.
2024-01-04 18:43:49.018 13855-13855 NetworkSecurityConfig   com.pc.cgodemo                       D  No Network Security Config specified, using platform default
2024-01-04 18:43:49.020 13855-13855 NetworkSecurityConfig   com.pc.cgodemo                       D  No Network Security Config specified, using platform default
2024-01-04 18:43:49.022 13855-13855 Compatibil...geReporter com.pc.cgodemo                       D  Compat change id reported: 183155436; UID 10401; state: DISABLED
2024-01-04 18:43:49.034 13855-13855 OplusActivityManager    com.pc.cgodemo                       D  get AMS extension: android.os.BinderProxy@c349e7
2024-01-04 18:43:49.035 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  >>> msg's executing time is too long
2024-01-04 18:43:49.035 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Blocked msg = { when=-13s999ms what=110 target=android.app.ActivityThread$H obj=AppBindData{appInfo=ApplicationInfo{3550994 com.pc.cgodemo}} } , cost  = 13988 ms
2024-01-04 18:43:49.035 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  >>>Current msg List is:
2024-01-04 18:43:49.036 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Current msg <1> = { when=-13s974ms what=159 target=android.app.ActivityThread$H obj=android.app.servertransaction.ClientTransaction@317645b }
2024-01-04 18:43:49.036 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Current msg <2> = { when=-13s974ms what=159 target=android.app.ActivityThread$H obj=android.app.servertransaction.ClientTransaction@4dd3e8df }
2024-01-04 18:43:49.037 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Current msg <3> = { when=-13s939ms what=149 target=android.app.ActivityThread$H obj=android.os.BinderProxy@432b00 }
2024-01-04 18:43:49.037 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Current msg <4> = { when=-5ms what=164 target=android.app.ActivityThread$H obj=com.pc.cgodemo }
2024-01-04 18:43:49.037 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  >>>CURRENT MSG DUMP OVER<<<
2024-01-04 18:43:49.040 13855-13855 Quality                 com.pc.cgodemo                       I  ActivityThread: bindApplication delay 13993 com.pc.cgodemo 13855
2024-01-04 18:43:49.042 13855-18502 Quality                 com.pc.cgodemo                       I  Blocked msg = Package name: com.pc.cgodemo [ schedGroup: 5 schedPolicy: 0 ] process the message: { when=-14s4ms what=110 target=android.app.ActivityThread$H obj=AppBindData{appInfo=ApplicationInfo{3550994 com.pc.cgodemo}} } took 13993 ms
2024-01-04 18:43:49.055 13855-18504 OplusGraphicsEvent      com.pc.cgodemo                       D  OplusGraphicsEventListener create now!
2024-01-04 18:43:49.056 13855-18504 OplusGraphicsEvent      com.pc.cgodemo                       D  addEventListener success!
2024-01-04 18:43:49.177 13855-18506 com.pc.cgodemo          com.pc.cgodemo                       E  Loaded layer handle (13843273398587540071) for layer /my_product/lib64/libcolorx-loader.so
2024-01-04 18:43:49.177 13855-18506 com.pc.cgodemo          com.pc.cgodemo                       E  Looking for entrypoint ColorX_Check
2024-01-04 18:43:49.177 13855-18506 com.pc.cgodemo          com.pc.cgodemo                       E  Found ColorX_Check for /my_product/lib64/libcolorx-loader.so
2024-01-04 18:43:49.177 13855-18506 com.pc.cgodemo          com.pc.cgodemo                       E  Check failed
2024-01-04 18:43:49.221 13855-18506 libMEOW                 com.pc.cgodemo                       D  meow new tls: 0x7ca0a87740
2024-01-04 18:43:49.221 13855-18506 libMEOW                 com.pc.cgodemo                       D  meow reload base cfg path: na
2024-01-04 18:43:49.221 13855-18506 libMEOW                 com.pc.cgodemo                       D  meow reload overlay cfg path: na
2024-01-04 18:43:49.221 13855-18506 QT                      com.pc.cgodemo                       W  qt_process_init() called
2024-01-04 18:43:49.221 13855-18506 QT                      com.pc.cgodemo                       E  [QT]file does not exist
2024-01-04 18:43:49.221 13855-18506 QT                      com.pc.cgodemo                       W  Support!!
2024-01-04 18:43:49.222 13855-18506 QT                      com.pc.cgodemo                       E  [QT]file does not exist
2024-01-04 18:43:49.222 13855-18506 libMEOW                 com.pc.cgodemo                       D  applied 1 plugins for [com.pc.cgodemo]:
2024-01-04 18:43:49.222 13855-18506 libMEOW                 com.pc.cgodemo                       D    plugin 1: [libMEOW_gift.so]: 0xb400007c90949740
2024-01-04 18:43:49.222 13855-18506 libMEOW                 com.pc.cgodemo                       D  rebuild call chain: 0x7ca0a960c0
2024-01-04 18:43:49.222 13855-18506 libMEOW                 com.pc.cgodemo                       D  meow delete tls: 0x7ca0a87740
2024-01-04 18:43:49.253 13855-13855 oplus.andr...actoryImpl com.pc.cgodemo                       I  Unknow feature:IOplusTextViewRTLUtilForUG
2024-01-04 18:43:49.261 13855-13855 OplusCusto...ionManager com.pc.cgodemo                       E  sInstance is null, start a new sInstance
2024-01-04 18:43:49.266 13855-13855 Compatibil...geReporter com.pc.cgodemo                       D  Compat change id reported: 210923482; UID 10401; state: DISABLED
2024-01-04 18:43:49.266 13855-13855 Compatibil...geReporter com.pc.cgodemo                       D  Compat change id reported: 37756858; UID 10401; state: ENABLED
2024-01-04 18:43:49.304 13855-13855 ScrollOpti...tionHelper com.pc.cgodemo                       D  can't find the config file for optimizaiton
2024-01-04 18:43:49.304 13855-13855 ScrollOpti...tionHelper com.pc.cgodemo                       D  will not debug for debug is false
2024-01-04 18:43:49.304 13855-13855 oplus.andr...actoryImpl com.pc.cgodemo                       I  get feature:IOplusDynamicVsyncFeature
2024-01-04 18:43:49.304 13855-13855 oplus.andr...actoryImpl com.pc.cgodemo                       I  get feature:IOplusDynamicVsyncFeature
2024-01-04 18:43:49.780 13855-18507 PowerHalWrapper         com.pc.cgodemo                       I  PowerHalWrapper.getInstance 
2024-01-04 18:43:49.781 13855-13855 PowerHalWrapper         com.pc.cgodemo                       I  PowerHalWrapper.getInstance 
2024-01-04 18:43:49.785 13855-13855 MSYNC3-Var...efreshRate com.pc.cgodemo                       I  Variable refreshrate is disabled
2024-01-04 18:43:49.786 13855-13855 oplus.andr...actoryImpl com.pc.cgodemo                       I  get feature:IOplusDynamicVsyncFeature
2024-01-04 18:43:49.887 13855-13855 com.pc.cgodemo          com.pc.cgodemo                       W  Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
2024-01-04 18:43:49.887 13855-13855 com.pc.cgodemo          com.pc.cgodemo                       W  Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
2024-01-04 18:43:49.971 13855-13855 Quality                 com.pc.cgodemo                       I  ActivityThread: activityStart delay 927 com.pc.cgodemo 13855
2024-01-04 18:43:50.055 13855-13855 ExtensionsLoader        com.pc.cgodemo                       D  createInstance(64bit) : createExtendedFactory
2024-01-04 18:43:50.130 13855-13855 ExtensionsLoader        com.pc.cgodemo                       D  Opened libSchedAssistExtImpl.so
2024-01-04 18:43:50.130 13855-13855 com.pc.cgodemo          com.pc.cgodemo                       E  ofbOpen failed with error=No such file or directory
2024-01-04 18:43:50.130 13855-13855 com.pc.cgodemo          com.pc.cgodemo                       E  sysOpen failed with error=No such file or directory
2024-01-04 18:43:50.132 13855-13855 OplusInputMethodUtil    com.pc.cgodemo                       D  init sDebug to false, init sDebugIme to false, init sAlwaysOn to false
2024-01-04 18:43:50.132 13855-13855 OplusInputMethodUtil    com.pc.cgodemo                       D  updateDebugToClass InputMethodManager.DEBUG = false
2024-01-04 18:43:50.133 13855-13855 OplusInputMethodUtil    com.pc.cgodemo                       D  updateDebugToClass ImeFocusController.DEBUG = false
2024-01-04 18:43:50.133 13855-13855 OplusInputMethodUtil    com.pc.cgodemo                       D  updateDebugToClass BaseInputConnection.DEBUG = false
2024-01-04 18:43:50.133 13855-13855 OplusInputMethodUtil    com.pc.cgodemo                       D  updateDebugToClass ImeFocusController.sDebugIme = false
2024-01-04 18:43:50.136 13855-13855 SurfaceFactory          com.pc.cgodemo                       I  [static] sSurfaceFactory = com.mediatek.view.impl.SurfaceFactoryImpl@286364a
2024-01-04 18:43:50.141 13855-18512 OplusSlideAnimOptHelper com.pc.cgodemo                       I  checkListMode: is blacklist mode = true
2024-01-04 18:43:50.142 13855-18512 OplusSlideAnimOptHelper com.pc.cgodemo                       D  com.pc.cgodemo scrollEffectOpt enable = true
2024-01-04 18:43:50.143 13855-13855 WindowManager           com.pc.cgodemo                       D  Add to mViews: DecorView@864ded8[MainActivity],pkg= com.pc.cgodemo
2024-01-04 18:43:50.145 13855-18504 ExtensionsLoader        com.pc.cgodemo                       D  createInstance(64bit) : createExtendedFactory
2024-01-04 18:43:50.336 13855-18504 ExtensionsLoader        com.pc.cgodemo                       D  Opened libhwuiextimpl.so
2024-01-04 18:43:50.336 13855-13855 ExtensionsLoader        com.pc.cgodemo                       D  createInstance(64bit) : createExtendedFactory
2024-01-04 18:43:50.336 13855-13855 ExtensionsLoader        com.pc.cgodemo                       D  Opened libSchedAssistExtImpl.so
2024-01-04 18:43:50.350 13855-13855 libMEOW                 com.pc.cgodemo                       D  meow new tls: 0x7c9e1a1b00
2024-01-04 18:43:50.350 13855-13855 libMEOW                 com.pc.cgodemo                       D  applied 1 plugins for [com.pc.cgodemo]:
2024-01-04 18:43:50.350 13855-13855 libMEOW                 com.pc.cgodemo                       D    plugin 1: [libMEOW_gift.so]: 0xb400007c90949740
2024-01-04 18:43:50.350 13855-13855 libMEOW                 com.pc.cgodemo                       D  rebuild call chain: 0x7c9e1d4440
2024-01-04 18:43:50.351 13855-13855 InputEventReceiver      com.pc.cgodemo                       D  Input log is disabled
2024-01-04 18:43:50.351 13855-13855 Quality                 com.pc.cgodemo                       I  ActivityThread: activityResume delay 379 com.pc.cgodemo 13855
2024-01-04 18:43:50.351 13855-13855 Quality                 com.pc.cgodemo                       I  ActivityThread: activityLifecycle delay 1310 com.pc.cgodemo 13855
2024-01-04 18:43:50.352 13855-18502 Quality                 com.pc.cgodemo                       I  Blocked msg = Package name: com.pc.cgodemo [ schedGroup: 5 schedPolicy: 0 ] process the message: { when=-15s291ms what=159 target=android.app.ActivityThread$H obj=android.app.servertransaction.ClientTransaction@317645b } took 1310 ms
2024-01-04 18:43:50.390 13855-13855 BufferQueueConsumer     com.pc.cgodemo                       D  [](id:361f00000000,api:0,p:-1,c:13855) connect: controlledByApp=false
2024-01-04 18:43:50.478 13855-13855 ExtensionsLoader        com.pc.cgodemo                       D  createInstance(64bit) : createExtendedFactory
2024-01-04 18:43:50.478 13855-13855 ExtensionsLoader        com.pc.cgodemo                       D  Opened libSchedAssistExtImpl.so
2024-01-04 18:43:50.589 13855-13855 FBI                     com.pc.cgodemo                       E  Can't load library: dlopen failed: library "libmagtsync.so" not found
2024-01-04 18:43:50.594 13855-13855 ZoomWindowDecorView     com.pc.cgodemo                       V  setLastReportedMergedConfiguration mZoomDisplayHeight: 2400 getDecorView.140828376
2024-01-04 18:43:50.594 13855-18504 libMEOW                 com.pc.cgodemo                       D  meow new tls: 0x7ca04e5fc0
2024-01-04 18:43:50.594 13855-18504 libMEOW                 com.pc.cgodemo                       D  applied 1 plugins for [com.pc.cgodemo]:
2024-01-04 18:43:50.594 13855-18504 libMEOW                 com.pc.cgodemo                       D    plugin 1: [libMEOW_gift.so]: 0xb400007c90949740
2024-01-04 18:43:50.595 13855-18504 libMEOW                 com.pc.cgodemo                       D  rebuild call chain: 0x7ca0476bc0
2024-01-04 18:43:50.600 13855-13855 VRI[MainActivity]       com.pc.cgodemo                       D  registerCallbacksForSync syncBuffer=false
2024-01-04 18:43:50.664 13855-18504 hw-ProcessState         com.pc.cgodemo                       D  Binder ioctl to enable oneway spam detection failed: Invalid argument
2024-01-04 18:43:50.703 13855-18504 BLASTBufferQueue        com.pc.cgodemo                       D  [VRI[MainActivity]#0](f:0,a:1) acquireNextBufferLocked size=1080x2400 mFrameNumber=1 applyTransaction=true mTimestamp=14996666777199(auto) mPendingTransactions.size=0 graphicBufferId=59506771886083 transform=0
2024-01-04 18:43:50.704 13855-18504 VRI[MainActivity]       com.pc.cgodemo                       D  Received frameCommittedCallback lastAttemptedDrawFrameNum=1 didProduceBuffer=true syncBuffer=false
2024-01-04 18:43:50.706 13855-18504 Parcel                  com.pc.cgodemo                       W  Expecting binder but got null!
2024-01-04 18:43:50.707 13855-13855 VRI[MainActivity]       com.pc.cgodemo                       D  draw finished.
2024-01-04 18:43:50.725 13855-13855 Choreographer           com.pc.cgodemo                       I  Skipped 31 frames!  The application may be doing too much work on its main thread.
2024-01-04 18:43:50.732 13855-13855 VRI[MainActivity]       com.pc.cgodemo                       D  registerCallbacksForSync syncBuffer=false
2024-01-04 18:43:50.737 13855-18504 VRI[MainActivity]       com.pc.cgodemo                       D  Received frameCommittedCallback lastAttemptedDrawFrameNum=3 didProduceBuffer=true syncBuffer=false
2024-01-04 18:43:50.737 13855-13855 VRI[MainActivity]       com.pc.cgodemo                       D  draw finished.
2024-01-04 18:43:55.450  3979-4724  Battery                 com.oplus.battery                    E  AppStats: com.pc.cgodemofirst la
2024-01-04 18:43:55.450  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuFgTime = 0 ms; CpuBgTime = 0 ms.
2024-01-04 18:43:55.450  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuKernelFgTime = 0 ms; CpuKernelBgTime = 0 ms.
2024-01-04 18:43:55.450  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuUserFgTime = 0 ms ; CpuUserBgTime = 0 ms.
2024-01-04 18:43:55.450  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuFgPower = 0.0 mAh.; CpuBgPower = 0.0 mAh.
2024-01-04 18:43:55.450  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; AlarmFgWakeupCount = 0; AlarmBgWakeupCount = 0
2024-01-04 18:43:55.450  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; JobFgCount = 0; JobBgCount = 0; JobFgTime = 0; JobBgTime = 0
2024-01-04 18:43:55.450  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; SyncFgCount = 0; SyncBgCount = 0; SyncFgTime = 0; SyncBgTime = 0
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; WakeLockFgTime = 0 ms; WakeLockFgPower = 0.0 mAh.; WakeLockBgTime = 0 ms; WakeLockBgPower = 0.0 mAh.
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; ScreenFgTime = 0 ms; ScreenFgPower = 0.0 mAh.
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgWifiRxBytes = 0 Bytes; BgWifiRxBytes = 0 Bytes; FgWifiTxBytes = 0 Bytes; BgWifiTxBytes = 0 Bytes; FgWifiRxPackets = 0 ; BgWifiRxPackets = 0 ; FgWifiTxPackets = 0 ; BgWifiTxPackets = 0 ; FgWiFiScanTimeMs = 0 ; BgWiFiScanTimeMs = 0 ; FgWiFiBatchScanTimeMs = 0 ; BgWiFiBatchScanTimeMs = 0 
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgWifiRxPacketsPower = 0.0 mAh; BgWifiRxPacketsPower = 0.0 mAh; FgWifiTxPacketsPower = 0.0 mAh; BgWifiTxPacketsPower = 0.0 mAh; FgWifiScanPower = 0.0 mAh; BgWifiScanPower = 0.0 mAh; FgWifiBatchScanPower = 0.0 mAh; BgWifiBatchScanPower = 0.0 mAh; FgWiFiTotalPower = 0.0 mAh; BgWiFiTotalPower = 0.0 mAh.
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgGpsTime = 0 ms; BgGpsTime = 0 ms.
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgGpsPower = 0.0 mAh; BgGpsPower = 0.0 mAh.
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgSensorTime = 0 ms; BgSensorTime = 0 ms.
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgSensorPower = 0.0 mAh; BgSensorPower = 0.0 mAh.
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgCameraTime = 0 ms; BgCameraTime = 0 ms
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgCameraPower = 0.0 mAh; BgCameraPower = 0.0 mAh
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgFlashLightTime = 0 ms; BgFlashLightTime = 0 ms
2024-01-04 18:43:55.451  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgFlashLightPower = 0.0 mAh; BgFlashLightPower = 0.0 mAh
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuFgTime = 0 ms; CpuBgTime = 0 ms.
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuKernelFgTime = 0 ms; CpuKernelBgTime = 0 ms.
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuUserFgTime = 0 ms ; CpuUserBgTime = 0 ms.
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuFgPower = 0.0 mAh.; CpuBgPower = 0.0 mAh.
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; AlarmFgWakeupCount = 0; AlarmBgWakeupCount = 0
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; JobFgCount = 0; JobBgCount = 0; JobFgTime = 0; JobBgTime = 0
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; SyncFgCount = 0; SyncBgCount = 0; SyncFgTime = 0; SyncBgTime = 0
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; WakeLockFgTime = 0 ms; WakeLockFgPower = 0.0 mAh.; WakeLockBgTime = 0 ms; WakeLockBgPower = 0.0 mAh.
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; ScreenFgTime = 6 ms; ScreenFgPower = 1.0E-4 mAh.
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgWifiRxBytes = 0 Bytes; BgWifiRxBytes = 0 Bytes; FgWifiTxBytes = 0 Bytes; BgWifiTxBytes = 0 Bytes; FgWifiRxPackets = 0 ; BgWifiRxPackets = 0 ; FgWifiTxPackets = 0 ; BgWifiTxPackets = 0 ; FgWiFiScanTimeMs = 0 ; BgWiFiScanTimeMs = 0 ; FgWiFiBatchScanTimeMs = 0 ; BgWiFiBatchScanTimeMs = 0 
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgWifiRxPacketsPower = 0.0 mAh; BgWifiRxPacketsPower = 0.0 mAh; FgWifiTxPacketsPower = 0.0 mAh; BgWifiTxPacketsPower = 0.0 mAh; FgWifiScanPower = 0.0 mAh; BgWifiScanPower = 0.0 mAh; FgWifiBatchScanPower = 0.0 mAh; BgWifiBatchScanPower = 0.0 mAh; FgWiFiTotalPower = 0.0 mAh; BgWiFiTotalPower = 0.0 mAh.
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgGpsTime = 0 ms; BgGpsTime = 0 ms.
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgGpsPower = 0.0 mAh; BgGpsPower = 0.0 mAh.
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgSensorTime = 0 ms; BgSensorTime = 0 ms.
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgSensorPower = 0.0 mAh; BgSensorPower = 0.0 mAh.
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgCameraTime = 0 ms; BgCameraTime = 0 ms
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgCameraPower = 0.0 mAh; BgCameraPower = 0.0 mAh
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgFlashLightTime = 0 ms; BgFlashLightTime = 0 ms
2024-01-04 18:43:55.456  3979-4724  Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgFlashLightPower = 0.0 mAh; BgFlashLightPower = 0.0 mAh
2024-01-04 18:43:57.066  1682-1780  OplusThermalStats       system_server                        E  Error getting package info: com.pc.cgodemo
2024-01-04 18:43:57.087 13855-13855 Compatibil...geReporter com.pc.cgodemo                       D  Compat change id reported: 78294732; UID 10401; state: DISABLED
2024-01-04 18:43:57.095 13855-13855 VRI[MainActivity]       com.pc.cgodemo                       D  onFocusEvent true
2024-01-04 18:43:57.202 13855-13855 OplusInput...erInternal com.pc.cgodemo                       D  get inputMethodManager extension: com.android.internal.view.IInputMethodManager$Stub$Proxy@a626123
2024-01-04 18:43:59.391 13855-13855 FinalizerDaemon         com.pc.cgodemo                       W  type=1400 audit(0.0:2254): avc: denied { getopt } for path="/dev/socket/usap_pool_primary" scontext=u:r:untrusted_app_29:s0:c145,c257,c512,c768 tcontext=u:r:zygote:s0 tclass=unix_stream_socket permissive=0 app=com.pc.cgodemo
2024-01-04 18:44:02.110 13855-13855 Quality                 com.pc.cgodemo                       I  Skipped: true 8 cost 94.60232 refreshRate 11111111 bit true processName com.pc.cgodemo
2024-01-04 18:44:23.301 13855-13855 JNITAG                  com.pc.cgodemo                       E  Java_com_pc_cgodemo_JniLibrary_GoSendText
2024-01-04 18:44:23.318 13855-18368 OpenGLRenderer          com.pc.cgodemo                       I  Davey! duration=5828ms; Flags=2, FrameTimelineVsyncId=2103197, IntendedVsync=15023443714819, Vsync=15023443714819, InputEventId=0, HandleInputStart=15023443714819, AnimationStart=15023443714819, PerformTraversalsStart=15023443714819, DrawStart=15023443714819, FrameDeadline=15022902182019, FrameInterval=0, FrameStartTime=11214656, SyncQueued=15023446223432, SyncStart=15023446224893, IssueDrawCommandsStart=15023446398509, SwapBuffers=15023448572586, FrameCompleted=15029272435125, DequeueBufferDuration=41307, QueueBufferDuration=1292538, GpuCompleted=15029268859971, SwapBuffersCompleted=15029272435125, DisplayPresentTime=0, CommandSubmissionCompleted=15023448572586, 
2024-01-04 18:44:23.352 13855-13855 JNITAG                  com.pc.cgodemo                       E  Java_com_pc_cgodemo_JniLibrary_GoSendText Finished.
2024-01-04 18:44:23.354 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  >>> msg's executing time is too long
2024-01-04 18:44:23.354 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Blocked msg = { when=-6s535ms what=0 target=android.view.ViewRootImpl$ViewRootHandler callback=android.view.View$PerformClick } , cost  = 6528 ms
2024-01-04 18:44:23.354 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  >>>Current msg List is:
2024-01-04 18:44:23.354 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Current msg <1> = { when=-6s535ms what=0 target=android.view.ViewRootImpl$ViewRootHandler callback=android.view.View$UnsetPressedState }
2024-01-04 18:44:23.355 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Current msg <2> = { when=-6s529ms what=0 target=android.view.ViewRootImpl$ViewRootHandler callback=android.graphics.HardwareRendererObserver$$ExternalSyntheticLambda0 }
2024-01-04 18:44:23.355 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Current msg <3> = { when=-6s518ms what=0 target=android.view.ViewRootImpl$ViewRootHandler callback=android.graphics.HardwareRendererObserver$$ExternalSyntheticLambda0 }
2024-01-04 18:44:23.355 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Current msg <4> = { when=-6s346ms what=3 target=android.view.GestureDetector$GestureHandler }
2024-01-04 18:44:23.356 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Current msg <5> = { when=-5s872ms what=0 target=android.view.ViewRootImpl$ViewRootHandler callback=android.graphics.HardwareRendererObserver$$ExternalSyntheticLambda0 }
2024-01-04 18:44:23.356 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  Current msg <6> = { when=-5s871ms what=0 target=android.os.Handler callback=android.graphics.animation.RenderNodeAnimator$$ExternalSyntheticLambda0 }
2024-01-04 18:44:23.356 13855-13855 ANR_LOG                 com.pc.cgodemo                       E  >>>CURRENT MSG DUMP OVER<<<
2024-01-04 18:44:23.361 13855-18502 Quality                 com.pc.cgodemo                       I  Blocked msg = Package name: com.pc.cgodemo [ schedGroup: 5 schedPolicy: 0 ] process the message: { when=-6s538ms what=0 target=android.view.ViewRootImpl$ViewRootHandler callback=android.view.View$PerformClick } took 6531 ms
2024-01-04 18:44:23.365 13855-18554 Quality                 com.pc.cgodemo                       I  stackInfo :----- pid 13855 at 2024-01-04 18:44:23.305 -----;Cmd line: com.pc.cgodemo;"main" prio=5 tid=2 RUNNABLE sysTid=13855;  at com.pc.cgodemo.JniLibrary.TestCustomLogger(Native Method);  at com.pc.cgodemo.MainActivity$2.onClick(MainActivity.java:49);  at android.view.View.performClick(View.java:7558);  at android.view.View.performClickInternal(View.java:7534);  at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0);  at android.view.View$PerformClick.run(View.java:29661);  at android.os.Handler.handleCallback(Handler.java:942);  at android.os.Handler.dispatchMessage(Handler.java:99);  at android.os.Looper.loopOnce(Looper.java:240);  at android.os.Looper.loop(Looper.java:351);  at android.app.ActivityThread.main(ActivityThread.java:8377);  at java.lang.reflect.Method.invoke(Native Method);  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584);  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013);
2024-01-04 18:44:23.376 13855-13855 Choreographer           com.pc.cgodemo                       I  Skipped 589 frames!  The application may be doing too much work on its main thread.
2024-01-04 18:44:23.377 13855-13855 Quality                 com.pc.cgodemo                       I  Skipped: false 589 cost 6547.73 refreshRate 11111111 bit true processName com.pc.cgodemo
2024-01-04 18:44:23.399 13855-13855 Quality                 com.pc.cgodemo                       I  Skipped: false 1 cost 14.628424 refreshRate 11111111 bit true processName com.pc.cgodemo
2024-01-04 18:45:41.512 13855-13855 JNITAG                  com.pc.cgodemo                       E  Java_com_pc_cgodemo_JniLibrary_GoSendText
2024-01-04 18:45:41.515 13855-13855 JNITAG                  com.pc.cgodemo                       E  Java_com_pc_cgodemo_JniLibrary_GoSendText Finished.
2024-01-04 18:45:41.520 13855-13855 Quality                 com.pc.cgodemo                       I  Skipped: false 1 cost 12.586275 refreshRate 11111111 bit true processName com.pc.cgodemo
2024-01-04 18:45:45.927 13855-13855 JNITAG                  com.pc.cgodemo                       E  Java_com_pc_cgodemo_JniLibrary_GoSendText
2024-01-04 18:45:45.930 13855-13855 JNITAG                  com.pc.cgodemo                       E  Java_com_pc_cgodemo_JniLibrary_GoSendText Finished.
2024-01-04 18:45:45.936 13855-13855 Quality                 com.pc.cgodemo                       I  Skipped: false 1 cost 11.881882 refreshRate 11111111 bit true processName com.pc.cgodemo
2024-01-04 18:45:56.040  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuFgTime = 0 ms; CpuBgTime = 0 ms.
2024-01-04 18:45:56.040  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuKernelFgTime = 0 ms; CpuKernelBgTime = 0 ms.
2024-01-04 18:45:56.040  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuUserFgTime = 0 ms ; CpuUserBgTime = 0 ms.
2024-01-04 18:45:56.040  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; CpuFgPower = 0.0 mAh.; CpuBgPower = 0.0 mAh.
2024-01-04 18:45:56.040  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; AlarmFgWakeupCount = 0; AlarmBgWakeupCount = 0
2024-01-04 18:45:56.040  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; JobFgCount = 0; JobBgCount = 0; JobFgTime = 0; JobBgTime = 0
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; SyncFgCount = 0; SyncBgCount = 0; SyncFgTime = 0; SyncBgTime = 0
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; WakeLockFgTime = 0 ms; WakeLockFgPower = 0.0 mAh.; WakeLockBgTime = 0 ms; WakeLockBgPower = 0.0 mAh.
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgWifiRxBytes = 0 Bytes; BgWifiRxBytes = 0 Bytes; FgWifiTxBytes = 0 Bytes; BgWifiTxBytes = 0 Bytes; FgWifiRxPackets = 0 ; BgWifiRxPackets = 0 ; FgWifiTxPackets = 0 ; BgWifiTxPackets = 0 ; FgWiFiScanTimeMs = 0 ; BgWiFiScanTimeMs = 0 ; FgWiFiBatchScanTimeMs = 0 ; BgWiFiBatchScanTimeMs = 0 
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgWifiRxPacketsPower = 0.0 mAh; BgWifiRxPacketsPower = 0.0 mAh; FgWifiTxPacketsPower = 0.0 mAh; BgWifiTxPacketsPower = 0.0 mAh; FgWifiScanPower = 0.0 mAh; BgWifiScanPower = 0.0 mAh; FgWifiBatchScanPower = 0.0 mAh; BgWifiBatchScanPower = 0.0 mAh; FgWiFiTotalPower = 0.0 mAh; BgWiFiTotalPower = 0.0 mAh.
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgGpsTime = 0 ms; BgGpsTime = 0 ms.
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgGpsPower = 0.0 mAh; BgGpsPower = 0.0 mAh.
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgSensorTime = 0 ms; BgSensorTime = 0 ms.
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgSensorPower = 0.0 mAh; BgSensorPower = 0.0 mAh.
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgCameraTime = 0 ms; BgCameraTime = 0 ms
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgCameraPower = 0.0 mAh; BgCameraPower = 0.0 mAh
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgFlashLightTime = 0 ms; BgFlashLightTime = 0 ms
2024-01-04 18:45:56.041  3979-18740 Battery                 com.oplus.battery                    E  AppStats: Uid = 10401; pkgName = com.pc.cgodemo; FgFlashLightPower = 0.0 mAh; BgFlashLightPower = 0.0 mAh
2024-01-04 18:45:56.065  3979-18740 Battery                 com.oplus.battery                    E  HighPowerHelper: ; pkgName = com.pc.cgodemo; mCpuTimeMsPerHourWhileScreenOn = 0 ms; mWakeLockTimeMsPerHourWhileScreenOn = 0 ms; mWakeLockTimeMsPerHourWhileScreenOff = 0 ms; mJobTimeMsPerHourWhileScreenOn = 0 ms; mJobTimeMsPerTwoHoursWhileScreenOn = 0 ms; mWiFiScanTimeMsPerHourWhileScreenOn = 0 ms; mCameraTimeMsPerHourWhileScreenOn = 0 ms; mFlashLightTimeMsPerHourWhileScreenOn = 0 ms; mGpsTimeMsPerHourWhileScreenOn = 0 ms; mAlarmCountPerHourWhileScreenOn = 0 ms
itpan8067 commented 6 months ago

Would be awesome if you could try your module with this code instead:如果您可以尝试使用此代码的模块,那就太棒了: https://github.com/pion/webrtc/blob/master/examples/custom-logger/main.go This example did not work here after the mentioned compiler patch.在上述编译器补丁之后,此示例在这里不起作用。 TIA TIA系列

I simply wrote a demo, hope it will be helpful to you. https://github.com/itpan8067/customloggerdemo我只是写了一个演示,希望对你有所帮助。https://github.com/itpan8067/customloggerdemo

What is this app supposed to do?这个应用程序应该做什么?

I was running it on my OnePlus. Nothing happened so far. Just this as trace. Pressed START and SEND, not sure what shall happen. At least I see the same traces I saw w.r.t the avc denied issue我在我的 OnePlus 上运行它。到目前为止什么也没发生。只是作为跟踪。按下“开始”和“发送”,不确定会发生什么。至少我看到了与avc被拒绝问题相同的痕迹

https://github.com/itpan8067/customloggerdemo This project will write logs to the phone's SD card. There is a rtc.log file under the root directory of the SD card。File log = new File(Environment.getExternalStorageDirectory() + File.separator + "rtc.log");

suutaku commented 6 months ago

Where do you see the MDNS problem? In the GO module for outgoing MDNS candidates or for incoming candidates? Looks like for incoming, right?

offer side (Android):

W/Thread-7(28264): type=1400 audit(0.0:784367): avc: denied { bind } for scontext=u:r:untrusted_app_27:s0:c104,c257,c512,c768 tcontext=u:r:untrusted_app_27:s0:c104,c257,c512,c768 tclass=netlink_route_socket permissive=0 app=com..
I/GoLog   (28264): interface: dummy0 up|broadcast|running
I/GoLog   (28264): interface: rmnet_ims00 up|running
E/GoLog   (28264): time="2024-01-05T05:42:19Z" level=info msg="ListenUDP udp4 224.0.0.0:5353"
I/GoLog   (28264): doDialTCPProto
E/GoLog   (28264): time="2024-01-05T05:42:19Z" level=info msg="ListenUDP udp 192.168.11.172:0"
E/GoLog   (28264): time="2024-01-05T05:42:19Z" level=info msg="ListenUDP udp [2408:8568:ff10:5d00:17a7:4fe2:d03e:1b8b]:0"
5
E/GoLog   (28264): time="2024-01-05T05:42:19Z" level=info msg="ListenUDP udp4 :0"
E/GoLog   (28264): time="2024-01-05T05:42:19Z" level=info msg="write PR"
8
E/GoLog   (28264): time="2024-01-05T05:42:19Z" level=info msg="write a signal info"
E/GoLog   (28264): time="2024-01-05T05:42:30Z" level=info msg="handle a signal info"

Answer side (Chrome):

2
time="2024-01-05T13:42:30+08:00" level=info msg="handle a signal info"
time="2024-01-05T13:42:30+08:00" level=warning msg="candidate:2391061201 1 udp 2130706431 192.168.11.172 58903 typ host"
time="2024-01-05T13:42:30+08:00" level=info msg="handle a signal info"
time="2024-01-05T13:42:30+08:00" level=info msg="write a signal info"
time="2024-01-05T13:42:30+08:00" level=warning msg="candidate:3123749963 1 udp 2130706431 2408:8568:ff10:5d00:17a7:4fe2:d03e:1b8b 40170 typ host"
time="2024-01-05T13:42:30+08:00" level=info msg="handle a signal info"
time="2024-01-05T13:42:30+08:00" level=warning msg="candidate:2089005254 1 udp 1694498815 171.221.144.24 31629 typ srflx raddr 0.0.0.0 rport 50750"
time="2024-01-05T13:42:30+08:00" level=info msg="handle a signal info"
time="2024-01-05T13:42:30+08:00" level=warning msg="candidate:2089005254 1 udp 1694498815 171.221.144.24 29580 typ srflx raddr 0.0.0.0 rport 60344"
time="2024-01-05T13:42:30+08:00" level=info msg="handle a signal info"
time="2024-01-05T13:42:30+08:00" level=warning msg="candidate:2089005254 1 udp 1694498815 171.221.144.24 28684 typ srflx raddr 0.0.0.0 rport 49371"
time="2024-01-05T13:42:30+08:00" level=info msg="handle a signal info"
time="2024-01-05T13:42:30+08:00" level=warning msg="candidate:2089005254 1 udp 1694498815 171.221.144.24 31884 typ srflx raddr 0.0.0.0 rport 33885"
time="2024-01-05T13:42:30+08:00" level=info msg="handle a signal info"
2
time="2024-01-05T13:42:30+08:00" level=info msg="write a signal info"
time="2024-01-05T13:42:30+08:00" level=warning msg="candidate:2089005254 1 udp 1694498815 171.221.144.24 32269 typ srflx raddr 0.0.0.0 rport 34987"
3
time="2024-01-05T13:42:30+08:00" level=info msg="write a signal info"
time="2024-01-05T13:43:00+08:00" level=info msg="read signaling info error failed to read JSON message: failed to read: use of closed network connection"

connection can not create until timeout. for offer side, sdp was created and send to answer side. answer side received sdp also send back a sdp which finally handled by offer side. the difference between tow side it: answer side get many candidates but offer side not. actually candidate is ok. total 8 (7 candidates + 1 SDP) . but just cannot create connection.

this only happed on my office and the network be like:

graph TD
router --> sub_router_1
router --> sub_router_2
sub_router_1 --> android
sub_router_2 --> chrome

BTW, change Chrome as offer side, Android as answer side, everything will be OK.

neilyoung commented 6 months ago

E/GoLog (28264): time="2024-01-05T05:42:19Z" level=info msg="ListenUDP udp4 224.0.0.0:5353"

This multicast address is nonsense IMHO...

Both parties exchange host candidates in the local network, that should work from the paper.

E/GoLog (28264): time="2024-01-05T05:42:19Z" level=info msg="ListenUDP udp 192.168.11.172:0"

time="2024-01-05T13:42:30+08:00" level=warning msg="candidate:2391061201 1 udp 2130706431 192.168.11.172 58903 typ host"

Strange too...

E/GoLog (28264): time="2024-01-05T05:42:19Z" level=info msg="ListenUDP udp4 :0"

How does that come?

Do you have a log of the SDP/ICE back and forth?

EDIT: The port of the offering local candidate looks ugly... Never seen 0 here...