Qubes OS for Smartphones

Can we have a project for Qubes OS to run on smartphones ?

Is there any plans for it ?

I think it would be great :wink: :smile:

:rofl:

Good one…

1 Like

Unfortunately no smartphones support hardware virtualization today. Perhaps one can hope to use kvm at some point:

1 Like

I think if there is an official project from Qubes Team we can see certified hardware for smartphones because that might encourage Investors and Entrepreneurs to work on this project .

As we had seen on these supported laptops Certified hardware | Qubes OS

Also, Qubes Team could open a donation for this if they have the passion for this impressive and Future project

I can Imagine my phone with Qubes OS Great :smile:

1 Like

Sounds like way too much work…

1 Like

But worth it :wink:

I don’t know much about ARM and smartphones, but I know a Raspberry Pi 4 can run Xen (flawlessly as per the instructions by the Xen project).
Also when looking at Xen compatible ARM hardware, I see some Allwinner boards, aren’t those used in some smartphones ? Maybe Pinephones use the same board for their SBCs and their phones ?

Requirements:
Currently, qubes is Xen oN X86.
Most phones are ARM. You would have to port Qubes to Xen on Arm, or a port to KVM.

Rregardless, sourcing a phone with components that wouldn’t compromise the security of qubes would be difficult. Camera interfaces to cpu are different, not sure usb-qube would work.

Handling keyboard input would be more complex than you think, as its GUI rendered so to maintain the qubes GUI protocol you’d have to have a gui keyboard in sys-gui and a clear way of preventing full screen windows overlaying this keyboard or impersonating a keyboard. THis, in conuction with the fact that touch input would have to be enabled for the part of the screen with the keyboard into sys-gui, but not for the receiving qube.

I believe current systems that work on mobile just have android environments you switch between, taking full screen control, instead of more intricate compartmentalisation.

As future goes on ARM will likely be replaced with RISCV, currently this has the possible issue of different vendors having different instruction set extensions which you may be forced to rely on, hence supporting RISCV may not be easy straightforward.

Must re-iterate, a major issue as I understand it is that phone peripherals typically have a DMA equivalent (directory memory access) to the processor, not PCIE channels or usb interface (which is what enables ‘secure’ passthrough of devices), like Intel desktop cpu.

Thanks for the insights !

What are the specific bits of Qubes which are tied to x86 (as Xen supports both “out of the box”) ? PCI passthrough or other stuff ?
No one has tried to hack Qubes on a Raspi4 yet ? ^^ With a touchscreen and a SIM800 or equiv, that could be turned into a phone. A big one, but fully OSS, hard+soft !
I’ve read that a major problem with creating and maintaining phones is the lack of communication from SoC producers.

The keyboard problem seems a tough one for sure.
As for full screen windows, it may be changed to “partially full screen”, with the Qubes colored title bar always on top ?
Have you read the part about DMA/physical translations on the Xen project page ? I dunno if it applies to peripherals too, but they had to hack it to make it work on Raspis.
Note I’m in totally unknown territory here, just trying to understand ^^

It’s not: Raspberry Pi - Wikipedia and Raspberry Pi - Wikipedia. Have a look at Librem 5 and Pinephone for freer smartphones.

Ah, I thought using uboot would remove the use of proprietary software (replacing bootcode.bin), I forgot the GPU blobs. But it seems there’s work on that !
A new fork of the (now abandonned) project linked in the wiki article is here, but ok with minimal support it seems.
Also I found RPi-VK-Driver is a low level GPU driver for the Broadcom Videocore IV GPU.
But proprietary blobs apart, I wish I had a Raspi4 to try Qubes on ^^

I had, and considered Fairphone too. I’m quite interested in technical comparisons between them, as I’m in the process of choosing a smartphone (was using a good old w880i till now, since 10+ years). I have harsh requirements though …

1 Like

Wow that’s a nice comparison chart, many thanks !

That’s Qubes compliancy, welcome sys-serial VMs ! ^^

Very promising !

I don’t see the fairphone though, what’s your take on this ?

