Difference between revisions of "APITestPage"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
 
(150 intermediate revisions by the same user not shown)
Line 1: Line 1:
===Android下使用SSD固态硬盘===
 
====第一步:格式化SSD为单分区ext4格式====
 
'''此操作可以在电脑上进行,也可以在开发板的 linux 系统里进行。'''<br /><br />
 
为了方便操作,请在终端上先用以下命令切换为 root 用户:<br />
 
<syntaxhighlight lang="bash">
 
su -
 
</syntaxhighlight>
 
root用户的默认密码是fa。
 
  
=====检查是否检测到了SSD=====
+
{{RockchipUnbrick|NanoPC-T4}}
<syntaxhighlight lang="bash">
+
root@FriendlyELEC:~# cat /proc/partitions
+
major minor  #blocks  name
+
  1        0      4096 ram0
+
259        0  125034840 nvme0n1
+
</syntaxhighlight>
+
看到有 nvme0n1 设备的节点,说明SSD已经成功被识别到了。
+
 
+
=====给SSD重新分区=====
+
为了让 Linux 系统能成功能挂载,我们选择给 SSD 重新分区,下面的命令会自动将 SSD 整个空间分成一个区:
+
<syntaxhighlight lang="bash">
+
(echo o; echo n; echo p; echo 1; echo ""; echo ""; echo w; echo q) | fdisk /dev/nvme0n1
+
</syntaxhighlight>
+
如果要分多个区,可以用 fdisk /dev/nvme0n1 命令,参考 fdisk的文档来操作。
+
 
+
=====将分区格式化为 ext4 格式=====
+
上一个步骤分区完成后,我们再用 cat /proc/partitions 命令看一下当前的分区信息,在下面的结果中,可用于存储数据的分区设备名为 /dev/nvme0n1p1 :
+
<syntaxhighlight lang="bash">
+
root@FriendlyELEC:~# cat /proc/partitions
+
major minor  #blocks  name
+
 
+
  1        0      4096 ram0
+
259        0  125034840 nvme0n1
+
259        2  125033816 nvme0n1p1
+
</syntaxhighlight>
+
<br />
+
下面的命令将该分区格式化为 ext4 格式,其中-L参数指定SSD分区的名称,这个名称会在Android界面上显示:
+
<syntaxhighlight lang="bash">
+
mkfs.ext4 /dev/nvme0n1p1 -L SSD
+
</syntaxhighlight>
+
 
+
====第二步:Android开机自动挂载====
+
只要SSD已经被正确地格式化,Android就会自动挂载SSD为外置存储设备,无需额外的设置,打开Android内置的Files应用,可以看到SSD设备已经挂载:<br />
+
[[File:android8-files-ssd.jpg|frameless|600px]]<br />
+
第三方的软件可以正常识别SSD,如下图中的迅雷下载软件,可以设置将文件默认下载到SSD上:<br />
+
[[File:android8-thunder-ssd.png|frameless|500px]]<br />
+

Latest revision as of 09:23, 4 June 2024

1 Unbricking Method

If the ROM is not installed correctly, causing the development board to become bricked, and you might not have the opportunity to reinstall the ROM via an SD card, you need to enter Maskrom mode to unbrick it by erasing the storage device.

1.1 Windows Users

1.1.1 Download Required Files

  • Get the necessary tools: Visit here, find RKDevTool_v3.19_for_window.zip and DriverAssitant_v5.12.zip in the 05_Tools directory, and download them to your local machine.
  • Install Rockchip USB driver and RKDevTool: Extract DriverAssitant_v5.12.zip to install the Rockchip USB driver, and extract RKDevTool_v3.19_for_window.zip to obtain the Rockchip flashing tool RKDevTool.
  • Get the loader: Visit here, enter the tools directory corresponding to your CPU model, and download MiniLoaderAll.bin.

1.1.2 Enter Maskrom Mode to Erase the Storage Device

  • Connect NanoPC-T4 to your computer using a USB data cable.
  • Start RKDevTool on your computer.
  • Disconnect the power from NanoPC-T4, hold down the MASK button, connect the power, and release the button when you see Found One MASKROM Device displayed at the bottom of the interface, as shown below:

Rkdevtool found one maskrom device.png

  • Click the Advanced Function tab in the RKDevTool interface.
  • In the Boot text box, select MiniLoaderAll.bin, then click the Download button.
  • Select EMMC, click Switch Storage, then click the EraseAll button to erase the eMMC.

Rkdevtool erase emmc.png

  • At this point, NanoPC-T4 is restored to its initial state and can be normally booted via SD card or eMMC.

1.2 Linux/Mac Users

1.2.1 Download the Required Files

  • Get the necessary tools: Visit here and find upgrade_tool_v2.30_for_linux.tgz (or for Mac users, select upgrade_tool_v2.25_for_mac.tgz) in the 05_Tools directory and download it locally.
  • Get the loader: Visit here, enter the tools directory corresponding to your CPU model, and download MiniLoaderAll.bin.

1.2.2 Installation for upgrade_tool

The following commands are for Linux, with only slight differences in file and directory names for Mac users:

tar xzf upgrade_tool_v2.30_for_linux.tgz
cd upgrade_tool_v2.30_for_linux
sudo cp upgrade_tool /usr/local/sbin/
sudo chmod 755 /usr/local/sbin/upgrade_tool

1.2.3 Enter Maskrom Mode to Erase the Storage Device

  • Connect NanoPC-T4 to the computer using a USB data cable.
  • Disconnect the power from NanoPC-T4, hold down the MASK button, connect the power, and release the button after 4 seconds.
  • Check the connection with the following command:
upgrade_tool LD

A result similar to "DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=13 Mode=Maskrom SerialNo=" indicates that the device has been detected.

  • Erase the eMMC with the following command:
upgrade_tool EF MiniLoaderAll.bin
  • At this point, NanoPC-T4 has been restored to its initial state and can boot the system normally via SD card or eMMC.