Difference between revisions of "Zero/install/eMMC Android9"
RadxaYuntian (Talk | contribs) |
|||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Zero_header}} | {{Zero_header}} | ||
− | {{Languages|zero/install/ | + | {{Languages|zero/install/eMMC_Android9}} |
− | [[Zero | Radxa Zero]] > [[zero/install | Install]] > [[zero/install/eMMC_Android9 | Install Android9 to eMMC]] | + | [[Zero | Radxa Zero]] > [[zero/install | Install]] > [[zero/install/eMMC_Android9 | Install Android9 to eMMC '''(deprecated)''']] |
+ | |||
+ | __NOTOC__ | ||
+ | |||
+ | =<font color="#FF0000">STOP!</font>= | ||
+ | |||
+ | This guide is quite messy with a lot of information duplicated from other guides. We have concentrated everything into [[Zero/install/eMMC_Android | this new place]]. As such this page will no longer be maintained and could contain out-of-date info, and its content should not be followed anymore. This page is preserved for historical reference. | ||
+ | |||
+ | __TOC__ | ||
=== How to install raw images to Radxa Zero eMMC === | === How to install raw images to Radxa Zero eMMC === | ||
Line 18: | Line 26: | ||
* Download and extract [https://dl.radxa.com/zero/images/android/ Android9 image] | * Download and extract [https://dl.radxa.com/zero/images/android/ Android9 image] | ||
− | After extract your will see | + | After extract your will see files list like this: |
$ ls | $ ls | ||
Line 82: | Line 90: | ||
Nexus Tools is an installer for the Android SDK Platform Tools package, which includes ADB, Fastboot, and other applications. We use Nexus Tools to install fastboot. If you already have fastboot installed, you can skip this step. | Nexus Tools is an installer for the Android SDK Platform Tools package, which includes ADB, Fastboot, and other applications. We use Nexus Tools to install fastboot. If you already have fastboot installed, you can skip this step. | ||
− | + | <pre> | |
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh) | bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh) | ||
+ | </pre> | ||
After it finishes, | After it finishes, | ||
Line 171: | Line 180: | ||
===== Step 1: Install pyamlboot tool ===== | ===== Step 1: Install pyamlboot tool ===== | ||
− | brew install python lsusb | + | brew install python lsusb libusb |
pip3 install pyamlboot | pip3 install pyamlboot | ||
Line 177: | Line 186: | ||
Nexus Tools is an installer for the Android SDK Platform Tools package, which includes ADB, Fastboot, and other applications. We use Nexus Tools to install fastboot. If you already have fastboot installed, you can skip this step. | Nexus Tools is an installer for the Android SDK Platform Tools package, which includes ADB, Fastboot, and other applications. We use Nexus Tools to install fastboot. If you already have fastboot installed, you can skip this step. | ||
− | + | <pre> | |
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh) | bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh) | ||
− | + | </pre> | |
After it finishes, | After it finishes, | ||
Line 244: | Line 253: | ||
If zero do not reboot automatically, you should reconnect usb cable to reboot it. | If zero do not reboot automatically, you should reconnect usb cable to reboot it. | ||
+ | |||
+ | |||
+ | == FAQ == | ||
+ | ===1. How to erase Android?=== | ||
+ | A: <br> | ||
+ | * To erase partitions | ||
+ | <pre>dd if=/dev/zero of=/dev/<emmc device> bs=1M count=500</pre> | ||
+ | * [https://wiki.radxa.com/Zero/install/eMMC_Android9 To erase emmc u-boot] | ||
+ | <br> | ||
+ | === 2. Why is there no fastboot device? === | ||
+ | A: If the board not able to run into fastboot, please try: <br> | ||
+ | * If you can boot to android, try "adb reboot fastboot" or (uart console) "reboot fastboot" | ||
+ | * If you can visit u-boot console, execute command "fastboot" |
Latest revision as of 02:01, 16 May 2022
Radxa Zero > Install > Install Android9 to eMMC (deprecated)
STOP!
This guide is quite messy with a lot of information duplicated from other guides. We have concentrated everything into this new place. As such this page will no longer be maintained and could contain out-of-date info, and its content should not be followed anymore. This page is preserved for historical reference.
Contents
How to install raw images to Radxa Zero eMMC
This guide describes how to install the raw images to Radxa Zero eMMC. Raw images is compared to amlupdate format image(which is a private image format). Raw images can be mount and open on host PCs. Most of the Linux images released are raw images. Currently Android images are released in amlupdate format but this may change in the future.
Requirement
- Radxa Zero
- USB A to C cable
- A PC/laptop running Windows, Linux/macOS.
Preparation
- Download and extract Android9 image
After extract your will see files list like this:
$ ls android-info.txt dtbo.img flash-all.sh product.img vbmeta.img boot.img dt.img logo.img recovery.img vendor.img bootloader.img flash-all.bat odm.img system.img
File bootloader.img will be needed to run Zero to fastboot mode.
Windows
Step 1: Install drivers
Press and hold the USB boot button on the Zero, plug in the USB to PC.
Download Zagdig, install it. Confirm that the device is GX-CHIP, USB ID is 1B8E:C003 and choose libusb-win32, then click Install Driver.
Download the Android driver from Google:
Click here to download the Google USB Driver ZIP file (ZIP)
Unzip it and right click the .inf file to install the driver.
Step 2: Install fastboot
Open Windows PowerShell from the Start Menu and paste this command:
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.ps1'))
Step 3: Use RZ USB helper to run Zero to fastboot mode
RZ USB helper is a tool by Radxa for Windows users to manage Radxa Zero booting easier. Download it from Radxa DL.
Press and hold the USB boot button on the Zero
plug in the USB to PC, Maskrom mode should be detected.
Select the bootloader.img in the Android9 image and click Run.
Step 4: Execute flash-all.bat to flash
Execute flash-all.bat in Android9 image to flash all partitions to emmc.
If zero do not reboot automatically after finish, you should reconnect usb cable to reboot it.
Linux
For Linux, we use amlogic boot tool to download the bootloader and boot the Zero into fastboot mode, then we can execute flash-all.sh to write all partitions to eMMC.
Step 1: Install pyamlboot tool
sudo apt install python3-pip sudo pip3 install pyamlboot
Step 2: Install fastboot
Nexus Tools is an installer for the Android SDK Platform Tools package, which includes ADB, Fastboot, and other applications. We use Nexus Tools to install fastboot. If you already have fastboot installed, you can skip this step.
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)
After it finishes,
which fastboot
should return you the install location.
Step 3: Boot into fastboot mode
Press and hold the USB boot button on Zero, plug in it to PC, lsusb should see the following:
Bus 001 Device 075: ID 1b8e:c003 Amlogic, Inc.
Download the fastboot loader and run it on Zero
boot-g12.py Android9_image/bootloader.img
It should output:
Firmware Version : ROM: 3.2 Stage: 0.0 Need Password: 0 Password OK: 1 Writing factory-loader.img at 0xfffa0000... [DONE] Running at 0xfffa0000... [DONE] AMLC dataSize=16384, offset=65536, seq=0... [DONE] AMLC dataSize=49152, offset=393216, seq=1... [DONE] AMLC dataSize=16384, offset=229376, seq=2... [DONE] AMLC dataSize=49152, offset=81920, seq=3... [DONE] AMLC dataSize=16384, offset=65536, seq=4... [DONE] AMLC dataSize=49152, offset=393216, seq=5... [DONE] AMLC dataSize=16384, offset=229376, seq=6... [DONE] AMLC dataSize=49152, offset=180224, seq=7... [DONE] AMLC dataSize=16384, offset=65536, seq=8... [DONE] AMLC dataSize=49152, offset=393216, seq=9... [DONE] AMLC dataSize=16384, offset=229376, seq=10... [DONE] AMLC dataSize=49152, offset=245760, seq=11... [DONE] AMLC dataSize=49152, offset=294912, seq=12... [DONE] AMLC dataSize=16384, offset=65536, seq=13... [DONE] AMLC dataSize=1207664, offset=81920, seq=14... [DONE] [BL2 END]
Now lsusb should show the following device:
Bus 001 Device 076: ID 18d1:0d02 Google Inc. Celkon A88
Step 4: Write image to eMMC
run flash-all.sh to write all partitions images to emmc
$ ./flash-all.sh error: no devices/emulators found OKAY [ 0.040s] Finished. Total time: 0.040s OKAY [ 0.039s] Finished. Total time: 0.039s ... Finished. Total time: 0.038s Rebooting OKAY [ 0.002s] Finished. Total time: 0.454s
If zero do not reboot automatically, you should reconnect usb cable to reboot it.
macOS (Apple Silicon/Intel)
For macOS, we use amlogic boot tool to download the bootloader and boot the Zero into the USB Disk mode to export the eMMC to mac as a USB Disk, then we can use dd or other tools to write images to the USB Disk(eMMC).
Step 1: Install pyamlboot tool
brew install python lsusb libusb pip3 install pyamlboot
Step 2: Install fastboot
Nexus Tools is an installer for the Android SDK Platform Tools package, which includes ADB, Fastboot, and other applications. We use Nexus Tools to install fastboot. If you already have fastboot installed, you can skip this step.
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)
After it finishes,
which fastboot
should return you the install location.
Step 3: Boot into fastboot mode
Press and hold the USB boot button on Zero, plug in it to PC, lsusb should see the following:
Bus 002 Device 030: ID 1b8e:c003 Amlogic, Inc. GX-CHIP
Download the fastboot loader and run it on Zero
boot-g12.py Android9_image/bootloader.img
It should output:
Firmware Version : ROM: 3.2 Stage: 0.0 Need Password: 0 Password OK: 1 Writing rz-fastboot-loader.bin at 0xfffa0000... [DONE] Running at 0xfffa0000... [DONE] AMLC dataSize=16384, offset=65536, seq=0... [DONE] AMLC dataSize=49152, offset=393216, seq=1... [DONE] AMLC dataSize=16384, offset=229376, seq=2... [DONE] AMLC dataSize=49152, offset=245760, seq=3... [DONE] AMLC dataSize=49152, offset=294912, seq=4... [DONE] AMLC dataSize=16384, offset=65536, seq=5... [DONE] AMLC dataSize=1406320, offset=81920, seq=6... [DONE] [BL2 END]
Now lsusb should show the following device:
Bus 002 Device 016: ID 18d1:0d02 Google Inc. USB download gadget Serial: 1234567890
The Zero is in fastboot mode now.
Step 4: Write image to eMMC
run flash-all.sh to write all partitions images to emmc
$ ./flash-all.sh error: no devices/emulators found OKAY [ 0.040s] Finished. Total time: 0.040s OKAY [ 0.039s] Finished. Total time: 0.039s ... Finished. Total time: 0.038s Rebooting OKAY [ 0.002s] Finished. Total time: 0.454s
If zero do not reboot automatically, you should reconnect usb cable to reboot it.
FAQ
1. How to erase Android?
A:
- To erase partitions
dd if=/dev/zero of=/dev/<emmc device> bs=1M count=500
2. Why is there no fastboot device?
A: If the board not able to run into fastboot, please try:
- If you can boot to android, try "adb reboot fastboot" or (uart console) "reboot fastboot"
- If you can visit u-boot console, execute command "fastboot"