yashsingh1/xdaforums huggingface dataset:
[Magisk] bluesguy_1:
Hello, I'm looking for some pointers on how to troubleshoot my Magisk problem, running on Moto E4 (XT1768) Android 7.1.1. stock recovery, stock ROM. Install logs and error log attached.

Summary: Root works fine, but I want to run a resetprop command at startup.

I want to be able to run a script at startup (in service.d) but I couldn't get it to work. Looking at the logs it seems like there's a problem with the overlay mounting.

01-01 03:54:29.571 661 668 I Magisk : * Mounting /data/adb/magisk.img
01-01 03:54:29.608 661 668 E Magisk : mount /dev/block/loop0->/sbin/.core/img failed with 13: Permission denied
01-01 03:54:29.608 661 668 E Magisk : umount /sbin/.core/img failed with 22: Invalid argument
01-01 03:54:29.660 661 668 E Magisk : mount /dev/block/loop0->/sbin/.core/img failed with 13: Permission denied

I initially installed magisk 16.0 using the stock boot image modification technique in magisk manager.

Updated to 16.4 beta using magisk manager. Same errors.

Any tips on how to either:

a) fix the magisk error

or

b) an alternative to run my resetprop command at startup?

Thank you!!
[Magisk] martyfender:
Does your moto, like many others, use the f2fs file system, instead of ext4? If so, this may help. You may have the f2fs loop back bug. I don't have a moto device though:

https://xdaforums.com/apps/magisk/guide-magisk-official-version-including-t3577875

I believe the other alternative is to use a custom kernel that uses the ext4 data partition. A search may yield better info.
[Magisk] flex1911:
Thread cleaned. Please stay on topic and discuss only beta-related questions.

And keep unofficial builds away from here too.
[Magisk] Darkoholic:
Nice ? looks like we might get an update sooner than later
[Magisk] chikimonke:
So I'm not sure what's needed for a log, but myself and 3 other Pixel 2 XL users have suddenly started failing safety net. Used to work, and now in the past day or so, it's stopped. I checked that Hide works as well as root in general, both do. Google Pay wouldn't let me pay last night, which is when I first noticed it. I believe all 4 of us are on DP3, but we're on either 12.8.48 or 12.8.66 for Play Services. Let me know what I can grab as far as logs or other info that may be able to help.
[Magisk] SacredDeviL666:
Below is the request from Dev/mentioned in OP :- https://xdaforums.com/showpost.php?p=72588015&postcount=1
[Magisk] chikimonke:
Noted, sorry.

Edit: so clearing data and cache of play services and store seems to have restored safety net...
[Magisk] jcmm11:
Your data partition is being mounted as f2fs. Quoting from your log:

/dev/block/dm-0 on /data type f2fs (rw,seclabel,nosuid,nodev,noatime,nodiratime,background_gc=on,discard,user_xattr,inline_xattr,acl,inline_data,nobarrier,extent_cache,active_logs=6)
[Magisk] Kywrosaki:
I use the last beta magisk, does not pass the test, more precisely on any version of the magisk did not pass the verification on my smartphone, carefully waited from the update to update that when and yes the problem will be solved but no. However, a strange situation develops, I previously tested in the rootbear application, it informed me that the phone was not ritovan, but in the application itself magisk still did not pass the test, but at the moment we have that rootbear complains about the presence in the smartphone of the application to control the root access (magisk manager), but if I re-compile the magisk with a different package name, then the rootbear application is tested, only after that magisk begins to fool, writes that magisk is not installed and ask to install the latest version, end I, the phone starts to reboot every 2-3 minutes, it came to that I had to flash the phone with the formatting of all the data, it was too lazy to clean everything manually, it was easier to flash. Also in the magisk is not active point with a fingerprint scanner for my smartphone, although I have a fingerprint scanner in my smartphone, the item is grayed out and neither turn it on nor turn it off. In general, I attach to the post log magisk, as well as screenshots for clarity, I hope to solve these problems, I'm already really tired of waiting, it's easier to write everything myself and show if it's necessary to test something, then I just have to debug it magisk, for normal operation on my smartphone. Smartphone xiaomi redmi 3 pro, miui 8.4.26, android 5.1.1, I hope for understanding. Thank you.
[Magisk] martyfender:
in that case, he should try the f2fs loop back fix module, I believe?
[Magisk] Wolfcity:
V

