yashsingh1/xdaforums huggingface dataset:
[Magisk] mrspeccy:
Banking app talks to magiskd daemon to detect root

Hi,

as mentioned in my post https://xdaforums.com/showthread.php?p=78422592#post78422592 further above, the app https://play.google.com/store/apps/details?id=dk.bec.android.mb1.b00032.prod&hl=da detects root despite being hidden in Hide Magisk and having hidden Manager. An analysis that incrementally removed Magisk overlays and processes revealed that the app would work when the /sbin overlay was unmounted and magiskd was frozen via kill -STOP. My suspicion that the app talks to Magisk via sockets seems to be correct. More precisely, it tries to test the random socket names created by Magisk and eventually iterates over magiskd in this way. The commands send via the corresponding socket break the hiding. The fix is simple: in the native -> jni -> include subdirectory, I edited the file daemon.h and changed the snippet

enum {
DO_NOTHING = 0,
SUPERUSER,
CHECK_VERSION,
CHECK_VERSION_CODE,
POST_FS_DATA,
LATE_START,
BOOT_COMPLETE,
MAGISKHIDE,
HIDE_CONNECT,
HANDSHAKE,
SQLITE_CMD,
};

that defines the codes of the commands that can be sent to magiskd. Changing the starting value from 0 to, say, 42 changes the codes of all commands and then magiskd won't react to the random socket poking done by the banking app any more. :) I already have installed a build of Magisk implementing this feature and can use the app again.

As other people further above reported problems with hiding banking apps from root, it might be worthwhile integrating such a protection against socket poking into magiskd. Maybe by encrypting the communication protocol used by magiskd a bit.
[Magisk] ekowwillis:
[MENTION=4470081]topjohnwu[/MENTION] So I tried what [MENTION=8126387]martyfender[/MENTION] suggested:

1. Clean flash of factory image

(I put the phone to test if it will charge and YES it charged in the off state)

2. FASTBOOT BOOT trwp.img

3. Flash Magisk v18.0 and booted up

The issue returned. Now the phone is stuck on the change screen like the picture attached. :rolleyes:
[Magisk] Didgeridoohan:
[MENTION=7934452]mrspeccy[/MENTION] Great find! I've passed the info on to [MENTION=4470081]topjohnwu[/MENTION], so that it doesn't get lost in the noise.

Did you try unpacking the image from lz4 prior to patching?

---------- Post added at 14:26 ---------- Previous post was at 14:23 ----------

It's likely the same thing that OP6/6T users are experiencing. If so, there's no current fix...
[Magisk] bafforosso:
Please try

everything

here and then report back : https://didgeridoohan.com/magisk/MagiskHide#hn_Hiding_root_from_apps
[Magisk] LinoX:
unpacking .imz.lz4 to .img before patching works.
[Magisk] Bulbulz:
First i install TWRP from fastboot and i use .img file then i flash magisk on TWRP and same always loop on TWRP.

BTW my device use stock firmware.
[Magisk] jenslody:
John recommends not to install TWRP on a/b-devices, but fastboot into it!

That's possible without flashing it.
[Magisk] Didgeridoohan:
So there's no issue...
[Magisk] kryshnakishore:
Thanks alot I thought of removing root & use stock os. For a last try I commented here. You made my day, it's working I followed certain steps from the link.
[Magisk] Bulbulz:
So i must flash stock firmware and fastboot to TWRP?

In my case any other way to install magisk without flash stock firmware?
[Magisk] jenslody:
Flash stock recovery, how to do that depends on your device.
[Magisk] Goobly:
Moto G1 Falcon kernel older than 3.8 Not passing safety net

I'm in need of help. I either need a different kernel, or to rename stuff but as it's my first time doing all this I'm moving slowly and having troubles. Will anyone help?
[Magisk] Pkt_Lnt:
Have you tried all the Safetynet items in the Magisk Troubleshooting Guide?
[Magisk] Homeboy76:
:rolleyes:
[Magisk] Pkt_Lnt:
It is the subject of his message:
[Magisk] Homeboy76:
Ok, I saw the above post then your response.

I thought you had a Crystal ball lol
[Magisk] ktmom:
If this thread accurately describes which TWRP you used and how you installed it (specifically fastboot flash recovery ), then you do not need to remove the recovery.

