Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gohilbhagirath90/2d696b23d59905f321d5 to your computer and use it in GitHub Desktop.
Save gohilbhagirath90/2d696b23d59905f321d5 to your computer and use it in GitHub Desktop.
Remove hardware & software fetures from aosp android
For Remove Hardware features check following files in android source :
1. Check the device.mk file for your device(Like : device/<vendor>/<device>.mk)
2. Check the common.mk file for your device(Like : device/<vendor>/common/common.mk)
There both files is probably a line like the following:
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
Remove this line to make sure that the GPS permission file is not copied into the filesystem. For an existing filesystem, delete this file from the /system/etc/permissions directory and reboot.
Similar lines are to be removed to disable Bluetooth, Wi-Fi/Wi-Fi Direct etc.
3. also in android source for all handheld device have file permission files & software system features
/frameworks/native/data/etc/handheld_core_hardware.xml
comment line which feature not requied in device.
Also For Add/Remove Device specific support
Following file check :
devices/<vendor>/<device>/..
devices/<vendor>/<device>/BoardConfig.mk
devices/<vendor>/<device>/<device>.mk
devices/<vendor>/common/rootdir/etc/init.<device>.rc
=========================================================
Check Features in android devices :
adb shell
ls /system/etc/permissions/
To get list of features available in android device
pm list features
To get list of packages install in android devices
pm list packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment