topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
48.74k stars 12.5k forks source link

Magisk 22101 (22.+) not detected by Manager ("N/A"), but SU still working on Android 6.0 (+) Marshmallow with Samsung Note 4 SM-N910F TouchWiz, armeabi-v7a and other devices #4174

Closed leppit closed 2 years ago

leppit commented 3 years ago

Device: Samsung Note 4, SM-N910F, armeabi-v7a Android version: Android 6.0, Marshmallow Magisk version name: f623b988 Magisk version code: 22101

Full Magisk Version Information: f623b988 (22101) (20), (all 22+) UI: TouchWiz Recovery: TWRP

Issue 1: Magisk (Manager) does not install/patch within the app, creating that signature error Issue 2: Magisk (Manager) does not detect patched Magisk, shows only n/a Issue 3: Magisk (Manager) wants to install current Manager though it is installed Issue 4: Magisk (Manager) does not offer all features to control SU, hide, etc., though Magisk is patched and SU requests working

Done so far without solving the problem:

uninstalled/reinstalled Manager
unpatched/repatched stock boot via TWRP
repatched Magisk boot-image via TWRP (no self-patched boot.img - ask, if I shall try to retrieve it)

The terminal-emulator can run magisk -v (f623b988) or magisk -V (22101) correctly.

Last Version without these Issues: Magisk 8.0.7 (pre 22)

Please let me know, what additional infromation is needed and how to access, if necessary, before closing the threat.

PS: I followed for the logs this guide https://didgeridoohan.com/magisk/MagiskHelp

Logs:

1) Excerpt of attached Magisk_install_log (/download): magisk_install_log_2021-04-09T164405Z.log

2) Excerpt of attached magisk.log (/cache): magisk.log

02-06 22:26:21.519   373   373 I : Magisk f623b988(22101) daemon started
 02-06 22:26:21.526   373   373 I : * Device API level: 23
 02-06 22:26:21.531   373   375 D : resetprop: getprop [ro.crypto.state]: [unencrypted]
 02-06 22:26:21.532   373   375 I : ** post-fs-data mode running
 02-06 22:26:21.533   373   375 I : * Mounting mirrors
 02-06 22:26:21.534   373   375 I : mount: /sbin/.magisk/mirror/system
 02-06 22:26:21.534   373   375 I : mount: /sbin/.magisk/mirror/data
 02-06 22:26:21.534   373   375 I : link: /sbin/.magisk/mirror/cache
 02-06 22:26:21.534   373   375 I : link: /sbin/.magisk/mirror/persist
 02-06 22:26:21.534   373   375 I : link: /sbin/.magisk/mirror/vendor
 02-06 22:26:21.534   373   375 I : * Initializing Magisk environment
 02-06 22:26:21.747   373   375 D : resetprop: prop [persist.sys.safemode] does not exist
 02-06 22:26:25.069   373   375 I : * Running post-fs-data.d scripts
 02-06 22:26:25.075   373   375 D : bind_mnt: /sbin/.magisk/modules <- /sbin/.magisk/mirror/data/adb/modules
 02-06 22:26:25.077   373   375 I : * Running module post-fs-data scripts
 02-06 22:26:25.077   373   375 I : * Loading modules
 02-06 23:26:27.343   373   734 I : ** late_start service mode running
 02-06 23:26:27.379   373   734 I : * Running service.d scripts
 02-06 23:26:27.379   373   734 I : * Running module service scripts
 04-09 16:39:18.193   373  5364 I : ** boot_complete triggered
 04-09 16:43:43.161   373 11689 D : su: request from pid=[11685], client=[16]
 04-09 16:43:43.165   373 11689 D : su: request from uid=[10269]
 04-09 16:43:43.165   373 11689 D : su: waiting child pid=[11690]
 04-09 16:43:43.165 11690 11690 D : su: fork handler
 04-09 16:43:43.166 11690 11690 D : su: use global namespace
 04-09 16:45:35.416   373 12539 D : su: request from pid=[12534], client=[17]
 04-09 16:45:35.417   373 12539 D : su: request from uid=[10295]
 04-09 16:45:39.651   373 12539 D : su: waiting child pid=[12566]
 04-09 16:45:39.651 12566 12566 D : su: fork handler
 04-09 16:45:39.653 12566 12566 D : su: use namespace of pid=[12534]
 04-09 16:45:53.548   373 12848 D : su: request from pid=[12845], client=[18]
 04-09 16:45:53.548   373 12848 D : su: request from uid=[10295]
 04-09 16:45:57.262   373 12848 D : su: waiting child pid=[12896]
 04-09 16:45:57.262 12896 12896 D : su: fork handler
 04-09 16:45:57.263 12896 12896 D : su: use namespace of pid=[12845]

