├── README.md
├── TgSpeedHook.png
├── app
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ └── Xposed_init
│ ├── java
│ └── Telegram
│ │ └── Speed
│ │ └── Hook
│ │ ├── FileUtil.java
│ │ ├── MainActivity.java
│ │ ├── MainHook.java
│ │ └── SketchwareUtil.java
│ └── res
│ ├── drawable-xhdpi
│ ├── app_icon.png
│ ├── default_image.png
│ └── telegram.png
│ ├── layout
│ └── main.xml
│ └── values
│ ├── colors.xml
│ ├── strings.xml
│ └── styles.xml
├── assets
└── TgSpeedHook.png
├── build.gradle
├── gradle.properties
└── settings.gradle
/README.md:
--------------------------------------------------------------------------------
1 | # Telegram Speed Hook
2 | An Xposed Module to Increase Telegram Speed to Extreme
3 |
4 |
5 |
6 |
7 |
8 |
9 | Created by : @AraafRoyall
10 |
11 | Telegram Username : @AraafRoyall
12 |
13 | Thanks for using the Module ..
14 |
15 | Feel free to contact, ask, help, discuss about the module
16 |
--------------------------------------------------------------------------------
/TgSpeedHook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/araafroyall/Telegram-Speed-Hook/f6d083c5c297ae7b205f96d07fc42f96f1cde240/TgSpeedHook.png
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | }
4 |
5 | android {
6 | compileSdk 34
7 |
8 | defaultConfig {
9 | applicationId "Telegram.Speed.Hook"
10 | namespace "Telegram.Speed.Hook"
11 | minSdkVersion 21
12 | targetSdkVersion 34
13 | versionCode 1
14 | versionName "1.0"
15 | }
16 |
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | }
24 |
25 | dependencies {
26 | implementation fileTree(dir: 'libs', include: ['*.jar'])
27 | }
28 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | -repackageclasses
2 | -ignorewarnings
3 | -dontwarn
4 | -dontnote
5 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
11 |
18 |
19 |
20 |
21 |
22 |
23 |
27 |
30 |
33 |
36 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/assets/Xposed_init:
--------------------------------------------------------------------------------
1 | Telegram.Speed.Hook.MainHook
2 |
--------------------------------------------------------------------------------
/app/src/main/java/Telegram/Speed/Hook/FileUtil.java:
--------------------------------------------------------------------------------
1 | package Telegram.Speed.Hook;
2 |
3 | public class FileUtil {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/Telegram/Speed/Hook/MainActivity.java:
--------------------------------------------------------------------------------
1 | package Telegram.Speed.Hook;
2 |
3 | import android.animation.*;
4 | import android.app.*;
5 | import android.app.Activity;
6 | import android.app.AlertDialog;
7 | import android.app.DialogFragment;
8 | import android.app.Fragment;
9 | import android.app.FragmentManager;
10 | import android.content.*;
11 | import android.content.DialogInterface;
12 | import android.content.res.*;
13 | import android.graphics.*;
14 | import android.graphics.drawable.*;
15 | import android.media.*;
16 | import android.net.*;
17 | import android.os.*;
18 | import android.text.*;
19 | import android.text.style.*;
20 | import android.util.*;
21 | import android.view.*;
22 | import android.view.View.*;
23 | import android.view.animation.*;
24 | import android.webkit.*;
25 | import android.widget.*;
26 | import java.io.*;
27 | import java.text.*;
28 | import java.util.*;
29 | import java.util.regex.*;
30 | import org.json.*;
31 |
32 |
33 | public class MainActivity extends Activity {
34 |
35 | private AlertDialog.Builder d;
36 |
37 | @Override
38 | protected void onCreate(Bundle _savedInstanceState) {
39 | super.onCreate(_savedInstanceState);
40 | setContentView(R.layout.main);
41 | initialize(_savedInstanceState);
42 | initializeLogic();
43 | }
44 |
45 | private void initialize(Bundle _savedInstanceState) {
46 | d = new AlertDialog.Builder(this);
47 | }
48 |
49 | private void initializeLogic() {
50 | d.setTitle("𝗧𝗲𝗹𝗲𝗴𝗿𝗮𝗺 𝗦𝗽𝗲𝗲𝗱 𝗛𝗼𝗼𝗸");
51 | d.setIcon(R.drawable.telegram);
52 | d.setMessage("Default Speed Hook : Extreme\n\nHow to SetUp :\n1. Enable Telegram Scope in LsPosed\n2. Enjoy 🔥 \n\n\nDeveloper :\nAraafRoyall 🇮🇳\nTelegram id : @AraafRoyall\nGmail : araafroyall@gmail.com\n\n\nThanks for Using the Module");
53 | d.setPositiveButton("𝐄𝐱𝐢𝐭", new DialogInterface.OnClickListener() {
54 | @Override
55 | public void onClick(DialogInterface _dialog, int _which) {
56 | finishAffinity();
57 | }
58 | });
59 | final AlertDialog dd = d.create();
60 | dd.show();
61 | dd.setCancelable(false);
62 | }
63 |
64 |
65 | @Deprecated
66 | public void showMessage(String _s) {
67 | Toast.makeText(getApplicationContext(), _s, Toast.LENGTH_SHORT).show();
68 | }
69 |
70 | @Deprecated
71 | public int getLocationX(View _v) {
72 | int _location[] = new int[2];
73 | _v.getLocationInWindow(_location);
74 | return _location[0];
75 | }
76 |
77 | @Deprecated
78 | public int getLocationY(View _v) {
79 | int _location[] = new int[2];
80 | _v.getLocationInWindow(_location);
81 | return _location[1];
82 | }
83 |
84 | @Deprecated
85 | public int getRandom(int _min, int _max) {
86 | Random random = new Random();
87 | return random.nextInt(_max - _min + 1) + _min;
88 | }
89 |
90 | @Deprecated
91 | public ArrayList getCheckedItemPositionsToArray(ListView _list) {
92 | ArrayList _result = new ArrayList();
93 | SparseBooleanArray _arr = _list.getCheckedItemPositions();
94 | for (int _iIdx = 0; _iIdx < _arr.size(); _iIdx++) {
95 | if (_arr.valueAt(_iIdx))
96 | _result.add((double)_arr.keyAt(_iIdx));
97 | }
98 | return _result;
99 | }
100 |
101 | @Deprecated
102 | public float getDip(int _input) {
103 | return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, _input, getResources().getDisplayMetrics());
104 | }
105 |
106 | @Deprecated
107 | public int getDisplayWidthPixels() {
108 | return getResources().getDisplayMetrics().widthPixels;
109 | }
110 |
111 | @Deprecated
112 | public int getDisplayHeightPixels() {
113 | return getResources().getDisplayMetrics().heightPixels;
114 | }
115 | }
--------------------------------------------------------------------------------
/app/src/main/java/Telegram/Speed/Hook/MainHook.java:
--------------------------------------------------------------------------------
1 | package Telegram.Speed.Hook;
2 |
3 | import android.app.Activity;
4 | import android.app.AndroidAppHelper;
5 | import android.os.Handler;
6 | import android.os.Looper;
7 | import android.widget.Toast;
8 |
9 | import de.robv.android.xposed.IXposedHookLoadPackage;
10 | import de.robv.android.xposed.XC_MethodHook;
11 | import de.robv.android.xposed.XposedBridge;
12 | import de.robv.android.xposed.XposedHelpers;
13 | import de.robv.android.xposed.callbacks.XC_LoadPackage;
14 |
15 | public class MainHook implements IXposedHookLoadPackage {
16 | private final static long DEFAULT_MAX_FILE_SIZE = 1024L * 1024L * 2000L;
17 | private static long speedUpShown = 0;
18 |
19 | @Override
20 | public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) {
21 |
22 | if ("org.telegram.messenger".equals(loadPackageParam.packageName)) {
23 | try {
24 | XposedHelpers.findAndHookMethod("org.telegram.messenger.FileLoadOperation", loadPackageParam.classLoader, "updateParams", new XC_MethodHook() {
25 | @Override
26 | protected void afterHookedMethod(MethodHookParam param) throws Throwable {
27 |
28 | int downloadChunkSizeBig = 1024 * 1024;
29 | int maxDownloadRequests = 12;
30 | int maxDownloadRequestsBig = 12;
31 |
32 | var maxCdnParts = (int) (DEFAULT_MAX_FILE_SIZE / downloadChunkSizeBig);
33 | XposedHelpers.setIntField(param.thisObject, "downloadChunkSizeBig", downloadChunkSizeBig);
34 | XposedHelpers.setObjectField(param.thisObject, "maxDownloadRequests", maxDownloadRequests);
35 | XposedHelpers.setObjectField(param.thisObject, "maxDownloadRequestsBig", maxDownloadRequestsBig);
36 | XposedHelpers.setObjectField(param.thisObject, "maxCdnParts", maxCdnParts);
37 |
38 | try {
39 | var fileSize = XposedHelpers.getLongField(param.thisObject, "totalBytesCount");
40 | if (fileSize > 5 * 1024 * 1024 && System.currentTimeMillis() - speedUpShown > 1000 * 60 * 2) {
41 | speedUpShown = System.currentTimeMillis();
42 | var title = "Speed Boost Activated";
43 | var subtitle = "Extreme Speed Mode Enabled by AraafRoyall";
44 | try {
45 | var notificationCenterClass = XposedHelpers.findClass("org.telegram.messenger.NotificationCenter", loadPackageParam.classLoader);
46 | var globalInstance = XposedHelpers.callStaticMethod(notificationCenterClass, "getGlobalInstance");
47 | new Handler(Looper.getMainLooper()).post(() -> XposedHelpers.callMethod(
48 | globalInstance,
49 | "postNotificationName",
50 | XposedHelpers.getStaticIntField(notificationCenterClass, "showBulletin"),
51 | new Object[]{4, title, subtitle}));
52 | } catch (Throwable t) {
53 | XposedBridge.log(t);
54 | Toast.makeText(AndroidAppHelper.currentApplication(), title + "\n" + subtitle, Toast.LENGTH_SHORT).show();
55 | }
56 | }
57 | } catch (Throwable t) {
58 | XposedBridge.log(t);
59 | }
60 | }
61 | });
62 | } catch (Throwable t) {
63 | XposedBridge.log(t);
64 | XposedHelpers.findAndHookMethod(Activity.class, "onResume", new XC_MethodHook() {
65 | @Override
66 | protected void afterHookedMethod(MethodHookParam param) {
67 | Toast.makeText((Activity) param.thisObject, "TeleSpeed: Unsupported Feature", Toast.LENGTH_LONG).show();
68 | }
69 | });
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/app/src/main/java/Telegram/Speed/Hook/SketchwareUtil.java:
--------------------------------------------------------------------------------
1 | package Telegram.Speed.Hook;
2 |
3 | public class SketchwareUtil {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/araafroyall/Telegram-Speed-Hook/f6d083c5c297ae7b205f96d07fc42f96f1cde240/app/src/main/res/drawable-xhdpi/app_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/default_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/araafroyall/Telegram-Speed-Hook/f6d083c5c297ae7b205f96d07fc42f96f1cde240/app/src/main/res/drawable-xhdpi/default_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/telegram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/araafroyall/Telegram-Speed-Hook/f6d083c5c297ae7b205f96d07fc42f96f1cde240/app/src/main/res/drawable-xhdpi/telegram.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008DCD
4 |
5 | #0084C2
6 |
7 | #008DCD
8 |
9 | #008DCD
10 |
11 | #57BEEE
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Telegram Speed Hook
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
16 |
23 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/assets/TgSpeedHook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/araafroyall/Telegram-Speed-Hook/f6d083c5c297ae7b205f96d07fc42f96f1cde240/assets/TgSpeedHook.png
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | google()
5 | mavenCentral()
6 | jcenter()
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:8.7.0'
10 | classpath 'com.google.gms:google-services:4.4.2'
11 | // NOTE: Do not place your application dependencies here; they belong
12 | // in the individual module build.gradle files
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | google()
19 | mavenCentral()
20 | jcenter()
21 | }
22 | }
23 |
24 | tasks.register("clean", Delete) {
25 | delete rootProject.buildDir
26 | }
27 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | android.enableR8.fullMode=false
2 | android.enableJetifier=true
3 | android.useAndroidX=true
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------