yashsingh1/xdaforums huggingface dataset:
[Magisk] myishika:
Dear all.

Need your help.

I am using Verizon Galaxy S7 (Qualcomm)with most probably locked bootloader. I have used engineered boot image for rooting. Now I want to install magisk and then systemless root followed by systemless xposed.

But since there is no custom recovery available for S7 , how do I flash magisk, systemless SuperSU and Xposed on the device ?

Anyone who could help would be greatly appreciated.

Thanks a lot in advance.

Regards

DG
[Magisk] Battery03:
You can give a try with FlashFire
[Magisk] myishika:
Sure..I'll give it a shot..Thank you..

will report the results.
[Magisk] myishika:
Thanks for the suggestion. But it didn't work. Used Magisk installer also after reboot

Ended up with error "Custom binary locked by SECURE IMAGE (boot.img)".

Flashed the engineered boot.img through Odin to restore the phone.

My goal is to flash - Magisk + Systemless Root + Xposed+suhide.

Had it working on HTC M8 but it was bootloader unlocked. New S7 is giving headache....

Any other suggestion that I could follow.

Thanks

DG
[Magisk] Battery03:
Which model is your Samsung? G930...
[Magisk] tykune21:
For some reason everytime I download something from the magick manager V 2.0 it says this is not a magic module anyone know y I'm running stock nougat on Nexus 6p I'm able to go to the thread and download any module and flash it but the magic manager won't do it for me I've uninstalled and reinstalled app and download it more than once anybody knows why please let me know
[Magisk] Rhoban:
It's a known bug. I don't believe there is any fix yet, so you'll just have to wait for an update.
[Magisk] zgfg:
That must be.You installed Magisk v22 and it wrote to the sh file v22. You later only replaced the kernel with v23

I'd suggest to make a Direct update to (the same) v23 -Magisk should correct the sh file

You could also try by editing the sh file yourself - but I'm not sure how safe it is
[Magisk] Philnicolls89:
Thank you, I just tried editing it myself and it seems to be working. I just changed the values at the top from 22 (22000) to 23 (23000).
[Magisk] Didgeridoohan:
That'll work for this particular instance, but you don't know what other parts of the Magisk internals aren't matching. Might be more trouble up ahead...
[Magisk] Philnicolls89:
Is it safe to direct install magisk again over the top of current installation using the magisk app? I only ask because I use a kernel with magisk (v23) prebaked in it so I don't want to stuff anything up.
[Magisk] Didgeridoohan:
Depends entirely on how the kernel was made... Safest way would probably be to ask the kernel developer how to best update.

In theory it shouldn't be an issue though.

Another option would be to just plain up delete the adb directory (safest to do from recovery) and let Magisk recreate it on the next boot. You'll lose any modules or scripts you have installed though. Should also in theory work just fine, but nothing's for sure when modding (Android is just too fractured between the different OEMs).
[Magisk] Uluru25:
Why don't you temporarily flash another kernel without prebaked magisk, then uninstall magisk and then flash again your preferred kernel?
[Magisk] J.Michael:
@Philnicolls89 You talk about replacing a kernel, Magisk being baked into a kernel, etc.

When you say "kernel", do you really mean the kernel program image? Or the kernel and the initrd / initramfs?

I do not know that Magisk actually patches the kernel. I know it tinkers the initrd.

Have you checked to see whether the baked-in Magisk app is showing up as a system app? (Does the app info show a "Disable" button, or an "Uninstall" button?)
[Magisk] Philnicolls89:
The magisk app itself is a user app, I do not know enough about the workings of kernels and initrd etc to answer your other question.

Normally I gain root by patching my ap and twrp files, since I have an s10 I need to use a button combo and boot to recovery partition for root. Since android 11 you need to connect your phone via cable to do this so it's inconvenient.

I think the kernel just has magisk built in, not patched or anything. As now I use a non patched twrp file and am able to boot to system partition for root access, allowing me to simply use the power key and no button combo.

Everything is working fine though and the magisk version mismatch was only slightly annoying as I don't use very many modules and this was the first time I have ever ran into issues.
[Magisk] hellkaim:
First of all thx for the detailed answer.

No, the app is a user app. And when I updated it from the app itself I got my hide option back.

Checked my firewall... may be I can't remember what was it ON or OFF for Magisk

As I am, but anyway.

By Direct install you mean flashing ZIP from TWPR? No, I can't do so as we do not have workong TWPR for our model (issues with data.img encription). I just let Magisk to make all the things.

No as I do not have kernel precompiled.

