yashsingh1/xdaforums huggingface dataset:
[Magisk] J.Michael:
Maybe you should back up and describe the problem you are trying to solve.

Have you installed Magisk?

Does "su" work?
[Magisk] kalehrl:
I can boot TWRP but data is encypted so I can't copy/replace files in it.

I don't have adb access becasue, as I said, the device is not provisioned and I don't have access to the Adnroid settings menu.

When TWRP is running I also don't have adb access when connecting the box to te PC via USB cable.
[Magisk] badabing2003:
If you're able to flash a patched boot and it starts up, theoretically (not tested) you can unpack the patch with magiskboot, modify the ramdisk and add the entries to /etc/rc.local, repack and flash that.
[Magisk] kalehrl:
I unpacked the ramdisk from my boot.img but, unfortunately, /etc folder is a symlink to /system/etc so it's read from the system partition instead of the ramdisk.
[Magisk] J.Michael:
What is the real problem?

Can you boot to Android? Can you install the Magisk manager app? Can you patch a boot image?

If you install (flash) Magisk, can you boot to Android? Can you use "su" and write to /data/adb/modules?
[Magisk] badabing2003:
You checked the patched ramdisk right?

There should be sytem/etc which shouldn't be a symlink
[Magisk] badabing2003:
He explained it here
[Magisk] kalehrl:
Yes there is system/etc which isn't a symlink. But in that folder there isn't a file named rc.local.
[Magisk] andrewosama1991:
iam use twrp when install canary error : 2 version 27003 help please ramdisk failed
[Magisk] badabing2003:
Try creating it and see how it goes.

If I'm not mistaken (depending on the version of Magisk) there should also be

/system/etc/init/snapuserd.rc

if so you can add a section similar to this and see if it works

on property:init.svc.snapuserd=started
settings put global device_provisioned 1
settings put secure user_setup_complete 1
settings put secure tv_usersetup_complete 1
[Magisk] Iridule:
Canary/debug 27003 ruined shamiko and it was a pain to downgrade back to 27002. Even with the latest shamiko it didn't work with Google play services kept crashing. Not sure if I should try again to update or not.
[Magisk] J.Michael:
When will the "initial setup" be completed? Has this box ever been activated?

Never mind installing Magisk. Is this box of any use if all apps are disabled?
[Magisk] kalehrl:
The box is usable when it is activated by the company. Otherwise when you finish initial Android TV setup, there is just a factory app screen with activation code. Google assistant, home button don't work because the app prevents those actions. I'm positive issuing those commands will enable home button to exit to the normal Android TV launcher.
[Magisk] kalehrl:
/system/etc/init is empty except for 'hw' folder.

In it there is init.rc, no snapuserd.rc
[Magisk] J.Michael:
Why hasn't the box been activated?

What are you hoping to do with an unactivated box?

Re: @badabing2003's suggestion that you "just create" some file that is not already there: Some init scripts run all scripts in some directory. You are in a position to see if some script that *is* there runs all scripts from some set of directories. Failing that, just creating a file some people thought you already had is something to try. It's a trade-off between the time it takes to try yet another filename, and the time it takes you to crawl through the unpacked ramdisk to trace your way through the init process. Assuming "init" is a script. Otherwise, you have to look at every script you can find without knowing for sure that it is even used.

/system/etc/init is a good place to start looking. Tell us what you *do* have there. And tell us what is in the ramdisk -- that's where you are expected to have the most luck inserting a file.

