I try to flash the original android image
by doing
adb sideload /home/hetzer/Desktop/hammerhead-m4b30z-factory-625c027b.zip
Total xfer: 0.00x
Then I tried
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot flash bootloader bootloader-hammerhead-hhz20h.img
fastboot reboot-bootloader
fastboot flash radio radio-hammerhead-m8974a-2.0.50.2.30.img
fastboot flash radio radio-hammerhead-m8974a-2.0.50.2.30.img
fastboot -w update image-hammerhead-m4b30z.zip
extracting android-info.txt (0 MB)...
extracting boot.img (8 MB)...
target reported max download size of 1073741824 bytes
archive does not contain 'boot.sig'
archive does not contain 'dtbo.img'
archive does not contain 'dt.img'
extracting recovery.img (9 MB)...
archive does not contain 'recovery.sig'
extracting system.img (996 MB)...
archive does not contain 'system.sig'
archive does not contain 'vbmeta.img'
archive does not contain 'vendor.img'
wiping userdata...
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
mke2fs 1.45.5 (07-Jan-2020)
/tmp/TemporaryFile-wRGgYM: Unimplemented ext2 library function while setting up superblock
/usr/lib/android-sdk/platform-tools/mke2fs failed with status 1
mke2fs failed: 1
error: Cannot generate image for userdata
Then, it is just stuck at bootloader.
Then I reinstall ubuntu touch and it seems to work