yashsingh1/xdaforums huggingface dataset:
[Magisk] DiamondJohn:
Rooting a device is not meant to be easy. Google have explicitly gone out of their way to stop it, at least to make it hard(er) for people who dont have the technical abilities to understand the consequences of rooting their device.

If it was too easy (ie google made it too easy) then some ma & pa users might accidently root their device. I know every now and then I have to correct/fix my fathers device because he has accidentally switched something on or off he did not understand.

Then its the whole practicality of the physical device and how the OS / firmware is constructed and put onto the device. Its not a box of sand, its full of highly complex electronics.

see above. Once you have done it and understand why you do each step, its actually far from "atrocious". Especially considering the other option not gaining root.

And there is always the option, if you see a weakness (ie its atrocious), you can always start or simply use an easier way. And hence the link provided above.

In simple terms, that even I can understand

The Magisk app is NOT root and does not enable root, it is basically a manager of root, ie a GUI to make allowing root for a specific app easy (and other things such as installing modules & viewing logs & patches boot images etc etc)

ROOT is achieved by the magic contained in your boot image, and hence you have to PATCH & flash the patched boot image. "Patching" modifies / inserts code to enable root. Its the TWO parts that work together for a "useable" root

So in summary, its a three step process (a lot less "atrocious" than flashing a custom ROM))

Install Magisk APK

Patch the existing boot image

flash the Patched boot image onto the device

PS: although I dont think the devs are here, calling it "atrocious" is a little disrespectful and un appreciative.

PPS: I havent looked into it, but there is another android root method that is gaining a following. Maybe its a little less "atrocious" for you

EDIT: The other rooting option is called KerenelSU
[Magisk] pndwal:
Re Refactor zygisk to use native bridge to inject #6659 opened on Mar 2 by yujincheng08• Approved

These adjustments just made:3 hours ago:

Inject zygisk.rc for sync --zygisk-restart

d123b9e

Clean up codes

3ef1c06

Refactor zygisk to use native bridge to inject

0e65775

Refactor hookJniNativeMethods

9bd5ae7

Fix zygisk when LoadNativeBridge is inlined

f4df93c

Current checklist complete:

Only 2 reviews pending!

... Public 27.0 getting closer... (Likely after Canary build(s) w/ NB-Zygisk however.)

👀 PW
[Magisk] ipdev:
OOPS. :oops:

I though I attached the fstab files to my previous post.

12.1.0 (SP2A.220505.008, Sep 2022)

- bonito-sp2a.220505.008 is the final flashed official release for Pixel 3aXL.

pixel-fstab.sdm670.txt

lineage-19.1-20230603-nightly-bonito-signed

los-fstab.sdm670.txt

---

If I try to put a file in system/etc it errors out with a Read-Only message.

bonito:/sdcard/Download $ ls -la
total 65607
-rw-rw---- 1 root everybody 67108864 2023-06-11 09:56 boot-lineage-19.1-20230610-nightly-bonito-signed.img
-rw-rw---- 1 root everybody 0 2023-06-11 12:05 emptyfile.tx
drwxrwx--- 3 root everybody 3488 2023-06-11 11:09 xfiles
bonito:/sdcard/Download $
bonito:/sdcard/Download $ cp emptyfile.tx /system/etc/
cp: /system/etc//emptyfile.tx: Read-only file system
1|bonito:/sdcard/Download $ su
bonito:/storage/emulated/0/Download # cp emptyfile.tx /system/etc/
cp: /system/etc//emptyfile.tx: Read-only file system
1|bonito:/storage/emulated/0/Download # exit
1|bonito:/sdcard/Download $ exit

I am not sure why AdAway can write directly to the hosts file on Lineage devices.

¯\_(ツ)_/¯

Cheers. :cowboy:
[Magisk] ipdev:
OT but, for a bit of fun and distraction. 😉

Toolbox - [android.googlesource] - Link

Toybox was included in AOSP in 2014(?).

Toybox - [android.googlesource] - Link

Busybox fills in all the extra bits. ;)

About - [busybox.net] - Link

---

Pixel 3aXL

Lineage 19.1 (20230610)

OpenGApps 12L (nano?)

Magisk - Current version.

bonito:/ # which toolbox
/system/bin/toolbox
bonito:/ # which toybox
/system/bin/toybox
bonito:/ # which busybox
/system/bin/busybox
bonito:/ #

bonito:/system/bin # ls -la | grep "toolbox" | grep "^lr" | wc -l
6
bonito:/system/bin # ls -la | grep "toybox" | grep "^lr" | wc -l
174
bonito:/system/bin # ls -la | grep "busybox" | grep "^lr" | wc -l
194
bonito:/system/bin #

