Magisk General Support / Discussion

Search This thread

ASIFPIAL

Member
Aug 24, 2015
5
0
Help me out please I already unlocked bootloader and installed custom rom (pixelplus ui), now just want to have root so how to do it?

after extracting pixel plus ui and payload dumper for my device I got no recovery img instead I got this files..image below :
1680383671958.png


so like what to patch and flash?
 

karimo22

Member
Apr 2, 2023
7
1
hey guys i have this useless tablet (fast7 3g) i wanted to run some cammands on it of linux like pkg , curl , sudo , etc but it seems that its only working for shorter commands like service , mv . rm . ls .
i want to install python on it , and run some wireshark commands just like my linux can i do that or not ? i mean i have root access doesn't that mean i have the full access to the kernel hardware :)
 

dcarvil

Senior Member
Apr 20, 2016
672
374
hey guys i have this useless tablet (fast7 3g) i wanted to run some cammands on it of linux like pkg , curl , sudo , etc but it seems that its only working for shorter commands like service , mv . rm . ls .
i want to install python on it , and run some wireshark commands just like my linux can i do that or not ? i mean i have root access doesn't that mean i have the full access to the kernel hardware :)

The commands you want to run are not linux kernel commands. You will need to install a linux environment, such as termux (install termux from F-droid, not from the play store). Once you install termux, you can use the pkg command to install curl, tsu (sudo), and other packages.

Android uses a linux kernel, but is not a full linux environment. Termux provides most of the linux environment.
 

karimo22

Member
Apr 2, 2023
7
1
The commands you want to run are not linux kernel commands. You will need to install a linux environment, such as termux (install termux from F-droid, not from the play store). Once you install termux, you can use the pkg command to install curl, tsu (sudo), and other packages.

Android uses a linux kernel, but is not a full linux environment. Termux provides most of the linux environment.
oh i can see now ! okey i will do so thank u
 

WoKoschekk

Senior Member
Feb 25, 2019
1,345
1
424
Cologne
Moto G6
Moto G6 Plus
but it seems that its only working for shorter commands like service , mv . rm . ls .
Each single command runs a binary (package) stored in /system/bin or /sbin. Before you can execute e.g. curl you must ensure that you have the coresponding binary (compiled for your CPU) installed in one of the above mentioned directories.
BTW: These dirs representing your shell (which sh).

Android comes with the most common binaries installed needed by the system itself. Particularly the binaries su and sudo are not part of the AOSP and require the installation of Magisk.

Termux, on the other hand, uses its own Shell and package manager. The tools pkg and apt offer you a wide choice of packages that are known from Linux. Also Python, Perl, Java and many more are supported.


Download:

Termux (v0.118.0) on F-Droid

Termux (v0.118.0, github version) on apkmirror
 
  • Like
Reactions: diehard2013

zgfg

