Difference between revisions of "Template:RK3399-Android8"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
Line 32: Line 32:
  
 
===Android Neural Networks SDK Sample===
 
===Android Neural Networks SDK Sample===
Android8.1 BSP预装了Rockchip为Android8.1提供的Android NN SDK,支持GPU加速。<br />
+
Android8.1 BSP comes pre-installed with Rockchip's Android NN SDK for Android 8.1, supporting GPU acceleration.。<br />
我们提供的Android8固件中预装了Android NN的示例程序:TfLiteCameraDemo,这是一个使用Rockchip AndroidNN GPU加速的MobileNet分类器Demo,运行时需要主板连接有摄像头模块,USB摄像头和CSI摄像头都是支持的,示例程序通过点击首页的 “TfLiteCameraDemo”图标进入,运行效果如下所示:<br /><br />
+
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:<br /><br />
 
[[File:TfLiteCameraDemo.png|frameless|600px]]<br />
 
[[File:TfLiteCameraDemo.png|frameless|600px]]<br />
关于Android NN SDK的详细描述,可以参考原厂的这份文档:[https://gitlab.com/friendlyelec/rk3399-android-8.1/blob/master/RKDocs/rk3399/RK3399_Android8.1_AndroidNN_SDK_V1.0_20180605%E5%8F%91%E5%B8%83%E8%AF%B4%E6%98%8E.pdf [RK3399_Android8.1_AndroidNN_SDK_V1.0_20180605发布说明.pdf]]<br />
+
For a detailed description of the Android NN SDK, you can refer to this document:[https://gitlab.com/friendlyelec/rk3399-android-8.1/blob/master/RKDocs/rk3399/RK3399_Android8.1_AndroidNN_SDK_V1.0_20180605%E5%8F%91%E5%B8%83%E8%AF%B4%E6%98%8E.pdf [RK3399_Android8.1_AndroidNN_SDK_V1.0_20180605发布说明.pdf]]<br />
TfLiteCameraDemo示例源代码下载地址:[https://github.com/rockchip-linux/tensorflow/tree/master/tensorflow/contrib/lite/java/demo [TfLiteCameraDemo源代码]]<br />
+
TfLiteCameraDemo sample source code download link:[https://github.com/rockchip-linux/tensorflow/tree/master/tensorflow/contrib/lite/java/demo [TfLiteCameraDemo source code]]<br />
 +
 
 +
===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
 +
<syntaxhighlight lang="bash">
 +
adb root
 +
adb disable-verity
 +
adb reboot
 +
</syntaxhighlight>
 +
2. After restarting, get root and remount /system to enable write permissions
 +
<syntaxhighlight lang="bash">
 +
adb root
 +
adb remount
 +
</syntaxhighlight>
 +
3. Upload a file
 +
<syntaxhighlight lang="bash">
 +
adb push example.txt /system/
 +
</syntaxhighlight>

Revision as of 06:42, 12 December 2018

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/