Closed HuskyDG closed 1 year ago
I can copy but the context is currently correct for me, as follows
ls -lZ $(which busybox)
lrwxrwxrwx 1 root root u:object_r:system_file:s0 24 1971-07-14 21:49 /system/xbin/busybox -> /data/adb/magisk/busybox
Also for the applets like:
ls -Z $(which setfattr)
u:object_r:system_file:s0 /system/xbin/setfattr
Non-root process cannot access anything in /data/adb
, and busybox is a symlink to /data/adb/magisk/busybox
Generally, non-root apps should not see eg BB because it opens a door for root detection
Btw, I've recently seen a post on XDA with a screenshot, a 'banking' app reporting that system is read-write because the guy had installed OverlayFS?!
Anyway, attached is the BB module v1.06a that copies the BB binary:
ls -lZ $(which busybox)
-rwxr-xr-x 1 root root u:object_r:system_file:s0 2115816 1971-07-16 03:22 /system/xbin/busybox
Generally, non-root apps should not see eg BB because it opens a door for root detection
[ -e /system/bin/busybox ] && echo "Found"
without root access then you will know
Btw, I've recently seen a post on XDA with a screenshot, a 'banking' app reporting that system is read-write because the guy had installed OverlayFS?!
That guy forget to remount system back to Read-only after remounting to Read-write to modify system files, that is the reason
Generally, non-root apps should not see eg BB because it opens a door for root detection
[ -e /system/bin/busybox ] && echo "Found"
without root access then you will know
After unmounting modules, it should not be visible. However, there are some cases we want to use busybox without root access. Example, in Terminal Emulator or Termux, you want to run scripts or test something, it might require busybox.
Since /system/bin/busybox
is a symlink to /data/adb/magisk/busybox
, and access /system/bin/busybox
is actually /data/adb/magisk/busybox
(/data/adb
can only be accessible for root process that has permission to read adb_data_file
), not a mounted files, so it is inaccessible
Sorry, I was on the dark side of Moon over the extended weekend
First I bricked my daily driver Xiaomi by stupidly going over the edge with making changes by using your OverlayFS
Suddenly, phone rebooted and after that only boot-looped to recovery (OrangeFox). Android reported that it cannot decrypt storage - but OrangeFox still happily decrypted and I was able to copy my photos etc to the PC and to upload the ROM OTA and to flash from OF
I couldn't unbrick even with putting uninstall file to the module's folder neither by booting with stock boot IMG (and in the Android safe mode). Android remembered something and it didn't care that stock was returned
Then I said, ok, I will take the case and clean flash the new Xiaomi.eu ROM, upgrading from A12 to A13.
But upon reboot, it complained that the phone is bound to my previous MiCloud account (all as expected) and I had to enter it's pass
But I forgot that pass and since I changed the PC over the years, wasn't able to find it
Next day, after sleeping I solved the problems and activated the phone but (actually, unnecessarily) by asking Xiaomi to unrelated my MiCloud acc from the phone
That way I lost all apps and settings backups I had on MiCloud and (since it was Factory reset) had to re-install and configure everything from the scratch
Btw, there was an opposite request time ago (to mount instead of copying): https://github.com/zgfg/BuiltIn-BusyBox/issues/1
Off the topic but for you Husky:
With Xiaomi.eu ROMs (previously A12, now I upgraded to A13), without any custom Kernel, your OverlayFS installs and worls flawlessly, it mounts my read-only /system, /system-ext, /vendor and /product as read-write, I tested by copying and adding files from MiXplorer and Terminal emulator
Previously I had your Delta 25210, now after upgrading the phone Canary 25106 and it works again. Btw, are you planning to update Delta?
I'm using @HuskyDG 's Magisk Delta and I'm seeing the same problem within Termux. v1.0.6a works.
I'm using @HuskyDG 's Magisk Delta and I'm seeing the same problem within Termux. v1.0.6a works.
What exact problem?
Termux has its own PATH and if not properly configured it will not see /system/bin or /system/xbin
I don't provide customer support for Termux
Install a simple Terminal emulator, make sure that it has both /system/bin and /system/xbin in the PATH and test
Hint for Termux - Add /system/bin and /system/xbin to the PATH
Simply put, checked with solid explorer this is a miscall... /system/xbin
doesn't include the symlinked applets for v1.0.7.
I do have both /system/bin
and /system/xbin
in PATH. v1.0.6a works but v1.0.7 doesn't. Validated with busybox
command.
I'm curious though why other applets are under /data/adb/modules/BuiltIn-BusyBox/system/xbin
but under /system/xbin
only busybox seems added
I'm curious though why other applets are under
/data/adb/modules/BuiltIn-BusyBox/system/xbin
but under/system/xbin
only busybox seems added
This module works fine with the official Magisk, and Magisk Canary versions incl. the latest Magisk Canary v26404
This module also works with the previous versions of Magisk Delta - namely with Delta 26401 (I didn't test with v26402 but I used Delta v26401 for two months and this module worked fine)
So the problem is in Kitsune v26403
Even more, try instead BusyBox NDK module from Osm0sis: https://github.com/Magisk-Modules-Repo/busybox-ndk Download link: https://xdaforums.com/attachments/update-busybox-installer-v1-36-1-all-signed-zip.6000117/
BB NDK will also not work on Kitsune v26403, you will only have busybox binary in /system/(x)bin, but there will be no BB applets (except those that are common to ToyBox and come pre-installed to /system/bin but as part of ToyBox in the ROM)
Ie, BB NDK will similarly create symlinks for the BB applets in its folder: /data/adb/modules/busybox-ndk/system/(x)bin
but Kitsune will fail to mount them to /system/(x)bin
So:
Instead of using the unofficial Kitsune, switch to the official Magisk or Magisk Canary
Or downgrade to the older version of Magisk Delta, v26401
Or check with Kitsune developer to fix the mounting of system/bin and system/xbin in Kitsune to make it .work as in the official Magisk
Or sorry, don't use this module with unofficial Magisk forks like Kitsune😁 I have no plans to implement workarounds and shenanigans just for Kitsune or other custom forks
Thank you for the time for detailed diagnosis and reply! Didn't know it's a bug of Kitsune. I'll report this to Kitsune developer.
Do not create symlink pointing to
/data/adb/magisk/busybox
, it will not accessible by non-root process or restricted root process (process with root access but limited capabilities such aszygote
,adb root
, ...). Instead copying busybox to$MODPATH/system/bin
and create symlink pointing to./busybox
instead. The context ofbusybox
also must beu:object_r:system_file:s0
notu:object_r:adb_data_file:s0
.