Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Zero/install/eMMC Android"

< Zero‎ | install
(Created page with "{{zero_header}} {{Languages|zero/install/eMMC}} Radxa Zero > Installation > Install Android to eMMC === Ho...")
 
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{zero_header}}
+
{{Zero_header}}
  
{{Languages|zero/install/eMMC}}
+
{{Languages|zero/install/eMMC_Android}}
  
     [[zero | Radxa Zero]] > [[zero/install | Installation]] > [[zero/install/eMMC_Android | Install Android to eMMC]]
+
     [[Zero | Radxa Zero]] > [[Zero/install | Installation]] > [[Zero/install/eMMC_Android | Install Android to eMMC]]
  
 
=== How to install Android to Radxa Zero eMMC ===
 
=== How to install Android to Radxa Zero eMMC ===
Line 19: Line 19:
 
     boot.img          dt.img        logo.img      recovery.img  vendor.img
 
     boot.img          dt.img        logo.img      recovery.img  vendor.img
 
     bootloader.img    flash-all.bat  odm.img      system.img
 
     bootloader.img    flash-all.bat  odm.img      system.img
<code>bootloader.img</code> will be needed later to run Zero in fastboot mode.
+
<code>bootloader.img</code> will be needed later to run Zero in fastboot mode. Do not use <code>rz-fastboot-loader.bin</code> as it doesn't have the necessary partition info.
  
 
== Windows ==
 
== Windows ==
  
===== Step 1: Wipe eMMC =====
+
Please follow [[Zero/dev/maskrom#Enable_maskrom | maskrom guide]] to load extracted <code>bootloader.img</code>. Google driver and nexus-tools are required so don't skip them.
  
Please follow [[Zero/install/eMMC_erase#Windows | this guide]] to wipe eMMC. Do not close RZ USB Boot Helper when you finish.
+
Execute <code>flash-all.bat</code> from your extracted Android folder to flash all partitions to eMMC. Some errors about missing file is normal.
  
===== Step 2: Flash Android 9 =====
+
If command line cannot find adb/fastboot, you can add them to PATH variable with <code>set PATH='''YOUR_PATH_TO_ADB_FASTBOOT''';%PATH%;</code> and try again.
  
Select extracted <code>bootloader.img</code> in RZ USB Boot Helper, and click '''Run''' to run Radxa Zero in fastboot mode.
+
You should unplug and replug USB cable after flashing. Otherwise your Radxa Zero will stay in maskrom mode.
 
+
Then Open Windows PowerShell from the Start Menu and execute this command to install <code>fastboot</code> tool:
+
    iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.ps1'))
+
 
+
Execute <code>flash-all.bat</code> from extracted Android 9 image folder to flash all partitions to eMMC.
+
 
+
If Zero did not reboot automatically after flashing, you should reconnect USB cable to reboot it.
+
  
 
== Linux & macOS ==
 
== Linux & macOS ==
For Linux and macOS, we use amlogic boot tool to download the bootloader and boot the Zero into the USB Disk mode. This is to expose the eMMC to host PC as a USB Disk. Then we can use dd or other tools to write images to the USB Disk(eMMC).
 
  
===== Step 1: Wipe eMMC =====
+
Please follow [[Zero/dev/maskrom#Enable_maskrom | maskrom guide]] to load extracted <code>bootloader.img</code>. nexus-tools is required so don't skip it.
  
Please follow [[Zero/install/eMMC_erase#Linux_.26_macOS | this guide]] to wipe eMMC. Please follow till the end of the guide so you are in the correct mode for next step.
+
Execute <code>flash-all.sh</code> from your extracted Android folder to flash all partitions images to eMMC. Some errors about missing file is normal.
  
===== Step 2: Flash Android 9 =====
+
If command line cannot find adb/fastboot, you can add them to PATH variable with <code>PATH='''YOUR_PATH_TO_ADB_FASTBOOT''':$PATH</code> and try again.
  
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.
+
You should unplug and replug USB cable after flashing. Otherwise your Radxa Zero will stay in maskrom mode.
 
+
    bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)
+
 
+
After it finishes, <code>which fastboot</code> should return you the install location.
+
 
+
Now execute <code>flash-all.sh</code> from your extracted Android folder to flash 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 did not reboot automatically after flashing, you should reconnect USB cable to reboot it.
+
  
 
== FAQ ==
 
== FAQ ==
 
===1. How to erase Android?===
 
===1. How to erase Android?===
A: <br>
+
A:
* To erase partitions
+
 
 +
* To erase partitions, first load '''rz-udisk-loader.bin''' in maskrom mode, then run following command:
 
<pre>dd if=/dev/zero of=/dev/<emmc device> bs=1M count=500</pre>
 
<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]
+
* [[Zero/install/eMMC_erase | To erase eMMC bootloader]]
<br>
+
 
 
=== 2. Why is there no fastboot device? ===
 
=== 2. Why is there no fastboot device? ===
A: If the board not able to run into fastboot, please try: <br>
+
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 boot to android, try "adb reboot fastboot" or (uart console) "reboot fastboot"
* If you can visit u-boot console, execute command "fastboot"
+
* If you can visit U-Boot console, execute command "fastboot"

Latest revision as of 10:31, 4 January 2022

    Radxa Zero >  Installation >  Install Android to eMMC

How to install Android to Radxa Zero eMMC

This guide describes how to install Android to Radxa Zero eMMC. Currently there are two types of Android image that can be flashed on Radxa Zero: Android OTA image, which is a zip archive with multiple smaller img files in it; and amlupdate image, which is just one big img file. Android OTA image is a standard image format that can be flashed by fastboot tool, while amlupdate image is a proprietary format and requires aml-flash-tool. This guide will only cover Android OTA image format. User of amlupdate image should follow this guide instead.

Requirement

  • Radxa Zero
  • A PC/laptop running Windows, Linux, or macOS
  • USB A to C cable or C to C cable, depending on your host
  • Android 9 image, which should be unzipped after downloading, and you will find files like this in the folder:
   $ 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

bootloader.img will be needed later to run Zero in fastboot mode. Do not use rz-fastboot-loader.bin as it doesn't have the necessary partition info.

Windows

Please follow maskrom guide to load extracted bootloader.img. Google driver and nexus-tools are required so don't skip them.

Execute flash-all.bat from your extracted Android folder to flash all partitions to eMMC. Some errors about missing file is normal.

If command line cannot find adb/fastboot, you can add them to PATH variable with set PATH=YOUR_PATH_TO_ADB_FASTBOOT;%PATH%; and try again.

You should unplug and replug USB cable after flashing. Otherwise your Radxa Zero will stay in maskrom mode.

Linux & macOS

Please follow maskrom guide to load extracted bootloader.img. nexus-tools is required so don't skip it.

Execute flash-all.sh from your extracted Android folder to flash all partitions images to eMMC. Some errors about missing file is normal.

If command line cannot find adb/fastboot, you can add them to PATH variable with PATH=YOUR_PATH_TO_ADB_FASTBOOT:$PATH and try again.

You should unplug and replug USB cable after flashing. Otherwise your Radxa Zero will stay in maskrom mode.

FAQ

1. How to erase Android?

A:

  • To erase partitions, first load rz-udisk-loader.bin in maskrom mode, then run following command:
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"