├── .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 typedItems = (ArrayList) items; 122 | if (!ClientChecker.check(ClientChecker.ClientType.TelegramPlus)) { 123 | typedItems.add(newItem); 124 | } else { 125 | typedItems.add(10, newItem); 126 | } 127 | } 128 | } 129 | } 130 | ); 131 | Class launchActivityClass = XposedHelpers.findClass( 132 | AutomationResolver.resolve("org.telegram.ui.LaunchActivity"), 133 | lpparam.classLoader 134 | ); 135 | 136 | AbstractMethodHook onCreateHook = new AbstractMethodHook() { 137 | @Override 138 | protected void afterMethod(final MethodHookParam param) { 139 | 140 | final Class alertDialogBuilderClass = XposedHelpers.findClassIfExists( 141 | AutomationResolver.resolve("org.telegram.ui.ActionBar.AlertDialog.Builder"), 142 | lpparam.classLoader 143 | ); 144 | if (alertDialogBuilderClass != null) { 145 | Object LaunchActivtiy; 146 | if (ClientChecker.check(ClientChecker.ClientType.NagramX)){ 147 | LaunchActivtiy = param.args[0]; 148 | }else { 149 | LaunchActivtiy = param.thisObject; 150 | } 151 | // تنفيذ الكود بعد استدعاء الدالة 152 | ActiveTheme.setActiveTheme(); 153 | Object drawerLayoutAdapter = XposedHelpers.getObjectField(LaunchActivtiy, AutomationResolver.resolve("LaunchActivity", "drawerLayoutAdapter", AutomationResolver.ResolverType.Field)); 154 | if (drawerLayoutAdapter != null) { 155 | 156 | // استدعاء getId وطباعته 157 | int result; 158 | if (ClientChecker.check(ClientChecker.ClientType.NagramX)){ 159 | result = (int) XposedHelpers.callMethod(drawerLayoutAdapter, AutomationResolver.resolve("DrawerLayoutAdapter", "getId", AutomationResolver.ResolverType.Method), param.args[2]); 160 | }else { 161 | result = (int) XposedHelpers.callMethod(drawerLayoutAdapter, AutomationResolver.resolve("DrawerLayoutAdapter", "getId", AutomationResolver.ResolverType.Method), param.args[1]); 162 | } 163 | if (result == 13048) { 164 | final Context applicationContext = (Context) LaunchActivtiy; 165 | if (loadClass.applicationContext == null) { 166 | loadClass.applicationContext = (Context) XposedHelpers.getStaticObjectField( 167 | XposedHelpers.findClass(AutomationResolver.resolve("org.telegram.messenger.ApplicationLoader"), lpparam.classLoader), 168 | AutomationResolver.resolve("ApplicationLoader", "applicationContext", AutomationResolver.ResolverType.Field) 169 | ); 170 | } 171 | xSharedPreferences.SharedPre = applicationContext.getSharedPreferences(strTelevip, Activity.MODE_PRIVATE); 172 | FeatureManager.readFeature(); 173 | Object alertDialog = XposedHelpers.newInstance(alertDialogBuilderClass, applicationContext); 174 | // عرض رسالة أو تخصيص النافذة 175 | Language.init(loadClass.applicationContext); 176 | ArrayList list = getArrayList(); 177 | final String[] items = list.toArray(new String[0]); 178 | XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve("AlertDialog", "setTitle", AutomationResolver.ResolverType.Method), Ghost_Mode); 179 | // إنشاء تخطيط جديد 180 | LinearLayout layout = new LinearLayout(applicationContext); 181 | layout.setOrientation(LinearLayout.VERTICAL); 182 | 183 | // إضافة CheckBox لكل عنصر في القائمة مع إعدادات النص 184 | final List checkBoxes = new ArrayList<>(); 185 | for (String item : items) { 186 | CheckBox checkBox = new CheckBox(applicationContext); 187 | if (item.equals(TelegramPremium) && FeatureManager.isTelePremium()) { 188 | checkBox.setChecked(true); 189 | } else if (item.equals(HideSeenUser) && FeatureManager.isHideSeenPrivate()) { 190 | checkBox.setChecked(true); 191 | } else if (item.equals(HideSeenGroups) && FeatureManager.isHideSeenGroup()) { 192 | checkBox.setChecked(true); 193 | } 194 | if (item.equals(HideTyping) && FeatureManager.isHideTyping()) { 195 | checkBox.setChecked(true); 196 | } else if (item.equals(HideStoryView) && FeatureManager.isNoStoryRead()) { 197 | checkBox.setChecked(true); 198 | } else if (item.equals(UnlockAllRestricted) && FeatureManager.isUnlockChannelFeature()) { 199 | checkBox.setChecked(true); 200 | } else if (item.equals(AllowSavingvideos) && FeatureManager.isAllowSaveToGallery()) { 201 | checkBox.setChecked(true); 202 | } else if (item.equals(HideOnline) && FeatureManager.isHideOnline()) { 203 | checkBox.setChecked(true); 204 | } else if (item.equals(PreventMedia) && FeatureManager.isPreventMedia()) { 205 | checkBox.setChecked(true); 206 | try { 207 | checkBox.setOnLongClickListener(_view -> { 208 | if (!playing) { 209 | regr = (int) (Math.random() * 3); 210 | if (regr == 0) { 211 | audioUrl = "https://qurango.net/radio/abdulbasit_abdulsamad_mojawwad"; 212 | } else if (regr == 1) { 213 | audioUrl = "https://qurango.net/radio/yasser_aldosari"; 214 | } else { 215 | audioUrl = "https://backup.qurango.net/radio/maher"; 216 | } 217 | mediaPlayer = new MediaPlayer(); 218 | //noinspection deprecation 219 | mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 220 | AudioAttributes audioAttributes = new AudioAttributes.Builder() 221 | .setUsage(AudioAttributes.USAGE_MEDIA) 222 | .setContentType(AudioAttributes.CONTENT_TYPE_MUSIC) 223 | .build(); 224 | 225 | mediaPlayer.setAudioAttributes(audioAttributes); 226 | try { 227 | mediaPlayer.setDataSource(audioUrl); 228 | } catch (IllegalArgumentException | 229 | IllegalStateException | 230 | IOException e) { 231 | throw new RuntimeException(e); 232 | } 233 | mediaPlayer.prepareAsync(); 234 | 235 | mediaPlayer.setOnPreparedListener(mp -> { 236 | mediaPlayer.start(); 237 | playing = true; 238 | }); 239 | } else { 240 | if (mediaPlayer.isPlaying()) { 241 | mediaPlayer.stop(); 242 | mediaPlayer.release(); 243 | 244 | mediaPlayer = new MediaPlayer(); 245 | //noinspection deprecation 246 | mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 247 | AudioAttributes audioAttributes = new AudioAttributes.Builder() 248 | .setUsage(AudioAttributes.USAGE_MEDIA) 249 | .setContentType(AudioAttributes.CONTENT_TYPE_MUSIC) 250 | .build(); 251 | 252 | mediaPlayer.setAudioAttributes(audioAttributes); 253 | try { 254 | mediaPlayer.setDataSource(audioUrl); 255 | } catch (IllegalArgumentException | 256 | IllegalStateException | 257 | IOException e) { 258 | throw new RuntimeException(e); 259 | } 260 | 261 | playing = false; 262 | 263 | } 264 | } 265 | return true; 266 | }); 267 | } catch (Exception ex) { 268 | Utils.log(ex.getMessage()); 269 | } 270 | } else if (item.equals(HidePhone) && FeatureManager.isHidePhone()) { 271 | checkBox.setChecked(true); 272 | } else if (item.equals(ShowDeletedMessages) && FeatureManager.ishowDeletedMessages()) { 273 | checkBox.setChecked(true); 274 | } else if (item.equals(DisableStories) && FeatureManager.isDisableStories()) { 275 | checkBox.setChecked(true); 276 | } 277 | 278 | checkBox.setText(item); 279 | if (!ActiveTheme.isCurrentThemeDay) { 280 | checkBox.setTextColor(Color.BLACK); // تغيير لون النص إلى الأبيض 281 | } else { 282 | checkBox.setTextColor(Color.WHITE); 283 | } 284 | checkBox.setPadding(10, 10, 10, 10); // إضافة هامش صغير حول النص 285 | checkBox.setTypeface(Typeface.DEFAULT_BOLD); // جعل النص مائلًا قليلاً 286 | checkBoxes.add(checkBox); 287 | layout.addView(checkBox); 288 | } 289 | 290 | // إعداد AlertDialog واستخدام setView 291 | XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve("AlertDialog", "setView", AutomationResolver.ResolverType.Method), layout); 292 | 293 | 294 | // نحصل على الكلاس الداخلي OnButtonClickListener 295 | Object onDoneListener; 296 | Object onCnelListener; 297 | Class listenerClass = XposedHelpers.findClassIfExists( 298 | AutomationResolver.resolve("org.telegram.ui.ActionBar.AlertDialog$OnButtonClickListener"), 299 | lpparam.classLoader 300 | ); 301 | if (listenerClass != null) { 302 | onDoneListener = Proxy.newProxyInstance( 303 | lpparam.classLoader, 304 | new Class[]{listenerClass}, 305 | (proxy, method, args) -> { 306 | if (method.getName().equals("onClick")) { 307 | onClickDialog.onClickSave(checkBoxes); 308 | } 309 | return null; 310 | } 311 | ); 312 | onCnelListener = Proxy.newProxyInstance( 313 | lpparam.classLoader, 314 | new Class[]{listenerClass}, 315 | (proxy, method, args) -> { 316 | if (method.getName().equals("onClick")) { 317 | onClickDialog.onClickOpenUrl(applicationContext, param); 318 | } 319 | return null; 320 | } 321 | ); 322 | 323 | } else { 324 | onDoneListener = (DialogInterface.OnClickListener) (dialog, which) -> onClickDialog.onClickSave(checkBoxes); 325 | onCnelListener = (DialogInterface.OnClickListener) (dialog, which) -> onClickDialog.onClickOpenUrl(applicationContext, param); 326 | } 327 | // إعداد الزر الموجب 328 | XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve("AlertDialog", "setPositiveButton", AutomationResolver.ResolverType.Method), 329 | Save, onDoneListener 330 | ); 331 | XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve("AlertDialog", "setNegativeButton", AutomationResolver.ResolverType.Method), 332 | DeveloperChannel, onCnelListener 333 | ); 334 | /* 335 | XposedHelpers.callMethod(alertDialog, "setNeutralButton", 336 | "سجل القنوات", 337 | new DialogInterface.OnClickListener() { 338 | @Override 339 | public void onClick(DialogInterface dialog, int which) { 340 | XposedHelpers.callMethod(dialog, "dismiss"); 341 | } 342 | } 343 | ); 344 | */ 345 | 346 | 347 | XposedHelpers.callMethod(alertDialog, AutomationResolver.resolve("AlertDialog", "show", AutomationResolver.ResolverType.Method)); 348 | } 349 | 350 | } else { 351 | Utils.log("Not found DrawerLayoutAdapter, " + Utils.issue); 352 | } 353 | } else { 354 | Utils.log("Not found org.telegram.ui.ActionBar.AlertDialog.Builder, " + Utils.issue); 355 | } 356 | } 357 | }; 358 | if (ClientChecker.check(ClientChecker.ClientType.NagramX)) { 359 | AutomationResolver.loadParameter("10"); 360 | XposedHelpers.findAndHookMethod( 361 | launchActivityClass, 362 | AutomationResolver.resolve("LaunchActivity", "lambda$onCreate$6", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject("Parameter10"), onCreateHook)); 363 | } else { 364 | XposedHelpers.findAndHookMethod( 365 | launchActivityClass, 366 | AutomationResolver.resolve("LaunchActivity", "lambda$onCreate$6", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject("para5"), onCreateHook)); 367 | } 368 | } 369 | NEWAntiRecall.initUI(lpparam.classLoader); 370 | FeatureManager.readFeature(); 371 | downloadSpeed.init(); 372 | OtherFeatures.init(); 373 | 374 | 375 | 376 | } 377 | 378 | } 379 | 380 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/Utils.java: -------------------------------------------------------------------------------- 1 | package com.my.televip; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.GsonBuilder; 5 | 6 | import java.io.File; 7 | import java.util.ArrayList; 8 | 9 | import de.robv.android.xposed.XposedBridge; 10 | 11 | public class Utils { 12 | public static String pkgName = null; 13 | public static final String issue = "Your telegram may have been modified! You can submit issue to let developer to try support to the telegram client you are using."; 14 | private static final Gson BUILDER_GSON = new GsonBuilder().setPrettyPrinting().create(); 15 | //public static File deletedMessagesSavePath = null; 16 | public static File deletedMessagesDatabasePath = null; 17 | 18 | public static void log(String text) 19 | { 20 | XposedBridge.log("[TeleVip] pkgName: "+ pkgName +" " + text); 21 | } 22 | 23 | public static void log(Throwable throwable) 24 | { 25 | XposedBridge.log(throwable); 26 | } 27 | 28 | public static ArrayList castList(Object obj, Class clazz) 29 | { 30 | ArrayList result = new ArrayList<>(); 31 | if (obj instanceof ArrayList) 32 | { 33 | for (Object o : (ArrayList) obj) 34 | result.add(clazz.cast(o)); 35 | 36 | return result; 37 | } 38 | return result; 39 | } 40 | /* 41 | public static void readDeletedMessages() 42 | { 43 | if (deletedMessagesSavePath == null) 44 | return; 45 | 46 | try 47 | { 48 | JsonElement valueJsonElement = JsonParser.parseReader(new BufferedReader(new FileReader(deletedMessagesSavePath))); 49 | 50 | if (!valueJsonElement.isJsonNull() && valueJsonElement instanceof JsonObject jsonObject) { 51 | jsonObject.entrySet().forEach(entry -> { 52 | JsonObject jsonObject2 = entry.getValue().getAsJsonObject(); 53 | jsonObject2.entrySet().forEach(entry2 -> { 54 | JsonArray jsonModule = entry2.getValue().getAsJsonArray(); 55 | CopyOnWriteArrayList list = new CopyOnWriteArrayList<>(); 56 | jsonModule.forEach(id -> list.add(id.getAsInt())); 57 | AntiRecall.insertDeletedMessageFromSaveFile(Integer.parseInt(entry.getKey().trim()), Long.parseLong(entry2.getKey().trim()), list); 58 | }); 59 | }); 60 | } 61 | } 62 | catch (IOException e) 63 | { 64 | e.printStackTrace(); 65 | } 66 | } 67 | 68 | public static void saveDeletedMessages() 69 | { 70 | if (deletedMessagesSavePath == null) 71 | return; 72 | 73 | JsonObject valueJsonObject = new JsonObject(); 74 | 75 | List accounts = new ArrayList<>(); 76 | 77 | for (DeletedMessageInfo deletedMessageInfo : AntiRecall.getDeletedMessagesIds()) 78 | { 79 | if (!accounts.contains(deletedMessageInfo.getSelectedAccount())) 80 | accounts.add(deletedMessageInfo.getSelectedAccount()); 81 | } 82 | 83 | if (!accounts.isEmpty()) 84 | { 85 | for (int account : accounts) { 86 | JsonObject valueJsonObject2 = new JsonObject(); 87 | 88 | for (DeletedMessageInfo deletedMessageInfo : AntiRecall.getDeletedMessagesIds()) { 89 | if (deletedMessageInfo.getSelectedAccount() == account) 90 | { 91 | JsonArray jsonModule = new JsonArray(); 92 | deletedMessageInfo.getMessageIds().forEach(jsonModule::add); 93 | valueJsonObject2.add(String.valueOf(deletedMessageInfo.getChannelID()), jsonModule); 94 | } 95 | } 96 | 97 | valueJsonObject.add(String.valueOf(account), valueJsonObject2); 98 | } 99 | } 100 | 101 | FileUtils.save(deletedMessagesSavePath, BUILDER_GSON.toJson(valueJsonObject), false); 102 | } 103 | */ 104 | public static Gson getBuilderGson() { 105 | return BUILDER_GSON; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/application/ApplicationLoaderHook.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.application; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import android.widget.Toast; 6 | 7 | import java.io.File; 8 | import java.io.IOException; 9 | 10 | import de.robv.android.xposed.XC_MethodHook; 11 | import de.robv.android.xposed.XposedHelpers; 12 | import com.my.televip.Utils; 13 | import com.my.televip.configs.ConfigManager; 14 | import com.my.televip.language.Language; 15 | import com.my.televip.obfuscate.AutomationResolver; 16 | 17 | public class ApplicationLoaderHook extends Language { 18 | private static boolean initialized = false; 19 | 20 | public static void init(ClassLoader loader) { 21 | // our minSdk is 21 so there is no need to wait for MultiDex to initialize 22 | if (initialized) 23 | return; 24 | 25 | Class applicationClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.ApplicationLoader"), loader); 26 | if (applicationClass == null) 27 | applicationClass = XposedHelpers.findClassIfExists("org.telegram.messenger.ApplicationLoaderImpl", loader); 28 | if (applicationClass == null) 29 | applicationClass = XposedHelpers.findClassIfExists("org.thunderdog.challegram.BaseApplication", loader); 30 | if (applicationClass == null) { 31 | Utils.log("Not found ApplicationLoader, " + Utils.issue); 32 | return; 33 | } 34 | XposedHelpers.findAndHookMethod(applicationClass, AutomationResolver.resolve("ApplicationLoader", "onCreate", AutomationResolver.ResolverType.Method), new XC_MethodHook(51) { 35 | @Override 36 | protected void beforeHookedMethod(MethodHookParam param) { 37 | Context app = (Application) param.thisObject; 38 | 39 | try { 40 | app = app.getApplicationContext(); 41 | } catch (Throwable ignored) { 42 | } 43 | 44 | if (app == null) 45 | { 46 | Utils.log("ApplicationLoader is wrong, " + Utils.issue); 47 | return; 48 | } 49 | 50 | File dir = new File(app.getFilesDir().getParentFile(), strTelevip); 51 | if (!dir.exists()) 52 | if (!dir.mkdir()) 53 | { 54 | Toast.makeText(app, "Cannot create " + dir.getAbsolutePath() + " dir, please create by yourself!", Toast.LENGTH_LONG).show(); 55 | Utils.log("Cannot create " + dir.getAbsolutePath() + " dir, please create by yourself!"); 56 | return; 57 | } 58 | //Utils.deletedMessagesSavePath = new File(dir.getAbsolutePath() + "/deletedMessages.list"); 59 | Utils.deletedMessagesDatabasePath = new File(dir.getAbsolutePath() + "/deletedMessages.db"); 60 | ConfigManager.cfgPath = new File(dir.getAbsolutePath() + "/AntiRecall.cfg"); 61 | try 62 | { 63 | if (!ConfigManager.cfgPath.exists()) 64 | { 65 | ConfigManager.cfgPath.createNewFile(); 66 | ConfigManager.save(); 67 | } 68 | 69 | //Utils.readDeletedMessages(); 70 | ConfigManager.read(); 71 | ConfigManager.save(); 72 | HostApplicationInfo.setApplication(app); 73 | } 74 | catch (IOException e) 75 | { 76 | Utils.log(e); 77 | } 78 | } 79 | }); 80 | initialized = true; 81 | } 82 | } -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/application/HostApplicationInfo.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.application; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import android.content.pm.PackageInfo; 6 | import android.content.pm.PackageManager; 7 | import android.os.Build; 8 | 9 | import java.util.Objects; 10 | 11 | public class HostApplicationInfo { 12 | 13 | private static Context sHostApplication = null; 14 | private static PackageInfo sHostPackageInfo = null; 15 | private static String sHostAppPackageName = null; 16 | private static int sHostVersionCode = 0; 17 | private static long sHostLongVersionCode = 0; 18 | private static String sHostAppVersionName = null; 19 | private static String sHostAppName = null; 20 | 21 | public static void setApplication(Context app) { 22 | Objects.requireNonNull(app, "app"); 23 | sHostApplication = app; 24 | try { 25 | sHostPackageInfo = app.getPackageManager().getPackageInfo(app.getPackageName(), PackageManager.GET_META_DATA); 26 | } catch (PackageManager.NameNotFoundException e) { 27 | // should not happen, we must be installed 28 | throw new IllegalStateException(e); 29 | } 30 | sHostAppPackageName = app.getPackageName(); 31 | sHostVersionCode = sHostPackageInfo.versionCode; 32 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { 33 | sHostLongVersionCode = sHostPackageInfo.getLongVersionCode(); 34 | } else { 35 | sHostLongVersionCode = sHostVersionCode; 36 | } 37 | sHostAppVersionName = sHostPackageInfo.versionName; 38 | sHostAppName = sHostPackageInfo.applicationInfo.loadLabel(app.getPackageManager()).toString(); 39 | } 40 | 41 | public static Context getApplication() { 42 | return sHostApplication; 43 | } 44 | 45 | public static String getPackageName() { 46 | return sHostAppPackageName; 47 | } 48 | 49 | public static String getAppName() { 50 | return sHostAppName; 51 | } 52 | 53 | public static String getVersionName() { 54 | return sHostAppVersionName; 55 | } 56 | 57 | public static PackageInfo getPackageInfo() { 58 | return sHostPackageInfo; 59 | } 60 | 61 | public static int getVersionCode() { 62 | return sHostVersionCode; 63 | } 64 | 65 | public static long getLongVersionCode() { 66 | return sHostLongVersionCode; 67 | } 68 | } -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/base/AbstractMethodHook.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.base; 2 | 3 | import de.robv.android.xposed.XC_MethodHook; 4 | import com.my.televip.Utils; 5 | 6 | public abstract class AbstractMethodHook extends XC_MethodHook { 7 | protected void beforeMethod(MethodHookParam param) throws Throwable { 8 | 9 | } 10 | 11 | protected void afterMethod(MethodHookParam param) throws Throwable { 12 | 13 | } 14 | 15 | @Override 16 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable { 17 | super.beforeHookedMethod(param); 18 | try { 19 | beforeMethod(param); 20 | } catch (Throwable throwable) { 21 | Utils.log(throwable); 22 | } 23 | } 24 | 25 | @Override 26 | protected void afterHookedMethod(MethodHookParam param) throws Throwable { 27 | super.afterHookedMethod(param); 28 | try { 29 | afterMethod(param); 30 | } catch (Throwable throwable) { 31 | Utils.log(throwable); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/base/AbstractReplaceHook.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.base; 2 | 3 | import java.lang.reflect.InvocationTargetException; 4 | 5 | import de.robv.android.xposed.XC_MethodReplacement; 6 | import de.robv.android.xposed.XposedBridge; 7 | import com.my.televip.Utils; 8 | 9 | public class AbstractReplaceHook extends XC_MethodReplacement { 10 | protected Object replaceMethod(MethodHookParam param) throws Throwable { 11 | return null; 12 | } 13 | 14 | @Override 15 | protected Object replaceHookedMethod(MethodHookParam param) throws Throwable { 16 | try { 17 | return replaceMethod(param); 18 | } catch (Throwable throwable) { 19 | Utils.log(throwable); 20 | } 21 | try { 22 | return XposedBridge.invokeOriginalMethod(param.method, param.thisObject, param.args); 23 | } catch (InvocationTargetException ex) { 24 | throw ex.getTargetException(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/configs/ConfigManager.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.configs; 2 | 3 | import com.google.gson.JsonElement; 4 | import com.google.gson.JsonObject; 5 | import com.google.gson.JsonParser; 6 | import com.google.gson.JsonPrimitive; 7 | 8 | import java.io.BufferedReader; 9 | import java.io.File; 10 | import java.io.FileReader; 11 | import java.io.IOException; 12 | 13 | import com.my.televip.Utils; 14 | import com.my.televip.utils.FileUtils; 15 | 16 | public class ConfigManager { 17 | public static File cfgPath = null; 18 | 19 | public static void read() 20 | { 21 | if (cfgPath == null) 22 | return; 23 | 24 | try 25 | { 26 | JsonElement valueJsonElement = JsonParser.parseReader(new BufferedReader(new FileReader(cfgPath))); 27 | if (!valueJsonElement.isJsonNull() && valueJsonElement instanceof JsonObject) 28 | { 29 | JsonObject jsonObject = (JsonObject) valueJsonElement; 30 | jsonObject.entrySet().forEach(entry -> { 31 | JsonObject jsonModule = entry.getValue().getAsJsonObject(); 32 | if (jsonModule.get("AntiRecall") != null) 33 | Configs.setAntiRecall(jsonModule.get("AntiRecall").getAsBoolean()); 34 | //if (jsonModule.get("UnlockedNoPremiumAccountsLimit") != null) 35 | // Configs.setUnlockedNoPremiumAccountsLimit(jsonModule.get("UnlockedNoPremiumAccountsLimit").getAsBoolean()); 36 | }); 37 | } 38 | } 39 | catch (IOException e) 40 | { 41 | Utils.log(e); 42 | } 43 | } 44 | 45 | public static void save() 46 | { 47 | if (cfgPath == null) 48 | return; 49 | 50 | JsonObject valueJsonObject = new JsonObject(); 51 | JsonObject jsonModule = new JsonObject(); 52 | valueJsonObject.add("TeleVip", jsonModule); 53 | jsonModule.add("AntiRecall", new JsonPrimitive(Configs.isAntiRecall())); 54 | //jsonModule.add("UnlockedNoPremiumAccountsLimit", new JsonPrimitive(Configs.isUnlockedNoPremiumAccountsLimit())); 55 | FileUtils.save(cfgPath, Utils.getBuilderGson().toJson(valueJsonObject), false); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/configs/Configs.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.configs; 2 | 3 | public class Configs { 4 | private static boolean antiRecall = true; 5 | private static final String antiRecallText = ""; 6 | private static final boolean antiRecallTextColorful = true; 7 | private static final int antiRecallTextRed = 255; 8 | 9 | 10 | public static boolean isAntiRecall() { 11 | return antiRecall; 12 | } 13 | 14 | public static String getAntiRecallText() { 15 | return antiRecallText; 16 | } 17 | 18 | public static boolean isAntiRecallTextColorful() { 19 | return antiRecallTextColorful; 20 | } 21 | 22 | public static int getAntiRecallTextRed() { 23 | return Math.max(Math.min(255, antiRecallTextRed), 0); 24 | } 25 | 26 | public static int getAntiRecallTextGreen() { 27 | return 0; 28 | } 29 | 30 | public static int getAntiRecallTextBlue() { 31 | return 0; 32 | } 33 | 34 | public static void setAntiRecall(boolean value) { 35 | antiRecall = value; 36 | ConfigManager.save(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/AllowSaveToGallery.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | 5 | import com.my.televip.base.AbstractMethodHook; 6 | import com.my.televip.obfuscate.AutomationResolver; 7 | 8 | import de.robv.android.xposed.XposedHelpers; 9 | 10 | public class AllowSaveToGallery { 11 | 12 | public static void init() { 13 | Class PeerStoriesView$StoryItemHolderClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.ui.Stories.PeerStoriesView$StoryItemHolder"), lpparam.classLoader); 14 | if (PeerStoriesView$StoryItemHolderClass != null) { 15 | XposedHelpers.findAndHookMethod(PeerStoriesView$StoryItemHolderClass, AutomationResolver.resolve("PeerStoriesView$StoryItemHolder","allowScreenshots", AutomationResolver.ResolverType.Method), new AbstractMethodHook() { 16 | @Override 17 | protected void beforeMethod(MethodHookParam param) { 18 | param.setResult(true); 19 | } 20 | }); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/DisableStories.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | 5 | import com.my.televip.ClientChecker; 6 | import com.my.televip.base.AbstractMethodHook; 7 | import com.my.televip.loadClass; 8 | import com.my.televip.obfuscate.AutomationResolver; 9 | import de.robv.android.xposed.XposedHelpers; 10 | 11 | public class DisableStories { 12 | 13 | public static void init() { 14 | if (loadClass.MessagesControllerClass == null) { 15 | loadClass.MessagesControllerClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.MessagesController"), lpparam.classLoader); 16 | } 17 | if (loadClass.MessagesControllerClass != null){ 18 | XposedHelpers.findAndHookMethod(loadClass.MessagesControllerClass, AutomationResolver.resolve("MessagesController","storiesEnabled", AutomationResolver.ResolverType.Method), new AbstractMethodHook() { 19 | @Override 20 | protected void beforeMethod(MethodHookParam param) { 21 | param.setResult(false); 22 | } 23 | }); 24 | XposedHelpers.findAndHookMethod(loadClass.MessagesControllerClass, AutomationResolver.resolve("MessagesController","storyEntitiesAllowed", AutomationResolver.ResolverType.Method), new AbstractMethodHook() { 25 | @Override 26 | protected void beforeMethod(MethodHookParam param) { 27 | param.setResult(false); 28 | 29 | } 30 | }); 31 | AutomationResolver.loadParameter("8"); 32 | XposedHelpers.findAndHookMethod(loadClass.MessagesControllerClass, AutomationResolver.resolve("MessagesController","storyEntitiesAllowed", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject("Parameter8"), new AbstractMethodHook() { 33 | @Override 34 | protected void beforeMethod(MethodHookParam param) { 35 | param.setResult(false); 36 | } 37 | })); 38 | } 39 | Class StoriesControllerClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.ui.Stories.StoriesController"), lpparam.classLoader); 40 | if (StoriesControllerClass != null) { 41 | if (ClientChecker.check(ClientChecker.ClientType.NagramX)){ 42 | XposedHelpers.findAndHookMethod(StoriesControllerClass, AutomationResolver.resolve("MessagesController", "hasStories", AutomationResolver.ResolverType.Method),long.class, new AbstractMethodHook() { 43 | @Override 44 | protected void beforeMethod(MethodHookParam param) { 45 | param.setResult(false); 46 | 47 | } 48 | }); 49 | }else { 50 | XposedHelpers.findAndHookMethod(StoriesControllerClass, AutomationResolver.resolve("MessagesController", "hasStories", AutomationResolver.ResolverType.Method), new AbstractMethodHook() { 51 | @Override 52 | protected void beforeMethod(MethodHookParam param) { 53 | param.setResult(false); 54 | 55 | } 56 | }); 57 | } 58 | } 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/FeatureManager.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | 5 | import com.my.televip.language.Language; 6 | import com.my.televip.xSharedPreferences; 7 | 8 | import de.robv.android.xposed.XSharedPreferences; 9 | 10 | public class FeatureManager { 11 | public static boolean isTelePremium() { 12 | return xSharedPreferences.xSharedPre.contains("prem"); 13 | } 14 | public static boolean isHideSeenPrivate() { 15 | return xSharedPreferences.xSharedPre.contains("noRead"); 16 | } 17 | public static boolean isHideSeenGroup() { 18 | return xSharedPreferences.xSharedPre.contains("noRead2"); 19 | } 20 | public static boolean isNoStoryRead() { 21 | return xSharedPreferences.xSharedPre.contains("noStoryRead"); 22 | } 23 | public static boolean isHideTyping() { 24 | return xSharedPreferences.xSharedPre.contains("NoTyping"); 25 | } 26 | public static boolean isUnlockChannelFeature() { 27 | return xSharedPreferences.xSharedPre.contains("usefolow"); 28 | } 29 | public static boolean isAllowSaveToGallery() { 30 | return xSharedPreferences.xSharedPre.contains("allowShare"); 31 | } 32 | public static boolean isHideOnline() { 33 | return xSharedPreferences.xSharedPre.contains("HideOnline"); 34 | } 35 | public static boolean isPreventMedia() { 36 | return xSharedPreferences.xSharedPre.contains("PreventMedia"); 37 | } 38 | public static boolean isHidePhone() { 39 | return xSharedPreferences.xSharedPre.contains("HidePhone"); 40 | } 41 | public static boolean ishowDeletedMessages() { 42 | return xSharedPreferences.xSharedPre.contains("shmsdel"); 43 | } 44 | public static boolean isDisableStories() { 45 | return xSharedPreferences.xSharedPre.contains("hidestore"); 46 | } 47 | 48 | public static void readFeature(){ 49 | xSharedPreferences.xSharedPre = new XSharedPreferences(lpparam.packageName, Language.strTelevip); 50 | if (FeatureManager.isTelePremium()) {TelePremium.init();} 51 | if (FeatureManager.isHideSeenGroup() || FeatureManager.isHideSeenPrivate()) { HideSeen.init(); } 52 | if (FeatureManager.isNoStoryRead()){ NoStoryRead.init(); } 53 | if (FeatureManager.isHideTyping()){ HideTyping.init(); } 54 | if (FeatureManager.isUnlockChannelFeature()){ UnlockChannelFeature.init(); } 55 | if (FeatureManager.isAllowSaveToGallery()){ AllowSaveToGallery.init(); } 56 | if (FeatureManager.isHideOnline()){ com.my.televip.features.HideOnline.init(); } 57 | if (FeatureManager.isPreventMedia()){ com.my.televip.features.PreventMedia.init(); } 58 | if (FeatureManager.ishowDeletedMessages()){ 59 | 60 | NEWAntiRecall.initProcessing(lpparam.classLoader); 61 | NEWAntiRecall.init(lpparam.classLoader); 62 | NEWAntiRecall.initAutoDownload(lpparam.classLoader); 63 | } 64 | if (FeatureManager.isDisableStories()){ DisableStories.init(); } 65 | if (FeatureManager.isHidePhone()){ 66 | com.my.televip.features.HidePhone.init(); 67 | } 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/HideOnline.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | import static com.my.televip.language.Language.UserOffline; 5 | 6 | import com.my.televip.base.AbstractMethodHook; 7 | import com.my.televip.loadClass; 8 | import com.my.televip.obfuscate.AutomationResolver; 9 | 10 | import java.lang.reflect.Field; 11 | import java.lang.reflect.Method; 12 | 13 | import de.robv.android.xposed.XposedBridge; 14 | import de.robv.android.xposed.XposedHelpers; 15 | 16 | public class HideOnline { 17 | private static Method getUserConfigMethod; 18 | private static Method getClientUserIdMethod; 19 | private static Field userIdField; 20 | public static void init() { 21 | // العثور على الكلاسات المطلوبة للمعاملات 22 | Class connectionsManagerClass = XposedHelpers.findClassIfExists( 23 | AutomationResolver.resolve("org.telegram.tgnet.ConnectionsManager"), 24 | lpparam.classLoader 25 | ); 26 | if (connectionsManagerClass != null) { 27 | AutomationResolver.loadParameter("4"); 28 | XposedHelpers.findMethodExact(connectionsManagerClass, AutomationResolver.resolve("ConnectionsManager", "sendRequestInternal", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject("Parameter4"), new AbstractMethodHook() { 29 | @Override 30 | protected void beforeMethod(MethodHookParam param) { 31 | try { 32 | Class tlAccountUpdateStatusClass; 33 | if (lpparam.packageName.equals("com.tgconnect.android") || lpparam.packageName.equals("org.telegram.messenger.beta")) { 34 | tlAccountUpdateStatusClass = XposedHelpers.findClassIfExists( 35 | AutomationResolver.resolve("org.telegram.tgnet.TLRPC$TL_account_updateStatus"), 36 | param.thisObject.getClass().getClassLoader() 37 | ); 38 | 39 | } else { 40 | tlAccountUpdateStatusClass = XposedHelpers.findClassIfExists( 41 | AutomationResolver.resolve("org.telegram.tgnet.tl.TL_account$updateStatus"), lpparam.classLoader 42 | ); 43 | } 44 | // التحقق من النوع وتعديله 45 | Object object = param.args[0]; // أول معامل في الطريقة 46 | if (tlAccountUpdateStatusClass.isInstance(object)) { 47 | // تعديل الخاصية offline إلى true 48 | XposedHelpers.setBooleanField(object, AutomationResolver.resolve("TL_account$updateStatus", "offline", AutomationResolver.ResolverType.Field), true); 49 | // XposedBridge.log("Modified TL_account_updateStatus: offline set to true."); 50 | } 51 | } catch (Exception e) { 52 | XposedBridge.log("Error while handling TL_account_updateStatus: " + e.getMessage()); 53 | } 54 | 55 | } 56 | })); 57 | if (loadClass.ProfileActivityClass == null) { 58 | loadClass.ProfileActivityClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.ui.ProfileActivity"), lpparam.classLoader); 59 | } 60 | if (loadClass.BaseFragmentClass == null) { 61 | loadClass.BaseFragmentClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.ui.ActionBar.BaseFragment"), lpparam.classLoader); 62 | } 63 | if (loadClass.ProfileActivityClass != null && loadClass.BaseFragmentClass != null) { 64 | 65 | XposedHelpers.findAndHookMethod(loadClass.ProfileActivityClass, 66 | AutomationResolver.resolve("ProfileActivity", "updateProfileData", AutomationResolver.ResolverType.Method), 67 | AutomationResolver.merge(AutomationResolver.resolveObject("para8"), 68 | new AbstractMethodHook() { 69 | @Override 70 | protected void afterMethod(MethodHookParam param) throws Throwable { 71 | final Object profileActivityInstance = param.thisObject; 72 | if (getUserConfigMethod == null) { 73 | getUserConfigMethod = loadClass.BaseFragmentClass.getDeclaredMethod(AutomationResolver.resolve("BaseFragment", "getUserConfig", AutomationResolver.ResolverType.Method)); 74 | getUserConfigMethod.setAccessible(true); 75 | } 76 | Object userConfig = getUserConfigMethod.invoke(profileActivityInstance); 77 | 78 | if (userConfig != null) { 79 | if (getClientUserIdMethod == null) { 80 | getClientUserIdMethod = userConfig.getClass().getDeclaredMethod(AutomationResolver.resolve("UserConfig", "getClientUserId", AutomationResolver.ResolverType.Method)); 81 | getClientUserIdMethod.setAccessible(true); 82 | } 83 | //noinspection DataFlowIssue 84 | long clientUserId = (long) getClientUserIdMethod.invoke(userConfig); 85 | if (userIdField == null) { 86 | userIdField = loadClass.ProfileActivityClass.getDeclaredField(AutomationResolver.resolve("ProfileActivity", "userId", AutomationResolver.ResolverType.Field)); 87 | userIdField.setAccessible(true); 88 | } 89 | final long userId = userIdField.getLong(profileActivityInstance); 90 | if (userId != 0 && userId == clientUserId) { 91 | Object[] onlineTextViewArray = (Object[]) XposedHelpers.getObjectField(profileActivityInstance, AutomationResolver.resolve("ProfileActivity", "onlineTextView", AutomationResolver.ResolverType.Field)); 92 | 93 | if (onlineTextViewArray != null && onlineTextViewArray.length > 1) { 94 | // الحصول على SimpleTextView[1] 95 | Object simpleTextView1 = onlineTextViewArray[1]; 96 | 97 | if (simpleTextView1 != null) { 98 | // استدعاء setText باستخدام LSPosed 99 | XposedHelpers.callMethod(simpleTextView1, AutomationResolver.resolve("SimpleTextView", "setText", AutomationResolver.ResolverType.Method), UserOffline); 100 | } 101 | } 102 | } 103 | } 104 | } 105 | }) 106 | ); 107 | } 108 | } 109 | } 110 | 111 | } 112 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/HidePhone.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | 5 | import com.my.televip.base.AbstractMethodHook; 6 | import com.my.televip.loadClass; 7 | import com.my.televip.obfuscate.AutomationResolver; 8 | 9 | import java.lang.reflect.Method; 10 | 11 | import de.robv.android.xposed.XC_MethodHook; 12 | import de.robv.android.xposed.XposedHelpers; 13 | 14 | public class HidePhone { 15 | private static Method getUserConfigMethod; 16 | private static Method getClientUserIdMethod; 17 | public static void init() { 18 | if (loadClass.MessagesControllerClass == null) { 19 | loadClass.MessagesControllerClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.MessagesController"), lpparam.classLoader); 20 | } 21 | if (loadClass.MessagesControllerClass != null) { 22 | Class baseControllerClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.BaseController"), lpparam.classLoader); 23 | if (baseControllerClass != null) { 24 | 25 | XposedHelpers.findAndHookMethod(loadClass.MessagesControllerClass, AutomationResolver.resolve("MessagesController","getUser", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject("para1"), new AbstractMethodHook() { 26 | @Override 27 | protected void afterMethod(XC_MethodHook.MethodHookParam param) throws Throwable { 28 | Object userObject = param.getResult(); 29 | Object MessagesControllerInstance = param.thisObject; 30 | if (userObject != null) { 31 | if (getUserConfigMethod == null) { 32 | getUserConfigMethod = baseControllerClass.getDeclaredMethod(AutomationResolver.resolve("BaseController","getUserConfig", AutomationResolver.ResolverType.Method)); 33 | getUserConfigMethod.setAccessible(true); 34 | } 35 | Object userConfig = getUserConfigMethod.invoke(MessagesControllerInstance); 36 | if (getClientUserIdMethod == null) { 37 | getClientUserIdMethod = userConfig.getClass().getDeclaredMethod(AutomationResolver.resolve("UserConfig","getClientUserId", AutomationResolver.ResolverType.Method)); 38 | getClientUserIdMethod.setAccessible(true); 39 | } 40 | long clientUserId = (long) getClientUserIdMethod.invoke(userConfig); 41 | long userid = (long) param.args[0]; 42 | if (clientUserId == userid) { 43 | XposedHelpers.setObjectField(userObject, AutomationResolver.resolve("UserConfig","phone", AutomationResolver.ResolverType.Field), null); 44 | } 45 | } 46 | } 47 | })); 48 | } 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/HideSeen.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | 5 | import com.my.televip.base.AbstractMethodHook; 6 | import com.my.televip.loadClass; 7 | import com.my.televip.obfuscate.AutomationResolver; 8 | import java.lang.reflect.Method; 9 | 10 | import de.robv.android.xposed.XposedBridge; 11 | import de.robv.android.xposed.XposedHelpers; 12 | 13 | public class HideSeen { 14 | private static Method getUserMethod; 15 | public static void init() { 16 | AutomationResolver.loadParameter("2"); 17 | if (loadClass.MessagesControllerClass == null) { 18 | loadClass.MessagesControllerClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.MessagesController"), lpparam.classLoader); 19 | } 20 | if (loadClass.MessagesControllerClass != null){ 21 | 22 | XposedHelpers.findAndHookMethod( 23 | loadClass.MessagesControllerClass , 24 | AutomationResolver.resolve("MessagesController","completeReadTask", AutomationResolver.ResolverType.Method), // اسم الدالة 25 | AutomationResolver.merge(AutomationResolver.resolveObject("Parameter2"), new AbstractMethodHook() { 26 | @Override 27 | protected void beforeMethod(MethodHookParam param) { 28 | // التحقق من الإعدادات 29 | if (FeatureManager.isHideSeenPrivate() && FeatureManager.isHideSeenGroup()) { 30 | //XposedBridge.log("completeReadTask method is blocked."); 31 | param.setResult(null); // إيقاف تنفيذ الدالة الأصلية 32 | return; 33 | } 34 | 35 | // الحصول على الكائن task 36 | Object task = param.args[0]; 37 | if (task != null) { 38 | // استخراج dialogId من الكائن task 39 | long dialogId = (long) XposedHelpers.getObjectField(task, AutomationResolver.resolve("MessagesController$ReadTask","dialogId", AutomationResolver.ResolverType.Field)); 40 | if (dialogId != 0){ 41 | // الحصول على الكائن الحالي لـ MessagesController 42 | Object messagesControllerInstance = param.thisObject; 43 | 44 | try { 45 | if (getUserMethod == null) { 46 | getUserMethod = loadClass.MessagesControllerClass .getDeclaredMethod(AutomationResolver.resolve("MessagesController", "getUser", AutomationResolver.ResolverType.Method), AutomationResolver.resolveObject("para1")); 47 | getUserMethod.setAccessible(true); 48 | } 49 | // تحويل dialogId إلى Long 50 | Long useridObject = dialogId; 51 | 52 | // استدعاء getChat باستخدام الكائن messagesControllerInstance 53 | Object user = getUserMethod.invoke(messagesControllerInstance, useridObject); 54 | 55 | if (user != null) { 56 | if (FeatureManager.isHideSeenPrivate()){ 57 | // XposedBridge.log("completeReadTask method is blocked."); 58 | param.setResult(null); // إيقاف تنفيذ الدالة الأصلية 59 | } 60 | } else { 61 | if (FeatureManager.isHideSeenGroup()){ 62 | // XposedBridge.log("completeReadTask method is blocked."); 63 | param.setResult(null); // إيقاف تنفيذ الدالة الأصلية 64 | } 65 | } 66 | } catch (Exception e) { 67 | XposedBridge.log("Error invoking getUser: " + e.getMessage()); 68 | } 69 | }else { 70 | XposedBridge.log("dialogId is 0."); 71 | } 72 | } else { 73 | XposedBridge.log("Task is null."); 74 | } 75 | } 76 | 77 | })); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/HideTyping.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | 5 | import com.my.televip.base.AbstractMethodHook; 6 | import com.my.televip.obfuscate.AutomationResolver; 7 | 8 | import de.robv.android.xposed.XposedHelpers; 9 | 10 | public class HideTyping { 11 | 12 | public static void init() { 13 | Class chatActivityEnterViewDelegateClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.ui.ChatActivity$ChatActivityEnterViewDelegate"), lpparam.classLoader); 14 | if (chatActivityEnterViewDelegateClass != null) { 15 | XposedHelpers.findAndHookMethod( 16 | chatActivityEnterViewDelegateClass, 17 | AutomationResolver.resolve("ChatActivity$ChatActivityEnterViewDelegate","needSendTyping", AutomationResolver.ResolverType.Method), 18 | new AbstractMethodHook() { 19 | @Override 20 | protected void beforeMethod(MethodHookParam param) { 21 | //XposedBridge.log("needSendTyping method is blocked."); 22 | param.setResult(null); 23 | } 24 | }); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/NoStoryRead.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | 5 | import com.my.televip.base.AbstractMethodHook; 6 | import com.my.televip.obfuscate.AutomationResolver; 7 | import de.robv.android.xposed.XposedHelpers; 8 | 9 | public class NoStoryRead { 10 | 11 | public static void init() { 12 | 13 | Class StoriesControllerClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.ui.Stories.StoriesController"), lpparam.classLoader); 14 | if (StoriesControllerClass != null) { 15 | AutomationResolver.loadParameter("1"); 16 | XposedHelpers.findAndHookMethod( 17 | StoriesControllerClass, 18 | AutomationResolver.resolve("StoriesController","markStoryAsRead", AutomationResolver.ResolverType.Method), 19 | AutomationResolver.merge(AutomationResolver.resolveObject("Parameter1"), new AbstractMethodHook() { 20 | @Override 21 | protected void beforeMethod(MethodHookParam param) { 22 | param.setResult(false); 23 | } 24 | })); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/PreventMedia.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | 5 | import com.my.televip.base.AbstractMethodHook; 6 | import com.my.televip.loadClass; 7 | import com.my.televip.obfuscate.AutomationResolver; 8 | 9 | import java.lang.reflect.Field; 10 | 11 | import de.robv.android.xposed.XposedHelpers; 12 | 13 | public class PreventMedia { 14 | private static Field messageOwnerField; 15 | public static void init() { 16 | if (loadClass.MessageObjectClass == null) { 17 | loadClass.MessageObjectClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.MessageObject"), lpparam.classLoader); 18 | } 19 | Class ChatActivityClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.ui.ChatActivity"), lpparam.classLoader); 20 | 21 | if (loadClass.MessageObjectClass != null) { 22 | if (ChatActivityClass != null) { 23 | AutomationResolver.loadParameter("5"); 24 | AutomationResolver.loadParameter("6"); 25 | XposedHelpers.findAndHookMethod(ChatActivityClass, AutomationResolver.resolve("ChatActivity","sendSecretMessageRead", AutomationResolver.ResolverType.Method),AutomationResolver.merge(AutomationResolver.resolveObject("Parameter5"), new AbstractMethodHook() { 26 | @Override 27 | protected void beforeMethod(MethodHookParam param) { 28 | param.setResult(null); 29 | } 30 | })); 31 | XposedHelpers.findAndHookMethod(ChatActivityClass, AutomationResolver.resolve("ChatActivity","sendSecretMediaDelete", AutomationResolver.ResolverType.Method),AutomationResolver.merge(AutomationResolver.resolveObject("Parameter6"), new AbstractMethodHook() { 32 | @Override 33 | protected void beforeMethod(MethodHookParam param) { 34 | param.setResult(null); 35 | } 36 | })); 37 | } 38 | AutomationResolver.loadParameter("7"); 39 | 40 | Class SecretMediaViewerClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.ui.SecretMediaViewer"), lpparam.classLoader); 41 | 42 | XposedHelpers.findAndHookMethod(SecretMediaViewerClass,AutomationResolver.resolve("SecretMediaViewer","openMedia", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject("Parameter7"), new AbstractMethodHook() { 43 | @Override 44 | protected void beforeMethod(MethodHookParam param) throws Throwable { 45 | param.args[2] = null; 46 | param.args[3] = null; 47 | // الحصول على كائن ChatActivity 48 | Object forwardingMessage = param.args[0]; 49 | 50 | if (forwardingMessage != null) { 51 | // الوصول إلى الحقل messageOwner داخل forwardingMessage 52 | Class forwardingMessageClass = forwardingMessage.getClass(); 53 | if (messageOwnerField == null) { 54 | messageOwnerField = forwardingMessageClass.getDeclaredField(AutomationResolver.resolve("MessageObject", "messageOwner", AutomationResolver.ResolverType.Field)); 55 | messageOwnerField.setAccessible(true); 56 | } 57 | Object messageOwner = messageOwnerField.get(forwardingMessage); 58 | 59 | if (messageOwner != null) { 60 | XposedHelpers.setObjectField(messageOwner, AutomationResolver.resolve("TLRPC$Message","ttl", AutomationResolver.ResolverType.Field), 0x7FFFFFFF); 61 | } 62 | } 63 | } 64 | })); 65 | XposedHelpers.findAndHookMethod(SecretMediaViewerClass,AutomationResolver.resolve("SecretMediaViewer","closePhoto", AutomationResolver.ResolverType.Method),AutomationResolver.merge(AutomationResolver.resolveObject("para6"), new AbstractMethodHook() { 66 | @Override 67 | protected void beforeMethod(MethodHookParam param) { 68 | Object thisObject = param.thisObject; 69 | XposedHelpers.setObjectField(thisObject, AutomationResolver.resolve("SecretMediaViewer","onClose", AutomationResolver.ResolverType.Field), null); 70 | } 71 | })); 72 | } 73 | 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/TelePremium.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | 5 | 6 | import com.my.televip.ClientChecker; 7 | import com.my.televip.base.AbstractMethodHook; 8 | import com.my.televip.obfuscate.AutomationResolver; 9 | 10 | import de.robv.android.xposed.XC_MethodHook; 11 | import de.robv.android.xposed.XposedHelpers; 12 | 13 | public class TelePremium { 14 | 15 | public static void init(){ 16 | Class userConfigClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.UserConfig"), lpparam.classLoader); 17 | if ( userConfigClass != null) { 18 | // استخدم hook لتعديل متغير isPremium في الكائن 19 | XposedHelpers.findAndHookMethod(userConfigClass, AutomationResolver.resolve("UserConfig","isPremium", AutomationResolver.ResolverType.Method), new AbstractMethodHook() { 20 | @Override 21 | public void beforeMethod(XC_MethodHook.MethodHookParam param) { 22 | param.setResult(true); 23 | } 24 | }); 25 | } 26 | if (ClientChecker.check(ClientChecker.ClientType.iMe) || ClientChecker.check(ClientChecker.ClientType.iMeWeb)){ 27 | Class ForkPremiumPreferencClass = XposedHelpers.findClassIfExists("com.iMe.storage.data.locale.prefs.impl.ForkPremiumPreference", lpparam.classLoader); 28 | XposedHelpers.findAndHookMethod(ForkPremiumPreferencClass, "isPremium", new AbstractMethodHook() { 29 | @Override 30 | protected void beforeMethod(MethodHookParam param) { 31 | param.setResult(true); 32 | } 33 | }); 34 | } 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/UnlockChannelFeature.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | 5 | import com.my.televip.base.AbstractMethodHook; 6 | import com.my.televip.loadClass; 7 | import com.my.televip.obfuscate.AutomationResolver; 8 | import com.my.televip.xSharedPreferences; 9 | 10 | import de.robv.android.xposed.XC_MethodHook; 11 | import de.robv.android.xposed.XposedHelpers; 12 | 13 | public class UnlockChannelFeature { 14 | 15 | public static void init() { 16 | if (loadClass.MessagesControllerClass == null) { 17 | loadClass.MessagesControllerClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.MessagesController"), lpparam.classLoader); 18 | } 19 | if (loadClass.MessagesControllerClass != null) { 20 | AutomationResolver.loadParameter("3"); 21 | XposedHelpers.findAndHookMethod(loadClass.MessagesControllerClass, AutomationResolver.resolve("MessagesController","isChatNoForwards", AutomationResolver.ResolverType.Method), AutomationResolver.merge(AutomationResolver.resolveObject("Parameter3"), new AbstractMethodHook() { 22 | @Override 23 | protected void beforeMethod(MethodHookParam param) { 24 | param.setResult(false); 25 | 26 | } 27 | })); 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/features/downloadSpeed.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.features; 2 | 3 | import static com.my.televip.MainHook.lpparam; 4 | 5 | import com.my.televip.base.AbstractMethodHook; 6 | import com.my.televip.obfuscate.AutomationResolver; 7 | 8 | import de.robv.android.xposed.XposedHelpers; 9 | 10 | public class downloadSpeed { 11 | 12 | public static void init() { 13 | Class FileLoadOperationClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.FileLoadOperation"), lpparam.classLoader); 14 | if (FileLoadOperationClass != null) { 15 | XposedHelpers.findAndHookMethod(FileLoadOperationClass, AutomationResolver.resolve("FileLoadOperation","updateParams", AutomationResolver.ResolverType.Method), new AbstractMethodHook() { 16 | @Override 17 | protected void afterMethod(MethodHookParam param) { 18 | int downloadChunkSizeBig; 19 | int maxDownloadRequests = 12; 20 | int maxDownloadRequestsBig = 12; 21 | int maxCdnParts; 22 | downloadChunkSizeBig = 1024 * 1024; // 1MB 23 | long DefaulMaxFileSize = 1024L * 1024L * 2000L; 24 | 25 | maxCdnParts = (int) (DefaulMaxFileSize / downloadChunkSizeBig); 26 | 27 | XposedHelpers.setIntField(param.thisObject, AutomationResolver.resolve("FileLoadOperation","downloadChunkSizeBig", AutomationResolver.ResolverType.Field), downloadChunkSizeBig); 28 | XposedHelpers.setObjectField(param.thisObject, AutomationResolver.resolve("FileLoadOperation","maxDownloadRequests", AutomationResolver.ResolverType.Field), maxDownloadRequests); 29 | XposedHelpers.setObjectField(param.thisObject, AutomationResolver.resolve("FileLoadOperation","maxDownloadRequestsBig", AutomationResolver.ResolverType.Field), maxDownloadRequestsBig); 30 | XposedHelpers.setObjectField(param.thisObject, AutomationResolver.resolve("FileLoadOperation","maxCdnParts", AutomationResolver.ResolverType.Field), maxCdnParts); 31 | 32 | 33 | } 34 | }); 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/language/Language.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.language; 2 | 3 | 4 | import android.content.Context; 5 | import android.content.res.Configuration; 6 | 7 | import com.my.televip.MainHook; 8 | 9 | import java.util.Locale; 10 | 11 | public class Language { 12 | public static String ToTheBeginning; 13 | public static String ToTheMessage; 14 | public static String InputMessageId; 15 | public static String Done; 16 | public static String NewName; 17 | public static String Change; 18 | public static String Cancel; 19 | public static String ChangeTo; 20 | public static String NameDeleted; 21 | public static String GhostMode; 22 | public static String HideSeenUser; 23 | public static String HideSeenGroups; 24 | public static String HideStoryView; 25 | public static String HideTyping; 26 | public static String TelegramPremium; 27 | public static String UnlockAllRestricted; 28 | public static String AllowSavingvideos; 29 | public static String Ghost_Mode; 30 | public static String Save; 31 | public static String DeveloperChannel; 32 | public static String HideOnline; 33 | public static String PreventMedia; 34 | public static String HidePhone; 35 | public static String ShowDeletedMessages; 36 | public static String deleted; 37 | public static String Copied; 38 | public static String ToTheClipboard; 39 | public static String UserOffline; 40 | public static String DisableStories; 41 | public static String strTelevip="televip"; 42 | 43 | public static void init(Context context) 44 | { 45 | if (getAppLanguage(context).equals("ar")) { 46 | ToTheBeginning="اذهب إلى أول رسالة"; 47 | ToTheMessage="إلى الرسالة"; 48 | InputMessageId="ادخل معرف الرسالة"; 49 | Done="حسناً"; 50 | NewName="الاسم الجديد"; 51 | Change="تغير"; 52 | Cancel="الغاء"; 53 | ChangeTo="تم تغير الى"; 54 | NameDeleted="تم حذف الاسم"; 55 | GhostMode="وضع الشبح 👻"; 56 | HideSeenUser="اخفاء علامة الاستلام من المحادثة الخاصة"; 57 | HideSeenGroups="اخفاء علامة الاستلام من المجموعات والقنوات"; 58 | HideStoryView="اخفاء مشاهدة قصة"; 59 | HideTyping="اخفاء مؤشر الكتاب"; 60 | TelegramPremium="فتح تيليجرام المميز"; 61 | UnlockAllRestricted="فتح جميع الخصائص المشفره والمغلقه"; 62 | AllowSavingvideos="سماح حفظ الفيديو في معرض"; 63 | Ghost_Mode="مميزات وضع شبح"; 64 | Save="حفظ"; 65 | DeveloperChannel="قناة المطور"; 66 | HideOnline="إخفاء حالة الاتصال بالإنترنت"; 67 | PreventMedia ="تعطيل حذف الوسائط السرية"; 68 | HidePhone="اخفاء رقم هاتف"; 69 | ShowDeletedMessages="اضهار الرسائل المحذوفة"; 70 | deleted="محذوفه"; 71 | Copied = "تم نسخ '"; 72 | ToTheClipboard = "' إلى الحافظة"; 73 | UserOffline ="لست متصلاً بالإنترنت"; 74 | DisableStories="اخفاء القصص"; 75 | }else if (getAppLanguage(context).equals("zh")) { 76 | ToTheBeginning = "跳转到第一条消息"; 77 | ToTheMessage = "跳转到消息"; 78 | InputMessageId = "输入消息 ID"; 79 | Done = "完成"; 80 | NewName = "新名字"; 81 | Change = "更改"; 82 | Cancel = "取消"; 83 | ChangeTo = "更改为"; 84 | NameDeleted = "名称已删除"; 85 | GhostMode = "幽灵模式 👻"; 86 | HideSeenUser = "隐藏私人聊天的已读状态"; 87 | HideSeenGroups = "隐藏群组和频道的已读状态"; 88 | HideStoryView = "隐藏 '故事观看' 状态"; 89 | HideTyping = "隐藏正在输入..."; 90 | TelegramPremium = "启用 Telegram 本地会员"; 91 | UnlockAllRestricted = "解锁频道的所有受限和加密功能"; 92 | AllowSavingvideos = "允许将视频保存到图库"; 93 | Ghost_Mode = "幽灵模式"; 94 | Save = "保存"; 95 | DeveloperChannel = "开发者频道"; 96 | HideOnline = "隐藏 '在线' 状态"; 97 | PreventMedia = "防止删除秘密媒体"; 98 | HidePhone = "隐藏 '电话' 号码"; 99 | ShowDeletedMessages = "显示已删除的消息"; 100 | deleted = "已删除"; 101 | Copied = "已复制 '"; 102 | ToTheClipboard = "' 到剪贴板"; 103 | UserOffline="您当前处于离线状态"; 104 | DisableStories = "禁用 故事"; 105 | }else { 106 | ToTheBeginning = "Go to First Message"; 107 | ToTheMessage="To The Message"; 108 | InputMessageId = "Input Message Id"; 109 | Done = "Done"; 110 | NewName = "New Name"; 111 | Change = "Change"; 112 | Cancel = "Cancel"; 113 | ChangeTo="Change to"; 114 | NameDeleted = "Name deleted"; 115 | GhostMode="Ghost Mode 👻"; 116 | HideSeenUser = "Hide 'Seen' status for private chats"; 117 | HideSeenGroups = "Hide 'Seen' status for groups and channels"; 118 | HideStoryView = "Hide 'Story View' status"; 119 | HideTyping = "Hide Typing..."; 120 | TelegramPremium = "Enable Telegram Premium"; 121 | UnlockAllRestricted = "Unlock all restricted and encrypted features for channels"; 122 | AllowSavingvideos = "Allow saving videos to the gallery"; 123 | Ghost_Mode = "Ghost Mode"; 124 | Save="Save"; 125 | DeveloperChannel="Developer Channel"; 126 | HideOnline="Hide 'Online' status"; 127 | PreventMedia ="Prevent Deletion of Secret Media."; 128 | HidePhone ="Hide 'Phone' number"; 129 | ShowDeletedMessages = "Show 'Deleted Messages'"; 130 | deleted = "deleted"; 131 | Copied = "Copied '"; 132 | ToTheClipboard = "' to the clipboard"; 133 | UserOffline = "You are currently offline"; 134 | DisableStories ="Disable 'Stories'"; 135 | } 136 | } 137 | public static String getAppLanguage(Context context) { 138 | Configuration config = context.getResources().getConfiguration(); 139 | Locale locale; 140 | 141 | // تحقق من إصدار النظام للحصول على Locale بالطريقة الصحيحة 142 | locale = config.getLocales().get(0); // في الإصدارات الجديدة 143 | 144 | // إرجاع اسم اللغة 145 | return locale.getLanguage(); // مثال: "ar" للعربية 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/loadClass.java: -------------------------------------------------------------------------------- 1 | package com.my.televip; 2 | 3 | import android.content.Context; 4 | 5 | public class loadClass { 6 | public static Class ChatActivityClass; 7 | public static Class MessageObjectClass; 8 | public static Class ProfileActivityClass; 9 | public static Class BaseFragmentClass; 10 | public static Class drawableClass; 11 | public static Context applicationContext; 12 | public static Class UserObjectClass; 13 | public static Class MessagesControllerClass; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/obfuscate/AutomationResolver.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.obfuscate; 2 | 3 | 4 | 5 | import com.my.televip.ClientChecker; 6 | import com.my.televip.LoaderParameter; 7 | import com.my.televip.Utils; 8 | import com.my.televip.obfuscate.resolves.Cherrygram; 9 | import com.my.televip.obfuscate.resolves.Nagram; 10 | import com.my.televip.obfuscate.resolves.NagramX; 11 | import com.my.televip.obfuscate.resolves.Nicegram; 12 | import com.my.televip.obfuscate.resolves.TGConnect; 13 | import com.my.televip.obfuscate.resolves.Telegram; 14 | import com.my.televip.obfuscate.resolves.TelegramBeta; 15 | import com.my.televip.obfuscate.resolves.TelegramPlus; 16 | import com.my.televip.obfuscate.resolves.TelegramWeb; 17 | import com.my.televip.obfuscate.resolves.XPlus; 18 | import com.my.televip.obfuscate.resolves.forkgram; 19 | import com.my.televip.obfuscate.resolves.forkgramBeta; 20 | import com.my.televip.obfuscate.resolves.iMe; 21 | import com.my.televip.obfuscate.resolves.iMeWeb; 22 | 23 | import java.util.HashMap; 24 | import java.util.Map; 25 | 26 | import de.robv.android.xposed.XC_MethodHook; 27 | 28 | public class AutomationResolver { 29 | public static Map Loaders = new HashMap<>(); 30 | 31 | public static String resolve(String className, String pkgName) 32 | { 33 | if (ClientChecker.check(ClientChecker.ClientType.Telegram, pkgName)) 34 | { 35 | if (Telegram.ClassResolver.has(className)) 36 | return Telegram.ClassResolver.resolve(className); 37 | } else if (ClientChecker.check(ClientChecker.ClientType.TelegramWeb, pkgName)) 38 | { 39 | if (TelegramWeb.ClassResolver.has(className)) 40 | return TelegramWeb.ClassResolver.resolve(className); 41 | } else if (ClientChecker.check(ClientChecker.ClientType.TelegramPlus, pkgName)) 42 | { 43 | if (TelegramPlus.ClassResolver.has(className)) 44 | return TelegramPlus.ClassResolver.resolve(className); 45 | } else if (ClientChecker.check(ClientChecker.ClientType.TGConnect, pkgName)) 46 | { 47 | if (TGConnect.ClassResolver.has(className)) 48 | return TGConnect.ClassResolver.resolve(className); 49 | } else if (ClientChecker.check(ClientChecker.ClientType.Nagram, pkgName)) 50 | { 51 | if (Nagram.ClassResolver.has(className)) 52 | return Nagram.ClassResolver.resolve(className); 53 | }else if (ClientChecker.check(ClientChecker.ClientType.Nicegram, pkgName)) 54 | { 55 | if (Nicegram.ClassResolver.has(className)) 56 | return Nicegram.ClassResolver.resolve(className); 57 | }else if (ClientChecker.check(ClientChecker.ClientType.Cherrygram, pkgName)) 58 | { 59 | if (Cherrygram.ClassResolver.has(className)) 60 | return Cherrygram.ClassResolver.resolve(className); 61 | }else if (ClientChecker.check(ClientChecker.ClientType.TelegramBeta, pkgName)) 62 | { 63 | if (TelegramBeta.ClassResolver.has(className)) 64 | return TelegramBeta.ClassResolver.resolve(className); 65 | }else if (ClientChecker.check(ClientChecker.ClientType.NagramX, pkgName)) 66 | { 67 | if (NagramX.ClassResolver.has(className)) 68 | return NagramX.ClassResolver.resolve(className); 69 | }else if (ClientChecker.check(ClientChecker.ClientType.XPlus, pkgName)) 70 | { 71 | if (XPlus.ClassResolver.has(className)) 72 | return XPlus.ClassResolver.resolve(className); 73 | }else if (ClientChecker.check(ClientChecker.ClientType.iMe, pkgName)) 74 | { 75 | if (iMe.ClassResolver.has(className)) 76 | return iMe.ClassResolver.resolve(className); 77 | }else if (ClientChecker.check(ClientChecker.ClientType.iMeWeb, pkgName)) 78 | { 79 | if (iMeWeb.ClassResolver.has(className)) 80 | return iMeWeb.ClassResolver.resolve(className); 81 | }else if (ClientChecker.check(ClientChecker.ClientType.forkgram, pkgName)) 82 | { 83 | if (forkgram.ClassResolver.has(className)) 84 | return forkgram.ClassResolver.resolve(className); 85 | }else if (ClientChecker.check(ClientChecker.ClientType.forkgramBeta, pkgName)) 86 | { 87 | if (forkgramBeta.ClassResolver.has(className)) 88 | return forkgramBeta.ClassResolver.resolve(className); 89 | } 90 | 91 | return className; 92 | } 93 | 94 | public static Class[] resolveObject(String name, String pkgName) 95 | { 96 | if (ClientChecker.check(ClientChecker.ClientType.Telegram, pkgName)) 97 | { 98 | if (Telegram.ParameterResolver.has(name)) { 99 | return Telegram.ParameterResolver.resolve(name); 100 | } 101 | } else if (ClientChecker.check(ClientChecker.ClientType.TelegramWeb, pkgName)) 102 | { 103 | if (TelegramWeb.ParameterResolver.has(name)) { 104 | return TelegramWeb.ParameterResolver.resolve(name); 105 | } 106 | } else if (ClientChecker.check(ClientChecker.ClientType.TelegramPlus, pkgName)) 107 | { 108 | if (TelegramPlus.ParameterResolver.has(name)) { 109 | return TelegramPlus.ParameterResolver.resolve(name); 110 | } 111 | }else if (ClientChecker.check(ClientChecker.ClientType.TGConnect, pkgName)) 112 | { 113 | if (TGConnect.ParameterResolver.has(name)) { 114 | return TGConnect.ParameterResolver.resolve(name); 115 | } 116 | }else if (ClientChecker.check(ClientChecker.ClientType.Nagram, pkgName)) 117 | { 118 | if (Nagram.ParameterResolver.has(name)) { 119 | return Nagram.ParameterResolver.resolve(name); 120 | } 121 | }else if (ClientChecker.check(ClientChecker.ClientType.Nicegram, pkgName)) 122 | { 123 | if (Nicegram.ParameterResolver.has(name)) { 124 | return Nicegram.ParameterResolver.resolve(name); 125 | } 126 | }else if (ClientChecker.check(ClientChecker.ClientType.Cherrygram, pkgName)) 127 | { 128 | if (Cherrygram.ParameterResolver.has(name)) { 129 | return Cherrygram.ParameterResolver.resolve(name); 130 | } 131 | }else if (ClientChecker.check(ClientChecker.ClientType.TelegramBeta, pkgName)) 132 | { 133 | if (TelegramBeta.ParameterResolver.has(name)) { 134 | return TelegramBeta.ParameterResolver.resolve(name); 135 | } 136 | }else if (ClientChecker.check(ClientChecker.ClientType.NagramX, pkgName)) 137 | { 138 | if (NagramX.ParameterResolver.has(name)) { 139 | return NagramX.ParameterResolver.resolve(name); 140 | } 141 | }else if (ClientChecker.check(ClientChecker.ClientType.XPlus, pkgName)) 142 | { 143 | if (XPlus.ParameterResolver.has(name)) { 144 | return XPlus.ParameterResolver.resolve(name); 145 | } 146 | }else if (ClientChecker.check(ClientChecker.ClientType.iMe, pkgName)) 147 | { 148 | if (iMe.ParameterResolver.has(name)) { 149 | return iMe.ParameterResolver.resolve(name); 150 | } 151 | }else if (ClientChecker.check(ClientChecker.ClientType.iMeWeb, pkgName)) 152 | { 153 | if (iMeWeb.ParameterResolver.has(name)) { 154 | return iMeWeb.ParameterResolver.resolve(name); 155 | } 156 | }else if (ClientChecker.check(ClientChecker.ClientType.forkgram, pkgName)) 157 | { 158 | if (forkgram.ParameterResolver.has(name)) { 159 | return forkgram.ParameterResolver.resolve(name); 160 | } 161 | }else if (ClientChecker.check(ClientChecker.ClientType.forkgramBeta, pkgName)) 162 | { 163 | if (forkgramBeta.ParameterResolver.has(name)) { 164 | return forkgramBeta.ParameterResolver.resolve(name); 165 | } 166 | } 167 | return null; 168 | } 169 | 170 | public static String resolve(String className, String name, ResolverType type, String pkgName) 171 | { 172 | if (ClientChecker.check(ClientChecker.ClientType.Telegram, pkgName)) 173 | { 174 | if (type == ResolverType.Field) 175 | { 176 | if (Telegram.FieldResolver.has(className, name)) 177 | return Telegram.FieldResolver.resolve(className, name); 178 | } 179 | else if (type == ResolverType.Method) 180 | { 181 | if (Telegram.MethodResolver.has(className, name)) 182 | return Telegram.MethodResolver.resolve(className, name); 183 | } 184 | } else if (ClientChecker.check(ClientChecker.ClientType.TelegramWeb, pkgName)) 185 | { 186 | if (type == ResolverType.Field) 187 | { 188 | if (TelegramWeb.FieldResolver.has(className, name)) 189 | return TelegramWeb.FieldResolver.resolve(className, name); 190 | } 191 | else if (type == ResolverType.Method) 192 | { 193 | if (TelegramWeb.MethodResolver.has(className, name)) 194 | return TelegramWeb.MethodResolver.resolve(className, name); 195 | } 196 | } else if (ClientChecker.check(ClientChecker.ClientType.TelegramPlus, pkgName)) 197 | { 198 | if (type == ResolverType.Field) 199 | { 200 | if (TelegramPlus.FieldResolver.has(className, name)) 201 | return TelegramPlus.FieldResolver.resolve(className, name); 202 | } 203 | else if (type == ResolverType.Method) 204 | { 205 | if (TelegramPlus.MethodResolver.has(className, name)) 206 | return TelegramPlus.MethodResolver.resolve(className, name); 207 | } 208 | } else if (ClientChecker.check(ClientChecker.ClientType.TGConnect, pkgName)) 209 | { 210 | if (type == ResolverType.Field) 211 | { 212 | if (TGConnect.FieldResolver.has(className, name)) 213 | return TGConnect.FieldResolver.resolve(className, name); 214 | } 215 | else if (type == ResolverType.Method) 216 | { 217 | if (TGConnect.MethodResolver.has(className, name)) 218 | return TGConnect.MethodResolver.resolve(className, name); 219 | } 220 | }else if (ClientChecker.check(ClientChecker.ClientType.Nagram, pkgName)) 221 | { 222 | if (type == ResolverType.Field) 223 | { 224 | if (Nagram.FieldResolver.has(className, name)) 225 | return Nagram.FieldResolver.resolve(className, name); 226 | } 227 | else if (type == ResolverType.Method) 228 | { 229 | if (Nagram.MethodResolver.has(className, name)) 230 | return Nagram.MethodResolver.resolve(className, name); 231 | } 232 | }else if (ClientChecker.check(ClientChecker.ClientType.Nicegram, pkgName)) 233 | { 234 | if (type == ResolverType.Field) 235 | { 236 | if (Nicegram.FieldResolver.has(className, name)) 237 | return Nicegram.FieldResolver.resolve(className, name); 238 | } 239 | else if (type == ResolverType.Method) 240 | { 241 | if (Nicegram.MethodResolver.has(className, name)) 242 | return Nicegram.MethodResolver.resolve(className, name); 243 | } 244 | }else if (ClientChecker.check(ClientChecker.ClientType.Cherrygram, pkgName)) 245 | { 246 | if (type == ResolverType.Field) 247 | { 248 | if (Cherrygram.FieldResolver.has(className, name)) 249 | return Cherrygram.FieldResolver.resolve(className, name); 250 | } 251 | else if (type == ResolverType.Method) 252 | { 253 | if (Cherrygram.MethodResolver.has(className, name)) 254 | return Cherrygram.MethodResolver.resolve(className, name); 255 | } 256 | }else if (ClientChecker.check(ClientChecker.ClientType.TelegramBeta, pkgName)) 257 | { 258 | if (type == ResolverType.Field) 259 | { 260 | if (TelegramBeta.FieldResolver.has(className, name)) 261 | return TelegramBeta.FieldResolver.resolve(className, name); 262 | } 263 | else if (type == ResolverType.Method) 264 | { 265 | if (TelegramBeta.MethodResolver.has(className, name)) 266 | return TelegramBeta.MethodResolver.resolve(className, name); 267 | } 268 | }else if (ClientChecker.check(ClientChecker.ClientType.NagramX, pkgName)) 269 | { 270 | if (type == ResolverType.Field) 271 | { 272 | if (NagramX.FieldResolver.has(className, name)) 273 | return NagramX.FieldResolver.resolve(className, name); 274 | } 275 | else if (type == ResolverType.Method) 276 | { 277 | if (NagramX.MethodResolver.has(className, name)) 278 | return NagramX.MethodResolver.resolve(className, name); 279 | } 280 | }else if (ClientChecker.check(ClientChecker.ClientType.XPlus, pkgName)) 281 | { 282 | if (type == ResolverType.Field) 283 | { 284 | if (XPlus.FieldResolver.has(className, name)) 285 | return XPlus.FieldResolver.resolve(className, name); 286 | } 287 | else if (type == ResolverType.Method) 288 | { 289 | if (XPlus.MethodResolver.has(className, name)) 290 | return XPlus.MethodResolver.resolve(className, name); 291 | } 292 | }else if (ClientChecker.check(ClientChecker.ClientType.iMe, pkgName)) 293 | { 294 | if (type == ResolverType.Field) 295 | { 296 | if (iMe.FieldResolver.has(className, name)) 297 | return iMe.FieldResolver.resolve(className, name); 298 | } 299 | else if (type == ResolverType.Method) 300 | { 301 | if (iMe.MethodResolver.has(className, name)) 302 | return iMe.MethodResolver.resolve(className, name); 303 | } 304 | }else if (ClientChecker.check(ClientChecker.ClientType.iMeWeb, pkgName)) 305 | { 306 | if (type == ResolverType.Field) 307 | { 308 | if (iMeWeb.FieldResolver.has(className, name)) 309 | return iMeWeb.FieldResolver.resolve(className, name); 310 | } 311 | else if (type == ResolverType.Method) 312 | { 313 | if (iMeWeb.MethodResolver.has(className, name)) 314 | return iMeWeb.MethodResolver.resolve(className, name); 315 | } 316 | }else if (ClientChecker.check(ClientChecker.ClientType.forkgram, pkgName)) 317 | { 318 | if (type == ResolverType.Field) 319 | { 320 | if (forkgram.FieldResolver.has(className, name)) 321 | return forkgram.FieldResolver.resolve(className, name); 322 | } 323 | else if (type == ResolverType.Method) 324 | { 325 | if (forkgram.MethodResolver.has(className, name)) 326 | return forkgram.MethodResolver.resolve(className, name); 327 | } 328 | }else if (ClientChecker.check(ClientChecker.ClientType.forkgramBeta, pkgName)) 329 | { 330 | if (type == ResolverType.Field) 331 | { 332 | if (forkgramBeta.FieldResolver.has(className, name)) 333 | return forkgramBeta.FieldResolver.resolve(className, name); 334 | } 335 | else if (type == ResolverType.Method) 336 | { 337 | if (forkgramBeta.MethodResolver.has(className, name)) 338 | return forkgramBeta.MethodResolver.resolve(className, name); 339 | } 340 | } 341 | return name; 342 | } 343 | 344 | 345 | 346 | public static String resolve(String className) 347 | { 348 | return resolve(className, Utils.pkgName); 349 | } 350 | public static Class[] resolveObject(String name) 351 | { 352 | return resolveObject(name, Utils.pkgName); 353 | } 354 | 355 | public static String resolve(String className, String name, ResolverType type) 356 | { 357 | return resolve(className, name, type, Utils.pkgName); 358 | } 359 | public static Object[] merge(Class[] classes, XC_MethodHook hook) 360 | { 361 | Object[] result = new Object[classes.length + 1]; 362 | System.arraycopy(classes, 0, result, 0, classes.length); 363 | result[classes.length] = hook; 364 | return result; 365 | } 366 | public static void loadParameter(String name){ 367 | if (Loaders.isEmpty()) { 368 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.Telegram), new Telegram.loadParameter()); 369 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.TelegramWeb), new TelegramWeb.loadParameter()); 370 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.TelegramPlus), new TelegramPlus.loadParameter()); 371 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.TGConnect), new TGConnect.loadParameter()); 372 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.Nagram), new Nagram.loadParameter()); 373 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.Nicegram), new Nicegram.loadParameter()); 374 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.Cherrygram), new Cherrygram.loadParameter()); 375 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.TelegramBeta), new TelegramBeta.loadParameter()); 376 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.NagramX), new NagramX.loadParameter()); 377 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.XPlus), new XPlus.loadParameter()); 378 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.iMe), new iMe.loadParameter()); 379 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.iMeWeb), new iMeWeb.loadParameter()); 380 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.forkgram), new forkgram.loadParameter()); 381 | Loaders.put(ClientChecker.getClientType(ClientChecker.ClientType.forkgramBeta), new forkgramBeta.loadParameter()); 382 | } 383 | if (!Loaders.isEmpty()) { 384 | LoaderParameter loader = Loaders.get(Utils.pkgName); 385 | if (loader != null) { 386 | switch (name) { 387 | case "1": 388 | loader.loadParameter1(); 389 | break; 390 | case "2": 391 | loader.loadParameter2(); 392 | break; 393 | case "3": 394 | loader.loadParameter3(); 395 | break; 396 | case "4": 397 | loader.loadParameter4(); 398 | break; 399 | case "5": 400 | loader.loadParameter5(); 401 | break; 402 | case "6": 403 | loader.loadParameter6(); 404 | break; 405 | case "7": 406 | loader.loadParameter7(); 407 | break; 408 | case "8": 409 | loader.loadParameter8(); 410 | break; 411 | case "9": 412 | loader.loadParameter9(); 413 | break; 414 | case "10": 415 | loader.loadParameter10(); 416 | break; 417 | case "11": 418 | loader.loadParameter11(); 419 | break; 420 | } 421 | } 422 | } 423 | } 424 | public enum ResolverType 425 | { 426 | Field, 427 | Method 428 | } 429 | } 430 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/obfuscate/resolves/Nekogram.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.obfuscate.resolves; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import com.my.televip.obfuscate.struct.ClassInfo; 7 | import com.my.televip.obfuscate.struct.FieldInfo; 8 | import com.my.televip.obfuscate.struct.MethodInfo; 9 | 10 | public class Nekogram { 11 | private static final List classList = new ArrayList<>(); 12 | private static final List fieldList = new ArrayList<>(); 13 | private static final List methodList = new ArrayList<>(); 14 | 15 | static { 16 | classList.add(new ClassInfo("org.telegram.messenger.ApplicationLoader", "org.telegram.messenger.b")); 17 | classList.add(new ClassInfo("org.telegram.messenger.NotificationsController", "org.telegram.messenger.J")); 18 | classList.add(new ClassInfo("org.telegram.messenger.NotificationCenter", "org.telegram.messenger.I")); 19 | classList.add(new ClassInfo("org.telegram.messenger.DownloadController", "org.telegram.messenger.m")); 20 | classList.add(new ClassInfo("org.telegram.messenger.MessagesController", "org.telegram.messenger.G")); 21 | classList.add(new ClassInfo("org.telegram.messenger.MessagesStorage", "org.telegram.messenger.H")); 22 | classList.add(new ClassInfo("org.telegram.messenger.MessageObject", "org.telegram.messenger.E")); 23 | classList.add(new ClassInfo("org.telegram.messenger.UserConfig", "org.telegram.messenger.W")); 24 | classList.add(new ClassInfo("org.telegram.ui.Cells.ChatMessageCell", "X50")); 25 | classList.add(new ClassInfo("org.telegram.ui.ActionBar.Theme", "org.telegram.ui.ActionBar.q")); 26 | classList.add(new ClassInfo("org.telegram.ui.ChatActivity", "org.telegram.ui.p")); 27 | //classList.add(new ClassInfo("org.telegram.ui.DialogsActivity", "org.telegram.ui.G$i")); // LimitReachedReorderFolder 28 | //classList.add(new ClassInfo("org.telegram.ui.FiltersSetupActivity$TouchHelperCallback", "org.telegram.ui.Components.f0$l")); 29 | classList.add(new ClassInfo("org.telegram.messenger.AndroidUtilities", "org.telegram.messenger.a")); 30 | classList.add(new ClassInfo("org.telegram.tgnet.TLRPC$Peer", "BI3")); 31 | classList.add(new ClassInfo("org.telegram.tgnet.TLRPC$Message", "aA3")); 32 | classList.add(new ClassInfo("org.telegram.tgnet.TLRPC$TL_updateDeleteMessages", "Hj4")); 33 | classList.add(new ClassInfo("org.telegram.tgnet.TLRPC$TL_updateDeleteChannelMessages", "Gj4")); 34 | 35 | //fieldList.add(new FieldInfo("MessageObject", "messageOwner", "j")); 36 | fieldList.add(new FieldInfo("UserConfig", "selectedAccount", "b0")); 37 | fieldList.add(new FieldInfo("TLRPC$User", "id", "a")); 38 | fieldList.add(new FieldInfo("TLRPC$Peer", "channel_id", "c")); 39 | fieldList.add(new FieldInfo("TLRPC$Message", "id", "a")); 40 | fieldList.add(new FieldInfo("TLRPC$Message", "flags", "k")); 41 | fieldList.add(new FieldInfo("TLRPC$Message", "peer_id", "d")); 42 | fieldList.add(new FieldInfo("TLRPC$TL_updateDeleteMessages", "messages", "a")); 43 | fieldList.add(new FieldInfo("TLRPC$TL_updateDeleteChannelMessages", "channel_id", "a")); 44 | fieldList.add(new FieldInfo("TLRPC$TL_updateDeleteChannelMessages", "messages", "b")); 45 | fieldList.add(new FieldInfo("Theme", "chat_timePaint", "K2")); 46 | fieldList.add(new FieldInfo("MessagesController", "dialogMessagesByIds", "G")); 47 | fieldList.add(new FieldInfo("MessagesController", "dialogMessage", "D")); 48 | fieldList.add(new FieldInfo("NotificationCenter", "messagesDeleted", "v")); 49 | fieldList.add(new FieldInfo("AndroidUtilities", "typefaceCache", "d")); 50 | 51 | methodList.add(new MethodInfo("NotificationCenter", "postNotificationName", "L")); 52 | methodList.add(new MethodInfo("DownloadController", "canDownloadMedia", "r")); 53 | methodList.add(new MethodInfo("MessagesStorage", "markMessagesAsDeletedInternal", "t8")); 54 | methodList.add(new MethodInfo("MessagesStorage", "updateDialogsWithDeletedMessagesInternal", "Pc")); 55 | methodList.add(new MethodInfo("MessagesStorage", "getDatabase", "a5")); 56 | methodList.add(new MethodInfo("MessageObject", "updateMessageText", "M6")); 57 | methodList.add(new MethodInfo("MessageObject", "canForwardMessage", "K")); 58 | methodList.add(new MethodInfo("MessageObject", "getDialogId", "G0")); 59 | methodList.add(new MethodInfo("MessagesController", "isChatNoForwards", "Ab")); 60 | methodList.add(new MethodInfo("MessagesController", "markDialogMessageAsDeleted", "ol")); 61 | methodList.add(new MethodInfo("MessagesController", "deleteMessages", "W8")); 62 | methodList.add(new MethodInfo("MessagesController", "getSponsoredMessages", "Ta")); 63 | methodList.add(new MethodInfo("ChatMessageCell", "measureTime", "h7")); 64 | methodList.add(new MethodInfo("ChatMessageCell", "setVisibleOnScreen", "h8")); 65 | methodList.add(new MethodInfo("UserConfig", "getInstance", "s")); 66 | //methodList.add(new MethodInfo("UserConfig", "isPremium", "B")); 67 | methodList.add(new MethodInfo("NotificationsController", "removeNotificationsForDialog", "c2")); 68 | methodList.add(new MethodInfo("NotificationsController", "removeDeletedMessagesFromNotifications", "b2")); 69 | methodList.add(new MethodInfo("ChatActivity", "addSponsoredMessages", "gq")); 70 | methodList.add(new MethodInfo("ChatActivity", "hasSelectedNoforwardsMessage", "ot")); 71 | //methodList.add(new MethodInfo("DialogsActivity", "onDefaultTabMoved", "D")); 72 | //methodList.add(new MethodInfo("FiltersSetupActivity$TouchHelperCallback", "resetDefaultPosition", "D")); 73 | methodList.add(new MethodInfo("AndroidUtilities", "getTypeface", "a2")); 74 | methodList.add(new MethodInfo("SQLiteDatabase", "queryFinalized", "h")); 75 | methodList.add(new MethodInfo("SQLiteDatabase", "executeFast", "e")); 76 | methodList.add(new MethodInfo("SQLiteCursor", "next", "j")); 77 | methodList.add(new MethodInfo("SQLiteCursor", "byteBufferValue", "b")); 78 | methodList.add(new MethodInfo("SQLiteCursor", "intValue", "g")); 79 | methodList.add(new MethodInfo("SQLiteCursor", "longValue", "i")); 80 | methodList.add(new MethodInfo("SQLiteCursor", "dispose", "d")); 81 | methodList.add(new MethodInfo("SQLitePreparedStatement", "dispose", "h")); 82 | methodList.add(new MethodInfo("SQLitePreparedStatement", "requery", "l")); 83 | methodList.add(new MethodInfo("SQLitePreparedStatement", "bindByteBuffer", "a")); 84 | methodList.add(new MethodInfo("SQLitePreparedStatement", "bindLong", "d")); 85 | methodList.add(new MethodInfo("SQLitePreparedStatement", "bindInteger", "c")); 86 | methodList.add(new MethodInfo("SQLitePreparedStatement", "step", "m")); 87 | methodList.add(new MethodInfo("LongSparseArray", "get", "h")); 88 | } 89 | 90 | public static class ClassResolver 91 | { 92 | public static String resolve(String name) { 93 | for (ClassInfo info : classList) 94 | if (info.getOriginal().equals(name)) 95 | return info.getResolved(); 96 | 97 | return null; 98 | } 99 | 100 | public static boolean has(String name) 101 | { 102 | boolean has = false; 103 | for (ClassInfo info : classList) { 104 | if (info.getOriginal().equals(name)) { 105 | has = true; 106 | break; 107 | } 108 | } 109 | return has; 110 | } 111 | } 112 | 113 | public static class FieldResolver 114 | { 115 | public static String resolve(String className, String name) { 116 | for (FieldInfo info : fieldList) 117 | if (info.getClassName().equals(className) && info.getOriginal().equals(name)) 118 | return info.getResolved(); 119 | 120 | return null; 121 | } 122 | 123 | public static boolean has(String className, String name) 124 | { 125 | boolean has = false; 126 | for (FieldInfo info : fieldList) { 127 | if (info.getClassName().equals(className) && info.getOriginal().equals(name)) { 128 | has = true; 129 | break; 130 | } 131 | } 132 | return has; 133 | } 134 | } 135 | 136 | public static class MethodResolver 137 | { 138 | public static String resolve(String className, String name) { 139 | for (MethodInfo info : methodList) 140 | if (info.getClassName().equals(className) && info.getOriginal().equals(name)) 141 | return info.getResolved(); 142 | 143 | return null; 144 | } 145 | 146 | public static boolean has(String className, String name) 147 | { 148 | boolean has = false; 149 | for (MethodInfo info : methodList) { 150 | if (info.getClassName().equals(className) && info.getOriginal().equals(name)) { 151 | has = true; 152 | break; 153 | } 154 | } 155 | return has; 156 | } 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/obfuscate/struct/ClassInfo.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.obfuscate.struct; 2 | 3 | public class ClassInfo { 4 | private final String original; 5 | private final String resolved; 6 | 7 | public ClassInfo(String original, String resolved) 8 | { 9 | this.original = original; 10 | this.resolved = resolved; 11 | } 12 | 13 | public String getOriginal() { 14 | return this.original; 15 | } 16 | 17 | public String getResolved() { 18 | return this.resolved; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/obfuscate/struct/FieldInfo.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.obfuscate.struct; 2 | 3 | public class FieldInfo { 4 | private final String className; 5 | private final String original; 6 | private final String resolved; 7 | 8 | public FieldInfo(String className, String original, String resolved) 9 | { 10 | this.className = className; 11 | this.original = original; 12 | this.resolved = resolved; 13 | } 14 | 15 | public String getClassName() { 16 | return this.className; 17 | } 18 | 19 | public String getOriginal() { 20 | return this.original; 21 | } 22 | 23 | public String getResolved() { 24 | return this.resolved; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/obfuscate/struct/MethodInfo.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.obfuscate.struct; 2 | 3 | public class MethodInfo { 4 | private final String className; 5 | private final String original; 6 | private final String resolved; 7 | 8 | public MethodInfo(String className, String original, String resolved) 9 | { 10 | this.className = className; 11 | this.original = original; 12 | this.resolved = resolved; 13 | } 14 | 15 | public String getClassName() { 16 | return this.className; 17 | } 18 | 19 | public String getOriginal() { 20 | return this.original; 21 | } 22 | 23 | public String getResolved() { 24 | return this.resolved; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/structs/DeletedMessageInfo.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.structs; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | import java.util.concurrent.CopyOnWriteArrayList; 6 | import java.util.concurrent.CopyOnWriteArraySet; 7 | 8 | public class DeletedMessageInfo { 9 | public static final long NOT_CHANNEL = 0; 10 | 11 | private final int selectedAccount; 12 | private final long channelID; 13 | private final ArrayList messageIds; 14 | 15 | public DeletedMessageInfo(int selectedAccount, long channelID, ArrayList messageIds) 16 | { 17 | this.selectedAccount = selectedAccount; 18 | this.channelID = channelID; 19 | this.messageIds = messageIds; 20 | } 21 | 22 | public DeletedMessageInfo(int selectedAccount, long channelID, int messageId) 23 | { 24 | this.selectedAccount = selectedAccount; 25 | this.channelID = channelID; 26 | this.messageIds = new ArrayList<>(); 27 | this.messageIds.add(messageId); 28 | } 29 | 30 | public int getSelectedAccount() { 31 | return this.selectedAccount; 32 | } 33 | 34 | public long getChannelID() 35 | { 36 | return this.channelID; 37 | } 38 | 39 | public boolean isNotChannel() 40 | { 41 | return this.channelID == NOT_CHANNEL; 42 | } 43 | 44 | public ArrayList getMessageIds() { 45 | return this.messageIds; 46 | } 47 | 48 | public void insertMessageIds(ArrayList messageIds) { 49 | this.messageIds.addAll(messageIds); 50 | } 51 | 52 | public void insertMessageId(Integer messageId) { 53 | this.messageIds.add(messageId); 54 | } 55 | 56 | public void removeMessageId(Integer messageId) { 57 | this.messageIds.remove(messageId); 58 | } 59 | } -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/utils/ClassUtils.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.utils; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.net.URL; 6 | import java.net.URLClassLoader; 7 | import java.util.ArrayList; 8 | import java.util.Enumeration; 9 | import java.util.List; 10 | import java.util.Set; 11 | import java.util.jar.JarEntry; 12 | import java.util.jar.JarFile; 13 | 14 | import com.my.televip.Utils; 15 | 16 | public class ClassUtils { 17 | public static ClassLoader getClassLoader() { 18 | return Thread.currentThread().getContextClassLoader(); 19 | } 20 | 21 | public static List> getClassesInJar(File file) throws ClassNotFoundException, IOException { 22 | List> classes = new ArrayList<>(); 23 | 24 | URLClassLoader clsloader = new URLClassLoader(new URL[]{ file.toURI().toURL() }, getClassLoader()); 25 | 26 | try (JarFile jarFile = new JarFile(file)) 27 | { 28 | Enumeration entries = jarFile.entries(); 29 | 30 | while (entries.hasMoreElements()) { 31 | JarEntry entry = entries.nextElement(); 32 | 33 | String entName = entry.getName().replace("/", "."); 34 | 35 | if (entName.endsWith(".class")) { 36 | Class cls = clsloader.loadClass(entName.substring(0, entName.length() - 6)); 37 | classes.add(cls); 38 | } 39 | } 40 | 41 | clsloader.close(); 42 | 43 | return classes; 44 | } 45 | } 46 | 47 | private static void addClass(Set> classSet, String packagePath, String packageName) { 48 | File[] files = new File(packagePath).listFiles(file -> (file.isFile() && file.getName().endsWith(".class") || file.isDirectory())); 49 | 50 | assert files != null; 51 | for (File file : files) { 52 | String fileName = file.getName(); 53 | if (file.isFile()) { 54 | String className = fileName.substring(0, fileName.lastIndexOf(".")); 55 | if (!packageName.isEmpty()) 56 | className = packageName + "." + className; 57 | doAddClass(classSet, className); 58 | } else { 59 | String subPackagePath = fileName; 60 | if (!packagePath.isEmpty()) 61 | subPackagePath = packagePath + "/" + subPackagePath; 62 | String subPackageName = fileName; 63 | if (!packageName.isEmpty()) 64 | subPackageName = packageName + "." + subPackageName; 65 | addClass(classSet, subPackagePath, subPackageName); 66 | } 67 | } 68 | } 69 | 70 | public static Class loadClass(String className, boolean isInitialized) { 71 | Class cls; 72 | try { 73 | cls = Class.forName(className, isInitialized, getClassLoader()); 74 | } catch (ClassNotFoundException e) { 75 | Utils.log(e); 76 | throw new RuntimeException(e); 77 | } 78 | return cls; 79 | } 80 | 81 | private static void doAddClass(Set> classSet, String className) { 82 | Class cls = loadClass(className, false); 83 | classSet.add(cls); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/utils/FieldUtils.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.utils; 2 | 3 | import java.lang.reflect.Field; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import de.robv.android.xposed.XposedHelpers; 8 | import com.my.televip.Utils; 9 | 10 | public class FieldUtils { 11 | public static Field getFieldFromMultiName(Class clazz, String fieldName, Object Type) 12 | { 13 | List fields = new ArrayList<>(); 14 | for (Field declaredField : clazz.getDeclaredFields()) 15 | if (declaredField.getName().equals(fieldName)) 16 | { 17 | if (!declaredField.isAccessible()) 18 | declaredField.setAccessible(true); 19 | 20 | fields.add(declaredField); 21 | } 22 | 23 | if (!fields.isEmpty()) { 24 | Field target = null; 25 | for (Field field : fields) { 26 | if (Type instanceof String) { 27 | if (field.getType().getName().equals(Type)) 28 | target = field; 29 | } 30 | else if (field.getType().equals(Type)) 31 | target = field; 32 | } 33 | if (target != null) 34 | return target; 35 | else 36 | Utils.log("Not found " + fieldName + " field in " + clazz.getName() + ", " + Utils.issue); 37 | } 38 | else 39 | Utils.log("Not found " + fieldName + " field in " + clazz.getName() + ", " + Utils.issue); 40 | 41 | return null; 42 | } 43 | 44 | public static int getFieldIntOfClass(Object clazz, String fieldName) { 45 | try 46 | { 47 | return XposedHelpers.getIntField(clazz, fieldName); 48 | /*Field field = clazz.getClass().getDeclaredField(fieldName); 49 | 50 | if (!field.isAccessible()) 51 | field.setAccessible(true); 52 | 53 | return field.getInt(clazz);*/ 54 | } 55 | catch (Exception e) 56 | { 57 | Utils.log(e); 58 | return Integer.MIN_VALUE; 59 | } 60 | } 61 | 62 | public static int getFieldIntOfClass(Object instance, Class clazz, String fieldName) { 63 | try 64 | { 65 | return XposedHelpers.getIntField(instance, fieldName); 66 | /*Field field = clazz.getDeclaredField(fieldName); 67 | 68 | if (!field.isAccessible()) 69 | field.setAccessible(true); 70 | 71 | return field.getInt(instance);*/ 72 | } 73 | catch (Exception e) 74 | { 75 | Utils.log(e); 76 | return Integer.MIN_VALUE; 77 | } 78 | } 79 | 80 | public static long getFieldLongOfClass(Object clazz, String fieldName) { 81 | try 82 | { 83 | return XposedHelpers.getLongField(clazz, fieldName); 84 | /*Field field = clazz.getClass().getDeclaredField(fieldName); 85 | 86 | if (!field.isAccessible()) 87 | field.setAccessible(true); 88 | 89 | return field.getLong(clazz);*/ 90 | } 91 | catch (Exception e) 92 | { 93 | Utils.log(e); 94 | return Long.MIN_VALUE; 95 | } 96 | } 97 | 98 | public static long getFieldLongOfClass(Object instance, Class clazz, String fieldName) { 99 | try 100 | { 101 | return XposedHelpers.getLongField(instance, fieldName); 102 | /*Field field = clazz.getDeclaredField(fieldName); 103 | 104 | if (!field.isAccessible()) 105 | field.setAccessible(true); 106 | 107 | return field.getLong(instance);*/ 108 | } 109 | catch (Exception e) 110 | { 111 | Utils.log(e); 112 | return Long.MIN_VALUE; 113 | } 114 | } 115 | 116 | public static Object getFieldClassOfClass(Object clazz, String fieldName) { 117 | try 118 | { 119 | return XposedHelpers.getObjectField(clazz, fieldName); 120 | /*Field field = clazz.getClass().getDeclaredField(fieldName); 121 | 122 | if (!field.isAccessible()) 123 | field.setAccessible(true); 124 | 125 | return field.get(clazz);*/ 126 | } 127 | catch (Exception e) 128 | { 129 | Utils.log(e); 130 | return null; 131 | } 132 | } 133 | 134 | public static Object getFieldClassOfClass(Object instance, Class clazz, String fieldName) { 135 | try 136 | { 137 | return XposedHelpers.getObjectField(instance, fieldName); 138 | /*Field field = clazz.getDeclaredField(fieldName); 139 | 140 | if (!field.isAccessible()) 141 | field.setAccessible(true); 142 | 143 | return field.get(instance);*/ 144 | } 145 | catch (Exception e) 146 | { 147 | Utils.log(e); 148 | return null; 149 | } 150 | } 151 | 152 | } 153 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/utils/FileUtils.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.utils; 2 | 3 | import java.io.*; 4 | 5 | import com.my.televip.Utils; 6 | 7 | public class FileUtils { 8 | public static String read(File file) 9 | { 10 | try { 11 | FileReader fileReader = new FileReader(file); 12 | BufferedReader bufferedReader = new BufferedReader(fileReader); 13 | StringBuilder stringBuffer = new StringBuilder(); 14 | String line; 15 | while ((line = bufferedReader.readLine()) != null) { 16 | stringBuffer.append(line); 17 | stringBuffer.append("\n"); 18 | } 19 | fileReader.close(); 20 | return stringBuffer.toString(); 21 | } catch (IOException e) { 22 | Utils.log(e); 23 | } 24 | 25 | return ""; 26 | } 27 | 28 | public static boolean save(File file, String content, boolean append) 29 | { 30 | try { 31 | if (!file.exists() && !file.createNewFile()) 32 | { 33 | Utils.log("Cannot create file " + file.getAbsoluteFile()); 34 | return false; 35 | } 36 | 37 | try (FileWriter writer = new FileWriter(file, append)) { 38 | writer.write(content); 39 | } 40 | 41 | return true; 42 | } catch (IOException e) { 43 | Utils.log(e); 44 | } 45 | 46 | return false; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/utils/MethodUtils.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.utils; 2 | 3 | import java.lang.reflect.Method; 4 | import java.util.Objects; 5 | 6 | import de.robv.android.xposed.XposedHelpers; 7 | import com.my.televip.Utils; 8 | 9 | public class MethodUtils { 10 | public static Object[] findParameterTypesFromClass(ClassLoader classLoader, String clazzName, String methodName) { 11 | for (Method method : XposedHelpers.findClassIfExists(clazzName, classLoader).getDeclaredMethods()) 12 | if (method.getName().equals(methodName)) 13 | return method.getParameterTypes(); 14 | return null; 15 | } 16 | 17 | public static Object[] findParameterTypesOrDefault(Class clazz, String methodName, Object... parameter) { 18 | try { 19 | for (Method method : clazz.getDeclaredMethods()) { 20 | if (method.getName().equals(methodName)) { 21 | Class[] parameterTypes = method.getParameterTypes(); 22 | if (parameter.length <= parameterTypes.length) { 23 | boolean isDone = true; 24 | for (int i = 0; i < parameter.length; i++) { 25 | Object obj = parameter[i]; 26 | if (!Objects.equals(obj, obj instanceof String ? parameterTypes[i].getName() : parameterTypes[i])) { 27 | isDone = false; 28 | } 29 | } 30 | if (isDone) 31 | return method.getParameterTypes(); 32 | } 33 | } 34 | } 35 | } catch (Throwable ignored) { 36 | } 37 | return parameter; 38 | } 39 | 40 | public static Object invokeMethodOfClass(Object clazz, String methodName, Object... args) { 41 | try 42 | { 43 | return XposedHelpers.callMethod(clazz, methodName, args); 44 | /*Method method = clazz.getClass().getDeclaredMethod(methodName); 45 | 46 | if (!method.isAccessible()) 47 | method.setAccessible(true); 48 | 49 | return method.invoke(clazz, args);*/ 50 | } 51 | catch (Exception e) 52 | { 53 | Utils.log(e); 54 | return null; 55 | } 56 | } 57 | 58 | /*public static Object invokeMethodOfClass(Object instance, Class clazz, String methodName, Object... args) { 59 | try 60 | { 61 | Method method = clazz.getDeclaredMethod(methodName); 62 | 63 | if (!method.isAccessible()) 64 | method.setAccessible(true); 65 | 66 | return method.invoke(instance, args); 67 | } 68 | catch (Exception e) 69 | { 70 | Utils.log(e); 71 | return null; 72 | } 73 | } 74 | 75 | public static Object invokeMethodOfClass(Object clazz, Method method, Object... args) { 76 | try 77 | { 78 | if (!method.isAccessible()) 79 | method.setAccessible(true); 80 | 81 | return method.invoke(clazz, args); 82 | } 83 | catch (Exception e) 84 | { 85 | Utils.log(e); 86 | return null; 87 | } 88 | }*/ 89 | } 90 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/AccountInstance.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals; 2 | 3 | import de.robv.android.xposed.XposedHelpers; 4 | import com.my.televip.obfuscate.AutomationResolver; 5 | import com.my.televip.utils.MethodUtils; 6 | 7 | public class AccountInstance { 8 | private final Object instance; 9 | 10 | public AccountInstance(Object instance) 11 | { 12 | this.instance = instance; 13 | } 14 | 15 | public static AccountInstance getInstance(ClassLoader classLoader) { 16 | Class accountInstance = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.AccountInstance"), classLoader); 17 | String getInstanceMethod = AutomationResolver.resolve("AccountInstance", "getInstance", AutomationResolver.ResolverType.Method); 18 | return new AccountInstance(MethodUtils.invokeMethodOfClass(accountInstance, getInstanceMethod, UserConfig.getSelectedAccount())); 19 | } 20 | 21 | public MessagesController getMessagesController() { 22 | String method = AutomationResolver.resolve("AccountInstance", "getMessagesController", AutomationResolver.ResolverType.Method); 23 | return new MessagesController(MethodUtils.invokeMethodOfClass(this.instance, method)); 24 | } 25 | 26 | public MessagesStorage getMessagesStorage() { 27 | String method = AutomationResolver.resolve("AccountInstance", "getMessagesStorage", AutomationResolver.ResolverType.Method); 28 | return new MessagesStorage(MethodUtils.invokeMethodOfClass(this.instance, method)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/ActiveTheme.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals; 2 | 3 | import com.my.televip.MainHook; 4 | import com.my.televip.obfuscate.AutomationResolver; 5 | 6 | import de.robv.android.xposed.XposedBridge; 7 | import de.robv.android.xposed.XposedHelpers; 8 | 9 | public class ActiveTheme { 10 | 11 | public static boolean isCurrentThemeDay=false; 12 | public static void setActiveTheme() { 13 | try { 14 | 15 | // الحصول على الكائن الحالي من ThemeInfo 16 | Object currentThemeInfo = XposedHelpers.callStaticMethod( 17 | XposedHelpers.findClass(AutomationResolver.resolve("org.telegram.ui.ActionBar.Theme"), MainHook.lpparam.classLoader), 18 | AutomationResolver.resolve("Theme","getActiveTheme", AutomationResolver.ResolverType.Method)); 19 | 20 | if (currentThemeInfo != null) { 21 | // التحقق من قيمة isCurrentThemeDay 22 | isCurrentThemeDay = (boolean) XposedHelpers.callMethod(currentThemeInfo, "isDark"); 23 | } else { 24 | XposedBridge.log("getActiveTheme returned null."); 25 | } 26 | } catch (Exception e) { 27 | XposedBridge.log("getActiveTheme: Error while checking isDark - " + e.getMessage()); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/ChatMessageCellDefault.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals; 2 | 3 | import de.robv.android.xposed.XposedHelpers; 4 | import com.my.televip.Utils; 5 | import com.my.televip.utils.FieldUtils; 6 | 7 | public class ChatMessageCellDefault { 8 | protected final Object instance; 9 | 10 | protected ChatMessageCellDefault(Object instance) 11 | { 12 | this.instance = instance; 13 | } 14 | 15 | public int getTimeTextWidth() 16 | { 17 | return FieldUtils.getFieldIntOfClass(this.instance, "timeTextWidth"); 18 | } 19 | 20 | public int getTimeWidth() 21 | { 22 | return FieldUtils.getFieldIntOfClass(this.instance, "timeWidth"); 23 | } 24 | 25 | public void setTimeTextWidth(int width) 26 | { 27 | try 28 | { 29 | XposedHelpers.setIntField(this.instance, "timeTextWidth", width); 30 | //Field timeTextWidthField = FieldUtils.getFieldOfClass(this.instance, "timeTextWidth"); 31 | //if (timeTextWidthField != null) 32 | // timeTextWidthField.setInt(this.instance, width); 33 | //else 34 | // throw new NullPointerException("Not found timeTextWidth in " + this.instance.getClass().getName()); 35 | } 36 | catch (Throwable e) 37 | { 38 | Utils.log(e); 39 | } 40 | } 41 | 42 | public void setTimeWidth(int width) 43 | { 44 | try 45 | { 46 | XposedHelpers.setIntField(this.instance, "timeWidth", width); 47 | /*Field timeWidthField = FieldUtils.getFieldOfClass(this.instance, "timeWidth"); 48 | if (timeWidthField != null) 49 | timeWidthField.setInt(this.instance, width); 50 | else 51 | throw new NullPointerException("Not found timeWidth in " + this.instance.getClass().getName());*/ 52 | } 53 | catch (Throwable e) 54 | { 55 | Utils.log(e); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/EventType.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals; 2 | 3 | import com.my.televip.ClientChecker; 4 | import com.my.televip.MainHook; 5 | import com.my.televip.Utils; 6 | import com.my.televip.loadClass; 7 | import com.my.televip.obfuscate.AutomationResolver; 8 | 9 | import de.robv.android.xposed.XposedHelpers; 10 | 11 | public class EventType { 12 | 13 | public static int eventType; 14 | 15 | public static int IconSettings() { 16 | eventType = (int) XposedHelpers.callStaticMethod(XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.ui.ActionBar.Theme"), MainHook.lpparam.classLoader), AutomationResolver.resolve("Theme", "getEventType", AutomationResolver.ResolverType.Method)); 17 | int drawableResource = 0; 18 | if (!ClientChecker.check(ClientChecker.ClientType.Nagram)) { 19 | if (loadClass.drawableClass == null) { 20 | loadClass.drawableClass = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.R$drawable"), MainHook.lpparam.classLoader); 21 | } 22 | if (loadClass.drawableClass != null) { 23 | if (eventType == 0) { 24 | drawableResource = XposedHelpers.getStaticIntField(loadClass.drawableClass, "msg_settings_ny"); 25 | } else if (eventType == 1) { 26 | drawableResource = XposedHelpers.getStaticIntField(loadClass.drawableClass, "msg_settings_14"); 27 | } else if (eventType == 2) { 28 | drawableResource = XposedHelpers.getStaticIntField(loadClass.drawableClass, "msg_settings_hw"); 29 | } else { 30 | drawableResource = XposedHelpers.getStaticIntField(loadClass.drawableClass, "msg_settings_old"); 31 | } 32 | } else { 33 | Utils.log("Not found rg.telegram.messenger.R$drawable, " + Utils.issue); 34 | } 35 | }else { 36 | if (eventType == 0) { 37 | drawableResource = 0x7f0807ae; 38 | } else if (eventType == 1) { 39 | drawableResource = 0x7f0807ac; 40 | } else if (eventType == 2) { 41 | drawableResource = 0x7f0807ad; 42 | } else { 43 | drawableResource = 0x7f0807af; 44 | } 45 | } 46 | return drawableResource; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/MessageObject.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals; 2 | 3 | import de.robv.android.xposed.XposedHelpers; 4 | import com.my.televip.obfuscate.AutomationResolver; 5 | 6 | public class MessageObject { 7 | private final Object instance; 8 | 9 | public MessageObject(Object instance) 10 | { 11 | this.instance = instance; 12 | } 13 | 14 | public TLRPC.Message getMessageOwner() 15 | { 16 | return new TLRPC.Message(XposedHelpers.getObjectField(this.instance, AutomationResolver.resolve("MessageObject", "messageOwner", AutomationResolver.ResolverType.Field))); 17 | /*List fields = new ArrayList<>(); 18 | for (Field declaredField : this.instance.getClass().getDeclaredFields()) 19 | if (declaredField.getName().equals(AutomationResolver.resolve("MessageObject", "messageOwner", AutomationResolver.ResolverType.Field))) 20 | fields.add(declaredField); 21 | 22 | if (!fields.isEmpty()) { 23 | try 24 | { 25 | Field messageOwnerField = null; 26 | for (Field field : fields) { 27 | if (field.getType().getName().equals(AutomationResolver.resolve("org.telegram.tgnet.TLRPC$Message"))) 28 | { 29 | messageOwnerField = field; 30 | } 31 | } 32 | if (messageOwnerField != null) { 33 | Object messageOwner = messageOwnerField.get(this.instance); 34 | if (messageOwner == null) 35 | return null; 36 | return new TLRPC.Message(messageOwner); 37 | } 38 | else 39 | Utils.log("Not found messageOwner field in MessageObject's fields, " + Utils.issue); 40 | } 41 | catch (IllegalAccessException e) 42 | { 43 | Utils.log(e); 44 | } 45 | } 46 | else 47 | Utils.log("Not found messageOwner field in MessageObject, " + Utils.issue); 48 | 49 | return null;*/ 50 | } 51 | 52 | public long getDialogId() { 53 | return (long) XposedHelpers.callMethod(instance, AutomationResolver.resolve("MessageObject", "getDialogId", AutomationResolver.ResolverType.Method)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/MessagesController.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals; 2 | 3 | public class MessagesController { 4 | private final Object instance; 5 | 6 | public MessagesController(Object instance) 7 | { 8 | this.instance = instance; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/MessagesStorage.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals; 2 | 3 | public class MessagesStorage { 4 | private final Object instance; 5 | 6 | public MessagesStorage(Object instance) 7 | { 8 | this.instance = instance; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/OfficialChatMessageCell.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals; 2 | 3 | import de.robv.android.xposed.XposedHelpers; 4 | import com.my.televip.Utils; 5 | import com.my.televip.utils.FieldUtils; 6 | 7 | public class OfficialChatMessageCell extends ChatMessageCellDefault { 8 | public OfficialChatMessageCell(Object instance) { 9 | super(instance); 10 | } 11 | 12 | public CharSequence getCurrentTimeString() 13 | { 14 | return (CharSequence) FieldUtils.getFieldClassOfClass(this.instance, "currentTimeString"); 15 | } 16 | 17 | public void setCurrentTimeString(CharSequence currentTimeString) 18 | { 19 | try 20 | { 21 | XposedHelpers.setObjectField(this.instance, "currentTimeString", currentTimeString); 22 | /*Field currentTimeStringField = FieldUtils.getFieldOfClass(this.instance, "currentTimeString"); 23 | if (currentTimeStringField != null) 24 | currentTimeStringField.set(this.instance, currentTimeString); 25 | else 26 | throw new NullPointerException("Not found currentTimeString in " + this.instance.getClass().getName());*/ 27 | } 28 | catch (Throwable e) 29 | { 30 | Utils.log(e); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/TLRPC.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals; 2 | 3 | import java.lang.reflect.Field; 4 | import java.util.ArrayList; 5 | 6 | import de.robv.android.xposed.XposedHelpers; 7 | import com.my.televip.ClientChecker; 8 | import com.my.televip.Utils; 9 | import com.my.televip.obfuscate.AutomationResolver; 10 | import com.my.televip.utils.FieldUtils; 11 | 12 | public class TLRPC { 13 | public static class Peer { 14 | private final Object instance; 15 | private final Class clazz; 16 | 17 | public Peer(Object instance) 18 | { 19 | this.instance = instance; 20 | if (!instance.getClass().getName().equals(AutomationResolver.resolve("org.telegram.tgnet.TLRPC$Peer"))) 21 | { 22 | Class clazz = instance.getClass().getSuperclass(); 23 | if (clazz != null && !clazz.getName().equals(AutomationResolver.resolve("org.telegram.tgnet.TLRPC$Peer"))) 24 | this.clazz = clazz.getSuperclass(); 25 | else 26 | this.clazz = clazz; 27 | } 28 | else 29 | { 30 | this.clazz = instance.getClass(); 31 | } 32 | } 33 | 34 | public long getChannelID() 35 | { 36 | try 37 | { 38 | if (ClientChecker.check(ClientChecker.ClientType.Nekogram)) { 39 | Field field = FieldUtils.getFieldFromMultiName(this.clazz, AutomationResolver.resolve("TLRPC$Peer", "channel_id", AutomationResolver.ResolverType.Field), long.class); 40 | if (field != null) 41 | return field.getLong(this.instance); 42 | } 43 | else 44 | return FieldUtils.getFieldLongOfClass(this.instance, this.clazz, AutomationResolver.resolve("TLRPC$Peer", "channel_id", AutomationResolver.ResolverType.Field)); 45 | } 46 | catch (IllegalAccessException e) 47 | { 48 | Utils.log(e); 49 | } 50 | return Long.MIN_VALUE; 51 | } 52 | } 53 | 54 | public static class Message { 55 | private final Object instance; 56 | private final Class clazz; 57 | 58 | public Message(Object instance) 59 | { 60 | this.instance = instance; 61 | if (!instance.getClass().getName().equals(AutomationResolver.resolve("org.telegram.tgnet.TLRPC$Message"))) 62 | { 63 | Class clazz = instance.getClass().getSuperclass(); 64 | if (clazz != null && !clazz.getName().equals(AutomationResolver.resolve("org.telegram.tgnet.TLRPC$Message"))) 65 | this.clazz = clazz.getSuperclass(); 66 | else 67 | this.clazz = clazz; 68 | } 69 | else 70 | { 71 | this.clazz = instance.getClass(); 72 | } 73 | } 74 | 75 | public int getID() 76 | { 77 | try 78 | { 79 | if (ClientChecker.check(ClientChecker.ClientType.Nekogram)) { 80 | Field field = FieldUtils.getFieldFromMultiName(this.clazz, AutomationResolver.resolve("TLRPC$Message", "id", AutomationResolver.ResolverType.Field), int.class); 81 | if (field != null) 82 | return field.getInt(this.instance); 83 | } 84 | else 85 | return FieldUtils.getFieldIntOfClass(this.instance, this.clazz, "id"); 86 | } 87 | catch (IllegalAccessException e) 88 | { 89 | Utils.log(e); 90 | } 91 | return Integer.MIN_VALUE; 92 | } 93 | 94 | public Peer getPeerID() 95 | { 96 | try 97 | { 98 | if (ClientChecker.check(ClientChecker.ClientType.Nekogram)) { 99 | Field field = FieldUtils.getFieldFromMultiName(this.clazz, AutomationResolver.resolve("TLRPC$Message", "peer_id", AutomationResolver.ResolverType.Field), AutomationResolver.resolve("org.telegram.tgnet.TLRPC$Peer")); 100 | if (field != null) { 101 | Object peer = field.get(this.instance); 102 | if (peer != null) 103 | return new Peer(peer); 104 | } 105 | } 106 | else { 107 | Object peer = FieldUtils.getFieldClassOfClass(this.instance, this.clazz, "peer_id"); 108 | if (peer != null) 109 | return new Peer(peer); 110 | } 111 | } 112 | catch (IllegalAccessException e) 113 | { 114 | Utils.log(e); 115 | } 116 | return null; 117 | } 118 | 119 | public int getFlags() 120 | { 121 | try 122 | { 123 | if (ClientChecker.check(ClientChecker.ClientType.Nekogram)) { 124 | Field field = FieldUtils.getFieldFromMultiName(this.clazz, AutomationResolver.resolve("TLRPC$Message", "flags", AutomationResolver.ResolverType.Field), int.class); 125 | if (field != null) 126 | return field.getInt(this.instance); 127 | } 128 | else 129 | return XposedHelpers.getIntField(this.instance, "flags"); 130 | } 131 | catch (IllegalAccessException e) 132 | { 133 | Utils.log(e); 134 | } 135 | return Integer.MIN_VALUE; 136 | } 137 | 138 | public void setFlags(int flags) { 139 | try { 140 | if (ClientChecker.check(ClientChecker.ClientType.Nekogram)) { 141 | Field field = FieldUtils.getFieldFromMultiName(this.clazz, AutomationResolver.resolve("TLRPC$Message", "flags", AutomationResolver.ResolverType.Field), int.class); 142 | if (field != null) 143 | field.setInt(this.instance, flags); 144 | } else XposedHelpers.setIntField(this.instance, "flags", flags); 145 | } catch (IllegalAccessException e) 146 | { 147 | Utils.log(e); 148 | } 149 | } 150 | } 151 | 152 | /* 153 | public static class TL_updateDeleteScheduledMessages { 154 | private final Object instance; 155 | 156 | public TL_updateDeleteScheduledMessages(Object instance) 157 | { 158 | this.instance = instance; 159 | } 160 | 161 | public ArrayList getMessages() 162 | { 163 | return Utils.castList(FieldUtils.getFieldClassOfClass(this.instance, "messages"), Integer.class); 164 | } 165 | } 166 | */ 167 | public static class TL_updateDeleteChannelMessages { 168 | private final Object instance; 169 | 170 | public TL_updateDeleteChannelMessages(Object instance) 171 | { 172 | this.instance = instance; 173 | } 174 | 175 | public long getChannelID() 176 | { 177 | try 178 | { 179 | if (ClientChecker.check(ClientChecker.ClientType.Nekogram)) { 180 | Field field = FieldUtils.getFieldFromMultiName(this.instance.getClass(), AutomationResolver.resolve("TLRPC$TL_updateDeleteChannelMessages", "channel_id", AutomationResolver.ResolverType.Field), long.class); 181 | if (field != null) 182 | return field.getLong(this.instance); 183 | } 184 | else 185 | return FieldUtils.getFieldLongOfClass(this.instance, "channel_id"); 186 | } 187 | catch (IllegalAccessException e) 188 | { 189 | Utils.log(e); 190 | } 191 | return Long.MIN_VALUE; 192 | } 193 | 194 | public ArrayList getMessages() 195 | { 196 | try 197 | { 198 | if (ClientChecker.check(ClientChecker.ClientType.Nekogram)) { 199 | Field field = FieldUtils.getFieldFromMultiName(this.instance.getClass(), AutomationResolver.resolve("TLRPC$TL_updateDeleteChannelMessages", "messages", AutomationResolver.ResolverType.Field), ArrayList.class); 200 | if (field != null) { 201 | Object messages = field.get(this.instance); 202 | if (messages != null) 203 | return Utils.castList(messages, Integer.class); 204 | } 205 | } 206 | else 207 | return Utils.castList(FieldUtils.getFieldClassOfClass(this.instance, "messages"), Integer.class); 208 | } 209 | catch (IllegalAccessException e) 210 | { 211 | Utils.log(e); 212 | } 213 | return null; 214 | } 215 | } 216 | 217 | public static class TL_updateDeleteMessages { 218 | private final Object instance; 219 | 220 | public TL_updateDeleteMessages(Object instance) 221 | { 222 | this.instance = instance; 223 | } 224 | 225 | public ArrayList getMessages() 226 | { 227 | try 228 | { 229 | if (ClientChecker.check(ClientChecker.ClientType.Nekogram)) { 230 | Field field = FieldUtils.getFieldFromMultiName(this.instance.getClass(), AutomationResolver.resolve("TLRPC$TL_updateDeleteMessages", "messages", AutomationResolver.ResolverType.Field), ArrayList.class); 231 | if (field != null) { 232 | Object messages = field.get(this.instance); 233 | if (messages != null) 234 | return Utils.castList(messages, Integer.class); 235 | } 236 | } 237 | else 238 | return Utils.castList(FieldUtils.getFieldClassOfClass(this.instance, "messages"), Integer.class); 239 | } 240 | catch (IllegalAccessException e) 241 | { 242 | Utils.log(e); 243 | } 244 | return null; 245 | } 246 | } 247 | } 248 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/Theme.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals; 2 | 3 | import android.text.TextPaint; 4 | 5 | import java.lang.reflect.Field; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | import de.robv.android.xposed.XposedHelpers; 10 | import com.my.televip.ClientChecker; 11 | import com.my.televip.Utils; 12 | import com.my.televip.obfuscate.AutomationResolver; 13 | 14 | public class Theme { 15 | public static TextPaint getTextPaint(ClassLoader classLoader) 16 | { 17 | Class theme = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.ui.ActionBar.Theme"), classLoader); 18 | if (!ClientChecker.check(ClientChecker.ClientType.Nekogram)) 19 | return (TextPaint) XposedHelpers.getStaticObjectField(theme, AutomationResolver.resolve("Theme", "chat_timePaint", AutomationResolver.ResolverType.Field)); 20 | List fields = new ArrayList<>(); 21 | for (Field declaredField : theme.getDeclaredFields()) 22 | if (declaredField.getName().equals(AutomationResolver.resolve("Theme", "chat_timePaint", AutomationResolver.ResolverType.Field))) 23 | fields.add(declaredField); 24 | 25 | if (!fields.isEmpty()) { 26 | try 27 | { 28 | Field textPaintField = null; 29 | for (Field field : fields) { 30 | if (field.getType().equals(TextPaint.class)) 31 | { 32 | textPaintField = field; 33 | } 34 | } 35 | if (textPaintField != null) 36 | return (TextPaint) textPaintField.get(null); 37 | else { 38 | for (Field field : fields) { 39 | if (field.getType().getName().contains("TextPaint")) 40 | { 41 | textPaintField = field; 42 | } 43 | } 44 | if (textPaintField != null) 45 | return (TextPaint) textPaintField.get(null); 46 | else 47 | Utils.log("Not found chat_timePaint field in Theme, " + Utils.issue); 48 | } 49 | } 50 | catch (IllegalAccessException e) 51 | { 52 | Utils.log(e); 53 | } 54 | } 55 | else 56 | Utils.log("Not found chat_timePaint field in Theme, " + Utils.issue); 57 | 58 | return null; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/UserConfig.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals; 2 | 3 | import de.robv.android.xposed.XposedHelpers; 4 | import com.my.televip.obfuscate.AutomationResolver; 5 | 6 | public class UserConfig { 7 | public static int getSelectedAccount() { 8 | return 0; 9 | //Class userConfig = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.UserConfig"), Utils.globalLoadPackageParam.classLoader); 10 | //String selectedAccountField = AutomationResolver.resolve("UserConfig", "selectedAccount", AutomationResolver.ResolverType.Field); 11 | //return FieldUtils.getFieldIntOfClass(null, userConfig, selectedAccountField); 12 | } 13 | 14 | public static int getSelectedAccount(ClassLoader classLoader) { 15 | Class userConfig = XposedHelpers.findClassIfExists(AutomationResolver.resolve("org.telegram.messenger.UserConfig"), classLoader); 16 | String selectedAccountField = AutomationResolver.resolve("UserConfig", "selectedAccount", AutomationResolver.ResolverType.Field); 17 | return XposedHelpers.getStaticIntField(userConfig, selectedAccountField); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/virtuals/nekogram/NekoChatMessageCell.java: -------------------------------------------------------------------------------- 1 | package com.my.televip.virtuals.nekogram; 2 | 3 | import android.text.SpannableStringBuilder; 4 | 5 | import de.robv.android.xposed.XposedHelpers; 6 | import com.my.televip.Utils; 7 | import com.my.televip.utils.FieldUtils; 8 | import com.my.televip.virtuals.ChatMessageCellDefault; 9 | 10 | public class NekoChatMessageCell extends ChatMessageCellDefault { 11 | public NekoChatMessageCell(Object instance) { 12 | super(instance); 13 | } 14 | 15 | public SpannableStringBuilder getCurrentTimeString() 16 | { 17 | return (SpannableStringBuilder) FieldUtils.getFieldClassOfClass(this.instance, "currentTimeString"); 18 | } 19 | 20 | public void setCurrentTimeString(SpannableStringBuilder currentTimeString) 21 | { 22 | try 23 | { 24 | XposedHelpers.setObjectField(this.instance, "currentTimeString", currentTimeString); 25 | /*Field currentTimeStringField = FieldUtils.getFieldOfClass(this.instance, "currentTimeString"); 26 | if (currentTimeStringField != null) 27 | currentTimeStringField.set(this.instance, currentTimeString); 28 | else 29 | throw new NullPointerException("Not found currentTimeString in " + this.instance.getClass().getName());*/ 30 | } 31 | catch (Throwable e) 32 | { 33 | Utils.log(e); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/my/televip/xSharedPreferences.java: -------------------------------------------------------------------------------- 1 | package com.my.televip; 2 | 3 | import android.content.SharedPreferences; 4 | 5 | import de.robv.android.xposed.XSharedPreferences; 6 | 7 | public class xSharedPreferences { 8 | public static XSharedPreferences xSharedPre; 9 | public static SharedPreferences SharedPre; 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.telegram.messenger 4 | org.telegram.plus 5 | com.tgconnect.android 6 | com.iMe.android 7 | com.xplus.messenger 8 | xyz.nextalone.nagram 9 | uz.unnarsx.cherrygram 10 | app.nicegram 11 | org.telegram.messenger.web 12 | org.telegram.messenger.beta 13 | com.exteragram.messenger 14 | tw.nekomimi.nekogram 15 | org.forkclient.messenger.beta 16 | org.forkgram.messenger 17 | nu.gpu.nagram 18 | com.iMe.android.web 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | TeleVip 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /app/src/test/java/com/my/televip/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.my.televip; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | plugins { 3 | alias(libs.plugins.android.application) apply false 4 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. For more details, visit 12 | # https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Enables namespacing of each library's R class so that its R class includes only the 19 | # resources declared in the library itself and none from the library's dependencies, 20 | # thereby reducing the size of the R class for that library 21 | android.nonTransitiveRClass=true -------------------------------------------------------------------------------- /gradle/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [versions] 2 | agp = "8.5.0" 3 | gson = "2.13.1" 4 | junit = "4.13.2" 5 | junitVersion = "1.2.1" 6 | espressoCore = "3.6.1" 7 | appcompat = "1.7.0" 8 | material = "1.10.0" 9 | 10 | [libraries] 11 | gson = { module = "com.google.code.gson:gson", version.ref = "gson" } 12 | junit = { group = "junit", name = "junit", version.ref = "junit" } 13 | ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } 14 | espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } 15 | appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } 16 | material = { group = "com.google.android.material", name = "material", version.ref = "material" } 17 | 18 | [plugins] 19 | android-application = { id = "com.android.application", version.ref = "agp" } 20 | 21 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustafa1dev/TeleVip-Lsposed/792d4896f0462b78d341fc3ff6aa1986290f718d/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed May 14 16:38:25 AST 2025 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | 86 | # Determine the Java command to use to start the JVM. 87 | if [ -n "$JAVA_HOME" ] ; then 88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 89 | # IBM's JDK on AIX uses strange locations for the executables 90 | JAVACMD="$JAVA_HOME/jre/sh/java" 91 | else 92 | JAVACMD="$JAVA_HOME/bin/java" 93 | fi 94 | if [ ! -x "$JAVACMD" ] ; then 95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 96 | 97 | Please set the JAVA_HOME variable in your environment to match the 98 | location of your Java installation." 99 | fi 100 | else 101 | JAVACMD="java" 102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 103 | 104 | Please set the JAVA_HOME variable in your environment to match the 105 | location of your Java installation." 106 | fi 107 | 108 | # Increase the maximum file descriptors if we can. 109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 110 | MAX_FD_LIMIT=`ulimit -H -n` 111 | if [ $? -eq 0 ] ; then 112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 113 | MAX_FD="$MAX_FD_LIMIT" 114 | fi 115 | ulimit -n $MAX_FD 116 | if [ $? -ne 0 ] ; then 117 | warn "Could not set maximum file descriptor limit: $MAX_FD" 118 | fi 119 | else 120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 121 | fi 122 | fi 123 | 124 | # For Darwin, add options to specify how the application appears in the dock 125 | if $darwin; then 126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 127 | fi 128 | 129 | # For Cygwin or MSYS, switch paths to Windows format before running java 130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 | 134 | JAVACMD=`cygpath --unix "$JAVACMD"` 135 | 136 | # We build the pattern for arguments to be converted via cygpath 137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 138 | SEP="" 139 | for dir in $ROOTDIRSRAW ; do 140 | ROOTDIRS="$ROOTDIRS$SEP$dir" 141 | SEP="|" 142 | done 143 | OURCYGPATTERN="(^($ROOTDIRS))" 144 | # Add a user-defined pattern to the cygpath arguments 145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 147 | fi 148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 149 | i=0 150 | for arg in "$@" ; do 151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 153 | 154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 156 | else 157 | eval `echo args$i`="\"$arg\"" 158 | fi 159 | i=`expr $i + 1` 160 | done 161 | case $i in 162 | 0) set -- ;; 163 | 1) set -- "$args0" ;; 164 | 2) set -- "$args0" "$args1" ;; 165 | 3) set -- "$args0" "$args1" "$args2" ;; 166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 172 | esac 173 | fi 174 | 175 | # Escape application args 176 | save () { 177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 178 | echo " " 179 | } 180 | APP_ARGS=`save "$@"` 181 | 182 | # Collect all arguments for the java command, following the shell quoting and substitution rules 183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 184 | 185 | exec "$JAVACMD" "$@" 186 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google { 4 | content { 5 | includeGroupByRegex("com\\.android.*") 6 | includeGroupByRegex("com\\.google.*") 7 | includeGroupByRegex("androidx.*") 8 | } 9 | } 10 | mavenCentral() 11 | gradlePluginPortal() 12 | } 13 | } 14 | dependencyResolutionManagement { 15 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | rootProject.name = "TeleVip" 23 | include ':app' 24 | --------------------------------------------------------------------------------