Project

General

Profile

ModemDisable » History » Revision 4

Revision 3 (Denis 'GNUtoo' Carikli, 10/20/2019 07:07 PM) → Revision 4/18 (Denis 'GNUtoo' Carikli, 10/20/2019 07:40 PM)

h1. Disabling the Modem 

 h2. Samsung-RIL devices 

 h3. Airplane Mode 

 On Replicant, samsung-RIL currently asks devices that use Samsung-RIL, Replicant's Airplane Mode expects the modem to actually turn off its transmitters by going into a low power mode. transmitters. 

 This means that the The modem firmware is most probably not off may still run 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. 

 The [[ModemIsolation#Powering-off-the-modem ModemIsolation page]] has more technical details on Because of that, using the issue, and pointers on how to potentially implement a Airplane Mode doesn't bring any guarantee that it would turn off the modem. Even if the nonfree modem power off. firmware somehow powered off the modem, the code doing that is not trustworthy as it's nonfree. 

 h3. Powering off the modem 

 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). 

 To disable the modem on Samsung-RIL devices, follow these steps: 

 h4. Installation 

 From your PC, clone the user-scripts repository: 
 <pre> 
 git clone https://git.replicant.us/replicant/user-scripts.git -b replicant-6.0 
 </pre> 

 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: 
 <pre> 
 ./setup.sh 
 </pre> 

 Then disconnect the device. Make sure [[UsageNotes#Enabling-root-access|root access for apps]] is enabled. 

 h4. Usage 

 Open a [[UsageNotes#Terminal-emulator|terminal emulator]]. If the terminal is not running as root, you can gain root by running: 
 <pre> 
 su 
 </pre>  

 Navigate to the @data/misc/modem@ directory and run one of the scripts: 
 <pre> 
 bash disable_modem.sh 
 </pre> 
 or 
 <pre> 
 bash enable_modem.sh 
 </pre> 

 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). 

 h2. Other devices 

 We don't yet have a way to disable the modem on other devices.