I need my imx8mq board android system display vertically at startup. Do you have any suggestions?
I tried as below:
I can set "settings put system user_rotation 3" manully by adb. And it can rotate 270 degree.
But I need display vertically at startup not manually.
So I added a service in /vendor/etc/init/hw/init.nxp.rc
service rotate-screen /vendor/bin/rotate-screen.sh
group root system
And contents in rotate-screen.sh is:
settings put system user_rotation 3
But it does now work. it seems the rotate-screen.sh not executed.
There is no build.prop file in imx-android-11.0.0_2.0.0/android_build/device/nxp and recursive folder.
Actually I had tried to add blew contents in imx-android-11.0.0_2.0.0/android_build/device/nxp/imx8m/evk_8mq/init.rc before
on property:sys.boot_completed=1 && property:sys.logbootcomplete=1
setprop ro.sf.hwrotation 270
But it did not work.
I followed your suggestions and did like below:
+SOONG_CONFIG_IMXPLUGIN_SF_PRIMARY_DISPLAY_ORIENTATION = 270
SOONG_CONFIG_IMXPLUGIN_BOARD_PLATFORM = imx8
+SF_PRIMARY_DISPLAY_ORIENTATION := 270
BOARD_PREBUILT_DTBOIMAGE := $(OUT_DIR)/target/product/$(PRODUCT_DEVICE)/dtbo-imx8mq.img
3. modified vendor/nxp-opensource/imx/display/display/Composer.cpp and vendor/nxp-opensource/imx/display/display/display.go file as you said.
But it still did not work.
And I dig the log, at least the log of below
ALOGV("index:%d, i:%d sourceCrop(l:%d,t:%d,r:%d,b:%d), "
"display(l:%d,t:%d,r:%d,b:%d)", layer->index, (int)i,
srect.left, srect.top, srect.right, srect.bottom,
clip.left, clip.top, clip.right, clip.bottom,
drect.left, drect.top, drect.right, drect.bottom);
did not apper.