-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #596 from skljfi/rock5a_android
Rock5a android docs
- Loading branch information
Showing
14 changed files
with
717 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
sidebar_position: 7 | ||
--- | ||
|
||
# Android 系统 | ||
|
||
主要介绍系统如何使用 | ||
|
||
<DocCardList /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
sidebar_position: 1 | ||
description: "快速上手 ROCK 5A,让您能够轻松开始使用和探索其功能。" | ||
--- | ||
|
||
# 上手指南 | ||
|
||
## 产品介绍 | ||
|
||
请参考 [产品介绍](../../getting-started/introduction.md) | ||
|
||
## 快速上手 | ||
|
||
请参考 [快速上手](../../getting-started/quick-start.md) | ||
|
||
**_Note: 系统安装部分 要参考[这里](./install-os.md)_** | ||
|
||
## 电源选择 | ||
|
||
请参考 [电源选择](../../getting-started/power-supply.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
sidebar_position: 2 | ||
title: 系统安装 | ||
--- | ||
|
||
import Etcher from '../../../../common/general/\_etcherV2.mdx' | ||
|
||
本文档将介绍如何把 Android 镜像安装到 ROCK 5C。 | ||
|
||
ROCK 5A 可以从 microSD 卡启动,也可以从 EMMC 启动,基于不同的启动方式,安装系统到不同的介质上. | ||
|
||
<Tabs queryString="target"> | ||
|
||
<TabItem value="microsd" label="安装系统到 microSD 卡"> | ||
|
||
#### 准备工作 | ||
|
||
- 1x microSD 卡(容量 >=16GB,读写速度等级 >= class10) | ||
- 1x microSD 读卡器 | ||
- 5V 电源适配器 (推荐使用 [Radxa Power PD30W](../../accessories/pd-30w)) | ||
|
||
#### 镜像下载 | ||
|
||
请到 [资源下载汇总](../../download) 下载对应的镜像文件并解压 | ||
|
||
#### 安装系统 | ||
|
||
<Etcher model="rock5a" /> | ||
|
||
#### 启动系统 | ||
|
||
- 按照上述步骤成功烧录 microSD 卡后,将 microSD 卡插入 ROCK 5A 的 MicroSD 插槽内。 | ||
- ROCK 5A 的供电接口为 [Type C port](/rock5/rock5a/hardware-design/hardware-interface),请使用 Type-C 线缆连接供电口和适配器。 | ||
|
||
</TabItem> | ||
|
||
<TabItem value="emmc" label="安装系统到 eMMC "> | ||
|
||
#### 准备工作 | ||
|
||
- USB 接口线缆(A-A) | ||
- 1x eMMC 模块 | ||
- 5V 电源适配器 (推荐使用 [Radxa Power PD30W](../../accessories/pd-30w)) | ||
|
||
#### 镜像下载 | ||
|
||
请到 [资源下载汇总](../../download) 下载对应的镜像文件并解压 | ||
|
||
#### 系统安装 | ||
|
||
进入 maskrom 模式 | ||
|
||
- 断开开发板电源 | ||
- 移除 SD 卡,并插入 EMMC 模块 | ||
- 用 USB A-A 连接 Radxa ROCK 5A 的 USB3.0 口 和 PC 端 | ||
- 使用杜邦线短接 Maskrom Key | ||
- 给开发板上电 | ||
- PC 端查看是否有 USB 设备 | ||
- Linux/macOS: 检查执行 lsusb 后是否有显示 "Bus 001 Device 112: ID 2207:350a Fuzhou Rockchip Electronics Company" | ||
- Windows: 打开 RKDevTool 您会看到设备处于 "maskrom mode". | ||
|
||
<Tabs queryString="target"> | ||
|
||
<TabItem value="linux" label="Linux"> | ||
|
||
#### Linux 系统使用 rkdeveloptool 写入 | ||
|
||
[rkdeveloptool](../../low-level-dev/maskrom/linux) | ||
|
||
</TabItem> | ||
|
||
<TabItem value="mac" label="Mac"> | ||
|
||
#### Mac 系统使用 rkdeveloptool 写入 | ||
|
||
[rkdeveloptool](../../low-level-dev/maskrom/mac-os) | ||
|
||
</TabItem> | ||
|
||
<TabItem value="windows" label="Windows"> | ||
|
||
#### Windows 系统使用 rkdevtool 写入 | ||
|
||
[rkdevtool](/rock5/rock5a/low-level-dev/maskrom/windows) | ||
|
||
</TabItem> | ||
|
||
</Tabs> | ||
|
||
#### 启动 ROCK 5A | ||
|
||
1. 通过适配器为 ROCK 5A 供电 | ||
2. ROCK 5A 将绿色电源 LED 亮起的情况下启动,启动成功后蓝色 LED 闪烁 | ||
|
||
</TabItem> | ||
|
||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
# 底层开发 | ||
|
||
主要介绍 uboot, kernel, aosp 编译打包等内容 | ||
|
||
## 环境配置 | ||
|
||
在 Ubuntu(>=15.04) 上使用OpenJDK | ||
|
||
```bash | ||
sudo apt-get update | ||
sudo apt-get install openjdk-8-jdk | ||
``` | ||
|
||
## 下载 Radxa Android SDK | ||
|
||
Radxa Android SDK 包含数百个 Git 仓库,如果不用 repo 逐个下载会非常繁琐。 | ||
|
||
### Repo | ||
|
||
Repo 是 Android 开发中用于管理多个 Git 仓库的工具,它是一个Python脚本,方便开发者对多个 Git 库进行版本控制和管理。 | ||
|
||
#### 下载 Repo | ||
|
||
```bash | ||
$ echo "export REPO_URL='https://storage.googleapis.com/git-repo-downloads/repo'" >> ~/.bashrc | ||
$ source ~/.bashrc | ||
$ curl https://storage.googleapis.com/git-repo-downloads/repo -o /tmp/repo | ||
$ sudo cp /tmp/repo /usr/local/bin/repo | ||
$ sudo chmod +x /usr/local/bin/repo | ||
``` | ||
|
||
#### 代码下载 | ||
|
||
```bash | ||
$ repo init -u https://github.com/radxa/manifests.git -b Android12_Radxa_rk14 -m rockchip-s-release.xml | ||
$ repo sync -d --no-tags -j4 | ||
``` | ||
|
||
## 镜像编译 | ||
|
||
镜像编译可以使用两种方法 | ||
|
||
### 方法一 (**推荐**) | ||
|
||
使用 SDK 编译脚本方式编译 | ||
|
||
```bash | ||
radxa:rock-android12 $ source build/envsetup.sh | ||
radxa:rock-android12 $ lunch RadxaRock5C-userdebug | ||
radxa:rock-android12 $ ./build.sh -UACKu | ||
# get images from rockdev directory | ||
``` | ||
|
||
等待编译完成就可以在 rockdev 目录找到镜像 | ||
|
||
### 方法二 | ||
|
||
可以根据这个方法一步一步编译镜像 | ||
|
||
1. 设置编译项目的环境 | ||
|
||
```bash | ||
radxa:rock-android12 $ source build/envsetup.sh | ||
radxa:rock-android12 $ lunch RadxaRock5C-userdebug | ||
``` | ||
|
||
2. 编译 U-boot | ||
|
||
```bash | ||
radxa:rock-android12 $ ./build.sh -U | ||
``` | ||
|
||
3. 编译内核 | ||
|
||
```bash | ||
radxa:rock-android12 $ ./build.sh -CK | ||
``` | ||
|
||
4. 编译AOSP | ||
|
||
```bash | ||
radxa:rock-android12 $ ./build.sh -A | ||
``` | ||
|
||
5. 制作 Images | ||
|
||
```bash | ||
radxa:rock-android12 $ ./build.sh -u | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
import Serial from "../../../../common/general/\_serial.mdx" | ||
|
||
# 远程登录 | ||
|
||
本章节旨在向需要通过个人电脑(PC)远程访问 SBC 的用户介绍如何通过串口、adb 等方式进行远程登录 ROCK 5A | ||
|
||
<Tabs queryString="target"> | ||
|
||
<TabItem value="adb" label="adb登录"> | ||
|
||
#### 准备工作 | ||
|
||
adb(调试桥)安装: | ||
|
||
<Tabs queryString="target"> | ||
|
||
<TabItem value="adb_windows" label="Windows"> | ||
|
||
从Android[官方网站](https://source.android.com/docs/setup/build/adb)下载Windows版本的adb工具包,下载解压后需要配置环境变量: | ||
|
||
方式一:在终端窗口输入以下命令: | ||
|
||
```bash | ||
|
||
set HTTP_PROXY=myserver:1981 | ||
|
||
``` | ||
|
||
方式二:打开系统设置,修改环境变量:![rock5a adb](/img/nx5/adb_config.webp) | ||
|
||
</TabItem> | ||
|
||
<TabItem value="adb_linux" label="Linux"> | ||
|
||
使用以下命令安装即可: | ||
|
||
```bash | ||
|
||
sudo apt install adb | ||
|
||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="adb_mac" label="Mac"> | ||
|
||
从Android[官方网站](https://source.android.com/docs/setup/build/adb)下载Mac版本的adb工具包,下载解压后需要配置环境变量: | ||
打开终端输入一下命令进行环境变量配置: | ||
|
||
```bash | ||
|
||
export PATH=${path}:~/platform-tools('~'代表解压出来的工具包路径) | ||
|
||
``` | ||
|
||
</TabItem> | ||
|
||
</Tabs> | ||
|
||
<Tabs queryString="target"> | ||
|
||
<TabItem value="wired_adb" label="有线登录"> | ||
|
||
#### 要求 | ||
|
||
1. 一条USB A-A 线 | ||
2. 一台有安装 ADB 工具的电脑或笔记本 | ||
3. 一个 ROCK 5A | ||
|
||
#### 步骤 | ||
|
||
1. 用 USB 线连接计算机的 USB 接口和 ROCK 5A 的 USB3.0 Type A 接口 | ||
2. 打开计算机终端输入 adb devices 确认识别到 ROCK 5A ,输入 adb shell 登录 | ||
|
||
```bash | ||
|
||
$ adb devices | ||
List of devices attached | ||
f94f8e0d28380ceb device | ||
|
||
$ adb shell | ||
RadxaRock5A:/ $ | ||
|
||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="wireless_adb" label="无线登录"> | ||
|
||
Android 11 版本以后支持无线 ADB 。 | ||
|
||
#### 要求 | ||
|
||
1. 一台有安装 ADB 工具的电脑或笔记本 ,ADB 版本需要大于 31.0.0 | ||
2. 一个ROCK 5A,安卓镜像需要大于或等于 11 | ||
3. 计算机和 ROCK 5A 需要在同一个局域网 | ||
|
||
#### 步骤 | ||
|
||
1. 启动 ROCK 5A ,使用 wifi 连接 网络 | ||
2. 进入开发着模式,点击7次版本号可进入开发着模式(设置 -> 关于平板电脑 -> 版本号) | ||
3. 进入开发着选项(设置 -> 系统 -> 开发着选项),打开无线调试,记住IP地址和接(例:10.0.0.16:45613) | ||
4. 打开计算机终端输入 adb connect 10.0.0.16:45613 连接 ROCK 5A ,输入 adb shell 登录 | ||
|
||
```bash | ||
$ adb connect 10.0.0.16:45613 | ||
|
||
$ adb shell | ||
RadxaRock5A:/ $ | ||
``` | ||
|
||
</TabItem> | ||
|
||
</Tabs> | ||
|
||
</TabItem> | ||
|
||
<TabItem value="serial" label="串口登录"> | ||
|
||
<Serial platform="rk" model="rock5a"/> | ||
|
||
</TabItem> | ||
|
||
</Tabs> |
Oops, something went wrong.