yashsingh1/xdaforums huggingface dataset:
[Magisk] ktmom:
Re-flash the boot.img
[Magisk] jcmm11:
Create a module. Have a folder 'optics_new'. Use post-fs-data.sh and issue your own mount bind command to mount optics-new over optics.
[Magisk] m8980:
thanks a lot. i try to read how its working, but i don't understand that much. my knowledge isn't good enough. would be nice if someone could help me.

thanks
[Magisk] dcarvil:
According to previous posts, you already have the module. Have the module create your file in a folder called /new-optics, then enter the mount bind command in the post-fs-data.sh file.

The command in post-fs-data.sh would be

mount --bind /new-optics /optics

You can read about mount bind here. https://unix.stackexchange.com/questions/198590/what-is-a-bind-mount#198591
[Magisk] m8980:
here is mylatest log file.

don't really know what's wrong

attached a zip with my customize. sh & post-fs-data.sh.
[Magisk] dswwong:
Why is that I can't find some of the modules recommended on my magisk.

I use op7pro.

For example. L Speed is one. Substratum is another to name a few examples.

Any help or guidance.
[Magisk] jcmm11:
Try

mount --bind $MODDIR/optics_new /optics

If you'd read the comments in post-fs-data.sh you should have figured this part out.
[Magisk] guest4711:
Never touch a running system.
[Magisk] m8980:
Thanks,

I tried and read. The content of the magisk log is the same with using $MODDIR/optics_new
[Magisk] Didgeridoohan:
You have to move the post-fs-data.sh file to the root of the zip. Maybe it's been said before, but you need to take a look in the module creation docs:

https://topjohnwu.github.io/Magisk/guides.html#magisk-module-installer

Almost everything you need is covered there. And by the way, your customize.sh file does nothing. Since it's just a renamed old installation script...

I would advice that you forget any old template you've found and only use the info in the above link. Otherwise you risk confusing yourself with outdated information.
[Magisk] m8980:
Thanks guys for your help and patience.

Its working now!

great

you're the best. Can't believe it :)
[Magisk] martyfender:
L Speed was removed from the module repository. It is once again a stand alone app, as before.

https://xdaforums.com/apps/l-speed/tweak-l-speed-v1-0-02-02-2015-t3020138

https://github.com/Paget96/LSpeed/releases
[Magisk] silas67:
Im running magisk 20308 from canary on my pixel 2. Since this last update I keep getting and upgrade notice for magisk and every time I go download to install nothing happens. Magisk just opens and doesn't show any update available. Thought I should mention it. Did a quick scan and didn't see this posted.
[Magisk] zzz2002:
I am not sure exactly how this problem was triggered.

It started when I found that the firmware on my device was corrupted. The only way that I could recover was to flash a stock android 8 package from Samsung using Odin.

Next I installed TWRP 3.3.1.-0 hero2lte. Followed by Ivan Meler’s LineageOS 17.1 build 7, plus Opengapps.

