mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-03-28 14:32:15 +00:00
More log for get_manager
This commit is contained in:
parent
38abad1e44
commit
c2978eb9c3
@ -103,8 +103,10 @@ int get_manager(int user_id, string *pkg, bool install) {
|
|||||||
snprintf(app_path, sizeof(app_path),
|
snprintf(app_path, sizeof(app_path),
|
||||||
"%s/%d/%s/dyn/current.apk", APP_DATA_DIR, u, mgr_pkg->data());
|
"%s/%d/%s/dyn/current.apk", APP_DATA_DIR, u, mgr_pkg->data());
|
||||||
int dyn = open(app_path, O_RDONLY | O_CLOEXEC);
|
int dyn = open(app_path, O_RDONLY | O_CLOEXEC);
|
||||||
if (dyn < 0)
|
if (dyn < 0) {
|
||||||
|
LOGW("pkg: no dyn APK, ignore\n");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
bool mismatch = default_cert && read_certificate(dyn, MAGISK_VER_CODE) != *default_cert;
|
bool mismatch = default_cert && read_certificate(dyn, MAGISK_VER_CODE) != *default_cert;
|
||||||
close(dyn);
|
close(dyn);
|
||||||
if (mismatch) {
|
if (mismatch) {
|
||||||
@ -270,7 +272,8 @@ int get_manager(int user_id, string *pkg, bool install) {
|
|||||||
install_stub();
|
install_stub();
|
||||||
|
|
||||||
not_found:
|
not_found:
|
||||||
LOGW("pkg: cannot find manager for user=[%d]\n", user_id);
|
const char *name = mgr_pkg->empty() ? JAVA_PACKAGE_NAME : mgr_pkg->data();
|
||||||
|
LOGW("pkg: cannot find %s for user=[%d]\n", name, user_id);
|
||||||
if (pkg) pkg->clear();
|
if (pkg) pkg->clear();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user