3) Excerpt of TWRP Recovery last.log (cache/recovery): last_log.log

I:Set page: 'install'
I:Set page: 'flash_confirm'
I:Set page: 'flash_zip'
I:operation_start: 'Flashing'
Installiere Zip '/sdcard/Download/magisk/Magisk-f623b988(22101).zip'
Suche nach Digest-Datei...
Digest-Prüfung übersprungen: keine Digest-Datei gefunden
I:Update binary zip
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment not used in updater.
Archive:  /sdcard/Download/magisk/Magisk-f623b988(22101).zip
  inflating: lib/x86/libbusybox.so
  inflating: lib/armeabi-v7a/libbusybox.so
unzip: short read
Archive:  /sdcard/Download/magisk/Magisk-f623b988(22101).zip
  inflating: lib/x86/libmagisk64.so
  inflating: assets/chromeos/futility
  inflating: assets/chromeos/kernel_data_key.vbprivk
  inflating: lib/armeabi-v7a/libmagiskboot.so
  inflating: assets/uninstaller.sh
  inflating: lib/armeabi-v7a/libmagiskinit.so
  inflating: META-INF/com/google/android/update-binary
  inflating: lib/x86/libmagiskboot.so
  inflating: lib/armeabi-v7a/libmagisk64.so
  inflating: assets/addon.d.sh
  inflating: lib/x86/libmagiskinit.so
  inflating: lib/armeabi-v7a/libmagisk32.so
  inflating: assets/boot_patch.sh
  inflating: assets/chromeos/kernel.keyblock
  inflating: assets/util_functions.sh
  inflating: META-INF/com/google/android/updater-script
  inflating: lib/x86/libmagisk32.so
**********************************
 Magisk f623b988(22101) Installer 
**********************************
- Mounting /system
- Target image: /dev/block/mmcblk0p17
- Device platform: arm
- Constructing environment
java.io.IOException: ioctl failed: EINVAL (Invalid argument)
    at libcore.io.IoBridge.available(IoBridge.java:74)
    at java.io.FileInputStream.available(FileInputStream.java:108)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:274)
    at com.topjohnwu.signing.SignBoot.fullRead(SignBoot.java:100)
    at com.topjohnwu.signing.SignBoot.verifySignature(SignBoot.java:155)
    at com.topjohnwu.signing.SignBoot.main(SignBoot.java:350)
Caused by: android.system.ErrnoException: ioctl failed: EINVAL (Invalid argument)
    at libcore.io.Posix.ioctlInt(Native Method)
    at libcore.io.ForwardingOs.ioctlInt(ForwardingOs.java:103)
    at libcore.io.IoBridge.available(IoBridge.java:58)
    ... 5 more
