杂七杂八 ·

Android网络模式默认值修改方法

修改原因:解决原生系统电信无服务
修改系统属性:ro.telephony.default_network=**,**
联通或移动搭配电信卡时,任意卡槽支持电信则改为:ro.telephony.default_network=22,22
注:修改build.prop
后要清除com.android.phone的数据或recovery双清
修改说明:
如ro.telephony.default_network=4,1
可连续给两个值(如4,1),卡1用的是4,卡2用的是1。数字代表的意义见下方的相关代码片段。
相关代码片段:
int NETWORK_MODE_WCDMA_PREF = 0; /* GSM/WCDMA (WCDMA preferred) */
int NETWORK_MODE_GSM_ONLY = 1; /* GSM only */
int NETWORK_MODE_WCDMA_ONLY = 2; /* WCDMA only */
int NETWORK_MODE_GSM_UMTS = 3; /* GSM/WCDMA (auto mode, according to PRL)
AVAILABLE Application Settings menu*/
int NETWORK_MODE_CDMA = 4; /* CDMA and EvDo (auto mode, according to PRL)
AVAILABLE Application Settings menu*/
int NETWORK_MODE_CDMA_NO_EVDO = 5; /* CDMA only */
int NETWORK_MODE_EVDO_NO_CDMA = 6; /* EvDo only */
int NETWORK_MODE_GLOBAL = 7; /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
AVAILABLE Application Settings menu*/
int NETWORK_MODE_LTE_CDMA_EVDO = 8; /* LTE, CDMA and EvDo */
int NETWORK_MODE_LTE_GSM_WCDMA = 9; /* LTE, GSM/WCDMA */
int NETWORK_MODE_LTE_CMDA_EVDO_GSM_WCDMA = 10; /* LTE, CDMA, EvDo, GSM/WCDMA */
int NETWORK_MODE_LTE_ONLY = 11; /* LTE Only mode. */
int NETWORK_MODE_LTE_WCDMA = 12; /* LTE/WCDMA */
int NETWORK_MODE_TD_SCDMA_ONLY = 13; /* TD-SCDMA only */
int NETWORK_MODE_TD_SCDMA_WCDMA = 14; /* TD-SCDMA and WCDMA */
int NETWORK_MODE_TD_SCDMA_LTE = 15; /* TD-SCDMA and LTE */
int NETWORK_MODE_TD_SCDMA_GSM = 16; /* TD-SCDMA and GSM */
int NETWORK_MODE_TD_SCDMA_GSM_LTE = 17; /* TD-SCDMA,GSM and LTE */
int NETWORK_MODE_TD_SCDMA_GSM_WCDMA = 18; /* TD-SCDMA, GSM/WCDMA */
int NETWORK_MODE_TD_SCDMA_WCDMA_LTE = 19; /* TD-SCDMA, WCDMA and LTE */
int NETWORK_MODE_TD_SCDMA_GSM_WCDMA_LTE = 20; /* TD-SCDMA, GSM/WCDMA and LTE */
int NETWORK_MODE_TD_SCDMA_CDMA_EVDO_GSM_WCDMA = 21; /*TD-SCDMA,EvDo,CDMA,GSM/WCDMA*/
int NETWORK_MODE_TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA = 22; /* TD-SCDMA/LTE/GSM/WCDMA, CDMA, and
EvDo */
-----------------------------------------------------------------------------------------------------------
835机型通用可测试
注:教程源于CSDN博客 Tony Anmoo原创

参与评论