1 Like

I suspect most phones do not have proper IOMMU. But Pixel phones have this (and hopeful pixel tablets will have that too.
GrapheneOS has something like qubesOS in the long term road map. But not in the comming months, for sure…
I am not technical enough to judge, but google fuchsia seems preety promissing in the long run too (as an alternative to xen)

The closest thing we have on smartphones is using profiles on android or some “compartmentalization” things on android (can’t remember their names).

But there is interest in doing smartphones on Qubes OS:

Isn’t that a x86 feature only ? I’ve read ARM defines its version of IOMMU as System Memory Management Unit (SMMU)[13] to complement its Virtualization architecture (wikipedia-IOMMU).
Hmm, recently watched a video about Fuchsia, you’re talking about microkernels ? Cause I don’t remember it was about virtualization, rather abandoning “monolithic kernels” ?
By the way, no need for a IOMMU if there’s no DMA, but again I may be wrong.

The chart linked from fsflover shows Android apps 9 can be run in Anbox, is that it ?

Damn, I have so much things to learn, as if x86 wasn’t complicated enough ^^

Have a look at Fairphone’s mentions here: https://source.puri.sm/Librem5/community-wiki/-/wikis/Frequently-Asked-Questions.

Key takeaway:

many component suppliers (like Qualcomm) don’t release new drivers compatible with new kernel versions, so many Android phones have to stay with the old kernel when they upgrade Android. The most extreme example of this is the Fairphone 2 whose last official upgrade in December 2019 was Android 7.1 with Linux kernel 3.4.0, that was released in May 2012. Even when installing a community port of AOSP like LineageOS, it will often use the same kernel that was last provided by the phone maker.

Basically, the main problem is proprietary drivers that prevent upgrading the kernel. All drivers must be free.

Damn the 500k fees from google … And [google] has a policy of only supporting its Android releases for 3 years is even scarier … And people (including me) think microsoft is evil with such short Windows EOLs …
But one should always read with caution the comparison of other solutions from a competitor, even if on fair/objective grounds ^^ I won’t disagree though, I had this answer from fairphone :

But the same precaution as above applies of course ^^ And the other part of the answer, about repairability didn’t convince me a lot (no MoBo/SoC exchange possible, some repair operations need to send to customer support, etc).

Can only wish the same, but it does not feel like the trend … It’s like having a driving license per car brand, and issued by the car manufacturer ^^

@deeplow:

But there is interest in doing smartphones on Qubes OS

This is about running Android/GrapheneOS WITHIN A QUBE on Qubes OS. It is NOT about running Qubes OS on a smartphone. I am sure this is what @deeplow meant, but at least for me (non-native English speaker) it wasn’t clear from the above sentence.

Not to mention it’s quite possible that running full-blown Qubes OS would need a pretty hefty battery, otherwise the phone would be permanently plugged into the wall.

For those of you who have used the PinePhone, you’ll know that it generates quite a large amount of heat, and the battery (at least, at the time of posting this) barely lasts for half a day when idle. I would imagine running Qubes OS in its current form on hardware like that would probably be incredibly slow, if it didn’t melt the phone case first…

Not to mention the amount of RAM the phone would need! :joy:

Another thing to consider is the use case. I definitely agree that it would be totally awesome to carry Qubes OS around in your pocket, but would I use Qubes OS as a phone? Probably not. Why? Because I probably wouldn’t be using my phone to do the things I use Qubes OS for.

I don’t really plug anything into my phones except for headphones and a charging cable. (I am aware that some people might plug in other things, though).

It would be nice to see Qubes OS on ARM one day (and I will gladly help out where I can), so that we could see it on machines like the PineBook Pro, Surface ARM, M1 Macs, SBCs (the RockPi 5B looks like a seriously good candidate for Qubes OS).

It would also be awesome to touchscreen/stylus integration, because quite a few laptops come with them now. Again, happy to help out where I can on this.

But as for Qubes OS on a smartphone….well……so much of it would need to be changed that it probably wouldn’t be the Qubes OS we know and love any more….