Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lineage 15.1 treble #3

Open
wants to merge 37 commits into
base: staging/15.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a0c7e11
alice: Drop a useless file
DarkJoker360 May 6, 2021
d9f0f57
alice: init: Dinamically set product model
DarkJoker360 May 6, 2021
d70a4bf
alice: Add back modem handling
DarkJoker360 May 3, 2021
cb23ba9
Add treble
muhammad23012009 Jun 17, 2021
9d77a81
Added treble for booting pie
muhammad23012009 Jun 17, 2021
d53cc4d
Change libs to go into vendor
muhammad23012009 Jun 17, 2021
c660c78
Add VNDK
muhammad23012009 Jun 19, 2021
3b1cfda
Add more manifest options
muhammad23012009 Jun 19, 2021
443b36d
Add vendor file types
muhammad23012009 Jun 19, 2021
f611c37
Add more vendor file types
muhammad23012009 Jun 19, 2021
c8bcb16
alice: Fix syntax errors
masemoel Jun 19, 2021
6f3515c
alice: Add SELINUX_IGNORE_NEVERALLOWS flag
masemoel Jun 19, 2021
a8bcff2
Update hi110x_daemon.te
muhammad23012009 Jun 19, 2021
2222d10
Update hw_ueventd.te
muhammad23012009 Jun 19, 2021
432803c
Update lmk_config.te
muhammad23012009 Jun 19, 2021
394971f
Update logserver.te
muhammad23012009 Jun 19, 2021
0a37d36
Update mac_addr_normalization.te
muhammad23012009 Jun 19, 2021
33f6492
Update oeminfo_nvm.te
muhammad23012009 Jun 19, 2021
a510a10
Update teecd.te
muhammad23012009 Jun 19, 2021
15bc565
Update thermal-daemon.te
muhammad23012009 Jun 19, 2021
77d60b1
Remove keymaster
muhammad23012009 Jun 19, 2021
c99c33a
alice: Remove conflictive audioservice denial
masemoel Jun 19, 2021
133aafb
alice: Binderize Keymaster HALs
muhammad23012009 Jun 20, 2021
b87a3fc
alice: Fix syntax issue
muhammad23012009 Jun 20, 2021
1d460f4
alice: Binderize Gatekeeper HALs
muhammad23012009 Jun 20, 2021
f5a32ac
alice: Enable Keymaster and add Gatekeeper
muhammad23012009 Jun 20, 2021
c958e75
alice: Add OMX HALs
muhammad23012009 Jul 16, 2021
e4360e3
alice: Add /vendor config
muhammad23012009 Jul 16, 2021
696e2b9
alice: Change /system/vendor paths to /vendor
muhammad23012009 Jul 16, 2021
70e374c
alice: Fix more /system/vendor paths
muhammad23012009 Jul 16, 2021
f85e260
alice: Add DRM service
muhammad23012009 Jul 16, 2021
50de3ce
alice: Fix syntax error in manifest.xml
masemoel Jul 30, 2021
1a966f0
alice: Fix OMX hal errors
masemoel Jul 30, 2021
0796ad5
Create fstab.hi6210sft
muhammad23012009 Aug 18, 2021
26a4afe
alice: Build libbt-vendor
muhammad23012009 Aug 19, 2021
3755fa2
Enable TARGET_USES_MEDIA_EXTENSIONS
muhammad23012009 Aug 19, 2021
5ebb24d
Vendor fixes
muhammad23012009 Sep 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ TARGET_USES_64_BIT_BINDER := true
TARGET_IS_64_BIT := true
TARGET_SUPPORTS_32_BIT_APPS := true
TARGET_SUPPORTS_64_BIT_APPS := true
TARGET_USES_MEDIA_EXTENSIONS := true

TARGET_BOARD_PLATFORM := hi6210sft
BOARD_VENDOR_PLATFORM := hi6210sft
Expand All @@ -51,6 +52,7 @@ TARGET_NO_RADIOIMAGE := true
BOARD_HAVE_BLUETOOTH := true
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth


# Bootanimation
TARGET_BOOTANIMATION_PRELOAD := true
TARGET_BOOTANIMATION_TEXTURE_CACHE := true
Expand Down Expand Up @@ -120,6 +122,7 @@ BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2684354560
BOARD_USERDATAIMAGE_PARTITION_SIZE := 11605639168
BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
BOARD_VENDORIMAGE_PARTITION_SIZE := 504287001
BOARD_FLASH_BLOCK_SIZE := 131072

# Properties
Expand All @@ -144,11 +147,28 @@ CONFIG_DRIVER_NL80211 := y
TARGET_INIT_VENDOR_LIB := libinit_hi6210sft

# Sepolicy
SELINUX_IGNORE_NEVERALLOWS := true
BOARD_PLAT_PRIVATE_SEPOLICY_DIR += \
device/huawei/alice/sepolicy

# Shims
TARGET_LD_SHIM_LIBS := /system/lib/libcutils.so|libshim_log.so:/system/lib64/libcutils.so|libshim_log.so:/system/lib/libhuaweiprocessing.so|libshim_icu.so:/system/lib/libcamera_core.so|libshim_camera.so:/system/lib/hw/audio.primary.hi6210sft.so|libshim_audioroute.so:/system/lib/hw/audio.primary.hi6210sft.so|libshim_icu.so:/system/lib64/libril.so|libshim_icu.so:/system/lib/libcamera_post_mediaserver.so|libshim_camera.so:/system/lib/libFNVfbEngineLib.so|libshim_gui.so:/system/lib/libcamera_core.so|libshim_gui.so
TARGET_LD_SHIM_LIBS := /vendor/lib/libcutils.so|libshim_log.so:/vendor/lib64/libcutils.so|libshim_log.so:/vendor/lib/libhuaweiprocessing.so|libshim_icu.so:/vendor/lib/libcamera_core.so|libshim_camera.so:/vendor/lib/hw/audio.primary.hi6210sft.so|libshim_audioroute.so:/vendor/lib/hw/audio.primary.hi6210sft.so|libshim_icu.so:/vendor/lib64/libril.so|libshim_icu.so:/vendor/lib/libcamera_post_mediaserver.so|libshim_camera.so:/vendor/lib/libFNVfbEngineLib.so|libshim_gui.so:/vendor/lib/libcamera_core.so|libshim_gui.so

# VNDK
# PRODUCT_USE_VNDK_OVERRIDE := false
BOARD_VNDK_VERSION := current
BOARD_VNDK_RUNTIME_DISABLE := true

BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
PRODUCT_FULL_TREBLE_OVERRIDE := true
TARGET_COPY_OUT_VENDOR := vendor
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
ENABLE_VENDOR_IMAGE := true

# DRM
PRODUCT_PACKAGES += \
[email protected] \
[email protected]

# inherit from the proprietary version
-include vendor/huawei/alice/BoardConfigVendor.mk
19 changes: 14 additions & 5 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,15 @@ PRODUCT_PROPERTY_OVERRIDES += \
persist.media.treble_omx=false

# Keymaster
PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
[email protected] \
[email protected]

# Gatekeeper
PRODUCT_PACKAGES += \
[email protected] \
[email protected]

# USB
PRODUCT_PACKAGES += \
[email protected]
Expand Down Expand Up @@ -239,10 +244,10 @@ PRODUCT_PACKAGES += \

PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.magic.api.version=0.1 \
persist.sys.usb.config=mtp \
ro.secure=0 \
persist.sys.usb.config=mtp,adb \
ro.secure=1 \
security.perf_harden=0 \
ro.adb.secure=0
ro.adb.secure=1

PRODUCT_PACKAGES += \
busybox \
Expand All @@ -255,8 +260,12 @@ PRODUCT_PACKAGES += \
libtinyxml \
libxml2

# VNDK
PRODUCT_PACKAGES += \
vndk-sp
libstdc++.vendor \
vndk_package \
vndk-sp \
libbt-vendor

# TextClassifier smart selection model files
PRODUCT_PACKAGES += \
Expand Down
5,157 changes: 5,147 additions & 10 deletions init/init_alice.cpp

Large diffs are not rendered by default.

Binary file removed init/init_alice.zip
Binary file not shown.
42 changes: 41 additions & 1 deletion manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<hal format="hidl">
<name>android.hardware.graphics.composer</name>
<transport arch="32+64">passthrough</transport>
<version>2.1</version>
<interface>
<name>IComposer</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.bluetooth</name>
<transport>hwbinder</transport>
<version>1.0</version>
Expand All @@ -26,6 +35,24 @@
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.keymaster</name>
<transport>hwbinder</transport>
<version>3.0</version>
<interface>
<name>IKeymasterDevice</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.gatekeeper</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IGatekeeper</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.camera.provider</name>
<transport>hwbinder</transport>
Expand Down Expand Up @@ -67,6 +94,19 @@
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.media.omx</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IOmx</name>
<instance>default</instance>
</interface>
<interface>
<name>IOmxStore</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.gnss</name>
<transport>hwbinder</transport>
Expand Down
48 changes: 24 additions & 24 deletions rootdir/etc/init.hi6210sft.rc
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ on early-init
mount debugfs /sys/kernel/debug /sys/kernel/debug mode=0755

