Template:RK3399-Android8

From FriendlyELEC WiKi
Revision as of 09:22, 11 March 2019 by Tzs (Talk | contribs) (updated by API)

Jump to: navigation, search

1 Work with Android 8.1

FriendlyElec provides a full Android8.1 BSP for {{{1}}}. The source code is hosted at gitlab.com and is open source. The BSP supports GPU and VPU hardware acceleration.

1.1 Connect MIPI Camera to {{{1}}}

FriendlyElec developed a MIPI camera CAM1320 for board and it works under Android. You can use this camera to take pictures and record video. The operation is straightforward. You just need to connect the camera at your board's MIPI interface, boot your board to Android and start Android's camera app.


1.2 Android8.1 hardware access

You can use the FriendlyThings SDK to access and control hardware resources on the motherboard in the Android App, such as Uart, SPI, I2C, GPIO and other interfaces. For details, please refer to the following two documents.:

1.3 Android Neural Networks SDK Sample

Android8.1 BSP comes pre-installed with Rockchip's Android NN SDK for Android 8.1, supporting GPU acceleration.。
Sample program for Android NN pre-installed in the Android8 firmware we provide:TfLiteCameraDemo,This is a MobileNet classifier demo using Rockchip AndroidNN GPU acceleration,The camera module is required to be connected to the motherboard during operation. The USB camera and CSI camera are supported,The sample program is launched by clicking the "TfLiteCameraDemo" icon on the home page. The running effect is as follows:

TfLiteCameraDemo.png
For a detailed description of the Android NN SDK, you can refer to this document:[RK3399_Android8.1_AndroidNN_SDK_V1.0_20180605发布说明.pdf]
TfLiteCameraDemo sample source code download link:[TfLiteCameraDemo source code]

1.4 Using the adb

1. The first time you start the system, if you need to change the system files, you need to turn off security verification (note: apk installation does not need to be closed), and restart after turning off security verification

adb root
adb disable-verity
adb reboot

2. After restarting, get root and remount /system to enable write permissions

adb root
adb remount

3. Upload a file

adb push example.txt /system/

1.5 HDMI resolution and overscan setting

If an HDMI display device is connected, go to Android Settings -> Display -> Advanced -> HDMI & Rotation to set it up.

HDMI Resolution The default is Auto, you can manually set the display resolution, up to 4K resolution
Screen Zoom click the four arrow buttons in the middle to adjust the zoom
Display Rotation for horizontal and vertical screen switching

1.6 Screen rotation

go to Android Settings -> Display -> Advanced -> HDMI & Rotation to set it up.

Use the following command in shell to test screen rotation (Settings not saved):

wm rotation 90

1.7 Switch audio output channel

You can configure the audio output to the HDMI or headphone jack, Setting interface entry method: Android Settings -> Accessibility -> Force audio output. If the Force audio output menu item is gray, that is, it is in an unselectable state, the hardware you are using will automatically detect the headphone plug-in status and automatically switch the audio channel without setting.

1.8 Custom logo and boot animation

1.8.1 On/Off

Change:
BOOT_SHUTDOWN_ANIMATION_RINGING := false
to:
BOOT_SHUTDOWN_ANIMATION_RINGING := true
in device/rockchip/common/BoardConfig.mk file.

1.8.2 Boot animation

Create or replace the following files in the Android source code directory:
kernel/logo.bmp
kernel/logo_kernel.bmp
device/rockchip/common/bootshutdown/bootanimation.zip

1.8.3 Shutdown animation

Create or replace the following files in the Android source code directory:
device/rockchip/common/bootshutdown/shutdownanimation.zip

1.8.4 How to make animation

Please refre to:http://blog.sina.com.cn/s/blog_4960586c0100vu5v.html

1.9 Remove Google Framework

If you don't need to use the google service, you can delete the Google framework to save system resources by deleting the following directory in the Android source code and recompiling Android:
vendor/google