Magisk General Support / Discussion

nowster

Senior Member
Dec 30, 2012
363
116
63

contaoxxx

Member
Jan 10, 2018
13
1
2
I think Magisk has broken some files. I can not fix it again.
Tomorrow I will make a backup and flash an wipe my Pixel 2.

I used Magisk and AFWall+ and after Magisk update phone crashed after turn on WI-FI. But all Wi-Fi networks are listed... Also freezes with mobile data...
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
4,782
3,887
243
Sydney
This is my result :)

~ $ which sh
/data/data/com.termux/files/usr/bin/sh
~ $ echo $PATH
/data/data/com.termux/files/usr/bin
Thats not right, termux is not set up to run standard shell scripts in a normal way.
Do your scripts "work"?

Do you have a reason for using termux? (As opposed to any other terminal emulator.)
I use Jack Palevich's Terminal Emulator for Android. I always assumed it was showing me the system the way everyone else sees it. (E.g., I see "sh" in "/system/bin".)
As said by @J.Michael use a standad shell / terrminal to run standard scripts.

and also check the reslts again from the previous test, within a standard shell/terminal. I also saw the mention of a termux bug above.
 
Last edited:

zgfg

Senior Member
Oct 10, 2016
4,829
2,139
233
Did anybody try to update Magisk today to the new Canary - saying that Manager and Magisk are now merged

I've updated Manager but when I want to patch my boot img it alwys fails

Since Magisk and Manager are now merged to one, do I still need to update Magisk (as Manager asks me) or how?

Instead of patching should I opt for Direct update - but I don't want to risk a brick, I was always patching to have a choice to simply downgrade if new version brings new bugs)?!
 

Attachments

dipseeet

Member
Jun 9, 2012
42
16
28
You don't say which version of Magisk you have when you are reporting "/bin/*sh".
Magisk 21.3
Manager 8.0.7

I don't care which modules you have, I think you should try disabling all modules and see if that affects whether "sh" is in "/bin", and whether that is enough to get termux to "work". (I need help here. I don't know what termux is. I also thought it was just another terminal emulator. Then I Googled it and a snippet said it installs a linux-like environment on a (not necessarily rooted) device. I don't know what that says about what normal things get hidden/replaced.)
I use Termux bcoz they have a Termux:Widget app where iam able to start scripts by just pressing a script file i added in the widget.

Those scripts i started to create bcoz i got *little* problems with Kernel Adiutor.
(now iam using SmartPack but the same problems)
In SmartPack i go to "Misc" for example:
I set Vibration value from '100' to '22' and i set *start at boot*.
After boot it's still 100 ... wtf

My idea was to write a little code to execute a command to change this value.
(don't like to open app etc.)
Just click and work is done :)
Termux:Widget helped me to do this.

These are the commands iam using in my script
(to change the Vibrator value):

su -c chmod 644 /sys/class/timed_output/vibrator/vtg_level
su -c echo 22 > /sys/class/timed_output/vibrator/vtg_level
su -c chmod 444 /sys/class/timed_output/vibrator/vtg_level

my first line is always
#!/system/bin/sh
in all my scripts.

My next idea was to execute it on boot.
Termux does have a Termux:Boot app but it didn't worked (don't know why?) for me.

This is why i installed Magisk bcoz since then i got those scripts working at boot.
(i put them in the service.d folder)

I don't really need those scripts but i learned quite a lot with all those googling n searching in xda n writing sessions.

What is your busybox install?
Iam using BusyBox Installer by Stericson(?)
with version 1.31.1

