1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 11:03:37 +03:00
mobile-nixos/examples/demo
2020-12-27 17:38:29 -05:00
..
xdg examples/demo: Notifications should not be focusable 2019-12-05 23:51:07 -05:00
android-burn-tool.nix examples/demo: Fix adbd enable in burn tool 2020-05-31 18:54:07 -04:00
configuration.nix examples/demo: Add file 2020-12-27 17:38:29 -05:00
default.nix examples/demo: Fix error reporting by importing 2020-05-31 18:54:07 -04:00
README.md demo: Greatly simplifies burn-tool 2020-02-03 16:19:10 -05:00

Warning

: This is still highly experimental. This is not usable as a daily driver.

Building

The stage-2 needs to be built natively on the target architecture (armv7 on armv7, aarch64 on aarch64).

(Though the tooling will try to build it through cross-compilation!)

Note that this has been verified to work on asus-z00t on September 24th 2019, using nixpkgs commit d484f2b7fc0834a068e8ace851faa449a03963f5.

It should be possible to build both boot images via cross-compilation.

Burning

To burn the image, build the android-burn-tool, then fastboot it.

nix-build examples/demo/ --argstr device asus-flo -A android-burn-tool
fastboot boot result

Once booting, it will show a yellow screen, then either a red or a green screen. The green screen means that it has found the expected partition to flash. A red screen means that the user will need to check what is up.

The command will look like:

dd if=system.img bs=2M status=progress | bin/ssh-initrd dd of=/dev/[...] bs=2M

Booting

The boot.img image can be fastboot flash'd into the boot partition, or it can be fastboot booted.

The boot.img boot image is expecting to find the system partition using its label.

It should also be possible to do this entirely statelessly by burning to an SD card, and fastboot booting the device.