Set stub version in stub

This commit is contained in:
topjohnwu 2020-01-03 02:19:10 +08:00
parent 15bd2da824
commit bce777d7c6
2 changed files with 4 additions and 3 deletions

View File

@ -11,8 +11,6 @@ import static android.os.Build.VERSION.SDK_INT;
public class DynAPK {
private static final int STUB_VERSION = 6;
// Indices of the object array
private static final int STUB_VERSION_ENTRY = 0;
private static final int CLASS_COMPONENT_MAP = 1;
@ -64,7 +62,7 @@ public class DynAPK {
}
public static class Data {
public int version = STUB_VERSION;
public int version;
public Map<String, String> classToComponent;
}
}

View File

@ -6,6 +6,8 @@ import java.util.Map;
import static com.topjohnwu.magisk.DynAPK.Data;
public class Mapping {
private static final int STUB_VERSION = 7;
private static Map<String, String> map = new HashMap<>();
private static Map<String, String> inverseMap;
@ -29,6 +31,7 @@ public class Mapping {
public static Data data() {
Data data = new Data();
data.version = STUB_VERSION;
data.classToComponent = inverseMap;
return data;
}