Senior Member
hey guys i have this useless tablet (fast7 3g) i wanted to run some cammands on it of linux like pkg , curl , sudo , etc but it seems that its only working for shorter commands like service , mv . rm . ls .
i want to install python on it , and run some wireshark commands just like my linux can i do that or not ? i mean i have root access doesn't that mean i have the full access to the kernel hardware :)
You need to install BusyBox Magisk module - it will install UNiX/Linux utilities (click to Spoiler to open the list):
[, [[, acpid, adjtimex, ar,
arch, arp, arping, ascii, ash,
awk, base32, base64, basename,
bbconfig, beep, blkdiscard,
blkid, blockdev, brctl, bunzip2,
bzcat, bzip2, cal, cat, chat,
chattr, chcon, chgrp, chmod,
chown, chroot, chrt, chvt,
cksum, clear, cmp, comm, conspy,
cp, cpio, crc32, crond, crontab,
cttyhack, cut, date, dc, dd,
deallocvt, depmod, devmem, df,
dhcprelay, diff, dirname, dmesg,
dnsd, dnsdomainname, dos2unix,
du, dumpkmap, dumpleases, echo,
ed, egrep, eject, env,
ether-wake, expand, expr,
factor, fakeidentd, false,
fatattr, fbset, fbsplash,
fdflush, fdformat, fdisk,
fgconsole, fgrep, find, findfs,
flash_eraseall, flash_lock,
flash_unlock, flock, fold, free,
freeramdisk, fsck, fsck.minix,
fsfreeze, fstrim, fsync, ftpd,
ftpget, ftpput, fuser,
getenforce, getopt, grep,
groups, gunzip, gzip, hd,
hdparm, head, hexdump, hexedit,
hostname, httpd, hush, hwclock,
id, ifconfig, ifdown, ifenslave,
ifplugd, ifup, inetd, inotifyd,
insmod, install, ionice, iostat,
ip, ipaddr, ipcalc, ipcrm, ipcs,
iplink, ipneigh, iproute,
iprule, iptunnel, kbd_mode,
kill, killall, killall5, klogd,
less, link, ln, loadfont,
loadkmap, logread, losetup, ls,
lsattr, lsmod, lsof, lspci,
lsscsi, lsusb, lzcat, lzma,
lzop, lzopcat, makedevs,
makemime, man, md5sum, mesg,
microcom, mim, mkdir, mkdosfs,
mke2fs, mkfifo, mkfs.ext2,
mkfs.minix, mkfs.reiser,
mkfs.vfat, mknod, mkswap,
mktemp, modinfo, modprobe, more,
mount, mountpoint, mpstat, mv,
nameif, nanddump, nandwrite,
nbd-client, nc, netstat, nice,
nl, nmeter, nohup, nologin,
nsenter, nslookup, nuke, od,
openvt, partprobe, paste, patch,
pgrep, pidof, ping, ping6,
pipe_progress, pivot_root,
pkill, pmap, popmaildir,
poweroff, powertop, printenv,
printf, ps, pscan, pstree, pwd,
pwdx, raidautorun, rdate, rdev,
readlink, readprofile, realpath,
reboot, reformime, renice,
reset, resize, resume, rev,
rfkill, rm, rmdir, rmmod, route,
rtcwake, run-init, run-parts,
runcon, rx, script,
scriptreplay, sed,
selinuxenabled, sendmail, seq,
sestatus, setconsole,
setenforce, setfattr, setfont,
setkeycodes, setlogcons,
setpriv, setserial, setsid,
setuidgid, sh, sha1sum,
sha256sum, sha3sum, sha512sum,
showkey, shred, shuf, slattach,
sleep, smemcap, sort, split,
ssl_client, start-stop-daemon,
stat, strings, stty, sum, svc,
svok, swapoff, swapon,
switch_root, sync, sysctl,
syslogd, tac, tail, tar, tc,
tcpsvd, tee, telnet, telnetd,
test, tftp, tftpd, time,
timeout, top, touch, tr,
traceroute, traceroute6, true,
truncate, ts, tty, ttysize,
tunctl, tune2fs, ubiattach,
ubidetach, ubimkvol, ubirename,
ubirmvol, ubirsvol,
ubiupdatevol, udhcpc, udhcpc6,
udhcpd, udpsvd, uevent, umount,
uname, uncompress, unexpand,
uniq, unix2dos, unlink, unlzma,
unlzop, unshare, unxz, unzip,
uptime, usleep, uudecode,
uuencode, vconfig, vi, volname,
watch, watchdog, wc, wget,
which, whoami, whois, xargs,
xxd, xz, xzcat, yes, zcat, zcip

Termux or any other Terminal emulator is just that - terminal emulator where to run the commands but without BusyBox you have very limited set of pre-installed commands (incl but only some of those above)

You said that you already ran some commands - then you don't an additional Terminal emulator app (you can use the same emulator you already did) but install BusyBox from eg Alt Magisk Modules Repo:

Or install Fox manager to more easily search through, download and install modules:

For even more commands, install additionally ToyBox (some commands are common to both sets but to have all, install BB and TB):
[ acpi arch ascii base32 base64
basename bash blkdiscard blkid
blockdev bunzip2 bzcat cal
cat chattr chgrp chmod chown
chroot chrt chvt cksum clear
cmp comm count cp cpio crc32
cut date deallocvt devmem df
dirname dmesg dnsdomainname
dos2unix du echo egrep eject
env expand factor fallocate
false fgrep file find flock
fmt free freeramdisk fsfreeze
fstype fsync ftpget ftpput
getconf gpiodetect gpiofind
gpioget gpioinfo gpioset grep
groups gunzip halt head help
hexedit host hostname httpd
hwclock i2cdetect i2cdump i2cget
i2cset iconv id ifconfig inotifyd
insmod install ionice iorenice
iotop kill killall killall5
link linux32 ln logger login
logname losetup ls lsattr lsmod
lspci lsusb makedevs mcookie
md5sum microcom mix mkdir mkfifo
mknod mkpasswd mkswap mktemp
modinfo mount mountpoint mv
nbd-client nbd-server nc netcat
netstat nice nl nohup nproc
nsenter od oneit openvt partprobe
passwd paste patch pgrep pidof
ping ping6 pivot_root pkill
pmap poweroff printenv printf
prlimit ps pwd pwdx pwgen readahead
readelf readlink realpath reboot
renice reset rev rfkill rm
rmdir rmmod route rtcwake sed
seq setfattr setsid sh sha1sum
sha224sum sha256sum sha384sum
sha3sum sha512sum shred sleep
sntp sort split stat strings
su swapoff swapon switch_root
sync sysctl tac tail tar taskset
tee test time timeout top touch
toysh true truncate tty tunctl
uclampset ulimit umount uname
unicode uniq unix2dos unlink
unshare uptime usleep uudecode
uuencode uuidgen vconfig vmstat
w watch watchdog wc wget which
who whoami xargs xxd yes zcat

When you download the module(s) - zip file(s), use Magisk app, Modules tab, Install from storage to install the zip, and reboot
 
Last edited:

pndwal

Senior Member
I was confused by the above, so found the following definitions:

Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.
https://termux.dev/en/

Termux is an Android terminal application and Linux environment.
https://github.com/termux/termux-app

Nb. It is highly recommended to not install Termux apps from Play Store any more. Termux and its plugins are no longer updated on Google Play Store due to android 10 issues and have been deprecated.

Nb. 2. Termux is apparently broken in Android 12, but there may be workarounds.

BusyBox: The Swiss Army Knife of Embedded Linux
BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.

Toybox combines the most common Linux command line utilities together into a single BSD-licensed executable that's simple, small, fast, reasonably standards-compliant, and powerful enough to turn Android into a development environment. See the links on the left for details.

Important Note: Toybox author appreciates A Hitchhiker's Guide.

👀 PW
 
Last edited:
  • Like
Reactions: asripath

zgfg

Senior Member
I was confused by the above, so found the following definitions:

Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.
https://termux.dev/en/

Termux is an Android terminal application and Linux environment.
https://github.com/termux/termux-app

Nb. It is highly recommended to not install Termux apps from Play Store any more. Termux and its plugins are no longer updated on Google Play Store due to android 10 issues and have been deprecated.

Nb. 2. Termux is apparently broken in Android 12, but there may be workarounds.

BusyBox: The Swiss Army Knife of Embedded Linux
BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.

Toybox combines the most common Linux command line utilities together into a single BSD-licensed executable that's simple, small, fast, reasonably standards-compliant, and powerful enough to turn Android into a development environment. See the links on the left for details.
Important Note: Toybox author appreciates A Hitchhiker's Guide.

👀 PW
BusyBox and ToyBox Magisk modules:

Of course, one needs some Terminal emulator to run commands, many are available on the PlayStore (and Termux is not the one easiest to configure the paths and use)
 

WoKoschekk

Senior Member
Feb 25, 2019
1,345
1
424
Cologne
Moto G6
Moto G6 Plus
@pndwal You should use Termux. Any other terminal app uses the system's shell (/system/bin/sh) but Termux by default uses its own shell or switches with su to the system's shell.

Any other terminal app requires a lot of modules to have e.g. Python or other binaries. For the latest versions of them you have to wait until someone will release a module. Using Termux all you need is pkg install PACKAGE and pkg upgrade.
 
  • Like
Reactions: HippoMan and pndwal

zgfg

Senior Member
No, you don't need this. Magisk comes with an own busybox (/data/adb/magisk/busybox).
True, but then you need to call like:
/data/adb/magisk/busybox traceroute

If you install the module, then it installs symlinks to /system/xbin

and you simply call as:
/system/xbin/traceroute
or
traceroute

Particularly, the first module I listed installs exactly those that symlinks:
Code:
which traceroute
/system/xbin/traceroute

ls -l /system/xbin/traceroute          <
lrwxrwxrwx 1 root root 24 1971-04-28 06:16 /system/xbin/traceroute -> /data/adb/magisk/busybox
 

pndwal

Senior Member
@pndwal You should use Termux. Any other terminal app uses the system's shell (/system/bin/sh) but Termux by default uses its own shell or switches with su to the system's shell.

Any other terminal app requires a lot of modules to have e.g. Python or other binaries. For the latest versions of them you have to wait until someone will release a module. Using Termux all you need is pkg install PACKAGE and pkg upgrade.
Ta... Can you say if note re Termux 'broken in android 12' is a real concern? PW
 

zgfg

Senior Member
Ta... Can you say if note re Termux 'broken in android is 12' is a real concern? PW
I personally use:

No problem with A12.
Comes properly installed with paths (no need to tweak them as some have to do when they install Termux).
Just don't use Kali mode, use AndroidSu (starts already in su mode) or Android
 

Attachments

  • Screenshot_2023-04-02-13-29-40-019_com.offsec.nhterm.jpg
    Screenshot_2023-04-02-13-29-40-019_com.offsec.nhterm.jpg
    256.6 KB · Views: 24
  • Screenshot_2023-04-02-13-29-27-896_com.offsec.nhterm.jpg
    Screenshot_2023-04-02-13-29-27-896_com.offsec.nhterm.jpg
    294.6 KB · Views: 24

WoKoschekk

Senior Member
Feb 25, 2019
1,345
1
424
Cologne
Moto G6
Moto G6 Plus
Ta... Can you say if note re Termux 'broken in android 12' is a real concern? PW
That issue is closed on github.com
 

pndwal

Senior Member
I personally use:
https://store.nethunter.com/packages/com.offsec.nhterm/

No problem with A12.
Comes properly installed with paths (no need to tweak them as some have to do when they install Termux).
Just don't use Kali mode, use AndroidSu (starts already in su mode) or Android
Yeah, I have that too...

I was asking specifically about this Termux issue (seems to be an AOSP bug): #2366, issue tracker, phantom cached and empty processes docs
and workarounds described here: TLDR comment... PW
 

WoKoschekk

Senior Member
Feb 25, 2019
1,345
1
424
Cologne
Moto G6
Moto G6 Plus

pndwal

Senior Member
Yeah, closed in Jan 2022 as issue is AOSPs end:
https://github.com/termux/termux-app/issues/2366#issuecomment-1009272526
... An AOSP fix was earlier merged per:
https://github.com/termux/termux-app/issues/2366#issuecomment-994303443
but a workaround is apparently still needed as an updated solution was pinned to issue OP in Sep 2022:
https://github.com/termux/termux-app/issues/2366#issuecomment-1237468220
linking doc here:
https://github.com/agnostic-apollo/...#how-to-disable-the-phantom-processes-killing

... Seems the need depends on Android build, but maybe all A12+ builds need this(?)

👀 PW
 

Top Liked Posts

  • 6
    Yeah, if I want to run a custom kernel (Pixel 7) then I need to wipe. Should have sideloaded (not booted up), then gone into bootloader and run fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img to that slot. Once booted after sideload/flashing the firmware it's too late as it's enabled after booting. Don't think it matters if you do it before or after flashing the patched image, just as long as you do it before you boot up. Oh well, lol...

    Nothing to do with what we were testing, just custom kernel related. Seems to also help to avoid getting the red eio corrupt message when things may not go as expected.
    Thanks, I realize it is only needed for custom Kernel cases.
    I should add extracting vbmeta from payload.bin then in addition to boot.img / init_boot.img so that the step can be performed if the options are selected.
    5
    Did that affect anything?
    No. Only needed on the Pixel 7 series if you want to flash a custom kernel.
    5
    Ouch, sorry to hear that, now you need a wipe?

    So at what point you should have done that?
    When flashing the patched image? just add the extra flags?
    Yeah, if I want to run a custom kernel (Pixel 7) then I need to wipe. Should have sideloaded (not booted up), then gone into bootloader and run fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img to that slot. Once booted after sideload/flashing the firmware it's too late as it's enabled after booting. Don't think it matters if you do it before or after flashing the patched image, just as long as you do it before you boot up. Oh well, lol...

    Nothing to do with what we were testing, just custom kernel related. Seems to also help to avoid getting the red eio corrupt message when things may not go as expected.
    4
    Update:

    On a Pixel 5 device, I managed to have both slots bootable.
    One slot rooted, and the other not, both on the same 2023-05 firmware.

    The process is as follows (which PF will support OOB in the next release)
    - Sideload full OTA
    - Reboot to bootloader
    - Flash patched image.
    - reboot to system (observe root)
    - Sideload full OTA
    - Reboot to System (no patching, observe no root)
    - Switch slot (observe root)

    With Pixel 5, one is able to make changes to boot after sideload but before reboot.
    It still needs to be tested if this works on Pixel 6, 7 * devices

    I find flashing full OTA is slower than flashing full factory, but the benefit of having both slots bootable is a big bonus.
    Okay, did some testing on my Pixel 6 Pro:

    Started with:
    Platform Tools 33.0.3
    A14 Beta 2.1 (installed using flash-all.bat)
    Rooted with Canary Magisk 26102
    Active slot=b

    Sideloaded the A14 Beta 2.1 OTA
    Booted up
    Not rooted (of course)
    Active slot=a
    Then rooted with Canary Magisk 26102

    Switched slots to b
    Did not boot (as expected)
    Booted back into bootloader
    Set slot back to a
    Sideloaded the A14 Beta 2.1 OTA

    Booted up
    Not rooted
    Active slot=b

    Then switched slots to a and booted successfully
    Slot a still rooted

    Then switched slots to b and booted successfully
    Slot b still not rooted

    Then switched slots again back to a and booted successfully
    Slot a still rooted
    4
    It's been a while since I sideloaded an OTA, but if I remember correctly once the sideloading is complete you'll still be in recovery mode and you have to choose "Reboot to system now" (or something like that) before it reboots. But like I said, it's been a while...
    Right, I had forgotten as well,
    I just tested this,
    When you sideload OTA, you have the option to reboot to bootloader or system. (y)
    And when you successfully reboot to system, the slot is switched.
    I will test next to flash a patched image before rebooting and see if it will complain.
  • 8
    Hello!
    How do you know?
    You must be an expert or something

    Nigerian-Meme.jpg 😜 PW
    7
    If the "issue" is that you have not yet been able to reproduce the Magisk manager app's "Ramdisk: Yes/No":

    Did you try a "wrapper" for the shell script function you found? At the time you reported several script fragments, there was talk of needing to call other functions first to set up environment variables.

    Look up the "echo" command. There is a form that causes the shell to echo all lines as they are executed. Do this, redirect output to a log file, and you can crawl through and maybe spot where it first disappoints you.

    I believe "needing to call other functions first to set up environment variables" is exactly why he is getting a different result from the app. 👍

    I could gut out all the relevant bits for him to run, but, not trying to offend here, I kind of don't see what the point of all this has been, so I don't think I can justify putting in that amount of effort when I've got my own stuff to be doing... 🫤

    Edit: One final thought. It could also be that he needs to use Magisk's busybox and busybox ash env for some of the commands like Magisk would be to get the intended output.

    I'm running into an interesting problem that I can't put my fingers on, and am open to ideas / suggestions.
    As you may already know, Magisk embeds the SHA1 of the stock boot image used to create the patch into the patched image, this is great because one can easily determine the source image that was used and validate if it is what it is supposed to be.

    And this is exactly what PF does, it extracts the SHA1 from the patched image.
    Here's the function code
    Python:
    def extract_sha1(binfile, length = 8):
        with open(binfile, 'rb') as f:
            s = f.read()
            # Find SHA1=
            pos = s.find(b'\x53\x48\x41\x31\x3D')
            # Move to that location
            if pos != -1:
                # move to 5 characters from the found position
                f.seek(pos + 5, 0)
                # read length bytes
                res = f.read(length)
                return res.decode("utf-8")

    Unlike magiskboot and Android Kitchen Tools by @osm0sis which extracts the ramdisk.cpio and performs magiskboot cpio <ramdisk.cpio> sha1 on it, PF (to keep it lightweight) it just looks for the string SHA1= directly on the patched file and then reads the next 8 hex characters and converts them to ascii.
    And this has worked flawlessly so far, until this.
    Basically what is happening is:
    The expected embedded SHA1 is: 40100d6b9512f6dffbb6f6b67c1b878f3bd82d18

    With the exception of the red part of the SHA1, everything matches.
    In one case 0100 part which is expected to be 30 31 30 30 hex it is instead 89 00 FB 33, and in the other case it is 72 00 FC 15

    View attachment 5902493View attachment 5902495


    I don't understand why this is happening, my first guess would be some kind of encoding, but then why now and only with this image, my other guess / fear is that perhaps the writing is not clean which would be a bug in Magisk.
    Obviously I can skip over the first few bytes and do the validation with the remaining bytes, but I'd hate to take a path like that without understanding why this is happening, who's to say that this thing can't happen on the other portions of the SHA1 string.

    If you have any ideas, I'm all ears.

    The boot.img contains the ramdisk.cpio.gz/.lz4/.lzma/.xz and while text strings may get stored as-is in a compression format, that isn't guaranteed and the compression might find something it thinks it can "optimize" for space savings. That's why `magiskboot cpio <file> sha1` is run on the uncompressed ramdisk.cpio. 🙂
    7
    As I expected in advance, problems with Magisk occurred after the OTA update of LineageOS (Pixel 6a).
    Updated from a 20.0 build to lineage-20.0-20230429-nightly-bluejay

    After the update it was necessary to flash the new boot image again. I have done that. But Magisk simply does not root. Magisk patched the downloaded LineageOS boot-image, saved it in the download folder and that was it.

    Magisk was hidden before I did OTA update.
    Simply very beautiful. All this after setting up LineageOS to my liking.
    And what can I do now except re-flash ROM?

    You might be interested in this.

    If you are using the current Magisk canary build, addon.d support was fixed.
    A few weeks ago, I tested it on my Pixel 3a and made a post in The Age of Zygisk thread.
    Post #3,128

    Since I did not install Magisk via recovery, I made a module that overlays Magisk's addon.d script into the system/addon.d directory.
    The module is not necessary after the first OTA.
    - The OTA updater will actually restore the Magisk script into system with the others.

    Magisk Survival Module - [GitHub] - Link
    Please read all of the readme if you decide to use it.
    - This only works with addon.d-v2 (A/B slot devices).

    Cheers. :cowboy:

    PS.
    I have updated my 3a using the OTA updater 4/5 times now and Magisk is retained each time.
    No need to manually patch and flash the new boot image after update.
    6
    You guys still aren't using ASH_STANDALONE=1 which forces busybox to use its own applets above what's in the path. Either export it or specify it as a command prefix. It has to be Magisk's busybox or my SELinux busybox to have the patch required for standalone mode.

    export ASH_STANDALONE=1
    /data/adb/magisk/busybox ash /data/local/tmp/test2.sh

    or

    ASH_STANDALONE=1 /data/adb/magisk/busybox ash /data/local/tmp/test2.sh

    P.S. `` (backticks) are just a lazy way to suggest a code/command block since that's what they are when used in markdown, plus if copied whole directly to a shell it just dumps it into a subshell, like $() does, and unlike "".
    6
    I think it would be good to support, and I posted disambiguation due to some confusion above.

    Rather than being 'highly discouraged' (it's not; it's plum necessary 🤪) patching recovery partition is actually the only option for most A-only devices launched with Android 9 (legacy SAR, circa 2018, 2019) other than Xiaomi models!

    Hope you reconsider... 👍 PW
    Your wish is my command :)
    1684447283639.png

    1684447305575.png


    Although with one caveat,
    Yes I can tell if it is Ramdisk yes or no by running a script, but that requires unpacked Magisk, (for not rooted phone, I would need to unpack)
    And although it is true that PF eventually unpacks to create a patch, but within the workflow, that stage is much later, and that stage is dependent on choices a user makes in the above screen.

    Of course it could be worked out and workflow changed to automatically offer / not offer the choice.
    Considering that the target audience is really minute if at all existent, specially considering that the tool has Pixel in its name, and people who have Pixel phone don't need it, and people who need them wouldn't be looking to tools for Pixel Phones ... lol
    I decided the leave it up to the user the choice to have that option visible or not. (no auto detection)
    The tooltip on option suggests not to turn it on unless ...
    1684447779077.png


    I hope that should be enough.
  • 1094
    This is the place for general support and discussion regarding "Public Releases", which includes both stable and beta releases.
    All information, including troubleshoot guides and notes, are in the Announcement Thread
    156
    Hello, I haven't given much support on XDA lately. It can be resulted from
    • University started and I have limited free time. In fact, I mostly develop during midnight
    • I live in Taiwan, which has large time zone differences between my European/American contributors/testers, which usually forces me to stay up late at night to discuss/test stuffs.
    • The new version is about to come, I don't want to spend effort on supporting old releases
    The planned update is delayed again and again, to some point I think I'll shed some light about what has been happening lately, also along with some announcements.

    New Forum!
    As you might have already discovered, Magisk got its own subforum on XDA! Many thanks to all the support you gave me, and much more information/features/support is about to come!
    **For developers supporting all the devices that are not using standard Android boot format, feel free to create threads in this section (actually, PLEASE do so) for your favorite devices after v7 is out. As I currently know, Asus devices require signing the boot image before flashing, and is model dependant; Sony devices seems to use ELF kernel that is unpatchable, or some has two ramdisks (inner + outer), both requires different workarounds; LG bootloader locked devices has to manually "BUMP" the boot image after flashing Magisk..... and there may be lots of other crazy boot image formats that haven't come up to my attention yet.
    It is impossible for me to support all these non-standard boot images, and I hope the community can collaborate to make Magisk running across all the devices. Overall, community collaboration is what XDA about :D

    The Pixel Phone
    Some of you might already know this news, that the next Pixel Phone right around the corner seems like it does not have ramdisk in boot image, which pretty much wrecked Magisk in all ways. However, it pretty much doomed root itself too. Kernel modifications is inevitable IMO, so I'll try to migrate my scripts to C programs that could possibly be included into the kernel itself. Note that I'm not familiar with linux kernel, I'm not even sure if my idea and concept is correct or not. But once the device is available, I think developers will find a way to bypass all the difficulties, and I'll do my best to learn things ;)

    Current Progress
    In the past month, I've spent quite some time learning SELinux, so that I can avoid using SuperSU's sepolicy patches. Thanks to the helps and tips from @phhusson and @Chainfire, I finally have a much clearer understanding of how SELinux works. The Magisk core parts (the scripts, boot image patches, new features, more supports) are actually done some time ago. What is causing all the delays is the Magisk Manager.
    To be completely honest, although I can code in Java without much issues, Magisk Manager is actually my first Android application, I had to reach out for assistance, and fortunately awesome developers like @DVDandroid and @digitalhigh contributed a lot, which makes the current Manager awesome.
    After the repo system and module management is mostly done, I was about to do some adjustments and release, but what we really done is decided to add another feature: auto-unroot with per-app settings. I decided to wait for it to be finished, and then do my adjustments. Due to reasons that'll be mentioned later, this feature will likely not be available for the next release (should come in future updates)

    Safety Net Disaster
    Those who are using Magisk for Safety Net bypass purposes must have known that Google recently updated the detection method of my Systemless Xposed. I still have no idea what Safety Net is detecting, so currently I cannot fix it on my side (also because I'm busy working on the next update). However, suhide developed by @Chainfire is able to hide Xposed and worked fine.
    However, only my Systemless Xposed v86.2, which is based on SuperSU's su.d, is supported using that method. v86.2 and v86.5 (latest, Magisk based) have nearly identical binaries, and the only difference is the path where the binaries are stored.
    I'm still not sure what's the real issue for it not being supported, I just hope it is not done intentionally.

    Conclusion
    Due to the fact that my Safety Net bypass is not 100% perfect now, I do not want to spend any more time waiting for auto-unroot to be polished. What I'm doing now is finishing up all the things I'd like to change in Magisk Manager (it has been a while since I last contributed to Manager, my fellow developers are doing all the heavy job), which might take a little more time, after that, packed with tons of information to be announced in Magisk Section, I'll release the long awaited update.

    Hope this lengthy post gives you the idea of the whole situation, and again thanks for all your support!!
    121
    Ah, some Chainfire bashing, I hope it is not too late for me to exercise additional villainy.

    First, let me make clear I have nothing against @topjohnwu, nor against Magisk. Magisk is an interesting project and it certainly displays @topjohnwu ingenuity and persistence. I don't doubt we will see more interesting things from his hands.

    -------------------------

    What has happened here is not all that dark and complicated, from either end. I returned from holidays, and someone pointed me at Magisk. My first thought: interesting!

    Among other things, the thread lists some issues with SuperSU, which in combination with the phrase The developer also requests users to not bug Chainfire with compatibility requests for SuperSU with Magisk from the portal article, raised my left eyebrow by nigh half an inch. The popular systemless xposed mod is apparently now based on it, and apparently it now no longer works with SuperSU, and apparently I'm not supposed to fix that, nor any of the other found issues. I found that a bit weird. So yes, I have told @topjohnwu that I was a bit surprised he was posting about issues with SuperSU without notifying me about them (I can't fix or help fix issues I'm not aware of, after all).

    He's also spreading a modified version of the SuperSU package, which is not all that uncommon, nor necessarily a problem. I have not looked into what he modified, I only ran a few quick tests on one of my devices, and found some commonly used commands run as root to be broken. I have informed him of this as well.

    It appears the tool of choice for Magisk is phh's Superuser, because of some of the mentioned issues with SuperSU. That's fine by itself, but fixing issues in that superuser by incorporating SuperSU's binaries into it is a somewhat questionable practise. After all, SuperSU is a commercial closed-source package that helps pay for my dinner, and superuser is a direct competitor. I have informed him that I was surprised he did this without asking for permission. I have expressed similar surprise on him spreading a modified version of LiveBoot (which helps pay for a snack now and then).
    @topjohnwu has also stated that Magisk's scripts are largely influenced by mine (I have not checked). Scripts based on mine are used all over the place on XDA, some people have crafted amazing things based on them, I have never made an issue of this (otherwise I would have just made them binaries). But yes, I have also stated to him that I don't think it's very nice to base something on one program, and then using that to (almost exclusively) push something directly competing with that program.

    tl;dr Towards @topjohnwu, I have:
    - expressed surprise he has issues getting Magisk to work with SuperSU, and has chosen not to inform me about those
    - expressed surprise he is using SuperSU binaries in a competing superuser without permission
    - expressed surprise he is posting a modified LiveBoot without permission
    - informed him of issues with the modified SuperSU he has posted
    - let him know I thought it wasn't very nice to be applying my scripts to benefit seemingly exclusively that same competing superuser

    To be crystal clear:
    - I have not asked for an apology
    - I have not asked for Magisk to be abandoned, neither the root hiding nor systemless module parts, and certainly not systemless xposed
    - I have not made an issue of any of this anywhere, until this post
    - I have not even specifically asked for anything to be taken down (though obviously in my opinion the other superuser package mixed with SuperSU's binaries, as well as the LiveBoot package, should go)
    - I have not reported this thread to XDA moderators for copyright violations or otherwise

    While my conversation with @topjohnwu may not win any awards for being friendly (though it may win some for brevity), I think all things considered my response has been rather mild. To be perfectly honest, until the apology post, I thought this was over with already. I think the apology post was triggered because I haven't replied to his last PM for a while - I was in the zone, it happens.

    To emphasize again, I have nothing against @topjohnwu, Magisk, or systemless xposed, and it is certainly not my goal to see any of them go. If it can be made to work together with SuperSU, great.

    I get it though: you think of something, you want to see if you can make it work, you finally get it to work, you publish it, it takes off - enthusiasm gets the better of you. Maybe in the rush some mistakes are made. That doesn't mean you have to just drop it and run. None of my stuff would make it past 0.1 if I stopped at the first big mistake :)

    Aside from said being in the zone coding, I usually regret actually responding to these sort of things the day after, which has made me hesitant to reply. Surprise me.
    76
    Thread temporarily closed so everyone sees this.

    The flood of "SafetyNet isn't working for me either!" posts are not helpful, at all. Please refrain from posting further, it will be looked into. Please do not forget that not passing SafetyNet is 100% NORMAL AND INTENDED when you have an unlocked booloader or running custom firmware. These are workarounds and they will be worked around in turn.

    The Flash
    Forum Moderator

    EDIT: Thread is reopened... I will be cleaning any SafetyNet posts for a while to keep the thread clean for real issues.
    75
    Hello everyone!

    I am aware that Google has updated Safety Net that makes Magisk itself a no go for Android Pay. In fact, I witnessed the change live while I am developing the new magiskhide, which should hide all Magisk modules and Magisk installed root.

    Google is serious about Safety Net now, clearly hunting down all possibility to run Xposed with Safety Net passed. I spend quite some time examining the new security measures last midnight, and fortunately it seems that it is possible to run Magisk and root along with Safety Net if no Xposed is running. I'm glad I removed the old root toggle at the right time lol, that is no longer feasible with the latest detection.

    So stay tuned for the next update, it will come with bug fixes, along with the new magiskhide to bypass that Safety Net.

    Google, how will a few systemless mods do any harm :p:p