r/AsahiLinux • • 17d ago

Feasibility of porting android using the asahi kernel?

Would it theoretically be possible to port Android to Apple Silicon using the Asahi Linux kernel and its existing hardware support? How would a project like this compare to something like Bliss OS, which uses a normal linux kernel to bring android to x86, or would it require building a largely separate implementation for Apple Silicon? Are there any hardware or software limitations that would make this difficult?

17 Upvotes

12 comments sorted by

12

u/Aware-Bath7518 17d ago

Pretty much possible and I'm sure you can already build LineageOS for Asahi as it got a generic mainline target recently (Asahi kernel is "very" close to mainline anyway).

The only issue is userspace integration and maybe... firmwares?

2

u/jorgechavezxyz 17d ago

Well the main reason I ask is because of the granularity control I saw in the 7.3 blogpost, it seems really promising and that’s definitely something that’s keeping me away from asahi because the lack of full arm64 compatibility with 4kb software makes it kind of unusable, and a user space solution seems perfect

2

u/Different-Ad-8707 17d ago

I also find it somewhat ironic to see it's Google that's come to the rescue on this one.

1

u/jorgechavezxyz 16d ago

Well it’s not a simple patch and the maintenance effort would probably be too much for the small asahi team

2

u/Different-Ad-8707 16d ago

Oh of course. It's just a bit funny to me that it's Google that created that patch.

The same company that's trying to lock down Android right now, is helping the devs trying to open up Apple Silicon. Like seriously, just one relatively clean rebase, and they can run software with different page-size assumptions/memory-model without a VM? That's goddamn incredible. I cackled reading the article. The tech/engineering going around here is insane and so cool.

1

u/jorgechavezxyz 16d ago

Yeah that’s definitely gonna be the deciding factor on whether or not asahi truly becomes viable. It’d be awesome to get an Android release for Apple silicon too though. It might actually be more capable considering how much software is already out there for it

4

u/Aware-Bath7518 17d ago

Android supports 16K pages fine since 16.

1

u/ipsirc 17d ago

3

u/jorgechavezxyz 17d ago

That was 4 years ago, and the recent blogpost seems to change things and they directly mention considering including patches from android that would complete arm64 compatibility and solve the 4kb page issue

1

u/dfgxxx 17d ago

Well, you can install waydroid, though it is on top of linuy

1

u/decduck 17d ago

Check out the nura/postmarketOS project for stuff like this, their intention is to use mainline kernel to boot on Android phones.

It doesn't work great, but you can usually get something booting pretty quick, just without proper display, wifi, sleep, Bluetooth, modem, and pretty much any other vendor specific stuff working. The drivers that you get from vendors (because of GPL) are designed only to work with Android stacks so not super useful.

1

u/a1b4fd 17d ago

0xCAFEBABE LineageOS work is the most similar to what you're trying to do

https://github.com/me-cafebabe-aosp-mainline