You can always check out our device organization for reference.
Spark uses spark_device.mk.
If your device supports cellular data, then set this in spark_device.mk:
# Inherit some common Spark stuff. $(call inherit-product, vendor/spark/config/common_full_phone.mk)
If it doesn't, then set this in spark_device.mk:
# Inherit some common Spark stuff. $(call inherit-product, vendor/spark/config/common.mk)
Before starting to build spark make sure tou have these on your device.mk
PRODUCT_BOARD_PLATFORM := Your Board platform // Example sm6150 PRODUCT_USES_QCOM_HARDWARE := true/false
Sample commit here
You can overlay the maximum visible system icons by adding this in overlay/frameworks/base/packages/SystemUI/res/values/config.xml
<integer name="config_maxVisibleStatusIconContainer">Your value </integer> // Default is 7
After lunching your build, you can do this to build GApps with the ROM or add this on your spark_device.mk:
export WITH_GAPPS=true
In order to enable the FOD HAL, you have to set this in overlay/frameworks/base/core/res/res/values/config.xml:
<!-- Shows the required view for in-display fingerprint --> <bool name="config_needCustomFODView>true</bool>
In order to enable fod animations you can do this after lunching your build or adding it in your spark_device.mk
export WITH_FOD_ANIMATIONS=true
In order to enable Screen off FOD support, you have to set this in overlay/packages/apps/Settings/res/values/config.xml:
<!-- Whether device has screen off FOD support --> <bool name="config_supportScreenOffFod">true</bool>
In order to set the default fod pressed color for your device, you have to add this in overlay/frameworks/base/core/res/res/values/config.xml:
<!-- Default fod pressed color --> <integer name="config_fod_pressed_color">Your value </integer> // Default is 1
If you have a Notification led take a look at these overlays you need to set at overlay/frameworks/base/core/res/res/values/config.xml
<!-- Whether device has notification LED --> <bool name="config_hasNotificationLed">true</bool>
<!-- Is the battery LED intrusive? Used to decide if there should be a disable option --> <bool name="config_intrusiveBatteryLed">@bool/config_intrusiveNotificationLed</bool>
<!-- Does the battery LED support multiple colors? Used to decide if the user can change the colors --> <bool name="config_multiColorBatteryLed">false</bool>
<!-- Do the battery/notification LEDs support pulsing? Used to decide if we show pulse settings --> <bool name="config_ledCanPulse">true</bool>
If your device has an AMOLED screen, it is recommended to set this in overlay/frameworks/base/core/res/res/values/config.xml:
<!-- If true, the display will be shifted around in ambient mode. --> <bool name="config_enableBurnInProtection">true</bool>
If clicking on this specific icon makes settings crash you need to enable multiuser support
Follow this commit as reference reference
If your device supports either one of these charging standards, then you should set one of these in overlay/frameworks/base/core/res/res/values/config.xml respectively:
<!-- Whether device has warp charging support --> <bool name="config_hasWarpCharger">true</bool>
<!-- Whether device has dash charging support --> <bool name="config_hasDashCharger">true</bool>
<!-- Whether device has VOOC charging support --> <bool name="config_hasVoocCharger">true</bool>
If you want to enable blur you can add this on your spark_device.mk
TARGET_USES_BLUR := true
If you want to enable face unlock you need to add this to your spark_device.mk
TARGET_FACE_UNLOCK_SUPPORTED := true
If your device has a pop up camera and you want camera to open only on Security view you might also want to set this overlay in overlay/frameworks/base/core/res/res/values/config.xml
<!-- Face unlock --> <bool name="config_faceAuthOnlyOnSecurityView">true</bool>
To mark your build as official, set this in your spark_device.mk:
SPARK_BUILD_TYPE := OFFICIAL
You will also need to add your maintainer name on your dt. All you need to do is add this line on your system.prop or product.prop
ro.spark.maintainer=your maintainer name
Then navigate to vendor/spark/spark.devices add your device codename and make a pull request to github