(In principle you could modify the system partition, but then you'd have to deal with the signature checking that is almost certainly being done.)
[Magisk] kalehrl:
I have just hw folder with init.rc file in it.

I tried modifying system partition and flashing it but the box wouldn't boot probably because of the modified partition.
[Magisk] kalehrl:
When your contract expires and you reset the box, it becomes unusable and requires activation even though you paid for the box and didn't have to return it to them.
[Magisk] J.Michael:
What was involved in resetting the box? Was this forced on you when the box realized it was out of contract? Did you choose to do it?

Have you tried calling them to have them "reactivate" your box without a subscription? Or asked them to refund the purchase price of the box they have rendered useless?

What are you hoping to do with a box with no subscription?

Anyway, now show us what is in ramdisk/system/etc and ramdisk/system/etc/init/hw, and subdirectories. Maybe skip a few cycles by examining the files to determine which are scripts. And/or zip the ramdisk/system/etc subtree and post it -- someone might be inspired to look at it.
[Magisk] kalehrl:
Just normal factory reset from the menu. No, a family member accidentally reset the box and now it's locked. It wasn't forced. They don't listen, and want us to renew subscription. Just run it as a normal Android tv box like before.
[Magisk] badabing2003:
You have to experiment and test, that's the only way you can find out if it would work.

Try adding them to the (only in one) and see what happens

on init

on boot

or on late-init
[Magisk] J.Michael:
I don't know what a normal Android TV box can do. Does this subscription involve the delivery of premium content?

Maybe, instead of struggling to patch their deliberately crippled system, you should be struggling to find another ROM. Is there an XDA thread for your device?
[Magisk] kalehrl:
EON Smart box SDMC SDSTB02, bypass EON activation screen

I've got this smart box but I'm unable to get past EON activation screen upon boot. Does anyone know how it can be done? I can boot TWRP for S905X4. The box is recognized by Amlogic burning tool 3.2.0 when connected to the PC with the reset...

xdaforums.com
[Magisk] J.Michael:
So, what happens when you try the procedure that made @NetYarozeGR so happy?
[Magisk] kalehrl:
I can't solder unfortunately.
[Magisk] J.Michael:
Somebody mentioned the possibility of using probes if you aren't comfortable soldering. Not sure how you hold the probes in place.

Sounds like your best option is waiting for a free trial period.
[Magisk] SteweEliteModder:
Latest canary version (27003) is working now with the Samsung Galaxy S22 Ultra 👍
[Magisk] checho_85:
Hello,

I have issue with my device after trying to install Magisk.

I did download v27 and installed it on Galaxy S8 (G950F).

Ramdisk was Yes.

OEM lock: OFF

KG: Checking

Then I downloaded the following Rom: https://samfw.com/firmware/SM-G950F/BGL/G950FXXUCDVG4 and install it according to the instructions. Installation went OK, the device booted and Android started. I used family control profile if this is of help.

Then I rebooted the device and it ended up not able to start with a message "Custom binary blocked by RFP lock".

I would have flashed the original files, but the instruction explicitly stated not to.

I thought that the downloaded firmware may be bad - as I can now see in Download mode that both RFP and OEM unlock are on, therefore I should download the firmware elsewhere (e.g. Frija), however that will again be the original one and not the patched one. Not sure if I can patch it with magisk on other device...

What can I do?

PS. RFP was off before flashing.
[Magisk] J.Michael:
If you know what ROM was on the device when it worked, try flashing that ROM.

Do not talk about installing Magisk until you have a working device.

If you had identified the original ROM, someone could probably tell you that you tried to "roll back" something. Maybe the bootloader. Maybe the Android version.
[Magisk] checho_85:
I know the device params, so I got the rom this time not from this website. Flashed it and got the device back to working state.

I got confused because the instructions said not to do it, but it worked.

Starting over again.

Thanks for your help!
[Magisk] J.Michael:
I've seen the warning that once you have installed Magisk you must never flash the unmodified AP. I have some sense of why you must always flash at least boot, recovery, and vbmeta. (This was assuming that you had to install Magisk into recovery. If you don't install Magisk into recovery, I don't know whether Magisk will still modify recovery.)

But I have always assumed that you could always flash an original (as in, the way it came from the manufacturer) ROM. Except, of course, for the "don't try to roll back the bootloader" and, more recently, "don't try to reduce the Android version". And I think you can reduce the Android version if you install a custom ROM, but I've never done it and it could blow up in your face.
[Magisk] pndwal:
Nice new-look readme.md changes for Magisk main page!

Clearer detail for downloads, direct links for Zygisk module sample and latest Canary channel changelog + resources for Translation Contributions. 👍 PW
[Magisk] wombatch:
Hello, I am hoping someone can help me. I have a Samsung SM-T510 that has been running lineage with magisk for years, I am not a big fan of upgrades so it is still on android 10 but does all I want.

In the last couple of days I had a problem with an app detecting root so I thought I would upgrade to the latest Magisk (V27). The log seemed ok except that now I no longer have root and I don't seem to be able to get it back.

It is a long time since I originally installed the ROM and I can't remember exactly what I did but trawling through the forums I have tried;

magisk patching my recovery (TWRP) makes no difference or hangs.

magisk patching the boot.img makes no difference at all.

I am really confused, maybe that I am doing everything wrong but from what I can see magisk has to be installed in the recovery, i am not clear how this ever gets picked up by the system though because for years I have never had to go through recovery to be able to use root in the android system.

Anyhow, since I tried what for previous versions in the past has usually been a painless but nail-biting operation of upgrading magisk I no longer have root and I seem to be making no progress to resolve this.

I saw that I can rename magisk to "uninstall.zip" and flash it to unstall maybe this would help to clean up the mess this upgrade made but where would I flash it to, recovery (using odin) or system using TWRP.

Getting desperate so any help greatly appreciated.
[Magisk] zgfg:
You probably do have a root but you had your old Magisk app hidden and you didn't U hide Magisk app before upgrading

What to do and how - please search through the thread, ppl very, very often report the same problem and get answers how to test and fix (find your repackaged and hidden/renamed Magisk app and restart/reinstall new Magisk app; test from Terminal Emulator magisk -c, etc)
[Magisk] dimm0k:
[MENTION=1162986]Captain_Throwback[/MENTION] any idea why mounting /data/magisk_merge.img fails when attempting to install modules or is this something [MENTION=4470081]topjohnwu[/MENTION] has to look at?
[Magisk] abe.froman:
Like most people here it seems, I keep losing root. A restart doesn't seem to work for me. I have to disable magisk hide, uninstall the superuser module, reboot, re-flash superuser in recovery, and finally re-enable magisk hide with another reboot. I have no problems with doing all that until a solution is found, so just rebooting sounds like a piece of cake.
[Magisk] Captain_Throwback:
He will have to look at it.

It sounds like your device has something else going on. I'm assuming you already posted the advanced Magisk logs and logcat from bootup for this issue?

The one thing I've noticed when losing root (@topjohnwu actually pointed this out to me) is that adb should still be able to get a root shell prior to rebooting. So grabbing the Magisk logs and a logcat should still be possible from a PC.
[Magisk] ericotena:
Looks like I lose root also after quite sometime. Flashing the superuser zip fix the issue though.
[Magisk] yochananmarqos:
I'm not sure what happens other than SafetyNet not passing out of the blue. I still had root access.

I thought maybe this bit had something to do with it as I hadn't noticed it in the log before:

MagiskHide: Disabling for process=com.google.android.gms.unstable, PID=8286, UID=10018
MagiskHide: Unmounted (/sbin)
MagiskHide: Unmounted (/magisk)
MagiskHide: Unmounted (/system/xbin)
MagiskHide: Unmounted (/system/etc/hosts)
[Magisk] Captain_Throwback:
That's not an error - that's Magisk Hide working ;).
[Magisk] KalayZ:
Well I use stock rom all I did was flash magisk uninstaller, then I did flash magisk v9 and after that superuser.

