Android Things with Rasp3 7 inch touchscreen

 ̄綄美尐妖づ 提交于 2019-11-27 07:56:24

问题


I have Android Things OS image installed for my Rasp3 and successfully booted up and log in to shell using adb, but lcd display is upside down with my 7 inch touchscreen display.

I wonder if there is config like lcd_rotate=2 in /boot/config.txt on Raspbian?


回答1:


You can try to manually mount the boot partition from the sdcard and edit config.txt

mount -t msdos /dev/sdX1 /mnt/disk
echo 'lcd_rotate=2' >> /mnt/disk/config.txt

Where /dev/sdX1 points to your sdcard reader device.

Note: This is more a hack than an officially supported solution, you will have to re-do that operation everytime you upgrade the OS image. It'd be nice to file a feature request to ask for better support for (dynamic?) display configuration




回答2:


I encountered the same problem, but failed mounting the boot partition mentioned in other answers on my Mac OS. However, I found the solution and pretty handy finally.

My Solution: You can simply use Windows OS to mount the TF card with Android Things installed, because the Android Things disk image has a partition with FAT16 format named RPIBOOT containing the CONFIG.txt file which you can append 'lcd_rotate=2' in to resolve the upside down issue on the Raspberry Pi official 7 inch touchscreen.

Bonus: You can adjust the display resolution in the CONFIG.txt as well, and somehow you would better do it. Otherwise, you will find the 800*480 initial resolution makes things much bigger than you expect if you want to develop some UI in you application, because the touchscreen actually is 7 inches with 240 DPI. The best resolution I got by testing is 1200*720. You can append 2 lines in the CONFIG.txt to make the display look nicer:

framebuffer_width=1200
framebuffer_height=720


来源:https://stackoverflow.com/questions/41165198/android-things-with-rasp3-7-inch-touchscreen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!