From 1cbdf550d8459920569610d03d771791beafe2b0 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 17 Dec 2017 17:46:37 +0100 Subject: [PATCH] Initial commit --- .gitignore | 1 + AndroidProducts.mk | 2 ++ base.mk | 13 +++++++++++++ gapps.mk | 12 ++++++++++++ .../base/core/res/res/values/config.xml | 16 ++++++++++++++++ sepolicy/hardware_overlay.te | 1 + sepolicy/init.te | 2 ++ system.prop | 1 + treble_arm64_ag.mk | 15 +++++++++++++++ 9 files changed, 63 insertions(+) create mode 100644 .gitignore create mode 100644 AndroidProducts.mk create mode 100644 base.mk create mode 100644 gapps.mk create mode 100644 overlay/frameworks/base/core/res/res/values/config.xml create mode 100644 sepolicy/hardware_overlay.te create mode 100644 sepolicy/init.te create mode 100644 system.prop create mode 100644 treble_arm64_ag.mk diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a01ee28 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.*.swp diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..c203ac5 --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,2 @@ +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/treble_arm64_ag.mk diff --git a/base.mk b/base.mk new file mode 100644 index 0000000..5bbadf6 --- /dev/null +++ b/base.mk @@ -0,0 +1,13 @@ +#Huawei devices don't declare fingerprint hardware feature +#TODO: Proper detection +PRODUCT_COPY_FILES := \ + frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc/permissions/android.hardware.fingerprint.xml + +#Use a more decent APN config +PRODUCT_COPY_FILES := \ + device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml + +BOARD_PLAT_PRIVATE_SEPOLICY_DIR += device/phh/treble/sepolicy +DEVICE_PACKAGE_OVERLAYS += device/phh/treble/overlay + +$(call inherit-product, vendor/hardware_overlay/overlay.mk) diff --git a/gapps.mk b/gapps.mk new file mode 100644 index 0000000..9510178 --- /dev/null +++ b/gapps.mk @@ -0,0 +1,12 @@ +GAPPS_VARIANT := nano +GAPPS_FORCE_PACKAGE_OVERRIDES := true +PRODUCT_PACKAGES += \ + Chrome \ + CalculatorGoogle \ + PrebuiltDeskClockGoogle \ + CalendarGooglePrebuilt \ + GoogleHome \ + LatinImeGoogle \ + phh-overrides + +$(call inherit-product, vendor/opengapps/build/opengapps-packages.mk) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml new file mode 100644 index 0000000..a333491 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -0,0 +1,16 @@ + + + + "usb\\d" + "rndis\\d" + + + + "wlan0" + "softap.*" + + + + "bt-pan" + + diff --git a/sepolicy/hardware_overlay.te b/sepolicy/hardware_overlay.te new file mode 100644 index 0000000..d3bb487 --- /dev/null +++ b/sepolicy/hardware_overlay.te @@ -0,0 +1 @@ +allow priv_app overlay_service:service_manager find; diff --git a/sepolicy/init.te b/sepolicy/init.te new file mode 100644 index 0000000..a8a25cc --- /dev/null +++ b/sepolicy/init.te @@ -0,0 +1,2 @@ +#This is in Android 8.0, but not 8.1 +domain_trans(init, rootfs, adbd) diff --git a/system.prop b/system.prop new file mode 100644 index 0000000..9ea0ae0 --- /dev/null +++ b/system.prop @@ -0,0 +1 @@ +ro.adb.secure=0 diff --git a/treble_arm64_ag.mk b/treble_arm64_ag.mk new file mode 100644 index 0000000..b1dcd3c --- /dev/null +++ b/treble_arm64_ag.mk @@ -0,0 +1,15 @@ +include build/make/target/product/treble_common.mk + +#Need to be called first to be able to override later rules, +#but after treble_common which would override PRODUCT_PACKAGES +$(call inherit-product, device/phh/treble/base.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) + +$(call inherit-product, vendor/hardware_overlay/overlay.mk) +$(call inherit-product, device/phh/treble/gapps.mk) + +PRODUCT_NAME := treble_arm64_ag +PRODUCT_DEVICE := generic_arm64_a +PRODUCT_BRAND := Android +PRODUCT_MODEL := Phh-Treble