yashsingh1/xdaforums huggingface dataset:
[Magisk] PokeRekoP:
Cannot by all means g**gle or search this, because there's so much on the web with these keywords... outdated or not, I'm lost.

Simple thing probably, but I just don't get it.

Have a stock boot.img for an Android 10 device. Want to patch it with magisk AND disable dm-verity. I cannot do it from twrp, because there is none yet for this device.

From what I read, that should be possible by either

(a) removing the respective tickbox before selecting the image to patch, or

(b) by issuing two lines on the phone before patching the stock boot.img; or

(c) by using magiskboot

I have patched the boot.img with magisk and re-flashed it to the device and I can boot it, and I can gain root in adb shell. "Rooted" okay, but dm-verity is in my way. So I think, well, let's use magisk app on the device to patch the stock boot.img once more AND move that damn dm-verity out of my way.

For (a): In the Magisk App (23.0), there is no tickbox for dm-verity. I only have two, for enforce encryption and recovery mode. Why is the third not there!? I found one tweet (!) saying that it's gone because on newer Android versions (9,10) with ramdisk installations it would cause boot loops - okay, so then "nowadays" magisk can't disable it any longer!?

For (b): I issue these two commands in adb shell as root:

echo 'KEEPVERITY=false' >/cache/.magisk

echo 'KEEPFORCEENCRYPT=false' >>/cache/.magisk

And then I launch the magisk app, select the target stock boot.img, and would expect it to deal with dm-verity for me.

But in the log I find: "Patch with flag KEEPVERITY=[true] KEEPFORCEENCRYPT=[true]"

So, it ignored the cache/.magisk settings. Are they in the wrong place?

For (c): unpacked the stock boot.img with magiskboot; then looked at kernel_dtb with it; then did "export KEEPVERITY=false"; then used magiskboot "patch" to get rid of the "verify" option for /vendor; then re-packed everything; then had the magisk app apply it's normal rooting magic to that pre-patched file; then test-booted it.... et voilá, I can now remount /vendor with "rw", and can create files in there, and they STAY THERE even after rebooting into that same image again. So, at least no bootloop.

What I do not understand: I boot that pre-patched-and-then-magisk-patched boot.img. I remount /vendor rw. I then create a test folder/file in /vendor. I then reboot another magisk-rooted boot.img (in which the magiskboot patch was NOT applied). When, from this boot.img, I look at /vendor, my testfile is NOT there. I was under the impression that I wrote that test file to a dedicated partition, and once I did that, the file should be there no matter which boot.img (Stock, normal magisk-rooted, or pre-patched-no-verify-then-magisk-patched) I use.

I'm lost.

And: I would like to find an easier way, so that others can get to the result much easier. Any ideas?
[Magisk] RandomPooka:
So, I'm late to this party. How do I switch from last johnwu canary build to the alpha builds? And do I even need to if nothing is broken with the canary build for me?
[Magisk] 73sydney:
fwiw i updated to 1eb83ad8-alpha-19 (from the previous alpha) by:

unhiding magisk app

installing 1eb83ad8-alpha-19

direct install

reboot

re-hide magisk app

so the standard way works too :):p
[Magisk] ipdev:
To manually remove Magisk (or anything) is the reverse of the install.

The uninstall option will remove the app and all files related to Magisk.

To uninstall manually, you just have to do it manually. ;)

A while back I gave an example on how to do it while booted into system with Magisk active. - Link

If you have a custom recovery (TWRP) that allows mounting and modifying the data partition.

While booted into system (ROM).

To uninstall the app using the App Info section.

Normally long-press the icon and you will get an option for info or, go though system setting, Apps.

Use app info to Force stop, clear cache and data then uninstall the magisk app.

Boot into recovery (TWRP).

Mount data and delete the magisk related file in the /data/adb directory

You can remove the adb directory if it is not part of your stock system.

There might be a few extra magisk files in /data (magisk backup files).