Toybox 0.8.4-android multicall binary: https://landley.net/toybox

BusyBox v1.36.1-osm0sis (2023-05-25 10:16:11 ADT) multi-call binary.

BusyBox is copyrighted by many authors between 1998-2015.

Licensed under GPLv2. See source distribution for detailed copyright notices.

bonito:/system/bin # ls -la | grep "toolbox" | grep "^lr" | rev | cut -f3 -d " " | rev >/sdcard/Download/toolbox.tx
bonito:/system/bin # ls -la | grep "toybox" | grep "^lr" | rev | cut -f3 -d " " | rev >/sdcard/Download/toybox.tx
bonito:/system/bin # ls -la | grep "busybox" | grep "^lr" | rev | cut -f3 -d " " | rev >/sdcard/Download/busybox.tx

Attached.

Cheers. :cowboy:
[Magisk] zgfg:
Btw, toybox applets/utilities are generally lightweight:

What is toybox?

"It's simple, small, fast, and reasonably standards-compliant"

There are about 150 (depending on TB and BB versions) utilities common both to ToyBox and BusyBox

Also, not all toybox applets are installed (linked) to /system/bin

If you call toybox --list you will see the list of all applets supported by TB binary

Eg, getfattr is not installed (linked) to /system/bin (you cannot call as getfattr) but it's supported by the binary - you can run as toybox getfattr --help
[Magisk] zgfg:
Btw, by use of Magic OverlayFS:

GitHub - HuskyDG/magic_overlayfs: Make system partition become read-write (it is also possible without Magisk)

Make system partition become read-write (it is also possible without Magisk) - HuskyDG/magic_overlayfs

github.com

I was able to mount my read-only /system (defined also as ro in fstab - Android 12) as read-write, see:

https://xdaforums.com/t/discussion-...third-party-magisk-fork.4460555/post-88629615
[Magisk] ipdev:
One of the reasons Magisk includes Busybox.😉

This makes sure that scripts always run in a predictable environment and always have the full suite of commands no matter which Android version it is running on. To force a command not to use BusyBox, you have to call the executable with full paths.​

Developer Guides - [github.io] - BusyBox

Cheers. :cowboy:
[Magisk] J.Michael:
My toybox grep (0.7.6-android) supports at least some regular expressions. (I only tried '^d')

For some reason, my system has an actual executable /system/bin/grep (BSD grep) 2.5.1-FreeBSD
[Magisk] zgfg:
Yes.

Btw, BusyBox v1.36.1 provides 358 applets - run busybox or busybox --help and it will list all 358 available

