ubports / ubports-installer

A simple tool to install Ubuntu Touch on UBports devices
https://github.com/ubports/ubports-installer/releases
GNU General Public License v3.0
539 stars 119 forks source link

Fix device model auto-detection for UT devices running Halium (11) GSI #2849

Open JamiKettunen opened 1 year ago

JamiKettunen commented 1 year ago

With the Volla Phone 22 I noticed the UBports installer cannot detect the device with Ubuntu Touch already booted image It detects the device as halium_arm64 which just happens to match ro.product.device property and used to be an ok way to detect the device, however ro.product.vendor.device should be considered as well to catch devices using the Halium 11 GSI for example

$ adb shell getprop ro.product.device
halium_arm64
$ adb shell getprop ro.product.vendor.device
mimameid

Is this how we should fix the problem or should something else be done?

The UT Samsung Galaxy S7 port currently uses this ugly hack to get the installer to recognize it with Ubuntu Touch already booted.

amartinz commented 1 year ago

The GSI should set ro.product.property_source_order to prioritize reading properties from vendor when applying to ro.product.* properties.

For example:

ro.product.property_source_order=vendor,odm,product,system_ext,system

Reference: https://chromium.googlesource.com/aosp/platform/system/core/+/refs/heads/master/init/property_service.cpp#808