If you installed magisk by flashing in recovery and you ROM supports addon.d scripts, there will be a Magisk script in the /system/addon.d directory.

Then you need to replace the boot image with the stock image.

Non-modified version from the ROM you are running.

You can do this in TWRP by using the Install option and selecting Image file.

TWRP will ask what partition to flash the image to.

Then reboot to system.​

You can do it using fastboot.

Boot into bootloader.

fastboot flash boot NameOfStockBoot.img

fastboot reboot​

Be Careful.

There are always risks involved when you start messing around with a device.

If something goes wrong, you may end up with a non-working "bricked" device.

Backup what you want to save and store it off device.

Copy it to your computer, cloud storage, USB, ...

Cheers. :cowboy:
[Magisk] pndwal:
Latest build notice:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85350767

See 'earlier notes' there.

For initial installation you need to download Alpha apk and install as per my note / link.

Uninstall John Wu App if it won't install... I didn't need to, some did. 👍 PW

What do they say, 'if it ain't broke don't fix it' right? ... Others just go for broke! 😜 PW
[Magisk] pndwal:
Yup, John hid options not needed for a particular device to reduce issues resulting from improper use by inexperienced users! 😜

You clearly know more about this than I do, but in case you haven't checked official docs for Magisk tools like magiskboot, it documents it's cpio commands etc, eg:

patch

Apply ramdisk patches

Configure with env variables: KEEPVERITY KEEPFORCEENCRYPT

https://topjohnwu.github.io/Magisk/tools.html#magiskboot 👍 PW
[Magisk] dr4go:
Funny, I did exactly the same. But you forgot to mention the 2nd step: uninstall magisk app.
[Magisk] 73sydney:
I didnt uninstall the magisk app, merely unhid it....uninstall was unnecessary

i was going from the previous alpha to the latest...

fwiw i updated to 1eb83ad8-alpha-19 (from the previous alpha)

perhaps you were on a previous release of johns, not alpha?
[Magisk] dr4go:
My bad, that is correct. That's why the signature wasn't the same and I needed to uninstall it first.
[Magisk] 73sydney:
Exactly for people like me :)

fiddle fiddle fiddle....
[Magisk] PokeRekoP:
Thanks for the reply. As I said under (c), Yes, I did find out about magiskboot. Did not need the cpio stuff though, as I couldn't locate any cpio after unpacking the stock boot.img. Hence only used the dtb directed patch option, and that works. Still a very complicated way "for the inexperienced user" (which I still consider myself). No offence meant of course! 2^64 kudos to John!
[Magisk] pndwal:
Thanks for the extra info! 🙂

FWIW, if John hadn't been fielding so many complaints you might still have had your way!...

www.twitter.com/topjohnwu/status/1056664171058741249

He did get frustrated (several times restricted issue posting to colaborators etc) with non-issue reports. 😕...

This type of thing:

https://github.com/topjohnwu/Magisk/issues/2103#issuecomment-557536658

Guess you saw this:

Disabling dm-verity and forced encryption​

If you on the other hand want to disable either dm-verity or forced encryption, you can go about it the same way as described above. If you're using the .magisk file method, just change KEEPVERITY and/or KEEPFORCEENCRYPT in the commands to false:

echo KEEPVERITY=false>>/data/.magisk

echo KEEPFORCEENCRYPT=false>>/data/.magisk

If you can't access /data (TWRP can't decrypt, etc) you can instead use either /cache/.magisk or/system/.magisk, but please note that using /system/.magisk isn't systemless.

If disabling verity through Magisk doesn't help, you can try the following command (provided that your device has a vbmeta.img):

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

- Did you try "fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img" (if has a vbmeta.img)?