I mean, did you do something to deliberately install busybox? Or do you just know you have busybox installed? (I had busybox in Kitkat; in Android 9, it's using toybox.)
BusyBox iam using since my beginnings of rooting (my samsungs) and i just click install.
I always (i think so) installed BusyBox into
/system/xbin

I was flailing when I suggested looking for every shell I could remember. It's not important that you don't have most of them.
haha lol sorry ^^

What *is* important is that you *do* have "sh". Confirm or deny: You found "sh" in "/bin", but when you run termux and try to run a script, something says you do *not* have "/bin/sh"?
Yes it says so.

When i open Termux iam first
$

next i type
$ whoami

i get
$ (name of the owner but not "root")
(here i think it's not possible to get my boot.sh running bcoz iam still not "root")
(ok it *is* running but the commands are not able to execute)

now i type
$ su
i get
#
and
# whoami
# root
iam "root"

now i type
# sh boot.sh
or just
# ./boot.sh
and it's running & working.

What is a script manager app? How is it different from a terminal emulator?
:)
It's just an app where i can execute scripts.
I installed it (2 days ago) and i just tested it.
It *is* the same (Termux too) as a Terminal Emulator
:)

Are the "su" commands you needed to change inside the script you are executing? Or is the "su" command the way you run the script?
Inside the script.

I was reading a lot across threads to figure out how to write a script almost correctly and to get them running.
But i still need more practice to understand
why is something working
and
why is something not working.

Just as a test, if termux is "not working", and is saying "sh not found": Try deleting the line "#!/system/bin/sh" from the beginning of one script file. Whether it works or not, try replacing that line with "#!/bin/sh". (I assume you have a link "/bin" pointing to "/system/bin".)
I'll test it now and will txt back asap ...
 
  • Like
Reactions: J.Michael

pndwal

Senior Member
Jun 23, 2016
1,850
1,038
113
Sydney
Did anybody try to update Magisk today to the new Canary - saying that Manager and Magisk are now merged

I've updated Manager but when I want to patch my boot img it alwys fails

Since Magisk and Manager are now merged to one, do I still need to update Magisk (as Manager asks me) or how?

Instead of patching should I opt for Direct update - but I don't want to risk a brick, I was always patching to have a choice to simply downgrade if new version brings new bugs)?!
I did direct update which worked seamlessly.
https://forum.xda-developers.com/t/magisk-general-support-discussion.3432382/post-84355093

Packaging is different, but AFAIUI, Magisk / Manager still function independently as before, so Magisk update is still needed to upgrade.

Guess there may be a bug w/ patching image method, but just wondering if you did this (I think you use hidden Manager):
"- [General] The app name is changed from "Magisk Manager" to simply "Magisk". If you are currently hiding Magisk Manager, you would need to un-hide and re-hide to have the app label renamed properly."... Then check Manager restarts properly before patching image (just in case this is an issue).

Nb. After restarting, I am seeing 'Latest [Manager] N/A', unlike your screenshot. PW
 

zgfg

Senior Member
Oct 10, 2016
4,829
2,139
233
I did direct update which worked seamlessly.

Packaging is different, but AFAIUI, Magisk / Manager still function independently as before, so Magisk update is still needed to upgrade.

Guess there may be a bug w/ patching image method, but just wondering if you did this (I think you use hidden Manager):
"- [General] The app name is changed from "Magisk Manager" to simply "Magisk". If you are currently hiding Magisk Manager, you would need to un-hide and re-hide to have the app label renamed properly."... Then check Manager restarts properly before patching image (just in case this is an issue).

Nb. After restarting, I am seeing 'Latest [Manager] N/A', unlike your screenshot. PW
>> I think you use hidden Manager
No, I didn't have hidden Magisk Manager!

If I had, I would mention that (not a newbie here)

And if I would have it (when I was hiding it months ago), I would always unhide Manager before upgrades, to avoid any troubles (as Magisk usually had troubles with)
 
Last edited:

dipseeet

Member
Jun 9, 2012
42
16
28
Which Magisk?
Magisk 21.3
Manager 8.0.7

Is this within (while running) termux?
Yes

Do your scripts "work"?
No.
When i type
$ sh boot.sh
it's starting my script but not with success.

Only when i first type
$ su
then i get
#
and now i type
# sh boot.sh
or just
# ./boot.sh
and then it works.

