yashsingh1/xdaforums huggingface dataset:
[Magisk] CallMeJohann:
Repacking MM breaks SafetyNet check: nosy questions

I know, repacking MM breaks the SafetyNet check. It's really ok, that's not a problem (referring to the following, just use another app to check):

Cannot check SafetyNet
Don't be alarmed if you get a message when trying to check SafetyNet in the Magisk Manager, stating that it's not possible on a repackaged Manager. It's perfectly normal and is just a side effect of hiding the Magisk Manager (see "Hiding the Magisk Manager"). Nothing is wrong...

If you need to check SafetyNet, use another app, like SafetyNet Playground. Do not use SafetyNet Test by Free Android Tools. That app is broken and will give a false failure.

* Credits and many thanks to didgeridoohan.com

But I'm very interested in the (main) cause of this, and maybe a solution. Can anybody explain me, why this happens? Could something like Titanium Backup's 'Attach to Google Play' get rid of it? Don't get me wrong, I can very good live without it (there are simple workarounds to check, like SafetyNet Playground). But I'm always very nosy on things like that and want to understand as much as possible :angel:
[Magisk] reinaldistic:
Logcat attached
[Magisk] Pkt_Lnt:
There are many errors (E/) in that log, most related to no Internet connection. Magisk needs an Internet connection. Are you trying to work offline?

(3736): got error: code - NO_INTERNET description - code=NO_INTERNET
(3736): no device authentication token: no REM

Log errors here in HIDE tag.

07-23 18:28:50.056 E/ (3736): got error: code - NO_INTERNET description - code=NO_INTERNET

07-23 18:28:50.056 E/ (3736): msg=null

07-23 18:28:50.056 E/ (3736): cause=null

07-23 18:28:50.056 E/ (3736): stack=

07-23 18:28:50.056 E/ (3736): com.tmobile.tmoid.sdk.impl.rest.exception.NoNetworkException

07-23 18:28:50.056 E/ (3736):

07-23 18:28:50.056 E/ (3736): com.tmobile.tmoid.sdk.impl.rest.exception.NoNetworkException

07-23 18:28:50.070 E/ (3736): Unable to interpret message: unable to fetch Ldat

07-23 18:28:50.071 E/ (3736): got error: code - UNKNOWN description - code=UNKNOWN

07-23 18:28:50.071 E/ (3736): msg=unable to fetch Ldat

07-23 18:28:50.071 E/ (3736): cause=null

07-23 18:28:50.071 E/ (3736): stack=

07-23 18:28:50.071 E/ (3736): com.tmobile.tmoid.sdk.AgentException: unable to fetch Ldat

07-23 18:28:50.071 E/ (3736):

07-23 18:28:50.071 E/ (3736): com.tmobile.tmoid.sdk.AgentException: unable to fetch Ldat

07-23 18:28:50.073 E/ (3736): com.tmobile.diagnostics.issueassist.base.exception.TermsDeclinedException: user declined diagnostics, the app shouldn't collect reports

07-23 18:28:50.073 E/ (3736):	at com.tmobile.diagnostics.issueassist.coverage.CoverageReportGenerator.checkReportsAllowance(CoverageReportGenerator.java:63)

07-23 18:28:50.073 E/ (3736):	at com.tmobile.diagnostics.issueassist.coverage.CoverageReportGenerator.generateReport(CoverageReportGenerator.java:45)

07-23 18:28:50.073 E/ (3736):	at com.tmobile.diagnostics.issueassist.coverage.CoverageDataCollector$GenerateReportTaskWithoutSessionID.generateReport(CoverageDataCollector.java:160)

07-23 18:28:50.073 E/ (3736):	at com.tmobile.diagnostics.issueassist.coverage.CoverageDataCollector$GenerateReportTask.run(CoverageDataCollector.java:139)

07-23 18:28:50.073 E/ (3736):	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)

07-23 18:28:50.073 E/ (3736):	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)

07-23 18:28:50.073 E/ (3736):	at java.lang.Thread.run(Thread.java:764)

07-23 18:28:50.074 E/ (3736): Couldn't generate coverage report

07-23 18:28:50.087 E/vendor.qti.bluetooth@1.0-wake_lock(981): Release wakelock is released

