Skip to content

Commit 6a5eed3

Browse files
committed
Mtk-easy-su v2.0.4
- fix crash at first startup ;?/ - greater stability
1 parent a1c2b0f commit 6a5eed3

File tree

8 files changed

+17
-18
lines changed

8 files changed

+17
-18
lines changed

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ android {
2424
applicationId 'juniojsv.mtk.easy.su'
2525
minSdkVersion 21
2626
targetSdkVersion 30
27-
versionCode 203
28-
versionName "2.0.3"
27+
versionCode 204
28+
versionName "2.0.4"
2929
}
3030

3131
buildTypes {
@@ -51,6 +51,6 @@ dependencies {
5151
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
5252
implementation 'androidx.core:core-ktx:1.3.2'
5353
implementation 'com.google.android.material:material:1.3.0'
54-
implementation 'com.google.android.gms:play-services-ads:19.7.0'
54+
implementation 'com.google.android.gms:play-services-ads:20.0.0'
5555
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
5656
}

app/src/main/java/juniojsv/mtk/easy/su/ExploitHandler.kt

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,14 @@ class ExploitHandler(
1717
context.getSharedPreferences(BuildConfig.APPLICATION_ID, Context.MODE_PRIVATE)
1818

1919
override fun onPreExecute() {
20-
context.getString(R.string.please_wait).toast(context, true)
20+
context.getString(R.string.executing_script).toast(context, true)
2121
}
2222

2323
override fun doInBackground(): ExploitResult {
2424
with(context) {
2525
if (filesDir.absoluteFile.listFiles()?.isEmpty() == true ||
26-
preferences.getString(
27-
PREF_EXTRACTED_BY_VERSION,
28-
String()
29-
) != BuildConfig.VERSION_NAME
30-
) {
26+
preferences.getString(PREF_EXTRACTED_BY_VERSION, String()) != BuildConfig.VERSION_NAME ||
27+
BuildConfig.DEBUG) {
3128

3229
preferences.edit(true) {
3330
putString(PREF_EXTRACTED_BY_VERSION, BuildConfig.VERSION_NAME)
@@ -50,14 +47,13 @@ class ExploitHandler(
5047
)
5148
else -> File(filesDir.absoluteFile, name)
5249
}
53-
val output = FileOutputStream(file)
54-
assets.open(name).copyTo(output, 512)
55-
output.close()
56-
file.apply {
50+
val output = FileOutputStream(file.apply {
5751
setExecutable(true, true)
5852
setReadable(true, true)
59-
setWritable(false)
60-
}
53+
setWritable(true, true)
54+
})
55+
assets.open(name).copyTo(output, 512)
56+
output.close()
6157
}
6258
}
6359
}

app/src/main/java/juniojsv/mtk/easy/su/MainActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
138138
}
139139

140140
binding.mButtonTryRoot.setOnClickListener { button ->
141+
getString(R.string.please_wait).toast(this, true)
141142
button.isEnabled = false
142143
loadNewAdvertising {
143144
ExploitHandler(this) { result ->

app/src/main/res/values-ko-rKR/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<string name="warning">
1313
매지스크 매니저를 통해 매지스크를 업데이트 하지 마세요. 기기에 소프트브릭 현상 등이 발생될수 있으며, 개발자는 어떠한 경우에도 책임을 지지 않습니다
1414
</string>
15+
<string name="executing_script">스크립트 실행</string>
1516
<string name="please_wait">잠시 기다려주세요</string>
1617
<string name="version">버전</string>
1718
<string name="success">슈퍼유저 적용됨, 매지스크 매니저를 이용해 관리하세요</string>

app/src/main/res/values-pt-rBR/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@
4040
<string name="ignore">Ignorar</string>
4141
<string name="terminal">terminal</string>
4242
<string name="tip_here">tip here</string>
43+
<string name="executing_script">Executando script</string>
4344
</resources>

app/src/main/res/values-ru-rRU/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<string name="juniojsv_about">JunioJsv\nРазработчик этого приложения</string>
2121
<string name="mtk_su">Diplomatic\nРазработчик mtk-su</string>
2222
<string name="app_name">Mtk Easy Su</string>
23+
<string name="executing_script">Выполнение скрипта</string>
2324
<string name="please_wait">пожалуйста, подождите</string>
2425
<string name="version">Версия</string>
2526
<string name="accept">Принять</string>

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Do not update Magisk through Magisk Manager on a locked bootloader or you will brick your device. Including, i
1414
am not liable for any kind of damage to your device
1515
</string>
16+
<string name="executing_script">Executing script</string>
1617
<string name="please_wait">Please wait</string>
1718
<string name="application_advertising_id" translatable="false">ca-app-pub-4100401274047460~8660712784</string>
1819
<string name="advertising_id" translatable="false">ca-app-pub-4100401274047460/2396825799</string>

build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ buildscript {
44
repositories {
55
google()
66
jcenter()
7-
87
}
98
dependencies {
10-
classpath 'com.android.tools.build:gradle:4.1.2'
9+
classpath 'com.android.tools.build:gradle:4.1.3'
1110
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1211
}
1312
}
@@ -16,7 +15,6 @@ allprojects {
1615
repositories {
1716
google()
1817
jcenter()
19-
2018
}
2119
}
2220

0 commit comments

Comments
 (0)