Installing the Server¶
This chapter describes how to install the FIRERPA server. The FIRERPA server is the most important and fundamental underlying service. You can choose to install it via the AUTORUN APP (supports auto-start at boot), as a Magisk module (supports auto-start at boot), or manually. The difficulty of installation also corresponds to their order.
Important
FIRERPA installed by default does not enable any authentication, and others can access any content on the device. Please pay attention to the part about selectively enabling certificates with encryption. If you don’t enable it, please make sure to use it within a trusted network.
Attention
For security reasons, we do not recommend placing any related files such as the server or configuration in the /data/local directory.
Installing via APP¶
We’ll introduce the simplest method first. This installation method is the easiest and doesn’t require you to do any extra operations. You just need to install our automatic installation and auto-start APK. But you still need to note that your phone has root privileges (su), and for some domestic phone models, the default auto-start behavior of APKs may be prohibited. In this case, you may need to find the relevant settings and allow our APK to auto-start.
Click to download our FIRERPA auto-start application lamda-autorun.apk. After installation, open the APP and authorize root privileges, turn on the auto-start switch, and restart the device after the installation is complete. If you have completed this successfully, you do not need to continue with the rest of this chapter.
Getting Device Architecture¶
Because FIRERPA supports multiple CPU architectures, downloading the wrong version of the server will not work properly. So before installation, you need to get the architecture of your current device. You can execute the following command to get it.
getprop ro.product.cpu.abi
Usually, for contemporary real phones, this command outputs arm64-v8a
, while for emulators like LDPlayer, you will choose 32-bit or 64-bit Android system when creating a new emulator. 32-bit emulator systems correspond to x86
, 64-bit corresponds to x86_64
, and some old Xiaomi models are armeabi-v7a
. Now please remember this output value.
Startup Configuration File¶
Before continuing, let’s first introduce the startup configuration file properties.local. This file is the startup configuration file for FIRERPA, usually stored on the device, containing key=value
type strings. By writing this file, you can make FIRERPA automatically connect to OpenVPN, proxy, port forwarding, etc. at startup. When FIRERPA starts, it will look for this file from /data/usr
and load it. You can get configurable items from the properties.local.example
in the project and choose appropriately.
Note
The directory /data/usr is FIRERPA’s user data directory, which does not exist before the first startup. If you need to preset properties.local configuration, you need to manually create this directory.
There will also be relevant introductions on how to write startup configurations in various functions.
Installing via Magisk¶
If your device uses Magisk, you can complete the installation in the simplest way, and FIRERPA can auto-start at boot. You need to ensure that the Magisk version is >= 20.4 and it only supports installation in the Magisk App.
Now, download lamda-magisk-module.zip
from the lamda/releases page, and push it to /sdcard
. Open the Magisk App, click Modules -> Install from local, select lamda-magisk-module.zip, and wait a bit.
Tip
If there is any ERROR during the process and it doesn’t install normally, it might be because our module package is too large. Open with a compression software and delete the server files of architectures you don’t need, then reinstall. Do not decompress and recompress, just operate directly in the compression software.
After successful flashing, please restart the device. After restarting, FIRERPA should auto-start at boot. But to avoid possible crash issues, lamda will start after 30 seconds instead of immediately, giving you enough time to disable the FIRERPA module (please connect and use FIRERPA 2 minutes after booting).
You can also choose custom configuration. For example, if you want all FIRERPA flashed with this magisk module to enable interface encryption certificates, or if you want these devices to automatically connect to a proxy at startup, you just need to write properties.local or generate a PEM certificate and rename it to lamda.pem
(please check the tool usage method in tools/), then use compression software to open lamda-magisk-module.zip
, and drag what you want to set (lamda.pem
or properties.local
) into the common
folder to achieve automatic configuration at startup.
Attention
Please do not decompress and recompress, just drag and drop directly in the compression software, otherwise the module will not work properly.
After installation, you do not need to read the manual installation content in the next section, you can skip it.
Manual Installation¶
Since some older devices may not be able to extract tar.gz files using the system’s tar
command, busybox
is provided as a supplement. You may need to download the provided busybox as well. Now we know the device architecture is arm64-v8a
. Now connect the device to the current computer and make sure ADB is authorized and can switch to root normally.
Download lamda-server-arm64-v8a.tar.gz
and busybox-arm64-v8a
from the release page lamda/releases, and temporarily push the files to /data/local/tmp.
Tip
Now we’re just introducing how to manually unpack and install the server. The startup process is still in another chapter.
adb push lamda-server-arm64-v8a.tar.gz /data/local/tmp
adb push busybox-arm64-v8a /data/local/tmp
After completion, enter adb shell
, execute su
to switch to root identity, and then execute the following commands:
chmod 755 /data/local/tmp/busybox-arm64-v8a
/data/local/tmp/busybox-arm64-v8a tar -C /data -xzf /data/local/tmp/lamda-server-arm64-v8a.tar.gz
rm /data/local/tmp/lamda-server-arm64-v8a.tar.gz
rm /data/local/tmp/busybox-arm64-v8a
After executing all of these correctly, the installation is complete. Please continue to check the Starting the Server
chapter to learn how to start the server program.