Your device is NOT an A/B slot device. Instead it had its own recovery partition. Therefore, the installation of TWRP does NOT affect the installation of Magisk.

If the above is true -----

It's not clear what state your device is in. This is what I suggest;

1a) If you are running a stock firmware, restore the stock boot.img through fastboot.

-or-

1b) If you are running a custom ROM, dirty flash the custom ROM through TWRP (wipe only cache and dalvik).

-or-

1c) Restore the TWRP nandroid you made before making changes like flashing root.

2) Make sure to wipe cache and dalvik before booting

3) Boot the device and make sure it works correctly.

4) Reboot to recovery and make a nandroid backup so it's easier to recover from future problems.

5) Flash Magisk again.

6) Before attempting to reboot, save the TWRP log by going to the main menu -> advanced -> Copy Log

7) Reboot

If you continue to have problems with Magisk V18, restore the nandroid you made and try V17.3 instead. Make sure to post the TWRP and Magisk logs here if V18 gives you trouble.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Magisk] Goobly:
Can't quote/post links I'm too new here

I know what I need to do I just need help. I'm not passing safetynet check magisk can't hide because my kernal does not support namespace mount.

My kernel is 3.4.42 I need 3.8 or newer, or at least one that supports the name space mount. I've also found this (link to a way to patch allowing namespace mount) though I'm not sure if it applies to my phone

The phone in question is a Moto G1 2013 Falcon
[Magisk] Pkt_Lnt:
Search or ask for help in your device forums on XDA is quickest way to get help.
[Magisk] Goobly:
Alright, sorry! I'm new to all this.
[Magisk] angelillom:
When trying to backup with TWRP when I was 48% I failed and it put me

"createtarfork () process ended with error 255"

Please help, I do not know how to update the OTA in my ANE-LX1 because otherwise I would lose the Root Magisk 18.0 or maybe it would be worse and it would ruin the system, and now that I try to cover my back I get this error

---------- Post added at 02:12 AM ---------- Previous post was at 02:11 AM ----------

When trying to backup with TWRP when I was 48% I failed and it put me

"createtarfork () process ended with error 255"

Please help, I do not know how to update the OTA in my ANE-LX1 because otherwise I would lose the Root Magisk 18.0 or maybe it would be worse and it would ruin the system, and now that I try to cover my back I get this error
[Magisk] Bulbulz:
My condition 1a running on stock firmware.

I want ask about stock boot.img, when i flash 'magisk_uninstaller' it can revert to stock boot.img? Or i need download stock boot.img again?
[Magisk] DaCoolX:
Can confirm that SafetyNet(SN) will not pass after the first reboot after Magisk was installed. (Recovery > System > System) Sometimes it fixes and breaks itself again randomly but every Reboot means guranteed failure at SN. I attached a zip with the recovery logs and the Magisk logs of both System boots, the only difference I can see is this line:

12-20 05:13:51.349 722 754 I Magisk : proc_monitor: com.google.android.gms/.droidguard.DroidGuardService PID=[4254] ns=[4026534087]

And the notable line of the safetynet test app which just tells

Response signature validation : fail (Response payload validation failed)

The only possible workaround I see is re-installing it everytime I (re)boot, thankfully I am not reliant on root right now, but if I would, I would need stealth root because of auth and banking apps.

Other details:

This is a fairly recent Lineage OS for the Mi Mix 2 with a very recent kernel which passes SN with flying colors if not rooted.

I noticed in the first system boot after installing Magisk that SN actually sticks and keeps passing even if I turn Magisk Hide off, which is weird...

If I can help somehow else, please do tell.
[Magisk] Pkt_Lnt:
No worries, you are doing really well with analyzing what you need. I'm just trying to point you toward a better place to find what you need. Cheers. :good:
[Magisk] Didgeridoohan:
That's not actually a Magisk issue. If you simply do a web search for the error you'll find lots of information. Best practice would be to look at the recovery log to see if the backup is failing because of a broken file (delete it), if there file system can't handle the file size (change location for the backup), etc.

But, this isn't the place to get help with TWRP...

That response means that your device can't verify that you're in contact with Google's servers, for whatever reason. We actually have no idea if your device is passing SafetyNet or not.

I've gathered some known solutions here, but it's by no means a complete list for this particular problem (never been able to investigate it much myself):

https://www.didgeridoohan.com/magisk/MagiskHide#hn_The_response_is_invalid