It is more or less simple. We have bash script that starts a rutine which allows you to controll bootloader. It is accesable through recovery mode (check the wiki and I can show you a Git repo for all of that). I myself made a modifications to install UBPorts natevly so it is not an issue. The menu is a UI for selecting which partition to search for the boot.img. After that it will use an encoded partiton for vendor.img, syste.img and data.img respectively.

So what I think happens as under the update process the new boot.img/system.img is checked if it is valid and the device falles in red state, the magisk prepared image gets discarded and device boots back to preexisting image.
[Magisk] bonedriven:
Is it normal that I need to reinstall TWRP and reinstall magisk each time lineage pushes a weekly update, or I'm missing something?
[Magisk] pndwal:
👍

So it's fixed now anyway...

"On the same phone model I was able to do that, but on a new device I can't..."

...So you don't know on what 'same phone model' you could use hidden app? - Or are you saying you have an earlier Cosmo (same model, earlier firmware?) on which you could?

No; within Magisk App you should have both Select and Patch a File and Direct Install options showing if you have Magisk root. Pre-root you'll only have Select and Patch a File.

Yup, I'm not recommending Custom Recovery install.

I meant did you see 'failed signature check' while trying 'Select and Patch a File', when flashing such a patched file, or at another time.

This part is a bit beyond my understanding; I just don't know how a Multi Boot / ROM device selects boot image, boots ROM, how Magisk handles this scenario, if all multi OS devices use same methods / mechanisms, etc...

John does give detailed insight into 4 unique boot methods that fall within Googles specs:

https://topjohnwu.github.io/Magisk/boot.html

These will likely help you, as may other doc's listed as "for developers":

https://topjohnwu.github.io/Magisk/

🤠 PW
[Magisk] pndwal:
Depends entirely on update, and, perhaps, how you installed Magisk.

addon-d survival script was added for Magisk in Custom ROMs https://github.com/topjohnwu/Magisk/commit/9430ed66cd6bc1f80442f051d31b5e535387bb7b

and will reflash Magisk after Update if you installed using zip installer (it isn't present with app Installation as this is designed primarily for use with stock ROMs which lack addon-d support) and ROM supports the script.

In practice, I have found this is not reliable; works with some builds, others need Magisk re-flash (Magisk is broken) even w/ addon-d support.

Also, TWRP used to persist even for LOS as recovery was not included in ROM images, but now I believe LOS recovery is included by default. Unless Recovery flash can be deselected you will, of course, need to restore your recovery.

Boot image is normally replaced with ROM updates AFAIK, so unless addon-d supports a Magisk re-flash, devices with Magisk in Boot (type I, II and IV) will need Magisk re-flash.

https://topjohnwu.github.io/Magisk/boot.html

Magisk in Recovery devices (type III) won't if Recovery is not flashed. PW
[Magisk] zgfg:
That is the question for LOS developers, how they push LOS updates for your device.

If they include boot/recovery imgs into their updates, then TWRP/Magisk will be overwriten and you will have to install them again

Look also into the forum for your device, the LOS thread, and check what other users suggest as a good practice to make your weekly update procedure (with re-rooting, etc) more easy and faster
[Magisk] Uluru25:
Regarding LOS18.1 from DarkJoker360 (but maybe this is rather a general feature) you can select in the settings for the auto-update whether or not the recovery should be updated too.
[Magisk] PanWonzki:
Hi

I have problem with installing Magisk on my Moto Z3 Play.

Everytime i try to install Magisk, system (LOS 18.1) is stucking in bootloop and I have to rescue phone in Lenovo Rescue. I've tried to install latest version and like 5 older ones and it's always the same. I/m installing it via TWRP

Why is that happening? Am I doing something wrong?
[Magisk] pndwal:
Yes, a general rule (at least for official LOS) for A only devices.

BUT for A/B devices (at least those w/o recovery partition, ie most), you have no such choice since 15.1

Lineage Recovery has been the defacto install solution for LOS in all official devices since 17.1, but maintainers still may specify alternatives. An option on non-A/B devices to update the recovery image (or not) with the OS has been included since 18.1.

I posted this info 6 weeks ago:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85287719

As an aside, I understand that updates are full (not delta / incremental). Explanation:

www.reddit.com/r/LineageOS/comments/9w9vik/comment/e9jg2yv/

The use of full-image updates mean Magisk / TWRP may be lost, but restoring images before updating won't be needed to avoid bootloops as is the case with stock (delta) OTA's.

Further to

for @bonedriven.

LOS has addon.d survival, and this is working on A/B devices also since 15.1 for addon.d-v2 compliant mods:

https://lineageos.org/Changelog-19/

so many GApps packages and Magisk should be preserved with compliance. Caveats follow.

Addon.d is not working with App Magisk Installation as discussed here:

https://github.com/topjohnwu/Magisk/issues/3820

Nb. This issue remains open as @osmosis felt John may 'change his mind' about not wanting "to involve system rw at anytime during boot".

Note further comments from @osmosis there also:

The reason addon.d in LOS recovery is (intentionally) disabled may be LOS's decision not to decrypt /data:

https://github.com/topjohnwu/Magisk/issues/1501

Regarding TWRP retention thru OTA, seems you can add this also at least for A/B devices thanks again to @osmosis. See:

www.twitter.com/osm0sis/status/1193004098708221955

and:

https://xdaforums.com/t/tools-zips-...tiple-devices-platforms.2239421/post-80876931

Being a Magisk module (it's in the official repo) this apparently works for stock ROMs too!

To retain TWRP thru OTA on A-only, just deselect Recovery in Update I guess. 😉

🤠 PW
[Magisk] 73sydney:
Have you got TWRP installed or just fastbooting it?

Some devices, my Pixel 2XL for one, will bootloop if you install TWRP and install Magisk

The solution for us is to (after restoring the original boot.img to remove TWRP):

Either:

1) Fastboot TWRP and flash MAgisk after fastbooting TWRP

Restart the device in bootloader mode

fastboot boot twrp-xxxx.img

flash Magisk (rename magisk.apk magisk.zip)

reboot

or

2) Patch the boot image:

