레이블이 Wifi인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Wifi인 게시물을 표시합니다. 모든 게시물 표시

2022년 5월 31일 화요일

How to make WiFi higher priority than Ethernet on android?

 1. Android 9


frameworks/opt/net/ethernet/java/com/android/server/ethernet/EthernetNetworkFactory.java



/**

 * {@link NetworkFactory} that represents Ethernet networks.

 *

 * This class reports a static network score of 70 when it is tracking an interface and that

 * interface's link is up, and a score of 0 otherwise.

 */

public class EthernetNetworkFactory extends NetworkFactory {

    private final static String TAG = EthernetNetworkFactory.class.getSimpleName();

    final static boolean DBG = true;


    private static final int NETWORK_SCORE = 59;// fix to lower score than 60.


2. Android 11

frameworks/opt/net/ethernet/java/com/android/server/ethernet/EthernetNetworkFactory.java

        private static final SparseArray<TransportInfo> sTransports = new SparseArray();

        static {

            // LowpanInterfaceTracker.NETWORK_SCORE

            sTransports.put(NetworkCapabilities.TRANSPORT_LOWPAN,

                    new TransportInfo(ConnectivityManager.TYPE_NONE, 30));

            // WifiAwareDataPathStateManager.NETWORK_FACTORY_SCORE_AVAIL

            sTransports.put(NetworkCapabilities.TRANSPORT_WIFI_AWARE,

                    new TransportInfo(ConnectivityManager.TYPE_NONE, 1));

            // EthernetNetworkFactory.NETWORK_SCORE

            sTransports.put(NetworkCapabilities.TRANSPORT_ETHERNET,

                    new TransportInfo(ConnectivityManager.TYPE_ETHERNET, /*70*/55));


2014년 6월 19일 목요일

How to fake a Wi-Fi or 3G connected event on Android

http://stackoverflow.com/questions/17876259/how-to-fake-a-wi-fi-or-3g-connected-event-on-android

Xposed Framework and Hack Connectivity app link
https://drive.google.com/folderview?id=0B5aZmgmqP9rORThtS21lcVo5X0U&usp=sharing

1. Xposed framework app 설치


2. Framework install 후 rebooting


3. Hack connectivity app 설치

4. Xposed framework 기동하여 Module 메뉴에서 Hack connectivity 활성화


5. reboot

6. Hack connectiviy app 기동하고 Wifi 


7. BenchBee 동작