How to install NextCloudPi on an ODROID-XU4 eMMC module

I am writing this down here because every time I have to do this it is a giant pain to get all the right details together. Hopefully this helps someone else as well.

The original way I was able to do this was via a random forum post that has since disappeared. Thanks goodness the Internet Archive was able to grab a copy of it. That will tell you most of what you need to know, but I am going to write my own version here anyway.

How it works – the short of it is that flashing this Android image puts the necessary hidden partitions in place to allow the ODROID-XU4 to boot from the eMMC module. Then you must copy over the OS you want without writing over those hidden partitions.

This post assumes you can write to the eMMC module and SD card. Etcher, though bloated, does make it easy.

  1. Write the eMMC Android Installer to a SDCARD. You will want to grab their latest Android image from the ODROID wiki: https://wiki.odroid.com/odroid-xu4/os_images/android/android (be sure to grab the one that says from microSD to eMMC Module it will have sd2emmc in the file name).
  2. Setup the ODROID board to boot of SD (move the jumper).
  3. Make sure that the SD card with the Android image and eMMC itself are connected.
  4. Turn on the board and wait for the flash. It should turn from a solid blue light to one that is flashing, or off completely. If in doubt wait 15min.
  5. After the flash is complete, power off the board, remove the SD card set the jumper to eMMC boot.
  6. Check if it booted onto Android. If yes, continue, otherwise double check the first five steps. I was not able to get a screen output on one monitor, but I was another for some reason. If you cannot get anything to display, you can continue and check ssh ports later.
  7. Write the Ubuntu image to the SD card. You can find their latest Ubuntu image from the ODROID wiki: https://wiki.odroid.com/odroid-xu4/os_images/linux/start (I choose the Minimal, Bare OS versions since that is all we need).
  8. Change the jumper to SD boot and boot up with your new SD card with Ubuntu on it.
  9. Check if Ubuntu booted. If so, continue, otherwise double check steps above. You can check by finding the IP on your router, and trying to SSH into it (alternatively you could probably install the full Ubuntu image and use it like a normal operating system).
  10. Power off the board, reconnect the SD card to your PC and copy the NextCloudPi image over. Download here: https://ownyourbits.com/nextcloudpi/ Copy it uncompressed with .img extension, to your SD card rootfs partition.
  11. Connect the eMMC module (with Android installed) as well the SD card with Ubuntu installed, and set the jumper to SD card boot.
  12. Boot Ubuntu, and SSH into it (or open a terminal) and navigate to where you saved your NextCloudPi image.
  13. Now figure out where your eMMC is. Type: ls /dev/mmcblk* Your eMMC will be the device with with boot0/boot1 on it as well p1/p2/p3/p4 as well. We’ll assume that is mmcblk0! You must check for yourself!
  14. On the folder that your NextCloudPi image is type: cat NextCloudPi_OdroidHC2_08-01-19.img | dd of=/dev/mmcblk0 bs=4M
  15. When that command has finished, type: sync
  16. Power off the board, remove the SD card, and set the jumper to eMMC boot.
  17. After powering on again you should be able to visit https://nextcloudpi.local and continue the setup. By default SSH ports will not be turned on.
  18. Enjoy!