However, the BB module had installed you only 194 of them (see to your bb.txt output you've uploaded) - it did not install the remaining 164.since they are common with ToyBox (If BB module would overwrite them in /system/bin, that would cause bootloops and instabilities)

Eg, if you call which grep and grep --help, you will see.that you still have ToyBox grep - to run BusyBox grep you must specifically call as busybox grep --help

On ROMs that provide both /system/bin and /system/xbin, BB module can install all 358 (360 - depending on BB version) it's BB applets to /system/xbin (not colliding with the pre-installed TB applets in /system/bin)

Btw, it would be useful if Magisk would provide and mount /system/xbin on ROMs that come without that path/directory

---

However, when Magisk runs module scripts (and for its own purposes), it uses its built-in BusyBox (all 360 it's applets), and that is currently BB v1 34.1:

/data/adb/magisk/busybox --help

Also, Magisk runs the scripts from Bourne she'll, not from Bash shell (hence, 'bashisms' are not supported in the module scripts)
[Magisk] zgfg:
Call

/system/bin/grep --help

to see does it print (first line) if it is pre-installed as part of ToyBox

Or call

ls -l /system/bin/grep

to see is it linked like

grep -> toybox

(as the ToyBox utilities are linked/installed)
[Magisk] zgfg:
Sorry, of course that grep (Global Regular Expression Pattern) does support searching for regex (regular expressions) - I wrongly typed something and BB grep accepted that but TB grep did not, hence I made wrong conclusion
[Magisk] alesky0903:
Hello, for a long time I have had this problem with root and bank apps on my (redmi note 8, cr droid, android 13). My mistake was not disabling root when trying to update the rom I had before (evolutionX), from that moment on I had problems with my bank apps, even when I had all the settings to hide root (and even when I completely uninstalled magisk), the banking app detected me as if I had it (as seen in the image). I had to do a hard reset and install a new ROM (crdroid), with that the applications worked for me, but when I try to install the root again and configure everything to hide it, I still have the same problem. Before making the mistake of not disabling root to update the rom, everything worked correctly with the banking apps, with root enabled. I hope you can help me with this, since I have been trying to solve it for a long time. I am aware that it was my mistake (a very dumb mistake) in not disabling root to flash the rom. Greetings and sorry for my english
[Magisk] J.Michael:
What do you mean by "disabling root"?

You are generally advised to uninstall Magisk before trying to update the ROM.
[Magisk] konfuzius4u:
Enable Zygisk in Magisk, install the modules USNF from kdrag0n and Shamiko, configure the hide list in Magisk but do not enforce it, put on the hide list your banking app, Google play store and Google Play Services (enable System and OS apps to see the service).

Reboot

Go to system settings, apps (enable to see system apps) and clear cache AND data for Google Play Store AND Google Play Services and the cache of your banking app (eventually also the data).

Now go your banking app and it will probably work.

I got at least all my different banking apps and even Google Wallet (formerly Pay) to work and to accept my credit cards.

(LineageOS 20, Android 13)
[Magisk] pndwal:
Aside from initial setup issues, be aware that many custom ROMs incl. crDroid integrate their own SafetyNet / Play Integraty deviceIntegrity fixes, many based on @kdrag0n's SNF for Proton.

These are designed for use (passing Google attestations) without root, and there are a plethora of issues when Magisk is installed...

Some such ROMs play nicely now with USNF module builds but others don't. Apparently XiaomiEU custom ROM users often have issues.

Some ROM Devs haven't gotten around to integrating latest required changes as Google fiddles with back end implementation... Sometimes installing USNF module over the top fixes this, but sometimes the ROM causes conflicts. In this case the only fix is to wait for a ROM update or switch ROMs.

Assuming the SNF integrated in ROM is up to date and working to give deviceIntegrity pass without Magisk, best practice upon installing Magisk is NOT to install any USNF module... Let inbuilt SNF do it's job...

Useage:

- Whereas MagiskHide used to hide root from Google Play Services attestation/Droidguard process com.google.android.gms.unstable and main gms process com.google.android.gms where needed, w/ 24000+ you'll simply need to add the attestation/Droidguard process in Denylist yourself (incl. if you disable it and use Shamiko)... You may need to add the main gms process also, but I'm not sure if it's needed with late Magisk and tmpfs mount path = debug_ramdisk. You can just test...

If the inbuilt SNF solution works, keep in mind that you may need to wait for a ROM update anytime Google makes backend PI API changes...

When using Magisk, I prefer to use a 'clean' ROM such as official LineageOS (which will never integrate spoofing or manipulate expected signals) so as to avoid the conflicts mentioned above. Especially if you cannot pass PI deviceIntegrity without USNF per usage instructions above, I'd be looking for such a ROM to use with Magisk and USNF.

👀 PW
[Magisk] pndwal:
Are you using official LOS + @Displax USNF or other? PW
[Magisk] konfuzius4u:
Ah you're right, I forgot to mention.

I use the latest USNF from kdrag0n.
[Magisk] pndwal:
Often a different ballgame for ROMs integrating SNF... Better not to use USNF at all! (See post above.)

Nb. Most who do need USNF are using @Displax' USNF fork ATM as at best official build has timing issues with new part-time spoofing and causes random failures when using G Pay/Wallet... @Displax builds several needed fixes and has open USNF PRs but @kdrag0n seems to be too busy... 🤠 PW
[Magisk] OsoAlgo:
Does anyone know if Samsung phones need to be connected to a PC in order to boot into recovery with the special key combo (volumeUp + bixby + power)? This is assuming the phone is already rooted and Magisk installed in the recovery partition (Galaxy S10e in case it's relevant).
[Magisk] J.Michael:
I have heard of cases. You would do better in a device-specific thread.
[Magisk] badabing2003:
Magisk manager can reboot to recovery, is that not working?
[Magisk] zgfg:
Again Fox MMM 'hits a snag' with an uncaught exception

Time bomb or what

java.lang.IllegalStateException:
This build has expired. Please download a stable build or update to the latest version.

AFAIK, my v2.1.1 is the latest - even if not, the app should handle it properly

Every month some new uncaught exception from the closet
[Magisk] pndwal:
I believe you need a USB connection while using any special boot modes accessed via key combo, eg recovery, download/Odin or safe modes, on Samsung devices with OneUI 3.0+ (Android 11). - Connecting an active charger, a usb headset, or to a PC while doing key combo all reportedly work for Samsung devices... PW
[Magisk] OsoAlgo:
That works, but that's not the problem. If I change sim card, the phone forces a (normal) reboot, and last time I tried that I couldn't boot into the rooted OS with the key combo, but I don't know if that's an explicitly known limitation.
[Magisk] badabing2003:
I'm not certain, but even if you are not rooted, I believe Magisk Manager would still allow you to reboot to recovery.
[Magisk] pndwal:
Member needs to boot from powered down state... Key combo + USB will be needed w/ or w/o root.

Apparently it's an A-only legacy SAR device w/ no working ramdisk in boot so recovery mode Magisk 😜 PW
[Magisk] pndwal:
Rather than a limitation, that's a Samsung change to key combo (I guess to prevent unaware users accidentally activating special modes).

You've tried the pre OneUI 3.0 recovery key combo... If you have OneUI 3+ / A11+ it's now insufficient; the key combo itself has now changed to include plugged USB as a requirement. I believe the release timing for selecting system with Magisk or recovery itself hasn't changed... 🙃 PW
[Magisk] OsoAlgo:
Thanks, I thought that might be the case, but it was rather difficult to find a concrete answer like that with search engines, don't know why.
[Magisk] zgfg:
Rebooting requires root privileges

Screenshot from TE without su (same command with su works) and all apps that I use for rebooting require root privileges
[Magisk] wugga3:
Same ... Just downloaded the latest release (not sure what I had installed previously... ) and installed what it claimed was an update... Cleared app data and back to functional.
[Magisk] pndwal:
Yup, I recall needing to Google a lot to discover combo requirements for bixby, non-bixby, A11+ Sammy, old Sammy and various other devices... Very little from official sites of OEMs.

Seems OEMs regard info on special boot (recovery, fastboot/download/Odin, safe etc) modes as privileged info for service departments only (they don't want users messing with these modes themselves as a rule) so they don't generally publish them publicly... Users generally need to hunt down such hidden 'service' modes as well as special engineering/diagnostic codes (entered from dialer etc), special (developer etc) menus in Settings etc etc themselves...

This is part of the thrill of the chase for.modders! 😜 PW
[Magisk] zgfg:
See my screenshots

I keep local copy since May 12 when I downloaded

And GitHub says that v2 1.1 was uploaded on May 12

I re-downloaded again and SHA512 hashes match

0ab1ca2ab898383a162b6639a08ceb7ea69dea71868e5893895e59b2040d1c651d1650af8b3944c6e7230dfde96a0a40fb83d9bb48f94d8df1a934c8c7992c7c

Hence what I have installed is still the same, latest v2.1.1

But be aware that May 12 was exactly a month ago. Now, after you wiped data for your app, watch what would happen after the next 30 days, on Jul 12
[Magisk] J.Michael:
I can't speak to the question of which Samsung devices require that something be plugged into the device in order to begin to boot to recovery, but

You need to distinguish (in thought and in speech) between "booting to recovery" and "using the buttons to start booting to recovery but releasing the buttons at the right time so that Android boots with Magisk active."

You specifically said that you failed to get into Android with Magisk active. You did not make it clear whether you got to the recovery mode, or ended up booting into the normal Android system.
[Magisk] pndwal:
🤔 ... well member simply asked

and then clarified

Seems clear member couldn't access recovery mode using a key combo w/o USB connection, let alone boot to system via recovery... Probably wanted confirmation that USB is needed...

BTW I did remember your device/scenario where after initial boot from powered off state some Sammy devices seem to 'remember' (undocumented Magisk change?) and subsequently boot system via recovery w/ normal pwr on only. That may be helpful and @OsoAlgo should try a normal boot after initially booting w/ key combo to check this, but I believe it only works like that on a few devices. 😛 PW
[Magisk] OsoAlgo:
Yes, it's worth being more specific about that. I don't remember exactly anymore, but I think I couldn't do either when I had the issue, and ideally it would be better to know if a plugged USB is needed for either/both.

I guess I would have to experiment to be sure, but I'm reluctant to try because last time it actually ended up resetting my phone to factory settings, not sure why :/
[Magisk] J.Michael:
I doubt that it reset the phone to factory settings, unless you clicked on the Recovery option "factory reset / wipe data".

When you have Magisk installed in Recovery, and you reboot without trying very hard, you may well boot a not-Magisk-patched image, so you would end up in Android with no sign of Magisk (except the app, which would report "Magisk not installed"). If you don't panic and try to "re-install" Magisk, you can get back to Magisk active. But it is a real pain.

I feel like I tried to boot into Magisk a dozen times. Once I succeeded, but I still wasn't sure what the critical moment was. Somebody in the SM-T290 or SM-T295 thread (probably @gcrutchr or @Talich52) finally told me exactly what to look for -- something like "when the tablet buzzes after the unlocked-bootloader-nag-screen", but I'm not sure. Try reading those threads. Concentrate on the first half of 2020.
[Magisk] J.Michael:
I don't know if the magic that allows me to reboot after a shutdown, without doing anything more than holding Power until it starts to boot, and still get Magisk, is specific to my device (SM-T290), or the Android version (9 Pie).

It sounds like @OsoAlgo has already tried simply powering on, and has failed to get Magisk that easily. Now he's going to have to do it the hard way a dozen times to get it back.
[Magisk] pndwal:
Yeah, I doubt experiments with booting will wipe data too; perhaps you flashed binaries incl. CSC.tar or did one of the following?:

Booting/key combo variations should just land you variously in system with Magisk (rooted), unrooted system or recovery. 🙃 PW
[Magisk] pndwal:
mmm. John says

Not sure if you needed/did anything different? PW
[Magisk] pndwal:
Yeah, may be OS dependant. I've seen others report that behaviour too, but never saw it documented...

Since John still simply says

and

my guess it that • (Power up normally) → (System with with Magisk) will still be the exception rather than the rule.

Whan using the key combo however, Samsung users with late OneUI (A11+) will always need USB connected as I understand it, per all special modes accessed with key combos. 🤠 PW
[Magisk] alesky0903:
How can i fix this? (Ramdisl: no).

I have seen that it is something relevant for root to work correctly
[Magisk] V0latyle:
All that means is that your device doesn't have ramdisk; all this affects is how you root with Magisk, not whether you are

You're already rooted, so you're fine.
[Magisk] pndwal:
You can't; Just means you have an A-Only legacy SAR boot type device (launched with Android 9) that had no factory ramdisk installed in /boot partition.

If Magisk was installed using .zip from custom recovery or by patching and flashing boot.img, Magisk patching has installed a basic ramdisk in /boot with magiskinit included and this is working. (It does on many Xiaomi devices etc but in other devices the bootloader simply doesn't support such an added ramdisk).

Otherwise Magisk has been installed in the factory ramdisk in /recovery partition by patching and flashing recovery.img. 🤠 PW
[Magisk] alesky0903:
So it's not relevant...? I thought that's why it gave me bootloop when installing when I get the message "additional installation needed" and then "direct installation" by recovery. Everytime I try it makes me bootloop. :(
[Magisk] pndwal:
Please say device and how you installed Magisk in your screenshot...

Not sure what you mean by " "direct installation" by recovery ", however installation from custom recovery now only partially installs Magisk (since selinux/module rule directory selection refactoring), and you need/will be prompted to repatch with system booted to set up selinux/module rule directory and have working Zygisk and modules... This is done from the Magisk App usually by selecting the Magisk Install, Direct install option, but on some devices (Huawei etc) users need to use Patch a file option and flash via fastboot...

Ramdisk = No is unrelated... It's as I mentioned above... Magisk is always installed in a ramdisk but that indicator is simply to let you know that boot-mode Magisk may not be supported since OEM didn't supply device with ramdisk in /boot partition.

If you got Installed version shown above by installing as zip package from custom recovery then ramdisk (Magisk added) in /boot partition is certainly working properly.

👀 PW
[Magisk] zgfg:
For the matter of fact, there were a dozen of tickets opened on GitHub, all reporting the same bug

And all were expressly closed as 'completed' but without a link for the fix

And on GitHub, there is still the old, not working v2.1.1

The fix is published only on their website, but again as v2.1.1
[Magisk] pndwal:
New Momo

But seems AI implementation was flawed. 🤪 PW
[Magisk] martyfender:
What channel did you get this from?

Thanks
[Magisk] pndwal:
'Alpha discussion'... bit of debugging, lot of idle chitchat now... 🙃 PW
[Magisk] ipdev:
Are you sure it is the AI implementation and not the user's mind that was flawed. :unsure:

Cheers. :cowboy:
[Magisk] pndwal:
Yeah, I submitted user data from my mind in a bug report so they took the update down...

Thought detection worked beautifully when my "mind ever thought of root phone", but the bypass was just to simple it seems...

Since the Chinese word 'root' has various meanings incl. 'long slender objects' eg violin strings, or simply as a verb to 'gnaw' at something, I just thought of chewing my phone instead of rooting it or of you playing the violin in a patent hearing...

Whether this is due to a mental flaw on my part or not, Momo is very depressed as it really helped Shamiko to defeat her and even a magic mask hasn't helped...

I hope this confirms whatever you were suggesting doc... 😋 PW