forked from feraholy/Android-Mod-Menu
-
Notifications
You must be signed in to change notification settings - Fork 5
/
0001-AndroidMixMod.patch
126 lines (113 loc) · 4.99 KB
/
0001-AndroidMixMod.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
From 6009869b1ed87bb0b0bf7b2ba9b1947b3069fe92 Mon Sep 17 00:00:00 2001
Date: Wed, 10 May 2023 17:03:28 +0300
Subject: [PATCH] AndroidMixMod
---
AndroidManifest.xml | 2 ++
apktool.yml | 2 +-
.../BasePackageValidator.smali | 2 +-
.../blizzard/wtcg/hearthstone/FileUtils.smali | 19 ++++++++++++++++++-
.../hearthstone/HearthstoneActivity.smali | 4 ++++
.../hearthstone/LoadingScreen.smali | 22 ++++++++++++++++++++
6 files changed, 50 insertions(+), 3 deletions(-)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 6927ef3..0aa1c50 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -52,2 +52,4 @@
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application android:allowBackup="true" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:extractNativeLibs="true" android:fullBackupContent="@xml/appsflyer_backup_rules" android:icon="@mipmap/app_icon" android:label="@string/app_name" android:largeHeap="true" android:name="com.blizzard.wtcg.hearthstone.HearthstoneApplication" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/app_icon_round" android:supportsRtl="true" android:usesCleartextTraffic="true">
+ <service android:name="com.android.support.Launcher" android:enabled="true" android:exported="false" android:stopWithTask="true" />
<meta-data android:name="com.blizzard.wtcg.hearthstone.Store" android:value="Google"/>
diff --git a/apktool.yml b/apktool.yml
index 5febeb8..efd4294 100644
--- a/apktool.yml
+++ b/apktool.yml
@@ -60,2 +60,2 @@
- minSdkVersion: '28'
+ minSdkVersion: '21'
targetSdkVersion: '33'
diff --git a/smali/com/blizzard/mobile/auth/internal/packagevalidator/BasePackageValidator.smali b/smali/com/blizzard/mobile/auth/internal/packagevalidator/BasePackageValidator.smali
index 396896b..fe54774 100644
--- a/smali/com/blizzard/mobile/auth/internal/packagevalidator/BasePackageValidator.smali
+++ b/smali/com/blizzard/mobile/auth/internal/packagevalidator/BasePackageValidator.smali
@@ -296,9 +296,9 @@
const-string v4, "F7:83:85:9E:ED:6E:4A:40:A4:EB:D0:20:57:8D:36:E0:0A:62:CF:9C:F2:7D:A3:95:F7:7D:1D:73:A6:A9:A4:1F"
.line 6
invoke-virtual {v4, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v3
+ const/4 v3, 0x1
if-eqz v3, :cond_0
diff --git a/smali/com/blizzard/wtcg/hearthstone/FileUtils.smali b/smali/com/blizzard/wtcg/hearthstone/FileUtils.smali
index 5c3af19..87177a2 100644
--- a/smali/com/blizzard/wtcg/hearthstone/FileUtils.smali
+++ b/smali/com/blizzard/wtcg/hearthstone/FileUtils.smali
@@ -1753,3 +1753,19 @@
.method public static GetInternalFilesDir()Ljava/io/File;
- .locals 1
+ .locals 2
+
+ invoke-static {}, Lcom/blizzard/wtcg/hearthstone/HearthstoneApplication;->getInstance()Lcom/blizzard/wtcg/hearthstone/HearthstoneApplication;
+
+ move-result-object v0
+
+ invoke-virtual {v0}, Lcom/blizzard/wtcg/hearthstone/HearthstoneApplication;->getApplicationContext()Landroid/content/Context;
+
+ move-result-object v0
+
+ const/4 v1, 0x0
+
+ invoke-virtual {v0, v1}, Landroid/content/Context;->getExternalFilesDir(Ljava/lang/String;)Ljava/io/File;
+
+ move-result-object v0
+
+ if-nez v0, :cond_0
@@ -1782,6 +1782,7 @@
move-result-object v0
+ :cond_0
return-object v0
.end method
diff --git a/smali/com/blizzard/wtcg/hearthstone/HearthstoneActivity.smali b/smali/com/blizzard/wtcg/hearthstone/HearthstoneActivity.smali
index 466baac..156d51a 100644
--- a/smali/com/blizzard/wtcg/hearthstone/HearthstoneActivity.smali
+++ b/smali/com/blizzard/wtcg/hearthstone/HearthstoneActivity.smali
@@ -610,3 +610,7 @@
.method public onCreate(Landroid/os/Bundle;)V
.locals 2
+ #### MixMod Start ####
+ invoke-static {p0}, Lcom/android/support/Main;->Start(Landroid/content/Context;)V
+ #### MixMod End ####
+
diff --git a/smali/com/blizzard/wtcg/hearthstone/LoadingScreen.smali b/smali/com/blizzard/wtcg/hearthstone/LoadingScreen.smali
index 949fbd8..1f639b3 100644
--- a/smali/com/blizzard/wtcg/hearthstone/LoadingScreen.smali
+++ b/smali/com/blizzard/wtcg/hearthstone/LoadingScreen.smali
@@ -834,4 +834,28 @@
.end method
.method public OpenAppStore()Z
+ .locals 3
+
+ new-instance v0, Landroid/content/Intent;
+
+ const-string v1, "https://github.com/DeNcHiK3713/AndroidMixMod/releases/latest"
+
+ invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
+
+ move-result-object v1
+
+ const-string v2, "android.intent.action.VIEW"
+
+ invoke-direct {v0, v2, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
+
+ iget-object v1, p0, Lcom/blizzard/wtcg/hearthstone/LoadingScreen;->_this:Landroid/app/Activity;
+
+ invoke-virtual {v1, v0}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V
+
+ const/4 v1, 0x1
+
+ return v1
+.end method
+
+.method public Orig_OpenAppStore()Z
.locals 14
--
2.40.1.windows.1