ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上

2015年12月31日 星期四

system service feature enable/disable in android 5

ethernet service:
./services/java/com/android/server/SystemServer.java:674:                if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_ETHERNET)) {


    private void startOtherServices() {
        ...
        ...
                if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_ETHERNET)) {
                    mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);
                }
茶一下 FEATURE_ETHERNET...
./core/java/android/content/pm/PackageManager.java:1570:    public static final String FEATURE_ETHERNET = "android.hardware.ethernet";
這個: android.hardware.ethernet 是在:
frameworks/native/data/etc/android.hardware.ethernet.xml:

<permissions>
    <feature name="android.hardware.ethernet" />
</permissions>


這個 file 是被copy ...
device/fsl/imx6/sabreauto_6q.mk:

PRODUCT_COPY_FILES += \
        frameworks/native/data/etc/android.hardware.audio.output.xml:system/etc/permissions/android.hardware.audio.output.xml \
        frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \
        ....
        ...
        frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \
把這行刪掉以後,ethernet service 就不會起來了。

沒有留言:

標籤

網誌存檔