Everything seemed to be OK up to this point. Non-root apps worked as expected, rooted apps (TIB ...) failed (as expected.

However I was getting warnings “SELinux is not enforcing....” which I disabled as it was a known "problem". Plus “this build was signed with public keys” which I had not seen before.

Installed Magisk , manager ver 278, Magisk ver 20308. Install seemed to go OK. But Magisk failed safetynet with “Attestation Failed” ctsProfile negative, basicintegrity negative.

I switched back to Ivan's LineageOS 16, same process as above, no difference. Went back to 17.1

What did I do wrong? How do fix the problem(s)?

2020-03-22 - solved, thanks to didgeridoohan
[Magisk] hon3y:
Magisk cts profile false issue can anyone help me? My device is redmi note 7 pro with aex android 10
[Magisk] Didgeridoohan:
About SafetyNet failing, from Magisk build 20307 MagiskHide is disabled by default. It'll need to be enabled before SafetyNet can pass.

About your other issues, I would suggest you ask in the ROM thread.
[Magisk] Didgeridoohan:
https://didgeridoohan.com/magisk/MagiskHide#hn_SafetyNet

If it's only CTS that fails I would take a look at this section:

https://didgeridoohan.com/magisk/MagiskHide#hn_Matching_official_prop_values_to_pass_SafetyNet
[Magisk] zzz2002:
Thank you. Thank you. That solved the "problem".

I only included the other items, in case they had some relevance.

Once again thank you.
[Magisk] problemathic:
unoffical snapshot custom link url is removed now got or another new one?
[Magisk] :
Hi guys,

I am trying to get Magisk to work for my OOS 10.3.2. I tried many ways but all semmed to fail at some point. the proble is that they dont fail right away, only after i finish setting up my device. so i had to set up my device after reflashing official ROM countless times. idk what happens I install Magisk and everything works normally, i can restart my phone use root etc... After a while if i try to restart i get stuck in bootloader and i either have to factory reset or (i found out during my last and current try) that i can remove magisk as apperantly on install magisk creates a copy of the boot.img that it restores on uninstall, so now im at least able to use my phone, although i dont have magisk anymore.

I have tried mainly Two methods

METHOD 1

1. Downloaded full ROM of OOS 10.3.2,

2. copied the payload to a program called payload dumper that extracted the boot image.

3. Copied the boot image to the phone

4. opened Magisk manager and selected install from source where i chose the boot.img

5. it created a copy called magisk_patched.img

6. booted in fastboot

7. on my pc used the command prompt to "fastboot boot magisk_patched.img"

booted normally and i had root.

METHOD 2:

a. install OOS 10.3.2

b. boot to mauronofrio TWRP image with fastboot boot recoveryimgfilename.img

c. isntalled TWRP and rebooted to recovery

d. installed magisk

e. booted to phone and i sucessfully had root.

The problem as described before is that at first i am able to use root, restart my device without any issues. but once i set it up with all my apps and i try to restart my phone i get stuck in the bootloader. Could it be that google play system update gets downloaded and applied on reboot and its creating issues? Otherwise i dont know whats creating the problem. The first 4 times i had to flash stockOS to get my phone to work and that caused me to having to re set up my phone. This time uninstalling magisk got me to boot to system again, but i dont have root.

What am i doing wrong? Why am i unable to boot after a while and have to redo everything? Am i missing something? do i have to do anything with magisk? download a module or something?

in case i need to reformat everything again, to prevent me from setting up my device yet again from 0, can i use TWRP to backup only the /data partition and restore only that one or do i have to do it always combined with /system and /boot?
[Magisk] martyfender:
The unofficial master builds were stopped some time ago.
[Magisk] wangdaning:
Method one should be "fastboot flash boot magisk_patched.img" Just booting it will not stick. If it does not boot then there is a different issue you are looking at. Are you sure this is the proper flashing method for your device. Maybe check in your device forum, as most people here have different devices.
[Magisk] ipdev:
My guess it's something in your setup.

OOS 10.3.2 so I'm guessing you have a OnePlus 6T ?

Actually fastboot boot is safest to use for testing.

fastboot boot and flash are misused quite a bit.

Not as much as adb sideload and adb install though. :D

As you noted, if you want to flash the magisk patched boot image, fastboot flash would be the correct way.

The second method [MENTION=8706490]Davide1713[/MENTION] mentioned, was using TWRP to flash magisk and it still seemed to work after initial boot.

So more than likely, something borked with the setup afterwards.

Cheers all. :cowboy:
[Magisk] yursi:
Workaround to bypass the new bootloader check

Hi [MENTION=4470081]topjohnwu[/MENTION] [MENTION=4544860]osm0sis[/MENTION]

I idealized 3 possible solutions/workaround for the new Google's control/block (about the bootloader status check).

FIRST SOLUTION:

Since "SafetNet API" works following this schema:

[IMG="safetynet-attestation-protocol.png"]https://developer.android.com/images/training/safetynet/attestation-protocol.png[/IMG]

[Complete documentation: https://developer.android.com/training/safetynet/attestation#java ]

We could make a Custom ROM which does not use "Google Play Services". The ROM should implement "Custom Play Services". (We should ovveride Google's API, of course)

So, when the app (Pokemon Go app, or bank app) will do the following call

SafetyNet.getClient(this).attest(nonce, API_KEY)

our app will manage the call, doing the same stuff described on google safetynet api documentation and returning a "valid attestation" like the one described on their API. Attestation Example:

{
"timestampMs": 9860437986543,
"nonce": "R2Rra24fVm5xa2Mg",
"apkPackageName": "com.package.name.of.requesting.app",
"apkCertificateDigestSha256": ["base64 encoded, SHA-256 hash of the
certificate used to sign requesting app"],
"ctsProfileMatch": true,
"basicIntegrity": true,
}

Since "Google Play Services" manages a lot of stuff, we could set our Custom ROM (or Custom Play Services) to call the original "Play Services App" for the normal stuff (Not related to SafetyNet Test). "Forwarding" the normal calls to original "Google Play Services" following this schema:

[IMG="Custom GApp Schema"]https://i.imgur.com/DZwtjzd.png[/IMG]

I think it's a comlpete solution but hard to implement.

SECOND SOLUTION:

Since SafetyNet is not compatible with Huawei Mate 30 Pro.. App like Pokemon Go or bank app should skip SafetyNet test if they think they are running on Huawei Mate 30 Pro (since SafetyNet CTS fails on this device because of Huawei's ban by Trump)..

So the workaround will be to spoof our device id with magisk and let "Pokemon go" thinks that it is running on a huawei mate 30 pro (in order to skip safetynet test by Google). The app (PoGo or bank app) should not call "SafetyNet" if they think they are running on a Huwei Mate 30 Pro, in my opinion.

It's not a complete solution but it is really easy to implement.

THIRD SOLUTION:

We can use VMOS App to simulate a rooted device which doesn't implement "hardware keystore verification" in its TEE.

I know this is an ugly solution since it's not a native implementation of the root.

[MENTION=4470081]topjohnwu[/MENTION] [MENTION=4544860]osm0sis[/MENTION] What do you think?
[Magisk] stormy1777:
[MENTION=760487]teefa_1985[/MENTION] (from closed thread)

https://xdaforums.com/showpost.php?p=82081017&postcount=3171

Maybe this will help, I'm on Redmi 7A, Pie/9, and could not upgrade for many weeks, was stuck on 20304, the manager updated to latest withOUT any problems, base magisk appeared to update OK, but after reboot, the wifi and many other things did NOT work, and phone would eventually reboot (3-5 minutes)..

the only way around was to flash 20304 from TWRP (in recovery mode) , then phone boots OK, and wifi and all works fine.

The other day, thought to try and flash 20308 from TWRP, and it WORKED!!!

Noticed the difference, in the (failure case) flashing from Magisk while phone is booted, the first line of work to be done says:

Target image: /dev/block/mmcblk0p53

by comparison, doing a TWRP install of the same magisk/zip file from recovery mode, showed a partition number less by ONE, i.e:

Target image: /dev/block/mmcblk0p52

This flash went OK, and phone works just fine!

If I correctly read the partition name/numbers: 52 is 'boot.img' whereas 53 is 'recovery.img' !!

I have no clue if this is related to your issue. In the flashing/from magisk while phone is ON, I'm selecting all DEFAULT so:

Preserve AVB 2.0/dm-verify

Preserve force encryption

Recovery Mode

(and "Install directly (recommended)")

Also tried to DESELECT the "recovery mode", it still went after wrong partition #.. p53..

Question i have to this thread, is there any way to tell Magisk to flash into partition p52 instead of p53? (anything in settings? config file? )

Hope this helps.. got latest bits from canary bits:

https://raw.githubusercontent.com/topjohnwu/magisk_files/canary/release.json

Thanks, Stormy.
[Magisk] knpk13:
Does anyone know why the magisk dev thread was closed? There's no explanation there.
[Magisk] stormy1777:
[ deleted ] posted twice by "clickcident" :)..
[Magisk] tys0n:
Looks like he's abandoned xda now and will use GitHub only.
[Magisk] hyborian:
https://twitter.com/topjohnwu/status/1242017586037919745

XDA is really slow. Just loading it on a browser is the slowest of all websites I use.
[Magisk] SebiderSushi:
SD Card Read Write remounter

Thank you for your hint. Alas, i already made an attempt with service.sh where my sd card would be remounted with write access once after boot. But since sd cards can be removed and such, i'm out of ideas other than looping the script forever which seems unwise in regards to power consumption.

However, i did now write a simple android application that listens for system broadcasts regarding newly mounted storage media. It automatically remounts every insterted storage device to enable write access.

But now i'm still searching for another solution that can be applied once instead of requiring constant root access every time a new medium is mounted. That would be very nice, but since i've got it working with the app it is not a must have.
[Magisk] martyfender:
I am shocked that no one here mentioned that the the latest stable and beta versions, Magisk v20.4, were released early today.

https://github.com/topjohnwu/Magisk/releases/tag/v20.4
[Magisk] Homeboy76:
:eek:

According to this thread: https://github.com/topjohnwu/Magisk/blob/master/README.MD

stable is 20-3 and beta is 20-4.
[Magisk] martyfender:
Yes, I just read that, which seems to be the case, but it is not clear from here:

https://github.com/topjohnwu/Magisk/releases
[Magisk] Wolfcity:
I'm not very happy that [MENTION=4470081]topjohnwu[/MENTION] has moved completely to GitHub so that the releases don't appear here anymore:

https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445/post68966662

and the Canary thread is closed.

That may be the reason why things get a bit confusing at the moment.

I will get used to it but it will take some time, I'm not on GitHub that often.
[Magisk] Homeboy76:
I agree, but I think eventually Github will be the only official site for all Magisk information and downloads. Also, Magisk Manager is set for stable and there is no Magisk 20-4 update showing.
[Magisk] ipdev:
[MENTION=4407595]awesomeo3000[/MENTION]

This was OT for the MagiskHidePropsConfig thread so I figured I'd answer you here.

For devices that allow bootloader unlocking and fastboot boot/flashing.

Note: Just a general mention for anyone who uses this method. The bootloader will need to be unlocked to allow flashing.

You can install Magisk without a custom recovery.

Copy the stock boot.img file from the rom you are using to the device.

Normally you can get the boot.img by unzipping the custom rom you are using or (if stock) the factory image/update for the device.

Install MagiskManager (Give it storage permissions if needed.)

Open MagiskManager and install Magisk using the patch boot image option.

(Navigate to and select the boot.img file you copied.)

When done, copy the Magisk patched boot.img back to your computer.

Reboot the device into bootloader (fastboot) and :

Option A.

fastboot flash boot magisk_patched.img

fastboot reboot

- or-

Option B.

fastboot boot magisk_patch.img

This will be temporary root since you are only running the patched image instead of flashing it.

Open MagiskManager and install Magisk using the direct install option.

Reboot.

Note.

Option B

Will backup the currently installed boot.img (Not the one you booted) and flash the newly patched boot image. This may help if you need to uninstall Magisk. (Not always.)

Best to keep a copy of your unmodified boot.img on your computer just incase.

There are benefits and disadvantages to both above mentioned methods.

If your device comes with or has been properly updated to use dynamic partitions (super partition), then you will not be able to remount partitions to read-write.

For more information on dynamic partitions.

Implementing Dynamic Partitions source.android - Link

Cheers. :cowboy:

PS.

Not quite sure if you are running factory Google.

If you are, you can grab the factory image files from here.

Pixel 2XL developers.google - Link
[Magisk] J.Michael:
How is your SD card mounted by default? How widely do you want to give write permission?

On my tablet, the SD card is mounted in three or four places, with varying permissions, owner, group. You might get some use out of finding the mount point that has write permission, and then adding the apps of interest to the group that has write permission.
[Magisk] martyfender:
There is a beta channel option in the Canary Magisk Manager.
[Magisk] Homeboy76:
True, my point is if I have Magisk Manager Update channel set for stable and there is no Magisk 20-4 update showing. The Magisk 20-4 version is not a stable version.
[Magisk] SebiderSushi:
Thank you for your information.

The LineageOS 16.0 on my device mounts the sd card under "/mnt/media_rw", "/mnt/runtime/default", "/mnt/runtime/read", "/mnt/runtime/write" and "/storage".

All directories are owned by root. The media_rw directory keeps the ownership and permissions of actual filesystem.

The other directories are recursively owned by root and recursively grouped to "everybody" (9997), except "/mnt/runtime/default" which is grouped to "sdcard_rw" (1015).

The ExSDCard Write Access enabler module from the Magisk makes your storage-permissioned apps be added to both the "media_rw" and "sdcard_rw" groups.

I have run my tests in Termux, and the output of "id" confirmed that Termux successfully had been added to these groups.

My testing concluded, even if added to groups "media_rw" and "sdcard_rw":

Now, the problem is that it is impossible to read any of the mount directories except /storage, by which i mean "ls /mnt/media_rw" and the likes turn out with permission denied.

That means that storage directories can't be browsed from any app simply listing directories.

Only /storage can normally be read.

Also, trying to "ls" the full sd card path under "/mnt/runtime/default" (which is grouped to sdcard_rw) also did result in a permission denied. This is due to the "/mnt/runtime" having an execute permission for root only. It cannot be traversed by anyone else...

The path under "/mnt/media_rw" can be accessed, but only by specifiying the full sd card path.

All in all, /storage is the directory which behaves like it should. It is the canonical directory for external storage devices from androids API point of view.

It can be browsed by any app.

Changing the mount option by issuing "mount -o remount,mask=7 /mnt/runtime/write/$SD_CARD_ID" causes sd card handling to behave completely as expected. It is simply ridiculous that external storaged get mounted under "/mnt/runtime/write" using a mount option (mask=18) that takes away write access.

The whole thing is nothing more than a gigantic **** move by google with no technical justification or security benefits that makes my blood boil.

But for now, i successfully wrote a simple app that remounts my external storages for me.

I am happy with this solution, but it requires constant root access so if by chance i might want to have sd card write access on a non-rooted device where the system partition could still be modded, another approach would be necessary. Until then, this method is just as good at changing the mount options of my storage devices.
[Magisk] zgfg:
And Tweets for discussions
[Magisk] zgfg:
When switching Channel from Canary to Beta it shows only downgrade for MM from 278 to 267 (and upgrade for Magisk from 20308 to 20400)

And it doesn't allow to directly install Beta MM over the installed Canary (my MM was not repackaged)
[Magisk] karandpr:
MiTM was already considered when designing SafetyNet

SafetyNet Attestations & Payloads can be verified independently.

App users can verify with google if the spoofed attestation payload is valid.

Spoofed payload can be rejected instantly.
[Magisk] zgfg:
AFAIK, because of the ban, there is no Google Play Services on the stock Huawei Mate 30 Pro - therefore, SafetyNet attestation could not be executed.

Maybe PoGo and some games work with that but I doubt that various (banking) apps consider that platform as a valid (phone for Chinese market and therefore not for their banking users)

"Should not call" does not mean they don't try to call and find the API not available (raising an error)
[Magisk] zgfg:
20.4 only available in Beta channel (MM older than in Canary and cannot be 'updated' from Canary), Stable still shows 20.3 (and Canary seems to be abandoned as its XDA thread was closed) - all as discussed earlier today

But to mess up things even more, XDA News announces that stable 20.4 was released (?!): https://www.xda-developers.com/magisk-v204-released-script-consistency-changes-bug-fixes/
[Magisk] m8980:
hello,

i have two strange issues and don't what's wrong.

I'm not be able to patch a file with magisk and sometimes magisk seems to be not running correctly while booting.

in this case i have to flash magisk again.

i tried the latest canary and 20.4. magisk version.

attached two Screenshots with the issues.

are there any log files which i can start to investigate?

i hope there are some possible solutions.
[Magisk] dcarvil:
See https://didgeridoohan.com/magisk/Magisk#hn_Logs_etc for information on logs.
[Magisk] raymondsanusi:
Hi bro..do u still have that previleged api booter? For my brevent
[Magisk] m8980:
thanks for the link. so i installed magisk canary verbose.

same situation. attached some log files. maybe someone can look into it.
[Magisk] yochananmarqos:
No, it hasn't been updated in over 2 years. You don't need it anyway. See https://brevent.sh
[Magisk] zgfg:
Reluctantly updated from Canary Magisk 20308 and Manager 278 first to Beta Magisk 20400 (keeping Canary Manager).

Second, downgraded from Manager Canary to Beta 267 - old design (now when Canary thread is closed and Beta 20400 released but Canary not, unclear what would be with the Canary Manager UI redesign that was pending for months - right when functional and visual bugs were fixed and I bacame used to it ;-( )

It was not possible to install Manager Beta 267 over the Canary 278, so I uninstalled Manager Canary and installed Beta (I didn't have Manager repacked) and everything went fine:

https://github.com/topjohnwu/Magisk/releases/download/manager-v7.5.1/MagiskManager-v7.5.1.apk

Put it to Custom channel to Canary, to see when an update comes there:

https://raw.githubusercontent.com/topjohnwu/magisk_files/canary/release.json

Root, modules so far ok.

Huawei P9, stock Oreo.

Edit:

Installed also Magisk Beta 20400 to Xiaomi Mi 9T, but keeping Manager Canary b278.

On both devices updated Magisk by patching image and flashing it (never installing Magisk as zip through TWRP)

Thanks, it makes sense
[Magisk] Didgeridoohan:
[MENTION=7786725]zgfg[/MENTION] The Canary thread was closed since it no longer serves a purpose. It's original purpose was for discussing the development of Magisk and bug reports on the cutting edge release. For a long time it's only been a second general thread, so better to close it.

The Canary channel is still active and there'll be a 20401 release eventually. The new Manager design is still being actively worked on, but John deemed it more important to get a new release out with some long awaited bug fixes.
[Magisk] BillGoss:
20.4 (which still uses Magisk Manager 7.5.1 (267)) is available from the stable release channel: https://github.com/topjohnwu/Magisk/releases/

The problem seems to be that Magisk Manager doesn't know about this latest release.

I downloaded 20.4 and installed it (using TWRP) and MM now shows:
[Magisk] Didgeridoohan:
Magisk v20.4 is a beta release, not stable.

https://twitter.com/topjohnwu/status/1242016345123770369?s=20