From e19cd7889971f7975618f5e3cfd56f3274b4b11c Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Thu, 2 Jan 2020 09:41:59 +0800 Subject: [PATCH] fix adf display devices on Spreadtrum devices for Android 10 * Somehow, when running GSI 10, Spreadtrum's adf driver do not show up with the correct name in /dev. I am not sure how this happens, but it seemed that a few `mknod`s fixed the problem. This was tested on Xiaomi Qin 2 Pro. --- rw-system.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rw-system.sh b/rw-system.sh index 8a86b5f..7d909c7 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -520,3 +520,12 @@ done if [ "$has_hostapd" = false ];then setprop persist.sys.phh.system_hostapd true fi + +# Fix sprd adf for surfaceflinger to start +# Somehow the names of the device nodes are incorrect on Android 10; fix them by mknod +if [ -e /dev/sprd-adf-dev ];then + mknod -m666 /dev/adf0 c 250 0 + mknod -m666 /dev/adf-interface0.0 c 250 1 + mknod -m666 /dev/adf-overlay-engine0.0 c 250 2 + restorecon /dev/adf0 /dev/adf-interface0.0 /dev/adf-overlay-engine0.0 +fi