07-23 18:28:50.115 E/ (3736): no device authentication token: no REM
[Magisk] reinaldistic:
No, but I do have adaway working, do you think that'll affect it? My internet works fine otherwise... Why does magisk need internet to show me a list of apps to hide root from though?
[Magisk] Pkt_Lnt:
Adaway could be blocking access to authentication sites as seen in the log. I have just read others having no hide list with no net connection. Maybe someone much more knowledgeable with Magisk can answer that(?)
[Magisk] reinaldistic:
I disabled adaway and still nothing
[Magisk] wes'side:
Then what's the use of the safety net, I seem to be able to accomplish everything that the safety net says otherwise, it's not like it prevents magisk from running or even running properly at all, running both magisk an exposed also seems to be the saftynets problem not the user, not Google play store or services , so the hype with saftynets passing or not is pointless, if it had some benifit that made something work better or correctly then I can see use for. It but as it is its only taking up mild space an time to write in the app. But if magisk came up with a MODULE than can bypass all that to pass saftynets, boom, yer set. Or even vice-versa xposed comes up with a module that works around magisk an it's mods than again yer set. But in the mean time I'm working on how to hide them from each other with either of them detecting each other, I use dotmod to hide quite a few thing from certain thing in order for then to open an work being that somethings prevent other things from doing there job. What I'm trying to accomplish is balancing the device from somthing stopping or saying errors with other reasons, the other main problem is that the amount mods an apps running at once, to many bootloops to figure out it wasn't magisk nor xposed causing the problem which had me pacing back an forth between starting again from scratch and let me tell you its not the apps, it's the low memory killer issue that has been mistranslating my accomplishment once I get everything set up an complete, then comes the restart for no reason, back to back restarts that made me feel an app was a fault so I hid it, didn't do the trick for the bootloops, so I wised up an went to 2 solutions, either of them brought out successful and smooth surfing. The 1st was setting up my low memory killer options to a stable environment. The lower the better the higher the most laggy I saw but out of the 6 options keep the first 2 low, like 12 to 15 low and that's using elementalx kernel. Now the 2nd option will being using script anger an a you'll have to look it up, v6 supercharger and the other goodies it provides because it really does the trick even with my kernel it's holds up to the people who created its use an i have to get on my hands an knees like Wayne an garth from Wayne's world saying we're not worthy we suck. Yes the device is like that an very responsive like advertised.
[Magisk] martyfender:
One the device I am typing from I am on [MENTION=3306843]kantjer[/MENTION] 's unofficial, 20180721 with [MENTION=4470081]topjohnwu[/MENTION]' s latest commits, and I have the hide list when I turn off wifi and I also have adaway installed with the sbc.io/hosts/hosts and also the default adaway ones. For me the hide list shows.
[Magisk] wes'side:
Maybe you wanna give dot'mod module a try using xposed systeless or basic, tinker with its options, using dot mod hide magisk from exposed and vice versa hide xposed from magisk, then in magisk hide it an even hide it under a different allise like it's options provide you with. Use it to hide xposed from magisk modules and hide magisk modules from exposed modules, hide magisk from adaway if it blows your skirt up to be ultra safe, hide magisk an xposed from what ever you may think be culprit to be the cause of effect. I can't tell you the amount of troubleshooting I have been through ?????? to figure out the best solution to balancing a device, trial an error is never ending still but luckily I'm calm an even more fcked when I'll lose my sh¡t so I gotta stay focused which I implore everyone with respect because non of this is easy if it were we'd all be on the same level of accomplishments.

---------- Post added at 02:09 AM ---------- Previous post was at 01:33 AM ----------

I myself am having a hick up that's tickling my frustration with solving. I keep getting my phone to restart more than I think it should on its own, after it restarts it seems to say update installing bt never completes an the phone is on a works fine, more offten than should be happening at all also it wil say vender needs to be corrected with a vender that's not even close to being correct even saying my device is a marlin Google pixle xl, sometime I'll be in the middle of something then my screen at times will go dark an 10 seconds later it come back on at the lockscreen like nothing happened, strange yes but the phone works fine except I don't know if that's the cause for effect of my restarts, mind you this is after I went from 5.7.0-16.0 to 5.8.3- 16.7. Not sure xposed may be the solution you'd think expect I won't install a single exposed mod on it an still have the same problem. I've gone about it many ways in fact, I've installed everything regular app'wise then ad magisk an it's fun. And vice versa. Thinking it may be a regular app doing it, it's not, mind you this is still without exposed an with it so it's not like it's the root cause. And it's not with magisk modules since adding one before the other or not any at all can I or any say it's that fact either. So I can go back to 16.00 an 5.7.0 an be done but that work for me, I've even going up the ladder of installing the magisk updates step by step to make certain of any inconvenience. Oh an flashing any magisk framework threw the module itself doesn't update the module at all even though it says successful. It only works through the recovery mode to set t straight, the other Problem is my settings, I'll set it to dark them, and grant root with notice an no toast showing. When the phone reboots those settings only, go back, as if I never applied them. Other setting changes I make stay selected or unselected not a problem. But the phone is stable an not bootlooping or crashing, that's a plus, yay, but those other problems, if you know something more or new to try, let me know so I'm not using the wrong bait to catch fish, thanks. ?
[Magisk] Nidhin@xda:
Guy's Any solution for this ?

