bmax121 / KernelPatch

Patching and hooking the Linux kernel with only a stripped Linux kernel image.
GNU General Public License v2.0
736 stars 128 forks source link

Configuration cannot be initialized #58

Closed sekaiacg closed 8 months ago

sekaiacg commented 9 months ago

There is no post-fs-data-init in the following log.

[    0.000000] KP Kernel pa: 80080000
[    0.000000] KP Kernel va: ffffff8008080000
[    0.000000] KP Kernel Version: 40499
[    0.000000] KP Kernel Patch Version: a00
[    0.000000] KP Kernel Patch Config: 2
[    0.000000] KP Kernel Patch Compile Time: 06:23:21 Feb 23 2024
......
[    3.752198] KP exec /init first stage
[    3.752203] KP write kpatch to /dev/kpatch
[    3.752418] KP after kernel_init ...
[    3.826939] KP exec /init second stage 1
[    3.870921] KP redirect rc file: 10
[    3.870933] KP restore rc file: 1b
[    3.870938] [+] KP V Wrap func pointer remove: ffffff80090021c0, ffffff8105f929e0, ffffff8105f92734
[    3.870945] [+] KP V Unwrap func pointer: ffffff80090021c0, ffffff8105f929e0, ffffff8105f92734
[    6.388467] [+] KP I commit_su: pid: 626, tgid: 0, to_uid: 0, sctx: (null), via_hook: 1
[    6.389158] [+] KP I commit_su: pid: 627, tgid: 0, to_uid: 0, sctx: (null), via_hook: 1
[    6.394095] [+] KP I hello1158
[    6.394118] [+] KP I commit_su: pid: 627, tgid: 0, to_uid: 0, sctx: u:r:magisk:s0, via_hook: 1
[    6.781948] [+] KP I user log: 627 wait /data/adb/apd post-fs-data  status: 0x0
[    6.808291] [+] KP I user log: 627 wait dmesg status: 0x0
[    7.862346] [+] KP I commit_su: pid: 992, tgid: 0, to_uid: 0, sctx: (null), via_hook: 1
[    7.868713] [+] KP I hello1158
[    7.868748] [+] KP I commit_su: pid: 992, tgid: 0, to_uid: 0, sctx: u:r:magisk:s0, via_hook: 1
[    7.895479] [+] KP I user log: 992 wait /data/adb/apd services  status: 0x0
[    8.026224] [+] KP I user log: 992 wait dmesg status: 0x0
[   22.869895] [+] KP I commit_su: pid: 3149, tgid: 0, to_uid: 0, sctx: (null), via_hook: 1
[   22.884905] [+] KP I hello1158
[   22.884933] [+] KP I commit_su: pid: 3149, tgid: 0, to_uid: 0, sctx: u:r:magisk:s0, via_hook: 1
[   22.894944] [+] KP I user log: 3149 wait /data/adb/apd boot-completed  status: 0x0
[   22.965873] [+] KP I user log: 3149 wait dmesg status: 0x0
[   35.154332] KP exec app_process, /data prepared, second_stage: 1

The /dev/kpatch file is successfully extracted, but does not exist.

[    3.752203] KP write kpatch to /dev/kpatch

sagit:/data/adb/ap # ls -al /dev/kpatch
ls: /dev/kpatch: No such file or directory

log file: kpatch_0.log

[    6.388122] init: starting service 'exec 6 (/system/bin/truncate a12345678 /dev/kpatch a12345678 android_user post-fs-data-init -k)'...
[    6.388467] [+] KP I commit_su: pid: 626, tgid: 0, to_uid: 0, sctx: (null), via_hook: 1
[    6.388505] init: SVC_EXEC pid 626 (uid 0 gid 0+0 context default) started; waiting...
[    6.388508] init: cannot execve('/system/bin/truncate'): No such file or directory
[    6.388772] init: Service 'exec 6 (/system/bin/truncate a12345678 /dev/kpatch a12345678 android_user post-fs-data-init -k)' (pid 626) exited with status 127 waiting took 0.000000 seconds
[    6.388888] init: starting service 'exec 7 (/system/bin/truncate a12345678 /data/adb/kpatch a12345678 android_user post-fs-data -k)'...
[    6.389158] [+] KP I commit_su: pid: 627, tgid: 0, to_uid: 0, sctx: (null), via_hook: 1
[    6.389201] init: SVC_EXEC pid 627 (uid 0 gid 0+0 context default) started; waiting...
[    6.394095] [+] KP I hello1158