But I get cts fail so maybe I did something wrong ask a persin who knows it better than me.

I'm sorry I can't help you any further.
[Magisk] sk8lucas:
Having errors on G935F nougat ROM.

Magisk log:

** Magisk post-fs mode running...

** Magisk post-fs-data mode running...

Preparing modules

Bind mount dummy system

Bind mount module items

Enabling systemless hosts file support

Mount: /magisk/.core/hosts

Bind mount system mirror

Mount: /system

Bind mount mirror items

** Magisk late_start service mode running...

service: /magisk/phh/service.sh

phh: Live patching sepolicy

phh: Mounting supath

phh: Starting su daemon

** Removing tampered read-only system props

** Starting Magisk Hide

MagiskHide: Error occurred...

Logcat:

http://cloud.tapatalk.com/s/582df7851bdbe/2016-11-17-15-30-26.txt
[Magisk] michel sedgh:
Hey I wanted to ask about something. What will be the next step for SafteyNet to check if we are modding the device? Is the last thing they can do is to check for unlocked bootloader?
[Magisk] Captain_Throwback:
We won't know the answer to this until they update it again...anything else is purely speculation.

Personally I never expected them to start checking for unlocked bootloaders, so whatever they do next I'm sure will be just as surprising.
[Magisk] michel sedgh:
Hm, wasnt it easier for them to just make android pay's security higher than to do this?
[Magisk] Captain_Throwback:
Android Pay isn't the only app that uses the SafetyNet API. You should read up on it ;).
[Magisk] michel sedgh:
I know, pokemon go is another huge app that uses it plus a few banking apps. Snapchat used its own verification idk what that is but I thought the main thing that they developed SafetyNet was for Android Pay.
[Magisk] Abhi142:
Can u tell me how u installed it? Plz help me i'm facing bootloop
[Magisk] michel sedgh:
Try doing this: install rom and gapps boot and setup then install magisk v9 then phh superuser and reboot. Install magisk manager and you should be good to go.
[Magisk] Didgeridoohan:
I installed by following the instructions in the official announcement thread...