- Unpacking boot image
Parsing boot image: [/dev/block/mmcblk0p17]
HEADER_VER      [0]
KERNEL_SZ       [9879096]
RAMDISK_SZ      [2886352]
SECOND_SZ       [0]
EXTRA_SZ        [3407872]
PAGESIZE        [4096]
NAME            [SYSMAGIC000KU]
CMDLINE         [console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3b7 dwc3_msm.cpu_to_affin=1]
CHECKSUM        [7c2318906ff8666f1c9df3b993922944aa9c6850000000000000000000000000]
KERNEL_FMT      [raw]
RAMDISK_FMT     [gzip]
EXTRA_FMT       [raw]
SAMSUNG_SEANDROID
- Checking ramdisk status
Loading cpio: [ramdisk.cpio]
- Magisk patched boot image detected
Loading cpio: [ramdisk.cpio]
Remove [overlay.d]
Remove [overlay.d/sbin]
Remove [overlay.d/sbin/magisk32.xz]
Remove [.backup/.rmlist]
Remove [.backup]
Remove [.backup/.magisk]
Move [.backup/fstab.qcom] -> [fstab.qcom]
Move [.backup/init] -> [init]
Dump cpio: [ramdisk.cpio]
- Patching ramdisk
Loading cpio: [ramdisk.cpio]
Add entry [init] (0750)
Create directory [overlay.d] (0750)
Create directory [overlay.d/sbin] (0750)
Add entry [overlay.d/sbin/magisk32.xz] (0644)
Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[false]
Found fstab file [fstab.qcom]
Remove pattern [,verify]
Loading cpio: [ramdisk.cpio.orig]
Backup mismatch entry: [fstab.qcom] -> [.backup/fstab.qcom]
Backup mismatch entry: [init] -> [.backup/init]
Record new entry: [overlay.d] -> [.backup/.rmlist]
Record new entry: [overlay.d/sbin] -> [.backup/.rmlist]
Record new entry: [overlay.d/sbin/magisk32.xz] -> [.backup/.rmlist]
Create directory [.backup] (0000)
Add entry [.backup/.magisk] (0000)
Dump cpio: [ramdisk.cpio]
Loading dtbs from [extra]
- Repacking boot image
Parsing boot image: [/dev/block/mmcblk0p17]
HEADER_VER      [0]
KERNEL_SZ       [9879096]
RAMDISK_SZ      [2886352]
SECOND_SZ       [0]
EXTRA_SZ        [3407872]
PAGESIZE        [4096]
NAME            [SYSMAGIC000KU]
CMDLINE         [console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3b7 dwc3_msm.cpu_to_affin=1]
CHECKSUM        [7c2318906ff8666f1c9df3b993922944aa9c6850000000000000000000000000]
KERNEL_FMT      [raw]
RAMDISK_FMT     [gzip]
EXTRA_FMT       [raw]
SAMSUNG_SEANDROID
Repack to boot image: [new-boot.img]
HEADER_VER      [0]
KERNEL_SZ       [9879096]
RAMDISK_SZ      [2886630]
SECOND_SZ       [0]
EXTRA_SZ        [3407872]
PAGESIZE        [4096]
NAME            [SYSMAGIC000KU]
CMDLINE         [console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3b7 dwc3_msm.cpu_to_affin=1]
CHECKSUM        [905c567083e0de8531c8df6ceb83dd46a13c6ce6000000000000000000000000]
- Flashing new boot image
Cleaning up...
- Unmounting partitions
- Done
I:Updater process ended with RC=0
I:Install took 9 second(s).
Partitions-Informationen werden aktualisiert...
I:Data backup size is 14699MB, free: 498MB.
I:Unable to mount '/usbstorage'
I:Actual block device: '', current file system: 'vfat'
...Fertig
I:Set page: 'flash_done'
I:operation_end - status=0
I:Set page: 'confirm_action'
I:Set page: 'action_page'
I:operation_start: 'Format'
Formatiere Cache mit make_ext4fs...
Creating filesystem with parameters:
    Size: 209715200
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 6400
    Inode size: 256
    Journal blocks: 1024
    Label: 
    Blocks: 51200
    Block groups: 2
    Reserved block group size: 15
Created filesystem with 11/12800 inodes and 1865/51200 blocks
warning: wipe_block_device: Wipe via secure discard failed, used discard instead

