Any chance that while enabling modules one by one you also updated a module?
su
TB=toybox
which $TB
ls -l $(which $TB)
$TB --version
# to learn more, read:
$TB --help
cd $(which $TB | sed "s,/$TB$,,")
pwd
ls -l cut
ls -l grep
ls -l ls
ls -l pwd
ls -l sed
ls -l wc
ls -l which
lrwxrwxrwx 1 root root 6 1971-07-07 12:40 cut -> toybox
lrwxrwxrwx 1 root root 6 1971-07-07 12:40 grep -> toybox
lrwxrwxrwx 1 root root 6 1971-07-07 12:40 ls -> toybox
lrwxrwxrwx 1 root root 6 1971-07-07 12:40 pwd -> toybox
lrwxrwxrwx 1 root root 6 1971-07-07 12:40 sed -> toybox
lrwxrwxrwx 1 root root 6 1971-07-07 12:40 wc -> toybox
lrwxrwxrwx 1 root root 6 1971-07-07 12:40 which -> toybox
toybox cut --help
# or shorter, just:
cut --help
ls -l | grep $TB | grep ^lr.x | wc -l
ls -l | grep $TB | grep ^lr.x | rev | cut -d ' ' -f 3 | rev
Continuing on the previous talk about /system/bin
That folder serves to provide pre-installed Linux binaries and utilities (many are needed by the system itself, like during the booting to System), and that includes also the toybox tool-box, ie, the toybox binary and its applets (Linux utilities linked to the toybox binary)
If I recall correctly, toybox comes already as part of AOSP, those utilities that are needed to run the AOSP build scripts (except for the compiler, linker, and so)
Hence the pre-installed toybox with its applets built to AOSP are self-sufficient to rebuild the AOSP (that was like the agenda behind)
Now, I'd like to ask those of you who are not afraid of Terminal emulator, to run the following commands to find about the toybox preinstalled to your ROMs
Commands must be executed in the given order, since I define some variable ($TB), switch to a particular directory, and use them all till the end
First we look if the toybox binary is preinstalled, where (full path), and for its version:
Code:su TB=toybox which $TB ls -l $(which $TB) $TB --version # to learn more, read: $TB --help
Expected output will be: /system/bin/toybox (maybe on some older ROMs /sbin/toybox ?!), v0.8.4-android or so (on my two phones)
Btw the latest toybox is v0.8.9 from Jan 2023, see the official ToyBox site https://landley.net/toybox
Now we extract the system folder/path where the toybox is installed, change to that directory and print the current path (pwd):
Code:cd $(which $TB | rev | cut -c 7- | rev) pwd
Observe that I used a trick: rev applet/utility to reverse the full path string (eg /system/bin/toybox to xobyot/nib/metsys/), then cut to cut all before the 7th character now counting from the beginning, (/nib/metsys/) and then rev to reverse it back (/system/bin/)
That way I didn't need heavy artillery like sed or even awk (awk is not part of toybox and it requires additional toolbox like busybox) to cut off from the end but from the path/string with an unknown/variable length
Now we look for the expected toybox utilities to be installed to the same directory (I'm looking for the utilities I'm just using: cut, grep, ls, pwd, wc, which; the others like cd and rev are provided by the shell itself, hence I don't need an additional tool-box like busybox and its applets)
Code:ls -l cut ls -l grep ls -l ls ls -l pwd ls -l wc ls -l which
They are expected to be linked to the toybox binary with chmod 755 or 744 (executable files), like:
Code:lrwxrwxrwx 1 root root 6 1971-07-07 12:40 cut -> toybox lrwxrwxrwx 1 root root 6 1971-07-07 12:40 grep -> toybox lrwxrwxrwx 1 root root 6 1971-07-07 12:40 ls -> toybox lrwxrwxrwx 1 root root 6 1971-07-07 12:40 pwd -> toybox lrwxrwxrwx 1 root root 6 1971-07-07 12:40 wc -> toybox lrwxrwxrwx 1 root root 6 1971-07-07 12:40 which -> toybox
Hence they can be called two ways, like:
Code:toybox cut --help # or shorter, just: cut --help
Now we list all files in this directory (line by line), grep (filter) for those having toybox in the line/string (either the toybox binary itself or applets linked to the toybox binary) and additionally filter from them those being the executable links (lrwx), and count the number of these filtered lines:
Code:ls -l | grep $TB | grep lrwx | wc -l
Expected result will be like 174 (latest toybox v0.8.9 can provide many more, 233 applets), meaning that we have the toybox binary with eg 174 its applets
To summarize, we will use again the trick with reversing the lines/strings and cutting out their third fields (applet names) but counting the field ordinals from the (reversed) beginning, since the cut utility cannot count and cut from the end
Eg, we have to extract the third field/word (applet name) counting from the end, eg: pwd, from the ls -l line/string ending with the known end part of the format like:
... pwd -> toybox
hence we execute:
Code:ls -l | grep $TB | grep lrwx | rev | cut -d ' ' -f 3 | rev
Expected list of the pre-installed toybox applets will include: [ (aka the test utility), test, utilities mentioned above, and more like cat, chmod, echo, find, ln, gunzip, gzip, kill, mkdir, mount, printf, rm, rmdir, even sed, sleep, sort, touch, tar and so on:
[
acpi
base64
basename
blockdev
cal
cat
chattr
chcon
chgrp
chmod
chown
chroot
chrt
cksum
clear
cmp
comm
cp
cpio
cut
date
dd
devmem
df
diff
dirname
dmesg
dos2unix
du
echo
egrep
env
expand
expr
fallocate
false
fgrep
file
find
flock
fmt
free
fsync
getconf
getenforce
grep
groups
gunzip
gzip
head
hostname
hwclock
i2cdetect
i2cdump
i2cget
i2cset
iconv
id
ifconfig
inotifyd
insmod
install
ionice
iorenice
kill
killall
ln
load_policy
log
logname
losetup
ls
lsattr
lsmod
lsof
lspci
lsusb
md5sum
microcom
mkdir
mkfifo
mknod
mkswap
mktemp
modinfo
more
mount
mountpoint
mv
nc
netcat
netstat
nice
nl
nohup
nproc
nsenter
od
paste
patch
pgrep
pidof
pkill
pmap
printenv
printf
ps
pwd
readelf
readlink
realpath
renice
restorecon
rm
rmdir
rmmod
rtcwake
runcon
sed
sendevent
seq
setenforce
setsid
sha1sum
sha224sum
sha256sum
sha384sum
sha512sum
sleep
sort
split
stat
strings
stty
swapoff
swapon
sync
sysctl
tac
tail
tar
taskset
tee
test
time
timeout
top
touch
tr
true
truncate
tty
ulimit
umount
uname
uniq
unix2dos
unlink
unshare
uptime
usleep
uudecode
uuencode
uuidgen
vmstat
watch
wc
which
whoami
xargs
xxd
yes
zcat
---
Finally, I would be interested to see from your ROMs - thanks in advance:
- do you have toybox pre-installed
- is it pre-installed to /system/bin or some other directory
- which version (couple of years ago old v0.8.4 or maybe newer)
- how many toybox executables are preinstalled in your ROM (174 or more or less)
cd $(which $TB | rev | cut -c 7- | rev)
TBP=$( which $TB )
echo ${TBP%/*}
cd ${TBP%/*}
ls -l | cut -c50- | cut -f1 -d " "
Given code was tried to be 'minimalistic' hence 'ugly' or not is subjectiveHi
fyi
Bash:cd $(which $TB | rev | cut -c 7- | rev)
rev is not installed per default (at least in the OmniROM) and that is ugly code ... better use something like this:
Bash:TBP=$( which $TB ) echo ${TBP%/*} cd ${TBP%/*}
and to list the symbolic links something like this:
Bash:ls -l | cut -c50- | cut -f1 -d " "
regards
Bernd
Given code was tried to be 'minimalistic' hence 'ugly' or not is subjective
Btw, some bashisms are not supported by other shells and eg, cannot be used in the scripts (customize.sh, post-fs-data.sh, service.sh, uninstall.sh in the modules since Magisk does not run them from the bash shell. And this was ad-hoc glued and based on the code Im using in the modules
Interesting if you don't have rev utility
Nevertheless, do you have toybox, in /system/bin, which version and how many applets if not a secret please
ASUS_I006D:/system/bin # getprop ro.system.build.fingerprint
asus/omni_zenfone8/zenfone8:13/TQ2A.230505.002.A1/26:user/release-keys
ASUS_I006D:/system/bin #
ASUS_I006D:/system/bin # ./toybox --version
toybox 0.8.6-android
ASUS_I006D:/system/bin #
ASUS_I006D:/system/bin # ls -l | grep toybox | awk '{ print $8 }' | wc -l
176
ASUS_I006D:/system/bin #
ASUS_I006D:/system/bin # ls -l | grep toybox | awk '{ print $8 }'
[
acpi
base64
basename
blockdev
cal
cat
chattr
chcon
chgrp
chmod
chown
chroot
chrt
cksum
clear
cmp
comm
cp
cpio
cut
date
dd
devmem
df
diff
dirname
dmesg
dos2unix
du
echo
egrep
env
expand
expr
fallocate
false
fgrep
file
find
flock
fmt
free
fsync
getconf
getenforce
grep
groups
gunzip
gzip
head
hostname
hwclock
i2cdetect
i2cdump
i2cget
i2cset
iconv
id
ifconfig
inotifyd
insmod
install
ionice
iorenice
kill
killall
ln
load_policy
log
logname
losetup
ls
lsattr
lsmod
lsof
lspci
lsusb
md5sum
microcom
mkdir
mkfifo
mknod
mkswap
mktemp
modinfo
more
mount
mountpoint
mv
nc
netcat
netstat
nice
nl
nohup
nproc
nsenter
od
paste
patch
pgrep
pidof
pkill
pmap
printenv
printf
ps
pwd
readelf
readlink
realpath
renice
restorecon
rm
rmdir
rmmod
rtcwake
runcon
sed
sendevent
seq
setenforce
setsid
sha1sum
sha224sum
sha256sum
sha384sum
sha512sum
sleep
sort
split
stat
strings
stty
swapoff
swapon
sync
sysctl
tac
tail
tar
taskset
tee
test
time
timeout
top
touch
toybox
tr
true
truncate
tty
uclampset
ulimit
umount
uname
uniq
unix2dos
unlink
unshare
uptime
usleep
uudecode
uuencode
uuidgen
vmstat
watch
wc
which
whoami
xargs
xxd
yes
zcat
ASUS_I006D:/system/bin #
Where are you hoping to find these "lost" pictures?I have rooted note 10+ SM-N976B with Magisk in order to recover old pictures. I have root and Magisk is able to grand SU permissions.
Problem I have is that when using file recovery apps like Diskdigger it can't find a single file.
All memory partitions seem to have been renamed. Example /dev/apnfitdolj.magisk/mirror/data instead of just data which is what it should be.
Is there something I can do here as I lost a lot of memorable photos that I really want to recover.
I haven't installed a custom recovery as recovery was already in the magisk file that was flashed.
Would custom recovery resolve this?
Don't know your phone and ROM and a particular app you mention but I use MiXPlorer on my rooted phones and I can go with root to /data and read/write to all folders with no problem, and with no need to use any /dev mounts, mirrors or soI have rooted note 10+ SM-N976B with Magisk in order to recover old pictures. I have root and Magisk is able to grand SU permissions.
Problem I have is that when using file recovery apps like Diskdigger it can't find a single file.
All memory partitions seem to have been renamed. Example /dev/apnfitdolj.magisk/mirror/data instead of just data which is what it should be.
Is there something I can do here as I lost a lot of memorable photos that I really want to recover.
I haven't installed a custom recovery as recovery was already in the magisk file that was flashed.
Would custom recovery resolve this?
I upgraded to the Z fold 4 from the note 10+ and I didn't copy all pictures over before doing a factory reset on the device.Where are you hoping to find these "lost" pictures?
If you deleted them by accident, their space could have been overwritten by now.
If they used to be accessible from a PC, they are probably in the area called /sdcard, unless they were on an external SD-card. If an external SD-card, remove it from your device and read it directly on a PC.
If you want to know which partition is "/data", check the output of "mount". (My tablet has /dev/block/mmcblk0p69 mounted on /data) Or run a partition program like "fdisk -l". ("fdisk" is not in my toybox, but it is in @osm0sis' busybox.)
If there is a good custom recovery for your device I don't think it offers you anything you don't have right now. It would just be a different way to run Android with root privilege. Unless something like TWRP can be counted on to not touch /data without being told to, which might be of some value to avoid overwriting any more of these pictures, assuming they were deleted.
It's a galaxy note 10+ with stock rom rooted with Magisk.Don't know your phone and ROM and a particular app you mention but I use MiXPlorer on my rooted phones and I can go with root to /data and read/write to all folders with no problem, and with no need to use any /dev mounts, mirrors or so
Also, Internal memory is always /sdcard
Like on PC, if folders were deleted, their space might have been overwritten
Regarding to custom Recoveries, be aware that new Android versions (it has nothing with Magisk) encrypt Data and Internal storage, hence they can not recognize folders and files if they don't support decryption (you must enter your same Android unlock pin/pass), bcs it is an input parameter required for decryption
If you don't set unlock pin then Android uses some default but random/unique key it creates and secretly stores on the first reboot after factory resetting (formatting Internal storage).It's a galaxy note 10+ with stock rom rooted with Magisk.
You mention encryption. I haven't set up a screen unlock since rooting.
Is it possible that if I set up a password to unlock the device that it'll decrypt these partitions enabling me to recover the photos?
Have you checked your Google account? (Not on the phone, on a PC, in a browser.) If you let Google "sync" your phone, they might have backed up your pictures.I upgraded to the Z fold 4 from the note 10+ and I didn't copy all pictures over before doing a factory reset on the device.
Thought I'd try rooting and recovery that way to get them back. You need root for apps like diskdigger to scan the root of the device.
Since unlocking bootloader and rooting not a single file is found.
I upgraded to the Z fold 4 from the note 10+ and I didn't copy all pictures over before doing a factory reset on the device.
Thought I'd try rooting and recovery that way to get them back. You need root for apps like diskdigger to scan the root of the device.
Since unlocking bootloader and rooting not a single file is found.
It's the /data partition on the internal storage that is what im trying to recover from but seems to be without success. I'll be gutted if I've lost these photos forever as I had lots from the birth of my children along with many other memorable photos which unfortunately weren't backed up anywhere
So due to random encryption keys there is no hope of recovering anything?If you don't set unlock pin then Android uses some default but random/unique key creates and secretly stores on the first reboot after factory resetting (formatting Internal storage).
Since the constantly change and improve with the new Android versions, it causes delays and takes additional efforts for TWRP developers to breaker and to make TWRP to be also able to decrypt the Data and Internal storage
It's all about protecting the user's data (that can be also now the photos of your children) in case of loosing or stoling a phone
Therefore, whatever you do now will not help.to recover (random key used as default for encryption during your previous life, ie, before factory resetting).
And btw, unlocking BL usually includes mandatory factory reset
You had to backup your data (photos are the most easiest part - connect the phone by USB cable to PC, use MTP and copy the /dcim/Camera folder to PC)
This is true. Never used to be the case. I've had this issue in the past before the whole bootloader unlocking thing and a factory data reset when flashing new software still enabled you to recover deleted files.Have you checked your Google account? (Not on the phone, on a PC, in a browser.) If you let Google "sync" your phone, they might have backed up your pictures.
Otherwise, I would guess there is nothing for you to recover. Like @zgfg said, the "wipe data / factory reset" is intended to destroy the previous data. It's not likely Google left that data where an enterprising thief (or desperate father) could find it.
It has nothing to do with root - if by root you mean installing MagiskSo due to random encryption keys there is no hope of recovering anything?
Wish I knew before.
What I need to know is can root be done without this problem?
A lot of what I've lost could be on my previous note 9 too (deleted obviously after factory reset) but I don't want to be stuck in the same situation.
This is true. Never used to be the case. I've had this issue in the past before the whole bootloader unlocking thing and a factory data reset when flashing new software still enabled you to recover deleted files.
Still never learnt my lesson. I never backup because I usually have way more than the standard 15gb to backup. I should really start regularly backing up files and photos, videos etc to my laptop really to prevent this issue in future.
Sorry don't think I'm complaining at magisk for this because I'm not. What I am saying is that in the past when rooting etc, before bootloader unlocking was a thing factory reset never wiped all the data completely. Files were still recoverable. That's where I guess i was a bit naive, because I haven't rooted phones for a long long time I didn't realise that a factory reset now actually does completely destroy all data making nothing recoverable.It has nothing to do with root - if by root you mean installing Magisk
It has with unlocking Bootloader - that does factory reset
And if you decide to switch to a custom ROM, and later to another custom ROM, , every time you will also have to factory reset (when switching from one custom ROM to another, not when upgrading the same custom ROM - but again, that is not rooting, it has nothing to do with Magisk)
For all that you must have your Bootloader unlocked, but you unlock Bootloader only once, and after that you may thousand times install and uninstall Magisk (that's the rooting and unrooting), and installing/uninstalling Magisk will not affect your data
IDK how is all that for Samsung but eg for Xiaomi, user is clearly warned that unlocking BL will immediately factory reset his Internal memory. And he is warned once again the last moment right before pushing the 'red button'
And on all forums, guides, everywhere there are warnings bout
Hence if somebody still ignores all that, he clearly did not do his homework. And unfortunately, that's not really a topic for Magisk (afaik, even the official Magisk Installation guide on GitHub describes that a precondition for installing a Magisk is to have the unlocked Bootloader. And that before unlocking BL, one has to backup his data)
Yeah but technologies constantly change. You probably jumped from some phone that was originally released with A9 or maybe even older Android version (hence actually a phone model several years old) to a phone based on A10 or A11 - everytime there is a technology shift and what was valid earlier, may be different for that newer generationSorry don't think I'm complaining at magisk for this because I'm not. What I am saying is that in the past when rooting etc, before bootloader unlocking was a thing factory reset never wiped all the data completely. Files were still recoverable. That's where I guess i was a bit naive, because I haven't rooted phones for a long long time I didn't realise that a factory reset now actually does completely destroy all data making nothing recoverable.
Apologies if my last reply came across the wrong way.
This is just something I was not expecting as when i last played with this sort of stuff a factory reset wasn't as in depth as it clearly is now
Oh, maybe? The only one I re-installed was the Magisk built-in BusyBox since it said an update was available. The others were a simple enable.
Are you referring to official GitHub Instruction page?This thing is so confusing, it's my first time using it and I'm finding it super complicated
I already have Lineage OS 20 installed on my Pixel 2 Walleye with unlocked bootloader
These installation instructions are atrocious. Why is this all so complicated and confusing?
Start at the top of that page...I don't understand what I'm supposed to do. The Magisk APK is installed but what's with this patching stuff ?
I learned that I can get into the LSPosed manager by running this ...Question about shortcut for LSPosed (Parasitic manager)
I remember in the good old days, LSPosed gave you the option to set shortcut to the home screen (or it did automatically), hence you were free to uninstall LSPosed app (for Parasitic manager functionality)
I uninstalled and reinstalled LSPosed, and now I cannot set that shortcut anymore - I looked into the LSPosed manager settings, there is no option to set the shortcut
And LSPosed app complains/suggests to use the shortcut (screenshot) but it doesn't set it?!
---
Btw, I know that I can open LSPosed from the permanent notification (hence also no need to leave LSPosed app installed), but I do want to also have a shortcut on the home screen
Btw, I have attached below screenshots for all settings (LSPosed and Android System), what must be allowed to have that permanent LSPosed notification active (once I disabled that notification in Android Systems and when I lost the shortcut, I had to spend time to find how to allow the notification back)
Excellent to know - it worksThat will install the shortcut on the Home screen, which is probably fine for almost everyone.
But I use Nova7 and I don't want that shortcut on the Home screen. I want to put it into one of the "app drawers" that Nova7 manages. But since it's only a shortcut and not a full-blown app, Nova7 won't let me me relocate it in that way.
I know that's a just a limitation of the Nova7 launcher, but I'm not going to change launchers just because of this one issue.
Anyone who shares some of my weird, idiocsyncratic preferenes for how to use Android and wants an actual app and not just a shortcut for invoking the LSPosed manager can try what I described above.
#!/system/bin/sh
su -c am start -c org.lsposed.manager.LAUNCH_MANAGER com.android.shell/.BugreportWarningActivity
Solved and answer myself right in the post above yours - I update LSPosed and the latest from TG has a button to install shortcutI learned that I can get into the LSPosed manager by running this ...
/system/bin/am start -c org.lsposed.manager.LAUNCH_MANAGER com.android.shell/.BugreportWarningActivity
If you're using Tasker, you can create a task to invoke this via the "Run Shell" action, and then you can export that action as an apk file which will install a shortcut on your Home screen which runs that Tasker action.
I did that, and I can now run that shortcut to get into the LSPosed manager, just like the parasitic manager lets us do.
I'm guessing that there might be other utilities in addition to Tasker which also let us create shortcuts to run scripts like this.
Yeah... And Microsoft should have stayed with DOS, and maybe Windows as a DOS add-on!...This illustrates why I always want to be able to use a device upon which TWRP (or perhaps OrangeFox) is functional. As long as I've taken a proper full nandroid backup of a previous working system, I can easily nandroid-restore that working system after an upgrade, if I wish.
I am not happy with Google for continuing to "enhance" (ha ha!) Android as time goes on,
That's certainly NOT their intention...thereby making it more and more difficult to get TWRP and OrangeFox working with newer Android versions.
https://twrp.me/about/TWRP development is done by roughly 4 people at this point. We also have a large support community with many people who are willing to answer questions and help people with their devices either through our Zulip channel or on forums like xda-developers.
We need your help! The bulk of TWRP work is done by a handful of people on a volunteer basis. We have pushed most of our device files to our github and we have a gerrit instance. If you have the ability, please help us maintain our official devices and/or add your device to our official device list. Thanks in advance!
I consider it to be unfair to define "modder" or "developer" as "anyone who dumps partitions/nandroid".
<SNIP>
I miss the days when I could just use adb to dump the data partition into an image file and flash it back. 😿️<SNIP>
Since it's not available without unlocking, 'anyone who dumps partitions / performs nandroid' has to agree to modify the device by unlocking which changes original product features including disabling security functions and other features... Then they generally install a custom (modified) recovery...
<SNIP>
Fix in Canary 26203Update on the ONDK regression causing all 32bit devices to fail after Magisk 26.2:
All 32-bit arm static executables segmentation fault after commit 41226c1 · Issue #7264 · topjohnwu/Magisk
Device: Galaxy Tab 4 10.1" LTE (matisselte)...github.com
Edit:
And patched!