If you do that and you're having issues, you should provide some information: device, rom, what mods if any, what you've done to install, provide logs (recovery log, magisk log, logcat) and so on.

It's hard to help someone without information about the problem.
[Magisk] michel sedgh:
I faced bootloops using SuperSU as well. I think SuperSU has a bug or something.
[Magisk] Devo7v:
I've been using Magisk successfully with my Xperia Z5 and a custom kernel. I've recently tried to use a patched version of my stock kernel, but when I try to flash Magisk v9, my phone will no longer boot, I can only boot into recovery. I have system checks disabled in my kernel, so that should not be the problem, but I'm wondering if the version of TWRP that comes with the kernel is the issue.

Are there specific requirements or versions of TWRP that are necessary to successfully flash Magisk?
[Magisk] Captain_Throwback:
TWRP 3.x is required. But I'm not sure that it would change how the boot.img is patched. Comparing the recovery logs from the flashes to see what's different might shed some light on your issue.
[Magisk] return.of.octobot:
It appears that you're correct, I probably should have thoroughly tested the outcomes before I got myself worked up over reports of system app modules failing with v9. I can only speak from my own experience, but I will provide a link to one of my personal modules that installs a gang of apps to system. This was designed for v8 and earlier, but appears to be working fine with v9 as well for anyone who may be having issues and would like to use this as a template. I will at some point be going back through and updating the module to match the latest magisk conventions but for the time being, if it ain't broke...

https://drive.google.com/file/d/0BzK7v8ZScnngYWlrYk5EX2E4a2c/view?usp=drivesdk
[Magisk] J.Michael:
Please explain "magisk patching my recovery (TWRP) makes no difference or hangs."

Are you able to boot to Android right now?

What makes you say you have "lost root"?

First, did you ever "hide the Magisk app"? Like @zgfg said, a lot of what you report sounds like that.

I think it is a bad idea to patch both boot and recovery. If you mean you tried each, at different times, what was the last way you tried?

If Magisk is installed in recovery, you need to boot as if you are going to recovery, but release the buttons soon enough for Magisk to not see the buttons being held down to get Magisk to keep control and boot to Android. The button dancing is touchy, but there is never any doubt about whether an attempt succeeded: if you hold the buttons for recovery and you end up in Android, you have succeeded.

You may not have had to struggle to boot Magisk for years. When I installed Magisk on an SM-T290 I was expecting to have to struggle every time. It turned out that after the first successful boot, even powering down and then rebooting still gets me to Magisk.

If you treated the Magisk upgrade as a new installation (which I think is really the only option if Magisk is installed in recovery), maybe you missed the step where, after using Odin to flash the patched AP (et al.), the next boot must be to recovery.

You would be better off in a thread devoted to your device.
[Magisk] Nergal di Cuthah:
Did the update for canary fix the hide magisk with a new name bug? I don't use the feature but am interested for helping others.
[Magisk] bombadier:
No, on 27003 you still need to unhide before patching or it will fail
[Magisk] Nergal di Cuthah:
Nope, not that bug. Previous canary couldn't rename (debug could and was fixed in code but not committed) that's the bug i mean.
[Magisk] bombadier:
Ah sorry misread what you were asking, yeah the hide magisk app bug seems fixed on 27003
[Magisk] zgfg:
Don't expect that bug wouldl be ever fixed. It's around literally for years😁

I wouldn't be surprised if searching in this thread would find a bunch of posts about back when Magisk v24.7 was released, or v25 or so. When it appeared first time many users slipped on, but over time most learnt about and posts became relatively rare. There were also some fixes but the bug was never fully extinct
[Magisk] wombatch:
Thanks for your reply. I did put something in a forum for the device but the device is old so the forum is not really active now. For me the principle must be the same for all "SAR" systems so I was hoping here to get an understanding of how it was supposed to work in order that I could make some progress.