I:Recreating /cache/recovery folder.
I:Copying file /etc/recovery.fstab to /cache/recovery/recovery.fstab
I:Version number saved to '/cache/recovery/.version'
Partitions-Informationen werden aktualisiert...
I:Data backup size is 14699MB, free: 498MB.
I:Unable to mount '/usbstorage'
I:Actual block device: '', current file system: 'vfat'
...Fertig
I:Set page: 'action_complete'
I:operation_end - status=0
I:operation_start: 'Format'
Dalvik Cache-Verzeichnisse bereinigen...
Bereinigt: /data/dalvik-cache...
-- Dalvik Cache-Verzeichnisse bereinigt!
Partitions-Informationen werden aktualisiert...
I:Set page: 'clear_vars'
I:Set page: 'flash_done'
I:Data backup size is 13777MB, free: 1421MB.
I:Unable to mount '/usbstorage'
I:Actual block device: '', current file system: 'vfat'
...Fertig
I:operation_end - status=0
I:Set page: 'clear_vars'
I:Set page: 'install'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'advanced'
I:Set page: 'copylog'
I:Set page: 'action_page'
I:operation_start: 'Copy Log'
I:Copying file /tmp/recovery.log to /data/media/0/recovery.log
Kernel-Log wurde nach /data/media/0/dmesg.log kopiert
Recovery-Log wurde nach /data/media/0/recovery.log kopiert.
I:Set page: 'action_complete'
I:operation_end - status=0
I:Set page: 'reboot_system_routine'
I:Set page: 'rebootcheck'
I:Set page: 'appcheck'
I:operation_start: 'Check for TWRP App'
I:App found at '/data/app/me.twrp.twrpapp-2'
I:operation_end - status=0
I:Copying file /cache/recovery/log to /cache/recovery/last_log
Neustart...

Related issues:

4107 (closed - not enough info)

4169 (closed - by bot)

4173 (closed - incorrect assigned version code)

leppit commented 3 years ago

see also XDA:

https://forum.xda-developers.com/t/magisk-22-not-recognized-by-manager-but-su-still-working-on-android-6-0-marshmallow-with-samsung-note-4-sm-n910f-touchwiz-armeabi-v7a.4253113/

leppit commented 3 years ago

For further insight similar screenshots posted at issue #4107

Screenshot_2021-03-31-20-40-17 Plus this error when trying to install Screenshot_2021-03-31-20-34-29

leppit commented 3 years ago

Magisk version name: e136fb3a Magisk version code: 22102 (20)

Issue persists. Further logs can be supplied, if necessary.

leppit commented 3 years ago

Magisk version name: f49966d8 Magisk version code: 22103 (20)

Issue persists. Further logs can be supplied, if necessary.

ipcammm commented 3 years ago

I have the exact same problem with my device (Galaxy Tab a 9.7, SM-T550, armeabi-v7a): Same attempts, same Log. The only difference is that my tablet is running Android Nougat (7.1.1). I suspect TWRP is the problem, so I tried with ADB, unfortunately I cannot use ADB to flash the magisk_patched because the Fastboot is not available for my device. I also tried without success with Odin. Error message: Unsupport dev_type

ibigfire commented 3 years ago

+1 Same issue here but on a Samsung Galaxy Tab E. I also noticed curious behaviour in that any app I had added to Superuser previous to the upgrade attempt does still work fine, but when I grant access to a new app, even if I grant access for forever, it has to ask again each time it tries to do a new action that would require root. It's able to do the command when I grant the access, but it has to ask again each time.

I suspect this is related, like it can't actually save that app has SU permission due to the sorta broken install, but I can't be sure. If it ends up being unrelated then I'm sorry for being potentially off topic.

leppit commented 3 years ago

Magisk version name: fb8000b5 Magisk version code: 22104 (21)

Issue persists. Further logs can be supplied, if necessary.

huizichin commented 3 years ago

I updated the magisk through twrp and oidin both of them have the same problem the root still work but it never remember the superuser permission even if i set it to forever it have to ask me everytime i thought it is my problem i did all full stock flash and installed the lastest magisk same issue persist the older version doesnt have this problem Using a samsung a8 (2015) a800i edit: i tried to downgrade to magisk manager the manager detected that the lastest magisk is installed but the problem with not remembering the choice still persist

