Project

General

Profile

ModemDisable » History » Version 1

Jeremy Rand, 10/01/2017 04:29 PM
Added documentation on disabling the modem on Samsung-RIL devices

1 1 Jeremy Rand
h1. Disabling the Modem
2
3
h2. Samsung-RIL devices
4
5
On devices that use Samsung-RIL, Replicant's Airplane Mode trusts the modem to actually turn off.  This is undesirable, since the modem is running non-free firmware that is not trustworthy.  However, 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 Airplane-Mode-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).
6
7
To disable the modem on Samsung-RIL devices, follow these steps:
8
9
h3. Installation
10
11
From your PC, clone the user-scripts repository:
12
<pre>
13
git clone https://git.replicant.us/replicant/user-scripts.git -b replicant-6.0
14
</pre>
15
16
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:
17
<pre>
18
./setup.sh
19
</pre>
20
21
Then disconnect the device. Make sure [[UsageNotes#Enabling-root-access|root access for apps]] is enabled.
22
23
h3. Usage
24
25
Open a [[UsageNotes#Terminal-emulator|terminal emulator]]. If the terminal is not running as root, you can gain root by running:
26
<pre>
27
su
28
</pre> 
29
30
Navigate to the @data/misc/modem@ directory and run one of the scripts:
31
<pre>
32
bash disable_modem.sh
33
</pre>
34
or
35
<pre>
36
bash enable_modem.sh
37
</pre>
38
39
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).
40
41
h2. Other devices
42
43
We don't yet have a way to disable the modem on other devices.