From reading it seems that for these "SAR" systems we only ever magisk patch the recovery and then some magic/sk means that whenever I boot android I am actually using the recovery boot image to boot the main Android system?

Anyway, to answer your questions, no magisk was not hidden when I did this (I have been caught on other systems by that).

Yes android still boots, I got a copy of a checker called "momo" and that says "The environment is abnormal" followed by..

Detail:

Found executable file su

SELinux rules are modified

Found Magisk

Data not encrypted, mount parameters are modified

Device is running a custom ROM

Suspicious Traces:

Debugging mode is enabled

Found Magisk or TWRP files

Bootloader unlocked

The patched TWRP that hung, I patched by patching the TWRP image for the TWRP i am currently running, rebooting that hung and I had to recover by getting back into flash mode and flashing an unpatched TWRP.

I have read this evening that I should be decompressing the recovery img file and then patching the result can that be it?

The whole thing is very frustrating i am wondering if i got caught by https://github.com/topjohnwu/Magisk/issues/8177 and have made it worse by trying to recover from something that wasn't such a serious problem.
[Magisk] zgfg:
Sorry if you described but I missed.

What is your phone, which year the model was released and what was the original Android version the phone was released with (you can find that info on eg GSM Arena)

Asking that (and not what is the Android version of your current custom ROM) since that can matter, you might have the phone for which Magisk reports Ramdisk no (yeah, provide also the screenshot from your Magisk app), although it does not require patching/flashing Recovery but the Boot partition (although showing Ramdisk No it would still find Ramdisk in the Boot)

Also, do you have Boot and Recovery (or only Boot), is your phone A/B?

You can recover your Recovery simply by Fastboot flashing the original Recovery ing

Also, you can always test patching the Boot img from Magisk app - if the patching screen shows that Ramdisk was found and patched - then, that's it, irregardles of 'Ramdisk No' (if the Magisk app says that), you can safely install Magisk to Boot.

After successfull patching, you can test by temporarily booting to:

fastboot boot <patched-boot-img>

If you install from TWRP, you have no choices, Magisk will force installing to Recovery, even if (as described above) in some cases installing to Boot works (and then, it's automatically better than installing to Recovery)

Btw, dis you previously had hidden your Magisk app (and you did not un-hide) and what does it respond on

magisk -c

in Terminal Emulator

---

Btw, if you installed Magisk to Recovery, you must boot to Recovery to boot to Magisk. By normally booting to Boot you obviously would not boot to Magisk since Magisk was not installed to Boot

---

Momo reports everything. Many things can be hidden but not all. Lot of ink has been spilled here and everywhere about hiding from Momo, hence I will not waste time/space again about.

But for example, TWRP found can be hidden simply by deleting the TWRP folder from Internal memory

Found custom ROM you will not (simply) hide- you should ask developer to hide his 'fingerprints' proudly presenting his custom ROM

There is another thread on XDA about HMA = Hide My Apps, from OP post #1 you will find a link to GitHub ReadMe with lot of hints how to hide (some) things. However, it's little outdated now, I doubt you will find about APatch, Zygisk Assistant and other state-of-the-art techniques, but it shall be good for the beginning (and to better understand that apps can seek for various hints and traces letting them to report 'root'). Probably half of what Momo reports, you could hide (simply or not, depending about someone's familiarity, but that's the purpose of the lifelong learning - in this game of mice and cat, things are changing quickly, what was 'in' couple of months ago now could already becone useless)
[Magisk] wombatch:
ThanT

Thanks for all that information, I'll look at it again as soon as I can, sadly all my IT has been re-priorised by a cup of coffee on my laptop!

Great week!!!!
[Magisk] andy356:
@osm0sis Could you please confirm if this is the current best practice when using LineageOS with Magisk? :

A/B device:

- Flash zip in LOS recovery. Open Magisk app and flash Magisk from inside it again.

- And then never think about Magisk again. It works. LOS OTAs work.

- The only time Magisk need to be reflashed is once a year, for major LOS version upgrades, because they are done via adb sideload.

A-only FBE device:

- Flash zip in LOS recovery. Open Magisk app and flash Magisk from inside it again.

- Repeat these steps after every OTA.

- So every LOS OTA requires 3 reboots: 1st for LOS itself. 2nd for flashing the Magisk zip. 3rd when Magisk re-installs itself via the app.