(Nb. Some devices won't boot w/ Preserve AVB 2.0/dm-verity disabled:

Preserve AVB 2.0/dm-verity​

... Since we do want to tamper with the system, most devices want to disable this when installing Magisk. But, there are those devices that need it to still be enabled or they won't boot.) PW
[Magisk] pndwal:
https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85353695 PW
[Magisk] zgfg:
Download and instructions already posted (and links to the same repeated many times), plus several posts with (additional) comments about Alpha and its installation -

simply search for Alpha in this thread or take a time and read through the few pages back
[Magisk] jons99:
so there's a new alpha works well so far on android 12 the changelog say:

If the kernel is greater than or equal to 4.7, this version will use private devpts to bypass some application detection, such as HSBC

(translated from chinese)
[Magisk] PokeRekoP:
@pndwal : Thank you for the extra info :)

I looked at the vbmeta way: did a "dd" (from within the rooted system) of the vbmeta partition to first see what is in there and have a backup. But the dump contained !! all zeros !! only. Strange?! Any thoughts on that? Won't try flashing a modified (i.e. by using the command to create a properly formatted, deliberately "empty") vbmeta.img without having a backup.

If vbmeta is corrupted, into what mode would the device boot? Bootloader? Recovery? Didn't make EDL cable yet, don't want to go down to those very trenches if I don't have to... no fun to brick wife's gadget... ;-)
[Magisk] pndwal:
Thanks!

Alpha now uploaded to Telegram.

For those with Bank apps etc detecting 'root', Dev posted this re new hiding function (mentioned above). Chinese Translated:

Magisk alpha

If the kernel is greater than or equal to 4.7, this version will use private devpts to bypass some application detection, such as HSBC

Nb. 4.7 includes some Oreo and above

Nb.2. Target SDK (API) is bumped to 31

A Magisk / Android 12 thread:

https://xdaforums.com/t/guide-flash-magisk-on-android-12.4242959/

Changelog / notes / links here:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85350767

👍 PW
[Magisk] RandomPooka:
That addresses installation, thanks. But not the question of necessity.
[Magisk] timofonic:
What's better about this Magisk fork?

How to install it? I can't do it.

Installing the apk doesn't work, I suspected it...

https://raw.githubusercontent.com/vvb2060/magisk_files/master/app-release.apk

I don't want to use Telegram. I'm quite minimalist at communicating, to say it very politely. XDA, Discord, email and WhatsApp is ALL I use.

https://raw.githubusercontent.com/vvb2060/magisk_files/master/app-release.apk

I added this url as custom channel, no luck. "Error downloading file", all the damn time.

https://raw.githubusercontent.com/vvb2060/magisk_files/alpha/alpha.json
[Magisk] pndwal:
I think flashing empty vbmeta to disable is fairly standard practice, not that I've done it. Recommend keeping backup though.

Magisk itself "fixes" vbmeta for some devices. Eg:

Post in thread 'Magisk - The Magic Mask for Android' https://xdaforums.com/t/magisk-the-magic-mask-for-android.3473445/post-80754215

Some need this to gain root at all it seems:

https://xdaforums.com/t/root-gained.4290689/

Here's a useful thread (about 'googling it' 😜):

https://xdaforums.com/t/what-is-vbmeta-img.3931588/

Tech link from that:

https://android.googlesource.com/pl...552a53d9dcd85ff404156422d935ebdb1a4/README.md

PW
[Magisk] pndwal:
Necessity is in the eye of the beholder 😜...

Or was that The Mother of Invention?

Anyway, you can go from here; may give some reasons:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85358265

Then check last link ('earlier notes' for initial installation). Read Changelog...

Then you tell us! ... But, as I've said, if it ain't broke (for you), don't fix it... Or was that Go for Broke!? 😉 PW
[Magisk] pndwal:
Please see post above. PW
[Magisk] midgo12:
So I have updated to the alpha version after uninstalling the old version of the app.

It shows that I am on alpha lite.

Is that where I should stay?

Will this update as necessary on its own or do I have to check somewhere constantly?

Also when I start rooted apps it shows that they have superuser access without me granting it.

There is nothing showing in the superuser access area as well.

