Nagram is a third-party Telegram client based on NekoX with some modifications.
Nagram's source code is licensed under GPLv3. The Nagram name and project identity belong to @NextAlone; the Nagram application icon artwork is copyright © MaitungTM. These are separate brand assets. Modified, forked, and third-party distributions must use distinct branding and replace the Nagram brand assets. See BRANDING.md for the complete policy.
Telegram API manuals: https://core.telegram.org/api
MTProto protocol manuals: https://core.telegram.org/mtproto
NOTE: For Windows users, please consider using a Linux VM (such as WSL2) or dual booting.
Environment:
Linux distribution based on Debian or Arch Linux, or macOS
Optional: ccache in PATH speeds up rebuilding the native code.
The third-party native libraries (FFmpeg, BoringSSL, libvpx, ...) are committed prebuilt under
TMessagesProj/jni/prebuild/lib; the build_*.sh scripts there, and the tools they need
(go, yasm, make, ...), are only for regenerating them.
Android SDK: build-tools;33.0.0 platforms;android-33 ndk;27.2.12479018 cmake;3.18.1 cmake;3.22.1 (the default location is $HOME/Android/SDK, otherwise you need to specify $ANDROID_HOME for it)
It is recommended to use Android Studio to install, but you can also use sdkmanager command on distributions based on Debian:
sudo apt install sdkmanager
sdkmanager --sdk_root $HOME/Android/SDK --install "build-tools;33.0.0" "platforms;android-33" "ndk;27.2.12479018" "cmake;3.18.1" "cmake;3.22.1"
Build:
Checkout submodules
git submodule update --init --recursive
The build applies TMessagesProj/jni/patches to tgcalls itself. When an update moves the tgcalls
submodule, add --force so the patched files are reset before the new commit is checked out.
Disable signature check by removing the following lines in TMessagesProj/jni/jni.c:
if (verifySign(env) != JNI_OK) {
return JNI_ERR;
}
Fill out TELEGRAM_APP_ID and TELEGRAM_APP_HASH in local.properties (from Telegram Developer)
Replace TMessagesProj/google-services.json if you want FCM to work.
Replace release.keystore with yours and fill out ALIAS_NAME, KEYSTORE_PASS and ALIAS_PASS in local.properties.
Build with Gradle (the native code is compiled as part of the build):
./gradlew assemble<Release/Debug>
Create your own release.keystore to replace TMessagesProj/release.keystore.
Prepare LOCAL_PROPERTIES
KEYSTORE_PASS=123456
ALIAS_NAME=key0
ALIAS_PASS=123456
TELEGRAM_APP_ID=123456
TELEGRAM_APP_HASH=abcdefg
Then, use base64 to encode the above.
LOCAL_PROPERTIES: from step 2
HELPER_BOT_TOKEN: from telegram @Botfather, such as 1111:abcd; the bot that keeps the in-app update metadata
NAGRAM_CHANNEL_BOT_TOKEN, NAGRAM_API_ID, NAGRAM_API_HASH: the bot that posts the builds to the channels, and the Telegram API credentials its Bot API server runs with
The channels are repository variables: NAGRAM_CHANNEL_ASSETS_CHAT_ID gets every build, NAGRAM_CHANNEL_CHAT_ID gets a copy of the releases. Nothing is posted while the token or the channels are not set. A release needs its notes in docs/releases/<version code>.md, with optional English notes in <version code>.en.md.
The GitLab pipeline posts to its own channel instead, with the HELPER_BOT_TARGET CI/CD variable holding the chat id, such as -1001234567890.
Disable signature check by removing the following lines in TMessagesProj/jni/jni.c:
if (verifySign(env) != JNI_OK) {
return JNI_ERR;
}
Run Release Build
Developed by different developers, read the feature list above to understand the differences.
First, make sure you have the latest version installed (check the channel).
Then, if the issue appears in the official Telegram client too, please submit it to the officials, (be careful not to show custom clients in the description and screenshots).
Then, submit it to our bot.
If you experience a crash, you also need to click on the version number at the bottom of the settings and select "Enable Log" and send it to us.
Nagram is forked from Telegram, thus most locales follows the translations of Telegram for Android, checkout https://translations.telegram.org/en/android/.
Is Nagram not in your language, or the translation is incorrect or incomplete? Get involved in the translations on our Weblate.