su2353 commented 3 years ago

看不懂,有人可以告诉我如何才能使用最新的22.1吗? 我现在使用21.4+8.0.7(app) 如果我要用最新的22.1,我必须更换其它的kernel,但我不想用其它的kernel

leppit commented 3 years ago

Magisk version name: 6b34ec3a Magisk version code: 22105 (21)

Issue persists. Further logs can be supplied, if necessary.

anyuta1166 commented 3 years ago

Same issue on Samsung J5 2016 (Android 7).

Magisk works fine, apps have root access, but Magisk Manager displays that Magisk is not installed and I have no access to settings.

The last working version is Magisk Manager 8.0.7.

Magisk 21.4 + Magisk Manager 8.0.7 = ok Magisk 22.0 + Magisk Manager 22.0 = manager says Magisk not installed Magisk 22.1 + Magisk Manager 22.1 = manager says Magisk not installed I've also tried the latest canary with the same result.

I've tried older Magisk with the latest manager: Magisk 21.4 + Magisk Manager 22.1 = manager says Magisk not installed Magisk 20.1 + Magisk Manager 22.1 = manager says Magisk not installed

I've tried latest Magisk with old manager: Magisk 22.1 + Magisk Manager 8.0.7 = ok (however every time I open the manager it shows "Requires additional setup" dialog)

So I think that the issue is in Magisk Manager, not the Magisk itself, and the issue could be renamed from "Magisk 22.0+ not detected by Manager" to "Manager 22.0+ doesn't detect Magisk"

ipcammm commented 3 years ago

Magisk 23.0 (23000) (21) Issue persists. Strangely, I can flash the stock boot image with Odin but not the magisk_patched-23000 (Error message: Unsupport dev_type) So I was forced to use TWRP for flash the magisk_patched-23000.

leppit commented 3 years ago

Magisk version name: f822ca5b Magisk version code: 23001 (21)

Issue persists. (assumably just version number was updated) Further logs can be supplied, if necessary.

jonniex7 commented 3 years ago

same issue N910F MM

su2353 commented 3 years ago

问题仍然存在,Magisk-v23

DonRichie commented 3 years ago

Heyho,

I am using Android 11 on S20+ and had the same issue. Found out this time the issue was on my side.

I expected Magisk to patch my boot.img.tar in place. But actually a new file was created and written to the "Download" directory with name "magisk_patched-23001_gWU7f.tar" Did that change in one of the last releases? (Using canary 23001 (21))

After flashing that file via Odin Magisk works

To install the canary Magisk Manager I used this custom Update URL: https://raw.githubusercontent.com/topjohnwu/magisk-files/master/canary.json That might be also an important information since topjohnwu changed his repo name from magisk_files to magisk-files and some links on xda lead to the wrong place now.

anyuta1166 commented 3 years ago

I am using Android 11 on S20+ and had the same issue. Found out this time the issue was on my side.

I expected Magisk to patch my boot.img.tar in place. But actually a new file was created and written to the "Download" directory with name "magisk_patched-23001_gWU7f.tar"

Your issue is not the same. This issue is about "Direct install" method, not "Select and patch the file".

Lickalotapus commented 3 years ago

Same. Samsung S5. KLTE.

aquilla12 commented 3 years ago

Device: sm-a8000 Magisk: 97c1e18, 23.0 (23000) (21) Getting same error. Can supply logs if required.

leppit commented 3 years ago

I had to change my phone, so please consider my status as observer, not as currently affected and actively testing new updates, so far.

Bob-YsPan commented 3 years ago

Magisk version: f822ca5(23001) Device: SM-P355Y(Galaxy Tab A 8.0)

I open the issue #4464 Seems like the same problem.

FrannDzs commented 3 years ago

@osm0sis any ideas master?

osm0sis commented 3 years ago

🤷‍♂️

haywirephoenix commented 3 years ago

I'm currently experiencing this issue.

Clean install. Boot.img patched sucessfully, tried flashing through TWRP and Odin. Wipe again. Magisk listed in applications SU is working, can get prompt Installed: N/A | Ramdisk: Yes | A/B: No | SAR: No Galaxy J5 SM-J500FN Magisk 23.0 Android 6.0.1 (old I know!)

post boot log: dmesg.log logcat.txt

anivilladar commented 3 years ago

Same problem here, my phone is a Samsung J1 Mini Prime (Mashmellow) , this is the first time I try to root my phone, there was no root in my phone before. I decided to root with Magisk v. 23.0 (I read this was the best apk-root) , but at the end of all my process I found this:

Screenshot_20210912-225137

Screenshot_20210913-144849

aquilla12 commented 3 years ago

When will the developers release the next Magisk.apk version? Will they fix this issue?

Considering that John has said he is now able to continue development and is now actively commiting to the repo again, hopefully soon. Hopefully the issue will be fixed as it seems to be affecting a reasonable number of people and therre are plenty of logs available. I cannot speak for what will or will not be in the next release though.

At least help me to desinstall this failed version Magisk 23.0...

It is best practice to have a copy of your system image, or at least your unmodifed firmware on hand in case anything goes wrong. Search XDA for instrcutions on how to find your firmware if you don't have it, (though I'm not sure how you would have installed Magisk without it). Then flash to your device. Again, search XDA if you don't know how.

anivilladar commented 3 years ago

When will the developers release the next Magisk.apk version? Will they fix this issue?

Considering that John has said he is now able to continue development and is now actively commiting to the repo again, hopefully soon. Hopefully the issue will be fixed as it seems to be affecting a reasonable number of people and therre are plenty of logs available. I cannot speak for what will or will not be in the next release though.

At least help me to desinstall this failed version Magisk 23.0...

It is best practice to have a copy of your system image, or at least your unmodifed firmware on hand in case anything goes wrong. Search XDA for instrcutions on how to find your firmware if you don't have it, (though I'm not sure how you would have installed Magisk without it). Then flash to your device. Again, search XDA if you don't know how.

Thanks a lot @aquilla12. Could you post your logs files? I find only one, I don't know where can I find the others. I going to follow your advices about the firmware, etc. (and about install Magisk without my firmware, I did all the process through Odin (last version), the last version of TWRP too, [compatible with my phone] , my phone is easy to unlock the bootloader, I flashed Magisk.apk v.23, and finally when tried to install Magisk from Magisk the app, I choose ✔ direct installation option. And that 's all in my case.) And thanks again ☺.

aquilla12 commented 3 years ago

and about install Magisk without my firmware

That is no longer the recommended way to install Magisk. Please see the documenation. But yes, Odin is the correct way of flashing if have a samsung.

Could you post your logs files? I find only one, I don't know where can I find the others.

leppit has posted a full log, and says they have several more variations available. haywirephoenix also provided good logs. my install log is the same as the OP (and yours) with the exception of the version number, several others have said the same. The interseting thing with your install log, however, is that the last two lines are in opposite order. If you want it I can upload my magisk.log too.

Megver83 commented 3 years ago

Same issue on Samsung J5 2016 (Android 7).

Magisk works fine, apps have root access, but Magisk Manager displays that Magisk is not installed and I have no access to settings.

The last working version is Magisk Manager 8.0.7.

Magisk 21.4 + Magisk Manager 8.0.7 = ok Magisk 22.0 + Magisk Manager 22.0 = manager says Magisk not installed Magisk 22.1 + Magisk Manager 22.1 = manager says Magisk not installed I've also tried the latest canary with the same result.

I've tried older Magisk with the latest manager: Magisk 21.4 + Magisk Manager 22.1 = manager says Magisk not installed Magisk 20.1 + Magisk Manager 22.1 = manager says Magisk not installed

I've tried latest Magisk with old manager: Magisk 22.1 + Magisk Manager 8.0.7 = ok (however every time I open the manager it shows "Requires additional setup" dialog)

