IM-A820L限制GSM,WCDMA上网的原理(其他泛泰机型可参考)7.13

news/2024/11/24 19:43:02/

定位到framework\com\android\internal\telephony\MMDataConnectionTracker.smali中

关键限制代码在isReadyForData()中

smali代码

    if-eqz v3, :cond_eciget-boolean v6, p0, Lcom/android/internal/telephony/MMDataConnectionTracker;->isDataConnPopupAllowed:Zif-eqz v6, :cond_eciget-boolean v6, p0, Lcom/android/internal/telephony/MMDataConnectionTracker;->isDataConnDialogDisplayed:Zif-nez v6, :cond_ecsget-object v6, Lcom/android/internal/telephony/CommandsInterface$RadioTechnology;->RADIO_TECH_LTE:Lcom/android/internal/telephony/CommandsInterface$RadioTechnology;if-eq v4, v6, :cond_235invoke-virtual {p0}, Lcom/android/internal/telephony/MMDataConnectionTracker;->isRadioTechEvdo()Zmove-result v6if-eqz v6, :cond_262:cond_235iget-object v6, p0, Lcom/android/internal/telephony/MMDataConnectionTracker;->datalock:Ljava/lang/Object;monitor-enter v6:try_start_238const-string v7, "DATA"const-string v8, "[MMDataConnectionTracker] isReadyForData is True and isDataconnPopupAllowed is True "invoke-static {v7, v8}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)Iconst-string v7, "DATA"new-instance v8, Ljava/lang/StringBuilder;invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()Vconst-string v9, "data conn popup showed, "invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;move-result-object v8iget-boolean v9, p0, Lcom/android/internal/telephony/MMDataConnectionTracker;->isDataConnDialogDisplayed:Zinvoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;move-result-object v8invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;move-result-object v8invoke-static {v7, v8}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)Iinvoke-direct {p0}, Lcom/android/internal/telephony/MMDataConnectionTracker;->createDataConnectionDialog()Vmonitor-exit v6goto/16 :goto_ec:catchall_25fmove-exception v7monitor-exit v6:try_end_261.catchall {:try_start_238 .. :try_end_261} :catchall_25fthrow v7:cond_262const/4 v3, 0x0goto/16 :goto_ec

对应java代码
		if (flag && isDataConnPopupAllowed && !isDataConnDialogDisplayed){int i4 = CommandsInterface.RadioTechnology.RADIO_TECH_LTE;if (i == i4 || isRadioTechEvdo())synchronized (datalock){int j4 = Log.d("DATA", "[MMDataConnectionTracker] isReadyForData is True and isDataconnPopupAllowed is True ");StringBuilder stringbuilder14 = (new StringBuilder()).append("data conn popup showed, ");boolean flag14 = isDataConnDialogDisplayed;String s4 = stringbuilder14.append(flag14).toString();int k4 = Log.e("DATA", s4);createDataConnectionDialog();}elseflag = false;}

可以看到
			int i4 = CommandsInterface.RadioTechnology.RADIO_TECH_LTE;if (i == i4 || isRadioTechEvdo())

这个是关键判断,若非LTE或Evdo则flag=false;也就是不能上网

那么我们只需要去掉这个判断就可以了

也就是去掉这段对应smali代码

    sget-object v6, Lcom/android/internal/telephony/CommandsInterface$RadioTechnology;->RADIO_TECH_LTE:Lcom/android/internal/telephony/CommandsInterface$RadioTechnology;if-eq v4, v6, :cond_235invoke-virtual {p0}, Lcom/android/internal/telephony/MMDataConnectionTracker;->isRadioTechEvdo()Zmove-result v6if-eqz v6, :cond_262

这样做之后,开机时便可看到弹出的是否使用数据的对话框了


7.13增加

启用设置中灰色的网络选项

修改Phone.apk\com\android\phone\Settings.smali