Do you have a reason for using termux? (As opposed to any other terminal emulator.)
I use Jack Palevich's Terminal Emulator for Android. I always assumed it was showing me the system the way everyone else sees it. (E.g., I see "sh" in "/system/bin".)
Like i wrote in my last post above :)

Bcoz they offer an Termux:Widget app:
On my homescreen i see my list with scripts and i just click on 1 of them and it's starting the script.

Like a shortcut. my idea was to have a shortcut and not to open any app to locate this file and select it to start it.

With SmartPack (my Kernel Manager) i change
"CPU" (CPU Boost and CPU Min/Max)
"CPU Hotplug"
"Low Memory Killer"
"IO Scheduler" (i only change 1 value)
"Thermal" (i disable all 3 options)
"Misc" (only Vibration value)

My scripts are commands able to make those changes *outside* the (SmartPack) app.
 

pndwal

Senior Member
Jun 23, 2016
1,850
1,038
113
Sydney
Iam using BusyBox Installer by Stericson(?)
with version 1.31.1



BusyBox iam using since my beginnings of rooting (my samsungs) and i just click install.
I always (i think so) installed BusyBox into
/system/xbin
I'd be giving this a go for fully compatible, systemless solution:

From repo. PW
 
  • Like
Reactions: dipseeet

dipseeet

Member
Jun 9, 2012
42
16
28
I'd be giving this a go for fully compatible, systemless solution:

From repo. PW
:) thanks a lot
a few days ago i started using it ^^

and it saved my current system!!!