I'm using magisk 16.0 stable on OnePlus 6
[Magisk] DanGLES3:
Use the hide magisk manager option,the app is not searching for root but for root hider apps and magisk is one of them
[Magisk] Nidhin@xda:
Ok i understand that.. now what ?
[Magisk] martyfender:
When you hide the Magisk Manager, the safety net check in MM does not work properly. You need to use a third party app to check safety net status.

---------- Post added at 10:48 PM ---------- Previous post was at 10:41 PM ----------

You may need to delete data and cache in the app because it previously detected Magisk. I believe some have also had to get new authentication codes from the app provider, in some cases. I don't use any banking apps on my tablet so maybe there is more to it than this.

For the Play Store, you also may need to delete the app data and cache in app settings. That will usually fix a device not certified error.
[Magisk] ballzak:
Does Magisk support SELinux "context" switching, as SuperSU does?

If so, how do an an app using a Magisk su shell change the context for the current process?
[Magisk] minilandl:
Does Magisk Support android x86 ROMs like bliss x86 built for windows 10 pcs like bliss x86 https://xdaforums.com/bliss-roms/bliss-roms-development/x86-bliss-x86-pc-s-t3534657 I've found this method which involves replacing files is there an easier way ? https://www.youtube.com/watch?v=zgIeppq2PTA
[Magisk] Didgeridoohan:
Google added some kind of check to the SafetyNet query that causes it to not even get a response if you have a repackaged Manager. No idea what, but there's nothing to do about it...

This is not entirely updated, but is this what you're looking for?

https://github.com/topjohnwu/Magisk/blob/master/docs/tools.md#magiskpolicy
[Magisk] ballzak:
I dunno. To me it seems the magiskpolicy command is only used to (permanently?) modify/patch existing policies/contexts for all processes, e.g the u:r:su:s0.
[Magisk] Didgeridoohan:
Holy stream of consciousness Batman!

[MENTION=9221331]wes'side[/MENTION] That was quite a wall of text. Not easy to read or make any sense of (paragraphs?)... I'm actually a little apprehensive of answering you, in case it triggers another wall of text, but here goes: :p

SafetyNet is simply Googles system to verify if your device is rooted or otherwise tampered with. Some apps make use of it to make sure that your device is "safe", but most apps don't care. Some apps don't use SafetyNet but have their own means of detecting root and tampering.

Now that Google have started to make sure that your device is certified for you to be able to use Gapps, it's become more of an issue though. That's because the ctsProfile part of the SafteyNet check is directly linked to the device status as certified or not. Only certified or whitelisted devices are allowed to use Gapps...

As for your other issues:

I don't understand why you want to hide Magisk and Xposed from each other. There's absolutely nothing to gain from that...

And from your previous posts I gather you're using a Nexus 6P, correct? Your stability issues might come from all the tinkering it seems you've been doing with your device. A complete wipe might be in order. It's hard to tell, and I'm not sure if you're saying that the device is unstable even without Xposed installed, but Xposed could definitely be a source for instability, even without any Xposed modules installed.

The N6P is also famous for its battery issues, and a battery on its last legs can definitely contribute to an unstable device.
[Magisk] seijuro572:
does the stable official version of magisk works on treble oreo roms? or do you need a specific one for it to work?
[Magisk] DanGLES3:
Try the latest beta
[Magisk] cmch:
Cannot mount image!

! /data/adb/magisk_merge.img mount failed...

Failed!

! Installation failed

getting this error
[Magisk] Nidhin@xda:
Still not working..:crying:

I think...it's time to unroot :crying:
[Magisk] tsongming:
Using 16.7 on Leeco Pro 3, X727 without any issue so whatsoever.

---------- Post added at 07:13 PM ---------- Previous post was at 07:08 PM ----------