.method setEnabledAlwyasonMenu()V.locals 2.prologueconst-string v1, "alwayson_settings"invoke-direct {p0}, Lcom/android/phone/Settings;->isRoaming()Zmove-result v0if-eqz v0, :cond_0const-string v0, "alwayson_settings"invoke-virtual {p0, v1}, Lcom/android/phone/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;move-result-object v0const/4 v1, 0x0invoke-virtual {v0, v1}, Landroid/preference/Preference;->setEnabled(Z)V:goto_0return-void:cond_0const-string v0, "alwayson_settings"invoke-virtual {p0, v1}, Lcom/android/phone/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;move-result-object v0const/4 v1, 0x1invoke-virtual {v0, v1}, Landroid/preference/Preference;->setEnabled(Z)Vgoto :goto_0
.end methodH
将上面19行的0x0改为0x1即可


转载请注明出处:http://blog.csdn.net/su_ky/article/details/7740166


http://www.ppmy.cn/news/253840.html

相关文章

IM-A820L非英文韩文开机变韩文的原因(其他泛泰机型可参考)

关键代码在Settings\smali\com\android\settings\usim\usimReceiver.smali中&#xff0c;这里就不附上了&#xff0c;请自行查看研究 最直接的解决方法是删除Settings\AndroidManifest.xml中的 <receiver android:name".usim.usimReceiver"><intent-filter…

IM-A820L运营商短信修改教程(供其他泛泰机型参考)

想要恢复运营商短信自然要先了解短信发送流程&#xff0c;这里推荐看 Android平台 短信发送流程剖析(含编码) 这篇&#xff0c; 这里附上里面的流程图 既然A820L的正常中文短信都是都是OK的&#xff0c;那么就可以判断信息的储存取出应该是没有问题的 再看看下一幅流程图&…

《小米手机与泛泰A820L的分区结构对比分析-外加eMMC介绍》

-----------纯手打&#xff0c;部分参考网络资料。尚未完全写成&#xff0c;请暂勿转载 Android其实是一个Linux系统&#xff0c;Android手机的需要类似电脑主板的bios硬件引导程序才能正确加载系统。 这个类似bios的引导程序就是bootloader&#xff0c;他是加载内核之前运行的…

泛泰A820L (高通公司MSM8660 cpu) 3.4内核CM10.1(Android 4.2.2) 测试版第二版

欢迎关注泛泰非盈利专业第三方开发团队 VegaDevTeam &#xff08;本team 由 syhost suky zhaochengw(z大) xuefy(大星星) tenfar(R大师) loogeo crazyi(天下无雪) windxixi(雪狐) wangsai008 组成&#xff09; 感谢&#xff1a; tenfar&#xff08;R大师&#xff09;&#xff…

IM-A820L显示QHSUSB_DLOAD的救砖方案(修改中)

该方案基于个人理解&#xff0c;已修复一砖&#xff0c;不过不保证一定适合所有情况 主要使用QPST中的eMMC Software Download工具进行修复 这里使用的版本主要是QPST_2.7_374&#xff0c;也可以下其他更新的版本&#xff08;366等旧版本不支持8660的hex&#xff0c;会报错&am…

泛泰A820L (高通MSM8660 cpu) 3.4内核的CM10.1(Android 4.2.2) 測试版第二版

欢迎关注泛泰非盈利专业第三方开发团队 VegaDevTeam &#xff08;本team 由 syhost suky zhaochengw(z大) xuefy(大星星) tenfar(R大师) loogeo crazyi(天下无雪) windxixi(雪狐) wangsai008 组成&#xff09; 感谢&#xff1a; tenfar&#xff08;R大师&#xff09;&#xff…

IM-A820L官方升级文件update包,更至1.53(7.31)

密码suky update.149.zip update.149to150.zip update.150to152.zip update.152to153.zip update.133to139.zip update.139to145.zip update.139to142.zip update.142to145.zip update.145to147.zip update.147to149.zip 以上文件均为官方OTA&#xff0c;获取方法…

编译联想A820内核源码

编译平台&#xff1a;Fedora 20 x64 交叉编译工具链&#xff1a;arm-linux-androideabi-4.6 话说这个编译工具我研究了两天&#xff0c;Fedora自带一个arm-none-eabi的ToolChain(工具链)&#xff0c;但是会有编译错误&#xff0c;后来又换成CodeBench ToolChain&#xff0c;还是…