diff --git a/a30s/BoardConfig.mk b/a30s/BoardConfig.mk new file mode 100644 index 0000000..ce899d8 --- /dev/null +++ b/a30s/BoardConfig.mk @@ -0,0 +1,19 @@ +DEVICE_PATH := device/samsung/a30s + +# Asserts +TARGET_OTA_ASSERT_DEVICE := a30s,a30sdd + +# Kernel +TARGET_KERNEL_CONFIG := exynos7885-a30s_defconfig + +# Display +TARGET_SCREEN_DENSITY := 420 + +# Partitions +BOARD_RECOVERYIMAGE_PARTITION_SIZE := 55574528 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 5158993920 +BOARD_CACHEIMAGE_PARTITION_SIZE := 157286400 +BOARD_VENDORIMAGE_PARTITION_SIZE := 452984832 + +# Inherit common board flags +include device/samsung/universal7885-common/BoardConfigCommon.mk diff --git a/a30s/device.mk b/a30s/device.mk new file mode 100644 index 0000000..c202128 --- /dev/null +++ b/a30s/device.mk @@ -0,0 +1,26 @@ +DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay + +# Inherit common device configuration +$(call inherit-product, device/samsung/universal7885-common/universal7885-common.mk) + +$(call inherit-product, vendor/samsung/a30s/a30s-vendor.mk) + +$(call inherit-product, frameworks/native/build/phone-xhdpi-4096-dalvik-heap.mk) + +# USB +PRODUCT_PACKAGES += \ + android.hardware.usb@1.3-service.samsung + +TARGET_SCREEN_HEIGHT := 2280 +TARGET_SCREEN_WIDTH := 1080 + +# Feature Permissions +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \ + frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml + +PRODUCT_PACKAGES += \ + fstab.exynos7904 + +PRODUCT_PACKAGES += \ + android.hardware.sensors@1.0-service diff --git a/a30s/dtbo/Android.mk b/a30s/dtbo/Android.mk new file mode 100644 index 0000000..e04cb76 --- /dev/null +++ b/a30s/dtbo/Android.mk @@ -0,0 +1,4 @@ +ifeq ($(TARGET_DEVICE),a40) +LOCAL_PATH := $(call my-dir) +$(call add-radio-file,eureka_dtbo.img) +endif diff --git a/a30s/dtbo/eureka_dtbo.img b/a30s/dtbo/eureka_dtbo.img new file mode 100644 index 0000000..ccda4f7 Binary files /dev/null and b/a30s/dtbo/eureka_dtbo.img differ diff --git a/a30s/extract-files.sh b/a30s/extract-files.sh new file mode 100644 index 0000000..db24d0a --- /dev/null +++ b/a30s/extract-files.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copyright (C) 2016 The CyanogenMod Project +# Copyright (C) 2017-2020 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# If we're being sourced by the common script that we called, +# stop right here. No need to go down the rabbit hole. +if [ "${BASH_SOURCE[0]}" != "${0}" ]; then + return +fi + +set -e + +export DEVICE=a30s +export DEVICE_COMMON=universal7885-common +export VENDOR=samsung + +"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@" diff --git a/a30s/full_a30s.mk b/a30s/full_a30s.mk new file mode 100644 index 0000000..bdaef7a --- /dev/null +++ b/a30s/full_a30s.mk @@ -0,0 +1,18 @@ +# Copyright (C) 2018 The LineageOS Project +# SPDX-License-Identifier: Apache-2.0 + +# Inherit from those products. Most specific first. +$(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_p.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) + +# Inherit device configuration +$(call inherit-product, device/samsung/a40/device.mk) + +# Device identifier. This must come after all inclusions +PRODUCT_DEVICE := a30s +PRODUCT_NAME := full_a30s +PRODUCT_MODEL := SM-A307F +PRODUCT_BRAND := samsung +PRODUCT_MANUFACTURER := samsung diff --git a/a30s/overlay/frameworks/base/core/res/res/values/config.xml b/a30s/overlay/frameworks/base/core/res/res/values/config.xml new file mode 100644 index 0000000..30bde11 --- /dev/null +++ b/a30s/overlay/frameworks/base/core/res/res/values/config.xml @@ -0,0 +1,68 @@ + + + + + M 0,0 H -67.42857142857143 V 30.85714285714286 H 67.42857142857143 V 0 H 0 Z @dp + @*android:string/config_mainBuiltInDisplayCutout + + false + true + false + false + true + true + + 200 + + com.samsung.sensor.physical_light + + + 0:2:15 + + + + 4 + + true + + true + + 2 + diff --git a/a30s/overlay/frameworks/base/core/res/res/values/dimens.xml b/a30s/overlay/frameworks/base/core/res/res/values/dimens.xml new file mode 100644 index 0000000..4ccec08 --- /dev/null +++ b/a30s/overlay/frameworks/base/core/res/res/values/dimens.xml @@ -0,0 +1,10 @@ + + + 24.0dip + + 86.0px + + 40px + diff --git a/a30s/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/a30s/overlay/frameworks/base/core/res/res/xml/power_profile.xml new file mode 100644 index 0000000..dd27681 --- /dev/null +++ b/a30s/overlay/frameworks/base/core/res/res/xml/power_profile.xml @@ -0,0 +1,87 @@ + + 0 + 93 + 313 + 118 + 0.98 + 0.43 + 488 + 502 + 45 + 286 + 124 + 662 + 32 + 164 + 115 + + 7.3 + 7.3 + + + 6 + 2 + + + 1586000 + 1482000 + 1352000 + 1248000 + 1144000 + 1014000 + 902000 + 839000 + 757000 + 676000 + 546000 + 449000 + + + 50 + 43 + 34 + 28 + 24 + 18 + 15 + 13 + 11 + 10 + 7 + 6 + + + 1768000 + 1664000 + 1560000 + 1352000 + 1144000 + 936000 + + + 162 + 142 + 120 + 87 + 61 + 41 + + 3.79 + 23 + 3100 + 3100 + 1 + 65 + 265 + + 0 + + 3600 + + .0002 + .002 + .02 + .2 + 2 + + diff --git a/a30s/proprietary-files.txt b/a30s/proprietary-files.txt new file mode 100644 index 0000000..b9dc983 --- /dev/null +++ b/a30s/proprietary-files.txt @@ -0,0 +1,135 @@ +vendor/bin/hw/gpsd +vendor/etc/mixer_gains.xml +vendor/etc/mixer_paths.xml +vendor/etc/wifi/hydra_config.sdb +vendor/etc/wifi/indoorchannel.info +vendor/etc/wifi/mx +vendor/etc/wifi/mx140/debug/common/log-strings.bin +vendor/etc/wifi/mx140/debug/hardware/moredump/bt_registers.xml +vendor/etc/wifi/mx140/debug/hardware/moredump/cortexM4.xml +vendor/etc/wifi/mx140/debug/hardware/moredump/cortexR4.xml +vendor/etc/wifi/mx140/debug/hardware/moredump/mailbox16.xml +vendor/etc/wifi/mx140/debug/hardware/moredump/mailbox4.xml +vendor/etc/wifi/mx140/debug/hardware/moredump/mailbox8.xml +vendor/etc/wifi/mx140/debug/hardware/moredump/moredump.bin +vendor/etc/wifi/mx140/debug/hardware/moredump/moredump.xml +vendor/etc/wifi/mx140/debug/hardware/moredump/pl192vic.xml +vendor/etc/wifi/mx140/debug/hardware/moredump/rf_chip_registers.xml +vendor/etc/wifi/mx140/debug/hardware/moredump/wlan_sys_registers.xml +vendor/etc/wifi/mx140/debug/wlan/hip_signals.xml +vendor/etc/wifi/mx140/debug/wlan/hydra_config.sdb +vendor/etc/wifi/mx140/debug/wlan/id.txt +vendor/etc/wifi/mx140/debug/wlan/mib_out.xml +vendor/etc/wifi/mx140/debug/wlan/symbols.dbg +vendor/etc/wifi/mx140/debug/wlan/unicli.dbg +vendor/etc/wifi/mx140/debug/wlan/unitab.dbg +vendor/etc/wifi/mx140/debug/wlan/univif.dbg +vendor/etc/wifi/mx140/debug/wlan/xide_mib.dbg +vendor/etc/wifi/mx140.bin +vendor/etc/wifi/mx140_bt.hcf +vendor/etc/wifi/mx140_t/debug/common/log-strings.bin +vendor/etc/wifi/mx140_t/debug/hardware/moredump/bt_registers.xml +vendor/etc/wifi/mx140_t/debug/hardware/moredump/cortexM4.xml +vendor/etc/wifi/mx140_t/debug/hardware/moredump/cortexR4.xml +vendor/etc/wifi/mx140_t/debug/hardware/moredump/mailbox16.xml +vendor/etc/wifi/mx140_t/debug/hardware/moredump/mailbox4.xml +vendor/etc/wifi/mx140_t/debug/hardware/moredump/mailbox8.xml +vendor/etc/wifi/mx140_t/debug/hardware/moredump/moredump.bin +vendor/etc/wifi/mx140_t/debug/hardware/moredump/moredump.xml +vendor/etc/wifi/mx140_t/debug/hardware/moredump/pl192vic.xml +vendor/etc/wifi/mx140_t/debug/hardware/moredump/rf_chip_registers.xml +vendor/etc/wifi/mx140_t/debug/hardware/moredump/wlan_sys_registers.xml +vendor/etc/wifi/mx140_t/debug/wlan/hip_signals.xml +vendor/etc/wifi/mx140_t/debug/wlan/hydra_config.sdb +vendor/etc/wifi/mx140_t/debug/wlan/id.txt +vendor/etc/wifi/mx140_t/debug/wlan/mib_out.xml +vendor/etc/wifi/mx140_t/debug/wlan/symbols.dbg +vendor/etc/wifi/mx140_t/debug/wlan/unicli.dbg +vendor/etc/wifi/mx140_t/debug/wlan/unitab.dbg +vendor/etc/wifi/mx140_t/debug/wlan/univif.dbg +vendor/etc/wifi/mx140_t/debug/wlan/xide_mib.dbg +vendor/etc/wifi/mx140_t.bin +vendor/etc/wifi/mx140_t_wlan.hcf +vendor/etc/wifi/mx140_t_wlan_t.hcf +vendor/etc/wifi/mx140_wlan.hcf +vendor/etc/wifi/mx140_wlan_t.hcf +vendor/etc/wifi/p2p_supplicant_overlay.conf +vendor/etc/wifi/platform.txt +vendor/etc/wifi/wpa_supplicant.conf +vendor/etc/wifi/wpa_supplicant_overlay.conf +vendor/etc/yas_set.cfg +vendor/firmware/dax_param.bin +vendor/firmware/dual_cal_wide_sub.bin +vendor/firmware/fimc_is_lib.bin +vendor/firmware/fimc_is_rta.bin +vendor/firmware/mfc_fw.bin +vendor/firmware/setfile_4ha.bin +vendor/firmware/setfile_gc5035.bin +vendor/firmware/setfile_hi1631.bin +vendor/firmware/setfile_imx576.bin +vendor/lib/hw/audio.primary.exynos7904.so +vendor/lib/hw/camera.exynos7904.so +vendor/lib/hw/gatekeeper.exynos7904.so +vendor/lib/hw/hwcomposer.exynos7904.so +vendor/lib/hw/memtrack.exynos7904.so +vendor/lib/hw/sensors.universal7904.so +vendor/lib/hw/thermal.universal7904.so +vendor/lib/libaudio-ril.so +vendor/lib/libaudio_soundtrigger.so +vendor/lib/libegis_fp_normal_sensor_test.so +vendor/lib/libexynoscamera3.so +vendor/lib/libexynosdisplay.so +vendor/lib/libexynosgraphicbuffer.so +vendor/lib/libexynosgraphicbuffer_public.so +vendor/lib/libExynosHWCService.so +vendor/lib/libexynosscaler.so +vendor/lib/libexynosutils.so +vendor/lib/libexynosv4l2.so +vendor/lib/libgiantmscl.so +vendor/lib/libhwjpeg.so +vendor/lib/libmpbase.so +vendor/lib/libOpenCv.camera.samsung.so +vendor/lib/librecordalive.so +vendor/lib/libsamsungDiamondVoice.so +vendor/lib/libSEF.quram.so +vendor/lib/libsensorlistener.so +vendor/lib/libskhynix_q2b_shared.so +vendor/lib/libuniapi.so +vendor/lib/libuniplugin.so +vendor/lib/libvideobeauty.arcsoft.so +vendor/lib/libvideobeauty_interface.so +vendor/lib/libwrappergps.so +vendor/lib/libyasalgo.so +vendor/lib/soundfx/libswdap.so +vendor/lib/vndk/libaudioroute.so +vendor/lib64/hw/camera.exynos7904.so +vendor/lib64/hw/gatekeeper.exynos7904.so +vendor/lib64/hw/gralloc.exynos7904.so +vendor/lib64/hw/hwcomposer.exynos7904.so +vendor/lib64/hw/memtrack.exynos7904.so +vendor/lib64/hw/sensors.universal7904.so +vendor/lib64/hw/thermal.universal7904.so +vendor/lib64/libegis_fp_normal_sensor_test.so +vendor/lib64/libengmode_client.so +vendor/lib64/libexynoscamera3.so +vendor/lib64/libexynosdisplay.so +vendor/lib64/libexynosgraphicbuffer.so +vendor/lib64/libexynosgscaler.so +vendor/lib64/libExynosHWCService.so +vendor/lib64/libexynosscaler.so +vendor/lib64/libexynosutils.so +vendor/lib64/libexynosv4l2.so +vendor/lib64/libgiantmscl.so +vendor/lib64/libhwjpeg.so +vendor/lib64/libmpbase.so +vendor/lib64/libSEF.quram.so +vendor/lib64/libsensorlistener.so +vendor/lib64/libskhynix_q2b_shared.so +vendor/lib64/libuniapi.so +vendor/lib64/libuniplugin.so +vendor/lib64/libvideobeauty.arcsoft.so +vendor/lib64/libvideobeauty_interface.so +vendor/lib64/libwrappergps.so +vendor/lib64/libyasalgo.so +vendor/lib64/soundfx/libaudioroute.so +vendor/lib64/soundfx/libswdap.so diff --git a/a30s/setup-makefiles.sh b/a30s/setup-makefiles.sh new file mode 100644 index 0000000..f5eeae7 --- /dev/null +++ b/a30s/setup-makefiles.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Copyright (C) 2016 The CyanogenMod Project +# Copyright (C) 2017-2020 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -e + +# Required! +export DEVICE=a30s +export DEVICE_COMMON=universal7885-common +export VENDOR=samsung + +"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@" diff --git a/a30s/setup.sh b/a30s/setup.sh new file mode 100644 index 0000000..a8768ff --- /dev/null +++ b/a30s/setup.sh @@ -0,0 +1,22 @@ +VENDOR=$(cat device/samsung/universal7885-common/vendor_name) +if [ ! $VENDOR ]; then +VENDOR=aosp; +fi +# Generate AndroidProducts.mk +echo "# Auto-Generated by device/samsung/a30s/setup.sh" > device/samsung/a30s/AndroidProducts.mk +echo "PRODUCT_MAKEFILES += \$(LOCAL_DIR)/"$VENDOR"_a30s.mk" >> device/samsung/a30s/AndroidProducts.mk + +# Generate _a30s.mk +echo "# Auto-Generated by device/samsung/a30s/setup.sh" > device/samsung/a30s/"$VENDOR"_a30s.mk +echo "\$(call inherit-product, device/samsung/a30s/full_a30s.mk)" >> device/samsung/a30s/"$VENDOR"_a30s.mk +if test -f vendor/"$VENDOR"/config/common_full_phone.mk && echo "common_full_phone"; then + echo "\$(call inherit-product, vendor/"$VENDOR"/config/common_full_phone.mk)" >> device/samsung/a30s/"$VENDOR"_a30s.mk +elif test -f vendor/"$VENDOR"/config/common.mk && echo "common"; then + echo "\$(call inherit-product, vendor/"$VENDOR"/config/common.mk)" >> device/samsung/a30s/"$VENDOR"_a30s.mk +fi +echo "PRODUCT_NAME := "$VENDOR"_a30s" >> device/samsung/a30s/"$VENDOR"_a30s.mk +echo "" >> device/samsung/a30s/"$VENDOR"_a30s.mk +echo "# Additional Props" >> device/samsung/a30s/"$VENDOR"_a30s.mk +echo "TARGET_FACE_UNLOCK_SUPPORTED := true" >> device/samsung/a30s/"$VENDOR"_a30s.mk +echo "TARGET_BOOT_ANIMATION_RES := 1080" >> device/samsung/a30s/"$VENDOR"_a30s.mk +