Do a full clean wipe "Full Wipe"

I am installed it on several phones and there is never an issue when starting from an empty slate.
[Magisk] Didgeridoohan:
I'm going to guess that you either have a Mediatek device (in which case you're probably out of luck), or that you have a Moto device with /data formated to f2fs (in which case you can use this, which currently has an update here).
[Magisk] wes'side:
Yes I was in a hurry that day, my bad, so, xposed isn't the issue period. I've done complete wipes, I've never put exposed on an still I get same issue. The restarts are an issue with magisk, not xposed, I hide it from magisk because I notice a decrease in error messages an Google play store Semmes happier, even more so when I hide from xposed itself, you made it clear in the fact you can't hide xposed from magisk because it triggers a red flag. Well if magisk comes with systeless xposed option in the modules, why aren't you working 9n making it work flawlessly with each other. The fix is making them work as equal, find away to have them run off separate busyboxs. The battery to comment isnt the issue, elementalx is maintaining that., I can be at 2 even one % an the phone doesn't turn off in a hurry, ever. My device is stable for now, with exposed an it's modules I have running, on my nexus 6p on 8.1 firehound 4.6 I flashed gaps nano. at times gets random restarts with or without xposed, but my device has lacked that since certain modules were updated . My Samsung t800 using 7.1 asop with xposed isn't doing that, an I wanted to have the sames apps, to make sure the apps wernt causing my nexus 6p the random shut down, let me know if I can provide. Something for you to look at, or try out. But nonetheless magisk is the root cause of the restarts.
[Magisk] GryphonBR:
I'm on 16.4, and Oreo 8.0

No connectivity issues here at all, except when going to 16.7.1

I'll try grabbing a logcat this weekend then
[Magisk] yochananmarqos:
Those two statements contradict each other.

I highly doubt it. I don't believe I've ever had a random reboot on my 6P. I ran stock with Magisk and ElementalX.

I would suggest using the stock ROM for stability or at least something a bit more reputable like LineageOS. Also lay off on the tweaks. Most are placebo and/or cause more problems than they solve.
[Magisk] ultradj83:
Failed encryption

Dears,

to install Magisk I installed TWRP on SM-A530F/DS and flashed no-verity-opt-encrypt-6.0 and formatted data to let the phone boot.

Well, I'd like to re-encrypt the phone like I've always been doing on sammys after TWRP or Magisk installation, but it doesn't work on this phone.

No matter if it's Nougat or Oreo, applying encryption nothing happens and phone crashes backing to lock screen in a minute.

Any suggestions?

Thanks everybody.
[Magisk] Biges:
OK, I tried, I really tried looking and searching etc, but please can somebody explain what these two options actually mean? And ahwt they are good for? :)

Preserve force encryption

Preserve AVB 2.0/dm-verity

Thanks a lot in advance :)
[Magisk] cmch:
redmi 3s qualcomm snapdragon 435 or smthing

sorry i havnt mentioned my phone earlier

can u help me again modules gets flashed in twrp recovery but not in systemless mode i want systemless-ly approach
[Magisk] Didgeridoohan:
Could be a ROM thing, a kernel thing, etc, etc. https://www.didgeridoohan.com/magisk/MagiskModuleIssues#hn_Cant_install_modules

Please provide the module installation log from when you experience the error, the Magisk log, and a recovery log when you do a successful installation.

