Project

General

Profile

ModemDisable » History » Version 6

dl lud, 01/06/2020 10:36 PM
Fix repo path.

1 1 Jeremy Rand
h1. Disabling the Modem
2
3
h2. Samsung-RIL devices
4
5 3 Denis 'GNUtoo' Carikli
h3. Airplane Mode
6 1 Jeremy Rand
7 4 Denis 'GNUtoo' Carikli
On Replicant, samsung-RIL currently asks the modem to actually turn off its transmitters by going into a low power mode.
8 3 Denis 'GNUtoo' Carikli
9 4 Denis 'GNUtoo' Carikli
This means that the modem firmware is most probably not off and that its firmware is still running. The modem might even still be able to receive information, as it would enable it to connect back to the network way faster than if it was really off.
10 3 Denis 'GNUtoo' Carikli
11 5 Denis 'GNUtoo' Carikli
The [[ModemIsolationResearch#Powering-off-the-modem|Modem isolation research page]] has more technical details on the issue, and pointers on how to potentially implement a modem power off.
12 3 Denis 'GNUtoo' Carikli
13
h3. Powering off the modem
14
15
Since the modem's firmware is loaded by the CPU on boot, the modem will be nonfunctional if the CPU chooses not to load the modem firmware.  This can be used to achieve a more trustworthy off-like state. It should be noted that while this does reduce attack surface, there may still be ways for the modem to be activated (e.g. if the non-free bootloader running on the CPU sends a firmware to the modem).
16
17 1 Jeremy Rand
To disable the modem on Samsung-RIL devices, follow these steps:
18
19 3 Denis 'GNUtoo' Carikli
h4. Installation
20 1 Jeremy Rand
21
From your PC, clone the user-scripts repository:
22
<pre>
23 6 dl lud
git clone https://git.replicant.us/replicant/vendor_replicant-scripts -b replicant-6.0
24 1 Jeremy Rand
</pre>
25
26
For the next steps, [[ADB]] needs to be set up and [[ADB#Accessing-root-shell|running as root]]. Connect the device to your PC. The scripts are in the @networking/modem@ folder. Run the setup script the folder to push the scripts to the device:
27
<pre>
28
./setup.sh
29
</pre>
30
31
Then disconnect the device. Make sure [[UsageNotes#Enabling-root-access|root access for apps]] is enabled.
32
33 3 Denis 'GNUtoo' Carikli
h4. Usage
34 1 Jeremy Rand
35
Open a [[UsageNotes#Terminal-emulator|terminal emulator]]. If the terminal is not running as root, you can gain root by running:
36
<pre>
37
su
38
</pre> 
39
40
Navigate to the @data/misc/modem@ directory and run one of the scripts:
41
<pre>
42
bash disable_modem.sh
43
</pre>
44
or
45
<pre>
46
bash enable_modem.sh
47
</pre>
48
49
Disabling the modem will reboot your device (the modem will be disabled when reboot completes).  Enabling the modem does not require a reboot (it takes effect after a few seconds).
50
51
h2. Other devices
52
53
We don't yet have a way to disable the modem on other devices.