apsu:nakasi-krt16s cheesey$ fastboot erase boot
ERROR: could not get pipe properties
erasing 'boot'... OKAY
And then, later:
sending 'system' (611886 KB)... ERROR: usb_write failed with status e00002be
FAILED (data transfer failure (No such file or directory))
And again, later still:
getvar:version-bootloader FAILED (remote: (Nv3pBadReceiveLength))
The results for searching for error e00002be on the Internet seemed to result in a lot of people thrashing around being ad-hoc, but the actual problem (at least for me) was embarassingly simple:
I was accidentally using an absolutely ancient version of fastboot.
Using a more recent fastboot solved the problem entirely. Unfortunately fastboot doesn't have a --version option or anything similar but the newer versions have a longer help message.
$ fastboot 2>&1 | wc -l
$ /SDKs/Android/fastboot 2>&1 | wc -l
If in doubt, there's an up-to-date fastboot included as part of the Android SDK for your platform (in the platform-tools directory).
$ tar xzf rpcemu-0.8.11.tar.gz
$ cd rpcemu-0.8.11
$ patch -p 1 < /path/to/rpcemu-0.8.11-openbsd.patch
So, what is this patch actually doing?
I'm glad you asked. All it changes is a few preprocessor bits:
- The type off_t in OpenBSD is always 64 bits wide. Other OSes have different sets of functions for 64-bit offsets. There's already support for aliasing the explicitly 64-bit names to the "normal" names for __MACH__ in rpcemu.h. The patch adds __OpenBSD__ to that, so that that aliasing will happen under OpenBSD as well.
- The hostfs.c file uses utime.h. If __unix or __MACH__ are not defined, it tries to include it as sys/utime.h. On OpenBSD, it isn't in sys/, and __unix isn't set in gcc. So the patch adds __OpenBSD__ to this line, too.
- The rpcemu.h file uses the existence of _BIG_ENDIAN to check for the host being big-endian. Unfortunately, on OpenBSD this is always in existence as is _LITTLE_ENDIAN and the _BYTE_ORDER macro switches between them. So this patch replaces the compile-time check for big-endianness in rpcemu.h to check _BYTE_ORDER.
Hopefully this stuff won't be necessary by the next release!