NixOS Mobile on OnePlus 6

I was able to checkout GitHub - NixOS/mobile-nixos and build the default image in the git root and flash it to the phone. It boots NixOS but is stuck without ability to interact in any way besides triggering a shutdown.

Then I tried to build examples/phosh for enchilada flavor. I tried cross-compile on NixOS x86_64 and on NixOS aarch64-linux in a Hetzner VM. Build of master was failing. I guess i would require a working unique hash for an older state of the Nix store.

Unfortunately there are no pointers which release could be build successful before.

Anyone could point me to the necessary steps to have a image that boots with ssh support / desktop environment and touch keyboard?

You can try to check hydra to see when the last successful jobset was: Hydra - Evaluations of jobset mobile-nixos:unstable

nixos-mobile has clearly not seen much maintenance lately, so this might be a bit of a job. Good luck!

Hey having a similar problem.
Managed to get the device booting into nixos and enabled networking, set up the wifi config in the options and enabled openssh aswell as activated Autologin.
But the USBC dongle with keyboard doesn’t work and the phone doesn’t connect to the wifi network.
Did you make any progress?

The only image that worked on my oneplus 6 is examples/plasma-mobile on master. examples/phosh crashes. The default image for oneplus 6 reaches stage 2 with only the shutdown button working.

Currently I have the same issue as @tofoo. The usb c port doesn’t work with a keyboard(I prefer a bluetooth keyboard anyway, but still want the usb port work). I can connect to my wifi network.

Most likely kernel modules are missing or not working. Check dmesg, journalctl and whatnot, figure out what’s missing, then chase down the various not working kernel components. You can compare the various branches to see what the actual differences are, and maybe reuse some stuff from the default oneplus image.

It’s pretty common for android phones to need vendor-specific kernel modules, a good portion of which are not separately available from the vendor, let alone open source or up-to-date for the latest kernel. Getting this to run can be a challenge.

@FlafyDev How did you get the plasma-mobile example to build? Are you building it in qemu? I can’t get it to build on my x86 machine.

Also you say “I can connect to my wifi network”… Can you confirm you said you can connect? In that case I’d also love to know how you did this. I would love to just be able to SSH in and run some commands and maybe rebuild the config!

@TLATER How were you able to run these commands? I have yet to figure out how to SSH into my phone.

@tofoo that’s perfect, which image did you build? All I want is SSH access :slight_smile: