Closed silleftw closed 4 weeks ago
I have the same problem with the current nightly build of APatch.
****************************
****************************
APatch Boot Image Patcher
****************************
- Patching kernel
+ ./kptools -p -i kernel.ori -S testtest0 -k kpimg -o kernel
Segmentation fault
+ patch_rc=139
+ set +x
- Patch kernel error: 139
Write patched boot.img failed
****************************
Same issue occurring with the pixel 8 (non pro)
Running into this as well, heres from a logcat
08-22 22:25:53.217 10779 10855 I PatchViewModel: current slot: _b
08-22 22:25:53.217 10779 10855 I PatchViewModel: current bootimg: /dev/block/sda23
08-22 22:25:53.385 10779 10855 D PatchViewModel: kernel image info: {kernel=[{banner=[Linux version 5.15.137-android14-11-gb572b1fac135-ab11919372 (build-user@build-host) (Android (10087095, +pgo, +bolt, +lto, -mlgo, based on r487747c) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362), LLD 17.0.2) #1 SMP PREEMPT Mon Jun 3 16:35:10 UTC 2024], patched=[true]}], kpimg=[{version=[0xa07], compile_time=[12:16:35 May 1 2024], config=[android,release], superkey=[notmykey], root_superkey=[0000000000000000000000000000000000000000000000000000000000000000]}], additional=[{}], extras=[{num=[0]}]}
08-22 22:25:55.434 10779 10855 D PatchViewModel: starting patching...
08-22 22:25:55.435 10779 10855 I PatchViewModel: patchCommand: boot_patch.sh notmykey /dev/block/sda23 true -K kpatch
08-22 22:25:55.435 10779 10779 D PatchViewModel: ****************************
08-22 22:25:55.450 10779 10779 D PatchViewModel: ****************************
08-22 22:25:55.450 10779 10779 D PatchViewModel: APatch Boot Image Patcher
08-22 22:25:55.450 10779 10779 D PatchViewModel: ****************************
08-22 22:25:55.452 10779 10779 D PatchViewModel: - Patching kernel
08-22 22:25:55.452 10779 10779 D PatchViewModel: + ./kptools -p -i kernel.ori -S notmykey -k kpimg -o kernel true -K kpatch
08-22 22:25:55.526 11377 11377 F libc : Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb400006e0d202000 in tid 11377 (kptools), pid 11377 (kptools)
08-22 22:25:55.558 11380 11380 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstoneProto
08-22 22:25:55.558 688 688 I tombstoned: received crash request for pid 11377
08-22 22:25:55.559 11380 11380 I crash_dump64: performing dump of process 11377 (target tid = 11377)
08-22 22:25:55.560 11380 11380 E DEBUG : failed to read process info: failed to open /proc/11377: No such file or directory
08-22 22:25:55.570 11380 11380 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-22 22:25:55.570 11380 11380 F DEBUG : Build fingerprint: 'google/shiba/shiba:14/AP2A.240805.005/12025142:user/release-keys'
08-22 22:25:55.570 11380 11380 F DEBUG : Revision: 'MP1.0'
08-22 22:25:55.570 11380 11380 F DEBUG : ABI: 'arm64'
08-22 22:25:55.570 11380 11380 F DEBUG : Timestamp: 2024-08-22 22:25:55.560062467-0400
08-22 22:25:55.570 11380 11380 F DEBUG : Process uptime: 0s
08-22 22:25:55.570 11380 11380 F DEBUG : Cmdline: ./kptools -p -i kernel.ori -S notmykey -k kpimg -o kernel true -K kpatch
08-22 22:25:55.570 11380 11380 F DEBUG : pid: 11377, tid: 11377, name: kptools >>> ./kptools <<<
08-22 22:25:55.570 11380 11380 F DEBUG : uid: 0
08-22 22:25:55.570 11380 11380 F DEBUG : tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
08-22 22:25:55.570 11380 11380 F DEBUG : pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
08-22 22:25:55.570 11380 11380 F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb400006e0d202000
08-22 22:25:55.570 11380 11380 F DEBUG : x0 0000000000000020 x1 0000000000000014 x2 0000000000000005 x3 4c696e7500000000
08-22 22:25:55.570 11380 11380 F DEBUG : x4 7273696f00000000 x5 0000000078756e69 x6 000000006e6f6973 x7 0000007fc27dbdfd
08-22 22:25:55.570 11380 11380 F DEBUG : x8 0000000000000000 x9 000000000000000d x10 fffffffffffffffc x11 0000007fc27dbd60
08-22 22:25:55.570 11380 11380 F DEBUG : x12 0000007fc27db560 x13 0000000000000000 x14 000000000000000e x15 0000000100000000
08-22 22:25:55.570 11380 11380 F DEBUG : x16 b400006e0d1fd866 x17 0000007fc27dbdfe x18 00000070a13e8000 x19 b400006e0d201ff3
08-22 22:25:55.570 11380 11380 F DEBUG : x20 000000000000000e x21 0000007fc27dbdf8 x22 b400006e0d202001 x23 0000000000000005
08-22 22:25:55.570 11380 11380 F DEBUG : x24 00000070a0918000 x25 0000000000000004 x26 000000000000000a x27 00000070a0760090
08-22 22:25:55.570 11380 11380 F DEBUG : x28 0000005557185c28 x29 0000007fc27dbd90
08-22 22:25:55.571 11380 11380 F DEBUG : lr 00000070a0748e64 sp 0000007fc27db560 pc 00000070a0748f08 pst 0000000060001000
08-22 22:25:55.571 11380 11380 F DEBUG : 6 total frames
08-22 22:25:55.571 11380 11380 F DEBUG : backtrace:
08-22 22:25:55.571 11380 11380 F DEBUG : #00 pc 00000000000c5f08 /apex/com.android.runtime/lib64/bionic/libc.so (twoway_memmem+776) (BuildId: 1d36f8ae6e0af6158793abea7d4f4f2b)
08-22 22:25:55.571 11380 11380 F DEBUG : #01 pc 00000000000071b8 /data/app/~~SVIcuOvP_vS84787u_RVzg==/me.bmax.apatch-bYcAag6XpnT_ngcnnTszXQ==/lib/arm64/libkptools.so (BuildId: 0280974954a09f0aa3a140acef70dbb27907243c)
08-22 22:25:55.571 11380 11380 F DEBUG : #02 pc 0000000000006fe0 /data/app/~~SVIcuOvP_vS84787u_RVzg==/me.bmax.apatch-bYcAag6XpnT_ngcnnTszXQ==/lib/arm64/libkptools.so (BuildId: 0280974954a09f0aa3a140acef70dbb27907243c)
08-22 22:25:55.571 11380 11380 F DEBUG : #03 pc 00000000000091d4 /data/app/~~SVIcuOvP_vS84787u_RVzg==/me.bmax.apatch-bYcAag6XpnT_ngcnnTszXQ==/lib/arm64/libkptools.so (BuildId: 0280974954a09f0aa3a140acef70dbb27907243c)
08-22 22:25:55.571 11380 11380 F DEBUG : #04 pc 0000000000008184 /data/app/~~SVIcuOvP_vS84787u_RVzg==/me.bmax.apatch-bYcAag6XpnT_ngcnnTszXQ==/lib/arm64/libkptools.so (BuildId: 0280974954a09f0aa3a140acef70dbb27907243c)
08-22 22:25:55.571 11380 11380 F DEBUG : #05 pc 0000000000057044 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+116) (BuildId: 1d36f8ae6e0af6158793abea7d4f4f2b)
08-22 22:25:55.572 1652 2216 W NativeCrashListener: Couldn't find ProcessRecord for pid 11377
08-22 22:25:55.572 11380 11380 E crash_dump64: AM data write failed: Broken pipe
08-22 22:25:55.575 688 688 E tombstoned: Tombstone written to: tombstone_03
08-22 22:25:55.587 1652 2037 I BootReceiver: Copying /data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)
08-22 22:25:55.588 1652 2037 I DropBoxManagerService: add tag=SYSTEM_TOMBSTONE isTagEnabled=true flags=0x6
08-22 22:25:55.589 10779 10779 D PatchViewModel: Segmentation fault
08-22 22:25:55.589 10779 10779 D PatchViewModel: + patch_rc=139
08-22 22:25:55.589 10779 10779 D PatchViewModel: + set +x
08-22 22:25:55.589 10779 10779 D PatchViewModel: - Patch kernel error: 139
08-22 22:25:55.589 10779 10779 D PatchViewModel: Reboot to finish the installation~
08-22 22:25:55.599 10779 10855 D APatch : mark reboot 0
08-22 22:25:55.599 1652 2037 E NativeTombstoneManager: Tombstone's UID (0) not an app, ignoring
08-22 22:25:55.601 10779 10779 D PatchViewModel: ****************************
Let me know if anything else could help with this.
I grabbed the tombstone_03 as well tombstone_03.txt
Issue confirmed with Android 15 QPR1 beta 1 update for Google Pixel 6
Same issue for P6P on 15 QPR1
dev fixed
Boot.img failed to be patched after the new August Update for the Pixel 8.
Patch Kernel Error: 139