frederic / superbird-bulkcmd

Spotify Car Thing (superbird) resources to access U-Boot shell over USB
247 stars 14 forks source link

scripts/update-kernel.sh fails to boot device #9

Closed whitea17 closed 1 year ago

whitea17 commented 2 years ago

Hi, I am trying to gain a root shell via ADB without taking the device apart. Here are the steps I took:

  1. Place the device in flash mode with key combo at power on.
  2. Run ./scripts/burn-mode.sh
  3. Run ./scripts/update-kernel.sh

When I follow the above steps, I get the following error message and the device remains in burn-in mode.

AmlUsbBulkCmd[amlmmc env]
[AmlUsbRom]Inf:bulkInReply success
..
Transfer Complete! total size is 570 Bytes
AmlUsbBulkCmd[env import -t 0x13000000 0x23a]
[AmlUsbRom]Inf:bulkInReply success
......................................................................................................................................................................................................................................................................................................................................................................................................................................
Transfer Complete! total size is 13780992 Bytes
......................................................................................
Transfer Complete! total size is 2788757 Bytes
Booting...
AmlUsbBulkCmd[booti 0x01080000 0x13000000]
[AmlUsbRom]Inf:bulkInReply failed:
ERR: AmlUsbBulkCmd failed!

Additional debugging steps taken:

Any thoughts on how to fix this?

frederic commented 2 years ago

Run ./scripts/burn-mode.sh Run ./scripts/update-kernel.sh

You cannot chain these two commands, it will fail. To execute update-kernel.sh, you must boot normally, with the device connected to your computer via USB cable.

whitea17 commented 2 years ago

Run ./scripts/burn-mode.sh Run ./scripts/update-kernel.sh

You cannot chain these two commands, it will fail. To execute update-kernel.sh, you must boot normally, with the device connected to your computer via USB cable.

As soon as I boot normally, the USB device disappears. Is this step (below) a requirement or optional (I didn't do it, thinking I could just use ./scripts/burn-mode.sh every time, my main pwr source will be a pc)?

./bin/update bulkcmd 'amlmmc env'
./bin/update bulkcmd 'setenv storeargs ${storeargs} run update\;'
./bin/update bulkcmd 'env save'

Also, from the readme...

Boot kernel from USB to enable ADB access Once the device in USB burning mode, the script [scripts/upload-kernel.sh](https://github.com/frederic/superbird-> bulkcmd/blob/main/scripts/upload-kernel.sh) can upload a Linux kernel image and boot it.

Edit: Qouted info from readme

frederic commented 2 years ago

Is this step (below) a requirement or optional (I didn't do it, thinking I could just use ./scripts/burn-mode.sh every time, my main pwr source will be a pc)? This step is required to execute upload-kernel.sh. Otherwise, it doesn't work. Please see #5 .

Also, from the readme... This implies the previous guide was followed, including the step that modifies the env.

lmore377 commented 2 years ago

As soon as I boot normally, the USB device disappears. Is this step (below) a requirement or optional (I didn't do it, thinking I could just use ./scripts/burn-mode.sh every time, my main pwr source will be a pc)?

It's not optional unfortunately. After doing that step the car thing should get stuck on the spotify logo when booting "normally" and from there you can run upload-kernel.sh. From what I can tell, burn-mode.sh just straight up doesn't initialize some critical parts like the display so uboot just can't start the kernel.