├── .gitignore
├── LICENSE
├── README.md
├── README_ar.md
├── app
├── .gitignore
├── build.gradle
├── libs
│ └── classes.jar
├── proguard-rules.pro
├── release
│ ├── baselineProfiles
│ │ ├── 0
│ │ │ └── app-release.dm
│ │ └── 1
│ │ │ └── app-release.dm
│ └── output-metadata.json
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── my
│ │ └── televip
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── assets
│ │ └── xposed_init
│ ├── java
│ │ └── com
│ │ │ └── my
│ │ │ └── televip
│ │ │ ├── AlertDialog
│ │ │ └── onClickDialog.java
│ │ │ ├── ClientChecker.java
│ │ │ ├── LoaderParameter.java
│ │ │ ├── MainHook.java
│ │ │ ├── Utils.java
│ │ │ ├── application
│ │ │ ├── ApplicationLoaderHook.java
│ │ │ └── HostApplicationInfo.java
│ │ │ ├── base
│ │ │ ├── AbstractMethodHook.java
│ │ │ └── AbstractReplaceHook.java
│ │ │ ├── configs
│ │ │ ├── ConfigManager.java
│ │ │ └── Configs.java
│ │ │ ├── features
│ │ │ ├── AllowSaveToGallery.java
│ │ │ ├── DisableStories.java
│ │ │ ├── FeatureManager.java
│ │ │ ├── HideOnline.java
│ │ │ ├── HidePhone.java
│ │ │ ├── HideSeen.java
│ │ │ ├── HideTyping.java
│ │ │ ├── NEWAntiRecall.java
│ │ │ ├── NoStoryRead.java
│ │ │ ├── OtherFeatures.java
│ │ │ ├── PreventMedia.java
│ │ │ ├── TelePremium.java
│ │ │ ├── UnlockChannelFeature.java
│ │ │ └── downloadSpeed.java
│ │ │ ├── language
│ │ │ └── Language.java
│ │ │ ├── loadClass.java
│ │ │ ├── obfuscate
│ │ │ ├── AutomationResolver.java
│ │ │ ├── resolves
│ │ │ │ ├── Cherrygram.java
│ │ │ │ ├── Nagram.java
│ │ │ │ ├── NagramX.java
│ │ │ │ ├── Nekogram.java
│ │ │ │ ├── Nicegram.java
│ │ │ │ ├── TGConnect.java
│ │ │ │ ├── Telegram.java
│ │ │ │ ├── TelegramBeta.java
│ │ │ │ ├── TelegramPlus.java
│ │ │ │ ├── TelegramWeb.java
│ │ │ │ ├── XPlus.java
│ │ │ │ ├── forkgram.java
│ │ │ │ ├── forkgramBeta.java
│ │ │ │ ├── iMe.java
│ │ │ │ └── iMeWeb.java
│ │ │ └── struct
│ │ │ │ ├── ClassInfo.java
│ │ │ │ ├── FieldInfo.java
│ │ │ │ └── MethodInfo.java
│ │ │ ├── structs
│ │ │ └── DeletedMessageInfo.java
│ │ │ ├── utils
│ │ │ ├── ClassUtils.java
│ │ │ ├── FieldUtils.java
│ │ │ ├── FileUtils.java
│ │ │ └── MethodUtils.java
│ │ │ ├── virtuals
│ │ │ ├── AccountInstance.java
│ │ │ ├── ActiveTheme.java
│ │ │ ├── ChatMessageCellDefault.java
│ │ │ ├── EventType.java
│ │ │ ├── MessageObject.java
│ │ │ ├── MessagesController.java
│ │ │ ├── MessagesStorage.java
│ │ │ ├── OfficialChatMessageCell.java
│ │ │ ├── TLRPC.java
│ │ │ ├── Theme.java
│ │ │ ├── UserConfig.java
│ │ │ └── nekogram
│ │ │ │ └── NekoChatMessageCell.java
│ │ │ └── xSharedPreferences.java
│ └── res
│ │ ├── drawable
│ │ ├── ic_launcher_background.xml
│ │ └── ic_launcher_foreground.xml
│ │ ├── mipmap-anydpi
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── values-night
│ │ └── themes.xml
│ │ ├── values
│ │ ├── arrays.xml
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── themes.xml
│ │ └── xml
│ │ ├── backup_rules.xml
│ │ └── data_extraction_rules.xml
│ └── test
│ └── java
│ └── com
│ └── my
│ └── televip
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
├── libs.versions.toml
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | <<<<<<< HEAD
2 | *.iml
3 | .gradle
4 | /local.properties
5 | /.idea/caches
6 | /.idea/libraries
7 | /.idea/modules.xml
8 | /.idea/workspace.xml
9 | /.idea/navEditor.xml
10 | /.idea/assetWizardSettings.xml
11 | .DS_Store
12 | /build
13 | /captures
14 | .externalNativeBuild
15 | .cxx
16 | local.properties
17 | =======
18 | # Gradle files
19 | .gradle/
20 | build/
21 |
22 | # Local configuration file (sdk path, etc)
23 | local.properties
24 |
25 | # Log/OS Files
26 | *.log
27 |
28 | # Android Studio generated files and folders
29 | captures/
30 | .externalNativeBuild/
31 | .cxx/
32 | *.apk
33 | output.json
34 |
35 | # IntelliJ
36 | *.iml
37 | .idea/
38 | misc.xml
39 | deploymentTargetDropDown.xml
40 | render.experimental.xml
41 |
42 | # Keystore files
43 | *.jks
44 | *.keystore
45 |
46 | # Google Services (e.g. APIs or Firebase)
47 | google-services.json
48 |
49 | # Android Profiling
50 | *.hprof
51 | >>>>>>> e9865a95eb7ed2d3a6e3c0283d94db23f9eefe06
52 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TeleVip LSPosed
2 |
3 | A module for modifying Telegram with the following features:
4 |
5 | 1. Hide "Seen" status for groups, channels, and private messages.
6 |
7 | 2. Hide "Typing..." indicator.
8 |
9 | 3. Hide story view status.
10 |
11 | 4. Unlock all restricted and encrypted features for channels.
12 |
13 | 5. Boost Telegram download speed.
14 |
15 | 6. Enable Telegram Premium features.
16 |
17 | 7. Save stories to the gallery, including those that cannot normally be saved.
18 |
19 | 8. Hide Phone Number
20 |
21 | 9. Hide Online Status
22 |
23 | 10. Prevent Deletion of Secret Media
24 |
25 | 11. Show Deleted Messages
26 |
27 | 12. Disable Stories
28 |
29 | There are additional features that are not listed here.
30 |
31 | # Support clients
32 | 1. Telegram 11.9.0 (58372)
33 | 2. Plus 11.9.0.1 (21500)
34 | 3. TG Connect 11.0.1 (1100109)
35 | 4. Nagram 11.9.0 (1209)
36 | 5. Skygram 10.20.6 (40639) TeleVip 1.4.6
37 | 6. iMe 11.9.0 (11090002)
38 | 7. X Plus 11.8.2.1 (57869)
39 | 8. Cherrygram 11.9.0 (58370)
40 | 9. Nicegram 1.42.1 (1759)
41 | 10. Telegram web 11.9.0 (58379)
42 | 11. Telegram Beta 10.13.0 (48369)
43 | 12. exteraGram 11.9.0 (58370)
44 | 13. Nekogram 11.5.3S (55150) TeleVip 1.4.6
45 | 14. ForkGram 11.9.0.2 (583728)
46 | 15. ForkClient Beta 11.5.3.0 (551109)
47 |
48 | # License
49 |
50 | This project is licensed under the GNU General Public License v3.0 (GPLv3).
51 | See the [LICENSE](./LICENSE) file for more details.
52 |
53 | Partially based on [Re-Telegram](https://github.com/Sakion-Team/Re-Telegram).
54 |
55 | Developed by an @mustafa1dev
--------------------------------------------------------------------------------
/README_ar.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # TeleVip LSPosed
4 |
5 | وحدة لتعديل تطبيق تيليجرام تحتوي على الميزات التالية:
6 |
7 | ١. إخفاء حالة "تمت المشاهدة" في المجموعات، القنوات، والرسائل الخاصة.
8 | ٢. إخفاء مؤشر "يكتب...".
9 | ٣. إخفاء حالة مشاهدة القصص.
10 | ٤. فتح جميع الميزات المقيدة والمشفرة في القنوات.
11 | ٥. تسريع سرعة التحميل في تيليجرام.
12 | ٦. تفعيل ميزات تيليجرام بريميوم.
13 | ٧. حفظ القصص في المعرض، بما في ذلك القصص التي لا يمكن حفظها عادة.
14 | ٨. إخفاء رقم الهاتف.
15 | ٩. إخفاء حالة الاتصال (أونلاين).
16 | ١٠. منع حذف الوسائط السرية.
17 | ١١. عرض الرسائل المحذوفة.
18 | ١٢. تعطيل القصص.
19 |
20 | توجد ميزات إضافية لم يتم ذكرها هنا.
21 |
22 | # التطبيقات المدعومة
23 |
24 | ١. Telegram 11.9.0 (58372)
25 | ٢. Plus 11.9.0.1 (21500)
26 | ٣. TG Connect 11.0.1 (1100109)
27 | ٤. Nagram 11.9.0 (1209)
28 | ٥. Skygram 10.20.6 (40639) – TeleVip 1.4.6
29 | ٦. iMe 11.9.0 (11090002)
30 | ٧. X Plus 11.8.2.1 (57869)
31 | ٨. Cherrygram 11.9.0 (58370)
32 | ٩. Nicegram 1.42.1 (1759)
33 | ١٠. Telegram web 11.9.0 (58379)
34 | ١١. Telegram beta 10.13.0 (48369)
35 | ١٢. Nekogram 11.5.3S (55150) – TeleVip 1.4.6
36 | ١٣. ForkGram 11.9.0.2 (583728)
37 | ١٤. ForkClient Beta 11.5.3.0 (551109)
38 |
39 |
40 | # الرخصة
41 |
42 | هذا المشروع مرخّص بموجب رخصة جنو العمومية العامة الإصدار License v3.0 (GPLv3).
43 | راجع ملف [LICENSE](./LICENSE) لمزيد من التفاصيل.
44 |
45 | مبني جزئيًا على [Re-Telegram](https://github.com/Sakion-Team/Re-Telegram).
46 |
47 | تم التطوير بواسطة @mustafa1dev
48 |
49 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.android.application)
3 | }
4 |
5 | android {
6 | namespace 'com.my.televip'
7 | compileSdk 36
8 |
9 | defaultConfig {
10 | applicationId "com.my.televip"
11 | minSdk 27
12 | targetSdk 36
13 | versionCode 1
14 | versionName "2.0"
15 |
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | compileOptions {
26 | sourceCompatibility JavaVersion.VERSION_1_8
27 | targetCompatibility JavaVersion.VERSION_1_8
28 | }
29 | ndkVersion '21.4.7075529'
30 | }
31 |
32 | dependencies {
33 |
34 | implementation libs.appcompat
35 | implementation libs.material
36 | compileOnly files('libs/classes.jar')
37 | implementation(libs.gson)
38 | testImplementation libs.junit
39 | androidTestImplementation libs.ext.junit
40 | androidTestImplementation libs.espresso.core
41 | }
--------------------------------------------------------------------------------
/app/libs/classes.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/libs/classes.jar
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/release/baselineProfiles/0/app-release.dm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/release/baselineProfiles/0/app-release.dm
--------------------------------------------------------------------------------
/app/release/baselineProfiles/1/app-release.dm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/release/baselineProfiles/1/app-release.dm
--------------------------------------------------------------------------------
/app/release/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "com.my.televip",
8 | "variantName": "release",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "attributes": [],
14 | "versionCode": 1,
15 | "versionName": "1.6",
16 | "outputFile": "app-release.apk"
17 | }
18 | ],
19 | "elementType": "File",
20 | "baselineProfiles": [
21 | {
22 | "minApi": 28,
23 | "maxApi": 30,
24 | "baselineProfiles": [
25 | "baselineProfiles/1/app-release.dm"
26 | ]
27 | },
28 | {
29 | "minApi": 31,
30 | "maxApi": 2147483647,
31 | "baselineProfiles": [
32 | "baselineProfiles/0/app-release.dm"
33 | ]
34 | }
35 | ],
36 | "minSdkVersionForDexing": 27
37 | }
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/my/televip/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.my.televip;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 | assertEquals("com.my.televip", appContext.getPackageName());
25 | }
26 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
14 |
17 |
20 |
23 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/assets/xposed_init:
--------------------------------------------------------------------------------
1 | com.my.televip.MainHook
2 |
--------------------------------------------------------------------------------
/app/src/main/java/com/my/televip/AlertDialog/onClickDialog.java:
--------------------------------------------------------------------------------
1 | package com.my.televip.AlertDialog;
2 |
3 | import android.content.Context;
4 | import android.content.DialogInterface;
5 | import android.widget.CheckBox;
6 | import android.widget.EditText;
7 |
8 | import com.my.televip.ClientChecker;
9 | import com.my.televip.MainHook;
10 | import com.my.televip.features.FeatureManager;
11 | import com.my.televip.language.Language;
12 | import com.my.televip.obfuscate.AutomationResolver;
13 | import com.my.televip.xSharedPreferences;
14 |
15 | import java.util.List;
16 |
17 | import de.robv.android.xposed.XC_MethodHook;
18 | import de.robv.android.xposed.XposedHelpers;
19 |
20 | public class onClickDialog extends Language {
21 | public static void onClickOpenUrl(Context applicationContext, XC_MethodHook.MethodHookParam param){
22 | Object drawerLayoutContainer;
23 | if (ClientChecker.check(ClientChecker.ClientType.NagramX)){
24 | drawerLayoutContainer = XposedHelpers.getObjectField(param.args[0], AutomationResolver.resolve("LaunchActivity", "drawerLayoutContainer", AutomationResolver.ResolverType.Field));
25 | }else {
26 | drawerLayoutContainer = XposedHelpers.getObjectField(param.thisObject, AutomationResolver.resolve("LaunchActivity", "drawerLayoutContainer", AutomationResolver.ResolverType.Field));
27 | }
28 | if (drawerLayoutContainer != null) {
29 | XposedHelpers.callStaticMethod(
30 | XposedHelpers.findClass(AutomationResolver.resolve("org.telegram.messenger.browser.Browser"), MainHook.lpparam.classLoader),
31 | AutomationResolver.resolve("Browser","openUrl", AutomationResolver.ResolverType.Method), applicationContext, "https://t.me/t_l0_e"
32 | );
33 | XposedHelpers.callMethod(drawerLayoutContainer, AutomationResolver.resolve("DrawerLayoutAdapter","closeDrawer", AutomationResolver.ResolverType.Method));
34 | //XposedHelpers.callMethod(dialog, "dismiss");
35 | }
36 | }
37 | public static void onClickSave(List checkBoxes){
38 | // الكود الذي يتم تنفيذه عند الضغط على الزر
39 | for (int i = 0; i < checkBoxes.size(); i++) {
40 | CheckBox checkBox = checkBoxes.get(i);
41 | if (checkBox.isChecked()) {
42 | if (checkBox.getText().toString().equals(TelegramPremium)) {
43 | xSharedPreferences.SharedPre.edit().putString("prem", "true").apply();
44 | } else if (checkBox.getText().toString().equals(HideSeenUser)) {
45 | xSharedPreferences.SharedPre.edit().putString("noRead", "true").apply();
46 | } else if (checkBox.getText().toString().equals(HideSeenGroups)) {
47 | xSharedPreferences.SharedPre.edit().putString("noRead2", "true").apply();
48 | } else if (checkBox.getText().toString().equals(HideTyping)) {
49 | xSharedPreferences.SharedPre.edit().putString("NoTyping", "true").apply();
50 | } else if (checkBox.getText().toString().equals(HideStoryView)) {
51 | xSharedPreferences.SharedPre.edit().putString("noStoryRead", "true").apply();
52 | } else if (checkBox.getText().toString().equals(UnlockAllRestricted)) {
53 | xSharedPreferences.SharedPre.edit().putString("usefolow", "true").apply();
54 | } else if (checkBox.getText().toString().equals(AllowSavingvideos)) {
55 | xSharedPreferences.SharedPre.edit().putString("allowShare", "true").apply();
56 | } else if (checkBox.getText().toString().equals(HideOnline)) {
57 | xSharedPreferences.SharedPre.edit().putString("HideOnline", "true").apply();
58 | } else if (checkBox.getText().toString().equals(PreventMedia)) {
59 | xSharedPreferences.SharedPre.edit().putString("PreventMedia", "true").apply();
60 | } else if (checkBox.getText().toString().equals(HidePhone)) {
61 | xSharedPreferences.SharedPre.edit().putString("HidePhone", "true").apply();
62 | } else if (checkBox.getText().toString().equals(ShowDeletedMessages)) {
63 | xSharedPreferences.SharedPre.edit().putString("shmsdel", "true").apply();
64 | } else if (checkBox.getText().toString().equals(DisableStories)) {
65 | xSharedPreferences.SharedPre.edit().putString("hidestore", "true").apply();
66 | }
67 | } else {
68 | if (checkBox.getText().toString().equals(TelegramPremium)) {
69 | xSharedPreferences.SharedPre.edit().remove("prem").apply();
70 | } else if (checkBox.getText().toString().equals(HideSeenUser)) {
71 | xSharedPreferences.SharedPre.edit().remove("noRead").apply();
72 | } else if (checkBox.getText().toString().equals(HideSeenGroups)) {
73 | xSharedPreferences.SharedPre.edit().remove("noRead2").apply();
74 | } else if (checkBox.getText().toString().equals(HideTyping)) {
75 | xSharedPreferences.SharedPre.edit().remove("NoTyping").apply();
76 | } else if (checkBox.getText().toString().equals(HideStoryView)) {
77 | xSharedPreferences.SharedPre.edit().remove("noStoryRead").apply();
78 | } else if (checkBox.getText().toString().equals(UnlockAllRestricted)) {
79 | xSharedPreferences.SharedPre.edit().remove("usefolow").apply();
80 | } else if (checkBox.getText().toString().equals(AllowSavingvideos)) {
81 | xSharedPreferences.SharedPre.edit().remove("allowShare").apply();
82 | } else if (checkBox.getText().toString().equals(HideOnline)) {
83 | xSharedPreferences.SharedPre.edit().remove("HideOnline").apply();
84 | } else if (checkBox.getText().toString().equals(PreventMedia)) {
85 | xSharedPreferences.SharedPre.edit().remove("PreventMedia").apply();
86 | } else if (checkBox.getText().toString().equals(HidePhone)) {
87 | xSharedPreferences.SharedPre.edit().remove("HidePhone").apply();
88 | } else if (checkBox.getText().toString().equals(ShowDeletedMessages)) {
89 | xSharedPreferences.SharedPre.edit().remove("shmsdel").apply();
90 | } else if (checkBox.getText().toString().equals(DisableStories)) {
91 | xSharedPreferences.SharedPre.edit().remove("hidestore").apply();
92 | }
93 | }
94 | }
95 |
96 | // غلق الـ AlertDialog بعد التحقق
97 | // XposedHelpers.callMethod(dialog, "dismiss");
98 |
99 | FeatureManager.readFeature();
100 | }
101 | public static void onClickToMessageId(EditText editText, Object chatActivity){
102 | String inputText = editText.getText().toString().trim();
103 | // التحقق من المدخلات
104 | if (!inputText.isEmpty()) {
105 | int msid = Integer.parseInt(inputText);
106 | XposedHelpers.callMethod(chatActivity, AutomationResolver.resolve("ChatActivity", "scrollToMessageId", AutomationResolver.ResolverType.Method), msid, 0, true, 0, true, 0);
107 | // XposedBridge.log("scrollToMessageId is call.");
108 |
109 | }
110 | }
111 | public static void onClickDismiss(DialogInterface dialog){
112 | XposedHelpers.callMethod(dialog, AutomationResolver.resolve("AlertDialog", "dismiss", AutomationResolver.ResolverType.Method));
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/app/src/main/java/com/my/televip/ClientChecker.java:
--------------------------------------------------------------------------------
1 | package com.my.televip;
2 |
3 | import java.util.Arrays;
4 |
5 | public class ClientChecker {
6 | public static boolean check(ClientType client, String pkgName)
7 | {
8 | return Arrays.asList(client.getPackageNames()).contains(pkgName);
9 | }
10 |
11 | public static boolean check(ClientType client)
12 | {
13 | return check(client, Utils.pkgName);
14 | }
15 | public static String getClientType(ClientType client){
16 | String pkg = String.valueOf(Arrays.asList(client.getPackageNames()));
17 | pkg = pkg.replace("[","").replace("]","").trim();
18 | return pkg;
19 | }
20 |
21 | public enum ClientType {
22 | Telegram("org.telegram.messenger"),
23 | TelegramWeb("org.telegram.messenger.web"),
24 | TelegramPlus("org.telegram.plus"),
25 | TGConnect("com.tgconnect.android"),
26 | Nagram("xyz.nextalone.nagram"),
27 | Nekogram("org.telegr]"),
28 | Nicegram("app.nicegram"),
29 | Cherrygram("uz.unnarsx.cherrygram"),
30 | TelegramBeta("org.telegram.messenger.beta"),
31 | NagramX("nu.gpu.nagram"),
32 | XPlus("com.xplus.messenger"),
33 | iMe("com.iMe.android"),
34 | iMeWeb("com.iMe.android.web"),
35 | forkgram("org.forkgram.messenger"),
36 | forkgramBeta("org.forkclient.messenger.beta");
37 |
38 | final String[] packageNames;
39 |
40 | ClientType(String packageName)
41 | {
42 | this.packageNames = new String[]{ packageName };
43 | }
44 |
45 | public String[] getPackageNames()
46 | {
47 | return packageNames;
48 | }
49 |
50 | public static ClientType fromPackage(String pkg){
51 | for (ClientType type: ClientType.values()){
52 | for (String name: type.getPackageNames()){
53 | if (name.equals(pkg)){
54 | return type;
55 | }
56 | }
57 | }
58 | return null;
59 | }
60 | public static boolean containsPackage(String pkg){
61 | return fromPackage(pkg) != null;
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/app/src/main/java/com/my/televip/LoaderParameter.java:
--------------------------------------------------------------------------------
1 | package com.my.televip;
2 |
3 | public interface LoaderParameter {
4 | void loadParameter1();
5 | void loadParameter2();
6 | void loadParameter3();
7 | void loadParameter4();
8 | void loadParameter5();
9 | void loadParameter6();
10 | void loadParameter7();
11 | void loadParameter8();
12 | void loadParameter9();
13 | void loadParameter10();
14 | void loadParameter11();
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/my/televip/MainHook.java:
--------------------------------------------------------------------------------
1 | package com.my.televip;
2 |
3 |
4 |
5 | import de.robv.android.xposed.XposedHelpers;
6 | import de.robv.android.xposed.callbacks.XC_LoadPackage;
7 | import android.content.Context;
8 | import android.app.Activity;
9 | import android.content.DialogInterface;
10 | import android.graphics.Color;
11 | import android.graphics.Typeface;
12 | import android.media.AudioAttributes;
13 | import android.media.AudioManager;
14 | import android.media.MediaPlayer;
15 | import android.widget.*;
16 | import de.robv.android.xposed.*;
17 |
18 | import java.io.IOException;
19 | import java.lang.reflect.Proxy;
20 | import java.util.ArrayList;
21 | import java.lang.reflect.Field;
22 | import java.lang.reflect.Constructor;
23 | import java.util.List;
24 |
25 | import androidx.annotation.NonNull;
26 |
27 | import com.my.televip.AlertDialog.onClickDialog;
28 | import com.my.televip.application.ApplicationLoaderHook;
29 | import com.my.televip.base.AbstractMethodHook;
30 | import com.my.televip.features.FeatureManager;
31 | import com.my.televip.features.NEWAntiRecall;
32 | import com.my.televip.features.OtherFeatures;
33 | import com.my.televip.features.downloadSpeed;
34 | import com.my.televip.language.Language;
35 | import com.my.televip.obfuscate.AutomationResolver;
36 | import com.my.televip.virtuals.ActiveTheme;
37 | import com.my.televip.virtuals.EventType;
38 |
39 | public class MainHook extends Language implements IXposedHookLoadPackage {
40 | public static XC_LoadPackage.LoadPackageParam lpparam;
41 | private static Field itemsField;
42 | private static Constructor> itemConstructor;
43 | public static MediaPlayer mediaPlayer;
44 | public static boolean playing=false;
45 | public static int regr=0;
46 | public static String audioUrl;
47 | private static @NonNull ArrayList getArrayList() {
48 | ArrayList list = new ArrayList<>();
49 | list.add(HideSeenUser);
50 | list.add(HideSeenGroups);
51 | list.add(HideStoryView);
52 | list.add(HideOnline);
53 | list.add(HidePhone);
54 | list.add(DisableStories);
55 | list.add(HideTyping);
56 | list.add(ShowDeletedMessages);
57 | list.add(PreventMedia);
58 | list.add(UnlockAllRestricted);
59 | list.add(AllowSavingvideos);
60 | list.add(TelegramPremium);
61 | return list;
62 | }
63 | @Override
64 | public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam lpparam) {
65 | if (!ClientChecker.ClientType.containsPackage(lpparam.packageName)) { return; }
66 | MainHook.lpparam =lpparam;
67 | Utils.pkgName = lpparam.packageName;
68 | if (ClientChecker.check(ClientChecker.ClientType.Cherrygram)){
69 | strTelevip = "cherrygram";
70 | XposedHelpers.findAndHookMethod("org.telegram.messenger.KotlinFragmentsManager",
71 | lpparam.classLoader,
72 | "vnwpoih23nkjhqj",
73 | java.lang.CharSequence.class,
74 | new AbstractMethodHook() {
75 | @Override
76 | protected void beforeMethod(MethodHookParam param) {
77 | //ازالة حماية cherrygram لتحقق من اذا كان TeleVip مفعل داخل عميل
78 | param.setResult(null);
79 | }
80 | });
81 | } else { strTelevip = "televip"; }
82 | xSharedPreferences.xSharedPre = new XSharedPreferences(lpparam.packageName, strTelevip);
83 | final Class> itemClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.ui.Adapters.DrawerLayoutAdapter$Item"), lpparam.classLoader);
84 | ClassLoader classLoader = lpparam.classLoader;
85 | ApplicationLoaderHook.init(classLoader);
86 | if (itemClass != null) {
87 | XposedHelpers.findAndHookMethod(
88 | AutomationResolver.resolve("org.telegram.ui.Adapters.DrawerLayoutAdapter"), // اسم الكلاس
89 | lpparam.classLoader,
90 | AutomationResolver.resolve("DrawerLayoutAdapter", "resetItems", AutomationResolver.ResolverType.Method), // اسم الدالة
91 | new AbstractMethodHook() {
92 | @Override
93 | protected void afterMethod(MethodHookParam param) throws Throwable {
94 | Object drawerLayoutAdapterInstance = param.thisObject;
95 |
96 | // العثور على المتغير الخاص
97 | Class> drawerLayoutAdapterClass = drawerLayoutAdapterInstance.getClass();
98 | if (itemsField == null) {
99 | itemsField = drawerLayoutAdapterClass.getDeclaredField(AutomationResolver.resolve("DrawerLayoutAdapter", "items", AutomationResolver.ResolverType.Field));
100 | itemsField.setAccessible(true);
101 | }
102 | ArrayList> items = (ArrayList>) itemsField.get(drawerLayoutAdapterInstance);
103 |
104 | // استدعاء الكلاس Item باستخدام Class.forName
105 | if (itemConstructor == null) {
106 | itemConstructor = itemClass.getDeclaredConstructor(AutomationResolver.resolveObject("para4"));
107 | itemConstructor.setAccessible(true);
108 | }
109 | // استدعاء الطريقة مباشرة
110 | if (loadClass.applicationContext == null) {
111 | loadClass.applicationContext = (Context) XposedHelpers.getStaticObjectField(
112 | XposedHelpers.findClass(AutomationResolver.resolve("org.telegram.messenger.ApplicationLoader"), lpparam.classLoader),
113 | AutomationResolver.resolve("ApplicationLoader", "applicationContext", AutomationResolver.ResolverType.Field)
114 | );
115 | }
116 | Language.init(loadClass.applicationContext);
117 | Object newItem = itemConstructor.newInstance(13048, GhostMode, EventType.IconSettings());
118 |
119 | // إضافة الكائن الجديد إلى القائمة
120 | if (items instanceof ArrayList>) {
121 | ArrayList