Extract the boot.img of the ROM and transfer to phone

Install Magisk apk and choose Install, then patch the boot.img

Copy the <patched boot.img> off the device to PC

Boot the device in bootloader mode

fastboot flash boot <patched magisk.img>

fastboot reboot
[Magisk] pndwal:
Interesting that official instructions are unclear about Installation and only mention booting img file, not installing.

https://twrp.me/motorola/motorolamotoz3play.html

Can I assume you have booted img file initially, then flashed zip and now have latest 3.5.2_9-0-beckham.zip installed?

Nb. This is based on Android 9 source, so there may be issues with Android 11 / LOS 18.1.

Nb.2. zip / custom recovery installation of Magisk was developed for legacy devices, not A/B SAR etc.

https://topjohnwu.github.io/Magisk/install.html#custom-recovery

With A/B, recovery is usually in Boot partition, and you are actually patching the Recovery ramdisk when flashing Magisk...

If you really want Magisk with TWRP installed, here are two methods that may work:

With latest TWRP installed:

1) Take a TWRP backup including boot image (which contains TWRP), locate and patch boot image in Magisk App (can rename backup bootxxx.win file to .img file or leave as .win) and flash that.

or 2) Extract boot.img from your current ROM package (may need payload dumper), patch that from Magisk App, Fastboot boot (only) Magisk patched image to get root, use Direct install method (available with root) to install Magisk (will patch current boot image incl. TWRP).

😜 PW
[Magisk] iooxda:
I am using Magisk 23 on sweet with Lineage 18.1. I am trying to bind mount a folder to Internal Storage (/storage/emulated/0) without success.

Here is the command (which has worked across several other devices and version):

su -Mc mount -o bind /folder /mnt/runtime/write/emulated/0/folder

the result:

/mnt/runtime/write/emulated/0/folder
/mnt/runtime/read/emulated/0/folder
/mnt/runtime/full/emulated/0/folder
/mnt/runtime/default/emulated/0/folder
/mnt/runtime/pass_though/0/emulated/0/folder

but it doesn't mount /storage/emulated/0 which is where I need it to access the files.

Also i've never seen this pass_though directory before, what is it?

Final strange things, I can't access: /storage/emulated/ with root at all, I just get a permission denied with all apps even those targeting lower APIs. Is this scoped storage?

If the rom has the storage setup properly, shouldn't root be able to access /storage/emulated?
[Magisk] J.Michael:
What are you trying to do?

In spite of your claim that you have been using this command successfully, I can't believe it. The mount command you wrote will make the contents of /folder (already existing) available by referencing /mnt/runtime/write/emulated/0/folder. Is that really what you're trying to do? Make a new name that looks like it is in your internal storage, but which is really elsewhere on your filesystem?

What is it that you are showing as "the result"? The output of "find"?

What do you mean by "mount /storage/emulated/0"?
[Magisk] samhhmobil:
You cannot mount folders into /storage/emulated/0 due to the "Google scoped storage policy" forced in Android-11 (LOS18.1).

If you want to do that (for example via fbind-Module or manually) you have to fall back to Android-10 (LOS17.1) and it will work.

