Android 6.0 删除无用功能

Posted 王睿丶

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android 6.0 删除无用功能相关的知识,希望对你有一定的参考价值。

device/rockchip/common/device.mk

@@ -183,17 +183,11 @@ PRODUCT_COPY_FILES += \\
     frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \\
     frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \\
     frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \\
-    frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \\
     frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \\
     frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \\
-    frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \\
     frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \\
     frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \\
-    frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \\
-    frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml \\
     frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \\
-    frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \\
-    frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml \\
     frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \\
     frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \\
     frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \\
@@ -424,39 +418,6 @@ endif
 #    $(LOCAL_PATH)/init.usbstorage.rc:root/init.usbstorage.rc
 #endif

-ifeq ($(strip $(BOARD_CONNECTIVITY_MODULE)), ap6xxx_nfc)
-#NFC packages
-PRODUCT_PACKAGES += \\
-    nfc_nci.$(TARGET_BOARD_HARDWARE) \\
-    NfcNci \\
-    Tag \\
-    com.android.nfc_extras
-
-# NFCEE access control
-ifeq ($(TARGET_BUILD_VARIANT),user)
-NFCEE_ACCESS_PATH := $(LOCAL_PATH)/nfc/nfcee_access.xml
-else
-NFCEE_ACCESS_PATH := $(LOCAL_PATH)/nfc/nfcee_access_debug.xml
-endif
-
-copyNfcFirmware = $(subst XXXX,$(strip $(1)),hardware/broadcom/nfc/firmware/XXXX:/system/vendor/firmware/XXXX)
-# NFC access control + feature files + configuration
-PRODUCT_COPY_FILES += \\
-    $(NFCEE_ACCESS_PATH):system/etc/nfcee_access.xml \\
-    frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \\
-    frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \\
-    frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml \\
-    $(LOCAL_PATH)/nfc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \\
-    $(LOCAL_PATH)/nfc/libnfc-brcm-20791b03.conf:system/etc/libnfc-brcm-20791b03.conf \\
-    $(LOCAL_PATH)/nfc/libnfc-brcm-20791b04.conf:system/etc/libnfc-brcm-20791b04.conf \\
-    $(LOCAL_PATH)/nfc/libnfc-brcm-20791b05.conf:system/etc/libnfc-brcm-20791b05.conf \\
-    $(LOCAL_PATH)/nfc/libnfc-brcm-43341b00.conf:system/etc/libnfc-brcm-43341b00.conf \\
-    $(call copyNfcFirmware, BCM20791B3_002.004.010.0161.0000_Generic_I2CLite_NCD_Signed_configdata.ncd) \\
-    $(call copyNfcFirmware, BCM20791B3_002.004.010.0161.0000_Generic_PreI2C_NCD_Signed_configdata.ncd) \\
-    $(call copyNfcFirmware, BCM20791B5_002.006.013.0011.0000_Generic_I2C_NCD_Unsigned_configdata.ncd) \\
-    $(call copyNfcFirmware, BCM43341NFCB0_002.001.009.0021.0000_Generic_I2C_NCD_Signed_configdata.ncd) \\
-    $(call copyNfcFirmware, BCM43341NFCB0_002.001.009.0021.0000_Generic_PreI2C_NCD_Signed_configdata.ncd)
-endif

 # for realtek bluetooth
 PRODUCT_PACKAGES += \\

device/generic/goldfish/data/etc/handheld_core_hardware.xml

<permissions>
    <feature name="android.hardware.audio.output" />
--    <feature name="android.hardware.camera" />
    <feature name="android.hardware.location" />
    <feature name="android.hardware.location.network" />
--    <feature name="android.hardware.sensor.compass" />
    <feature name="android.hardware.sensor.accelerometer" />
    <feature name="android.hardware.touchscreen" />
--    <feature name="android.hardware.microphone" />
    <feature name="android.hardware.screen.portrait" />
    <feature name="android.hardware.screen.landscape" />

frameworks\\native\\data\\etc\\handheld_core_hardware.xml

<permissions>
    <feature name="android.hardware.audio.output" />
--    <feature name="android.hardware.camera" />
    <feature name="android.hardware.location" />
    <feature name="android.hardware.location.network" />
--    <feature name="android.hardware.sensor.compass" />
    <feature name="android.hardware.sensor.accelerometer" />
    <feature name="android.hardware.bluetooth" />
    <feature name="android.hardware.touchscreen" />
--    <feature name="android.hardware.microphone" />
    <feature name="android.hardware.screen.portrait" />
    <feature name="android.hardware.screen.landscape" />

frameworks/native/data/etc/tablet_core_hardware.xml

<permissions>
    <feature name="android.hardware.audio.output" />
    <feature name="android.hardware.location" />
    <feature name="android.hardware.location.network" />
--    <feature name="android.hardware.sensor.compass" />
    <feature name="android.hardware.sensor.accelerometer" />
    <feature name="android.hardware.bluetooth" />
    <feature name="android.hardware.touchscreen" />
    <feature name="android.hardware.touchscreen.multitouch" />
    <feature name="android.hardware.touchscreen.multitouch.distinct" />
--    <feature name="android.hardware.microphone" />
    <feature name="android.hardware.screen.portrait" />
    <feature name="android.hardware.screen.landscape" />

以上是关于Android 6.0 删除无用功能的主要内容,如果未能解决你的问题,请参考以下文章

在居中的自定义视图周围创建边框并删除无用的 LinearLayout?

Android 6.0 删除MTP模式

android 6.0为啥接收不到短信广播

Android 6.0 - 卸载应用程序时删除的外部存储文件

Android M 6.0 - SecurityException 试图删除帐户

Android 8.0 移除无用功能