mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-19 20:48:30 +00:00
Fix release build
This commit is contained in:
parent
d1621845b8
commit
bf6359abaa
@ -223,13 +223,14 @@ int get_manager(int user_id, string *pkg, bool install) {
|
||||
ssprintf(app_path, sizeof(app_path), "%s/%d/" JAVA_PACKAGE_NAME, APP_DATA_DIR, u);
|
||||
if (stat(app_path, &st) == 0) {
|
||||
#if ENFORCE_SIGNATURE
|
||||
string apk = find_apk_path(JAVA_PACKAGE_NAME);
|
||||
int fd = xopen(apk.data(), O_RDONLY | O_CLOEXEC);
|
||||
byte_array<PATH_MAX> apk;
|
||||
find_apk_path(byte_view(str[SU_MANAGER]), apk);
|
||||
int fd = xopen((const char *) apk.buf(), O_RDONLY | O_CLOEXEC);
|
||||
string cert = read_certificate(fd, MAGISK_VER_CODE);
|
||||
close(fd);
|
||||
if (default_cert && cert != *default_cert) {
|
||||
// Found APK with invalid signature, force replace with stub
|
||||
LOGE("pkg: APK signature mismatch: %s\n", apk.data());
|
||||
LOGE("pkg: APK signature mismatch: %s\n", apk.buf());
|
||||
uninstall_pkg(JAVA_PACKAGE_NAME);
|
||||
invalid = true;
|
||||
install = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user