on init
mkdir /cust
mkdir /3rdmodem
mkdir /3rdmodemnvm
mkdir /3rdmodemnvmbkp
mkdir /sec_storage
mkdir /vendor
mkdir /splash2
mkdir /modem_log 0771 system system
mkdir /mnvm2:0
Expand Down Expand Up @@ -729,7 +729,7 @@ service charger /charger
critical
seclabel u:r:charger:s0

service ril-daemon /system/vendor/bin/hw/rild
service ril-daemon /vendor/bin/hw/rild
class late_start
socket rild stream 660 root radio
socket rildm2 stream 660 root radio
Expand All @@ -743,7 +743,7 @@ service ril-daemon /system/vendor/bin/hw/rild
group radio cache inet misc audio log readproc wakelock net_raw
capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW

service ril-daemon1 /system/vendor/bin/hw/rild -c 1
service ril-daemon1 /vendor/bin/hw/rild -c 1
class late_start
socket rilds2 stream 660 root radio
socket rild-debug1 stream 660 radio system
Expand All @@ -762,31 +762,31 @@ on property:rild.rild1_ready_to_start=false
on property:ro.hardware.alter=*
write /proc/sys/kernel/hardware_alter ${ro.hardware.alter}

service hi110x_ecpt /system/vendor/bin/hi110x_except_logd -wbg -p /data/hwlogdir/exception/ -n 30 -c
service hi110x_ecpt /vendor/bin/hi110x_except_logd -wbg -p /data/hwlogdir/exception/ -n 30 -c
class late_start
user system
group system root
seclabel u:r:hi110x_daemon:s0
disabled
writepid /dev/cpuset/system-background/tasks

service hi110x_logd /system/vendor/bin/hi110x_logd
service hi110x_logd /vendor/bin/hi110x_logd
class late_start
user system
group system root media_rw
seclabel u:r:hi110x_daemon:s0
disabled
writepid /dev/cpuset/system-background/tasks

service octty /system/vendor/bin/octty
service octty /vendor/bin/octty
class late_start
user system
group system bluetooth root media
seclabel u:r:hi110x_daemon:s0
disabled
writepid /dev/cpuset/system-background/tasks

service oam_app /system/vendor/bin/oam_app
service oam_app /vendor/bin/oam_app
class late_start
user system
group system root wifi bluetooth
Expand All @@ -795,15 +795,15 @@ service oam_app /system/vendor/bin/oam_app
oneshot
writepid /dev/cpuset/system-background/tasks

service hisi_bfg /system/vendor/bin/start_connectivity_hisi
service hisi_bfg /vendor/bin/start_connectivity_hisi
class late_start
user root
group system
oneshot
seclabel u:r:hi110x_daemon:s0
writepid /dev/cpuset/system-background/tasks

service watchlssd /system/vendor/xbin/gnss_watchlssd_thirdparty
service watchlssd /vendor/xbin/gnss_watchlssd_thirdparty
class late_start
user system
group system inet net_raw
Expand All @@ -824,9 +824,9 @@ on property:setup_hi110x_modules=success
start hi110x_logd
start hi110x_ecpt

service p2p_supplicant /system/vendor/bin/hw/wpa_supplicant -d \
service p2p_supplicant /vendor/bin/hw/wpa_supplicant -d \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-I/system/vendor/etc/wifi/wpa_supplicant_overlay.conf \
-I/vendor/etc/wifi/wpa_supplicant_overlay.conf \
-m/data/misc/wifi/p2p_supplicant.conf \
-O/data/misc/wifi/sockets \
-puse_p2p_group_interface=1p2p_device=1 \
Expand All @@ -836,63 +836,63 @@ service p2p_supplicant /system/vendor/bin/hw/wpa_supplicant -d \
disabled
oneshot

service wpa_supplicant /system/vendor/bin/hw/wpa_supplicant -d \
service wpa_supplicant /vendor/bin/hw/wpa_supplicant -d \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-I/system/vendor/etc/wifi/wpa_supplicant_overlay.conf \
-I/vendor/etc/wifi/wpa_supplicant_overlay.conf \
-O/data/misc/wifi/sockets \
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot

service macaddr /system/vendor/bin/mac_addr_normalization
service macaddr /vendor/bin/mac_addr_normalization
class late_start
user root
group root bluetooth bluetooth wifi
seclabel u:r:mac_addr_normalization:s0
oneshot
writepid /dev/cpuset/system-background/tasks