So I think that the issue is in Magisk Manager, not the Magisk itself, and the issue could be renamed from "Magisk 22.0+ not detected by Manager" to "Manager 22.0+ doesn't detect Magisk"

Exactly the same with the Galaxy J5 2015 (j5lte), Android 5. Didn't happen with unofficial LOS 17.1.

Merith-TK commented 3 years ago

My issue was marked as a duplicate for this issue despite the target magisk, android version, and device model/architecture being completely different from this issue

edit: not to mention osm0sis acting alone and unprofessional of someone with such power, marking parts of the conversation that were indeed relevant, as "off topic" and then not having any other dev pop in at all,

My issue was for the following two reaons 1) Magisk is unable to patch boot image from within the app, sh fails to run 2) Magisk (app) does not detect Magisk SU is installed and therefor makes all of the advantages of magisk 100% non-functional as i cannot use modules, magisk hide, or even have it remember that I told an app it can have su perms without a popup. All the while SuperSU works just fine

as shown here indicating he finds this humorous when someone is having an completely different problem that what this thread is for, and marks mine as a duplicate image

mareking commented 3 years ago

Same issue on Samsung J5 2016 (Android 7).

Magisk works fine, apps have root access, but Magisk Manager displays that Magisk is not installed and I have no access to settings.

The last working version is Magisk Manager 8.0.7.

Magisk 21.4 + Magisk Manager 8.0.7 = ok Magisk 22.0 + Magisk Manager 22.0 = manager says Magisk not installed Magisk 22.1 + Magisk Manager 22.1 = manager says Magisk not installed I've also tried the latest canary with the same result.

I've tried older Magisk with the latest manager: Magisk 21.4 + Magisk Manager 22.1 = manager says Magisk not installed Magisk 20.1 + Magisk Manager 22.1 = manager says Magisk not installed

I've tried latest Magisk with old manager: Magisk 22.1 + Magisk Manager 8.0.7 = ok (however every time I open the manager it shows "Requires additional setup" dialog)

So I think that the issue is in Magisk Manager, not the Magisk itself, and the issue could be renamed from "Magisk 22.0+ not detected by Manager" to "Manager 22.0+ doesn't detect Magisk"

The same occured to me on several Xiaomi devices with custom roms so I can confirm that this issue lies within the latest Magisk apps (which used to be called "Magisk Manager"): Magisk-v23.0.apk (from May 12, 2021) and also canary version ea75a09f (23011) (downloaded on 2021-10-28 from here). Despite the fact that apps can successfully ask for and be granted root, both these versions do not properly detect that Magisk is installed and so magisk module installation is not possible ("Please first install Magisk 20.x").

Luckily Magisk Manager v8.0.7 works well with even the latest Magisk v23.

So my current solution is: Flash Magisk_v23.zip in recovery and then install and use it with MagiskManager-v8.0.7.apk.

canyie commented 3 years ago

I think it is an app problem, so please provide logs grabbed when app starts. Btw, just want to locate the problem, does anyone tried to run app in selinux permissive mode?

osm0sis commented 3 years ago

Any luck with 23013? A number of regressions have been fixed.

osm0sis commented 3 years ago

@luca990 @leppit please answer @canyie's questions above then and provide logs.

luca990 commented 3 years ago

hi @osm0sis unfortunately I cannot carry out the tests because with the stock rom it is not possible to set the selinux to permissive. The phone is the main one, I should backup and install a custom rom. For the logs if you tell me what you need I can get them. (I deleted the comment because it was actually useless: on samsung s7 the problem remains even after the latest fixes, on samsung tab s5e works perfectly with original firmware)

canyie commented 3 years ago

Oh, I forgot that selinux permissive is ignored by Samsung kernel... and afaik sepolicy live patching will crash Samsung kernel (heard from topjohnwu) , so maybe we need to add allow * * * * by sepolicy.rule? and how to grab log about app starts: adb logcat -c, adb logcat > magisk_app_start.log, force-stop and restart the app, close the terminal window and upload magisk_app_start.log.

