You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aa687c6
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+113-1Lines changed: 113 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,118 @@ This is the complete source code and the build instructions for the official alt
67
67
telegram.api_hash=YOUR_TELEGRAM_API_HASH</pre>
68
68
3.[Setup Firebase](https://firebase.google.com/docs/android/setup) and replace `google-services.json` with the one that's suitable for your `app.id`
69
69
70
+
### Commands
71
+
72
+
<details>
73
+
<summary>Reference of commands for building, testing and maintenance</summary>
74
+
75
+
`-Pabi` limits native libraries to given ABIs, separated by commas: `arm64`, `arm32`, `x64` or `x86`. Without it, all ABIs are built. `Latest` in task names can be replaced with another flavor, see [flavors](/tests/README.md#flavors).
76
+
77
+
#### Building
78
+
79
+
Set up Android SDK, NDK and `local.properties`, on Windows in MSYS2:
80
+
```shell
81
+
scripts/setup.sh
82
+
```
83
+
84
+
Check that submodules and Git LFS files are fetched:
85
+
```shell
86
+
./gradlew :app:validateGitSetup
87
+
```
88
+
89
+
Build and install debug build on connected device:
90
+
```shell
91
+
./gradlew :app:installLatestDebug -Pabi=arm64
92
+
```
93
+
94
+
Build `legacy` flavor for Android 4.x, which requires older NDK:
Generate baseline profiles for all variants on emulator and connected device, keeping computer awake and saving log. ABIs must suit both devices: on x86_64 computers emulator is `x64`, unlike phones:
173
+
```shell
174
+
# macOS with Apple silicon
175
+
caffeinate -i ./gradlew :app:generateBaselineProfile -Pabi=arm64 --continue 2>&1| tee ~/baseline-profile.log
176
+
# Ubuntu
177
+
systemd-inhibit --what=idle:sleep ./gradlew :app:generateBaselineProfile -Pabi=arm64,x64 --continue 2>&1| tee ~/baseline-profile.log
178
+
```
179
+
180
+
</details>
181
+
70
182
## Reproducing public builds
71
183
72
184
In order to verify that there is no additional source code injected inside official APKs, you must use one of the following versions of **Ubuntu**:
@@ -116,6 +228,6 @@ List of third-party components used in **Telegram X** can be found [here](/docs/
116
228
117
229
## Contributions
118
230
119
-
**Telegram X** welcomes contributions. Check out [pull request template](/docs/PULL_REQUEST_TEMPLATE.md) and [guide for contributors](/docs/GUIDE.md) to learn more about Telegram X internals before creating the first pull request.
231
+
**Telegram X** welcomes contributions. Check out [pull request template](/docs/PULL_REQUEST_TEMPLATE.md), [code style](/docs/CODE_STYLE.md) and [guide for contributors](/docs/GUIDE.md) to learn more about Telegram X internals before creating the first pull request.
120
232
121
233
If you are a regular user and experience a problem with Telegram X, the best place to look for solution is [Telegram X chat](https://t.me/tgandroidtests) — a community with over 4 thousand members. Please do not use this repository to ask questions: if you have general issue with Telegram, refer to [FAQ](http://telegram.org/faq) or contact [Telegram Support](https://telegram.org/faq#telegram-support).
0 commit comments