标题: VS-RK3399 板卡调试4G模块的资料 [打印本页] 作者: shizhuang 时间: 2021-12-15 15:33 标题: VS-RK3399 板卡调试4G模块的资料 android 7.1 "移动网络" 选项 不存在问题。
1、celluar networks 字符串定义
首先在设置APK的资源文件去找到这一串字符
<!-- Wireless controls, item title to go into the network settings -->
<string name="network_settings_title">Mobile networks</string>
2、network_settings_title引用
packages/apps/Settings/src/com/android/settings/WirelessSettings.java中找到:"mobile_network_settings"
private static final String KEY_MOBILE_NETWORK_SETTINGS = "mobile_network_settings";
把 network_settings_title赋值给 KEY_MOBILE_NETWORK_SETTINGS,再跟进一下 KEY_MOBILE_NETWORK_SETTINGS这个变量吧。
在相同的文件中我们找到:
RemovMobile Network Settings if it's a wifi-only device.
if (Utils.isWifiOnly(getActivity())) {
getPreferenceScreen().removePreference(findPreference(KEY_MOBILE_NETWORK_SETTINGS));
}
getSystemService(Context.CONNECTIVITY_SERVICE);获得网络连接服务,然后判断是否支持TYPE_MOBILE,现在判断应该是不支持,也就是if判断中:Utils.isWifiOnly(getActivity())=1
<!-- This string array should be overridden by the device to present a list of radio
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[ConnectivityManager connectionType],
[# simultaneous connection types]" -->
<string-array translatable="false" name="radioAttributes">
<item>"0,1"</item>
<item>"1,1"</item>
<item>"7,1"</item>
<item>"9,1"</item> 注意这里
</string-array>
7、最好要开启rild相关的资源,这是4G模块就可以加载成功。
在boardconfig.mk文件增加此功能
BOARD_HAVE_DONGLE:=true
在android7.1可以成功利用4G模块上网