Any advice on this appreciated...
[Magisk] ipdev:
I have never tested but, I have seen it mentioned to flash empty vbmeta.img in a few different threads.

You should be able to pull vbmeta from a factory stock update or full factory image zip.

If you are using a custom ROM that builds vbmeta, then it very well might be an empty image.

As someone who dumps partitions often..

I have never had an issue were the dump was different than what was truly in the partition.

If the partition was populated with something, the image was also. If the partition was empty the image was also.

I use the actual partition number not name.

For example vbmeta -> /dev/block/sde8

adb shell su -c "dd if=/dev/block/sde8 of=/sdcard/beryllium-vbmeta.img"
adb pull /sdcard/beryllium-vbmeta.img
adb rm /sdcard/beryllium-vbmeta.img

---

From the flashing instructions for AOSP GSI.

A method for disabling verify boot (for example, vboot 1.0 or AVB)

2. Disable verify boot (AVB) by flashing vbmeta.img:

$ fastboot --disable-verification flash vbmeta vbmeta.img​

Requirements for flashing GSIs - source.android - Link

When in doubt, check the source. :sneaky:

I thought there was mention of an empty vbmeta, now that I type this, maybe it was the developer SDK31 builds. :unsure:​

​

Cheers. :cowboy:
[Magisk] pndwal:
Well I'm afraid you've downloaded wrong Magisk! ... 😕

Lite behaves very differently to regular Magisk. It's only for those desperate to test new ways of circumventing Bank apps etc newly detecting isolated processes really.

You need regular Alpha; basically Canary W/ extra fixes... See my last posts directly above. 🙂 PW

Because of the confusion, see:

Alpha (aka Canary w/ extra fixes):

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85350767

Lite (Avoid it or READ NOTES if you don't understand it's aim):

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85226953
[Magisk] midgo12:
I used a link in this thread.