One thing you can do is to switch to the Canary debug build and provide some proper Magisk logs (release build logs are way too sparse)...
[Magisk] LinoX:
there is no blocking issue. As far as the app is said to work and accept .lz4 images it must properly work with them. it's a low-priority issue...but still....
[Magisk] Didgeridoohan:
I'm not aware of any statement that says that it's possible to patch a lz4 compressed boot image file with the Manager (did I miss something?). The magiskboot tool can handle lz4 ramdisk compression, but I do believe that's something different...
[Magisk] ashyx:
But why can't it handle lz4? It's no biggie is it really? I would have thought this would have been implemented by now, seeing as every recent Samsung device and some other manufacturer devices come with lz4 compressed images.
[Magisk] Yeyo117:
Unable to check signature

I have a Mediacom Smartpad i10 3g, since there aren't custom recoveries for this devices to install Magisk i had to root it, the only way i found was through King

o

Root, but at every reboot the root permissions are no longer avaible and they can't be restored for some reasons; so you have to reflash the device completely via Rockchip factory tool. Before the last release of Magisk Manager (6.1.0) after the root procedure the app crashed; now with the new version (6.1.0) I am able to open the app, grant the root permission and start the installation. This is what i get:

- Detecting target image

-Target image:

-Device platform: x86

-Existing zip found (I tried several versions, also canary)

-Extracting files

! Unable to check signature

! Installation failed

The app's log is empty.

What i can do?

Thanks.
[Magisk] ktmom:
That depends on whether what is backed up is actually an unmodified boot.img. Multiple times flashing root could cause that image to be something other than stock. That is why I said it's unknown what state your device is in.

Certainly try it, and then wipe cache and dalvik before booting. If you continue to have problems, go back to fastboot flashing the original stock boot.img.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Magisk] Didgeridoohan:
That's an area I know nothing about, so I can't answer that... Have posed the query to [MENTION=4470081]topjohnwu[/MENTION] though (who is currenly likely trying to recuperate after his finals).

---------- Post added at 12:12 ---------- Previous post was at 12:09 ----------

If you do not have a custom recovery, the way to install Magisk is to let it patch a stock boot image for your device and then you can flash that boot image manually. See the release thread for more details.
[Magisk] Yeyo117:
I know that I can use this method, but the direct installation is faster, and I could not get enough information on how to dump the boot image. I also believe that this tablet does not accept certain procedures. I'll try.

Thanks.
[Magisk] Didgeridoohan:
Direct install is for if you're already rooted

with Magisk

...
[Magisk] Yeyo117:
I didn't know about this, is strange that Magisk can detect that it is not installed on the system but it does not warn you that direct installation works only if you have magisk already installed. I would never have suspected it. Seems that I have to use the boot image patch. Do you know how to dump the boot partition?

Thanks.
[Magisk] jcmm11:
https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post78457252
[Magisk] Bulbulz:
I attach info my device.

Can you explain to me about firmware to download..

Thx before sir..

You great man.

Btw i was try to flash magisk17 but still same looping on TWRP :(
[Magisk] ktmom:
I suggest you search for "Xiaomi Mi Mix 2S return to stock" or all in your device forum Q/A thread. This is outside the scope of the Magisk support thread.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Magisk] martyfender:
The catch 22 is that you need root access to dump the boot.img. I am in the same boat with a Smartab ST7150, Android 7.1.2, also with a rockchip, with no known stock firmware image, so it has set idle for months.

I have never used the Rockchip flash tool, but I wonder if it has the ability to pull the boot.img, or can it be used only if you have a firmware image available?
[Magisk] tyler19820201:
I was updating today Magisk to v18.0 because my updated Santander UK app does not work as well...:mad:

Unfortunatelly the new app does not work with the latest Magisk. If i uninstall magisk, clean wipe & chache then restart the phone then need to uninstall the banking app completely. The best if you have some app wich removes the remain files also... Then restart again and install Santander and register the device with it.

Then restart to TWRP and install the latest NOT BETA Magisk ( 18.0 at the moment). After booting your phone DO NOT OPEN the banking app!! Just open magisk hide and thick the Santander app. Then restart again the phone.

Now you can use the banking app.

This method was working....until now.

I have OP3T A3003 Lineage OS 15.1 Android 8.1 with Magisk v18.0. The following LATEST banking apps has been tested at 20th December 2018:

