topjohnwu / magisk Goto Github PK
View Code? Open in Web Editor NEWThe Magic Mask for Android
License: GNU General Public License v3.0
The Magic Mask for Android
License: GNU General Public License v3.0
With the most recent version, Magisk fails for my Huawei Mate S running Android 6.0. Magisk used to work at least up to version 6 (9 and 10.2 both do not work).
I have uploaded the clean boot image and the modified one for you:
http://uploaded.net/file/bwkmiclv
The modified one is from Magisk 9. Magisk 10.2 does not generate any log files at all for me (at least under /cache/).
Obviously, my boot partition is too small / the generated boot image too big:
Repacking boot image
! Boot partition space insufficient
! Remove ramdisk backups and try again
! Boot partition size still too small
! Unable to install Magisk-
I have a very strange issue with the MyEE app (cell phone provider in the UK). As soon as I have Magisk installed (tried with and without root, Xposed etc.) it'll stop working and will crash when opening the app.
https://play.google.com/store/apps/d...=uk.co.ee.myee
I found that when adding it to Magisk Hide, I'll see something in Xposed log.
Is this something that can be fixed?
I was getting an error when attempting to flash Magisk v9 to my cheap amlogic s905x android TV box.
Looking at the install script, there is no by-name directory for the partitions, so that search will fail, but the section that looks at fstab.recovery seems like it should have worked. When booted into recovery, /etc/fstab.recovery has an entry that reads: /boot emmc /dev/block/boot. From the shell, I ran grep -E '\b/boot\b' /etc/fstab.recovery | grep -oE '/dev/[a-zA-Z0-9_./-]*' and it returned /dev/block/boot.
Here is the relevant code from update-binary:
Code:
find_boot_image() {
if [ -z "$BOOTIMAGE" ]; then
for PARTITION in kern-a KERN-A android_boot ANDROID_BOOT kernel KERNEL boot BOOT lnx LNX; do
BOOTIMAGE=readlink /dev/block/by-name/$PARTITION || readlink /dev/block/platform/*/by-name/$PARTITION || readlink /dev/block/platform/*/*/by-name/$PARTITION
if [ ! -z "$BOOTIMAGE" ]; then break; fi
done
fi
if [ -z "$BOOTIMAGE" ]; then
FSTAB="/etc/recovery.fstab"
[ ! -f "$FSTAB" ] && FSTAB="/etc/recovery.fstab.bak"
[ -f "$FSTAB" ] BOOTIMAGE=grep -E '\b/boot\b' "$FSTAB" | grep -oE '/dev/[a-zA-Z0-9_./-]*'
fi
}
I didn't debug further, but my only guess is that somehow $FSTAB isn't getting set correctly? I know the grep returns the correct string when I hard code fstab.recovery and run it in a recovery shell.
In the end, I inserted BOOTIMAGE="/dev/block/boot" into the update-binary file and the modified .zip installed without a problem. I have a working Magisk installation.
The http://forum.xda-developers.com/apps/magisk/magisk-details-dummies-to-developers-t3473486 reads: Auto Mount has to be enabled for Magisk to mount your files automatically. You can disable it and mount the files manually in the scripts (post-fs, post-fs-data, service).
However there's no information on how to mount manually in the post-fs-data script. Please provide information on that.
I'm using a custom kernel (Franco Kernel) for my Nexus 6 (stock 7.1.1 january patch). He recently updated it with the F2FS fix by arter97 and this seemingly breaks Magisk.
Flashing magisk on a custom kernel without the F2FS fix works (Franco Kernel r60). I'm providing the boot image with that custom kernel, both without and with Magisk installed. Also the recovery log from installing Magisk and the Magisk log from the first boot is attached.
After flashing the kernel with the F2FS fix (Franco Kernel r61), root is lost. Providing boot image with uncompatible kernel, both without and with Magisk installed. Recovery log from updating the kernel and Magisk log from the second boot where root was lost is also attached.
Using Magisk v10.2 with phh's supersuser topjohnwu r2. For this test no other modules was installed.
If the module didn't use AUTOMOUNT feature, then mount the file/directory by itself in post-fs-data.sh. The file/directory not exists in current /system will not be mounted.
But some command work fine in V8.
Any suggest to do such manually bind?
if get unable to mount ramdisk when i want to install v11 on my Galaxys s6 edge
There's a problem with MIUI and Magisk Hide. This has been reported by users of Xiaomi Mi5 and Redmi Note 3 Pro (my device). I tested Magisk Hide with Magisk v9 to make sure. Here's what I did:
I flashed Magisk v9 and phh r2. Then rebooted, installed Magisk app from Play Store, enabled Magisk Hide and rebooted. Success! SafetyNet pass with CTS mismatch. Then I updated to Magisk v10 from Magisk Manager and rebooted. SafetyNet fail (blue status in SafetyNet Helper).
I also uploaded boot.img that I extracted from my ROM's .zip file (I'm not sure that was the right place or that you need it because I am fully rooted) and Magisk log (although I don't see anything interesting there).
magisk_error_20170112_203732.zip
Unrelated request: would it be possible to provide more SafetyNet information than just CTS profile mismatch? Because I always get CTS mismatch on my device even when non-rooted and with locked bootloader. This also happens on my mom's Xiaomi Redmi 1S running non-rooted KitKat, so I think it is a Xiaomi thing.
On one of my devices (a Moto G "falcon" that's encrypted and running CM14.1), Magisk seems to be running late_start too early (specifically, before post-fs-data, so presumably before /data/magisk.img is accessible). This means it doesn't see or execute /magisk/phh/service.sh and root doesn't work. Log:
** Magisk post-fs mode running...
** Magisk late_start service mode running...
** Magisk post-fs-data mode running...
* Preparing modules
* Stage 1: Mount system and vendor mirrors
* Stage 2: Mount dummy skeletons
* Stage 3: Mount module items
* Stage 4: Execute module scripts
* Stage 5: Mount mirrored items back to dummy
Strangely, I can't reproduce this on any of my other devices despite setting them up the exact same way, and I can't make it stop happening on this device (I haven't tried wiping /data, but I've tried everything else).
Hi topjohnwu,
Some Samsung users, including myself, have reported Magisk Hide error on XDA support thread.
The issue is most likely with stock boot.img as a modified version of boot.img works without any issues.
Please see attached logs and boot.img files.
Magisk Error log messages:
Magisk v9 - "MagiskHide: Error occurred..."
Magisk v10 - "MagiskHide: Cannot read from logcat, abort..."
Hope you can resolve this issue.
Many thanks
Magisk and phh's superuser for magisk root are not working for the ZTE Axon 7. The regular phh's superuser (not for Magisk) works fine and can root the system without problem.
The ROM used in this test is Stock B29 (Android M) for the Axon 7. I provide the boot images before and after flashing Magisk. Also the logcats before and after. Everything is here: https://goo.gl/nfH0f4
I followed these steps to create the dump files:
The issue is still present in current Magisk v10.2
I hope this info could help tracing the bug.
Thanks
If upgrade from Magisk Manager, it will boot without issue. But need to re-install phh's superuser again (some program can't detect root, but some can).
If flash v9 zip in recovery (with or without uninstall first), the patched boot.img can't boot, will get bootloop. Also can't boot into recovery, need to flash the normal boot.img to bring the system back.
Device is Xiaomi Redmi Note2.
There are still some problems concerning mounting files under /system/vendor and /system/lib64. bind_mount under these places are incomplete, some files are left out unmounted.
Tested on OnePlus3, OxygenOS 3.2.7, Marshmallow 6.0.1. Magisk v9 + phh's superuser.
/magisk/v4a/system/vendor/etc/audio_output_policy.conf
/magisk/v4a/system/vendor/etc/audio_effects.conf
were ignored to be mounted when overlay theme apks were mounted under /system/vendor/overlay. See the Magisk log below,
** Magisk post-fs mode running...
** Magisk post-fs-data mode running...
Preparing modules
Bind mount dummy system
Mount: /dev/magisk/dummy/system/lib/soundfx
Mount: /dev/magisk/dummy/system/fonts
Mount: /dev/magisk/dummy/system/vendor
Mount: /dev/magisk/dummy/system/app
Mount: /dev/magisk/dummy/system/priv-app
Bind mount module items
Mount: /magisk/v4a/system/lib/soundfx/libv4a_fx_ics.so
Mount: /magisk/overlay/system/vendor/overlay
Mount: /magisk/ubuntu_font/system/fonts/Ubuntu-RI.ttf
Mount: /magisk/ubuntu_font/system/fonts/Ubuntu-R.ttf
While after I created a empty overlay folder under /system/vendor, the modified audio confs are mounted correctly.
** Magisk post-fs mode running...
** Magisk post-fs-data mode running...
Preparing modules
Bind mount dummy system
Mount: /dev/magisk/dummy/system/lib/soundfx
Mount: /dev/magisk/dummy/system/fonts
Mount: /dev/magisk/dummy/system/app
Mount: /dev/magisk/dummy/system/priv-app
Bind mount module items
Mount: /magisk/v4a/system/lib/soundfx/libv4a_fx_ics.so
Mount: /magisk/v4a/system/vendor/etc/audio_output_policy.conf
Mount: /magisk/v4a/system/vendor/etc/audio_effects.conf
Mount: /magisk/overlay/system/vendor/overlay
Mount: /magisk/ubuntu_font/system/fonts/Ubuntu-RI.ttf
Mount: /magisk/ubuntu_font/system/fonts/Ubuntu-R.ttf
/magisk/v4a/system/lib64/soundfx/libeffectproxy.so
/magisk/v4a/system/lib64/libhwdaphal.so
NOTE: libeffectproxy.so is an existing lib on my ROM, but NOT libhwdaphal.so.
Similar result, libeffectproxy.so was omitted to be mounted, but libhwdaphal.so was mounted successfully.
** Magisk post-fs mode running...
** Magisk post-fs-data mode running...
Shrinking /data/magisk.img to 224M...
Preparing modules
Bind mount dummy system
Mount: /dev/magisk/dummy/system/lib64
Mount: /dev/magisk/dummy/system/fonts
Mount: /dev/magisk/dummy/system/app
Mount: /dev/magisk/dummy/system/priv-app
Bind mount module items
Mount: /magisk/v4a/system/lib64/libhwdaphal.so
Mount: /magisk/overlay/system/vendor/overlay
Mount: /magisk/ubuntu_font/system/etc/fonts.xml
Mount: /magisk/ubuntu_font/system/etc/fallback_fonts.xml
It seems adding new items and replacing existing items at the same time under /system/vendor and /system/lib64, maybe /systen/bin as well, could NOT be done correctly yet. Is it a logical oversight in the mount mechanism?
@topjohnwu, can you add KitKat support for Magisk because KitKat is quite popular Android version?
In the latest version, magisk hide is automatically disabled if SuperSU is detected.
This means that, with a stock kernel, safety net will fail because I was relying on magisk to remove the tampered read-only system props.
Shouldn't the removal of the system props still run even if SuperSU is installed?
Magisk Version: v10.2
Android Version: 6.0.1
I looked around to see if there are requests for this anywhere else, but couldn't find anything. I'm sure you have had others asking you for this, but I figured I'd file a formal issue.
I have a Pixel XL running 7.1.1.
I tried sideloading Magisk-v9 via TWRP adb sideload. The install fails after mounting /system, /data, /cache, etc. It looks for /system/build.prop which doesn't exist on my phone at the moment. I got past this step by cp /system/default.prop /system/build.prop
, however, the install still fails saying that Magisk is meant for Lollipop 5.0+.
Hi,
I just tried to flash Magisk on my Pixel XL, but I got an error about Mounting System. I think its because of the different partition scheme.
IDEA: WHAT IF WE STOPPED THE SCRIPT FROM MOUNTING SYSTEM AND MANUALLY MOUNTED IT THROUGHT TWRP UI??
This is done in V8, but is not done in V9.
so modules' script might not work like before.
I tried to add some setprop entries in /magisk/v4a/post-fs-data.sh to get v4a more compatibility, which mainly was to disable deep_buffer.
setprop audio.deep_buffer.media false
setprop lpa.decode false
setprop tunnel.decode false
setprop tunnel.audiovideo.decode false
setprop lpa.releaselock false
setprop lpa.use-stagefright false
setprop persist.sys.media.use-awesome 1
After this post-fs-data.sh was added, I lost my xposed(your magisk version 86.6). The xposed was not active after reboot. From the magisk.log, it seemed late_start service mode ran before xposed was mounted completely.
post-fs-data: /magisk/v4a/post-fs-data.sh
post-fs-data: /magisk/xposed/post-fs-data.sh
Xposed: Mount: /magisk/xposed/system/lib64/libsigchain.so
Xposed: Mount: /magisk/xposed/system/lib64/libart.so
Magisk late_start service mode running...
Starting Magisk Hide
Xposed: Mount: /magisk/xposed/system/lib64/libart-disassembler.so
Xposed: Mount: /magisk/xposed/system/lib/libsigchain.so
Xposed: Mount: /magisk/xposed/system/lib/libart.so
Xposed: Mount: /magisk/xposed/system/lib/libart-compiler.so
Xposed: Mount: /magisk/xposed/system/bin/patchoat
Xposed: Mount: /magisk/xposed/system/bin/oatdump
Xposed: Mount: /magisk/xposed/system/bin/dex2oat
Xposed: Mount: /magisk/xposed/system/bin/app_process64
Xposed: Mount: /magisk/xposed/system/bin/app_process32
post-fs-data: /magisk/zzsupersu/post-fs-data.sh
Enabling systemless hosts file support
Mount: /magisk/.core/hosts
Bind mount system mirror
Mount: /system
Bind mount mirror items
While, when i moved these setprop entries to /cache/magisk/v4a/post-fs.sh, xposed was mounted and active. See the log below,
post-fs-data: /magisk/v4a/post-fs-data.sh
post-fs-data: /magisk/xposed/post-fs-data.sh
Xposed: Mount: /magisk/xposed/system/lib64/libsigchain.so
Xposed: Mount: /magisk/xposed/system/lib64/libart.so
Xposed: Mount: /magisk/xposed/system/lib64/libart-disassembler.so
Xposed: Mount: /magisk/xposed/system/lib/libsigchain.so
Xposed: Mount: /magisk/xposed/system/lib/libart.so
Xposed: Mount: /magisk/xposed/system/lib/libart-compiler.so
Xposed: Mount: /magisk/xposed/system/bin/patchoat
Xposed: Mount: /magisk/xposed/system/bin/oatdump
Xposed: Mount: /magisk/xposed/system/bin/dex2oat
Xposed: Mount: /magisk/xposed/system/bin/app_process64
Xposed: Mount: /magisk/xposed/system/bin/app_process32
post-fs-data: /magisk/zzsupersu/post-fs-data.sh
Enabling systemless hosts file support
Magisk late_start service mode running...
Mount: /magisk/.core/hosts
Bind mount system mirror
Starting Magisk Hide
Mount: /system
Bind mount mirror items
Does it mean bind mount of xposed and the setprops take too much time, or I just didn't do the setprop thing correctly at first?
Latest SuperSu modifies Boot in a way that Magisk does not detect boot image modification.
Edit 2017-01-15:
Added additional/updated information in comment below.
Original text:
I installed metaspooks ViPER-FX module v4.1 through the Magisk Manager. After the reboot, root was lost and parts of my device had been wiped clean.
Googles Messenger (sms) had been almost completely reset with all text messages deleted and notification sounds lost.
In Google calendar, the connection to outside calendars had been reset and needed to be resynced.
All app permissions had also been reset.
I'm providing the Magisk log prior to the wipe, where I had uninstalled v4.0 of the ViPER-FX module (it had a faulty id that made it look like topjohnwu's v4a module). There's also the Magisk log from installing v4.1. Unfortunately I have no more logs available, but I'm also providing the module in question. If needed I could run the installation again and try to catch some logs of the process, but resetting my phone after the wipe was a real pain...
wipe.zip
viperfx-mkm-v4.1-magisk.zip
I'm also attaching logs from installing the module in TWRP (also leading to root being lost).
Device is a Nexus 6 with stock 7.1.1 (january patch), Franco Kernel r60 and Magisk v10.2 with phh's superuser topjohnwu r2.
I did see a similar thing (sms deleted, permissions reset) happening on an earlier release of Magisk (maybe v6), but I did not collect any data at that time, unfortunately.
A module that changes properties through system.prop still changes these props while disabled. Other modifications are not loaded from the disabled module.
User 4RK4N on xda have reported the same issue: https://forum.xda-developers.com/showpost.php?p=70673263&postcount=85
Tried on bacon and mount /cache and /data as f2fs.
searched on XDA, seems Magisk doesn't supprot f2fs.
There's no logs about that.
Magisk uses a fixed size storage of 64MB, isn't better an API to resize storage per module?
My OnePlus3T running 6.0.1 (OOS 3.5.4) takes extremely long to power off. It's easy to show when I attach the charger - the blue charging light comes on. When I press the power button, I answer the popups. Then a circle starts spinning. When the circle vanishes, only the blue light stays lit. But it does not turn off for another 90 seconds. Even when I remove the charger. During this time, the phone technically is still on. So "turning on" does not work, I have to press the power button for more than 8 secs to turn it off, then turn it on again.
I must assume that some process hangs when the phone is turned off.
This does not happen when rebooting. Also the phone is fine when stock image only is installed.
After enabling Magisk Hide and activating it for an app that detects root (in my case HBO Nordic) root is disabled.
Google Nexus 6
Stock 7.0 NBD91P, with Franco Kernel r57
Magisk v9
Magisk phh's superuser 266-2
Magisk Manager 2.5
Here is a Magisk log with Magisk Hide disabled and everything working as it should:
magisk_error_20161116_172726.txt
Here is a Magisk log after enabling Magisk Hide and rebooting:
magisk_error_20161116_173308.txt
At this point everything works as it should. Magisk is behaving normal and all apps that require it can access root.
Here is a logcat after enabling Magisk Hide for HBO Nordic (com.hbo.android.app). During the logcat I confirm I have root by opening Titanium Backup and the proceed to open HBO. Start a tv series and it plays with no problems. Magisk Hide is working!
magiskhide_logcat_20161116_01_hbo_success.txt
After exiting the HBO app and opening the Magisk Manager I see that Magisk Hide is gone from the side menu and the option "Enable Magisk Hide" is unticked under settings. The same goes for "Enable systemless hosts". Both were ticked from the start. Also, the list of active modules is empty. Root is still enabled though.
I restart the device and save the Magisk log:
magisk_error_20161116_175156.txt
After the reboot Magisk Hide is working and the modules are back. Root is only functioning for Magisk Manager though. No other root apps can acquire root, but HBO will not start just as if it is detecting root. Here is a logcat showing root and HBO Nordic not working.
magiskhide_logcat_20161116_02_hbo_fail.txt
After disabling Magisk Hide and rebooting everything works as expected, again. Magisk log from that reboot:
magisk_error_20161116_180334.txt
And a logcat showing what happens trying to use HBO Nordic without Magisk Hide.
magiskhide_logcat_20161116_03_hbo_detected.txt
Recovery log information:
Installing zip file '/external_sd/Magisk-v9.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.
Archive: /external_sd/Magisk-v9.zip
inflating: META-INF/MANIFEST.MF
inflating: META-INF/CERT.SF
inflating: META-INF/CERT.RSA
inflating: META-INF/com/google/android/update-binary
inflating: META-INF/com/google/android/updater-script
inflating: arm/bootimgtools
inflating: arm/busybox
inflating: arm/magiskhide
inflating: arm/resetprop
inflating: arm/sepolicy-inject
inflating: arm64/bootimgtools
inflating: arm64/busybox
inflating: arm64/magiskhide
inflating: arm64/resetprop
inflating: arm64/sepolicy-inject
inflating: chromeos/futility
inflating: chromeos/kernel.keyblock
inflating: chromeos/kernel_data_key.vbprivk
inflating: common/custom_ramdisk_patch.sh
inflating: common/file_contexts_image
inflating: common/init.magisk.rc
inflating: common/magic_mask.sh
inflating: common/magiskhide/add
inflating: common/magiskhide/list
inflating: common/magiskhide/rm
inflating: x64/bootimgtools
inflating: x64/busybox
inflating: x64/magiskhide
inflating: x64/resetprop
inflating: x64/sepolicy-inject
inflating: x86/bootimgtools
inflating: x86/busybox
inflating: x86/magiskhide
inflating: x86/resetprop
inflating: x86/sepolicy-inject
*****************************
Magisk v9 Boot Image Patcher
*****************************
- Mounting /system(ro), /cache, /data
- Device platform: arm
chmod: /futility: No such file or directory
sh: missing ]
! Unable to detect boot image
Updater process ended with ERROR: 1
I:Legacy property environment disabled.
Error installing zip file '/external_sd/Magisk-v9.zip'
Updating partition details...
I:Data backup size is 4031MB, free: 487MB.
I:Unable to mount '/sd-ext'
I:Actual block device: '', current file system: 'ext4'
I:Unable to mount '/usbotg'
I:Actual block device: '', current file system: 'auto'
...done
I:Set page: 'flash_done'
I:operation_end - status=1
Boot partition information:
/boot | /dev/bootimg | Size: 16MB
Flags: Can_Be_Backed_Up IsPresent Can_Flash_Img
Primary_Block_Device: /dev/bootimg
Display_Name: Boot/Kernel [boot]
Storage_Name: boot
Backup_Path: /boot
Backup_Name: boot
Backup_Display_Name: Boot/Kernel [boot]
Storage_Path: /boot
Current_File_System: emmc
Fstab_File_System: emmc
Backup_Method: dd
Attached files:
Full recovery.txt
Stock boot image
Xposed 87.1 is "active" but it's shown as 87.0 and no module work by me.
AOSP based stock rom (Android 6 Aerom V5) on Elephone p9000
How can I go back to 10.0 Magisk? Did you have a download link? Or any idead for a workaround?
Sorry, I dont have a logcat... shame on me.
after flashing magisk on my moto x (2013) the moto doze app is not able to read/change/update the status of the sensors of the device. therefore light sensor, gyro, touchscreen, motion sensor, nothing works, the good part is that magisk itself seems to work. (i was able to test this by using vysor to remote controll my phone. here i add some logs, hope this helps to norrow the issue.
i first installed supersu in systemless mode
then installed the magisk manager app and proceed to install magisk
rebooted.
Device: Moto X 2013
Android Version: CM13 (Marmsmallow 6.0.1)
Kernel: CM built in kernel
im adding all logs and info i could get.
Stcock_cm_boot.img.gz
magisk.txt
liveboot.txt
moto_boot_stockt
magisk_log.txt
Currently Magisk Manager cannot work properly without root, so what about inject the manager apk directly into system/app by default?
I'm trying to create a module to install openssh and rsync binaries, this did work in Magisk v6.
the module files are:
system/bin/sshd
system/bin/ssh
system/lib64/libssh.so
system/xbin/rsync
system/placeholder
When the lib64/libssh.so
file is included, the device bootloops. It appears that during the dummy mount the real contents of lib64 get lost briefly and it never recovers
--------- beginning of crash
01-09 13:42:36.943 5283 5283 F libc : CANNOT LINK EXECUTABLE "log": file offset for the library "libcutils.so" >= file size: 0 >= 0
01-09 13:42:36.943 5283 5283 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 5283 (log)
01-09 13:42:36.964 5286 5286 F libc : CANNOT LINK EXECUTABLE "log": file offset for the library "libcutils.so" >= file size: 0 >= 0
01-09 13:42:36.964 5286 5286 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 5286 (log)
01-09 13:42:36.974 5288 5288 F libc : CANNOT LINK EXECUTABLE "log": file offset for the library "libcutils.so" >= file size: 0 >= 0
01-09 13:42:36.974 5288 5288 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 5288 (log)
01-09 13:42:36.995 5294 5294 F libc : CANNOT LINK EXECUTABLE "log": file offset for the library "libcutils.so" >= file size: 0 >= 0
01-09 13:42:36.995 5294 5294 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 5294 (log)
Trying with just the binaries, I get ssh and sshd in /system/bin
1|angler:/ $ ls -l /magisk/.core/dummy/system/bin/ssh*
-rwxr-xr-x 1 root root 182800 2016-10-04 19:59 /magisk/.core/dummy/system/bin/ssh
-rwxr-xr-x 1 root root 245448 2016-10-04 19:59 /magisk/.core/dummy/system/bin/sshd
angler:/ $ ls -l /system/bin/ssh*
-rwxr-xr-x 1 root root 182800 2016-10-04 19:59 /system/bin/ssh
-rwxr-xr-x 1 root root 245448 2016-10-04 19:59 /system/bin/sshd
but phh's su is no longer available:
angler:/ $ echo $PATH
/magisk/.core/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/magisk/.core/busybox:/system/xbin
angler:/ $ ls -l /magisk/.core/bin
ls: /magisk/.core/bin: No such file or directory
here's everything in /magisk (except .core)
/magisk/00roothelper/supersu.sh
/magisk/00roothelper/supersu.prop
/magisk/00roothelper/post-fs-data.sh
/magisk/00roothelper/phh.sh
/magisk/00roothelper/phh.prop
/magisk/phh/bin/su
/magisk/phh/bin/sepolicy-inject
/magisk/phh/module.prop
/magisk/phh/post-fs-data.sh
/magisk/angler_openssh/system/bin/sshd
/magisk/angler_openssh/system/bin/ssh
/magisk/angler_openssh/system/xbin/rsync
/magisk/angler_openssh/auto_mount
/magisk/angler_openssh/module.prop
/magisk/angler_openssh/service.sh
files in .core
1|angler:/ $ ls -l /magisk/.core
total 24
drwxr-xr-x 3 root root 4096 1970-01-09 13:19 dummy
-rw-r--r-- 1 root root 56 2009-01-01 08:00 hosts
drwxr-xr-x 3 root root 4096 1970-01-09 13:19 mirror
This is a follow up to http://forum.xda-developers.com/showpost.php?p=69080257&postcount=42, however in my case the /cache/magisk doesn't get created when flashing thru twrp either.
I'm attaching the module I've tested with and the screenshot from Magisk Manager.
GoogleAssistantEnabler.zip
Logs:
magisk_logs.zip
The message "Module will be updated at next reboot" stays on forever (I've rebooted 3 times).
On the XT1095, flashing with supersu systemless already installed causes an error: using sukernel to restore ramdisk: Unable to restore ramdisk
Furthermore, flashing with stock boot image creates a broken boot image (causes "boot failed" on boot).
There is no log in /cache
This is the boot image with systemless supersu: https://my.mixtape.moe/dmkiew.win
This probably has something to do with super-bootimg having the same issue. I've opened an issue there, and attached the stock boot image.
phhusson/super-bootimg#46
Now that Magisk manages root itself instead of using phh's app, none of the following is possible anymore:
Hello,
Son XDA sends me back here.
I bring a bog:
Model Number: (Samsung)
SM-G928F
Android version: 6.0.1
Kernel: SkyHigh
ROM: Audax Rom
I use SuperSU SystemLess
The logs are in the zip file
I flash magisk v9; My phone bootloop! Here is the log (Recovery.log).
I flash magisk V10 beta, I get an error! The log (Recovery2.log)
In addition I am not log of Magisk!
And here is the backup of my boot image functional in zip.
My question, the problem come from the boot image, but I do not know where .. Thanks!
I made an Magisk module to accomplish the changes the su.d scripts of ARISE sound system apply. To make that work, some props need to be added. Whenever i am adding the props to system.prop, the device boots up and root is lost. The phh-superuser-module is still active in Magisk Manager but the phh-superuser-app tells me to udated the binary su. The interesting thing here is: When I set the props manually within the post-fs-data.sh script they get applied and I still have root after the reboot.
Here's the module, when someone wants to test it for himself: https://www.dropbox.com/s/ncml9qg0obe349m/ARISE4Magisk.zip
Regards
I just mention this problem in #17 . After adding binaries in the module, the device stuck at the boot logo, I'm sure it's boot logo this time, not the animation. I remember the days on v6 mounting binaries worked well for me, but it has been broken since v7.
As I said,
According to the magisk.log, everything worked well and ended with late_start service mode running.
I will attach all the logs i find in /cache, wish it will help you figure out the trouble. There is some binaries in the /magisk/v4a/system/bin directory.
Tested on OnePlus3, OxygenOS 3.2.7, Marshmallow 6.0.1. Magisk v9 commit 670fe85 + phh's superuser.
In xda forum, I post two minor bugs with missing "&&" in find_boot_image() and not properly initializing CHROMEDIR variable. It is appreciated they are fixed soon in the installer script. However, the uninstaller script also experiences the same problems.
On the new TouchWiz 7.0 beta for the S7 Flat/Edge, /sbin
(bind mounted from /data/magisk.img
) gets mounted with the nosuid
option. This prevents /init
from launching anything in /sbin
(like adbd
) because the kernel requires the SELinux policy to have a type_bounds
statement when executing from a nosuid
mountpoint: https://github.com/torvalds/linux/blob/v4.8/security/selinux/hooks.c#L2348.
This is not a problem for most ROMs since adbd
is started before the Magisk hooks run, but TouchWiz 7.0 tries to restart adbd
at the end of the boot process and it can no longer run.
I think the easiest way forward is to ensure that /data/magisk.img
is mounted without nosuid
, but I'm not sure what causes that option to be added in the first place.
EDIT: It looks like this is caused by CONFIG_RKP_NS_PROT=y
in the stock kernel. Can we avoid bind-mounting /sbin
to make su work?
Files that contain the character # are failing to properly mount.
** Magisk post-fs mode running...
** Magisk post-fs-data mode running...
* Preparing modules
* Stage 1: Mount system and vendor mirrors
* Stage 2: Mount dummy skeletons
Mount: /dev/magisk/dummy/system/media/theme/miui_mod_icons
* Stage 3: Mount module items
Mount: /magisk/miui_custom_icons/system/media/theme/miui_mod_icons/com.topjohnwu.magisk.png
Mount Fail: /magisk/miui_custom_icons/system/media/theme/miui_mod_icons/com.topjohnwu.magisk#com.ipaulpro.afilechooser.FileChooserActivity.png
* Stage 4: Execute module scripts
* Stage 5: Mount mirrored items back to dummy
Mount: /dev/magisk/mirror/system/media/theme/miui_mod_icons/com.google.android.apps.maps.MapsActivity.png
Mount Fail: /dev/magisk/mirror/system/media/theme/miui_mod_icons/com.google.android.apps.maps#com.google.android.maps.MapsActivity.png
* Enabling systemless hosts file support
Mount: /magisk/.core/hosts
** Magisk late_start service mode running...
Magisk Version: v10.2
Android Version: 6.0.1
Here is what I have found. I have GPEDialer_HTC10 mod. It adds a file to the system/framework. I've since installed Viper10Rom Magisk Version. It does a .replace on the system/framework directory. If I remove the framework directory from my mod, everything works. If I leave the framework file in my mod, I see that Magisk is then mounting the framework files from Step 5 the mirrored files. This is preventing the ViperMagisk from booting do to using the stock framework files. Let me know what I can get for you.
This is the log that I have removed the framework file from my GPEDialer mod
frameworkgood.txt
This is the log that includes viper with the .replace and my mod trying to add a file to framework.
frameworknoboot.txt
If I remove the .replace from the framework directory on the ViperMagisk Rom, I can get it to boot with my mod adding to the framework directory. Only thing is II need to add a framework/arm/.replace framework/arm64/.replace and framework/oat/.replace so those do not get initialized.
Also, this is on Magisk I compiled on 12/31/16 from github.
With Magisk v9, the log would show that MagiskHide was constantly reloading the list, creating a log file several megabytes in size and failing safetynet.
With v10.2, SafetyNet still fails with CTS profile mismatch and the log is now as follows:
magisk_error_20170107_210727.log.txt
That log is after 87 hours of uptime. If I can provide any other information, please let me know.
Although your own Viper implementation does not work on Nougat, it does work when deepbuffer is #commented out.
Magisk 11 breaks it.
I tried to add about 7 apps located in /oem/app, to the replace section in the config.sh in the module template, but it didn't work. I updated my own debloat module, flashed in Magisk Manager, pressed reboot on the "installation successful" screen. My phone rebooted normally but the apps were still installed. Also no errors or any reference to /oem/app/app folder name appears in the Magisk log.
Will you please consider adding the ability to remove/replace these system apps?
My phone info is:
Phone: XT1625 (Moto G 2016)/ROM: Stock 6.0.1/Security Patch Level: July. 01 2016/Build number: MPJ24.139-64/Software Channel: retus/Stock Kernal/Magisk v10.2 with Magisk Manager 3.1/Magisk Phh Superuser topjohnwu r2/Systemless Xposed sdk-23-arm v87 by topjohnwu/ microG GmsCore v0.2.4-55/Original Play Store/ Recovery: Unoffical TWRP 3.0.3 n2 shreps
Download Link to unmodified stock rom: https://mirrors.lolinet.com/firmware/moto/athene/official/RETUS/
Thank you for all your hard work. I really enjoy Magisk and look forward to what you have planned in the future.
Now that Magisk Hide re-enables SELinux with a permissive policy when you disable it, it's a lot harder to put it back the way it was. A fair number of apps currently disable SELinux, do their thing, then re-enable it. These apps will now leave SELinux effectively disabled indefinitely on any system with Magisk Hide enabled. I don't see an obvious way to fix this, so I think as a workaround, there should be either a setting for Magisk Hide to disable this bit of functionality, or a button in Magisk that removes the permissive policy that it adds.
I'm trying to create a module for the updated adreno 330 beta drivers for my Samsung Galaxy S5 (g900f).
But after installing the module, the device won't boot (not even Boot animation will show).
There are two files, that don't exist in the original system:
/system/vendor/firmware/a330_pfp.fw
/system/vendor/firmware/a330_pm4.fw
Leaving these two files out of the module results in the device booting up normally.
Creating files with these names in system and the device also boots up normally.
Seems as adding new files or folders to /system/vendor doesn't work the way it should, as two users at XDA experienced something similar
http://forum.xda-developers.com/showpost.php?p=69261346&postcount=50
http://forum.xda-developers.com/showpost.php?p=69261346&postcount=51
Without Magisk my phone needs ~4 seconds to boot until Android bootanimation appears. And ~4 seconds to shutdown.
With Magisk this numbers are: ~40 seconds and ~10 seconds.
Is it a normal behavior?
CM14.1, Mediatek mt6735, only one module
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.