6

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?

Kurosawa Hiroyuki
  • 1,217
  • 2
  • 14
  • 22
  • Could you please tell me, which touch screen do you use? I'm looking for a "no hassle" touch screen for an Android Things tinker project. :) – Tobonaut Oct 28 '17 at 17:55
  • Hi, I bought 7inch touchscreen monitor which is at the link below, but i'm not sure the model is exact the same model as i bought last year ;) ttps://www.raspberrypi.org/products/raspberry-pi-touch-display/ – Kurosawa Hiroyuki Oct 30 '17 at 01:33

2 Answers2

10

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

proppy
  • 10,495
  • 5
  • 37
  • 66
0

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
Robin Kam
  • 41
  • 3