Santander UK: Fail

Natwest: OK

LLoyds: OK

HSBC UK: OK

Halifax: OK

Barclays: Fail (the app does not even launch even if Magisk not installed i think that is LOS compatibility problem, however the older version of the app was working well with Magisk 17.0 and 16.0 also)

Hope this info was helpfull
[Magisk] Zile995:
Hi everyone,

I have one problem. Magisk v18.0 kills Interaction boost (1.6GHz boost) on LOS15.1 after the second boot.

On first boot, after 5-10 minutes, device becomes laggy and it freezes. After reboot everything works normal, but without boost.

Also the phone freezes on first boot with LOS14.1/LOS15.1/LOS16.0 ROMs.

Notice, I did a clean install each time. Has anyone noticed anything similar?

Device: Redmi Note 4X (mido)

Gapps: Not installed

Kernel: Stock

Magisk: Magisk-v18.0(18000).zip

Modules: Not installed

Full wipe: Yes (dalvik cache, cache, data, system, vendor)

Last_kmsg, recovery log, Magisk log and logcat in attachement.

Edit:

I just saw it... Interaction boost is killed by LOS https://review.lineageos.org/c/LineageOS/android_hardware_qcom_power/+/235178

I'm sorry about that.

But why device hangs after the first boot? I did not monitor the current frequency. I thought the interaction boost was turned on, but probably the CPU was running at the max frequency after the first boot .
[Magisk] Zedoki:
Hello,

After using magisk hide, new installed apps that need root access can not prompt me the permission window. So I can not grant them root permission.

Older apps whose already had root permissions are fine though.

Magisk manager write this following logs :

su: cannot find manager

I did a quick research, but only found a workaround for v17.

Is there any proper way to make it work?

Keeping magisk hide of course. Maybe I'm missing something. :confused:
[Magisk] guest4711:
Did you reboot after hiding Magisk Manager?
[Magisk] The Analog Kid:
How exactly we should "migrate to the new paths" according to this (attachment)? I was about to install v18 via new Magisk manager, but I decided to abort since this is telling me that updating to Magisk v18 is not a fully automated process and such "migration" must be manually done. Has anyone already performed this "migration" to the new paths?... Or this is just a suggestion meant for module developers, maybe?
[Magisk] Luniz2k1:
That is for the creators of the modules.
[Magisk] martyfender:
I think he is primarily speaking to module developers about migrating paths.

If in doubt, flash the Magisk uninstaller and flash a stock boot.img, before flashing the Magisk.zip
[Magisk] The Analog Kid:
?... So, are you suggesting not to install v18 update via Magisk manager as suggested by topjohnwu?
[Magisk] martyfender:
The most dependable way for me has been to flash it through TWRP, if it is available for your device. I am not the only one who has had trouble with the direct install method in the Magisk Manager. If TWRP is not available for your device, the next best method is to use the patched, stock boot.img method.

On some devices, the direct install always works. You can try it and see. When it failed for me, I had to reflash a stock boot.img, because it was corrupted and would only boot to bootloader mode with an error.

https://xdaforums.com/z2-play/development/twrp-3-1-1-0-moto-g5-plus-albus-t3622593

Some users that have had trouble updating the v18 have had success by flashing the Magisk uninstaller, flashing a stock boot.img, followed by flashing the Magisk.zip
[Magisk] The Analog Kid:
Yes I have this https://xdaforums.com/z2-play/development/twrp-3-2-0-0-moto-z2-play-albus-t3715660 can't see myself into all this thing root without custom recovery, but I'll try the manager install first and see...
[Magisk] The Analog Kid:
Just extracted boot.img but sha-1 verification does not coincide with file name string; at least, that's what ES file explorer says. Possibly got corrupted at some point? I'm assuming it's not usable...
[Magisk] The Analog Kid:
Actually, this "systemless hosts" as a module change (toggle gone in attached image) came with Magisk manager 6.1.0, regardless of Magisk version installed, as I can see. As a side comment, I'm on v17.1/Mm 6.1.0 but still reluctant to update v18 yet, due to the high rate of failure I'm reading about...
[Magisk] Mrpookie:
Works great on my RR Oreo quark. Magisk seems to bug out on occasion and slow system but on newest (v18) build haven't had any issues
[Magisk] Bulbulz:
Done revert to stock rom.

