Workaround stupid Moshi proguard rules
This commit is contained in:
parent
f5c3ee3ae1
commit
42ce6fd334
@ -69,8 +69,8 @@ abstract class RemoteFileService : NotificationService() {
|
||||
|
||||
supportedFolders.firstMap { it.find(subject.file.name) }.also {
|
||||
if (subject is Magisk) {
|
||||
if (!ShellUtils.checkSum("MD5", it, subject.magisk.hash)) {
|
||||
throw IllegalStateException("The given file doesn't match the hash")
|
||||
if (!ShellUtils.checkSum("MD5", it, subject.magisk.md5)) {
|
||||
throw IllegalStateException("The given file doesn't match the md5")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.topjohnwu.magisk.model.entity
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.squareup.moshi.Json
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
import se.ansman.kotshi.JsonSerializable
|
||||
|
||||
@ -23,7 +22,7 @@ data class MagiskJson(
|
||||
val versionCode: Int = -1,
|
||||
val link: String = "",
|
||||
val note: String = "",
|
||||
@Json(name = "md5") val hash: String = ""
|
||||
val md5: String = ""
|
||||
)
|
||||
|
||||
@Parcelize
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.topjohnwu.magisk.tasks
|
||||
|
||||
import com.squareup.moshi.Json
|
||||
import com.topjohnwu.magisk.Const
|
||||
import com.topjohnwu.magisk.data.database.RepoDao
|
||||
import com.topjohnwu.magisk.data.network.GithubApiServices
|
||||
@ -89,9 +88,11 @@ private val dateFormat: SimpleDateFormat =
|
||||
|
||||
@JsonSerializable
|
||||
data class GithubRepoInfo(
|
||||
@Json(name = "name") val id: String,
|
||||
val name: String,
|
||||
val pushed_at: String
|
||||
) {
|
||||
val id get() = name
|
||||
|
||||
@Transient
|
||||
val pushDate = dateFormat.parse(pushed_at)!!
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ class EnvFixDialog(activity: Activity) : CustomAlertDialog(activity) {
|
||||
installDir = SuFile("/data/adb/magisk")
|
||||
Shell.su("rm -rf /data/adb/magisk/*").exec()
|
||||
val zip : File = activity.cachedFile("magisk.zip")
|
||||
if (!ShellUtils.checkSum("MD5", zip, Info.remote.magisk.hash))
|
||||
if (!ShellUtils.checkSum("MD5", zip, Info.remote.magisk.md5))
|
||||
Networking.get(Info.remote.magisk.link).execForFile(zip)
|
||||
zipUri = zip.toUri()
|
||||
return extractZip() && Shell.su("fix_env").exec().isSuccess
|
||||
|
Loading…
Reference in New Issue
Block a user