Magisk modules flashed through TWRP will also be systemless...
[Magisk] wes'side:
My random boots come from the magisk side, until I add modules, mind you I won't add a single app other than magisk, no xposed, just magisk and the random restarts occurs if say I downloaded something, next time I'll be installing something then wham, restart. The stable part I mentioned is it keeps booting up an doing the norm except like a seizure I don't know when to expect them. Make sense, I don't have to tweak my devices to get these issues, I don't just step up to the plate an not know how to bat, cmon, it doesn't happen with supersu, going the same path of except no magisk. No random restarts I don't care if I'm running 15 xposed modules not one bootloop not one random restart. I can stabilize my phone with magisk and xposed an won't get a bootloop from interference on any other device using just stock an the same options applied. Only on the random restarts, with a message at time saying incorrect vender, everything else is OK, my question is why is the device restarting, what's the root cause. Magisk, is beyond words awesome, but I want to figure out the issue to make it balanced,not random restarts, why when I set the option for beta, when it's installed it goes back to stable by itself an also along with the option set to grant, and option set to dark theme. But not any other device I have with the same options applied.
[Magisk] NanYTe:
OK so.... I'm a noob at this stuff and I started doing a lot of stuff.... I installed lineage OS twice and I flased a SU-Addon too cuz the tutorial said to... But everytime I open my magisk manager it stays stuck on the loading screen... But theres a game I play that detects magisk so I'm rooted.... I have a Galaxy S5 (SM-G900T) android version 6.1... I've reset my phone many times and I've also flashed the stock firmware back on just as many times... Anyone know a fix?
[Magisk] yochananmarqos:
Record a logcat when it happens, paste a link to it here and maybe you will.
[Magisk] andrew2432:
I don't think the su add-on is needed? Depending on your lineage version you may need to flash the unsu zip by osm0sis to clear it up prior to magisk.
[Magisk] Saswata Chakraborty:
I did a security scan of Magisk v16.0 apk on VirusTotal and it was reported as PUP.HighConfidence, Trojan ( 0001140e1 ) & Suspicious_GEN.F47V0717 (Result: https://www.virustotal.com/#/file/8...e5e291163d20a728f85bf72872705e58f35/detection)

I downloaded the apk from https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

I was wondering what did [MENTION=4470081]topjohnwu[/MENTION] inject in the apk that it was reported as bad by three scanners.
[Magisk] cmch:
miui v9.5.8.0

magisk module log

with twrp recovery logs of successful installation
[Magisk] jcmm11:
It's a program that deals with rooting phones. Root can be used for malicious purposes. Beyond that see my response in the AdAway thread. 3 out of 60+ is not something to be worried about.
[Magisk] Didgeridoohan:
Like already stated, don't use the LOS su addon. If you want Magisk, just install the Magisk zip after you've installed LOS.

Hm... It looks like there are issues with your Magisk installation, so I'd try to uninstall and reinstall. And I'd also switch to the beta channel, if I were you, to get Magisk v16.7. It has a bunch of fixes over v16.0, and is quite stable.
[Magisk] cmch:
finally i was thinking about beta version?
[Magisk] Didgeridoohan:
I'm moving this conversation to the general thread, as to not clutter up the beta thread any more than necessary.

If you want help you're going to have to be more detailed than that, and also provide logs. I posted you a link earlier, with details about what kind of logs to provide. I'll post it again:

https://www.didgeridoohan.com/magisk/MagiskHelp

What I'd like to see is an installation log of a module that is available in the Magisk repo. Those are the one's you'll find in the Downloads section of the Manager. The Magisk log would also be useful for troubleshooting.
[Magisk] cmch:
beta is working like a charm?
[Magisk] aaz03:
[MENTION=4470081]topjohnwu[/MENTION] can I make a little suggestion to magisk manager that would make it even more convenient? (I loooove the ability to flash modules in-app) could you please implement some flashing queue like in TWRP? Selecting multiple zips in some order and flashing them one after another automatically

Thank you very much for your time :)
[Magisk] eliezerjk90:
This is actually a very good idea!! Hope he will add the features...
[Magisk] NanYTe:
I don't have lineage anymore... and I've tried the unsu zip and it didn't work
[Magisk] DroidJP:
I have a slight issue. I use a backup and restore app. The app does not prompt magisk for root access at all for some reason. Its a shame because this app is the only app that can backup app data and transfer the data to a non rooted device. This app is helium sync and backup.

Is there anything that can be done?

Me thinks this app only works with superSU in mind.

Thanks
[Magisk] jcmm11:
What, exactly, didn't work? And did you flash a stock (unrooted) boot image after running unsu?
[Magisk] Didgeridoohan:
Only thing to do, would be to ask the developer to update their app.

Hm... There's something different about you today. New haircut? :cool:
[Magisk] Abomb:
I installed magisk through flashing zip in twrp (tried v16, v16.6 and v16.7 beta) on my moto x4 (stock boot.img, Android 8.0), installation works but when I reboot to system I get stuck in a bootloop. I installed "mm" module and it shows the installed module, so I guess magisk is installed correctly. I tried looking for a magisk log in /cache but it is empty, and since it does not even get to the "normal" stage of a system boot I also git no adb logs. Really not sure what I'm doing wrong, I checked tutorials/videos (also specifically for my device) and it's rather straight forward, just flash the zip and done. Any help would be appreciated.

Update: I also tried patching the stock boot.img with magisk manager and flashing this, but that also results in a bootloop