Commit 42ce6fd3 authored by topjohnwu's avatar topjohnwu

Workaround stupid Moshi proguard rules

parent f5c3ee3a
......@@ -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")
}
}
}
......
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
......
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment