remote-android / redroid-doc

redroid (Remote-Android) is a multi-arch, GPU enabled, Android in Cloud solution. Track issues / docs here
4.34k stars 310 forks source link

weixin cannot be used on wechat #723

Open 0fanzhe opened 4 months ago

0fanzhe commented 4 months ago

I use androidboot.redroid_netproxy, but I still can't use the network. If I don't use androidboot.redroid_netproxy, I can occasionally log in to wechat, but the network is not very stable, so I can't use videos, but I can send messages

comd:

docker run -itd --rm --privileged -v ~/redroid:/data -p 5555:5555 --name redroid redroid-14-libndk_x86 androidboot.redroid_net_ndns=1 androidboot.redroid_net_dns1=114.114.114.114 androidboot.redroid_net_proxy_type=static androidboot.redroid_net_proxy_host=127.0.0.1 androidboot.redroid_net_proxy_port=7890

log:

07-26 07:15:07.964 581 3022 D TrafficStats: tagSocket(59) with statsTag=0xffffff81, statsUid=-1
07-26 07:15:07.964 581 3023 D TrafficStats: tagSocket(5) with statsTag=0xffffff81, statsUid=-1
07-26 07:15:07.965 581 3023 D TrafficStats: tagSocket(5) with statsTag=0xffffff81, statsUid=-1
07-26 07:15:07.965 581 3022 D TrafficStats: tagSocket(59) with statsTag=0xffffff81, statsUid=-1
07-26 07:15:07.968 178 3024 I resolv : ResNSendHandler::run: 0 / {100 983140 100 983140 1073 1}
07-26 07:15:07.968 178 3025 I resolv : ResNSendHandler::run: 0 / {100 983140 100 983140 1073 1}
07-26 07:15:07.968 178 3024 I resolv : resolv_cache_lookup: FOUND IN CACHE entry=0x75ccb7749730
07-26 07:15:07.968 178 3025 I resolv : resolv_cache_lookup: FOUND IN CACHE entry=0x75ccb7749730
07-26 07:15:07.969 581 3022 D NetworkMonitor/100: PROBE_DNS 127.0.0.1 5ms FAIL in type ADDRCONFIG java.net.UnknownHostException
07-26 07:15:07.969 581 3023 D NetworkMonitor/100: PROBE_DNS 127.0.0.1 4ms FAIL in type ADDRCONFIG java.net.UnknownHostException
07-26 07:15:07.969 581 3022 D TrafficStats: tagSocket(5) with statsTag=0xffffff81, statsUid=-1
07-26 07:15:07.970 581 3023 D TrafficStats: tagSocket(59) with statsTag=0xffffff81, statsUid=-1
07-26 07:15:07.971 581 3022 D NetworkMonitor/100: PROBE_HTTPS https://www.google.com/generate_204 Probe failed with exception java.net.ConnectException: Failed to connect to /127.0.0.1:7890
07-26 07:15:07.971 581 3023 D NetworkMonitor/100: PROBE_HTTP http://connectivitycheck.gstatic.com/generate_204 Probe failed with exception java.net.ConnectException: Failed to connect to /127.0.0.1:7890
07-26 07:15:07.971 581 3021 D TrafficStats: tagSocket(5) with statsTag=0xffffff81, statsUid=-1
07-26 07:15:07.972 581 3021 D NetworkMonitor/100: PROBE_FALLBACK http://play.googleapis.com/generate_204 Probe failed with exception java.net.ConnectException: Failed to connect to /127.0.0.1:7890
07-26 07:15:07.973 581 3021 D NetworkMonitor/100: isCaptivePortal: isSuccessful()=false isPortal()=false RedirectUrl=null isPartialConnectivity()=false Time=9ms
07-26 07:15:07.973 239 383 D ConnectivityService: [100 ETHERNET] validation failed
zhouziyang commented 4 months ago

Try change androidboot.redroid_net_proxy_host=127.0.0.1 to androidboot.redroid_net_proxy_host=<Host IP>; redroid is running inside a separated network namespace, and 127.0.0.1 is referring to redroid container itself.

0fanzhe commented 4 months ago

I would like to ask you about it.I started redroid with the following command(docker run -itd --rm --privileged -v ~/redroid:/data -p 5555:5555 --name redroid redroid-14-libndk_x86:latest)I modified the redroid startup command, but the problem still exists, I would like to ask you about it. I use the following command to start redroid, Tencent meeting can be used normally for meetings, but there will be network access problems when I log in using wechat, then use the following command(docker run -itd --rm --privileged -v ~/redroid:/data -p 5555:5555 --name redroid redroid-14-libndk_x86 androidboot.redroid_net_ndns=1 androidboot.redroid_net_dns1=114.114.114.114)wechat can occasionally log in successfully, but can not video calls and voice calls, which is caused by what?

