Samodeyice
Posts: 1
Joined: Sat Aug 03, 2019 4:37 am

Android Things display problem on Raspberry pi

Sat Aug 03, 2019 5:01 am

I'm trying to develop an app that runs on android things with Raspberry Pi. The app suppose to run in portrait mode. In the AndroidManifest file, I have used this code android:screenOrientation="portrait" , the result is the app running in portrait mode but very slow.
I searched online and found @Jay Hunt found the same problem with android things.
github link: https://github.com/jaythecelt/SimpleApp
It sames like a bug in android things.

So I try to use a different method by editing the config.txt file and make the android things display in a portrait mode. however a new problem show up. the image doesn't fit the screen and the image showing on the screen jumps up and down. Sorry about my English, hard to explain.

The video will explain to you what happend: https://youtu.be/iBJQXABuARA

here is the code I have for the config.txt file.

Code: Select all

kernel=u-boot-dtok.bin
framebuffer_depth=16

# Prevent the firmware from loading HAT overlays now that we handle pin muxing.
# ourselves. See:
# https://www.raspberrypi.org/documentation/configuration/device-tree.md#part3.4
dtoverlay=

dtparam=i2c_arm=on
dtparam=spi=on
dtparam=audio=on

# pwm and I2S are mutually-exclusive since they share hardware clocks.
dtoverlay=pwm-2chan-with-clk,pin=18,func=2,pin2=13,func2=4
dtoverlay=generic-i2s

start_x=1

# Tell U-boot to always use the "serial0" interface for the console, which is
# set to whichever uart (uart0 or uart1) is set to the header pins. This doesn't
# interfere with the uart selected for Bluetooth.
dtoverlay=chosen-serial0

# Enable skip-init on the UART interfaces, so U-Boot doesn't attempt to
# re-initialize them.
dtoverlay=rpi-uart-skip-init

# Add pin devices to the system for use by the runtime pin configuration driver.
dtoverlay=runtimepinconfig
dtoverlay=uart1
dtoverlay=bcm2710-rpi-3-b-spi0-pin-reorder

# Tell the I2S driver to use the cprman clock.
dtoverlay=bcm2710-rpi-3-b-i2s-use-cprman

# Uncomment to disable serial port on headers, use GPIO14 and GPIO15
# as gpios and to allow the core_freq to change at runtime.
enable_uart=1
core_freq=400

# Support official RPi display.
dtoverlay=i2c-rtc,ds3231
dtoverlay=rpi-ft5406
hdmi_force_hotplug=1

# Set framebuffer to use BGRA colors.
# framebuffer_swap=1

# If a display spills off the screen (RPi graphics is larger than monitors),
# set disable_overscan to 0.
disable_overscan=0

# Set gpu memory size enough to render 1080p screen and record 1080p
# camera at the same time.
gpu_mem=256

display_rotate=3
extra_transport_buffer=1

Return to “Android”