(after i uninstalled BusyBox with my BB Installer i wasn't able anymore to install it again)

With this module i have BusyBox back on my system.
 
  • Like
Reactions: pndwal

youngtjjones

Member
Aug 10, 2009
32
8
38
I did direct update which worked seamlessly.
https://forum.xda-developers.com/t/magisk-general-support-discussion.3432382/post-84355093

Packaging is different, but AFAIUI, Magisk / Manager still function independently as before, so Magisk update is still needed to upgrade.

Guess there may be a bug w/ patching image method, but just wondering if you did this (I think you use hidden Manager):
"- [General] The app name is changed from "Magisk Manager" to simply "Magisk". If you are currently hiding Magisk Manager, you would need to un-hide and re-hide to have the app label renamed properly."... Then check Manager restarts properly before patching image (just in case this is an issue).

Nb. After restarting, I am seeing 'Latest [Manager] N/A', unlike your screenshot. PW
Do you have to be rooted to use this build?
 
  • Like
Reactions: BillGoss

pndwal

Senior Member
Jun 23, 2016
1,850
1,038
113
Sydney
Did anybody try to update Magisk today to the new Canary - saying that Manager and Magisk are now merged

I've updated Manager but when I want to patch my boot img it alwys fails

Since Magisk and Manager are now merged to one, do I still need to update Magisk (as Manager asks me) or how?

Instead of patching should I opt for Direct update - but I don't want to risk a brick, I was always patching to have a choice to simply downgrade if new version brings new bugs)?!
I did direct update which worked seamlessly.
https://forum.xda-developers.com/t/magisk-general-support-discussion.3432382/post-84355093

Packaging is different, but AFAIUI, Magisk / Manager still function independently as before, so Magisk update is still needed to upgrade.

Guess there may be a bug w/ patching image method, but just wondering if you did this (I think you use hidden Manager):
"- [General] The app name is changed from "Magisk Manager" to simply "Magisk". If you are currently hiding Magisk Manager, you would need to un-hide and re-hide to have the app label renamed properly."... Then check Manager restarts properly before patching image (just in case this is an issue).

Nb. After restarting, I am seeing 'Latest [Manager] N/A', unlike your screenshot. PW
>> I think you use hidden Manager
No, I didn't have hidden Magisk Manager!

If I had, I would mention that (not a newbie here)

And if I would have it (when I was hiding it months ago), I would always unhide Manager before upgrades, to avoid any troubles (as Magisk usually had troubles with)
Sorry, just trying to help, and that was OTTOMH, just a low likelihood solution anyway...

You also asked about need to update, and if you should opt for direct update, and I indicated that updating directly works fine for me.

I also said "Guess there may be a bug w/ patching image method..."

I just had some time in a break, and tried patching image to check, and had exactly the same problem, so seems bug is confirmed.

A GitHub issue has also been made some 9 hours ago:

Interestingly, I also now have the same 'latest' Manager build discrepancy mentioned here again. It initially showed, was replaced by 'latest N/A', then later returned. The debug apk available always gives the lower (earlier?) build number for Manager when reinstalling.

@vvb2060 is (self)assigned to this issue. Let's hope he solves it quickly. I expect he will since most of the commits for this update are his. PW
 
Last edited:
  • Like
Reactions: dr4go and zgfg

BillGoss

Senior Member
Sep 2, 2010
4,455
3,818
253
Sydney
Did anybody try to update Magisk today to the new Canary - saying that Manager and Magisk are now merged

I've updated Manager but when I want to patch my boot img it alwys fails

Since Magisk and Manager are now merged to one, do I still need to update Magisk (as Manager asks me) or how?

Instead of patching should I opt for Direct update - but I don't want to risk a brick, I was always patching to have a choice to simply downgrade if new version brings new bugs)?!
Do you have to be rooted to use this build?
Sorry, just trying to help, and that was OTTOMH, just a low likelihood solution anyway...

You also asked about need to update, and if you should opt for direct update, and I indicated that updating directly works fine for me.

I also said "Guess there may be a bug w/ patching image method..."

I just had some time in a break, and tried patching image to check, and had exactly the same problem, so seems bug is confirmed.

A GitHub issue has also been made some 9 hours ago:

Interestingly, I also now have the same 'latest' Manager build discrepancy mentioned here again. It initially showed, was replaced by 'latest N/A', then later returned. The debug apk available always gives the lower (earlier?) build number for Manager when reinstalling.

@vvb2060 is (self)assigned to this issue. Let's hope he solves it quickly. I expect he will since most of the commits for this update are his. PW
Seems you must at the moment. Direct Install w/ root works fine for me. I don't think Patching Image method is working for anyone.

See post above for details. PW
No, you do not need to be rooted. If you don't have root, the install will ask you to patch a boot.img. You will then need to flash it.
If you have root, it will ask you to do a direct install.

The error people are getting with the patch process is because Magisk Manager hasn't been granted storage access in Settings>Apps>Magisk Manager>Permissions.
Once MM had been granted storage permission, the patch process works just fine.
 
  • Like
Reactions: J.Michael

pndwal

Senior Member
Jun 23, 2016
1,850
1,038
113
Sydney
No, you do not need to be rooted. If you don't have root, the install will ask you to patch a boot.img. You will then need to flash it.
If you have root, it will ask you to do a direct install.

The error people are getting with the patch process is because Magisk Manager hasn't been granted storage access in Settings>Apps>Magisk Manager>Permissions.
Once MM had been granted storage permission, the patch process works just fine.
Don't think we have Magisk Manager w/21402, only 'Magisk'

Anyhow, settings for this says 'no permissions denied', and Storage Permission is 'Allowed', but patching still fails... Are you able to patch w/ 21402?

Anyway, @vvb2060 is looking into it... PW

Edit: Looks like permission is in fact broken; @vvb2060 is seeking to merge this 'Fix Permission' commit:
 
Last edited:

BillGoss

Senior Member
Sep 2, 2010
4,455
3,818
253
Sydney
Mine says 'no permissions denied', but still fails... Are you able to patch w/ 21402?

Anyway, @vvb2060 is looking into it... PW
Yes, I patched the stock boot and then flashed it using TWRP. I'm running with it now.

I also intially did a direct install, but then I removed Magisk and did it the patching way to see if it worked.