I changed the redroid startup command(docker run -itd --rm --privileged -v ~/redroid:/data -p 5555:5555 --name redroid --network my-redroid-net redroid-14-libndk_x86 androidboot.redroid_net_ndns=1 androidboot.redroid_net_dns1=114.114.114.114 androidboot.redroid_net_proxy_type=static androidboot.redroid_net_proxy_host=<Private-Host-IP> androidboot.redroid_net_proxy_port=7890), but the problem still exists,

log: netd : networkAddInterface(100, eth0) <42.75ms> 07-29 06:59:59.032 254 393 D CompatibilityChangeReporter: Compat change id reported: 186082280; UID 1000; state: ENABLED 07-29 06:59:59.033 646 815 D NetworkMonitor/100: checkAndRenewResourceConfig: update captive portal https urls to [https://www.google.com/generate_204] 07-29 06:59:59.033 646 815 D NetworkMonitor/100: checkAndRenewResourceConfig: update captive portal http urls to [http://connectivitycheck.gstatic.com/generate_204] 07-29 06:59:59.048 176 243 I netd : networkAddRouteParcel(100, RouteInfoParcel{destination: fe80::/64, ifName: eth0, nextHop: , mtu: 0}) <16.04ms> 07-29 06:59:59.048 176 243 I netd : networkAddRouteParcel(100, RouteInfoParcel{destination: 172.18.0.0/16, ifName: eth0, nextHop: , mtu: 0}) <0.05ms> 07-29 06:59:59.048 176 243 I netd : networkAddRouteParcel(100, RouteInfoParcel{destination: 0.0.0.0/0, ifName: eth0, nextHop: 172.18.0.1, mtu: 0}) <0.03ms> 07-29 06:59:59.048 254 393 D ConnectivityService: Setting DNS servers for network 100 to [/114.114.114.114] 07-29 06:59:59.048 254 393 D DnsManager: sendDnsConfigurationForNetwork(100, [114.114.114.114], [], 1800, 25, 8, 64, 0, 0, , [114.114.114.114]) 07-29 06:59:59.048 176 243 I resolv : setDoh: No suitable DoH server found 07-29 06:59:59.048 176 243 I netd : DnsResolverService::setResolverConfiguration(100, [114.114.114.114], [], 1800, 25, 8, 64, 0, 0, "", [114.114.114.114]) -> (0) (0.1ms) 07-29 06:59:59.048 176 243 I netd : setResolverConfiguration(ResolverParamsParcel{netId: 100, sampleValiditySeconds: 1800, successThreshold: 25, minSamples: 8, maxSamples: 64, baseTimeoutMsec: 0, retryCount: 0, servers: [114.114.114.114], domains: [], tlsName: , tlsServers: [114.114.114.114], tlsFingerprints: [], caCertificate: , tlsConnectTimeoutMs: 0, resolverOptions: (null), transportTypes: [3]}) <0.14ms> 07-29 06:59:59.049 254 393 D ProxyTracker: sending Proxy Broadcast for [] 0 xl= 07-29 06:59:59.050 646 815 D NetworkMonitor/100: checkAndRenewResourceConfig: update captive portal fallback urls to[http://www.google.com/gen_204, http://play.googleapis.com/generate_204] 07-29 06:59:59.050 646 815 D NetworkMonitor: Starting on network 100 with capport HTTPS URL [https://www.google.com/generate_204] and HTTP URL [http://connectivitycheck.gstatic.com/generate_204] 07-29 06:59:59.058 176 824 W resolv : Validating DnsTlsServer 114.114.114.114 with mark 0xf0064 07-29 06:59:59.059 176 243 I netd : setProcSysNet(4, 2, eth0, retrans_time_ms, 750) <0.03ms> 07-29 06:59:59.059 176 243 I netd : setProcSysNet(4, 2, eth0, ucast_solicit, 10) <0.01ms> 07-29 06:59:59.059 176 243 I netd : setProcSysNet(6, 2, eth0, retrans_time_ms, 750) <0.02ms> 07-29 06:59:59.059 176 243 I netd : setProcSysNet(6, 2, eth0, ucast_solicit, 10) <0.01ms> 07-29 06:59:59.078 254 393 W BestClock: java.time.DateTimeException: Missing network time fix 07-29 06:59:59.078 254 393 E TrafficControllerJni: create PF_KEY socket failed: Address family not supported by protocol 07-29 06:59:59.078 506 506 D NavigationModeController: getCurrentInteractionMode: mode=0 contextUser=0 07-29 06:59:59.078 254 393 E NetworkStats: problem reading network stats 07-29 06:59:59.078 254 393 E NetworkStats: java.lang.IllegalStateException: java.io.IOException: android.os.ServiceSpecificException: synchronizeKernelRCU failed: Address family not supported by protocol (code 97) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.net.NetworkStatsService.readNetworkStatsUidDetail(NetworkStatsService.java:2981) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.net.NetworkStatsService.getNetworkStatsUidDetail(NetworkStatsService.java:2995) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.net.NetworkStatsService.recordSnapshotLocked(NetworkStatsService.java:2274) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.net.NetworkStatsService.performPollLocked(NetworkStatsService.java:2356) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.net.NetworkStatsService.handleNotifyNetworkStatusLocked(NetworkStatsService.java:2107) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.net.NetworkStatsService.handleNotifyNetworkStatus(NetworkStatsService.java:2083) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.net.NetworkStatsService.notifyNetworkStatus(NetworkStatsService.java:1827) 07-29 06:59:59.078 254 393 E NetworkStats: at android.app.usage.NetworkStatsManager.notifyNetworkStatus(NetworkStatsManager.java:1082) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.ConnectivityService.notifyIfacesChangedForNetworkStats(ConnectivityService.java:10223) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.ConnectivityService.updateLinkProperties(ConnectivityService.java:8061) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.ConnectivityService.applyInitialLinkProperties(ConnectivityService.java:8072) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.ConnectivityService.updateNetworkInfo(ConnectivityService.java:9894) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.ConnectivityService.-$$Nest$mupdateNetworkInfo(ConnectivityService.java:0) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.ConnectivityService$NetworkStateTrackerHandler.maybeHandleNetworkAgentMessage(ConnectivityService.java:3877) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.ConnectivityService$NetworkStateTrackerHandler.handleMessage(ConnectivityService.java:4242) 07-29 06:59:59.078 254 393 E NetworkStats: at android.os.Handler.dispatchMessage(Handler.java:106) 07-29 06:59:59.078 254 393 E NetworkStats: at android.os.Looper.loopOnce(Looper.java:205) 07-29 06:59:59.078 254 393 E NetworkStats: at android.os.Looper.loop(Looper.java:294) 07-29 06:59:59.078 254 393 E NetworkStats: at android.os.HandlerThread.run(HandlerThread.java:67) 07-29 06:59:59.078 254 393 E NetworkStats: Caused by: java.io.IOException: android.os.ServiceSpecificException: synchronizeKernelRCU failed: Address family not supported by protocol (code 97) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.net.NetworkStatsFactory.requestSwapActiveStatsMapLocked(NetworkStatsFactory.java:187) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:210) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.net.NetworkStatsService.readNetworkStatsUidDetail(NetworkStatsService.java:2979) 07-29 06:59:59.078 254 393 E NetworkStats: ... 18 more 07-29 06:59:59.078 254 393 E NetworkStats: Caused by: android.os.ServiceSpecificException: synchronizeKernelRCU failed: Address family not supported by protocol (code 97) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.BpfNetMaps.maybeThrow(BpfNetMaps.java:406) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.BpfNetMaps.swapActiveStatsMap(BpfNetMaps.java:941) 07-29 06:59:59.078 254 393 E NetworkStats: at android.net.connectivity.com.android.server.net.NetworkStatsFactory.requestSwapActiveStatsMapLocked(NetworkStatsFactory.java:185) 07-29 06:59:59.078 254 393 E NetworkStats: ... 20 more 07-29 06:59:59.080 254 393 D ConnectivityService: Switching to new default network for: uid/pid:1000/254 activeRequest: 1 callbackRequest: 1 [NetworkRequest [ REQUEST id=1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&NOT_VCN_MANAGED RequestorUid: 1000 RequestorPkg: android UnderlyingNetworks: Null] ]] callback flags: 1 order: 2147483647 using NetworkAgentInfo{network{100} handle{432902426637} ni{Ethernet CONNECTED extra: 02:42:ac:12:00:02} created=2024-07-29T06:59:58.804Z Score(Policies : IS_UNMETERED ; KeepConnected : 0) created 23960792 lp{{InterfaceName: eth0 LinkAddresses: [ fe80::8b81:385d:dd50:fa5f/64,172.18.0.2/16 ] DnsAddresses: [ /114.114.114.114 ] Domains: null MTU: 0 TcpBufferSizes: 524288,1048576,3145728,524288,1048576,2097152 Routes: [ fe80::/64 -> :: eth0 mtu 0,172.18.0.0/16 -> 0.0.0.0 eth0 mtu 0,0.0.0.0/0 -> 172.18.0.1 eth0 mtu 0 ] HttpProxy: [172.20.192.1] 7890 xl=}} nc{[ Transports: ETHERNET Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED&NOT_VCN_MANAGED LinkUpBandwidth>=100000Kbps LinkDnBandwidth>=100000Kbps Specifier: <EthernetNetworkSpecifier (eth0)> UnderlyingNetworks: Null]} factorySerialNumber=1} 07-29 06:59:59.080 176 243 I netd : networkSetDefault(100) <0.05ms> 07-29 06:59:59.081 254 393 D ProxyTracker: sending Proxy Broadcast for [172.20.192.1] 7890 xl= 07-29 06:59:59.089 254 751 D CompatibilityChangeReporter: Compat change id reported: 168419799; UID 10065; state: DISABLED 07-29 06:59:59.089 254 751 D CompatibilityChangeReporter: Compat change id reported: 273564678; UID 10065; state: DISABLED 07-29 06:59:59.107 506 816 D WallpaperService: reportEngineShown: shouldWait=true 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: Failed to verity-protect runtime-permissions 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: java.io.IOException: Failed to enable fs-verity on /data/misc_de/0/apexdata/com.android.permission/runtime-permissions.xml: Operation not supported on transport endpoint 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at com.android.internal.security.VerityUtils.setUpFsverity(VerityUtils.java:80) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at com.android.server.security.FileIntegrity.setUpFsVerity(FileIntegrity.java:45) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at com.android.permission.persistence.RuntimePermissionsPersistenceImpl.lambda$new$0(RuntimePermissionsPersistenceImpl.java:86) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at com.android.permission.persistence.RuntimePermissionsPersistenceImpl.$r8$lambda$5h47_iJJQtrg6YAo_U8axU1owJI(RuntimePermissionsPersistenceImpl.java:0) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at com.android.permission.persistence.RuntimePermissionsPersistenceImpl$$ExternalSyntheticLambda0.enableFsVerity(R8$$SyntheticClass:0) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at com.android.permission.persistence.RuntimePermissionsPersistenceImpl.writeForUser(RuntimePermissionsPersistenceImpl.java:252) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at com.android.server.pm.Settings$RuntimePermissionPersistence.writePendingStates(Settings.java:5838) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at com.android.server.pm.Settings$RuntimePermissionPersistence.-$$Nest$mwritePendingStates(Settings.java:0) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at com.android.server.pm.Settings$RuntimePermissionPersistence$PersistenceHandler.handleMessage(Settings.java:6093) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at android.os.Handler.dispatchMessage(Handler.java:106) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at android.os.Looper.loopOnce(Looper.java:205) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at android.os.Looper.loop(Looper.java:294) 07-29 06:59:59.118 254 281 E RuntimePermissionsPersistenceImpl: at android.os.HandlerThread.run(HandlerThread.java:67) 07-29 06:59:59.119 176 243 I netd : setTcpRWmemorySize(524288 1048576 3145728, 524288 1048576 2097152) <0.03ms>

zhouziyang commented 4 months ago

Any network probe failures? And not all Apps use the proxy you provided in redroid.

BTW, the virtual camera / mic not implemented yet, that's why you cannot use video / voice call in WeChat.

0fanzhe commented 3 months ago

I realized virtual camera and audio, Tengsim conference can open video conference, but I do not understand why wechat login is slow, occasionally successful, after successful login using video photography is no problem, video phone can not be used, Can you give me an analysis of possible directions? image

codinged commented 3 months ago

@0fanzhe I started the service using the following command, and Docker is installed on the cloud server. However, when I open WeChat, it keeps showing an infinite restart screen. Do you know the reason docker run -itd --rm --memory-swappiness=0 --privileged --pull always -v ~/redroid14:/data -p 5555:5555 redroid/redroid:14.0.0-latest androidboot.hardware=mt6891 ro.secure=0 ro.boot.hwc=CN ro.ril.oem.imei=811503061361141 ro.ril.oem.imei1=811503061361141 ro.ril.oem.imei2=811503061361141 ro.ril.miui.imei0=811503061361141 ro.product.manufacturer=Xiaomi ro.build.product=chopin redroid.width=720 redroid.height=1280 redroid.gpu.mode=guest

lostwindsenril commented 1 month ago

I realized virtual camera and audio, Tengsim conference can open video conference, but I do not understand why wechat login is slow, occasionally successful, after successful login using video photography is no problem, video phone can not be used, Can you give me an analysis of possible directions? image

Could you please share how you implemented the virtual camera?