He definitely should give it a try.
[Magisk] bluesguy_1:
Update that this was the correct solution.

Doh! I don't know how I didn't see that. For whatever reason I only looked at the /dev/block/mmcblk0pxx entries and totally missed it. <facepalm>

Thank you! I'll give the f2fs workaround module a go.

EDIT: Yup. This module worked liked a charm! Didn't even have to uninstall magisk or restore the stock boot first thanks to the error checking and robustness of the install mechanism. Thank you everyone!!
[Magisk] bush911:
Always lose root

Can someone please check this log and help me figure this issue out!!

I have bothered for this since android 8.1, the phone always lose root, and reboot can fix it.

Previously I was using magisk 16.4, now tried using an unofficial build, issues persits.

Please, appreciate your comment very much
[Magisk] mobileman88:
I found this is usually due to misbehaving MAgisk modules

Have you tried to root again with the following steps :

- Boot to TWRP

- Run the MAgisk Uninstaller

- Re install stock boot.img

- Reinstall Magisk 16.4

- DO NOT INSTALL ANY ADDITIONAL MAGISK modules

- Reboot

Test each Magisk Module for a day before installing the next. You should find the culprit

The above steps works whenever I have such problems. I believe you have a module not behaving.
[Magisk] Seraphen07:
I have the same problem :(. Everything worked fine until Saturday, and suddenly it failed. If you have any input on steps to take I'd be grateful (already tried unrooting/rooting again, core mode, removing apps that use root).

PS: I'm trying to attach my log but cannot find how! Am I missing something obvious or are new accounts restricted?
[Magisk] chikimonke:
So try clearing Cache and Data for Play Services and Play Store and rebooting. That fixed it for me and the others too. Not sure why, or how temporary it is, but it fixes it for now.
[Magisk] Seraphen07:
Thank you so much! It worked, finally :). One other debugging trick to know for next time!
[Magisk] djuniah:
I've been having some major installation issues with the latest P beta on my Pixel XL. Here is some info on what has been happening:

- I had done a clean flash back to the latest stock image from google before opting in to the P beta OTA. I did a full wipe, no data preserved.

- After updating, i "fastboot boot"ed TWRP and flashed the latest 16.4 magisk

- Magisk would work and pass safetynet, however after a few minutes it would start to fail (I have seen others report this with no follow/resolution to the issue)

- I decided I would try and manually patch the boot.img using the Magisk app and flash that with fastboot. However i'm getting the following error every time I try to patch the image:

- Device platform: arm64-v8a
- Extracting files
- Boot image is signed with AVB 1.0
Bad system call
Failed!
! Installation failed

