[Replicant] Question regarding a freedom respecting modem
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Fri Apr 23 14:47:03 UTC 2021
On Sun, 18 Apr 2021 05:11:39 +0000 (UTC)
m d <mdreplicantmd at yahoo.com> wrote:
> The requirements for a computer attached to a phone in order to make
> the whole thing work is certainly cumbersome..
Me and Alan Carvallo De Assis tried to fix that, many years ago: we
upstreamed some support for osmocomBB compatible devices in Nuttx and I
even got the layer 1 of the GSM stack working on top of that but it
hanged while scanning for the networks. Years later I learned that
there was a bug in osmocomBB with the exact same symptoms.
The idea was to port all 3 layers on the phone.
The code I had for the layer1 was soo dirty that it needs to be re-done
I rushed to get something that worked regardless of code quality as I
knew I wouldn't have the time anymore to work on it (as I just had a
full time paid job) so I was hopping that this achievement would
interest other people and that they could continue or redo that work.
Nowadays the devices have been removed from Nuttx due to the lack of
> I'm quite glad that rebuilding the modem partition is something that
> is being worked on in Replicant as an S3 which belongs to me got
> discarded after losing the modem partition which hadn't been backed
> up properly unfortunately
> It was driving me crazy to keep that thing around, looking for info
> on returning the binary to the correct IMEI with a hexadecimal
> editor... It was very difficult.
Currently we only support reading the IMEI from the nv_data.bin of the
Nexus S, we cannot even change it (yet).
So if you have any information on changing the IMEI with a hexadecimal
editor I could try to implement it.
> Although the problem of the network still knowing a user's location
> is indeed valid, would that not be only a "philosophical" one? I
> sense that the issue is that a user does not have the option of
> separating the GPS feature of the device from the telephony part of
> it but as you said that is part of the protocol.
This has nothing to do with the GPS. GPS chips don't need to transmit
anything to provide you with a position, but the GPS stack in Android
probably still retrieve data from the network to get that position
It's rather related to the cellular network architecture: you are
connected to a given antenna / base station that knows at what distance
of it you are. In addition you might move so there is a feature
called handover that enables you to switch form one base station to the
next one while moving. So you then have multiple base stations that
knows the distance between you and them. With that it's trivial to get
> The option of anonymity can be obtained by using prepaid simcards in
> any case.
It can't. Your phone has an IMEI that is transmitted to the network. So
the networks sees your SIM identification and your IMEI and the
network operators can potentially store that data somewhere.
This is why there is this interest from people in burner phones.
I'm also unsure if there are more ways than the IMEI to identify
devices. It's for instance possible to identify the family of WiFi
chips being used just by looking at what is being transmitted. So it
may be possible to still get some identifying information out of the
device even if the IMEI has been changed.
So the best way of not being tracked is to turn off the modem
completely. In Replicant, the flight mode doesn't turn off the modem,
it just asks it to go in low power mode and not transmit anything.
We have a script (modem.sh) that can reboot the phone and not boot the
modem on Replicant compatible devices.
Other devices like the Pinephone or the Librem5 have hardware switches
to power off the modem.
> How would this problem of location be different to a mapping program
> which requires GPS devices, and as such knowledge of a user's GPS
> location to function?
If you take Replicant 4.2 and the GTA04, the GTA04 had the following
- It had a modem with an internal GPS. The GPS antenna wasn't connected
to that chip.
- It also had a second GPS chip for privacy reasons, and in that case
the GPS antenna was connected to that chip.
So if you had a GTA04 where you could power off the modem (GTA04
versions bigger than A3), and you didn't power on the WiFi or
bluetooth, you could get your own position transmitting anything and
without giving your position to anyone.
There was still a very small risk as we didn't really know what the
internal firmware of the GPS chip was doing, and the GPS chip had an
antenna connected to it, but the chip and the protocol didn't need to
transmit anything to work.
Note that we have a good introduction on freedom issues in this
It's also easier to contribute to it than the other part of the code of
Replicant as we have a howto that explains how to do that:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the Replicant