Search code examples
network-programmingwifimodem3gandroid-kernel

Android Kernel - Switch between network types at runtime


I'm currently working on an experimental Android Kernel (Research). I'actually trying to find some ways to preserve battery charge by implementing a kind of power management tool on the kernel level. I'm working on the msm-hammerahead kernel (used by the nexus 5 running Android 5.0).

I'm trying to figure out if there exists a way to switch between network types (2G,3G,Wifi) at runtime. I know that there exist the possibility to switch the default network type within the build.prop file(ro.telephony.default_network).

Does anybody know if it is even possible to achive this?


Solution

  • The android kernel is not the place to look for network switching. build.prop is also useless for this because it just contain the default boot values. Switching network interfaces is a very bad idea, because the android framework need to be synchronized with the lower linux layer state.

    I would suggest checking the ConnectivityManager.java in the android framework to understand better how the network switching works.