Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public LSPosedDexParser(@NonNull ByteBuffer buffer, boolean includeAnnotations)

var methodIds = (int[]) out[4];
this.methodIds = new MethodId[methodIds.length / 3];
for (int i = 0; i < this.methodIds.length / 3; ++i) {
for (int i = 0; i < this.methodIds.length; ++i) {
this.methodIds[i] = new LSPosedMethodId(i, methodIds[3 * i], methodIds[3 * i + 1], methodIds[3 * i + 2]);
}

Expand Down Expand Up @@ -176,8 +176,8 @@ class LSPosedProtoId extends LSPosedId<ProtoId> implements ProtoId {
this.returnType = typeIds[protoId[1]];
if (protoId.length > 2) {
this.parameters = new TypeId[protoId.length - 2];
for (int i = 2; i < parameters.length; ++i) {
this.parameters[i] = typeIds[protoId[i]];
for (int i = 0; i < parameters.length; ++i) {
this.parameters[i] = typeIds[protoId[i + 2]];
}
} else {
this.parameters = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ public static void start(String[] args) {

int systemServerMaxRetry = 1;
for (String arg : args) {
if (arg.equals("--from-service")) {
Log.w(TAG, "LSPosed daemon is not started properly. Try for a late start...");
} else if (arg.startsWith("--system-server-max-retry=")) {
if (arg.startsWith("--system-server-max-retry=")) {
try {
systemServerMaxRetry = Integer.parseInt(arg.substring(arg.lastIndexOf('=') + 1));
} catch (Throwable ignored) {
Expand Down
1 change: 0 additions & 1 deletion magisk-loader/magisk_module/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ ui_print "- Extracting module files"

extract "$ZIPFILE" 'module.prop' "$MODPATH"
extract "$ZIPFILE" 'action.sh' "$MODPATH"
extract "$ZIPFILE" 'post-fs-data.sh' "$MODPATH"
extract "$ZIPFILE" 'service.sh' "$MODPATH"
extract "$ZIPFILE" 'uninstall.sh' "$MODPATH"
extract "$ZIPFILE" 'sepolicy.rule' "$MODPATH"
Expand Down
26 changes: 0 additions & 26 deletions magisk-loader/magisk_module/post-fs-data.sh

This file was deleted.

6 changes: 4 additions & 2 deletions magisk-loader/magisk_module/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#

MODDIR=${0%/*}

cd "$MODDIR"
# post-fs-data.sh may be blocked by other modules. retry to start this
unshare --propagation slave -m sh -c "$MODDIR/daemon --from-service $@&"

# To avoid delaying the normal mount timing of zygote, we start LSPosed service daemon in late_start service mode instead of post-fs-data mode
unshare --propagation slave -m sh -c "$MODDIR/daemon $@&"