service hsgnss /system/vendor/bin/gnss_engine -normal
service hsgnss /vendor/bin/gnss_engine -normal
class late_start
user system
group system inet root wakelock
seclabel u:r:hi110x_daemon:s0
disabled
writepid /dev/cpuset/system-background/tasks

service agnsscontrol /system/vendor/bin/agnsscontrol -normal
service agnsscontrol /vendor/bin/agnsscontrol -normal
class late_start
user system
group system inet root wakelock
seclabel u:r:hi110x_daemon:s0
disabled
writepid /dev/cpuset/system-background/tasks

service supl20clientd /system/vendor/bin/gnss_supl20clientd_hisi
service supl20clientd /vendor/bin/gnss_supl20clientd_hisi
class main
user system
group system inet
seclabel u:r:hi110x_daemon:s0
disabled
writepid /dev/cpuset/system-background/tasks

service agnsslog /system/vendor/bin/agnsslog
service agnsslog /vendor/bin/agnsslog
class late_start
user system
group system inet root wakelock
seclabel u:r:hi110x_daemon:s0
disabled
writepid /dev/cpuset/system-background/tasks

service atcmdserver /system/vendor/bin/atcmdserver
service atcmdserver /vendor/bin/atcmdserver
class main
seclabel u:r:atcmdserver:s0
disabled
writepid /dev/cpuset/system-background/tasks

service diagserver /system/vendor/bin/diagserver
service diagserver /vendor/bin/diagserver
class main
user root
seclabel u:r:diagserver:s0
Expand Down Expand Up @@ -945,15 +945,15 @@ on data_not_ready
setprop sys.userdata_is_ready 0
write /proc/post-fs-data 0

service logserver /system/vendor/bin/logserver
service logserver /vendor/bin/logserver
class late_start
user root
group system
seclabel u:r:logserver:s0
oneshot
writepid /dev/cpuset/system-background/tasks

service thermal-daemon /system/vendor/bin/thermal-daemon
service thermal-daemon /vendor/bin/thermal-daemon
class main
user system
group system
Expand All @@ -973,7 +973,7 @@ on property:bluetooth.log.file.create=true
setprop bluetooth.log.file.create false
chown bluetooth bluetooth /dev/hwbt

service lmk_config /system/bin/sh /system/vendor/bin/lmk_config.sh
service lmk_config /system/bin/sh /vendor/bin/lmk_config.sh
class late_start
user root
group system shell
Expand All @@ -984,7 +984,7 @@ service lmk_config /system/bin/sh /system/vendor/bin/lmk_config.sh
on property:sys.boot_completed=1
start lmk_config

service nfc_hal_ext_service /system//vendor/bin/hw/[email protected]
service nfc_hal_ext_service /vendor/bin/hw/[email protected]
class hal
user nfc
group nfc
Expand Down
2 changes: 1 addition & 1 deletion rootdir/fstab.hi6210sft
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/dev/block/mmcblk0p40 /data ext4 nosuid,nodev,noatime,user_xattr,acl,barrier=1,data=ordered,noauto_da_alloc,mblk_io_submit wait,check,formattable,encryptable=footer,length=-16384
/dev/block/mmcblk0p34 /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,data=ordered wait,check,formattable

/dev/block/mmcblk0p39 /cust ext4 ro,nosuid,nodev,noatime wait,check
/dev/block/mmcblk0p39 /vendor ext4 ro,nosuid,nodev,noatime wait,check
/dev/block/mmcblk0p12 /mnvm3:0 ext4 rw,nosuid,nodev,noatime,noauto_da_alloc,data=ordered,user_xattr,barrier=1 wait,check
/dev/block/mmcblk0p17 /modem_log ext4 rw,nosuid,nodev,noatime,noauto_da_alloc,data=ordered,user_xattr,barrier=1 wait,check
/dev/block/mmcblk0p11 /mnvm2:0 ext4 rw,nosuid,nodev,noatime,data=ordered wait,check
Expand Down
4 changes: 2 additions & 2 deletions sepolicy/atcmdserver.te
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# atcmdserver daemon
type atcmdserver, domain;
type atcmdserver_exec, exec_type, file_type;
type atcmdserver_exec, exec_type, file_type, vendor_file_type;

# Started by init
init_daemon_domain(atcmdserver)
init_daemon_domain(atcmdserver);
1 change: 0 additions & 1 deletion sepolicy/audioserver.te

This file was deleted.

2 changes: 1 addition & 1 deletion sepolicy/diagserver.te
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# diagserver daemon
type diagserver, domain;
type diagserver_exec, exec_type, file_type;
type diagserver_exec, exec_type, file_type, vendor_file_type;

# Started by init
init_daemon_domain(diagserver)
Loading