Cannot enter usb mode

Hello and thanks for all the effort of designing this awesome little board.

I received two zeros recently. Both are the 4gb/32gb model. One of them has been working fine with the armbian image. I installed armbian to the other one and after an accidental upgrade it broke and was not booting. I wanted to just reflash again. I followed the following steps:

installed the utilities with
sudo apt install python3-pip
sudo pip3 install pyamlboot

-Connected the zero by pressing the usb boot button.
-lsusb lists it as ID 1b8e:c003 Amlogic, Inc.

-I ran the command boot-g12.py ./rz-udisk-loader.bin and got the expected console output:
Firmware Version :
ROM: 3.2 Stage: 0.0
Need Password: 0 Password OK: 1
Writing ./rz-udisk-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]…
but then the dmesg log doesn’t show any change in the device and the zero never enters usb disk mode.

I am using a raspberry pi4 with raspberry pi os as a host for this process. I tried connecting the zero directly, and also thourgh a powered USB 3.0 hub to rule out power issues, but the result is the same. Also tried in a win10 machine, and after running the usb-disc.bin image nothing happens, the zero never shows up as a drive for the system.

is the board damaged?

[Edit:added details about model]

Update: I flashed the Radxa zero armbian image in an SD card and booted from it. The OS seems to work fine so there seems to be no apparent damage to the board. A quick check with lsblk shows the follwing:

NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk1      179:0    0 29.7G  0 disk
└─mmcblk1p1  179:1    0 29.4G  0 part /
mmcblk2      179:32   0 28.9G  0 disk
mmcblk2boot0 179:64   0    4M  1 disk
mmcblk2boot1 179:96   0    4M  1 disk
zram0        252:0    0  1.9G  0 disk [SWAP]
zram1        252:1    0   50M  0 disk /var/log

Apparently mmcblk2 is the EMMC and there are also other two block devices which seem to be boot partitions.

At this stage, I can run gparted and see the EMMC, I also can write to it if I use dd. I tried writing the img file for armbian using the following command:

sudo dd if=/path/to/image of=/dev/mmcblk2
sync

The image seems to be written fine as I can mount the partition and browse the files, but when I turn off the zero, remove the SD card and power on again, it doesn’t boot from the EMMC.

Am I doing somthing wrong? or is the EMMC damaged in some way?

Why don’t you try Windows USB burning tool? (As descripted in LineageOS for Radxa Zero, in this forum)

It was a straightforward process for me, and It seems to fully manage eMMC erasing, and bootloader. And all from GUI.

Also take a look at https://github.com/radxa/documentation/tree/master/rs102

I think Radxa Zero looks for eMMC bootloader first at boot. If not found, then goes to SD…

"Use fastboot to erase the eMMC

sudo fastboot flashing unlock_critical
sudo fastboot flashing unlock
sudo fastboot erase bootloader
sudo fastboot erase bootloader-boot0
sudo fastboot erase bootloader-boot1

The eMMC is completely wiped now, unplug and plug the USB C cable. Insert a bootable uSD card, the Zero should boot from it"

1 Like

Thanks for your reply. In fact the first time I flashed the arm Ian images, I did it on a win10 machine. I used win32diskimager for it. Both of my zero’s booted fine when I did that. But now for some reason one of them is acting up and not being recognized as a USB disk when I run the USB boot image. That’s why I tried the Linux method as well, but to no avail.

Thanks for reminding me of this. The last time I tried to reflash the images, I did not erase the EMMC by running the factory image first. I tried to go straight to the USB disk mode. I’ll try to erase the EMMC by running the factory.bin image and then will try to run the usb-disk.bin image.

I’ll report back my findings.

1 Like

Update2: I connected the zero to the win10 machine, ran the factory.bin image, and erased the EMMC. Then I ran the u-disk.bin image, and voilá! The zero was recognized as a USB drive. I flashed the debian image an are now having fun customizing it to my liking.

Originally I didn’t erase the EMMC because the wiki said it is recommended to do so when you still have the Android os installed from factory on it (which I erased when I first flashed the armbian image), and an optional step if you don’t. I guess the recommendation in the wiki should be to always erase the EMMC entirely whenever doing a reflash.

