3

Some tutorials recommend making modifications to files such as wpa_supplicant.conf within the Android Things image file, as per this answer https://stackoverflow.com/a/41732035/766115. I'm trying with the Android Things developer preview 4.1 image file.

However, I've had no luck mounting this file for editing purposes on OS X. Various attempts to use os x Disk Utility or the mount command from the terminal all result in some type of error message telling me the file format is not compatible. I can see in Disk Util, or through terminal mount, that the ISO image has 15 sectors (or partitions), but I can't access them.

I've even tried spinning up an Ubuntu in AWS, uploading and mounting from there. No dice.

   mount: wrong fs type, bad option, bad superblock on /dev/loop0,
   missing codepage or helper program, or other error

   In some cases useful info is found in syslog - try
   dmesg | tail or so.

Any advice? What am I missing.

JTE
  • 1,301
  • 12
  • 14
  • What does your syslog say? Where is this ISO file? How exactly did you try mounting it? I'm not sure how to debug this if I can't reproduce it. – Ssswift Jul 04 '17 at 14:43
  • 1
    Alternatively, if no luck, and in case you have a [USB to TTL cable](https://www.adafruit.com/product/954), you could [connect to serial debug console](https://stackoverflow.com/q/43554006/3290339) and edit `wpa_supplicant.conf` on the device (using `echo`). The answer referred contains solutions for `Ubuntu` and `Windows` OSs though, but you're very welcome to provide one for `Mac` OS. – Onik Jul 04 '17 at 19:14
  • I'm trying to mount the Android Things image, specifically Android Things dev preview 4.1. – JTE Jul 07 '17 at 11:53

2 Answers2

4

On macOS I have done this way:

  1. Connect the sdcard on your Mac
  2. Run on terminal diskutil list and see the name of your sdcard (in my case /dev/disk2s1)
  3. Create a directory where the sdcard will be mounted: sudo mkdir -p /Volumes/pisdcard
  4. Mount the sdcard: sudo mount -t msdos /dev/disk2s1 /Volumes/pisdcard
  5. Edit what you want and unmount the sdcard with: sudo umount /dev/disk2s1

It worked for me, I used to change config.txt and cmdline.txt to change UART mode and use a GPS module on Android Things.

1

hdiutil attach [file] is the macOS command to treat an image file as a disk device. If the image file contains a filesystem macOS can read, it should also mount any volumes contained in the file. If your image contains a volume not supported by macOS (e.g., ext4), you also need to install an appropriate driver before you can mount the volume.

shebang
  • 1,655
  • 1
  • 12
  • 12
  • Same as with Disk Utility, this returns the following error message `hdiutil: attach failed - no mountable file systems` – JTE Jul 07 '17 at 11:51