canyie commented 3 years ago

Any one can test this build? https://github.com/canyie/Magisk/actions/runs/1443720946 Modified sepolicy to allow everything but selinux keeps enforcing mode. Flash this version might make your device unbootable, so please be more careful

luca990 commented 3 years ago

Sorry for the delay in answering, I had to find another phone to run the test. @canyie i installed your latest build but the problem remains, i get the error: Unable to check signature. I found the required logs and they are attached. For version 23 logs (working) the magisk package is rej.qkvfhd (I hid it) so you will find the application stop as: InstalledAppDetails: Stopping package rej.qkvfhd

I hope I have been of help to you magisk_V23_app_start.log magisk_CANARY_app_start.log .

osm0sis commented 3 years ago

You need to unhide the app and uninstall, then install the one canyie made for you.

luca990 commented 3 years ago

yes of course i did as you said, as with every update

osm0sis commented 3 years ago

I think you needed to patch the boot.img with it too to get those changes active. Just need to make sure you did a full Magisk install with it and not just the app itself.

luca990 commented 3 years ago

Hi I did some tests: 1- installed latest version of magisk canary which owns magisk hide and works correctly. Then installed the version created by canyie and unfortunately the error returns 2- I patched the boot.img file with the canyie version and it doesn't work, magisk doesn't show the installed version. 3- patched the boot.img file with the latest version of magisk canary which owns magisk hide and works correctly. Now I have re-installed the v23, in general I have noticed that the canary version is very unstable, the system often freezes, restarts and gets very hot.

canyie commented 2 years ago

Finally I have another holiday... I can start debugging again... Just added some logs and made a new build: https://github.com/canyie/Magisk/actions/runs/1535584987 . Just install the app, save log in the log page and upload it.

pndwal commented 2 years ago

Testers Needed!

Where have all the testers gone??? Any punters still interested? 😬

luca990 commented 2 years ago

My samsung s7 is unfortunately dead, I'm waiting for the motherboard, sorry

pndwal commented 2 years ago

The same occured to me on several Xiaomi devices with custom roms so I can confirm that this issue lies within the latest Magisk apps ...

... afaik sepolicy live patching will crash Samsung kernel (heard from topjohnwu) , so maybe we need to add allow * * * * by sepolicy.rule?

And some Xiaomi (custom) kernels? Or is this issue likely different?

MartyK87 commented 2 years ago

Just signed up to post on here. Encountering exact same issue with Galaxy S5 (G900I) Any version above 21 (followed boot.img patching guide too) I sitll get limited options on Magisk. No 4 buttons along bottom. Earlier versions below 22 work with the version 8 manager but even then there are glitches. When I press 'Install from storage' for a module it informs me there is no application available to handle such action.

Very bizarre because before reflashing a stock ROM it was working fine on my S5 for 3 years with Magisk. Wish I had noted down the version number because now i cannot get it to work.

Cheers.

pndwal commented 2 years ago

Just signed up to post on here. Encountering exact same issue with Galaxy S5 (G900I) Any version above 21 (followed boot.img patching guide too) I sitll get limited options on Magisk. No 4 buttons along bottom. Earlier versions below 22 work with the version 8 manager but even then there are glitches. When I press 'Install from storage' for a module it informs me there is no application available to handle such action.

Very bizarre because before reflashing a stock ROM it was working fine on my S5 for 3 years with Magisk. Wish I had noted down the version number because now i cannot get it to work.

Cheers.

Why not try test build provided?? https://github.com/topjohnwu/Magisk/issues/4174#issuecomment-985646477

MartyK87 commented 2 years ago

How do I get the logs from the app and where exactly do i upload the logs to? Thanks :D

pndwal commented 2 years ago

How do I get the logs from the app and where exactly do i upload the logs to? Thanks :D

As Canyie says, "Just install the app, save log in the log page and upload it."... Can you see 'logs' at bottom of app home page? And Save (floppy disc symbol) at top of next page?...