This one(https://raw.githubusercontent.com/vvb2060/magisk_files/master/app-release.apk)

Please show me the correct version to download...
[Magisk] pndwal:
Which post?

Too quick!... Please check my post again 😉 PW

Edit: Seems you just need to change branch to Alpha. Master = Lite, as you'll see if you check json.
[Magisk] starsfighter:
thanks all for the great knowledge sharing with me i managed to slove the problem with your help and now I will stay with version 21.4 till new update,

#same problem with same device found in github.

[ERROR] Magisk Manager 22.0+ doesn't detect Magisk installation on J3 2016 (SM-J320H) · Issue #4495 · topjohnwu/Magisk

Device: SM-J320H Android version: 5.1.1 Magisk version name: V23 Magisk version code: 23001 Hi, good evening, sorry for the inconvenience, I am having trouble installing Magisk with a Samsung J3 (S...

github.com
[Magisk] midgo12:
I used the telegram link and now they have alpha 20.

I downloaded this one and installed it and it works fine.

I changed the channel to Alpha.

Will I now be advised whenever there is an update.

All the apps that had previous superuser access are showing again.

Safety net works as well.
[Magisk] pndwal:
That's addressed in notes in link I gave you and others above ('current notes') 👀 PW
[Magisk] midgo12:
Looks like I will follow the Telegram channel to keep up to date.

Too bad I can't read Chinese://
[Magisk] pndwal:
Ah, thanks; latest is not yet uploaded to GitHub, and Latest still shows as 19. Just manually updated mine to 20.

Still confused by your 'Alpha Lite' however; different link?

Should show latest on GitHub; might show UPDATE if made to check new version suffix, but till now hasn't done so as still checking for topjohnwu VersionCode which remained 23001 thru each update.

Will see version suffix changes for Latest however, but only when vvb2060 updates his GitHub...

But last telegram posts indicate he is hoping for user logs etc thru Telegram. 😛

Mine too. 👍 PW
[Magisk] pndwal:
You can select multiple (all) posts in a conversation (sub thread), copy and paste to Google Translate.

You can view main thread (only it seems) in Chrome and click Translate.

That's what I do. 👍 PW
[Magisk] zgfg:
If your Canary is not 'broken' it's up to you to decide do you want or not to try Alpha

However, if you did take your time to read all posts in this thread about Alpha, you will see that they also address the questions of 'necessity' - like who is vvb2060 (developer of Magisk Alpha and Lite), about his commits (improvements in Alpha compared to Stable/Canary), but also the facts that he has only a Chinese Telegram channel (not participating on XDA and not providing support through Github Issues), that notifications about his Alpha updates do not work since his releases still use the same version number 23001, etc - again, read the whole story about Alpha that was already discussed here (goodies and risks) and decide is it 'neccessary' for you to move on or not
[Magisk] zgfg:
Please read the previous posts about Alpha (and Lite).

For example, @pndwal provided a link to read Alpha (and Lite) Telegram channels through Chrome, where you can use its (auto)Translate functionality

Magisk alpha

t.me
[Magisk] zgfg:
Yeah

And still the same results with his Magisk Detector
[Magisk] _KNT_:
Disclaimer: I'm blindly trying to fix the boot.img not knowing exactly how to do it or what tools to use. Also a copy-paste from my Reddit post [0]

I'm suffering from a bug, that bootloops my Xperia 10 II after flashing the patched image [1]. Wanted to try the solution about removing `/system_ext` from the `fstab`. I've downloaded the ROM, unSINned the boot image, patched on the device, downloaded, used `unpackbootimg` [2].

Now I got a `magisk_patched-23000_XxXxX.img-ramdisk.gz`, which is a gzipped cpio archive ASFAIU. So

❯ gzip -dc ../magisk_patched-23000_yJMIs.img-ramdisk.gz | LANG=C cpio -imd
cpio: .backup/.magisk: Cannot open: Permission denied
cpio: .backup/.rmlist: Cannot open: Permission denied
cpio: .backup/init: Cannot open: Permission denied

❯ LANG=C ls -hal .backup
ls: cannot open directory '.backup': Permission denied

❯ LANG=C ls -hal
total 360K
drwxrwxr-x 10 dzwiedziu dzwiedziu 4.0K Jul 20 23:01 .
drwxrwxr-x 3 dzwiedziu dzwiedziu 4.0K Jul 20 23:01 ..
d--------- 2 dzwiedziu dzwiedziu 4.0K Jan 1 1970 .backup
drwxr-xr-x 2 dzwiedziu dzwiedziu 4.0K Jan 1 1970 avb
drwxr-xr-x 2 dzwiedziu dzwiedziu 4.0K Jan 1 1970 debug_ramdisk
drwxr-xr-x 2 dzwiedziu dzwiedziu 4.0K Jan 1 1970 dev
-rw-r----- 1 dzwiedziu dzwiedziu 5.3K Jan 1 1970 fstab.default
-rw-r----- 1 dzwiedziu dzwiedziu 5.5K Jan 1 1970 fstab.emmc
-rwxr-x--- 1 dzwiedziu dzwiedziu 302K Jan 1 1970 init
drwxr-xr-x 2 dzwiedziu dzwiedziu 4.0K Jan 1 1970 mnt
drwxr-x--- 3 dzwiedziu dzwiedziu 4.0K Jan 1 1970 overlay.d
drwxr-xr-x 2 dzwiedziu dzwiedziu 4.0K Jan 1 1970 proc
drwxr-xr-x 2 dzwiedziu dzwiedziu 4.0K Jan 1 1970 sys

As you can see the `.backup` directory is created with no permissions. Now I can change the permissions, but I can't be sure right now if will that break something on repacking (which I still don't know how to do \^_\^''''').

[0]

https://www.reddit.com/r/Magisk/comments/ooqns2
[1] https://github.com/topjohnwu/Magisk/issues/3752

[2] https://github.com/anestisb/android-unpackbootimg
[Magisk] F308:
Permission is the smallest problem.

You always can revert your action.

Do you run those commands on phone or computer?

Are you running them as root?
[Magisk] timofonic:
I thought you were the developer, sorry.

It's a shame people prefers Telegram. I get tired of that so spammy conversation systems, just use it for individual communications.

Also, Telegram is not so much better than WhatsApp to change to it. Client and protocol are Open Source, but it's a centralized system.

I'll try to read about how to update. I feel stupid, because you refer to abofe posts and can't understand where the information is. Maybe it's because there's too much hot here and some current health issues I have.

I don't understand why the developer uses Chinese. English is International.
[Magisk] jons99:
don't worry about the telegram group it's all chinese anyway stay tuned to this thread and you'll get all the information you need about updates and whatnot
[Magisk] Homeboy76:
Open the link below in Chrome select translate and you can read it. :)

vvb2060 alpha

Thanks @pndwal!
[Magisk] zputnyq:
Probably android image kitchen could help to easily unpack & repack your device's boot.img.

[TOOL] Android Image Kitchen - Unpack/Repack Kernel Ramdisk [Win/Android/Linux/Mac]

Android Image Kitchen -- Unpack/Repack Kernel+Recovery Images, and Edit the ramdisk. Windows ports of the necessary Linux utils for Android image (kernel/recovery) mod work: mkbootimg, unpackbootimg: https://github.com/osm0sis/mkbootimg...

xdaforums.com
[Magisk] _KNT_:
Computer and I don't run such stuff as root. However `fakeroot` to the rescue:

❯ gzip -dc ../magisk_patched-23000_yJMIs.img-ramdisk.gz | LANG=C fakeroot cpio -imd
cpio: avb/q-gsi.avbpubkey not created: newer or same age version exists
cpio: avb/r-gsi.avbpubkey not created: newer or same age version exists
cpio: avb/s-gsi.avbpubkey not created: newer or same age version exists
cpio: fstab.default not created: newer or same age version exists
cpio: fstab.emmc not created: newer or same age version exists
cpio: init not created: newer or same age version exists
cpio: overlay.d/sbin/magisk32.xz not created: newer or same age version exists
cpio: overlay.d/sbin/magisk64.xz not created: newer or same age version exists
3888 blocks
❯ ls
avb debug_ramdisk dev fstab.default fstab.emmc init mnt overlay.d proc sys
❯ ls .backup
init
❯ ls .backup -hal
razem 1,5M
drwx------ 2 dzwiedziu dzwiedziu 4,0K lip 21 22:27 .
drwxrwxr-x 10 dzwiedziu dzwiedziu 4,0K lip 20 23:01 ..
-rwxr-x--- 1 dzwiedziu dzwiedziu 1,5M sty 1 1970 init
-rw------- 1 dzwiedziu dzwiedziu 103 sty 1 1970 .magisk
-rw------- 1 dzwiedziu dzwiedziu 79 sty 1 1970 .rmlist
╭─   ~/Softwarez/Android/XQ-AU52/magisk_patched-23000_yJMIs/ramdisk ─

Allright, I'll try it. Especially I've found the Github repo, but did not find the thread with all the instructions for dependencies. If I don't come back, then consider the matter solved ,)
[Magisk] J.Michael:
I suspect the developer uses Chinese to honor his parents, who spoke Chinese when he was a child.
[Magisk] timofonic:
That's nice! It's a good sentimental reason, but a barrier for us. I'm Spanish and I use English to ease communication, despite it's not my native language.

I would like to learn Chinese someday, anyway. It's an interesting language and culture.

But he works on his free time, for free and for us. So I thank a lot for his efforts.

I'm interested in hiding Magisk from bank apps, but want all the features too ;)

I would love Magisk to become a community project. It's an essential part of the Android geek community. But I have not the resources nor the skills to make it happen for now, so I could only say my feelings and opinions until someday I'm able to contribute back. I may become a betatester soon and that's a way to humbly contribute back, but developers may make it easier IMHO.