TGX-Android /Telegram-X

The main repository of Telegram X — official alternative Telegram client for Android.

★ 6,160⑂ 1,176👁 351▤ 9
6,160
stars
+0+6+104
1,176
forks
351
watchers
–
prs
–
issues
9
releases
–
discussions

README

Telegram X — a slick experimental Telegram client based on TDLib.

!Telegram X

This is the complete source code and the build instructions for the official alternative Android client for the Telegram messenger, based on the Telegram API and the MTProto secure protocol via TDLib.

 Telegram X on Google Play (subscribe to beta)
 APKs and Build Info
 Bot to verify APK hash


Other sources

 Telegram X on Huawei AppGallery
 GitHub Releases



 Build instructions

 Prerequisites

 Repository must be fetched via git
 JDK or Android Studio (with compatible bundled JDK)
 At least 8GB of RAM
 At least 7,32GB of free disk space when cloning with --shallow-submodules --depth=1
 At least 2-5x times more disk space for files generated during build process.

 macOS

 Homebrew
 git with LFS: $ brew install git git-lfs && git lfs install
 JDK: $ brew install openjdk@25
 rustup, then Rust of version.rust of version.properties with targets of Android: $ scripts/setup-rust.sh, which prints rust.dir for local.properties

 Ubuntu

 git with LFS:  apt install git git-lfs
 Run $ git lfs install if you just installed git-lfs
 JDK:  apt install openjdk-25-jdk
 rustup:  apt install rustup, then Rust of version.rust of version.properties with targets of Android: $ scripts/setup-rust.sh, which prints rust.dir for local.properties. Run it again after a change of version.rust
 If multiple JDK versions are installed: update-java-alternatives --list update-java-alternatives --set java-1.25.0-openjdk-amd64 (or other compatible version)

 Windows

 MSYS2 (UCRT64 environment)
 Update packages: pacman -Syu
 Run pacman -S --needed git mingw-w64-ucrt-x86_64-git-lfs perl make diffutils
 Run git lfs install
 Run git config --global core.longpaths true
 rustup, then Rust of version.rust of version.properties with targets of Android: scripts/setup-rust.sh, which prints rust.dir for local.properties
 Clone the repository
 Set msys2.dir in local.properties after cloning
 Note: you have to use \\ or / as path separator in properties files

 Building

1. $ git clone --recursive https://github.com/TGX-Android/Telegram-X tgx
2. In case you forgot the --recursive flag, cd into tgx directory and run: $ git submodule update --init --recursive
3. Open project via Android Studio or build manually from the command line: ./gradlew assembleLatestDebug
4. If build fails, follow the instructions provided in the error message.

 Publishing

1. Obtain Telegram API credentials
2. Create local.properties file in the root project folder using any text editor: Location where you have Android SDK installed
   sdk.dir=YOUR_ANDROID_SDK_FOLDER
   \ Home of rustup with Rust of version.rust, printed by scripts/setup-rust.sh
   rust.dir=YOUR_RUSTUP_HOME_FOLDER
   \ Telegram API credentials obtained at previous step
   telegram.api_id=YOUR_TELEGRAM_API_ID
   telegram.api_hash=YOUR_TELEGRAM_API_HASH
3. Setup Firebase and replace google-services.json with the one that's suitable for your app.id

 Commands


Reference 

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON