RK3288 Android7.1华为移动远域格4G调试记录
一、需要修改的和添加到文件如下图。
二、给4G模块供电和reset。
三、驱动软件enable power和reset ic。
四、lsu***确认是否识别到u***模块。
五、kerneldriversu***serialoption.c添加vid、pid。
六、ls /dev/tty*确认是否生成ttyUSB0、 ttyUSB1、 ttyUSB2、 ttyUSB3。
七、devicerockchipcommon BoardConfig.mk设置BOARD_HAVE_DONGEL :=true BOARD_HAS_RK_4G_MODEM :=true
八、devicerockchipcommoninit.rk30board.rc start ril-daemon
九、devicerockchipcommoninit.connectivity.rc 设置/dev/ppp权限
十、指定so库路径。注意有的模块需要设置生rild.libargs=-d /dev/ttyUSB2
。 SIM_IO接口)返回值解析问题导致;需要修改框架层逻辑”这样的。你需要打两个补丁。
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
旧模式 100644
新模式 100755
索引 50f90c1..6e7353e
--- a/src/com/ android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -91,6 +91,7 @@ import java.util.Arrays;
导入 java.util.List;
导入 java.util.Locale;
导入 java.util.Map;
+导入android.os.SystemProperties;
/**
* ITelephony 接口的实现。
@@ -2616,18 +2617,31 @@ public class PhoneInterfaceManager extends ITelephony.Stub {
}
private String getIccId(int subId) {
- 最终电话电话 = getPhone(subId);
- UiccCard卡=电话==空?空:phone.getUiccCard();
- if (card == null) {
- loge("getIccId: No UICC");
- 返回空值;
- }
- String iccId = card.getIccId();
- if (TextUtils.isEmpty(iccId)) {
- loge("getIccId: ICC ID 为空或为空。");
- 返回空值;
- }
- 返回iccId;
+ 布尔配置 = SystemProperties.getBoolean("ro.radio.noril", false);
+ if(config == true) {
+ final Phone phone = getPhone(subId);
+ UiccCard 卡 = 电话 == 空?空:phone.getUiccCard();
+ if (card == null) {
+ loge("getIccId: No UICC");
+ 返回空值;
+ }
+
+ String iccId = card.getIccId();
+
+ if (TextUtils.isEmpty(iccId)) {
+ loge("getIccId: ICC ID 为空或为空。");
+ 返回空值;
+ }
+ 返回iccId;
+ }else{
+ 字符串 iccId ;
+ 字符串 sim_state = SystemProperties.get("gsm.sim.state");
+ if(sim_state.equals("READY")){
+ iccId = "89860002091070314495";
+返回iccId;
+ } 否则
+ 返回空值;
+ }
}
@Override
diff --git a/src/java/com/android/internal/telephony/SubscriptionController.java b/src/java/com/android/internal/telephony/SubscriptionController.java
旧模式 100644
新模式 100755
索引38b054b..4a15e09
--- a/src/java/com/android/internal/telephony/SubscriptionController.java
+++ b/src/java/com/android/internal/telephony/SubscriptionController.java
@@ -53,7 +53,7 @@ 导入 java.util.Map;
导入 java.util.Map.Entry;
导入 java.util.Set;
导入 java.util.concurrent.ConcurrentHashMap;
-
+导入android.os.SystemProperties;
/**
* SubscriptionController 提供进程间通信以
* 访问 Icc 中的 Sms。
@@ -185,7 +185,18 @@ public class SubscriptionController extends ISub.Stub {
}
private boolean isSubInfoReady() {
- return sSlotIdxToSubId.size() > 0;
+ 布尔配置 = SystemProperties.getBoolean("ro.radio.noril", false);
+ if(config == true) {
+ return sSlotIdxToSubId.size() > 0;
+ } 其他 {
+ 字符串 sim_state ;
+ sim_state = SystemProperties.get("gsm.sim.state");
+ if(sim_state.equals("READY")){
+ logd("sim_state is :" + sim_state);
+ 返回真;
+ }否则
+返回假;
+ }
}
private SubscriptionController(Phone phone) {
@@ -1111,7 +1122,11 @@ public class SubscriptionController extends ISub.Stub {
if (size == 0)
{
if (DBG) logd("[getSlotId]- size == 0,改为返回 SIM_NOT_INSERTED");
- 返回 SubscriptionManager.SIM_NOT_INSERTED;
+ 布尔配置 = SystemProperties.getBoolean("ro.radio.noril", false);
+ 如果(配置 == 真)
+ 返回 SubscriptionManager.SIM_NOT_INSERTED;
+ 其他
+ 返回 0;
}
for (Entry
entry: sSlotIdxToSubId.entrySet()) {
@@ -1208,8 +1223,12 @@ public class SubscriptionController extends ISub.Stub {
}
int size = sSlotIdxToSubId.size();
+ 布尔配置 = SystemProperties.getBoolean("ro.radio.noril", false);
if (size == 0) {
- phoneId = mDefaultPhoneId;
+ if(config == true)
+ phoneId = mDefaultPhoneId;
+ 其他
+ 电话号码 = 0;
if (DBG) logdl("[getPhoneId]- 没有 sims,返回默认 phoneId=" + phoneId);
返回电话号码;
}
@@ -1224,***,***@@ public class SubscriptionController extends ISub.Stub {
return sim;
}
}
-
- phoneId = mDefaultPhoneId;
+ if(config == true)
+ phoneId = mDefaultPhoneId;
+ 其他
+ 电话号码 = 0;
if (DBG) {
logdl("[getPhoneId]- not found return default phoneId=" + phoneId);
}
@@ -1239,***+1260,14 @@ 公共类 SubscriptionController 扩展 ISub.Stub {
// 但是没有与两个模拟人生的连接出现。
// 我们需要找出原因并希望删除 DummySubsIds!!!
int numSubs = getActiveSubInfoCountMax();
+ 布尔配置 = SystemProperties.getBoolean("ro.radio.noril", false);
if (numSubs > 0) {
int[] dummyValues = new int[numSubs];
for (int i = 0; i < numSubs; i++) {
- dummyValues = SubscriptionManager.DUMMY_SUBSCRIPTION_ID_BASE - slotIdx;
+ if(config == true)
+ dummyValues = SubscriptionManager.DUMMY_SUBSCRIPTION_ID_BASE - slotIdx;
+ 其他
+ 虚拟值 = 0;
}
if (VDBG) {
logd("getDummySubIds: slotIdx=" + slotIdx
diff --git a/src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java b/src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java
old mode 100644
new mode 100755
index 1f68ff3..65b84b3
--- a/src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java
+++ b/src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java
@@ -58,7 +58,7 @@ import java.util.Map;
import static android.Manifest.permission.READ_PHONE_STATE;
import static android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE;
-
+import android.os.SystemProperties;
/**
*@hide
*/
@@ -400,12 +400,19 @@ public class SubscriptionInfoUpdater extends Handler {
logd("onRecieve: IccRecords null");
return;
}
- if (records.getIccId() == null) {
- logd("onRecieve: IccID null");
- return;
- }
- mIccId[slotId] = records.getIccId();
-
+ boolean config = SystemProperties.getBoolean("ro.radio.noril", false);
+ if(config == true) {
+ if (records.getIccId() == null) {
+ logd("onRecieve: IccID null");
+ return;
+ }
+ mIccId[slotId] = records.getIccId();
+ }else{
+ String sim_state = SystemProperties.get("gsm.sim.state");
+ if(sim_state.equals("READY")){
+ mIccId[slotId] = "89860002091070314495";
+ }
+ }
if (isAllIccIdQueryDone()) {
updateSubscriptionInfoByIccId();
}
@@ -537,21 +544,23 @@ public class SubscriptionInfoUpdater extends Handler {
}
logd("insertedSimCount = " + insertedSimCount);
- int index = 0;
- for (int i = 0; i < PROJECT_SIM_NUM; i++) {
- if (mInsertSimState == SIM_NOT_INSERT) {
- continue;
- }
- index = 2;
- for (int j = i + 1; j < PROJECT_SIM_NUM; j++) {
- if (mInsertSimState[j] == SIM_NOT_CHANGE && mIccId.equals(mIccId[j])) {
- mInsertSimState = 1;
- mInsertSimState[j] = index;
- index++;
- }
- }
- }
-
+ boolean config = SystemProperties.getBoolean("ro.radio.noril", false);
+ if(config == true){
+ int index = 0;
+ for (int i = 0; i < PROJECT_SIM_NUM; i++) {
+ if (mInsertSimState == SIM_NOT_INSERT) {
+ continue;
+ }
+ index = 2;
+ for (int j = i + 1; j < PROJECT_SIM_NUM; j++) {
+ if (mInsertSimState[j] == SIM_NOT_CHANGE && mIccId.equals(mIccId[j])) {
+ mInsertSimState = 1;
+ mInsertSimState[j] = index;
+ index++;
+ }
+ }
+ }
+ }
ContentResolver contentResolver = mContext.getContentResolver();
String[] oldIccId = new String[PROJECT_SIM_NUM];
for (int i = 0; i < PROJECT_SIM_NUM; i++) {
@@ -575,12 +584,22 @@ public class SubscriptionInfoUpdater extends Handler {
+ Integer.toString(oldSubInfo.get(0).getSubscriptionId()), null);
}
} else {
- if (mInsertSimState == SIM_NOT_CHANGE) {
- // no SIM inserted last time, but there is one SIM inserted now
- mInsertSimState = SIM_CHANGED;
- }
- oldIccId = ICCID_STRING_FOR_NO_SIM;
- logd("updateSubscriptionInfoByIccId: No SIM in slot " + i + " last time");
+ if(config == true) {
+ if (mInsertSimState == SIM_NOT_CHANGE) {
+ // no SIM inserted last time, but there is one SIM inserted now
+ mInsertSimState = SIM_CHANGED;
+ }
+
+ logd("updateSubscriptionInfoByIccId: No SIM in slot " + i + " last time");
+ }else{
+ String simstate = SystemProperties.get("gsm.sim.state");
+ if(simstate.equals("READY")){
+ logd("updateSubscriptionInfoByIccId: 3G 加密狗的新 sim");
+ logd("insertedSimCount = " + insertedSimCount);
+ mInsertSimState = SIM_NEW;
+ }
+ }
+ oldIccId = ICCID_STRING_FOR_NO_SIM;
}
}
、Rild服务在init.rc中开启,systemcorerootdirinit.rc,一般默认有。
十二、十二个硬件rilrildrild.c里面已经有switchUser();因为折弯了好几天,血去。
、到了可以工作了。MU909 EC25 LM920都测试了这个基本腾。
十三、整个调试过程这12个C需要吐数据。所有的在rk3.1_4G.patch里面。
RK3288 Android7.1华为移动远域格4G调试记录
一、需要修改的和添加到文件如下图。
二、给4G模块供电和reset。
三、驱动软件enable power和reset ic。
四、lsu***确认是否识别到u***模块。
五、kerneldriversu***serialoption.c添加vid、pid。
六、ls /dev/tty*确认是否生成ttyUSB0、 ttyUSB1、 ttyUSB2、 ttyUSB3。
七、devicerockchipcommon BoardConfig.mk设置BOARD_HAVE_DONGEL :=true BOARD_HAS_RK_4G_MODEM :=true
八、devicerockchipcommoninit.rk30board.rc start ril-daemon
九、devicerockchipcommoninit.connectivity.rc 设置/dev/ppp权限
十、指定so库路径。注意有的模块需要设置生rild.libargs=-d /dev/ttyUSB2
。 SIM_IO接口)返回值解析问题导致;需要修改框架层逻辑”这样的。你需要打两个补丁。
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
旧模式 100644
新模式 100755
索引 50f90c1..6e7353e
--- a/src/com/ android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -91,6 +91,7 @@ import java.util.Arrays;
导入 java.util.List;
导入 java.util.Locale;
导入 java.util.Map;
+导入android.os.SystemProperties;
/**
* ITelephony 接口的实现。
@@ -2616,18 +2617,31 @@ public class PhoneInterfaceManager extends ITelephony.Stub {
}
private String getIccId(int subId) {
- 最终电话电话 = getPhone(subId);
- UiccCard卡=电话==空?空:phone.getUiccCard();
- if (card == null) {
- loge("getIccId: No UICC");
- 返回空值;
- }
- String iccId = card.getIccId();
- if (TextUtils.isEmpty(iccId)) {
- loge("getIccId: ICC ID 为空或为空。");
- 返回空值;
- }
- 返回iccId;
+ 布尔配置 = SystemProperties.getBoolean("ro.radio.noril", false);
+ if(config == true) {
+ final Phone phone = getPhone(subId);
+ UiccCard 卡 = 电话 == 空?空:phone.getUiccCard();
+ if (card == null) {
+ loge("getIccId: No UICC");
+ 返回空值;
+ }
+
+ String iccId = card.getIccId();
+
+ if (TextUtils.isEmpty(iccId)) {
+ loge("getIccId: ICC ID 为空或为空。");
+ 返回空值;
+ }
+ 返回iccId;
+ }else{
+ 字符串 iccId ;
+ 字符串 sim_state = SystemProperties.get("gsm.sim.state");
+ if(sim_state.equals("READY")){
+ iccId = "89860002091070314495";
+返回iccId;
+ } 否则
+ 返回空值;
+ }
}
@Override
diff --git a/src/java/com/android/internal/telephony/SubscriptionController.java b/src/java/com/android/internal/telephony/SubscriptionController.java
旧模式 100644
新模式 100755
索引38b054b..4a15e09
--- a/src/java/com/android/internal/telephony/SubscriptionController.java
+++ b/src/java/com/android/internal/telephony/SubscriptionController.java
@@ -53,7 +53,7 @@ 导入 java.util.Map;
导入 java.util.Map.Entry;
导入 java.util.Set;
导入 java.util.concurrent.ConcurrentHashMap;
-
+导入android.os.SystemProperties;
/**
* SubscriptionController 提供进程间通信以
* 访问 Icc 中的 Sms。
@@ -185,7 +185,18 @@ public class SubscriptionController extends ISub.Stub {
}
private boolean isSubInfoReady() {
- return sSlotIdxToSubId.size() > 0;
+ 布尔配置 = SystemProperties.getBoolean("ro.radio.noril", false);
+ if(config == true) {
+ return sSlotIdxToSubId.size() > 0;
+ } 其他 {
+ 字符串 sim_state ;
+ sim_state = SystemProperties.get("gsm.sim.state");
+ if(sim_state.equals("READY")){
+ logd("sim_state is :" + sim_state);
+ 返回真;
+ }否则
+返回假;
+ }
}
private SubscriptionController(Phone phone) {
@@ -1111,7 +1122,11 @@ public class SubscriptionController extends ISub.Stub {
if (size == 0)
{
if (DBG) logd("[getSlotId]- size == 0,改为返回 SIM_NOT_INSERTED");
- 返回 SubscriptionManager.SIM_NOT_INSERTED;
+ 布尔配置 = SystemProperties.getBoolean("ro.radio.noril", false);
+ 如果(配置 == 真)
+ 返回 SubscriptionManager.SIM_NOT_INSERTED;
+ 其他
+ 返回 0;
}
for (Entry
entry: sSlotIdxToSubId.entrySet()) {
@@ -1208,8 +1223,12 @@ public class SubscriptionController extends ISub.Stub {
}
int size = sSlotIdxToSubId.size();
+ 布尔配置 = SystemProperties.getBoolean("ro.radio.noril", false);
if (size == 0) {
- phoneId = mDefaultPhoneId;
+ if(config == true)
+ phoneId = mDefaultPhoneId;
+ 其他
+ 电话号码 = 0;
if (DBG) logdl("[getPhoneId]- 没有 sims,返回默认 phoneId=" + phoneId);
返回电话号码;
}
@@ -1224,***,***@@ public class SubscriptionController extends ISub.Stub {
return sim;
}
}
-
- phoneId = mDefaultPhoneId;
+ if(config == true)
+ phoneId = mDefaultPhoneId;
+ 其他
+ 电话号码 = 0;
if (DBG) {
logdl("[getPhoneId]- not found return default phoneId=" + phoneId);
}
@@ -1239,***+1260,14 @@ 公共类 SubscriptionController 扩展 ISub.Stub {
// 但是没有与两个模拟人生的连接出现。
// 我们需要找出原因并希望删除 DummySubsIds!!!
int numSubs = getActiveSubInfoCountMax();
+ 布尔配置 = SystemProperties.getBoolean("ro.radio.noril", false);
if (numSubs > 0) {
int[] dummyValues = new int[numSubs];
for (int i = 0; i < numSubs; i++) {
- dummyValues = SubscriptionManager.DUMMY_SUBSCRIPTION_ID_BASE - slotIdx;
+ if(config == true)
+ dummyValues = SubscriptionManager.DUMMY_SUBSCRIPTION_ID_BASE - slotIdx;
+ 其他
+ 虚拟值 = 0;
}
if (VDBG) {
logd("getDummySubIds: slotIdx=" + slotIdx
diff --git a/src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java b/src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java
old mode 100644
new mode 100755
index 1f68ff3..65b84b3
--- a/src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java
+++ b/src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java
@@ -58,7 +58,7 @@ import java.util.Map;
import static android.Manifest.permission.READ_PHONE_STATE;
import static android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE;
-
+import android.os.SystemProperties;
/**
*@hide
*/
@@ -400,12 +400,19 @@ public class SubscriptionInfoUpdater extends Handler {
logd("onRecieve: IccRecords null");
return;
}
- if (records.getIccId() == null) {
- logd("onRecieve: IccID null");
- return;
- }
- mIccId[slotId] = records.getIccId();
-
+ boolean config = SystemProperties.getBoolean("ro.radio.noril", false);
+ if(config == true) {
+ if (records.getIccId() == null) {
+ logd("onRecieve: IccID null");
+ return;
+ }
+ mIccId[slotId] = records.getIccId();
+ }else{
+ String sim_state = SystemProperties.get("gsm.sim.state");
+ if(sim_state.equals("READY")){
+ mIccId[slotId] = "89860002091070314495";
+ }
+ }
if (isAllIccIdQueryDone()) {
updateSubscriptionInfoByIccId();
}
@@ -537,21 +544,23 @@ public class SubscriptionInfoUpdater extends Handler {
}
logd("insertedSimCount = " + insertedSimCount);
- int index = 0;
- for (int i = 0; i < PROJECT_SIM_NUM; i++) {
- if (mInsertSimState == SIM_NOT_INSERT) {
- continue;
- }
- index = 2;
- for (int j = i + 1; j < PROJECT_SIM_NUM; j++) {
- if (mInsertSimState[j] == SIM_NOT_CHANGE && mIccId.equals(mIccId[j])) {
- mInsertSimState = 1;
- mInsertSimState[j] = index;
- index++;
- }
- }
- }
-
+ boolean config = SystemProperties.getBoolean("ro.radio.noril", false);
+ if(config == true){
+ int index = 0;
+ for (int i = 0; i < PROJECT_SIM_NUM; i++) {
+ if (mInsertSimState == SIM_NOT_INSERT) {
+ continue;
+ }
+ index = 2;
+ for (int j = i + 1; j < PROJECT_SIM_NUM; j++) {
+ if (mInsertSimState[j] == SIM_NOT_CHANGE && mIccId.equals(mIccId[j])) {
+ mInsertSimState = 1;
+ mInsertSimState[j] = index;
+ index++;
+ }
+ }
+ }
+ }
ContentResolver contentResolver = mContext.getContentResolver();
String[] oldIccId = new String[PROJECT_SIM_NUM];
for (int i = 0; i < PROJECT_SIM_NUM; i++) {
@@ -575,12 +584,22 @@ public class SubscriptionInfoUpdater extends Handler {
+ Integer.toString(oldSubInfo.get(0).getSubscriptionId()), null);
}
} else {
- if (mInsertSimState == SIM_NOT_CHANGE) {
- // no SIM inserted last time, but there is one SIM inserted now
- mInsertSimState = SIM_CHANGED;
- }
- oldIccId = ICCID_STRING_FOR_NO_SIM;
- logd("updateSubscriptionInfoByIccId: No SIM in slot " + i + " last time");
+ if(config == true) {
+ if (mInsertSimState == SIM_NOT_CHANGE) {
+ // no SIM inserted last time, but there is one SIM inserted now
+ mInsertSimState = SIM_CHANGED;
+ }
+
+ logd("updateSubscriptionInfoByIccId: No SIM in slot " + i + " last time");
+ }else{
+ String simstate = SystemProperties.get("gsm.sim.state");
+ if(simstate.equals("READY")){
+ logd("updateSubscriptionInfoByIccId: 3G 加密狗的新 sim");
+ logd("insertedSimCount = " + insertedSimCount);
+ mInsertSimState = SIM_NEW;
+ }
+ }
+ oldIccId = ICCID_STRING_FOR_NO_SIM;
}
}
、Rild服务在init.rc中开启,systemcorerootdirinit.rc,一般默认有。
十二、十二个硬件rilrildrild.c里面已经有switchUser();因为折弯了好几天,血去。
、到了可以工作了。MU909 EC25 LM920都测试了这个基本腾。
十三、整个调试过程这12个C需要吐数据。所有的在rk3.1_4G.patch里面。
举报