- I then tried running the magisk uninstaller in TWRP but received "Error 1" while doing so (apologies, i don't have the full log for this)

- I then manually flashed the stock boot image and tried the magisk uninstaller again and got "Error 255" (again, don't have the full log, sorry)

- I manually checked /data and there are not traces of magisk in there anywhere.

- Re-installed magisk manager and I still cannot even patch a boot image file, I am getting the "Bad system call" error. The manager does have file system permissions and it is downloading the zip correctly.

Does anyone have anything else I could try?

EDIT: I tried patching the boot.img from the latest non-P build for the PixelXL and it also is failing to patch with the same error.

EDIT2: Before anyone asks, I have never installed any modules. I only use magisk for basic root access and passing safetynet.

EDIT3: After all of this, flashed Magisk via TWRP one more time and it seems to be working for now. I'll keep an eye on it.

EDIT4: And it stopped again after a couple of hours.
[Magisk] jcmm11:
Seems there's some good news on this front.

https://mobile.twitter.com/topjohnwu/status/1009076217377509377?ref_src=twsrc
[Magisk] bush911:
thank you dude, will try to do what you just said even though I don't enable any modules
[Magisk] mobileman88:
It works for me across multiple devices of multiple android versions... 7.x/8.0/8.1/9

Should be good unless you're using an unsupported device
[Magisk] milomak:
for persist.magisk.hide, what does the value attached to it do?

so for instance, setprop persist.magisk.hide 10. what would the 10 refer to?

edit - i notice it is being deleted anyway

$ cat magisk_debug.log | grep "persist.magisk.hide" -b10 -a10
531260-06-27 21:25:11.295 1957 1964 D Magisk : magisk_img: e2fsck 1.43.3 (04-Sep-2016)
531343-06-27 21:25:11.297 1957 1964 D Magisk : magisk_img: Pass 1: Checking inodes, blocks, and sizes
531441-06-27 21:25:11.297 1957 1964 D Magisk : magisk_img: Pass 2: Checking directory structure
531533-06-27 21:25:11.297 1957 1964 D Magisk : magisk_img: Pass 3: Checking directory connectivity
531628-06-27 21:25:11.298 1957 1964 D Magisk : magisk_img: Pass 4: Checking reference counts
531717-06-27 21:25:11.298 1957 1964 D Magisk : magisk_img: Pass 5: Checking group summary information
531815-06-27 21:25:11.323 1957 1964 D Magisk : magisk_img: /data/adb/magisk.img: 16/4096 files (0.0% non-contiguous), 1299/16384 blocks
531947-06-27 21:25:11.329 1957 1964 I Magisk : * Running post-fs-data.d scripts
532023-06-27 21:25:11.329 1957 1964 I Magisk : * Running module post-fs-data scripts
532104-06-27 21:25:11.329 1957 1964 I Magisk : * Loading modules
532165:06-27 21:25:11.330 1957 1964 D Magisk : resetprop: getprop [persist.magisk.hide]: [10]
532255-06-27 21:25:11.331 1957 1980 I Magisk : * Starting MagiskHide
532320:06-27 21:25:11.331 1957 1980 D Magisk : resetprop: deleteprop [persist.magisk.hide]
532407:06-27 21:25:11.331 1957 1980 D Magisk : resetprop: unlink [/data/property/persist.magisk.hide]
532505-06-27 21:25:11.331 1957 1980 I Magisk : hide_utils: Hiding sensitive props
532583-06-27 21:25:11.331 1957 1980 D Magisk : resetprop: prop [ro.boot.verifiedbootstate] does not exist
532685-06-27 21:25:11.332 1957 1980 D Magisk : resetprop: prop [ro.boot.flash.locked] does not exist
532782-06-27 21:25:11.332 1957 1980 D Magisk : resetprop: prop [ro.boot.veritymode] does not exist
532877-06-27 21:25:11.332 1957 1980 D Magisk : resetprop: prop [ro.boot.warranty_bit] does not exist
532974-06-27 21:25:11.333 1957 1980 D Magisk : resetprop: prop [ro.warranty_bit] does not exist
533066-06-27 21:25:11.333 1957 1980 D Magisk : resetprop: getprop [ro.debuggable]: [1]
533149-06-27 21:25:11.333 1957 1980 D Magisk : resetprop: setprop [ro.debuggable]: [0] by modifing prop data structure
533264-06-27 21:25:11.333 1957 1980 D Magisk : resetprop: getprop [ro.secure]: [1]
533343-06-27 21:25:11.333 1957 1980 D Magisk : resetprop: getprop [ro.build.type]: [userdebug]
[Magisk] f30R:
Having some trouble with the granted privileges not sticking. After every reboot I have to grant access to all apps again, even when selecting 'forever'.

Have seen different solutions throughout the thread, but I cant seem to get it to work. The /data partition is formatted as ext4. I've got no adoptive storage connected.

Have uninstalled using the uninstaller script, then rerooted but with the same outcome as above.

I tried hiding the root for the Vudu movies app, but I later deleted Vudu, but I can see in the debug log that Magisk is still applying the hide for the app, could this be causing problems?

There is also some lines referring to tables not being found in the database. Is this were Magisk saves the info about the granted apps?

sqlite3_exec: no such table: strings

sqlite3_exec: no such table: settings

sqlite3_exec: no such table: policies

Log should be attached in the post.

Nvidia Shield TV 2015 (16gb)

Shield OS version 6.3.0 (Nougat)

Magisk 16.0 also tried 16.4

Data partition formatted as ext4

No adoptive storage connected
[Magisk] mobileman88:
seems like the local sqlite db for Magisk is corrupted. Have you tried the following :

- Remove Magisk Manager

- Reinstall it

- Test if it works

- IF not, remove Magisk Manager again

- Go to recovery and remove magisk with the MAgisk uninstaller.

- Reinstall Magisk
[Magisk] f30R:
Thanks for the feedback. Yep tried with the uninstaller in TWRP, flashed stock boot.img and re-rooted but I got no further with that. Same problem still present. Will give it another shot when I get off of work.
[Magisk] mobileman88:
Did you remove Magisk manager before going to twrp? The sqlite will not be removed by the Uninstaller I think
[Magisk] f30R:
I did not. That might be it then. Thanks

Edit: That did not work unfortunately. Still getting prompted after each boot.
[Magisk] koxalk:
App force close every time what I should do?

I have nexus 5x stock rom(8.1.0)
[Magisk] SacredDeviL666:
Thread Cleaned & few posts moved to Magisk General Discussion :good:
[Magisk] holden34771:
Hi, just tried v16.4 on a samsung galaxy s8+ with the june G955FXXU2CRED stock rom and no luck. Have attached the log,

Hope this helps. Thanks again for all your hard work and if I can provide any more logs let me know

[Edit] should've mentioned that it fails on patching the boot.img file taken direct from the AP. (Unable to repack boot.img) can this function be run on pc ?
[Magisk] cerebeln:
Google apps crashes on Pixel C tablet since version 8.7.11/13(8.8.15, 8.9.14 also do crash), and it is reproducible in all officially released Android 8.1 versions of the device.

Magisk 16.4 is installed, with only magisk hide and systemless hosts features enabled(no additions were installed).

Google Chrome 67.0.3396.87 was installed(and is made the default webView engine) during the steps, however it does not seem to be related to this issue as the issue also occurs on all previous stable Chrome versions released in recent months.

Logcat shows it may probably be related to insufficient/incorrect SELinux patches during patching the boot image.

reproduce steps:

1>Open the Google apps, (or do the same thing by swiping to the left in the launcher).

2>Then wait for a couple of seconds(usually less than 5 sec).

Every photo of all feeds is not rendered(because the Chrome Webview fails to run)

3>The Google app then crashes.

related information:

This issue also occurred in Pixel phones with Android 8.1 and the same version range of Google apps in previous Magisk versions(from 16.0 to somewhere before 16.4).

related output:

1: There was no magisk's own log output during the whole reproducing steps, so the /data/adb/magisk_debug.log file is not necessary here.(Does the patched Pixel C boot image help detect the possible issue in the patched SELinux rules?)

2: related Logcat output:
[Magisk] halfbytecode:
There is a constant battery drain with Magisk 16.4 on oneplus 5T, running AOSiP 06/17 build with encryption enabled. BetterBatteryStats reports high battery usage by magiskd.

It is at 12%, when the device has 62% charge remaining.

Log: https://file.io/dVWck9
[Magisk] gwiqu:
it just suddenly started force closing?
[Magisk] jenslody:
Did you try to clear data of the manager ?

You will not lose root, magiskhide and systemless hosts settings.
[Magisk] smokeythebear3:
Pixel 2 XL on magisk 16.6 doesn't work for me either. Tried updating through direct install, it rebooted and said my sim card wasn't inserted. When I unlocked my phone, it would reboot. Reinstalled factory image without wiping which allowed me to boot up again. Tried installing the magisk 16.6 zip through twrp and my phone would not fully boot up. Gonna go back to 16.4 until the kinks are worked out.
[Magisk] Benji1983:
Hi topjohnwu

Here on s8+ new magisk manager also fcing the hole time.

Log attached

Greetz benji
[Magisk] xunholyx:
It worked fine for me with direct on P2XL.

Logs?
[Magisk] micgeb:
I am getting errors with 16.6
[Magisk] lahceneamine:
By reading the OP.
[Magisk] BaTarrY:
I just flashed the zip and it did all the work.
[Magisk] shadavis08:
I flashed the Uninstaller and and you have to flash v13 did them at the same time

LG V20 - NATF 5.0 - Magisk 13
[Magisk] Owls:
[MENTION=4470081]topjohnwu[/MENTION] - b3da28e - pin still broken. Please, add Huawei P9 Lite B380 to unsupported devices so that other users do not suffer like me.
[Magisk] themadba:
Edit: all working, post can be deleted ?
[Magisk] Jenanga:
Very useful information
[Magisk] dari-woka:
With the latest update of magisk, safetynet works (passed).

But on my S7 when i open gmail app, it crashes, also when press in read more in comments of an app in the store.

Rolled back to the 12.0 version and they are working again, but the safetynet does not pass :(

Ps, in magisk 5.0.1 (v12) how can I see Magisk hide? (I saw it in the v13, but it does not appear to me on the v12)

Thanks
[Magisk] TheUndertaker21:
I could not live without Magisk

since we can't have xposed on N or still long way out

Magisk is the best thing that ever happened to android

Thank you [MENTION=4470081]topjohnwu[/MENTION]

9EP26588LP498135K
[Magisk] gothicVI:
May I ask how exactly sn detects xposed? Because according to your statement

sn is not running in root mode so why can't we simply hide xposed the way you hide root/magisk? Especially in a systemless installation I'd expect this to be doable.

I might miss something obvious, thus I'd like some clarification.

Thanks ahead and thanks for your great work!

Gesendet von meinem Moto G 2014 LTE mit Tapatalk
[Magisk] Timmmmaaahh!:
I guess you mean without then :D
[Magisk] malbert16442:
Does the new magisk installer work on lz4 compressed kernels? Magisk 12 it works well. It also works perfectly on other kernels with other compression modes. Im sorry I can't get log right now because its suck on boot splash and adb is acting funny. My device is s5 g900t. Also there is no log in /data/magisk_debug.log for me to post debug.
[Magisk] will5:
Changing to core only mode allow safetynet check to go green on my device (note 4). But still netflix and mario run doesnt show on play store and mario run gives safety check error at start.

So, a green on safety could not be 100% safe?
[Magisk] NxtGenCowboy:
I'm not in core mode on v13 (usb debug off) and I pass the SafetyNet; haven't tested Android Pay yet tho
[Magisk] Setialpha:
It's not required to be in core mode, but to disable Modules (which core mode does).
[Magisk] NxtGenCowboy:
Ah ya, I don't use any modules.
[Magisk] Setialpha:
That's not fully true, SuHide is closed source and was blocked by a security update (not a SafetyNet update). They need to figure out in real life, which is harder than just reading code, 'cause they need to prevent false positives, the last MagiskHide update because of SafetyNet update is 'ages' old.
[Magisk] ZeOnEscofet:
broken? i'am on B380 and works fine...

You talk about turn on magisk hide and restart phone gets error pin? or what?
[Magisk] Owls:
After flashing any v13 magisk - i can't unlock device, pin not accepted.

I can delete /data/system/locksettings* files from TWRP, but after that setting new pin not working - settings app just restarting.

So, if no pin - no fingerprint, no Android Pay, etc...

Remove magisk - pin working.
[Magisk] Ubimo:
Latest beta (b3da28e) is working on Samsung Galaxy S7 edge with SuperMan ROM 2.5 and SuperStock-kernel, but there are very many repetitive entries in magisk error log, see attachment.

(25kb is relative big for a log file)
[Magisk] skanadian:
It seems placing items in /cache/magisk_mount/... doesn't trigger safety net. Is there a way to leverage modules from this entry point?
[Magisk] Didgeridoohan:
PSA - Don't forget to post logs

New and shiny beta has been released. Yay!

Don't forget to post logs if you're experiencing issues.

Take a look in the OP for tips if you don't know which logs are useful.

And more tips can be found here:

https://www.didgeridoohan.com/magisk/MagiskHelp
[Magisk] exodius48:
OP said if facing any bug we need upload /cache/magisk.log. But on my device there is no /cache partition, how to upload log?
[Magisk] Didgeridoohan:
Is there a log displayed in the Magisk Manager? If so, save and upload that...
[Magisk] turboencab:
Just updated a Pixel 2XL without TWRP, via Magisk Manager (patching and manually flashing patched_boot.img). Experiencing very strange behavior. Widgets don't ever seem to load. Within 20 to 30 seconds of a reboot I am bombarded with app crashing messages. I DO have root however, have not tried safety net.

I've used this method for all Magisk updates as well as flashing Google patches for at least 6 months with no issues. No idea what's going on.

Edit: If I flash the original boot.img widgets load as expected and have no app crashing messages.
[Magisk] exodius48:
Yes, there is.

OK
[Magisk] jcmm11:
One change in 16.6 drove me slightly batty until I figured out what was going on.

I have some scripts that run in service.d that use commands that are installed via modules. The commands are found in /system/bin or xbin.

With 16.6 these were failing with 'command not found'. At first I thought it was a timing issue and that they just hadn't been mounted yet. Turns out that the PATH used in service.d has been changed

Magisk version=16.6:MAGISK (1662)
PATH=/sbin/.core/busybox:/sbin:/sbin/.core/mirror/system/bin:/sbin/.core/mirror/system/xbin:/sbin/.core/mirror/vendor/bin
Magisk version=16.4:MAGISK (1642)
PATH=/sbin/.core/busybox:/sbin:/system/sbin:/system/bin:/system/xbin:/vendor/bin:/vendor/xbin

Note that /system/bin, /system/xbin, and /vendor/bin have all been replaced with their counterparts in /sbin/.core/mirror

The mirror does NOT include anything mounted via a module.

That means that in order to get the scripts working again either the PATH needs to be modified or you need to hard code the command location (which won't work if that command is looking for another command also provided by a module eg: wg-quick (WireGuard) calls wg).

So I got things working again, but figured this might be useful if somebody else runs across the same issue.
[Magisk] nadeemakhtar1994:
Safety net failing on the latest version.

Using OnePlus 3t open beta
[Magisk] Jaymin.0.1910:
This issue might prove serious to the developer community, since many modules use Magic Mount to add executables.

[MENTION=4470081]topjohnwu[/MENTION], should this be not reverted??

EDIT: May I suggest adding path to system mirror and vendor mirror to the environment to allow not hardcoding scripts.
[Magisk] Spadizzle:
System Error

Oneplus 6: Went from OOS 5.1.6 to 5.1.8. Did a full "dirty" Flash to 5.1.8. Rebooted, no errors but of course lost root. So I went to fastboot and forgot that I couldn't transfer because TWRP doesn't have MTP yet. So booted up and no errors happened. Transferred the 16.6 Magisk over and went to fastboot, booted Twrp and installed Magisk 16.6. Upon reboot where you enter Password, "Android prompted and stated their was an internal error on my device and that I should contact my manufacture". However everything appears to be working fine. Ill upload the Magisk log and anything else if ya'll believe this is related to Magisk which I think it is at the moment. Thank you.

They error is related to installing 14.6. I booted into twrp 3.2.2 for OP6 and reflashed full OOS 5.1.8 zip, wiped cache and booted. No errors. Once more booted into twrp and installed magisk 14.6 and the got the error prompt at password entry.

Edit: [MENTION=5554684]Darke5tShad0w[/MENTION] , I ended clearing onedrive's data/cache and all those silly errors went away and then placed Magisk into core mode and now the log is simpler, unfortunably the error is still their though. :(
[Magisk] Darke5tShad0w:
Alot of Microsoft onedrive errors in that log but I am in no way an expert log reader.