PixelOS-AOSP / official_devices

50 stars 58 forks source link

New maintainer #353

Closed Rasenkai closed 7 months ago

Rasenkai commented 7 months ago

Name and Codename of the device you want to apply for

Xiaomi 12 Pro (zeus)

Device Tree sources

https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/tree/14
https://github.com/zeus-sm8450/android_device_xiaomi_zeus
https://github.com/zeus-sm8450/android_kernel_xiaomi_sm8450/tree/14
https://github.com/zeus-sm8450/android_kernel_xiaomi_sm8450-modules
https://gitlab.com/Rasenkai/vendor_xiaomi_sm8450-common/-/tree/14
https://gitlab.com/Rasenkai/vendor_xiaomi_zeus/-/tree/lineage-20

What ROM's do you maintain officially/unofficially

PixelOS

How long have you been building Custom ROMs

6 years

Any Exceptions/special concern?

No

List of changes/patches applied to source, if any

https://github.com/omnirom/android_external_wpa_supplicant_8/commit/0cf37cc42e2c1031ee20621d7f45f726a3e90414

https://review.lineageos.org/c/LineageOS/android_vendor_lineage/+/367044

Contact

Telegram username

ThomasDada

Link to your XDA thread of unofficial build

https://xdaforums.com/t/rom-14-unofficial-pixelos-aosp-stable.4658145/

Link to your unofficial PixelOS Build Post other than XDA

t.me/RequiemKernelX2
cyberknight777 commented 7 months ago

Hello there! There are certain discrepancies we would want you to resolve.

To begin with, there are some SEPolicy changes that you should rework/drop:

