[Magisk] Musi63:
Magisk Daemon Crashing?

Hey,

I've been trying to install Magisk for a few (12) hours now and keep running into issues. I'm running a Pixel (non-XL) on Android 7.1.1 (nmf26o) that I believe was OTA. Previously I had SuperSU installed (I think it was systemless, but I can't be sure; shouldn't matter as I'll explain). Following some guides I did a full removal through the SuperSU app, but did NOT try to restore the original boot image because I had TWRP installed in the recovery partition (version 3.0.0-1 alpha?). Instead, I got the stock boot image and flashed it using TWRP. Then I flashed the Magisk 15.2 zip, booted into system and didn't see Magisk Manager. I should mention that because I'm on 7.1.1 (with December 2016 security updates), I don't have to flash with a signer package. The release thread said I should try installing manually, so I grabbed the Magisk Manager 5.3.3 apk and installed that. Up to this point, everything seemed fine, but now we have the bug.

Manager was stuck on the splash screen, so I assumed something hadn't installed correctly when I was flashing either the stock boot image or the Magisk zip. So trying to start from square one, I used fastboot to flash the stock boot image to both A and B partitions, then temporary booted into the newest version of TWRP (3.2.1-0 stable). From there I flashed the stock system image (since I wasn't sure my previous root was systemless) and Magisk 15.2 again. Boot into system, still no Manager, so install the apk, startup, and again stuck on splash screen.

The only available flashable zips in the release thread are 15.2, 14.0 (won't work because no support for Pixel family), and 12.0 (really wont work). I'm a developer and have made android apps before so I'm not afraid of compiling older releases from source, but I'm not at home so no android or java SDKs. I looked through the source for Manager to see what is causing the hang, and part of splash screen stuff is grabbing Magisk version from the daemon; specifically it runs the "magisk -v" then "magisk -V" in a shell. I opened up a shell through ADB to look around, and sure enough "magisk -v" hangs. After a bit more investigation, it looks like the daemon crashed because of a seg fault. I'll attach the logs that I can, but I think it's crashing before the daemon sets up it's debug log, so I don't have any from that side (I've checked /cache and /data from recover, but no log in either). I've tried running "magisk --daemon" directly, which quits immediately, but that doesn't seem unusual since I can't run it as root.

I don't know if there was something I did wrong during setup, but for now I can't build Magisk myself to debug. If anyone knows what I should try, or if you want more files let me know. I thought about making an issue on GitHub, but since I can't debug it right now, it might not be very helpful.

Thanks!

(Looks like I can't attach/post links because of account age or something? So I'll post a snippet)

Logcat:

--------- beginning of crash
04-24 19:33:45.766 430 431 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x58 in tid 431 (magisk)
04-24 19:33:45.830 583 583 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-24 19:33:45.830 583 583 F DEBUG : Build fingerprint: 'google/sailfish/sailfish:7.1.1/NMF26O/3514931:user/release-keys'
04-24 19:33:45.830 583 583 F DEBUG : Revision: '0'
04-24 19:33:45.830 583 583 F DEBUG : ABI: 'arm64'
04-24 19:33:45.830 583 583 F DEBUG : pid: 430, tid: 431, name: magisk >>> magisk_daemon <<<
04-24 19:33:45.830 583 583 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x58
04-24 19:33:45.830 583 583 F DEBUG : x0 0000000000000000 x1 0000000000000000 x2 0000000000000002 x3 0000000000000400
04-24 19:33:45.830 583 583 F DEBUG : x4 697461657243202a x5 0000000000008080 x6 000000709781b000 x7 0000000000000000
04-24 19:33:45.830 583 583 F DEBUG : x8 0000000000000002 x9 0000000000000048 x10 0000007096dd9dc0 x11 0000000000000040
04-24 19:33:45.830 583 583 F DEBUG : x12 0000000000000018 x13 0000000000000000 x14 0000000000000000 x15 002daf2f972fa006
04-24 19:33:45.830 583 583 F DEBUG : x16 0000007096eaee10 x17 0000007096e46378 x18 00000000ffffffff x19 0000000000000000
04-24 19:33:45.830 583 583 F DEBUG : x20 0000000000000002 x21 00000000000001ae x22 0000000000000400 x23 0000000000000000
04-24 19:33:45.830 583 583 F DEBUG : x24 0000007096dda3d0 x25 a44f6f4f7eefb511 x26 000000555557f000 x27 0000005555568600
04-24 19:33:45.830 583 583 F DEBUG : x28 00000055555685e8 x29 0000007096dda350 x30 000000555555aa34
04-24 19:33:45.830 583 583 F DEBUG : sp 0000007096dda2f0 pc 0000007096e463cc pstate 0000000060000000
04-24 19:33:45.833 583 583 F DEBUG :
04-24 19:33:45.833 583 583 F DEBUG : backtrace:
04-24 19:33:45.833 583 583 F DEBUG : #00 pc 00000000000593cc /system/lib64/libc.so (setvbuf+84)
04-24 19:33:45.833 583 583 F DEBUG : #01 pc 0000000000005a30 /sbin/magisk (deleted)
04-24 19:33:45.833 583 583 F DEBUG : #02 pc 0000000000067efc /system/lib64/libc.so (_ZL15__pthread_startPv+196)
04-24 19:33:45.833 583 583 F DEBUG : #03 pc 000000000001d980 /system/lib64/libc.so (__start_thread+16)
--------- beginning of system
...

Also, for some reason the time is wrong? Some clock thinks its Apr 24, 1971, but it get's fixed at some point. The main system log has correct times.

Stock Images: dl (dot) google (dot) com/dl/android/aosp/sailfish-nmf26o-factory-58719f26.zip

Magisk zip is 15.2 from releast thread.

TWRP recovery.log is long and everything seems to have installed correctly, but I'll post if someone wants to see it. The setup correctly identifies my phone and puts the binaries into /root and links them to /data/adb like normal.