This will build the default output for your Motorola Moto E6.
$ nix-build --argstr device motorola-surfna -A build.default
The device will need to be booted in its bootloader, or
The boot image can be installed using the following command, assuming it was
built using the previous command.
If you have a system image (
system.img) built, you can use
flash it to the device. Note that it might be too big to fit over the
partition. In such case, it can be flashed on the
This will erase everything on the partition. Additionally, the
common backups methods, e.g. TWRP, will not backup the
$ fastboot flash userdata system.img
fastboot to burn system.img to the userdata partition will fail with
flash permission denied error.
The current workaround is to
fastboot boot the "android burn tool" and use
ssh to flash the image.
$ cat .../system.img | bin/ssh-initrd dd of=/dev/disk/by-partlabel/userdata bs=8M