Now i will flash TWRP, backup device, and then i will flash magisk18? What do you think?
[Magisk] jcmm11:
Try extracting it again, maybe using a different app to extract. If they don't match I would assume something got corrupted and wouldn't try to use it.

I've never seen this happen before. I've seen corrupted archives, just not in this situation.

Both zarchiver and rar can test the archive.
[Magisk] Oswald Boelcke:
Have you ever considered to use MiXplorer by @HootanParsa instead of ES file explorer?
[Magisk] martyfender:
On one of my devices with Mixplorer and it's archive addon, I unarchived the backed up boot.img and the hash matches for me.

I agree, try something other than ES. Many here on xda now refuse to use ES any longer, because of bloat and phoning home, etc.
[Magisk] jcmm11:
Every time I've checked my backup hashes have matched.

This is getting off topic for this thread, but whatever. I was going to mention that. There are multiple better options out there. ES was great once upon a time. They then took formerly free add-ons and made them paid+added massive ads. I honestly can't believe how many people still use ES. It built up massive great reviews and it's still riding them, which is why it shows up as the first choice in the play store.

Alternatives, not a complete list, in no particular order, some free, some paid. All great.

Mixplorer (my current primary, find it on XDA)

X-plore

Solid

FX

Total Commander

Ghost Commander
[Magisk] RandomPooka:
+1 each for Solid and Total Commander
[Magisk] ktmom:
That is the way I would do it. Assuming of course that the device is currently booting properly [emoji6]

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Magisk] The Analog Kid:
I've tried "Androzip" first (which failed extracting) then used "RAR" and it extracted kinda beautifully in two manual steps: first .zip, then .gz... Verified sha-1 with ES pro and "Checksum" app: both failed (now I know) BUT... but, I failed myself in verifying sha-1 with "RAR" as well ?. It says file is OK. I wonder why other apps fail to extract, nor correctly verify file integrity... Whatever, thanks for pointing out!
[Magisk] The Analog Kid:
[MENTION=4487388]jcmm11[/MENTION] wait!... That verification is for the whole .gz.zip file!... actual boot.img file verification isn't coincident...
[Magisk] jcmm11:
What version of Magisk was that backup taken with? The hash is supposed to match the extracted file, at least in all version since I started using it (16x ?)

I don't know if older versions just hashed the actual gzipped file.
[Magisk] The Analog Kid:
Yes, I've tried Mixplorer for sometime indeed, and even though it looks better and works fine I wasn't able to get used to it. Too many years on ES Pro, I guess. But I must tell that it never ever failed to me before. Probably it's me trying to verify boot.img against gz.zip sha-1...
[Magisk] The Analog Kid:
V17.1 is the first one and only I ever used...
[Magisk] Demonday123:
Can someone diagnose my log? I don't know why my magisk keep SU request rejected. Before this, I installed v17.3 and it work on my phone then the root cant detect after I updated to 18.0. Someone help. Thank you.
[Magisk] The Analog Kid:
Nevermind. I guess the file is really corrupted. I've tried MIXplorer to extract as suggested and it fails as much as ES Pro. Checksum is also different (but it throws the same string as all others) Although I've learned "RAR" is actually the most powerful unzipper app...
[Magisk] arshia.sunboy:
Hi.I have xiaomi mi 8 global version.In some countries like IRAN phone dont switch to 4g+ mode because the phone support 4g+ in

some countries.phone unable to find band 3 and 5 of 4g+ together in our countries I think.

dear magisk dev,Is there way to fix this with magisk module?
[Magisk] jonginator:
Anyone randomly failing SafetyNet for Pixel 3 with Magisk v18.0?

Reboot fixes it but it is very annoying.
[Magisk] pol-der:
Hi All,

I was using XPosed Framework as standalone. I could modify permissions via Privacy Guard (LOS). I uninstalled Xposed Framework and modules, rebooted. This time i installed Xposed Framework with Magisk Manager. I realized i can't modify permissions of the modules. When i check from Settings->Apps->Permissions or Privacy Guard, i saw "No permission requested" notification.

Is this normal? If yes, what happened to permissions?

If no, how can i fix this?

Thanks in advance.
[Magisk] aa.mgt:
M on resurrection remix 5.8.4 pre rooted with magisk 13.6 works fine but with less modules when I try to update it, it won't even when I try to reinstall a new version I face app keep stopped.