This is the complete source code and the build instructions for the customized Android client for the Telegram messenger, maintained by cipher-attack.
- At least 5,34GB of free disk space: 487,10MB for source codes and around 4,85GB for files generated after building all variants
- Homebrew
- git with LFS, wget and sed:
$ brew install git git-lfs wget gsed && git lfs install
- git with LFS:
# apt install git git-lfs - Run
$ git lfs installfor the current user, if you didn't havegit-lfspreviously installed
- Telegram X does not provide official build instructions for Windows platform. It is recommended to rely on Linux distributions instead.
$ git clone --recursive --depth=1 --shallow-submodules https://github.com/cipher-attack/telegram-x tgx— clone the repository with submodules- In case you forgot the
--recursiveflag,cdintotgxdirectory and:$ git submodule init && git submodule update --init --recursive --depth=1 - Create
keystore.propertiesfile outside of source tree with the following properties:keystore.file: absolute path to the keystore filekeystore.password: password for the keystorekey.alias: key alias that will be used to sign the appkey.password: key password.
Warning: keep this file safe and make sure nobody, except you, has access to it. For production builds one could use a separate user with home folder encryption to avoid harm from physical theft $ cd tgx- Run
$ scripts/./setup.shand follow up the instructions - If you specified package name that's different from the one Telegram X uses, setup Firebase and replace
google-services.jsonwith the one that's suitable for theapp.idyou need - Now you can open the project using Android Studio or build manually from the command line:
./gradlew assembleUniversalRelease.
arm64: arm64-v8a build withminSdkVersionset to21(Lollipop)arm32: armeabi-v7a buildx64: x86_64 build withminSdkVersionset to21(Lollipop)x86: x86 builduniversal: universal build that includes native bundles for all platforms.
This repository includes a GitHub Actions workflow to build and sign APKs automatically. To use this setup, configure the following secrets in your repository settings:
KEYSTORE_BASE64: The base64-encoded keystore fileBOT_TOKEN: Telegram bot token for APK deliveryTG_ID: Telegram chat or channel ID
If you are developing a contribution to the project, you may follow the simpler building steps:
$ git clone --recursive https://github.com/cipher-attack/telegram-x tgx$ cd tgx- Obtain Telegram API credentials
- Create
local.propertiesfile in the root project folder using any text editor:# Location where you have Android SDK installed sdk.dir=YOUR_ANDROID_SDK_FOLDER # Telegram API credentials obtained at previous step telegram.api_id=YOUR_TELEGRAM_API_ID telegram.api_hash=YOUR_TELEGRAM_API_HASH
- Run
$ scripts/./setup.sh— this will download required Android SDK packages and build native dependencies that aren't part of project's CMakeLists.txt - Open and build project via Android Studio or by using one of
./gradlew assemblecommands in terminal
Telegram X is licensed under the terms of the GNU General Public License v3.0.
For more information, see LICENSE file.
License of components and third-party dependencies it relies on might differ, check LICENSE file in the corresponding folder.