This commit (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/commit/4d9aee4fd7dcd95bb85b01ce7a786d736244ecfe) seems to allow far too many selinux rules in which case some of them are very skeptical of the relevance to MIUI Camera. There is a high possibility that you have a similar log as this commit (https://github.com/PixelExperience-Devices/device_xiaomi_sweet/commit/34a8efd044bd68f07ebaed320c91db4f8508d03e) essentially meaning that those rules are purely redundant. Please note that "avc: granted { read } ".

This commit (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/commit/fee023a0764413df6b668d0dbdd85c77ed3b2589) is redundant as /dev/ashmem has been deprecated since R. Any SELinux rules specifically for ashmem should be dropped.

This commit should be reworked to label specific sysfs tcontext.

These commits [1] (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/commit/a4326ef5f1f82073dbc52b21773a6c752a1c827d) [2] (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/commit/2412a22a8e68d9ff3fffba31e39adc0f521e0bd4#diff-9d51c8ef199421ccb9b7183c69921b26c9567d1dae9d37902e17e58c444ed53a) and [3] (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/commit/87d92a17e7c72e7f4f3e50f5817ce2ed2fd8846c#diff-7424a05b670bf6ef7c0ef943ad77e034572622261c4422654e9fde4f8830203eR34) are duplicates as they are defined in common sepolicy.

Perhaps you could move the entirety of these MIUICamera SELinux rules in this commit (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/commit/bcd3ee9f11ac42768a82b06bb2b634b5cccd9842) to the MIUICamera repository and you should check if you have to label rules as priv_app:fd *

Moving on to duplicates:

You should amend this commit (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/commit/0623a75826db6f8915d38ea835118e42ccd85c07) to remove gEnablePowerSaveOffload as it has been dropped as per the commit description.

This overlay (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/tree/14/overlay-aosp/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values) is redundant as we ship Google Dialer.

Moving on to changes that we are skeptical of:

Why exactly did you move back to an older implementation of ims rcs in this commit (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/commit/424e70d9a644721b25338bf258bf6f89e257d5df#diff-ee2c9bbcfb394325997b778995b52a6b4d4d5931ebef0b6a128a823172a8fca9L32) ?

Why exactly was this commit (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/commit/89b4bcd54b9f98eb78fee57c60cf2a3ba7cc4828) needed ? What was broken with it ?

Moving on to changes that we would prefer if you do:

We build hardware/lineage/compat and would prefer if you build libprotobuf-cpp-lite-3.9.1.so instead of patching these blobs as you did here (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/blob/14/extract-files.sh#L90-155).

We would prefer if you build AIDL packages of hostapd and NFC.

Rasenkai commented 7 months ago

Hello there! There are certain discrepancies we would want you to resolve.

To begin with, there are some SEPolicy changes that you should rework/drop:

This commit (zeus-sm8450/android_device_xiaomi_sm8450-common@4d9aee4) seems to allow far too many selinux rules in which case some of them are very skeptical of the relevance to MIUI Camera. There is a high possibility that you have a similar log as this commit (PixelExperience-Devices/device_xiaomi_sweet@34a8efd) essentially meaning that those rules are purely redundant. Please note that "avc: granted { read } ".

On Zeus, we have a bunch of camera modes that apparently require these rules. Without them, basic MIUI Camera functionality works, but none of the modes such as panorama, slow motion, etc, are functional. I am not sure if its the same on sweet but ill check it. I cross-referenced marble trees and they seemed to largely use the same rules.

This commit (zeus-sm8450/android_device_xiaomi_sm8450-common@fee023a) is redundant as /dev/ashmem has been deprecated since R. Any SELinux rules specifically for ashmem should be dropped.

will drop.

This commit should be reworked to label specific sysfs tcontext.

These commits [1] (zeus-sm8450/android_device_xiaomi_sm8450-common@a4326ef) [2] (zeus-sm8450/android_device_xiaomi_sm8450-common@2412a22#diff-9d51c8ef199421ccb9b7183c69921b26c9567d1dae9d37902e17e58c444ed53a) and [3] (zeus-sm8450/android_device_xiaomi_sm8450-common@87d92a1#diff-7424a05b670bf6ef7c0ef943ad77e034572622261c4422654e9fde4f8830203eR34) are duplicates as they are defined in common sepolicy.

will drop.

Perhaps you could move the entirety of these MIUICamera SELinux rules in this commit (zeus-sm8450/android_device_xiaomi_sm8450-common@bcd3ee9) to the MIUICamera repository and you should check if you have to label rules as priv_app:fd *

Moving on to duplicates:

You should amend this commit (zeus-sm8450/android_device_xiaomi_sm8450-common@0623a75) to remove gEnablePowerSaveOffload as it has been dropped as per the commit description.

will do

This overlay (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/tree/14/overlay-aosp/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values) is redundant as we ship Google Dialer.

will drop

Moving on to changes that we are skeptical of:

Why exactly did you move back to an older implementation of ims rcs in this commit (zeus-sm8450/android_device_xiaomi_sm8450-common@424e70d#diff-ee2c9bbcfb394325997b778995b52a6b4d4d5931ebef0b6a128a823172a8fca9L32) ?

On A13 we used telephony injection with these patches, on A14 these are part of legacy code which has been removed, as such the only way we could have working RIL was shifting to and older impl.

Why exactly was this commit (zeus-sm8450/android_device_xiaomi_sm8450-common@89b4bcd) needed ? What was broken with it ?

NFC way broken during A14 bring up and reverting it seemed to fix it, so i just left it at that

Moving on to changes that we would prefer if you do:

We build hardware/lineage/compat and would prefer if you build libprotobuf-cpp-lite-3.9.1.so instead of patching these blobs as you did here (https://github.com/zeus-sm8450/android_device_xiaomi_sm8450-common/blob/14/extract-files.sh#L90-155).

Okay

We would prefer if you build AIDL packages of hostapd and NFC.

Okay

basamaryan commented 7 months ago

@Rasenkai Miuicamera works fine for Arian on Zeus without allowing all that. Feel free to refer to his sources but you do not need that - https://github.com/cupid-development/android_device_xiaomi_miuicamera-zeus