Anyway thanks to Tiny for reminding me of that step. Otherwise I wouldn’t have thought it was needed and would have never tried it.

Goodday,

I am experiencing the same issue, I have been pleying for a week now and have not been able to get the zero booting from emmc. Booting armbian from uSD works fine (lsblk gave same result).
I have followed the GUI method and untill yesterday I could come into USB boot mode after erasing & flashing rz_udisk_loader.bin to emmc. But now this stopped working!!!

I can still execute the steps but the zero wont boot after flashing into USB mode. Instead it seems to hang and crash the RX USB Boot helper program. When I reboot manualy it always boots into maskrom mode.

BTW it also always boots in maskrom mode after flashing armbian to the emmc.

Any tips. THX

Hello Mikillu,

It is possible that the program is stuck because the USB communication is interrupted.

Can you try a different cable and a different USB port?

Hi
Same issue
lsusb never shows ```
ID 18d1:fada Google Inc. USB download gadget Serial: AMLG12A-RADXA-ZERO


root@hp:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 05c8:0383 Cheng Uei Precision Industry Co., Ltd (Foxlink) HP HD Camera
Bus 001 Device 009: ID 1b8e:c003 Amlogic, Inc. GX-CHIP
Bus 001 Device 003: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@hp:~# boot-g12.py rz-udisk-loader.bin
Firmware Version :
ROM: 3.2 Stage: 0.0
Need Password: 0 Password OK: 1
Writing rz-udisk-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]
root@hp:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 05c8:0383 Cheng Uei Precision Industry Co., Ltd (Foxlink) HP HD Camera
Bus 001 Device 009: ID 1b8e:c003 Amlogic, Inc. GX-CHIP
Bus 001 Device 003: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Am having the same issue, the board goes to maskrom mode without pressing on the “USB boot” and I can’t get the board to go to usb mode. I did inspect the boot button, I can hear it clicks and I do feel it does go down when I press down on it - not stuck.

I did use the fastboot commands on Windows 10 terminal, with no luck. I used the RZ_USB_Boot_Helper_V1.0.0 & factory-loader.img to get the board to fast boot

----------  start run  ----------
Firmware Version:
ROM: 3.2 Stage: 0.0
Need Password: 0 Password OK: 1
Writing C:/RZ_USB_Boot_Helper_V1.0.0/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]
----------  run done!  ----------

Then close the RZ_USB_Boot_Helper_V1.0.0 and did the following on the window terminal

C:\platform-tools_r31.0.3-windows\platform-tools>fastboot devices
1234567890      fastboot

C:\platform-tools_r31.0.3-windows\platform-tools>fastboot flashing  get_unlock_ability
(bootloader) get_unlock_ability:1
OKAY [  0.059s]
Finished. Total time: 0.060s

C:\platform-tools_r31.0.3-windows\platform-tools>fastboot flashing unlock_critical
OKAY [  0.040s]
Finished. Total time: 0.041s

C:\platform-tools_r31.0.3-windows\platform-tools>fastboot flashing unlock
OKAY [  0.042s]
Finished. Total time: 0.043s

C:\platform-tools_r31.0.3-windows\platform-tools>fastboot erase bootloader
Erasing 'bootloader'                               FAILED (remote: 'locked device')
fastboot: error: Command failed

Before I forget, I did use different ports and usb-c cables,

B.T.W am new to this and it could be am overlooking some really important.

Thanks and regards

I did manage to get the board not to go to maskrom mode by following the steps found in https://wiki.banana-pi.org/Getting_Started_with_BPI-M5#Android

I do not recall where I did get the “aml_upgrade_package.img”, but I did download it from https://download.ods.ninja/Android/firmware/radxa0/aml_upgrade_package.img, after checking my browsing history

After a successful burn, I stopped then close the application.

Now your board should not go to maskroom mode as soon as you plug USB-C into the board, back to normal operation.

Follow the step found in https://wiki.radxa.com/Zero/install/eMMC to get your board to act as USB flash

Note:
I end up in maskrom mode stuck at the start after successfully burning one of the two images of Manjaro (minimal, xfce) to the eMMC. The image could be found at https://github.com/manjaro-arm/radxa-zero-images/releases/tag/20210906.

Hopefully, this would help you out.

Hello Hilal. > Also tried the fastboot commands but for some reason they didn’t work for me either. The only thing that worked was the RZ_USB_Boot_Helper_V1.0.0 app for windows. You can erase the EMMC and put the zero into USB-disc mode from there.
After you run the RZ_USB_Boot_Helper_V1.0.0 & factory-loader.img, do not close the RZ_USB_Boot_Helper_V1.0.0 app, and click on the “Erase” button. You should see two OKAY messages. This will erase the EMMC the same way you would do it with the fastboot commands. After this, click the “Select” button again and open the “rz-udisk-loader.bin” file. Click on “run”, and now your zero should pop up as a storage device in the “this PC” window of the file explorer.

For anyone else struggling to get the radxa zero into usb mode (on Windows 10 specifically), make sure you are holding the USB boot button BEFORE you plug it in to your computer. Essentially, you need to be holding that USB boot button as it powers on.

If you try to plug it in, then hold the USB boot button, it won’t work.

Took me a while to figure out what i was doing wrong.

After you get that working, follow all the steps on this page to erase the eMMC: link

One thing to note: on the page above explaining how to erase the eMMC, they left out the final and most important step:

  • download the rz-udisk-loader.bin file from here
  • Use the RZ USB boot helper program to load that file on to the radxa zero.
  • after doing that, your radxa zero will show up as a USB storage device.
  • You will also probably need to format the radxa zero’s USB storage device like I did (fat32).

After you’ve successfully erased the eMMC and got it to show up as a USB storage device, simply use Etcher or win32diskimager to flash an image to it.

The issue I was having, the board goes to “maskrom mode” without me pressing on the “usb boot” button on the back of the board

I did follow the steps till the end, I did install Debian and Ubuntu on the board before but after installing Manjaro, which failed to load, I start having the issue with board. I could not get the board to go to usb flash anymore.

  1. Did use the factory-loader.img, “Run” the 1st time then “Erase” then 2nd time, without closing the Application

  2. But when try to flash “rz-udisk-loader.bin” while application is still open, it appears it was able to flash the file, but I never get the popup from windows, then the application stop responding all together.

Followed the same steps using different cables, ports and computers with no luck. Anyway I do not have the the issue anymore. As I was able to make the board stop going to “maskrom mode” without pressing on the “usb boot”.

Am thinking maybe I should create a video showing the issue and how to fix it.

Hopefully I did not make it more confusing, English is not my 1st language … (^_^)

Great to know you are not having the issue anymore and if you can upload a video about your issue and how to fix it would be of great help to others that might encounter this.

Hi again. I wish to know what “maskroom mode” is. And Zero booting process in detail.

I mean, i have good understanding of Windows x86 booting process.

BIOS/UEFI code boots and after some hardware checks, points to first active partition of user selected drive.

There, PBR (partition boot record code) takes the lead and tries to find his kernel (Win/Linux/osx/you-name-it) and whole system starts.

  1. So, Radxa Zero has any “BIOS”? Can we change it to gain any functionality?

I mean, I think by default Zero tries to boot from eMMC if it is properly structured (boot partitions?) If not found, or inaccesible, looks for SD card.

Is there any “BIOS code” we can change for set SD card as default boot Drive?

  1. What does “BOOT” button really does? stops booting process and gives access to fastboot commands? And when eMMC is mounted as mass storage device? In this mode?

  2. I’m looking for some grub4dos boot management… This way I could boot android, Linux, etc from multiple partition scheme. Any idea about that?

Thanks in advance!

https://www.google.com/search?q=maskrom+mode+amlogic Single chip family or vendor (usually) boots the same.

No.

1 Like

Thanks, much clear now :point_down:

Are you sure Radxa Zero doesn’t have any BIOS-like memory on board? Raspberry Pi 4 does indeed… :point_down:

@igorp thanks for your support!

I am one hundred percent sure.