Telephony stack


some of you know that I try to get the telephony stack working the “run Firefox as SystemUI”-way. I talked about it with @fabrice about it. The plan is to make the RIL worker run on the phone (kind of standalone) and then communicate with it over WebSockets.

As i was looking a bit closer, I wonder where the boundary of the WebSockets is, how much stuff would run standalone on Android and which parts will run inside Firefox? The ril_worker.js and its dependencies will surely run on Android. But what about e.g. SmsService.js, where would that run?

Is it as simple as the boundary is where the postMessage() calls are?

1 Like

Hi Volker!

My gut feeling for now is indeed to put the boundary where postMessage() is. We can move the equivalent of SmsService.js into the system app, as a “telephony.js” library.

I don’t feel it would be good to have the sms storage managed by the daemon itself - that would make it harder to provide features like backup/restore from Gaia.

[quote=“vmx, post:1, topic:13212”]The plan is to make RIL worker …[/quote]???
So, you have a GeckoView stable on AOSP with actual Firefox ?

Please see for running Firefox on AOSP as SystemUI.

As there luckily still seems interest on things that are going on, here’s a quick update. I’ve been working on getting something running the JavaScript RIL worker. Currently it doesn’t really the worker, but I’ve got some code together which is close.

The communication is over WebSocket and is kind of like the communication to a worker via postMessage/onmessage. The current code is a bit hacky, hence I’ve just put it into some pastebin and haven’t uploaded it properly.

My plan is to get it speak to something that mimics Android’s RIL daemon. After that I want to clean things up and properly publish it on Github. The steps afterwards will be making it work in the emulator on a recent AOSP and then finally on a Sony X3C.

1 Like

That’s interesting , but I don’t know how to use it :-/ …
Do I need to put it in a geckoview code and compile it ?
( I never succeed to compile a geckoview … maybe due to dependencies … :frowning: )

Yeah :smiley:

I’m not able to test your work right now, but I’m happy you made some progress here ! :slight_smile:
Thanks a lot @vmx, keep going :wink:

I can’t wait to test it :slight_smile:

Sorry if this wasn’t clear. There isn’t that much to try out at the moment. It’s more a skeleton that hopefully once runs the telephony stack. It’s still a long way to go (and not connected to any UI or browser at all).

I figured out that a Github Gist might be more suitable for my current hacks. Hence the [current code] ( is in a Gist now. The only change from last time is that i can now send things to a Unix Socket. Slowly the pieces are coming together, I hope to have something people can checkout properly soon :slight_smile:


Super Thanks vmx !
I’d would be happy to play around with this but no really any idea how to
start with.