diff --git a/native/jni/init/twostage.cpp b/native/jni/init/twostage.cpp index 7abbdb510..fe5e04ee8 100644 --- a/native/jni/init/twostage.cpp +++ b/native/jni/init/twostage.cpp @@ -145,7 +145,7 @@ void SARFirstStageInit::prepare() { int src = xopen("/init", O_RDONLY); int dest = xopen("/dev/init", O_CREAT | O_WRONLY, 0); { - auto init = raw_data::read(dest); + auto init = raw_data::read(src); init.patch({ make_pair(INIT_PATH, REDIR_PATH) }); write(dest, init.buf, init.sz); fclone_attr(src, dest);