yashsingh1/xdaforums huggingface dataset:
[Magisk] ipdev:
Hi all.

I'm not sure if there is a reason or need to add a sleep function to a MagiskHide toggle script anymore.

Also, not sure if it necessary to be called from sbin anymore.

The last script file I was using.

#!/system/bin/sh

## Toggle MagiskHide off and on after boot.
## Place in /data/adb/service.d
## chmod to 0755

magiskhide disable
magiskhide enable

I'm lazy and made it into a module so I can just install it with other modules.

I have a few devices. It was easier than copying and setting permissions each time I clean flashed.

Module service.sh file is simply.

#!/system/bin/sh

MODDIR=${0%/*}

# Restarts MagiskHide during boot. (Simple script that toggles MagiskHide off and on.)

magiskhide disable
magiskhide enable

Now going forward, we could probably be able to remove the disable part.. ?

Cheers all. :cowboy:
[Magisk] davidzam:
Magisk won't update on my device.

Trying to update magisk to te latest estable release, but it doesn't work. Here's the lod with the error and a capture showing the info of my device. Thank you for your consideration.
[Magisk] pndwal:
But hardware key attestation means Google's server end can directly query bootloader for its state which is why even John Wu is 'over it'. Big question is how to circumvent that. PW
[Magisk] CRYPTfromCATACOMBZ:
Folks i need help please, i am using ROG PHONE 2 with Magisk and can't install audio module... Have Android 10 btw

Without problem and even after restart via Magisk i have "Global Optimized GPS file Replacer" model which i downloaded in Magisk via Downloads - that's ok

When i am trying to install zip file for audio i checked logs and here it is

- Copying zip to temp directory

- Installing ROG2_AudioModv1.zip

update-binary: line 54: get_outfd: not found

- Current boot slot: _a

- Device is system-as-root

Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip

inflating: config.sh

inflating: module.prop

creating: common/

inflating: common/post-fs-data.sh

inflating: common/service.sh

inflating: common/system.prop

Asus ROG Phone 2 Audio Mod

By acervenky@XDA

******************************

Powered by Magisk (@topjohnwu)

******************************

update-binary: line 101: mount_magisk_img: not found

- Extracting module files

Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip

creating: system/

creating: system/vendor/

creating: system/vendor/etc/

inflating: system/vendor/etc/mixer_paths_ZS660KL.xml

- Setting permissions

chown: /dev/tmp/magisk_img/rog2audio/system/vendor/etc/mixer_paths_tavil.xml: No such file or directory

chown: /dev/tmp/magisk_img/rog2audio/system/vendor/etc/mixer_paths_overlay_static.xml: No such file or directory

update-binary: line 147: unmount_magisk_img: not found

- Done

I tried to reset magisk to default - that means unhide completely etc.... and i was testing it once again, and it's the same - does anyone know what could be the issue?
[Magisk] Didgeridoohan:
Same issue as described here:

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

So far no solution, but apparently you should be able to update through TWRP.

That module is trying to use a Magisk image (that was deprecated in Magisk v19.0), so it's an outdated module and needs to be updated to the current module format for you to be able to install it on Magisk v19+ (and perhaps even lower versions than that).
[Magisk] eliezerjk90:
For those who can't pass safetynet with edxposed. I think I found a workaround, but I'm not sure so if anyone can test it, it would be great. I think the problem lies between one or more of these factors : force hook module, whether the edxposed manager is sytemized, and whether the edxposed manager module is activated. Here's what I've found out so far

1. Disable force hook, disable edxposed manager module, not systemized is the best setup and always pass

2. Enable force hook and edxposed manager module, systemized app would always fail

3. Everything in between these to setup gives mixed and inconsistent results. Sometime the same setup can pass but then fail after some time.

So I guess the best bet is to use option 1. Btw, I used latest release of edxposed manager and yahfa canary
[Magisk] Iustin_Theft-07:
Magisk 20.4 Install Failure

Device: Samsung Galaxy TabA(6) SM-T285

Android: 5.1.1 stock TouchWiz

Magisk: 20.3/ Manager: 7.5.1(267)

Trying to update from 20.3 to 20.4 through twrp succeeds but as soon as the device boots up the screen turns black and the tablet freezes requiring a hard reboot.

Trying to update directly through magisk manager results in the following install error View attachment magisk_install_log_2020-04-06T15_35_47Z.log
[Magisk] pndwal:
Well, EDXposed has been fixed since Canary 4532. :)

https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post82179915

"I don't want to give up on you either, I'm trying to rename the module's library randomly to hide frame features, hope this works" [MENTION=8430637]mlgmxyysd[/MENTION]

https://github.com/ElderDrivers/EdXposed/issues/435

Official EDXposed thread: https://xdaforums.com/xposed/development/official-edxposed-successor-xposed-t4070199

- Page 4

Seems its working... till Google strikes with their COLLOSAL HAMMER... PW
[Magisk] HippoMan:
Hmm ... so does this mean that the hardware keys are not accessed via some sort of filesystem path? Any path can be shadowed via chroot.

PS: It seems that the keys are indeed not accessible via the filesystem.

From https://source.android.com/security/keystore/ ...

Oh well ... (sigh) ...

.​
[Magisk] jcmm11:
Instead of flashing Magisk grab the new boot image before installing the upgrade. Use Magisk to patch the boot image. Now boot TWRP, install the upgrade, then flash the patched boot image.

You'll boot with Magisk installed and your old Manager.
[Magisk] pndwal:
John Wu _@topjohnwu

Creator of Magisk. Rooting Android. Software Engineer [MENTION=250902]apple[/MENTION]

Replying to _@topjohnwu

Shawn Willden _@shawnwillden

Tech Lead for Android hardware-backed security subsystems.

https://mobile.twitter.com/topjohnwu/status/1237662699233792000

Could be worth persuing... don't you think? ;) PW
[Magisk] HippoMan:
$250K or $1M to help prevent people from running the apps of their choice on a rooted Android device?

I don't support that goal, no matter how high the bounty might be.

.​
[Magisk] wangdaning:
What you seem to forget is it is the apps that don't want you running them. They are using this security to prevent devices from running their creation. You have no right to run whatever app you want on your phone. If you do not like what they are doing stop using their app.
[Magisk] oslo83:
Right and wrong... long debate.
[Magisk] wangdaning:
Not really, I make an app and I want to limit people's ability to use it, then you have no right to use it. If google were blocking people from using any app I would agree, but it is the app devs who are deciding they want to put this API in their app. Since I am in China, the whole SafetyNet thing is kind of a mute point for me anyway. Might be why I don't care.
[Magisk] mcgyver83:
Hi all, I'm restoring an old Samsung S Advance GT-I9070. I installed TWRP and CyanogenMod 13 PolishVodka based on 6.0.1

While flashing magisk 20.4 I have the Error 1 issue.

Looks like I need to reflash Boot.img but I cannot retrieve it.

How can I get this file?
[Magisk] RandomPooka:
Flash the ROM without wiping data, and it will overwrite the messed up boot.img with the original boot image that was packaged in the ROM without destroying your user data
[Magisk] mcgyver83:
I did it, reboot directly again into recovery but I still have the same error.

Now I'm try to reboot into system and come back to recovery to try to flash magisk

Again same errors:

"Unable to repack boot image!"

"process ended with ERROR: 1"
[Magisk] amg314:
Flash original boot.img first and then magisk.zip (without reboot)
[Magisk] mcgyver83:
What do you mean for "original boot.img"?

The one from stock ROM?

I tried flashing CM13 and Magisk without reboot but same issue

I see "Stock boot image detected" message in log
[Magisk] amg314:
Original=stock))
[Magisk] mcgyver83:
Where can I find the stock boot.img file?

If I decompress stock firmware I get:
[Magisk] guest4711:
The module version you mentioned does not work on my devices where I need it - I tried that weeks ago. Without sleep command it dies not work, too. It's working with sleep 120 or when called from another program after boot complete, e.g. KernelAdiutor.
[Magisk] RandomPooka:
I'm not sure I'm understanding you correctly. Are you trying to run a custom ROM (CM13) with the factory stock boot image from the manufacturer? That will not work. If you mean the boot image supplied with CM13, that's definitely not 'stock'.
[Magisk] amg314:
You should flash factory=stock=original boot.img from your stock ROM using TWRP (best choice), special flash tool like Odin, SP Flash tool, etc, or fastboot. After that (without reboot to system) install latest Magisk.zip.
[Magisk] mcgyver83:
I flashed CM13, configured the smartphone and it works.

After I want to root the phone so I tried to flash Magisk 20.4

While flashing with TWRP i see these logs:

"Stock boot image detected"

"Unable to repack boot image!"

"process ended with ERROR: 1"

What I can do?
[Magisk] Didgeridoohan:
There are a lot of confusing things posted right now... What you should start with is to post your recovery log so we can see what's actually going on. Instructions, if needed:

https://didgeridoohan.com/magisk/MagiskHelp
[Magisk] pndwal:
I don't want to debate this - only to shed some light...

That's pretty much Google's stance. Note the following Twitter conversation:

Seems, as one can imagine, Google is torn when it comes to what's in everyone's interests, not least their own.

Security centric App developers are more and more requiring secure environments for their Apps to run in, which is precisely why many don't use Google's flawed (till now) SafetyNet attestation, opting instead for their own more reliable checks for root / mods / tampering. All this because Google has let custom modders "subvert the security model" for yonks (a considerable time) now.

This state of affairs however, is clearly far from ideal in the eyes not only of the developers, banks etc, but now in the eyes of many businesses and corporations also. I have friends who have been required to ditch their Android devices and use company issued iPhones because of the lack of confidence in Android ecosystem security, and this is apparently becoming common. Apple's closed source and in house code and encryption techniques commonly makes theirs the mobile platform of choice for security concious entities, - even criminal organisations! ...also, Apples resolve in the face of even federal efforts to get past such security has additionally given them a greater march on Google in the public's perception.

Realistically, Google is pretty much forced to play catch-up considering the stakes.

All this said, fixed CTS and SafetyNet can be seen to be in the interests of security concious corporations and their customers who are moving to Apple in droves for security (- even John Wu, creator and purveyor of the SU kit which Magically and Majestically elevated root to the next level in no small part by positioning itself as the chief means of subverting the security model, now works for Apple!!! Another discussion, but didn't Google miss the boat big time there...), so clearly in the interests of Google themselves, and therefore (hate to say it) also of most of US, who want to see Android remain viable, let alone a major player in the foreseeable future.

I personally believe Shawn when he says "The Android security team doesn't want to prevent the use of custom ROMs; we're actually quite supportive of that, and do a lot of work to ensure that remains possible". After all, custom development has been good for Google. However, when considering the bottom line their lovalties are necessarily torn, and they clearly need to strike a balance. Seems to me we've been spared till now while Google has postponed the inevitable, but don't think we're going to be able to continue to have our cake and eat it too.

So, EVERYONE'S interests hang in the balance... Just hope Google strikes the right one. :eek: PW
[Magisk] mcgyver83:
Many thanks.

Attached logs
[Magisk] Didgeridoohan:
I don't see anything in there about installing Magisk. The log needs to be saved directly after trying to flash the zip.
[Magisk] mcgyver83:
Sorry, I cut the lines by mistake

Now in the log there is the error: 1 message
[Magisk] Didgeridoohan:
Yeah... There are a few issues in there. Possible incompatible image header and a couple of segmentation faults.

Could you extract the boot.img file from the ROM zip and patch that with the Manager (and then provide the install log), just to make sure that it isn't something that's caused by your TWRP.
[Magisk] Isnaiter:
Modules installed on Magisk works only if Magisk itself is installed, right?
[Magisk] wikiuse:
My English is not good

Hi, there

Some module I added in Magisk, but when my device is reboot, the module has gone out although flash sucessfully?

I need a answer!
[Magisk] zgfg:
Are you installing modules from Magisk Manager (not from TWRP)?

When you reboot, check in Magisk Manager if modules are installed

Most modules have no UI, hence don't expect an icon to be installed for the module
[Magisk] mcgyver83:
My issue is to get boot.img from custom rom CM13.

I unzipped the package but no boot.img file.
[Magisk] Didgeridoohan:
If you can't get the boot image, try making a backup of the boot partition in TWRP and patch that.
[Magisk] vaah:
there's this one app that I want to use but it seems to detect the presence of magisk/root. My other banking apps and payment apps have no problem. I run Android 9 AospExtended rom. The app having problem is cashbac (yes, without k at the end). Url link to the app in google play -> cashbac

The cashbac app runs fine in stock unroot rom. any help is appreciated.
[Magisk] Didgeridoohan:
Make sure MagiskHide is enabled (toggle it off and on again if it is), that the Manager is repackaged with a random name and that the app is added to the Hide list.

More details and tips here:

https://didgeridoohan.com/magisk/MagiskHide#hn_Hiding_root_from_apps
[Magisk] mcgyver83:
Ok, I did it, I have a file named boot.emmc.win

After in Magisk Manager I followed the "Install Select and Patch a File"

Flash started but failed.

There is a simple "disk" icon top right of the screen, pushed but I cannot understand where logs are saved :(
[Magisk] Didgeridoohan:
There should be a small flash window that informs you where the log is saved. If you haven't changed anything the default location is in Download.
[Magisk] mcgyver83:
In "Settings" "Download path" is the folder "download" but no flashing window appears :(

No log file in download folder :(
[Magisk] wikiuse:
I downloaded some modules in XDA and installed in magisk manager. Then my device reboot and I didn't see none of module!
[Magisk] zgfg:
Modules usually don't have UI, hence you will see no icons.

Check in Magisk Manager, under Modules, are they lusted as installed
[Magisk] Didgeridoohan:
Hm... Which Manager version are you using? If not already, try the Canary: https://github.com/topjohnwu/magisk_files/raw/canary/app-debug.apk
[Magisk] Didgeridoohan:
If the already given advice doesn't help you, make sure to upload logs next time.
[Magisk] mcgyver83:
Done.

Same error.

When I press the "bug" in the homepage I see "Magisk logs are empty,that's weird"

Could be that I'm using boot.emmc.win (from boot partition TWRP backup) instead of an .img/zip file for the patch/flash process?
[Magisk] guest4711:
So these modules may be too old for your version of magisk.
[Magisk] dtrail1:
problem. I just noticed that Magisk doesn't seem to prompt any su requests anymore, while the already accepted requests from before are still working. I cannot give new apps root access anymore. The log says only: "su request rejected", no matter the settings.

Ok, then I had a closer look and saw that it actually doesn't fetch the updates anymore, no matter what repo I select. Then I manually downloaded the latest versions, both the manager app and the framework, and flashed it via TWRP. The result was in Magisk manager it shows me "Magisk not installed". Weird. I was using builds from Ianmcd, where the last one is now 7 months old.

Ok, so I visited the official repo and downloaded that one. Before flashing I have uninstalled the manager app. After the flashing process and reboot, Magisk was working again, with all my modules. But it still didn't recognize my su requests (priorly given access still working though). I saw then that it shows me that Magisk and manager is up to date, while the manager app version is "7.2.1" (installed) and "7.5.1" (latest). So it's an old manager app that is installed, but it shows up to date anyway? Also when I change the repo to beta or canary or whatever else, it doesn't seem to be able to fetch the available builds, because it's searching for updates forever.

I guess I should perform a clean re-install. And I tried it already. However, the uninstaller zip file gives me an error "cannot access /data". Possible solutions I found via Google don't seem to be very good. My next step would be to remove the manager app, flash 20.4 again (which comes with 7.2.1 manager app versions for whatever reason) and uninstall it from the manager. Then I will do a clean installation from scratch. But before I do this, I want to wait for someone more experienced who could give me some suggestions. Thx in andvance.

Btw, my device is Huawei P8 Lite 2017 with Android 9. And that might be the reason for the uninstaller problem in TWRP. This device has a different file structure, which is also the reason for us not being able to perform a normal full wipe. The /data partition is handled different, and a wipe of /data breaks it entirely, which then leads to a full re-flash of the rom. But since that doesn't affect the installation of flasheable zip files in TWRP (Magisk can be flashed as normal and works) I'm not sure why the uninstaller cannot access /data. Any custom rom creates and mounts a data partition that can be accessed like on any other device. I don't know..

Update: Ok, I was able to uninstall the manager app and install the lastest one 7.5.1 and now Magisk manager shows everything is up to date and working. And yes, everything is working indeed - again! I don't know what that was... but it works :)
[Magisk] ticktock666:
Hi, I'm planning on creating a magisk module to try and fix an issue for my sony z2 on Android 10 ROM, and I just want to ask a couple of questions:

- Can magisk be used to systemlessly add files under /system/etc/firmware in Android 10? Since system can't be mounted as rw in Android 10, would this work?

- is there a module size limit for magisk? The files I'll need to include in the module would be around 30mb, would that cause an issue?

Any advice would be much appreciated on this matter, I'm a total noob when it comes to creating magisk modules, I've started reading the wiki and help, but any tips or links to other good reading materials would be much appreciated.
[Magisk] wikiuse:
No. modules is latest version

I need a answer

---------- Post added at 03:00 AM ---------- Previous post was at 02:56 AM ----------

Yes, I know that. But I didn't see module I had installed in Magisk Manager
[Magisk] martyfender:
Don't keep hitting submit reply, once is usually sufficient, even if it doesn't appear to work.
[Magisk] JudgeDread11:
Also maybe you can edit these posts?

Anyhow, maybe a silly question but does your manager have storage permission?

If you check with a root explorer in data/adb/modules, are your modules there?

If not then check the same path in TWRP.
[Magisk] Didgeridoohan:
[MENTION=9327352]earlrobes10[/MENTION] That module is outdated and can't be installed on current Magisk versions (at least since v19, probably earlier). It would need to be updated to match the current module installer layout:

https://topjohnwu.github.io/Magisk/guides.html#magisk-module-installer
[Magisk] m0han:
it pays to wait a bit before hitting that post/submit button repeatedly.

btw, you might want to peruse this thread: https://xdaforums.com/showthread.php?t=1699450
[Magisk] DiamondJohn:
The following thread would be your best bet.

https://xdaforums.com/apps/magisk/announcement-telegram-magisk-module-t3846678

My tip, try it and see. You do not have to create an install zip, just create/modify a module in /data/adb/moules, and see if it works.
[Magisk] Didgeridoohan:
[MENTION=9643797]wikiuse[/MENTION] You forgot about this post: https://xdaforums.com/showpost.php?p=82219435&postcount=39337

Hint: Logs

And yes, XDA is quite finicky these days. Even though it doesn't seem like a post went through, it usually did. No worries... You can simply edit your post and remove the excess.
[Magisk] Didgeridoohan:
Since you don't actually have Magisk installed, it is quite expected to not have a Magisk log.

As previous, the install log would go in Download (on the default settings) when you press the "save" icon after attempting to patch the file.

It shouldn't matter what the file is named, as long as it is the boot image, but you could always try renaming it to boot.img. Wouldn't hurt...
[Magisk] zgfg:
Thanks for the hint, I forgot that TWRP backup boot.emmc.win is indeed a raw image file of the boot partition, as well as ramdisk.emmc.win is the image of ramdisk.

(Ofc, it depends on device does it have Boot or Ramdisk and hence which one has to be patched)

A practice helps to memorize, so I successfully tested right away with my Huawei P9 (Oreo, Ramdisk) and Xiaomi Mi 9T (Q, Boot)

Image file name and/or extension doesn't matter, renaming will not help or hurt.

But check in Magisk Manager how does the output read - successful patching should look like on the screenshot.

You can press Save icon top-right to save the log

And sorry but one stupid hint (I've seen people making mistakes with that), the patched image file is not overwritten to the original boot/ramdisk/recovery stock image file you submited, but the resulted patched file is saved to Internal memory, Download folder, under the name magisk_patched.img
[Magisk] ppp86:
Hello, I never had problems updating Magisk before but with the lastest update (from 20.3 to 20.4) I have this error : https://imgur.com/hbbrgL4

the log : https://imgur.com/xW94HkV

Magisk manager is up to date (7.5.1)

Note 4 on stock rom android 6.0.1

I have no clue why it's happening and how to fix it, any idea ?

Thank you.
[Magisk] wikiuse:
At first, I sorry my post beacause my network made a problem!.

I checked in Root Explorer and TWRP but. I didn't find modules had been installed.

My English is not good.

Thanks!

---------- Post added at 09:25 AM ---------- Previous post was at 08:59 AM ----------

I want to install FDE.AI in Magisk Manager, but it show "the kernel block this module. Please get better kernel."

What should I do?
[Magisk] zgfg:
If you have a problem with network and you hit to post several times, please check and edit your post later and remove duplicates

Anyway, by looking around I see you have A50(SM-A505F) - sorry, I'm not familiar with Samsung, but do you get the same error if you try to install some other modules like BusyBox NDK or Vanced YouTube.

If you have the same problems for all modules then there is some problem with the combination of your ROM or Kernel (as the error says) with Magisk.

You should ask other users of your device which Magisk version they use or how

But if other modules like the two suggested above install correctly, then there is a problem with FeraDroid module (in the combination with your ROM or Magisk version or something). So again ask in your device forum if the other users use that module, is there a workaround to install or maybe an alternative module that can be successfully used instead