It's not an issue of magisk, and there's nothing to do in that.

samhhmobil
[Magisk] DiamondJohn:
The reason you cannot mount to /storage/emulated/0 is because it is windows formatted, not because of scoped storage. You couldn't do that in earlier versions of android. If you wish for a folder in that location, you have to find the source which will be in a linux style format, which does support mounts. eg /data/media/0

To make it accessible, you also have to get the permissions and ownership and mount as command correct.
[Magisk] zgfg:
Just for the record, yesterday I flashed the patched boot img by Franco Kernel Manager.

Actually, the phone was already rooted, I was just downgrading from Alpha 31 to 30, then updating back to 31 (to test FK)

(Xiaomi Mi 9T, Xiaomi.eu, MIUI 12.6, Android 11)
[Magisk] samhhmobil:
I'm sorry, but: No! This is not the answer to the question. Of course it's possible without any tricks to bind mount into /storage/emulated/0, independent of it's filesystem. But only until Android10.

If you would be right with your assumption, then (the magisk module) "fbind" would/should work with Android11 too.

But it doesn't. It works without any issue until Android10. But not with Android11. Have a look at their GitHub page. The trouble with "scoped storage" is on the todo list, but no idea and no solution yet to work around that.

samhhmobil
[Magisk] iooxda:
Okay, so first, thank you very much for everyone who took the time to answer, awesome community here! I found the solution last night after much searching. I am embarrassed to say it was an SELinux problem. In order to bind mount a folder into /storage/emulated/0 the context which seems to work for the native filesystem is: u:eek:bject_r:sdcardfs:s0. I had something else.

If anyone is interested the file service.sh in the rclone Magisk module here: https://github.com/Magisk-Modules-Repo/com.piyushgarg.rclone has worked out a lot of this logic to prevent data loss when mounting this way. This is also a good example of a reason why a user might want to bind mount into /storage/emulated

I am working with a new device and I wasn't sure if the ROM has implemented storage differently or if there was a problem with root because I could not # ls the /storage/emulated folder, getting a permission denied error.

I can report that after changing the context it does work on Android 11, at least on the three devices I have tested it on. I know that Google has depreciated sdcardfs recently so I don't know if these devices are using the new way or not but it works on all 3.
[Magisk] baxtex:
I recently bought a new car and the companion app for Kia seems to detect root.

UVO Connect 2021 - Apps on Google Play

Staying connected with your Kia car has never been easier

play.google.com

My phone passes safety net. I have randomized the magisk package and enabled Magisk Hide for the app. However it still manages to detect Magisk.

Im using A11, Magisk v23 and have successfully hidden Magisk for other apps but this Kia Uvo app doesn't want to work.
[Magisk] zgfg:
Probably, an isolated process. Search here for the previous discussion about (hint: riru + momohider or unshare)
[Magisk] Didgeridoohan:
Could be something else on/about your device, because I could get it to start up without issue, once added to the Hide list (OnePlus 5T, A11).

Usual suspects could include stuff like having the app in question installed to external storage, having root apps installed that it's looking for, TWRP directory, etc. More:

https://www.didgeridoohan.com/magisk/MagiskHide#hn_Hiding_root_from_apps
[Magisk] baxtex:
Thanks! I just uninstalled titanium backup and it solved the issue.
[Magisk] bmrz1981:
Issue: Unable to delete system/apps

I am trying to magisk /root/ to delete system apps in cubot X19S. Whereas X19 (64GB) Just works X19S has problems. The different between phones is just 64GB and 32GB so I assumed to be same - from specs SoC/display everything else is same. So I am surprised by problems.

X19S is A/B: No Ramdisk: No; SAR: Yes. It came with Android Pie (no updates from OEM).

So I patched boot.img

Flashed the ROM/boot with SPflash tool.

The command works fine

adb shell su -c /system/xbin/mount -o remount,rw /

But when I try to delete a system file like

01-01 12:26:18.927 1715 1715 I ADB_SERVICES: service_to_fd shell,v2,TERM=xterm-256color,raw:su -c rm -fr /system/app/Drive/Drive.apk
01-01 12:26:18.936 1715 1715 I ADB_SERVICES: local_socket_flush_incoming write_data=32
01-01 12:26:19.015 4799 4799 W magiskd : type=1400 audit(0.0:551): avc: denied { associate } for name="UNIX" dev="sockfs" ino=55667 scontext=u:object_r:magisk_file:s0 tcontext=u:object_r:sockfs:s0 tclass=filesystem permissive=0
01-01 12:26:19.015 4799 4799 W magiskd : type=1400 audit(0.0:552): avc: denied { associate } for name="UNIX" dev="sockfs" ino=55667 scontext=u:object_r:magisk_file:s0 tcontext=u:object_r:sockfs:s0 tclass=filesystem permissive=0
01-01 12:26:19.015 4799 4799 W magiskd : type=1400 audit(0.0:553): avc: denied { associate } for name="UNIX" dev="sockfs" ino=55669 scontext=u:object_r:magisk_file:s0 tcontext=u:object_r:sockfs:s0 tclass=filesystem permissive=0

