Dual use of wifi and ethernet with official android os

Which version of system do you use? Khadas official images, self built images, or others?

khadas official android

Please describe your issue below:

It’s seems that android until version 11 does not allow dual use of more than one network interface, But, since i use the official image, i was wondering if Khadas has solved this issue somehow?

My need does not involve internet. My VIM1s connect to an AP without internet and when i tried to connect to VIM1s from my PC through ethernet the applications using WIFI sees NO WIFI.

Some threads on internet speaks about modification of ConnectivityService.java in the android framework but they are quite old and hence led me to think that may be such old problem were already solved by Khadas.

Console log:

[ 1176.564025] is_duty_control_version cpu_type 0x37
[ 1179.646606] meson8b-dwmac fdc00000.ethernet eth0: Link is Down
[ 1179.646965] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[ 1183.561321] type=1400 audit(1666253854.920:158): avc: denied { getattr } for comm=“wifi@1.0-servic” path=“/data/vendor/wifi/wifi_module” dev=“dm-5” ino=777497 scontext=u:r:hal_wifi_default:s0 tcontext=u:object_r:vendor_data_file:s0 tclass=file permissive=1
[ 1207.283980] is_duty_control_version cpu_type 0x37
[ 1207.284013] is_duty_control_version cpu_type 0x37
[ 1238.003982] is_duty_control_version cpu_type 0x37
[ 1238.004015] is_duty_control_version cpu_type 0x37
[ 1254.754683] [dhd][wlan0] wl_run_escan : LEGACY_SCAN sync ID: 82, bssidx: 0
[ 1268.723995] is_duty_control_version cpu_type 0x37
[ 1268.724028] is_duty_control_version cpu_type 0x37
[ 1277.649679] meson8b-dwmac fdc00000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 1277.650150] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[ 1286.705187] type=1400 audit(1666253958.064:159): avc: denied { call } for comm=“Thread-21” scontext=u:r:gmscore_app:s0:c512,c768 tcontext=u:r:hal_memtrack_default:s0 tclass=binder permissive=1 app=com.google.android.gms
[ 1299.444043] is_duty_control_version cpu_type 0x37
[ 1299.444074] is_duty_control_version cpu_type 0x37
[ 1330.163990] is_duty_control_version cpu_type 0x37
[ 1330.164023] is_duty_control_version cpu_type 0x37

@pawfi Please try modifying it as follows.

frameworks/opt/net/ethernet$ git diff
--- a/java/com/android/server/ethernet/EthernetNetworkFactory.java
+++ b/java/com/android/server/ethernet/EthernetNetworkFactory.java
@@ -69,7 +69,7 @@ public class EthernetNetworkFactory extends NetworkFactory {
     private final static String TAG = EthernetNetworkFactory.class.getSimpleName();
     final static boolean DBG = true;
-    private final static int NETWORK_SCORE = 70;
+    private final static int NETWORK_SCORE = 30;
     private static final String NETWORK_TYPE = "Ethernet";