Preparing an SD card using an Android device

I was wondering whether it possible to prepare an SD card with the latest stable release using an Android device as explained in this link.

The reason I am looking to use the latest release is that I am getting an “ERROR” screen whenever I try to switch off the device. Since updating did not solve the issue, I got an new SD card to try the new release. However, I do not have an SD card reader in my computer and the only way to prepare the card is by using my phone.

I’m gonna go out on a limb here and suggest that maybe buying a $5 USB SD card reader would be a better option.

Think of it this way, how much is $5 of your time worth. :wink:

I am afraid that this is not an option. SD card readers retail 40+ EUR at the shops in my area, and I already paid 18 EUR for the SD card.

Wow different worlds. I can order one online and have it here for tomorrow for £5.

Many SD cards are sold with a USB adaptor, otherwise you can get one for 5€

I am sure there are, but I am not looking to buy additional hardware just to upgrade to the latest version.

TBH I don’t see a way to upgrade unless you can wite an image to the SD Card as there is no sane way to upgrade from the former stable release.

If you are using a staging-2210 the update should work, I have tested it several times. You should enable Advance View in Software-Repositories and choose the testing repos.

I am actually looking for a way to write an image to the SD card and asking whether I can do this without using my computer.

You need to acces de SD card in order to write it, so you have to be able to mount it.

I can access it through an Android device. There are apps that allow you to prepare an SD card using an Android device. My question therefore was whether I can use these instead of the proposed Windows software.

schrodinger’s SD card!

To copy an image into an SD card you need to see a device in /dev -something like /dev/sdX where is X in a,b,…z) where the SD card is detected.

First you’d need a terminal, that is available. Then you could use dd which I think it’s already installed. Finally you’d need to copy the zynthian image into the andriod filesystem, doable too.

If you do, then you can simply use a terminal and dd to copy the image, but I have to recognise that even for me it’s a little cumbersome.

1 Like

As @pau says, it can be done, but it’s not the easier way. Good luck!!

1 Like

That’s very helpful, thanks!

There is an Android app called “Pi SD Card Imager” which is designed for this purpose but the reviews suggest it does not work with custom images (like ZynthianOS). It won’t work on my Chromebook because the SD card is not exposed as a raw device to the android application (probably due to the emulation layer). You would need to download the image to your Android device’s internal storage (requiring over 7GB spare capacity on your Android device’s internal storage) then use the custom image option to write this to a micro SD.

[Edit] I just confirmed that Pi SD Card Imager fails to write custom OS with my Android phone (Moto G5) but then I read that it requires the Android device to be rooted to write custom OS. If your Android device is rooted then you may have success. It is a bit fiddly:

  • Install Pi SD Card Imager on Android device
  • Download Zynthian OS image to a location the Android device can access
  • Run Pi SD Card Imager
  • From “…” menu select “Format SD”
  • Select SD Card from drip down
  • From “…” menu select “Format”
  • Confirm
  • Back to main screen
  • From “…” menu select Custom OS
  • From “hamburger” menu select storage device then navigate to select zynthian OS image
  • From “…” menu, select “Choose SD or USB” (I couldn’t select by clicking on the icon)
  • From “hamburger” menu select SD card (by name)
  • “CREATE NEW FOLDER” or use existing empty folder to mount SD
  • “ALLOW” access
  • “Write to SD”
    At this point it fails if the Android device is not rooted. I have written one of the built-in images using the app (although not tested it).

[Edit] The RiscOS image I flashed did not boot.

I finally managed to get a card reader at a reasonable price (EUR15, after browsing every possible store locally, and having people trying to sell me devices for EUR110). However, when I tried to prepare the SD card using the Etcher software, the process failed. Now my computer cannot even recognize the SD card in the card reader. Any ideas?

In linux it’s really easy:
-identify the device (i.e. /dev/sdb)
-dd if=zynthian.img of=/dev/sdX bs=8192

I’ve never used anything else :slight_smile:

Just got a breakthrough. Seems that the port of the SD card reader was finicky. I used the other port on the reader and was able to prepare the SD card. Off to my Zynthian now!

1 Like

To bad we can’t use the network install function that the pi 4 now supports…

I use a raspberry pi running the 64bit os and a USB based reader/writer there is a tool called imager which seems to do the job rather well.

dd is the command line purist way of doing it.