Any suggestions to allow this.

I thought it looks like this bug but ....

Google Pixel 3 XL - SELinux prevents "adb shell" from running root commands · Issue #2960 · topjohnwu/Magisk

Magisk Canary: 97b72a5 (20419) Magisk Manager: 9348c5b (289) Google Pixel 3 XL (Crosshatch) running 10.0.0 (QQ3A.200605.001, Jun 2020) images + Magisk + ElementalX-P3-2.16 Kernel Unsure if this is ...

github.com

Please help.
[Magisk] zgfg:
Did you try directly from Terminal on the phone (avoiding adb)

Check if filesystem is ro = read only (yes, it can be rooted but still ro)
[Magisk] bmrz1981:
Yes. terminal on phone after remount

mount -o remount,rw /

verify using mount (it is confirmed rw)

now I delete

/system/app/Drive/Drive.apk

I have a feeling that these are stub apps. And they are getting loaded after one restarts phone. Any other places to look for to delete?
[Magisk] zgfg:
Have you tried by using a root explorer like MiXplorer (and without any remounting)

Also, have you tried from TWRP, Advanced, File Manager (if TWRP is available to your device)

Check in /vendor/etc/fstab.* that /system is not read-only on the filesystem level - see the screenshot.

In that case, even if chmod shows rw (for the file or folder), it will not help (that's why Magisk provides systemless mechanism to make changes)
[Magisk] 73sydney:
Were me, id try what i use on every ROM -

https://xdaforums.com/t/module-terminal-debloater-v17-3-2-debloat-systemlessly.3584163/

Once ive debloated the apps i want (reversible), i then (e) export the config (defaults to /sdcard/import-debloat.txt), and back it up (to PC as well) and reuse it, updating it when possible on different ROM's and (e) exporting it again, built up quite a debloat list by now.

On new ROM flash i just install magisk, reboot, install debloat, reboot , run it (making sure the /sdcard/import-debloat.txt is in place) and select (i) and press Enter twice, then reboot, done. Why make it harder?
[Magisk] DiamondJohn:
You do not need to add a magisk module. You can simply disable and hide the app(s). Both features are already built into the android system, and have been there for many many years.

I have built an app that enables such using a UI.

[APP][TOOL] TeMeFI comprehensive system Administration

TeMeFI This app provides/returns a bucket load of information regarding your device and the currently running ROM, and much, much more. And hence the name "TeMeFI"; as its Too Much F????? Information. The F stands for whatever your comfortable...

xdaforums.com

You can find it in the menu under Application Info / Manage>State>Hi9bernate-Freeze-Hide>*
[Magisk] bonedriven:
Just tried it and it says "it's not possible on this device".

I thank you for your detailed explanation.

It is my time to say goodbye to rooting, might as well as Android phones in general down the way.
[Magisk] Uluru25:
I would recommend that you join his telegram group https://t.me/ginkgodev and ask him there. He usually answers very fast and reliable.
[Magisk] iooxda:
I am trying to launch the Magisk apk fro a script however I am having trouble. Here is what I have tried:

From the AM app I can see there are 3 activities for this apk:

a.b

a.b

a.m

I have tried:

am start --user 0 -n com.topjohnwu.magisk/.a.m

am start --user 0 -n com.topjohnwu.magisk/.a.c

am start --user 0 -n com.topjohnwu.magisk/.a.b

I get "Exception occured while executing 'start'":

java.lang.IllegalArgumentException: no intent supplied

as a result. Is my syntax wrong, any ideas?
[Magisk] Gregbmil1:
am start package name /activity name

"am start com.topjohnwu.magisk/com.topjohnwu.magisk.ui.MainActivity"
[Magisk] Gregbmil1:
I need help with flashing a new WebView using the WebView Module. While it's flashing I have to choose options using the volume buttons. The issue is that it does not recognize my inputs and installs the default Bromite. Bromite is great but not having Chrome WebView is messing with Android Auto, at least I think it's messing with it.

I trying editing the script so that Chrome is the default choice but then Magisk gives an error "failed to extract zip" any ideas? I'm on a Galaxy Note 10 with Android 11