Hey guys I have a problem with the latest Supersu. I can't get root with my Samsung Galaxy S6 edge plus. So I tried an older version. That worked very well. Could you take a look at the log, please? I don't know what's the problem with that.
Code:
*****************Creating filesystem with parameters:
Size: 33554432
Block size: 4096
Blocks per group: 32768
Inodes per group: 2048
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 8192
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/2048 inodes and 1166/8192 blocks
skipping journal recoverybecause INCOMPAT_RECOVER was clear.
check whether gdt & bitmap free count is vaild
/data/su.img: clean, 11/2048 files, 1166/8192 blocks
ext2fs_close2 : fs->write_bitmaps is null
ext2fs_close2 : normal operation, return 0
mknod: /dev/block/loop0: File exists
ioctl LOOP_SET_FD failed: Device or resource busy
- Mounting /system, /data and rootfsrm: can't remove '/su/bin/su': No such file or directory
rm: can't remove '/su/bin/daemonsu': No such file or directory
rm: can't remove '/su/bin/supolicy_wrapped': No such file or directory
rm: can't remove '/su/lib/libsupol.so': No such file or directory
- Extracting filesrm: can't remove '/su/bin/sukernel': No such file or directory
rm: can't remove '/data/SuperSU.apk': No such file or directory
rm: can't remove '/su/su.d/000000deepsleep': No such file or directory
- System-less mode, boot image support requiredsukernel v2.67 (ndk:arm64-v8a) - Copyright (C) 2014-2016 - Chainfire
Loading from [/dev/block/sda5] ...
magic: [ANDROID!]
kernel: [18869536] (18870272) @ 0x10008000
ramdisk: [5367784] (5367808) @ 0x11000000
second: [0] (0) @ 0x10f00000
tags: @ 0x10000100
page size: 2048
unused: [0x0013b000] [0x00000000]
dtb(?): [1290240] (1290240)
name: []
command line: []
extra command line: []
id: [0xcb1a9d371fd0d7b82fa23c023a0cbffc281ecd60000000000000000000000000]
Saving to [/sutmp/ramdisk.packed] ...
sukernel v2.67 (ndk:arm64-v8a) - Copyright (C) 2014-2016 - Chainfire
Loading from [/sutmp/ramdisk.packed] ...
Decompressing [5367784] --> ungzip: inflate: -3
failed
- Creating image
- Mounting image
- Creating paths
- Removing old files
- Placing files
******************
Boot image patcher
******************
- Finding boot image
--- Boot image: /dev/block/sda5
- Extracting ramdisk
- Decompressing ramdisk
--- Failure, aborting
*************************
IMPORTANT NOTICES
*************************
If TWRP offers to install
SuperSU, do *NOT* let it!
*************************
First reboot may take a
few minutes. It can also
loop a few times. Do not
interrupt the process!
*************************
- Unmounting /system
- Done !
Install from sdcard complete.
Luna447 said:
Hey guys I have a problem with the latest Supersu. I can't get root with my Samsung Galaxy S6 edge plus. So I tried an older version. That worked very well. Could you take a look at the log, please? I don't know what's the problem with that.
Code:
*****************Creating filesystem with parameters:
Size: 33554432
Block size: 4096
Blocks per group: 32768
Inodes per group: 2048
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 8192
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/2048 inodes and 1166/8192 blocks
skipping journal recoverybecause INCOMPAT_RECOVER was clear.
check whether gdt & bitmap free count is vaild
/data/su.img: clean, 11/2048 files, 1166/8192 blocks
ext2fs_close2 : fs->write_bitmaps is null
ext2fs_close2 : normal operation, return 0
mknod: /dev/block/loop0: File exists
ioctl LOOP_SET_FD failed: Device or resource busy
- Mounting /system, /data and rootfsrm: can't remove '/su/bin/su': No such file or directory
rm: can't remove '/su/bin/daemonsu': No such file or directory
rm: can't remove '/su/bin/supolicy_wrapped': No such file or directory
rm: can't remove '/su/lib/libsupol.so': No such file or directory
- Extracting filesrm: can't remove '/su/bin/sukernel': No such file or directory
rm: can't remove '/data/SuperSU.apk': No such file or directory
rm: can't remove '/su/su.d/000000deepsleep': No such file or directory
- System-less mode, boot image support requiredsukernel v2.67 (ndk:arm64-v8a) - Copyright (C) 2014-2016 - Chainfire
Loading from [/dev/block/sda5] ...
magic: [ANDROID!]
kernel: [18869536] (18870272) @ 0x10008000
ramdisk: [5367784] (5367808) @ 0x11000000
second: [0] (0) @ 0x10f00000
tags: @ 0x10000100
page size: 2048
unused: [0x0013b000] [0x00000000]
dtb(?): [1290240] (1290240)
name: []
command line: []
extra command line: []
id: [0xcb1a9d371fd0d7b82fa23c023a0cbffc281ecd60000000000000000000000000]
Saving to [/sutmp/ramdisk.packed] ...
sukernel v2.67 (ndk:arm64-v8a) - Copyright (C) 2014-2016 - Chainfire
Loading from [/sutmp/ramdisk.packed] ...
Decompressing [5367784] --> ungzip: inflate: -3
failed
- Creating image
- Mounting image
- Creating paths
- Removing old files
- Placing files
******************
Boot image patcher
******************
- Finding boot image
--- Boot image: /dev/block/sda5
- Extracting ramdisk
- Decompressing ramdisk
--- Failure, aborting
*************************
IMPORTANT NOTICES
*************************
If TWRP offers to install
SuperSU, do *NOT* let it!
*************************
First reboot may take a
few minutes. It can also
loop a few times. Do not
interrupt the process!
*************************
- Unmounting /system
- Done !
Install from sdcard complete.
Click to expand...
Click to collapse
Is this a custom kernel?
Please post your boot.img
It's the latest arter Kernel for the s6e+. I think it's the v9.4.
E: http://arter97.com/browse/exynos7420/kernel/9.4/g928fcig this one.
So do you think the kernel is the problem here?
Luna447 said:
It's the latest arter Kernel for the s6e+. I think it's the v9.4.
E: http://arter97.com/browse/exynos7420/kernel/9.4/g928fcig this one.
So do you think the kernel is the problem here?
Click to expand...
Click to collapse
It's probably not compressed with gzip. SuperSU currently only supports gzip compression to modify kernels.
Chainfire said:
It's probably not compressed with gzip. SuperSU currently only supports gzip compression to modify kernels.
Click to expand...
Click to collapse
Oh I see! So what can I do to make it work? Simply extract and recompress is with a tool?
Luna447 said:
Oh I see! So what can I do to make it work? Simply extract and recompress is with a tool?
Click to expand...
Click to collapse
Nothing really. After looking at that kernel, it seems he completely disabled SELinux. That's a case the installer doesn't cover (it should), so it can just use a /system based root instead of systemless.
That and adding support for LZ4 should both fix the problem, but they are both things I need to do.
What you can try is, in recovery, execute this shell command:
Code:
echo SYSTEMLESS=true>>/data/.supersu
That might do the trick.
Chainfire said:
Nothing really. After looking at that kernel, it seems he completely disabled SELinux. That's a case the installer doesn't cover (it should), so it can just use a /system based root instead of systemless.
That and adding support for LZ4 should both fix the problem, but they are both things I need to do.
What you can try is, in recovery, execute this shell command:
Code:
echo SYSTEMLESS=true>>/data/.supersu
That might do the trick.
Click to expand...
Click to collapse
First of all, thanks for answering. But I'm not sure if I'm doing this right.
So I boot my phone into recovery.
Then I open up the cmd on my pc and navigate to the adb folder.
Now I type in "adb shell" and execute the code you provided above?
(c:\adb-tools>adb shell
~ # echo SYSTEMLESS=true>>/data/.supersu)
Yes, and then you flash SuperSU again.
Chainfire said:
Yes, and then you flash SuperSU again.
Click to expand...
Click to collapse
Hm unfortunately it didn't work. Can you recommend any good Kernel for the s6e+?
I really would like to use your latest Supersu due to the deep sleep issue I'm facing with my phone.
I feel the same, with CM 13 a Galaxy S2 i9100. If I install the superuser without installing the rom no problem, but when the ROM is installed, gives the same error
loparaan said:
I feel the same, with CM 13 a Galaxy S2 i9100. If I install the superuser without installing the rom no problem, but when the ROM is installed, gives the same error
Click to expand...
Click to collapse
Mate, I had the same problems on i9100 after installing a Lanchon kernel.
But I'd flashed a DorimanX one (https://drive.google.com/folderview?id=0B3ApZsjOd2bzWjBBMHc2SWNUSlE&usp=sharing), formatted sdcard0, and then tried to install SuperSU (before a firmware). And it worked! Then installed CM13 and got success!
blackb00m said:
Mate, I had the same problems on i9100 after installing a Lanchon kernel.
But I'd flashed a DorimanX one (https://drive.google.com/folderview?id=0B3ApZsjOd2bzWjBBMHc2SWNUSlE&usp=sharing), formatted sdcard0, and then tried to install SuperSU (before a firmware). And it worked! Then installed CM13 and got success!
Click to expand...
Click to collapse
Before installing the 13 cm, I have no problems with the installation of SuperSU, also it worked out. But when installing the CM13 the first time, the SuperSU is lost.
I'll try with that kernel to see if you let me install it. Thank you
Sumsung Galaxy s4 shv_e330k root
Got a similar problem with my LG G3 running Marshmallow (rooted with method and tools supplied here).
Oddly enough, the SuperSU 2.52 beta from the above link works flawlessly, but the 2.67 beta (and 2.65 stable) both get the "decompressing ramdisk, failure aborting" issue.
Attached recovery log in case its needed to troubleshoot!
You can just use the zips from this thread: http://forum.xda-developers.com/apps/supersu/v2-64-2-66-supersu-mode-t3286120 This will force it in system mode so it will not even attempt to do it in system-less
Xmaster24 said:
You can just use the zips from this thread: http://forum.xda-developers.com/apps/supersu/v2-64-2-66-supersu-mode-t3286120 This will force it in system mode so it will not even attempt to do it in system-less
Click to expand...
Click to collapse
Worked like a charm! Thanks!
Palaryel said:
Worked like a charm! Thanks!
Click to expand...
Click to collapse
No problem this should fix the update problems for everyone on this forum
I have a similar problem! :/ - SAMSUNG GT-i9100GSMH + lineageos 14.1 + TWRP-3.0.2-1-i9100 - SuperSU-v2.79 NO ROOT :/
Odin install Siyah-s2-v6.0b5 Kernel +Recovery by Gatox Tutorialex.tar
AND AFTER recovery install TWRP: recovery-the.gangster-IsoRec-TWRP-3.0.2-1-i9100.zip
+
lineage-14.1-20170510-nightly-i9100-signed.zip (android 7)
No apps Root lineage :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
SuperSU-v2.79-201612051815.zip
+
SuperSU GooglePlay
Install SUPERSU and NoRoot:
Do you think the solution is???
the same problem
also the same problem no root D:
Related
Hello there.
First of all, let me thank this incredible tool made by @topjohnwu, it's really a nice idea and implementation. I don't own any of the code here, it's just a modification to be able to install and run under Android-x86.org latest Nougat version (as of now, 7.1-rc2). It may work with other versions, including RemixOS and PhoenixOS, but I have not tested it. It was tested using a normal installation on a FAT32 partition, and should work with either a RW or RO system image.
Newer versions of Magisk don't use magic_magisk.sh anymore, that's why I've chosen v12.0 (it can be downloaded from the official thread on XDA). If topjohnwu want to add patches to the source code, I would be more than glad to help. But probably it's not worth the trouble... Another log is created on cache called logtmp.log if you want to check more info about what's going on.
The first step is to make a "fake" boot.img for the installer can patch the ramdisk.img. In order to do this, you will need the handy tool mkbootimg from this other XDA thread:
https://forum.xda-developers.com/showthread.php?t=2319018
Copy both kernel and ramdisk.img from the original installation and use this command (all files must be in the current directory, of course):
Code:
./mkbootimg --kernel kernel --ramdisk ramdisk.img -o boot.img
then copy the resulting boot.img to the Magisk v12.0 folder you will use to install it on your Android x86 installation. The easy way is use a flash drive connected to USB, and I will assume from now on that you have downloaded and decompressed the Magisk files to the root of your flash drive, creating a folder Magisk-v12.0 on it.
After that, if you still have su working on your installation, do the steps bellow after calling "su" (Magisk installer will remove the original su, so if you do not have it you should still be able to access root using the ALT+F1 terminal):
Code:
cd /dev
mkdir tmp
mkdir tmp/magisk
cd tmp/magisk
cp -r /storage/YOUR-FLASH-DRIVE-ID-HERE/Magisk-v12.0/* .
mv boot.img /data
sh ./META-INF/com/google/android/update-binary
YOUR-FLASH-DRIVE-ID-HERE must be replaced with your drive's unique ID. Alternatively you can copy the folder using a file manager to you internal storage (/sdcard) and then use this command instead:
Code:
cp -r /sdcard/Magisk-v12.0/* .
If everything goes well, you should see a message in the end that the new ramdisk.img is ready in the current directory, move it to somewhere else you can replace the installed one. The easiest way is moving it to a flash drive, boot on another system and replace the original one. If you can't do it, you can also move it to /data then boot in DEBUG mode and replace it on /mnt after you type "exit" once. then reboot. Also, delete boot.img from /data, it won't be necessary anymore.
This should result in a full installation of Magisk v12.0. Be aware that current modules for Magisk V14.0 won't work, so you have to dig old ones compatible with v12.0. Also, as many have asked me, probably SafetyNet won't work because it's an old version and Android x86 is a debug version anyway, you must "fake" a lot of things to pass SafetyNet test.
Attached are the modified files:
- updater-script
- magic_mask.sh
- magisk.apk (I had to use 4.3.3 for better compatibility, do not upgrade or it make break installation)
Have fun!
I do everything according to the instructions, but I can not.
Displays the following message.
I ask for help.
android-x86_64-7.1-rc2x
Code:
/dev/tmp/magisk # sh ./META-INF/com/google/android/update-binarg
unzip: can’t open [.zip]
***************************
Magisk v12.0 Boot Image Patcher
*******************************
0) /dev/tmp/magisk/common /-/
- Mounting /sistemro), /cache, /data
- Device platform: x64
chmod: /dev/tmp/magisk/chromeos: No such file or directorg
chmod: /dev/tmp/magisk/X64: No such file or directorg
- Constructing environment
cp: bad ’/dev/tmp/magisk/x64/busgbox’I No such file or directorg
cp: bad ’/dev/tmp/magisk/Xfié/magiskboot’I No such file or directorg
cp: bad ’/dev/tmp/magisk/xfié/magiskpolicg’I No such file or directorg
cp: bad ’/dev/tmp/magisk/common/init.magisk.rc’I No such file or directorg
cp: bad ’/dev/tmp/magisk/common/custom_ramdisk_patch.sh’I No such file or directorg
chmod: chmod ’sepolicy_inject’ to 120755: No such file or directorg
./METH-INF/com/google/android/update_binarg[280]: /dev/tmp/magisk/x64/busgbox: not found
./METH7INF/com/google/android/update7binarg[289]: /dev/tmp/magisk/X64/magiskpolicy: not found
- Creating /data/magisk.img
/dev/tmp/magisk/common/file_contexts_image: No such file or directorg
mount: ’/’ not in /proc/mounts
mount: ’/’ not in /proc/mounts
! Magisk image mount failed...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Done independently. It was necessary to take the original Magisk-v12.0, in which it was necessary to replace the files from the post above and then install it.
free39 said:
I do everything according to the instructions, but I can not.
Displays the following message.
I ask for help.
android-x86_64-7.1-rc2x
Done independently. It was necessary to take the original Magisk-v12.0, in which it was necessary to replace the files from the post above and then install it.
Click to expand...
Click to collapse
I think you were successful in the end, but just to clarify: you're correct, one must first download v12.0 from the official thread then replace the files with the ones attached to OP, and only then use it. :good:
@lfom
Can you please make a video and upload to YouTube. So we can learn how to do it exactly. I did try on my pc, not work. DO wee need linux for make boot.img? Can you please explain us about more detail, if possible with video please.
@lfom
Can you give a bit more detailed guide?
Like, do we have to reboot into Android partition with debug flag enabled in the kernel, then run the magisk script?
harkaman said:
@lfom
Can you please make a video and upload to YouTube. So we can learn how to do it exactly. I did try on my pc, not work. DO wee need linux for make boot.img? Can you please explain us about more detail, if possible with video please.
Click to expand...
Click to collapse
Sorry, I cannot make a video now. It's not that simple because I cannot use a screen recorder for many steps. But it's basically what is written in the tutorial. I have used Linux, but the original thread says it should work with Cygwin., although I haven't tested, it should work are long as you have the correct files as you only need one executable (mkbootimg).
https://en.wikipedia.org/wiki/Cygwin
silv3rfox said:
@lfom
Can you give a bit more detailed guide?
Like, do we have to reboot into Android partition with debug flag enabled in the kernel, then run the magisk script?
Click to expand...
Click to collapse
No, you don't need debug mode. To run the magisk install script you need superuser rights, so the easier way it to open the console mode using ALT+F1 (you need either an external keyboard or maybe a custom keyboard that allows ALT commands, like Hacker's Keyboard).
I'll try to answer questions as soon as possible, so the information is clear enough so anyone can do it.
lfom said:
Sorry, I cannot make a video now. It's not that simple because I cannot use a screen recorder for many steps. But it's basically what is written in the tutorial. I have used Linux, but the original thread says it should work with Cygwin., although I haven't tested, it should work are long as you have the correct files as you only need one executable (mkbootimg).
https://en.wikipedia.org/wiki/Cygwin
No, you don't need debug mode. To run the magisk install script you need superuser rights, so the easier way it to open the console mode using ALT+F1 (you need either an external keyboard or maybe a custom keyboard that allows ALT commands, like Hacker's Keyboard).
I'll try to answer questions as soon as possible, so the information is clear enough so anyone can do it.
Click to expand...
Click to collapse
Would these steps work for the latest magisk 14.0?
Sent from my ONEPLUS A5000 using Tapatalk
the_mentor said:
Would these steps work for the latest magisk 14.0?
Click to expand...
Click to collapse
No, it won't. As stated in OP, v12.0 was the last version to use the magic_mask.sh. Newer versions use binaries so it's much more difficult to mod unless you change the source code and re-compile the tool.
It works :good: tried on two different pcs. Windows users can use Android Image Kitchen for creating boot.img
maxriter said:
It works :good: tried on two different pcs. Windows users can use Android Image Kitchen for creating boot.img
Click to expand...
Click to collapse
I have createed bootimg . what shell i do next? do i need to copy and go in android x86?
harkaman said:
I have createed bootimg . what shell i do next? do i need to copy and go in android x86?
Click to expand...
Click to collapse
follow steps from OP, download magisk, replace files in magisk with that from the attachment, copy magisk along with boot.img to sdcard or usb drive, boot to android-x86, run the commands from OP, as a result you will get a patched ramdisk.img, copy this ramdisk to usb drive, boot back to windows, replace the original ramdisk from android x86 with the patched one.
hi.
I have installed magisk in android x86 and new ramdisk is created. BUt where and how can i copy, since i lose root. How can I copy new ramdisk?
Code:
x86_64:/ $ su
x86_64:/ # cd /dev
x86_64:/dev # mkdir tmp
x86_64:/dev # mkdir tmp/magisk
x86_64:/dev # cd tmp/magisk
x86_64:/dev/tmp/magisk # cp -r /storage/B6B4-79A3/Magisk-v12.0/* .
x86_64:/dev/tmp/magisk # mv boot.img /data
x86_64:/dev/tmp/magisk # sh ./META-INF/com/google/android/update-binary
unzip: cannot find or open , .zip or .ZIP.
*****************************
Magisk v12.0 Boot Image Patcher
*****************************
0) /dev/tmp/magisk/common /-/
- Mounting /system(ro), /cache, /data
! System installed root detected, mount rw :(
- Device platform: x64
- Constructing environment
- Creating /data/magisk.img
Creating filesystem with parameters:
Size: 67108864
Block size: 4096
Blocks per group: 32768
Inodes per group: 4096
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16384
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/4096 inodes and 1294/16384 blocks
losetup: /data/magisk.img
losetup: /data/magisk.img
losetup: /data/magisk.img
- Mounting /data/magisk.img to /magisk
- Found Boot Image: /data/boot.img
- Unpacking boot image
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/boot.img]
IMG [AOSP]
KERNEL [6098096] @ 0x10008000
RAMDISK [1795598] @ 0x11000000
SECOND [0] @ 0x10f00000
DTB [0] @ 0x10000100
PAGESIZE [2048]
NAME []
CMDLINE []
COMPRESSION [gzip]
Decompressing to [ramdisk.cpio]
- Checking patch status
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
- Backing up stock boot image
15424+0 records in
15424+0 records out
7897088 bytes (7.5MB) copied, 0.067583 seconds, 111.4MB/s
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Compressing to [/data/stock_boot_1b72ffffff9317ffffffdaffffffe6ffffffe7ffffff8870ffffffc0ffffffabffffff8dffffffc4fffffff356ffffff937e7c16ffffffb0.img.gz]
- Patching ramdisk
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Dump cpio: [ramdisk.cpio]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Dump cpio: [ramdisk.cpio]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Extracting [init.rc] to [init.rc]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Add entry [init.rc] (0750)
Dump cpio: [ramdisk.cpio]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Extracting [sepolicy] to [sepolicy]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Add entry [sepolicy] (0644)
Dump cpio: [ramdisk.cpio]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Create directory [magisk] (0755)
Dump cpio: [ramdisk.cpio]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Add entry [init.magisk.rc] (0750)
Dump cpio: [ramdisk.cpio]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Add entry [sbin/magic_mask.sh] (0750)
Dump cpio: [ramdisk.cpio]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Loading cpio: [ramdisk.cpio.orig]
Entry [init.magisk.rc] is new
Entry [init.rc] missmatch
Entry [magisk] is new
Entry [sbin/magic_mask.sh] is new
Entry [sepolicy] missmatch
Dump cpio: [ramdisk.cpio]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
- Repacking boot image
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/boot.img]
IMG [AOSP]
KERNEL [6098096] @ 0x10008000
RAMDISK [1795598] @ 0x11000000
SECOND [0] @ 0x10f00000
DTB [0] @ 0x10000100
PAGESIZE [2048]
NAME []
CMDLINE []
COMPRESSION [gzip]
Repack to boot image: [new-boot.img]
Compressing to [ramdisk.cpio.gz]
KERNEL [6098096] @ 0x10008000
RAMDISK [1851668] @ 0x11000000
SECOND [0] @ 0x10f00000
DTB [0] @ 0x10000100
PAGESIZE [2048]
NAME []
CMDLINE []
COMPRESSION [gzip]
Boot partition too small!
! Boot partition space insufficient
! Remove ramdisk backups and try again
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Remove [.backup]
Remove [.backup]
Remove [.backup]
Remove [.backup]
Dump cpio: [ramdisk.cpio]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/boot.img]
IMG [AOSP]
KERNEL [6098096] @ 0x10008000
RAMDISK [1795598] @ 0x11000000
SECOND [0] @ 0x10f00000
DTB [0] @ 0x10000100
PAGESIZE [2048]
NAME []
CMDLINE []
COMPRESSION [gzip]
Repack to boot image: [new-boot.img]
Compressing to [ramdisk.cpio.gz]
KERNEL [6098096] @ 0x10008000
RAMDISK [1797690] @ 0x11000000
SECOND [0] @ 0x10f00000
DTB [0] @ 0x10000100
PAGESIZE [2048]
NAME []
CMDLINE []
COMPRESSION [gzip]
Boot partition too small!
! Boot partition size still too small...
Do not worry, it's fine...
New ramdisk.img ready - /dev/tmp/magisk/ramdisk.img
Copy it to an external drive to replace Android boot one
- Done
x86_64:/dev/tmp/magisk #
Replace installed system.img from the one in android-x86 iso, and repeat the procedure.
Copy this new ramdisk: /dev/tmp/magisk/ramdisk.img to your usb drive: /storage/B6B4-79A3/ and reboot to windows.
A standard android-x86 iso contains initrd.img, system.img/sfs and ramdisk.img + kernel (used to create the boot.img)
installed somewhere in your pc. Replace this ramdisk.img with the patched one from the usb drive.
Thanks for the guide !
I managed to get magisk v15.3 work on latest CM 14.1 x86 on my "tesco connect 7" , a z3735g atom bay-trail based tablet.
inorder to make the patched ramdisk.img I used virtualbox and ran lubuntu x32 16.04 - since I couldn't used mkbootimg on the android directly:
A. because the linked tool is for x64 systems, so x86 android can't run it.
B. because I was emulating android on virtual machine so I ran it as "live", making system as read only I think.
C. although on my x86 virtual android it doesn't work, on my virtual ubuntu x32 it does ( guess it can run x64 binaries somehow ).
once I make boot.img I moved it to android's sdcard ( on my virtual machine running the same image as my tablet ) -> installed magisk manager ( v5.5.5 -the current latest ) then I picked install -> install -> direct install -> picked my boot.img from /sdcard -> then magisk created SDcard/MagiskManager/patched_boot.img.
* in retrospect, a very similar guide can be found here.
then once I had patched_boot.img I moved it to my virtual ubuntu, and ran "unkbootimg patched_boot.img".
this gave me a "ramdisk.cpio.gz", which is actually the "ramdisk.img" needed for the android's iso ( i.e booting using grub ).
so i've rename it "ramdisk.img" and replaced the one found on the android iso root folder.
then I rebooted that modded iso ( i.e with the modded ramdisk.img ) on my virtual -> installed magisk manager -> AND IT SHOWS IT IS INSTALLED !!!!!
now I need to replace my current ramdisk.img on my tablet to actually "magisking" my tablet.
@gps3dx Thanks, your method works. Updated Magisk from 12 to 15.3!
maxriter said:
@gps3dx Thanks, your method works. Updated Magisk from 12 to 15.3!
Click to expand...
Click to collapse
nice to hear.
I suggest you check the magisk log to see if any issue like non-mounted error occurs.
Although magisk reports installed, I have issues - but I see from the magisk beta thread that i'm not the only one... so I guess it's the specific version fault and not the way I install it.
also make sure that you've got magisk files under /data/magisk that resembles (not 1:1) the magisk zip...
i.e that you've got files like "magiskinit", "magiskboot".... I think that if you don't do "direct install" these files won't appear, since I don't think that patching the boot.img alone installs these files on the device.
/data/magisk (ln to /data/adb/magisk ?) does contain those files, I can use root related functions and magisk hide works. Seems good so far.
Moreover i updated from 12 to 15.3, so there is that.
gps3dx said:
nice to hear.
I suggest you check the magisk log to see if any issue like non-mounted error occurs.
Although magisk reports installed, I have issues - but I see from the magisk beta thread that i'm not the only one... so I guess it's the specific version fault and not the way I install it.
also make sure that you've got magisk files under /data/magisk that resembles (not 1:1) the magisk zip...
i.e that you've got files like "magiskinit", "magiskboot".... I think that if you don't do "direct install" these files won't appear, since I don't think that patching the boot.img alone installs these files on the device.
Click to expand...
Click to collapse
do you know Android x86 special mount ?
mount /dev/xxxx on /mnt
mount /mnt/$SRC/system /android/system
mount /mnt/$SRC/data /android/data
https://forum.xda-developers.com/showpost.php?p=75345518&postcount=4926
P.S my android is NOT running from an img or sfs file, since i've expanded and extract the system onto my tablet's hdd ext4 partition.
Click to expand...
Click to collapse
your Android system is hdd ext4 partition /Android-x86/system folder.
so "Mounting mirrors,Magisk : mount /dev/block/mmcblk1p5->/sbin/.core/mirror/system",even though success,no use.
if you use system.sfs or system.img,"Mounting mirrors,Magisk : mount /dev/loop0(or /dev/loop1)->/sbin/.core/mirror/system",must failed,should be mount /dev/block/loop0(/dev/block/loop1)
if you understand magisk 12 magic_mask.sh
SYSTEMBLOCK=`mount | grep " /system " | awk '{print $1}' | awk '{print substr($0,6)}'`
busybox mount -o noatime /dev/block/$SYSTEMBLOCK $MIRRDIR/system
if you not use magisk dummy,you needn't magisk mirror system.
for example,this example must use mirror system.
PHP:
Replace with dummy: /system/app
New directory: /system/app/ChromeCustomizations
Replace with dummy: /system/app
New directory: /system/app/com.google.android.apps.nexuslauncher
Replace with dummy: /system/app
New directory: /system/app/com.google.android.nexusicons
New directory: /system/priv-app/Greenify
Replace with dummy: /system/priv-app
Clone skeleton: /system/priv-app/AnalyticsService
Clone skeleton: /system/priv-app/AudioFX
Clone skeleton: /system/priv-app/BackupRestoreConfirmation
…………
…………
Clone skeleton: /system/app/AndroidTerm
Clone skeleton: /system/app/BasicDreams
Clone skeleton: /system/app/Bluetooth
…………
Does this work with ubuntu? I'm opening the terminal in the folder where every file is but after entering the first command it says file or directory not found. Also i'm running it from a live usb.
youling257 said:
do you know Android x86 special mount ?
mount /dev/xxxx on /mnt
mount /mnt/$SRC/system /android/system
mount /mnt/$SRC/data /android/data
https://forum.xda-developers.com/showpost.php?p=75345518&postcount=4926
your Android system is hdd ext4 partition /Android-x86/system folder.
so "Mounting mirrors,Magisk : mount /dev/block/mmcblk1p5->/sbin/.core/mirror/system",even though success,no use.
if you use system.sfs or system.img,"Mounting mirrors,Magisk : mount /dev/loop0(or /dev/loop1)->/sbin/.core/mirror/system",must failed,should be mount /dev/block/loop0(/dev/block/loop1)
if you understand magisk 12 magic_mask.sh
SYSTEMBLOCK=`mount | grep " /system " | awk '{print $1}' | awk '{print substr($0,6)}'`
busybox mount -o noatime /dev/block/$SYSTEMBLOCK $MIRRDIR/system
if you not use magisk dummy,you needn't magisk mirror system.
for example,this example must use mirror system.
PHP:
Replace with dummy: /system/app
New directory: /system/app/ChromeCustomizations
Replace with dummy: /system/app
New directory: /system/app/com.google.android.apps.nexuslauncher
Replace with dummy: /system/app
New directory: /system/app/com.google.android.nexusicons
New directory: /system/priv-app/Greenify
Replace with dummy: /system/priv-app
Clone skeleton: /system/priv-app/AnalyticsService
Clone skeleton: /system/priv-app/AudioFX
Clone skeleton: /system/priv-app/BackupRestoreConfirmation
…………
…………
Clone skeleton: /system/app/AndroidTerm
Clone skeleton: /system/app/BasicDreams
Clone skeleton: /system/app/Bluetooth
…………
Click to expand...
Click to collapse
I don't understand what do you think I need to do inorder to make it work ?
Also, you're wrong... my "system" folder sits at the root of my android partition...
so it's /dev/mmcblk1p5 partition... which after I mount it... I have "System", "data" and kernel, ramdisk.img & initrd.img files AT THE ROOT of that partition....
Gionikva said:
Does this work with ubuntu? I'm opening the terminal in the folder where every file is but after entering the first command it says file or directory not found. Also i'm running it from a live usb.
Click to expand...
Click to collapse
try ubuntu x64...
I use 'ubuntu-16.04.3-desktop-amd64.iso'
I've got a freshly installed Magisk v14, with manager 5.6.0, running on an Oukitel K10 with Android 7.1.1.
Version 15+ of Magisk causes a boot loop on this device, so I'm stuck on 14.
Anyway, installing downloaded Magisk modules from the zip file, or from the Downloads section in the manager, I get logs like:
Code:
- Copying zip to temp directory
- Installing Emoji_one-v1.311.zip
- Mounting /system, /vendor, /data, /cache
! Unable to extract zip file!
Failed!
! Installation failed
The MagiskManager directory does exist. I also deleted it and let the manager recreate it by downloading the magisk zip again. No change.
What can I do?
Might be an issue with unzip. Try if installing the Busybox module from the Downloads section works, and if it does, try installing modules again (after rebooting).
Installing BusyBox worked, but even after a reboot I get the same result when attempting to install other stuff. Also, BusyBox is listed under "Update Available" in the downloads section even though I already installed 1.27.2, twice.
norbolt said:
Installing BusyBox worked, but even after a reboot I get the same result when attempting to install other stuff. Also, BusyBox is listed under "Update Available" in the downloads section even though I already installed 1.27.2, twice.
Click to expand...
Click to collapse
That most likely means it did not work. Post the install log from installing the Busybox module.
Hm. Yes, the log doesn't seem as fine.
Code:
- Copying zip to temp directory
- Installing Busybox_for_Android_NDK-1.27.2.zip
Busybox Installer Script
by osm0sis @ xda-developers
Mounting...
mount: bad /etc/fstab: No such file or directory
mount: bad /etc/fstab: No such file or directory
mount: bad /etc/fstab: No such file or directory
Extracting files...
update-binary[110]: unzip: not found
Installing...
Using architecture: arm64
Creating filesystem with parameters:
Size: 67108864
Block size: 4096
Blocks per group: 32768
Inodes per group: 4096
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16384
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/4096 inodes and 1294/16384 blocks
umount: /dev/magisk_merge: No such file or directory
mount: losetup failed 1
mknod: /dev/block/loop0: File exists
losetup: /dev/block/loop0=/data//magisk_merge.img: Device or resource busy
mknod: /dev/block/loop1: File exists
Using path: /dev/magisk_merge/busybox-ndk/system/xbin
cp: busybox-arm64: No such file or directory
cp: bad 'busybox-arm64': No such file or directory
chown: /dev/magisk_merge/busybox-ndk/system/xbin/busybox: No such file or directory
chmod: /dev/magisk_merge/busybox-ndk/system/xbin/busybox: No such file or directory
cp: module.prop: No such file or directory
cp: bad 'module.prop': No such file or directory
cp: module.prop: No such file or directory
cp: bad 'module.prop': No such file or directory
Cleaning...
update-binary[189]: /dev/magisk_merge/busybox-ndk/system/xbin/busybox: not found
update-binary[191]: /dev/magisk_merge/busybox-ndk/system/xbin/busybox: not found
update-binary[210]: /dev/magisk_merge/busybox-ndk/system/xbin/busybox: not found
Creating symlinks...
Unmounting...
umount: /system: Device or resource busy
umount: /data: Device or resource busy
umount: /cache: Device or resource busy
Done!
- All done!
Yeah, there's an issue with unzip:
Code:
update-binary[110]: unzip: not found
Might be an issue with your Magisk installation or a device thing, hard to say....
Have you tried installing a zip through recovery? If you can install the Busybox module in recovery it might fix things.
Didgeridoohan said:
Have you tried installing a zip through recovery? If you can install the Busybox module in recovery it might fix things.
Click to expand...
Click to collapse
I have not tried that. I currently have the stock recovery flashed. So I guess this means flashing TWRP, then flashing Busybox, and perhaps also attempting to flash Magisk itself through the recovery?
Hopefully I got that right. I'm a bit new to this.
norbolt said:
I have not tried that. I currently have the stock recovery flashed. So I guess this means flashing TWRP, then flashing Busybox, and perhaps also attempting to flash Magisk itself through the recovery?
Hopefully I got that right. I'm a bit new to this.
Click to expand...
Click to collapse
You don't have to install TWRP, you can just boot it:
Code:
fastboot boot recovery twrp.img
I attempted to install both Magisk and Busybox from TWRP, and while the Magisk installer seems to run fine, I get to allow root access to stuff in Android afterwards and I get the Magisk Manager and such, I still can't install Busybox. Also, it seems from the log that Magisk itself is also having some issues the UI isn't telling me about.
The main issue seems to be the following error:
Code:
I:[MTP] MtpServer::run fd: 26
E:[MTP] got unsupported command UNKNOWNE:[MTP] response write returned -1, errno: 19, exiting MtpServer::run loop
Searching Google for the above error returns very little help.
I pasted the entire log here, from me booting TWRP and attempting to install Magisk and Busybox a few times. The Busybox installer claims Magisk isn't installed.
I can't post links yet, so this is code:
Code:
http://paste.debian.net/1010746/
norbolt said:
I've got a freshly installed Magisk v14, with manager 5.6.0, running on an Oukitel K10 with Android 7.1.1.
Version 15+ of Magisk causes a boot loop on this device, so I'm stuck on 14.
Anyway, installing downloaded Magisk modules from the zip file, or from the Downloads section in the manager, I get logs like:
Code:
- Copying zip to temp directory
- Installing Emoji_one-v1.311.zip
- Mounting /system, /vendor, /data, /cache
! Unable to extract zip file!
Failed!
! Installation failed
The MagiskManager directory does exist. I also deleted it and let the manager recreate it by downloading the magisk zip again. No change.
What can I do?
Click to expand...
Click to collapse
hello,
Very simple solution for me at least.
i found this thread because the same thing just happened to me on g900t s5 running lineageOS. Magisk said couldnt extract Zip everytime.
My problem i believe was that i installed busybox from Apkpure and not playstore
Because when i uninstalled Busybox from apkpure then installed busybox from playtore the unzip errors are gone!
Maybe its because i has a bad copy of busybox?
Idk but that was the solution for me!
Hope this helps someone
Me helps install again magisk by twrp.
Install the es file explorer once and extract the zip at least once, It will show a list of programs by which to extract, select es file extractor and check the always button now go back to the magisk manager and try again you should be good to go.
magisk zip
My problem solved by typing real path.
I was use command to install a module using this code
Code:
twrp install sdcard/module.zip
Give an error, so i change to
Code:
twrp install /sdcard/module.zip
Everything ok.
alfanveykov said:
My problem solved by typing real path.
I was use command to install a module using this code
Code:
twrp install sdcard/module.zip
Give an error, so i change to
Code:
twrp install /sdcard/module.zip
Everything ok.
Click to expand...
Click to collapse
where I must try this command?
because I have same problem
every time i try to install a module with magisk i get the magisk_mount.img failed message. i cannot install the zip files using twrp either. xposed modules work fine. my file system is not f2fs so i dont think that fix will help. any suggestions will be appreciated. thanks
phone: bv9000 pro
android: 7.1.1
magisk: v18
twrp recovery ( not encrypted have access to all files)
If you can post logs it's easier to help. In your case, the installation log, recovery log and Magisk log could be interesting to see.
log
- Copying zip to temp directory
- Installing ViPER4Android_FX-v3.1.zip
Archive: /data/user/0/com.topjohnwu.magisk/cache/install.zip
inflating: common/unityfiles/tools.tar.gz
inflating: common/unityfiles/util_functions.sh
Unzipping files...
*******************************************
* ViPER4Android FX *
*******************************************
* v3.1 *
* by ViPER520, ZhuHang, Ahrion, Zackptg5 *
*******************************************
- Mounting /data, /cache
- Magisk install detected
- Mounting /system, /vendor
- Creating /data/adb/magisk_merge.img with size 64M
Creating filesystem with parameters:
Size: 67108864
Block size: 4096
Blocks per group: 32768
Inodes per group: 4096
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16384
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/4096 inodes and 1294/16384 blocks
Create /data/adb/magisk_merge.img with size 64M
e2fsck 1.42.9 (28-Dec-2013)
mount /sbin/.magisk/block/loop09->/dev/tmp/magisk_img failed with 13: Permission denied
! /data/adb/magisk_merge.img mount failed...
! Installation failed
after trying a fix i saw on another thread now i just get this:
- Copying zip to temp directory
! Invalid Uri
! Installation failed
reinstalled magisk now getting the same results as first log
Hi All,
Device Detail:
- Samsung S10 5G
- Qualcomm Device
- Model: SM-G977U
- ROM: VZW-G977UVRU2ASH7-20190827135903
- Kernel-Version - Linux version 4.14.83-16633035 ([email protected]) (clang version 6.0.10 for Android NDK) #2 SMP PREEMPT Wed Aug 14 16:23:48 KST 2019
Background: I have
- rooted the device with instructions given by Magisk.
- I can successfully reboot to the recovery rootfs.
Problem: I am trying to modify the `system.img.ext4.lz4` file to root the device with normal boot. I am aware that it will not let the device install OTA Updates.
Unpack-Pack System and make new AP.tar, flash:
- Without any modification to the `system.img`, I have just unpacked `system.img.ext4.lz4`->`system.img.ext4`->`system.img`->mounted to system directory and packed it back to `system.img`->`system.img.ext4`->`system.img.ext4.lz4`.
- Replaced unpack-packed `system.img.ext4.lz4` with the AP `system.img.ext4.lz4` and make a tar of it.
- Then I have flashed it using Odin v3.13 along with BL, CP, and HOME_CSC.
- Odin has show PASS and I have rebooted the device into recovery mode.
- Done the Wipe data/factory reset and reboot to recovery again but released the recovery key combination on splash screen as mentioned in the root instructions .
- The device stuck in a boot loop.
Tries:
1. Disable Dm-verity
- Removed `avb` flag from `boot.img` with
Code:
magiskboot dtb boot.img patch
- Removed `avb` and `verify` flags from `dtbo.img` with
Code:
magiskboot dtb dtbo.img patch
- Patched `ramdisk.cpio` with
Code:
magiskboot cpio ./initrd 'patch false true'
Patched `boot.img` and `dtbo.img` is working fine with magisk patched AP file but the `ramdisk.cpio` creating the issue: Stuck at splash screen when trying to go to recovery after successfully flash with Odin. Download mode is appearing on splash screen.
So, I have used `boot.img` and `dtbo.img` along with unpack-packed `system.img.ext4.lz4` but the result is still a boot loop. I have also tried a combination of `boot.img` and `dtbo.img` along with unpack-packed `vendor.img.ext4.lz4` and flashed the AP.tar with other files but still the result is a boot loop.
So, I want to debug the problem and got to know about `pstore` which preserve the logs when kernel panic.
2. pstore
- Checked that `/sys/fs/pstore` is mounted by the system with following in init file: Grep the pstore using `find . | grep '\.rc' | xargs cat | grep pstore -n -i` and get following result:
Code:
314: # pstore/ramoops previous console log
315: mount pstore pstore /sys/fs/pstore nodev noexec nosuid
316: chown system log /sys/fs/pstore/console-ramoops
317: chmod 0440 /sys/fs/pstore/console-ramoops
318: chown system log /sys/fs/pstore/console-ramoops-0
319: chmod 0440 /sys/fs/pstore/console-ramoops-0
320: chown system log /sys/fs/pstore/pmsg-ramoops-0
321: chmod 0440 /sys/fs/pstore/pmsg-ramoops-0
- Checked the kernel config by pulling the file from /proc/config.gz.
Code:
$ cat config | grep PSTORE
CONFIG_PSTORE=y
CONFIG_PSTORE_ZLIB_COMPRESS=y
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_PMSG_SSPLOG=y
CONFIG_PSTORE_RAM=y
- Check the `ramoops` configuration:
Code:
./sys/module/ramoops/parameters/console_size 262144
./sys/module/ramoops/parameters/dump_oops 1
./sys/module/ramoops/parameters/ecc 0
./sys/module/ramoops/parameters/ftrace_size 262144
./sys/module/ramoops/parameters/mem_address 3241148416
./sys/module/ramoops/parameters/mem_size 1048576
./sys/module/ramoops/parameters/mem_type 0
./sys/module/ramoops/parameters/pmsg_size 262144
./sys/module/ramoops/parameters/record_size 262144
`pstore` setup looks fine but when I am trying the get logs from `sys/fs/pstore` then I found nothing.
I have tried it by two ways:
1. Crash manually with panic kernel using:
Code:
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger
Followed Reading Kernel Logs
2. Flashing non-working rom that cause a boot loop and then flashed a working ROM with rooting steps and checked the file at `sys/fs/pstore`.
I need a favor in:
- Any steps to fix/debug the `pstore` problem?
- Any other way to find the kernel logs?
Update 1: I get the logs from recovery but I am not able to identify the problem.
Logs link: https://drive.google.com/file/d/1b-XNmjpYvH-L8lY0xA0SYr7XcITVCrVS/view?usp=sharing
Description: In this video, I have done the following:
1. Displayed recovery logs before: The last recovery logs are ends with 8.
2. Rebooted the device with a recovery key combination. I have already wipe data partition before making this video.
3. The boot loop happens and in the next reboot, I have pressed the recovery key combination to open the recovery mode where logs that end with 9 displayed.
4. Then I have recorded `last_history`, `last_avc_message_recovery`, `last_log.9` and `last_kmsg.9`
5. `last_history` and `last_avc_message_recovery` looks unchanged(same as before boot loop).
6. Then, I just have tried to mount the system but that didn't work.
7. At last, I have just rebooted the system normally without any recovery key combination.
Some Highlighted logs of last_log.9
exec -f /system/bin/e2fsck -v -y /dev/block/bootdevice/by-name/cache
error: _do_exec: can't run '/system/bin/e2fsck'
(errno 13 : Permission denied)
/system/bin/e2fsck terminated by exit(255)
...
E:Can't read /cache/recovery/last_locale: No such file or directory
...
W:Failed to unmount /efs: Device or resource busy
can't unmount /efs - Device or resource busy
...
W:Failed to set brightness: Invalid argument
I:Screensaver disabled
Atomic Commit failed in DisableNonMainCrtcs
Atomic Commit failed, rc = 0
...
Reboot Recovery Cause is [[BootChecker]RebootRecoveryWithKey]
...
print_recovery_cause() : reboot_reason=[[BootChecker]RebootRecoveryWithKey]
...
[property list]
persist.audio.fluence.speaker=true
...
ro.vendor.build.security_patch=2018-08-05
Supported API: 3
I:/efs is already mounted
W:Failed to unmount /efs: Device or resource busy
check_selective_file:Can't unmount /efs - Device or resource busy
just_reboot_after_update = 1
should_wipe_cahcewipe_cache
-- Wiping cache...
erase_volume(/cache)
...
MDF_I: Completed reset MDF flag!
MDF_I: Completed initialized MDF for Recovery!
mke2fs 1.43.3 (04-Sep-2016)
Discarding device blocksL 4096/153600??????????????????????????????done
Discard takes 0.00051s
Creating filesystem with 153600 4k blocks and 38400 inodes
...
Creating journal (2048 blocks): done
...
copy_logs
...
Cache wipe complete
[Checking pre-multi-csc2]
[start failed section]
sales_code=VZW
Carrier ID=[XAA]
[system partition space check]
The device has /product partition.
[out-recovery]
I:system root image is true, so need to change the unmount point from /system to /system_root
running out-recovery time : 0.000s
running recovery time: 1.738s
copy_avc_msg_to_data(1, )
I:fs_type "ext4" for /cache
copy_file 'proc/avc_msg' 'cache/recovery/last_avc_msg_recovery'
!__RECOVERY_FOR_ASSAMBLY
b_del_recovery_command = true
Rebooting...
## finish_recovery_terminate(del=1, reboot_cmd=reboot, clear_BCB=1)
## finish_recovery(delcmd=1,...
I:Saving locale "en-US"
I:fs_type "ext4" for /cache
I:[libfs_mgr]dt_fstab: Skip disabled entry for partition vm-linux
I:## unlink /cache/recovery/command
copy_logs
I:fs_type "ext4" for /cache
copy_log_file :: create recovery log file '/cache/recovery/log'
copy_log_file :: create recovery log file '/cache/recovery/last_log'
Click to expand...
Click to collapse
Is anyone have experience in detecting problems from the kernel logs?
i can not help you, but we can collect ideas. what about re-sign the system.img? there is a key somewhere, i guess just deleting won't work but maybe it is possible to calculate checksum
or maybe you can switch to SuperSU 2.79 SR3 (latest release from chainfire) or at least look inside the update-binary shell script how to root system.
regarding dm-verity i would start with searching for "verify" flag in your fstabs and remove it. magisk is also doing some hex patches and re-signing, it's the best source to look inside magisk installer zip update-binary/ updater-script, if you have the knowledge to read code
another option is try to port a twrp recovery from another snapdragon (i wonder if somebody did this already) if you can find a porting guide
so the vzw s10 5g is unlockable?
elliwigy said:
so the vzw s10 5g is unlockable?
Click to expand...
Click to collapse
yes
aIecxs said:
yes
Click to expand...
Click to collapse
Figures lol.. I have a g975u from big red n don't plan on buying another lol
aIecxs said:
yes
Click to expand...
Click to collapse
Message me on telegram and I can help you if you help me.. I'm curious in some logs and what not.. I also might have something you can use..
Did you get it working? I have the same phone and I want to use the 600mgz tmobile 5g in a few days, so I need the right rom.
elliwigy said:
so the vzw s10 5g is unlockable?
Click to expand...
Click to collapse
aIecxs said:
yes
Click to expand...
Click to collapse
Snapdragon bootloader unlockable? How?
I'm a VZW customer and can get the phone on an upgrade, but want to root it...
i got a g977p and twrp n magisk working great
do you think it is possible to flash other branding on verizon devices with modded odin?
aIecxs said:
do you think it is possible to flash other branding on verizon devices with modded odin?
Click to expand...
Click to collapse
dunno.. its not possible on n976v..
Was there any luck on rooting the Verizon G977U?
@Vats12 has already successful rooted with magisk in recovery. this thread is for rooting system (kind of rooting where su binary is placed in /system/xbin like for older devices, which breaks OTA)
aIecxs said:
@Vats12 has already successful rooted with magisk in recovery. this thread is for rooting system (kind of rooting where su binary is placed in /system/xbin like for older devices, which breaks OTA)
Click to expand...
Click to collapse
So you want like the supersu method?
ExtremeGrief said:
So you want like the supersu method?
Click to expand...
Click to collapse
Yes, do you know how to do this?
Magisk (guide) does a lot of other things too..
Maybe we can use Magisk to disable the securities and then SuperSu can help in the rooting system?
Vats12 said:
Yes, do you know how to do this?
Magisk (guide) does a lot of other things too..
Maybe we can use Magisk to disable the securities and then SuperSu can help in the rooting system?
Click to expand...
Click to collapse
But why? Safetynet will be gone
What model is the device?
ExtremeGrief said:
But why? Safetynet will be gone
What model is the device?
Click to expand...
Click to collapse
model see OP! i guess because of the buttons needed for booting in magiskrecovery, but the reason is not important only HOW (for Vats12, not for me i don't own this device)
Sorry but this thread needs to be closed
aIecxs said:
model see OP! i guess because of the buttons needed for booting in magiskrecovery, but the reason is not important only HOW (for Vats12, not for me i don't own this device)
Click to expand...
Click to collapse
I don't want to be the one who shouts fake, but the instructions you gave a link to says you have to be able to flash a bootloader first, which means an unlocked blootloader, if you have Verizon rom this is not possible, as the blootloader is locked.
If you did find a way to flash a modified bootloader, or a modified recovery those are the instructions we need, because in fastboot you are unable to do this with a locked bootloader and you are unable to unlock the bootloader on Verizon. If you have a modified bootloader or recovery flashed on your device what did you use to flash it with Odin? Because only way to flash a boot.img is either get into download mode and flash with Odin, or with Edl, if you got into edl mode then can you provide instructions on that, because we would like to know how to get the device into EDL mode as well
Sorry boys this is a hoax.
@DroidisLINUX there is video proof in OP, and again for you:
This is not a tutorial about unlocking and rooting, it is a question how he can modify /system to permanently integrate su
HI
Update 13.04.2023 /bs
To install Magisk v26.0 or newer the script version 25.01.2023 v2.5.1.0 is necessary.
Unfortunately there is a new feature in Magisk v26.x that prevents the full installation of Magisk from within a booted recovery; from the Magisk docs:
This means that any installation of Magisk v26+ using custom recovery will be incomplete; a subsequent re-installation through the Magisk app after booting up is required.
Click to expand...
Click to collapse
Therefor currently the installation of Magisk v26.x via script without user intervention does not yet work
I wrote a little shell script for Linux (bash) to add Magisk to the boot partition of a phone without user intervention called install_magisk_via_twrp.sh.
This is useful for example to re-install Magisk into the boot partition after an OS upgrade .
The script uses only the commands fastboot and adb, a recovery image (e.g. TWRP), and the patch script from Magisk to re-install Magisk into the boot partition.
Notes
Note that the script version 1.1.0.0 or newer also works if the phone is secured via PIN or something similar.
Since version 2.0.0.0 it is not necessary anymore to install Magisk via Magisk App into a boot image file before starting the script.
Since version 2.0.0.0 the script can install Magisk into the partition even if the Magisk app is not installed yet.
SInce version 2.1.0.0 the script will also copy the Magisk apk to the phone file if requested via parameter.
Version 2.5.1.0 of the script install_magisk_via_twrp.sh or newer of the script is necessary to install Magisk v26.1 or newer
The usage for the script is:
Code:
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $ ./install_magisk_via_twrp.sh -h
install_magisk_via_twrp.sh version - v2.3.0.0 - add Magisk to the boot partition of a phone running Android using TWRP
install_magisk_via_twrp.sh [-h|help|-H] [boot_slot] [wait=n] [dd|fastboot] [twrp_image] [cleanup] [delete_adb_dir] [adb_only] [use_apk] [copy_apk]
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $
Use the parameter -H to print the detailed usage:
Spoiler: Detailed usage
Code:
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $ ./install_magisk_via_twrp.sh -H
install_magisk_via_twrp.sh version - v2.3.0.0 - add Magisk to the boot partition of a phone running Android using TWRP
Usage
install_magisk_via_twrp.sh [-h|help|-H] [boot_slot] [wait=n] [dd|fastboot] [twrp_image] [cleanup] [delete_adb_dir] [adb_only] [use_apk] [copy_apk]
All parameter are optional. The parameter can be used in any order.
Use the parameter "help" or "-H" to print the detailed usage help; use the parameter "-h" to print only the short usage help
The parameter "boot_slot" can be a, b, active, inactive, next, current; default is the current boot slot of the phone
The value for the parameter "wait" is the number of seconds to wait before starting the script to install Magisk on the phone
This seems to be necessary to avoid errors while repacking the boot image. The default wait time is 10 seconds.
Use the parameter "dd" to request repatching via dd in an adb session ; use the parameter "fastboot" to request repatching via "fastboot"
Default is to use "dd" to flash the patched boot image.
The parameter "twrp_image" can be used to define another TWRP image to use. The parameter is optional - the
default for "twrp_image" is hardcoded in the script (variable TWRP_IMAGE)
The default TWRP image of the script is the TWRP for the ASUS Zenfone 8.
Use the parameter "cleanup" to delete the directory /data/MagiskInst at script end
If the parameter "delete_adb_dir" is used the script will delete all files and directories created in the directory /data after Magisk
was successfully installed into the boot partition
If the parameter "adb_only" is used the script will only install the directories and binaries for Magisk in the directory /data/adb.
The script will unpack the necesseray files for adding Magisk to the boot partition from the installed Magisk apk file to
the temporary directory /data/MagiskInst if the files in /data/adb/magisk are missing.
Use the parameter "use_apk" to force the script to use the files from the Magisk app even if the files in /data/adb/magisk exist.
If the parameter "copy_apk" is used the script will copy the Magisk apk file to the phone.
The script now can also install Magisk into a boot partition without an installed Magisk app. To use this feature copy the Magisk apk file
(Magisk*apk) to the directory /data or /sdcard/Download on the phone before starting the script or use the parameter "copy_apk".
The phone to patch must be attached via USB.
The phone can be either in fastboot mode, in normal mode with enabled adb support, or already booted from the TWRP image
To change some of the values used by the script you can set environment variables before starting the script:
Set the environment variable REBOOT to "yes" before starting the script to automatically reboot the phone after patching the new image
Set the environment variable REBOOT to "no" before starting the script to disable the automatic reboot after patching the new image.
Set the environment variable SERIAL_NUMBER to the serial number of the phone to patch if there is more then one phone connected via USB
Set the environment variable ADB_OPTIONS to the options to be used with the adb command
Set the environment variable FASTBOOT_OPTIONS to the options to be used with the fastboot command
Set the environment variable DOWNLOAD_DIR_ON_PHONE to the data directory to use on the phone (def.: /sdcard/Download)
Set the envionment variable MAGISK_APK_FILE to the Magisk apk file to use
The default TWRP image to use is "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img"
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $
In the default the script will ask the user for input before rebooting the phone from the patched boot partition.
To disable this request call the script like this
Code:
REBOOT=yes install_magisk_via_twrp.sh
Additional infos
Prerequisites
the Magisk App; either installed or as apk file
a computer running Linux with working adb and fastboot binaries available via PATH variable
a phone with unlocked boot loader
a working recovery image (e.g. TWRP) for the attached phone that automatically mounts /data and has enabled adb support (For the ASUS Zenfone 8 the official TWRP image from https://twrp.me/asus/zenfone8.html version 3.7.0 or newer can be used)
Test Environment
Tested on an ASUS Zenfone 8 and with
OmniROM 12 (Android 12) and Magisk v24.3
OmniROM 12 (Android 12) and Magisk v25.0
OmniROM 12 (Android 12) and Magisk v25.2
OmniROM 13 (Android 13) and Magisk v25.2
AospExtended 9.0 w/o GAPPS (Android 12) and Magisk v24.3
AospExtended 9.0 w/o GAPPS (Android 12) and Magisk v25.0
ASUS Original Android 11 and Magisk v24.3
ASUS Original Android 12 and Magisk v24.3
ASUS Original Android 13 Beta 1 and Magisk v25.0
Details
The script uses the scripts and binaries from the directory /data/adb/magisk. If these executables do not exist the script searches for the installed Magisk apk file /data/app/*/com.topjohnwu.magisk*/base.apk and extracts the scripts and binaries from that file. If the Magisk apk is not installed the script searches for the Magisk APK file Magisk*.apk in the directories /sdcard/Download and /data and extracts the scripts and executables from that file if found.
If the parameter copy_apk is used the script copies the Magisk apk file to the directory /sdcard/Download on the phone or, if that directory does not exist, to the directory /data on the phone
The patched boot images will be created in the directory /sdcard/Downloads on the phone (variable DOWNLOAD_DIR_ON_PHONE)
The script uses the original script called boot_patch.sh from Magisk to patch the boot image.
You can execute the script as often as you like.
The script will not delete the created files in the directory /sdcard/Download on the phone so you might do a cleanup of that directory manual
If the directory /sdcard/Download is not available the script will use the directory /tmp for temporary files (Note: /tmp is mounted on a ramdisk)
If the check sum of the boot image before the patching is equal to the check sum after the successfull patching then Magisk was already installed in the boot partition
The script will boot the phone up to 4 times.
Trouble Shooting
- Error message like this
Code:
/data/adb/magisk/boot_patch.sh[211]: can't create /proc/self/fd/: Is a directory
can be ignored (these are only error messages from the function to print some additional messages)
Note: Since version 2.0.0.0 these error messages should not occur anymore.
- Patching the boot partition via "dd" fails sometimes for unknown reason so you should only use it if you know how to fix a damaged boot partition!
- Downloading the patched boot image via "adb pull" (neccessary for patching the boot partition using fastboot) sometimes fails for unknown reason:
So if you get an error message like this:
Code:
[ 77%] /sdcard/Download/patched_boot_a.391985.img
ERROR: Error downloading the file "/sdcard/Download/patched_boot_a.391985.img" from the phone!
just restart the script again (or download the file and flash the boot partition manually)
- If the adb connection dies and there are error messages like this
Code:
adb: insufficient permissions for device
restart the adb server using
Code:
adb kill-server
if that does not work disconnect and reconnect the USB cable
Spoiler: Sample output of the script
Code:
[[email protected] /data/backup/Android/scripts_on_linux]$ ./install_magisk_via_twrp.sh
./install_magisk_via_twrp.sh version - 2.0.0.0 - add Magisk to the boot partition of a phone running Android using TWRP
Using the TWRP image hardcoded in the script: "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D.img"
Checking the script prerequisites ...
Will wait 10 second(s) before starting the script on the phone
The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
Will patch the boot partition on the attached phone with the serial number "M6AIB760D0939LX"
Using the options "-d -s M6AIB760D0939LX " for the adb commands
Using the options " -s M6AIB760D0939LX " for the fastboot commands
Checking for a connected phone booted into fastboot mode ...
No attached phone in fastboot mode found
Checking for an attached phone with working access via adb (USB) ...
Linux localhost 5.4.147-Omni-qgki-perf-gea6f815f5af9-dirty #42 SMP PREEMPT Tue Sep 27 18:03:41 CEST 2022 aarch64
... found a phone connected via USB with working adb access
The phone is booted in normal mode
The installed OS is based on Android 12 (Wed Aug 10 06:59:46 CEST 2022); the description for the distribution is "omni_zenfone8-user 12 SQ3A.220605.009.A1 eng.xtrnaw.20220810.065947 release-keys"
The installed version of Magisk is com.topjohnwu.magisk versionCode 25200
Booting the phone into the fastboot mode now ...
Waiting up to 60 seconds for the boot into the fastboot mode ...
Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D.img" now ...
Sending 'boot.img' (98304 KB) OKAY [ 2.489s]
Booting OKAY [ 10.359s]
Finished. Total time: 12.888s
Waiting up to 60 seconds for the boot of the phone ....
Retrieving the current boot slot from the phone ...
The current boot slot is "_b"
The boot slot to patch is "_b"
The boot partition to patch is "boot_b"
Checking if the Magisk patch script "boot_patch.sh" exists on the phone ....
-rwxr-xr-x 1 root root 5987 2022-10-27 07:33 /data/adb/magisk/boot_patch.sh
Checking if the download directory "/sdcard/Download" exists on the phone ....
/sdcard/Download
Creating the boot image file "/sdcard/Download/boot_b.732627.img" from the partition "/dev/block/by-name/boot_b" ...
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 0.308243 s, 311 M/s
Checking the result ...
-rw-rw---- 1 root media_rw 100663296 2022-10-28 09:51 /sdcard/Download/boot_b.732627.img
The check sums are:
The check sum of the boot partition "/dev/block/by-name/boot_b" on the phone is "4108888341"
The check sum of th boot image file on the phone is "/sdcard/Download/boot_b.732627.img" is "4108888341"
Patching the boot image file "/sdcard/Download/boot_b.732627.img" ...
Waiting now 10 seconds ...
- Unpacking boot image
Parsing boot image: [/sdcard/Download/boot_b.732627.img]
HEADER_VER [3]
KERNEL_SZ [42025472]
RAMDISK_SZ [34080597]
OS_VERSION [12.0.0]
OS_PATCH_LEVEL [2022-05]
PAGESIZE [4096]
CMDLINE []
KERNEL_FMT [raw]
RAMDISK_FMT [gzip]
VBMETA
- Checking ramdisk status
Loading cpio: [ramdisk.cpio]
- Stock boot image detected
- 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/magisk64.xz] (0644)
Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[false]
Found fstab file [system/etc/fstab.postinstall]
Remove pattern [,avb_keys=/product/etc/security/avb/system_other.avbpubkey]
Loading cpio: [ramdisk.cpio.orig]
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/magisk64.xz] -> [.backup/.rmlist]
Backup mismatch entry: [system/etc/fstab.postinstall] -> [.backup/system/etc/fstab.postinstall]
Create directory [.backup] (0000)
Add entry [.backup/.magisk] (0000)
Dump cpio: [ramdisk.cpio]
- Repacking boot image
Parsing boot image: [/sdcard/Download/boot_b.732627.img]
HEADER_VER [3]
KERNEL_SZ [42025472]
RAMDISK_SZ [34080597]
OS_VERSION [12.0.0]
OS_PATCH_LEVEL [2022-05]
PAGESIZE [4096]
CMDLINE []
KERNEL_FMT [raw]
RAMDISK_FMT [gzip]
VBMETA
Repack to boot image: [new-boot.img]
HEADER_VER [3]
KERNEL_SZ [42025472]
RAMDISK_SZ [34331854]
OS_VERSION [12.0.0]
OS_PATCH_LEVEL [2022-05]
PAGESIZE [4096]
CMDLINE []
Checking the result ...
-rw-r--r-- 1 root root 100663296 2022-10-28 09:51 /data/adb/magisk/new-boot.img
The patched boot image is "/sdcard/Download/patched_boot_b.732627.img"
Waiting now 5 seconds ...
Patching the partition "/dev/block/by-name/boot_b" from the patched boot image file "/sdcard/Download/patched_boot_b.732627.img" via dd ...
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 4.721236 s, 20 M/s
Checking the result ....
The check sums for the images and devices on the phone are:
4108888341 100663296 /sdcard/Download/boot_b.732627.img
3369959638 100663296 /sdcard/Download/patched_boot_b.732627.img
3369959638 100663296 /dev/block/by-name/boot_b
OK, patching the boot partition "/dev/block/by-name/boot_b" was successfull
*** Press return to reboot the phone now
Rebooting the phone now ...
[[email protected] /data/backup/Android/scripts_on_linux]$
Update 03.07.2022 /bs
The script now uses the directory /tmp for temporary file if the directory /sdcard/Download is not available. Therefor it will also work if the phone is secured by a PIN or something similar.
Update 05.07.2022/bs
The script is also available on my web site:
http://bnsmb.de/files/public/Android/install_magisk_via_twrp.sh
Update 30.12.2022/bs
Updated the usage help for the script to match the version 2..3.0 of the script
Update 28.10.2022 /bs
Updated the post to match the new script version 2.0.0.0
Update 17.12.2022 /bs
Updated the post to match the new script version 2.1.0.0
see here for How to install TWRP via script
Update 13.04.2023 /bs
To install Magisk v26.0 or newer the script version 25.01.2023 v2.5.1.0 is necessary.
Unfortunately there is a new feature in Magisk v26.x that prevents the full installation of Magisk from within a booted recovery; from the Magisk docs:
This means that any installation of Magisk v26+ using custom recovery will be incomplete; a subsequent re-installation through the Magisk app after booting up is required.
Click to expand...
Click to collapse
Therefor currently the installation of Magisk v26.x via script without user intervention does not yet work
In Magisk v26.0 the developer changed the code so that it's not possible anymore to install Magisk into the boot partition while booted from a recovery image.
from the Magisk change log:
"This means that any installation of Magisk v26+ using custom recovery will be incomplete; a subsequent re-installation through the Magisk app after booting up is required."
The installation of Magisk v26.x while booted into the recovery (for example using my script install_magisk_via_twrp.sh; see How to install Magisk into the boot partition using script) will succeed but executing the Magisk app after the necessary reboot will end with this dialog:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
After pressing OK in that dialog Magisk will reinstall itself in the boot partition and reboot. And afterwards Magisk works again. But that step needs user intervention.
Without executing this additional step Magisk won't work. There is no way to trigger this reinstallation via an CLI command that is usable in a script (at least I did not found it until now ...)
Unfortunately, Magisk also does not execute the init scripts from /data/adb/post-fs-data.d or /data/adb/service.d in this state.
Therefor the automatic installation of Android, TWRP, Magisk, etc like implemented in the tasks in prepare_phone.include (see How to install and configure the Android OS for details) will fail.
To get around this I added some code to the script install_magisk_via_twrp.sh to support the installation of Magisk v26:
install_magisk_via_twrp.sh version v3.1.0.0 (or newer) can now be used to also install Magisk v26 into the boot partition. There are two new parameter for the script install_magisk_via_twrp.sh to select the method to use for the installation:
oldmethod - install Magisk into the boot partition while booted into a recovery
newmethod - install Magisk into the boot partition image while booted into the Android OS
The installation using the "newmethod" only works if their is a working adb connection to the running Android OS on the phone.
Without one of the two new parameter the script will check the Magisk apk file to detect the necessary method to install Magisk into the boot partition. The default method if no apk file is used is still the old method.
Patching the boot image with Magisk v26 is done using these steps:
boot the phone from a TWRP image
create an image of the boot partition while booted from the TWRP image
copy the boot partition image and the Magisk executables to a directory that can be accessed by the user shell while booted into the Anroid OS
boot the phone into the Android OS
patch the boot partition image using the Magisk binaries (that can be done by the non-root user shell)
reboot the phone from a TWRP image
install the patched boot image via dd or fastboot
To do an automatic installation via script using Magisk v26 I added another task to prepare_phone.include:
install_magisk_v26_in_boot_partition
This task will install Magisk using the new method described above.
Because the installation of Magisk v26 needs a working adb connection the tasks in prepare_phone.include will first install Magisk v25.x and enable adb via Magisk init script like before. After this is done Magisk v26 can be installed via script.
So the new task list to install and configure the Android OS using the tasks in the file prepare_phone.include is:
Bash:
DEFAULT_TASKS="
enable_disable_abort_on_error:enable
boot_phone_from_twrp_image
install_os:noreboot:factory_reset
install_twrp:noreboot:next
#
# first install Magisk v25.x into the boot partition; this installation is necessary to
# enable the access via adb to the phone; the Magisk installation will be overwritten later
# with Magisk v26 or newer
#
install_magisk_in_boot_partition_only:noreboot:next
enable_adb:reboot
#
install_magisk_in_data_adb_only:noreboot:copy_apk
enable_root_access_for_the_shell:reboot
wait_for_access_via_adb:120:kill
#
# the next step is necessary to install Magisk v26 or newer
#
install_magisk_v26_in_boot_partition:active:reboot
install_the_magisk_app
wait_for_access_via_adb:120:kill
enable_disable_abort_on_error:disable
install_essential_scripts
install_essential_apps
install_essential_magisk_modules
enable_root_access_for_apps:reboot
execute_script_on_the_phone:ignorerc
"
To distinguish between the apk files for Magisk v25 and Magisk v26 two new variables must be defined in the config file prepare_phone.conf for the tasks in prepare_phone.include:
Bash:
MAGISK_v26_APK_FILE="/data/backup/Android/EssentialApps/Magisk-v26.1.apk"
MAGISK_v25_APK_FILE="/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk"
see here for the log of an update of Magisk v25 to Magisk v26 via script using the command
Bash:
./prepare_phone.sh install_magisk_v26_in_boot_partition
see here for the log of an automated installation using the tasks in prepare_phone.include with the installation of Magisk v26 using the command
Bash:
./prepare_phone.sh all
Testenvironments for the installation of Magisk v26 via script
an ASUS Zenfone 8 running
OmniROM 13 with MicroG and Magisk v26.1
OmniROM 12 with MicroG and Magisk v26.1
ASUS Android 13 and Magisk v26.1
ASUS Android 12 and Magisk v26.1
LineageOS 19 and Magisk v26.1
All tests were done using TWRP 3.7.0.12