[高通SDM450][Android9.0]CTA认证--去掉GPS功能

文章目录

    • 开发平台基本信息
    • 问题描述
    • 解决方法

开发平台基本信息

芯片: SDM450
版本: Android 9.0
kernel: msm-4.9

问题描述

与去掉录音功能同理,设备在进行入网认证的时候,为了快速通过认证,要求系统去掉GPS功能,让实验室无法调用GPS功能即可。

解决方法

diff --git a/frameworks/base/services/core/jni/com_android_server_location_GnssLocationProvider.cpp b/frameworks/base/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
index 4fb2ae3..4f1b0ad 100644
--- a/frameworks/base/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
+++ b/frameworks/base/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
@@ -1050,7 +1050,7 @@ static void android_location_GnssLocationProvider_class_init_native(JNIEnv* env,
     }
 
     // TODO(b/31632518)
-    gnssHal = IGnss::getService();
+    //gnssHal = IGnss::getService();
     if (gnssHal != nullptr) {
       gnssHalDeathRecipient = new GnssDeathRecipient();
       hardware::Return<bool> linked = gnssHal->linkToDeath(
@@ -1140,7 +1140,8 @@ static void android_location_GnssLocationProvider_class_init_native(JNIEnv* env,
 
 static jboolean android_location_GnssLocationProvider_is_supported(
         JNIEnv* /* env */, jclass /* clazz */) {
-    return (gnssHal != nullptr) ?  JNI_TRUE : JNI_FALSE;
+    //return (gnssHal != nullptr) ?  JNI_TRUE : JNI_FALSE;
+     return JNI_FALSE;
 }
 
 static jboolean android_location_GnssLocationProvider_is_agps_ril_supported(
@@ -1150,7 +1151,8 @@ static jboolean android_location_GnssLocationProvider_is_agps_ril_supported(
 
 static jboolean android_location_gpsLocationProvider_is_gnss_configuration_supported(
         JNIEnv* /* env */, jclass /* jclazz */) {
-    return (gnssConfigurationIface != nullptr) ? JNI_TRUE : JNI_FALSE;
+   // return (gnssConfigurationIface != nullptr) ? JNI_TRUE : JNI_FALSE;
+      return JNI_FALSE;
 }
 
 static jboolean android_location_GnssLocationProvider_init(JNIEnv* env, jobject obj) {
diff --git a/frameworks/native/data/etc/android.hardware.location.gps.xml b/frameworks/native/data/etc/android.hardware.location.gps.xml
index 72ab732..1cb44c7 100644
--- a/frameworks/native/data/etc/android.hardware.location.gps.xml
+++ b/frameworks/native/data/etc/android.hardware.location.gps.xml
@@ -18,5 +18,5 @@
 <permissions>
     <feature name="android.hardware.location" />
     <feature name="android.hardware.location.network" />
-    <feature name="android.hardware.location.gps" />
+  <!--  <feature name="android.hardware.location.gps" /> -->
 </permissions>
diff --git a/vendor/qcom/proprietary/common/config/device-vendor.mk b/vendor/qcom/proprietary/common/config/device-vendor.mk
index bb0a2de..aaaea8d 100755
--- a/vendor/qcom/proprietary/common/config/device-vendor.mk
+++ b/vendor/qcom/proprietary/common/config/device-vendor.mk
@@ -602,7 +602,7 @@ GPS += izat.conf
 GPS += sap.conf
 GPS += com.qualcomm.location.vzw_library.xml
 GPS += libloc_ext
-GPS += xtra_t_app
+#GPS += xtra_t_app
 GPS += libgeofence
 GPS += libflp
 GPS += izat.xt.srv
diff --git a/vendor/qcom/proprietary/gps/framework/Android.mk b/vendor/qcom/proprietary/gps/framework/Android.mk
index d024a79..b92ba3b 100755
--- a/vendor/qcom/proprietary/gps/framework/Android.mk
+++ b/vendor/qcom/proprietary/gps/framework/Android.mk
@@ -25,9 +25,9 @@ LOCAL_PACKAGE_NAME := com.qualcomm.location
 LOCAL_PRIVILEGED_MODULE := true
 #LOCAL_PROGUARD_FLAG_FILES := proguard.flags
 LOCAL_PROGUARD_ENABLED := disabled
-
+ifdef 0
 LOCAL_CERTIFICATE := platform
-
+endif
 include $(BUILD_PACKAGE)
 
 ######## Copy permissions for com.qualcomm.location
diff --git a/vendor/qcom/proprietary/prebuilt_HY11/Android.bp b/vendor/qcom/proprietary/prebuilt_HY11/Android.bp
new file mode 100644
index 0000000..b2ce148
--- /dev/null
+++ b/vendor/qcom/proprietary/prebuilt_HY11/Android.bp
@@ -0,0 +1,3 @@
+optional_subdirs = [
+    "target/product/msm8953_64",
+]
diff --git a/vendor/qcom/proprietary/prebuilt_HY11/target/product/msm8953_32/Android.mk b/vendor/qcom/proprietary/prebuilt_HY11/target/product/msm8953_32/Android.mk
index 999ca52..9188b90 100755
--- a/vendor/qcom/proprietary/prebuilt_HY11/target/product/msm8953_32/Android.mk
+++ b/vendor/qcom/proprietary/prebuilt_HY11/target/product/msm8953_32/Android.mk
@@ -2693,17 +2693,6 @@ LOCAL_MODULE_PATH   := $(PRODUCT_OUT)/system/priv-app
 include $(BUILD_PREBUILT)
 
 include $(CLEAR_VARS)
-LOCAL_MODULE        := xtra_t_app
-LOCAL_MODULE_OWNER  := qcom
-LOCAL_MODULE_TAGS   := optional
-LOCAL_MODULE_CLASS  := APPS
-LOCAL_CERTIFICATE   := platform
-LOCAL_MODULE_SUFFIX := .apk
-LOCAL_SRC_FILES     := ../../.././target/product/msm8953_32/system/priv-app/xtra_t_app/xtra_t_app.apk
-LOCAL_MODULE_PATH   := $(PRODUCT_OUT)/system/priv-app
-include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
 LOCAL_MODULE        := CABLService
 LOCAL_MODULE_OWNER  := qcom
 LOCAL_MODULE_TAGS   := optional
diff --git a/vendor/qcom/proprietary/prebuilt_HY11/target/product/msm8953_64/Android.mk b/vendor/qcom/proprietary/prebuilt_HY11/target/product/msm8953_64/Android.mk
index 6ca963b..dc338e9 100755
--- a/vendor/qcom/proprietary/prebuilt_HY11/target/product/msm8953_64/Android.mk
+++ b/vendor/qcom/proprietary/prebuilt_HY11/target/product/msm8953_64/Android.mk
@@ -3900,17 +3900,6 @@ LOCAL_MODULE_PATH   := $(PRODUCT_OUT)/system/priv-app
 include $(BUILD_PREBUILT)
 
 include $(CLEAR_VARS)
-LOCAL_MODULE        := xtra_t_app
-LOCAL_MODULE_OWNER  := qcom
-LOCAL_MODULE_TAGS   := optional
-LOCAL_MODULE_CLASS  := APPS
-LOCAL_CERTIFICATE   := platform
-LOCAL_MODULE_SUFFIX := .apk
-LOCAL_SRC_FILES     := ../../.././target/product/msm8953_64/system/priv-app/xtra_t_app/xtra_t_app.apk
-LOCAL_MODULE_PATH   := $(PRODUCT_OUT)/system/priv-app
-include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
 LOCAL_MODULE        := CABLService
 LOCAL_MODULE_OWNER  := qcom
 LOCAL_MODULE_TAGS   := optional
 

你可能感兴趣的:(CTA认证-A9,Android9.0,framework,Android9.0,CTA,入网认证,去掉GPS功能)