Magisk addon.d script? - Magisk

Is there anyway someone can make an addon.d script for both magisk and the phh root? There's a similar script that you can find here that does this for xposed. Also, the Gapps use it. This would be very helpful so we don't have to reflash the scripts everytime.

Link_of_Hyrule said:
Is there anyway someone can make an addon.d script for both magisk and the phh root? There's a similar script that you can find here that does this for xposed. Also, the Gapps use it. This would be very helpful so we don't have to reflash the scripts everytime.
Click to expand...
Click to collapse
Ummm...
That makes no sense...
The magisk.img is in data... Survives dirty flash... The magical part of magisk... Is injected into the boot.img... Which, afaik, isn't possible via addon.d

Link_of_Hyrule said:
Is there anyway someone can make an addon.d script for both magisk and the phh root? There's a similar script that you can find here that does this for xposed. Also, the Gapps use it. This would be very helpful so we don't have to reflash the scripts everytime.
Click to expand...
Click to collapse
That makes no sense like the other guy said & only works with ROMs that have implemented that function (generally update-script that calls a script in root of the zip in CyanogenMods). If you install any ROM that have not that function, then nothing is backed up & /system is replaced as regular.

Addon.d is simply a folder with .sh scripts that are run when flashing a new rom update. Obviously, this won't work with stock roms but it should work for Lineage OS and similar roms I think. Sadly I don't know how to write .sh scripts.

Link_of_Hyrule said:
Addon.d is simply a folder with .sh scripts that are run when flashing a new rom update. Obviously, this won't work with stock roms but it should work for Lineage OS and similar roms I think. Sadly I don't know how to write .sh scripts.
Click to expand...
Click to collapse
Learn Bash, is easy to do like check how works other .sh scripts or if you are lazy search tutorials in Google xD...

Old thread, but I just discovered this "Flash After Update" script (actually @osm0sis pointed it out to me) which will flash any zip in a designated folder after flashing rom update.
osm0sis said:
99-flashafterupdate.sh addon.d script (many devices) - attached
For ROMs that don't have "Flash After Update" support built into their delta/update process. During an upgrade, this script will flash zips from a sdcard directory after all other addon.d backup/restore actions have completed. This can be used to flash SuperSU and then an AnyKernel2 kernel on CyanogenMod, for example. Remove the .txt extension once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
Click to expand...
Click to collapse
Especially handy if you keep your device unrooted, and can't use a tool such as this:
https://play.google.com/store/apps/details?id=se.davison.autoflasher

Link_of_Hyrule said:
Is there anyway someone can make an addon.d script for both magisk and the phh root? There's a similar script that you can find here that does this for xposed. Also, the Gapps use it. This would be very helpful so we don't have to reflash the scripts everytime.
Click to expand...
Click to collapse
Have a look at this:
https://github.com/topjohnwu/Magisk/issues/175

So is he integration the feature directly into Magisk?
Why don't you submit the changes as a pull request?
Edit: Tested the script. I can use the official Lineage OS updater now! No need for a third party app to auto flash Magisk want update.
Sent from my Nexus 7 using Tapatalk

Related

Xposed Installer destroyed my Toshiba AT300SE rooted

I installed Xposed Installer (v2.6.1) on my rooted Toshiba AT300SE (Excite 10 SE) with AOSP JB on it.
After installation device rebooted and now stuck on boot loop.
Any suggestion to get out of this.
Restore the backup that you should have made before installing the Xposed framework, or flash the Xposed disabler zip from recovery. Or read the FAQ.
Sent from my C6603 using Tapatalk
kingvortex said:
Restore the backup that you should have made before installing the Xposed framework, or flash the Xposed disabler zip from recovery. Or read the FAQ.
Sent from my C6603 using Tapatalk
Click to expand...
Click to collapse
i'll try this
kingvortex said:
Restore the backup that you should have made before installing the Xposed framework, or flash the Xposed disabler zip from recovery. Or read the FAQ.
Sent from my C6603 using Tapatalk
Click to expand...
Click to collapse
Seems that disabler zip did not work.
Any other brilliant ideas................
Rooks said:
Seems that disabler zip did not work.
Any other brilliant ideas................
Click to expand...
Click to collapse
Yes, plenty, but your sarcasm precludes me from sharing them with you.
Read the FAQ and/or other pinned threads in this section.
I won't reply in this thread again. Have a good day.
Sent from my C6603 using Tapatalk
kingvortex said:
Yes, plenty, but your sarcasm precludes me from sharing them with you.
Read the FAQ and/or other pinned threads in this section.
I won't reply in this thread again. Have a good day.
Sent from my C6603 using Tapatalk
Click to expand...
Click to collapse
Well it's nice to share something.
.
.
.
.
.
.
.
If it's helpful for someone.
Rooks said:
Well it's nice to share something.
.
.
.
.
.
.
.
If it's helpful for someone.
Click to expand...
Click to collapse
Sadly, not many people around here possess a crystal ball to determine what may be helpful to you on advance. If it didn't help you, just say so politely.
If the Xposed disabler zip didn't work, you probably want to make sure it flashed correctly. You can also use adb to disable the Xposed framework if that still doesn't work out for you.
Rooks said:
Seems that disabler zip did not work.
Any other brilliant ideas................
Click to expand...
Click to collapse
Only brilliant idea here was flashing something before backing up your rom.
Sent from my Nexus 5 using Tapatalk
GermainZ said:
Sadly, not many people around here possess a crystal ball to determine what may be helpful to you on advance. If it didn't help you, just say so politely.
If the Xposed disabler zip didn't work, you probably want to make sure it flashed correctly. You can also use adb to disable the Xposed framework if that still doesn't work out for you.
Click to expand...
Click to collapse
I did not mean to be rude or ANY disrespect.
So guys, PLEASE point me to right direction so that i can bring back my device.
rovo89 said:
In case you get into a boot loop:
First, try using the safemode by pressing any hardware key repeatedly. You can find a short explanation how it works here.
If that doesn't work, you can flash the attached Xposed-Disabler-Recovery.zip by Tungstwenty. It will be copied to your (external) SD card when you install Xposed as well. The only thing it does is copying /system/bin/app_process.orig back to /system/bin/app_process, which you can also do yourself (e.g. with adb shell in recovery mode).
Click to expand...
Click to collapse
http://forum.xda-developers.com/xposed/xposed-installer-versions-changelog-t2714053
rovo89 said:
http://forum.xda-developers.com/xposed/xposed-installer-versions-changelog-t2714053
Click to expand...
Click to collapse
Where can i find disabler zip file?
I downloaded some files from web (all around 1.2kb in size) and all these have only one folder "meta-inf", nothing else.
Rooks said:
Where can i find disabler zip file?
Click to expand...
Click to collapse
From the linked post:
If that doesn't work, you can flash the attached Xposed-Disabler-Recovery.zip by Tungstwenty. It will be copied to your (external) SD card when you install Xposed as well. The only thing it does is copying /system/bin/app_process.orig back to /system/bin/app_process, which you can also do yourself (e.g. with adb shell in recovery mode).
Click to expand...
Click to collapse
Rooks said:
I downloaded some files from web (all around 1.2kb in size) and all these have only one folder "meta-inf", nothing else.
Click to expand...
Click to collapse
Assuming it doesn't work for one reason or the other, you can do this (also from the linked post):
The only thing it does is copying /system/bin/app_process.orig back to /system/bin/app_process, which you can also do yourself (e.g. with adb shell in recovery mode).
Click to expand...
Click to collapse
GermainZ said:
From the linked post:
Assuming it doesn't work for one reason or the other, you can do this (also from the linked post):
Click to expand...
Click to collapse
Yes i've tried three different files, all failed to install.
Guess i've no choice left except adb.
Rooks said:
Yes i've tried three different files, all failed to install.
Guess i've no choice left except adb.
Click to expand...
Click to collapse
You may also want to grab a logcat of the boot loop (also using adb), BTW. That way, the issue might actually be identified and possibly resolved in the future.
Rooks said:
Yes i've tried three different files, all failed to install.
Click to expand...
Click to collapse
You should mainly try the one attached to the other thread... But it will only work on a custom recovery (CWM/TWRP). Not sure, but yours looks more like a stock recovery.
Also, did you try pressing a key many times as written in my quote?
Rooks said:
Where can i find disabler zip file?
I downloaded some file from web (all around 1.2kb in size) and all these have only one folder "meta-inf", nothing else.
Click to expand...
Click to collapse
Uninstaller performs only one move operation (or a copy operation plus delete operation) which is being performed on the files which already exist in the device. No need of involving external files, so the only dir in the zip is the one containg updater-binary file ie. META-INF. binary can be a simple, single-liner shell script which triggers basic shell command performing required, trivial operation. As most custom recoveries accept unsigned zips so signing it is not really required, resulting flashable woulď be a zip file containing singłe no more than 100bytes long file placed in a an empty subdir.
12kb size of such a zip shall be considered as a nothing that you should worry about then.
Probably u are running stock recovery which cąnnot flash zips signeď by anyone except a producer. It is also possible that the screenshots come from the older custom recovery, afair primer builds of cwm-based recoveries looked very similiar to stock ones. In thąt case the only reason of failure that I may think of is the fact that earlier versions of cwm did not neccessary provide a possibility to flash unsigned zips; didn't check but maybe uninstaller zip created by the installer is not signed (which I didnt check so I might be wrong; modern recoveries are flashing zips with no signature without any problems by default but less popular devices might be forced to use a version compiled by someone once ąnd never maintained = the only available). You may want to check if there is any option in your CWM that will enablę flashing such a zips and if it isnt possible, sign the zips on your own using any key, even a test one included to signapk.jar.
GermainZ said:
You may also want to grab a logcat of the boot loop (also using adb), BTW. That way, the issue might actually be identified and possibly resolved in the future.
Click to expand...
Click to collapse
I'll try to get logcat for this issue.
rovo89 said:
You should mainly try the one attached to the other thread... But it will only work on a custom recovery (CWM/TWRP). Not sure, but yours looks more like a stock recovery.
Also, did you try pressing a key many times as written in my quote?
Click to expand...
Click to collapse
Yes, it's the stock recovery and i've tried several times with hardware keys but safe mode did not work in my scenario.
esgie said:
Uninstaller performs only one move operation (or a copy operation plus delete operation) which is being performed on the files which already exist in the device. No need of involving external files, so the only dir in the zip is the one containg updater-binary file ie. META-INF. binary can be a simple, single-liner shell script which triggers basic shell command performing required, trivial operation. As most custom recoveries accept unsigned zips so signing it is not really required, resulting flashable woulď be a zip file containing singłe no more than 100bytes long file placed in a an empty subdir.
12kb size of such a zip shall be considered as a nothing that you should worry about then.
Probably u are running stock recovery which cąnnot flash zips signeď by anyone except a producer. It is also possible that the screenshots come from the older custom recovery, afair primer builds of cwm-based recoveries looked very similiar to stock ones. In thąt case the only reason of failure that I may think of is the fact that earlier versions of cwm did not neccessary provide a possibility to flash unsigned zips; didn't check but maybe uninstaller zip created by the installer is not signed (which I didnt check so I might be wrong; modern recoveries are flashing zips with no signature without any problems by default but less popular devices might be forced to use a version compiled by someone once ąnd never maintained = the only available). You may want to check if there is any option in your CWM that will enablę flashing such a zips and if it isnt possible, sign the zips on your own using any key, even a test one included to signapk.jar.
Click to expand...
Click to collapse
I've tried three different file with different sizes (143kb, 121kb and 145kb), all these files include the same script ("updater-script" file) by Tungswenty.
ui_print("");
ui_print("");
ui_print("------------------------");
ui_print(" Xposed disabler tool ");
ui_print(" by Tungswenty ");
ui_print("------------------------");
ui_print("");
ui_print("Mounting system partition");
ifelse(!is_mounted("/system"),
run_program("/sbin/busybox", "mount", "/system"));
assert(is_mounted("/system"));
ifelse(run_program("/system/bin/sh", "-c", "test -f /system/bin/app_process.orig") == 0,
(
ui_print("Restoring the original app_process file");
assert(run_program("/sbin/busybox", "cp", "-a", "/system/bin/app_process.orig", "/system/bin/app_process"));
set_perm(0, 2000, 0755, "/system/bin/app_process");
ui_print("Restore complete.");
ui_print("You should now be able to boot normally and remove all traces of Xposed from within the Installer app.");
),
(
ui_print("No backup found for app_process, nothing to be performed!");
));
ui_print("");
ui_print("Done.");
ui_print("");
Click to expand...
Click to collapse
Rooks said:
Yes, it's the stock recovery
Click to expand...
Click to collapse
Then you can stop trying any flashable zips, they won't work on stock recovery.
If you can install a custom recovery, that should help. Or flashing only the /system partition of your ROM again. Or check if you can execute "adb shell id" and post the result (should show whether you get root access in recovery to perform the steps manually).
rovo89 said:
Then you can stop trying any flashable zips, they won't work on stock recovery.
If you can install a custom recovery, that should help. Or flashing only the /system partition of your ROM again. Or check if you can execute "adb shell id" and post the result (should show whether you get root access in recovery to perform the steps manually).
Click to expand...
Click to collapse
I've stock rom and recovery, there is no custom rom or recovery available for my device (Toshiba Excite 10 SE aka AT300SE).
So with stock rom and recovery it won't accept any zips and i can't format system partition with stock recovery. And about adb, i don't know where to start. In recovery there is an option to push a file through adb but when i connect my device while this option, my pc does not recognize the device, neither i can update the adb drivers.
Rooks said:
I installed Xposed Installer (v2.6.1) on my rooted Toshiba AT300SE (Excite 10 SE) with AOSP JB on it.
After installation device rebooted and now stuck on boot loop.
Any suggestion to get out of this.
Click to expand...
Click to collapse
HOW YOU ROOT...???!!!
PLEASE TELL ME
I CANT FIND IN WEB....
Give me a links if you can ....
THANKS

[solved] Uninstall Magisk module offline/without Magisk?

(other thread here)
It seems that a Magisk module that I have recent installed (no idea which one) is preventing my phone to boot correctly. I know that because reflashing the latest OTA update removes Magisk and then it works perfectly. As soon as I flash Magisk, it doesn't boot anymore.
Even after flashing SuperSU, Magisk Manager doesn't let me see/remove installed modules.
Is there a way to do that?
zdimension said:
(other thread here)
It seems that a Magisk module that I have recent installed (no idea which one) is preventing my phone to boot correctly. I know that because reflashing the latest OTA update removes Magisk and then it works perfectly. As soon as I flash Magisk, it doesn't boot anymore.
Even after flashing SuperSU, Magisk Manager doesn't let me see/remove installed modules.
Is there a way to do that?
Click to expand...
Click to collapse
Use mount-magisk.zip found in collection of modules thread and delete the folder via twrp in /magisk
@duxishere Thanks so much!
I searched for "Magisk module offline uninstall" but did find anything. This was exactly what I needed! The culprit was App Systemizer. I've had it installed for some time and it didn't cause any problems. I uninstalled it, and it worked! Flashing it again restored the boot problem.
zdimension said:
@duxishere Thanks so much!
I searched for "Magisk module offline uninstall" but did find anything. This was exactly what I needed! The culprit was App Systemizer. I've had it installed for some time and it didn't cause any problems. I uninstalled it, and it worked! Flashing it again restored the boot problem.
Click to expand...
Click to collapse
How did you uninstalled the troubled module?
I'm having the same problem with a module but I don't even have a /magisk folder.
gonsa said:
How did you uninstalled the troubled module?
I'm having the same problem with a module but I don't even have a /magisk folder.
Click to expand...
Click to collapse
Start reading the thread from the beginning and you'll find it.
gonsa said:
How did you uninstalled the troubled module?
I'm having the same problem with a module but I don't even have a /magisk folder.
Click to expand...
Click to collapse
Install "Uninstaller Mod Magisk" from TWRP. Then go in the TWRP terminal and type uninmod_magisk and follow the instructions.
please post the link to thread unistaller magisk module, to other users follow the solution!
edit:
there is https://forum.xda-developers.com/showpost.php?p=72542167&postcount=242
nodio said:
please post the link to thread unistaller magisk module, to other users follow the solution!
edit:
there is https://forum.xda-developers.com/showpost.php?p=72542167&postcount=242
Click to expand...
Click to collapse
Not working for me!
I will uninstall "Audio Compatibility Patch" V1.0 from zackptg5 & ahrion
In Magisk Manger Status is always " Module will be updated at the next start"
If i use the "TWRP-Uninstaller" the Modul is not in List!
dewois said:
Not working for me!
I will uninstall "Audio Compatibility Pach" V1.0 from zackptg5 & ahrion
In Magisk Manger Status is always " Module will be updated at the next start"
If i use the "TWRP-Uninstaller" the Modul is not in List!
Click to expand...
Click to collapse
https://www.didgeridoohan.com/magisk/Magisk#hn_Module_will_be_updated_at_next_reboot
Didgeridoohan said:
https://www.didgeridoohan.com/magisk/Magisk#hn_Module_will_be_updated_at_next_reboot
Click to expand...
Click to collapse
".... Go the module folder under /sbin/.core/img ..."
I dont have this folder in /sbin!
tobi14 said:
".... Go the module folder under /sbin/.core/img ..."
I dont have this folder in /sbin!
Click to expand...
Click to collapse
If you have a current version of Magisk installed, yes you do. Enable viewing hidden files and folders in your file explorer. The dot at the beginning of the folder name means it's hidden...
zdimension said:
(other thread here)
It seems that a Magisk module that I have recent installed (no idea which one) is preventing my phone to boot correctly. I know that because reflashing the latest OTA update removes Magisk and then it works perfectly. As soon as I flash Magisk, it doesn't boot anymore.
Even after flashing SuperSU, Magisk Manager doesn't let me see/remove installed modules.
Is there a way to do that?
Click to expand...
Click to collapse
If you can launch TWRP then :
Check magisk.img exist
1. Go to "advanced" and then click on "File Explorer".
2. Check there is "magisk.img" file under "/data"
Backup magisk.img
1. Go to "advanced" and then click on "terminal command".
2. type following command
Code:
cp /data/magisk.img /data/magisk.img.bk
Mount magisk.img
1. Make a temp folder
Code:
mkdir /mktmp
2. Mount magisk.img to /mktmp
Code:
mount -o loop /data/magisk.img /mktmp
3. Navigate to mktmp and remove your module
Code:
cd /mktmp
rm -rf /mktmp/xxxx
Unmount magisk.img and reboot to check if it's work
1. Unmount magisk.img
Code:
umont /mktmp
2. Leave terminal and reboot the phone
3. Enjoy!
mklee11224 said:
If you can launch TWRP then :
Check magisk.img exist
1. Go to "advanced" and then click on "File Explorer".
2. Check there is "magisk.img" file under "/data"
Backup magisk.img
1. Go to "advanced" and then click on "terminal command".
2. type following command
Code:
cp /data/magisk.img /data/magisk.img.bk
Mount magisk.img
1. Make a temp folder
Code:
mkdir /mktmp
2. Mount magisk.img to /mktmp
Code:
mount -o loop /data/magisk.img /mktmp
3. Navigate to mktmp and remove your module
Code:
cd /mktmp
rm -rf /mktmp/xxxx
Unmount magisk.img and reboot to check if it's work
1. Unmount magisk.img
Code:
umont /mktmp
2. Leave terminal and reboot the phone
3. Enjoy!
Click to expand...
Click to collapse
Thanks mate ! it worked like a charm !
just use "ls" command on step 3 after changing directory to mktmp , to show installed modules.:silly:
My Phone Specification : Moto X Play ------ 7.1.1 Stock Firmware -------- Squid kernel --------- rooted using Magisk ------ systemless xposed module "xposed_25" installed using magisk module(Uninstalled by this method !) .:victory:
Tanks a lot!
Crossbreeder lite made my phone unusable. Working fine again!
magisk.img not found in /data
This works like charm, if you can't find the magisk.img in `/data` check `/data/adb` ... I hope this work .
Didgeridoohan said:
https://www.didgeridoohan.com/magisk/Magisk#hn_Module_will_be_updated_at_next_reboot
Click to expand...
Click to collapse
Own domain huh? Business growing? Hehehe I only came for the uninstall zip, hey quick question, I'm on a micro sd-less phone (big news), still a flashaholic, kinda, but my phone so happens to require a data format every time for gsi's, where would you recommend keeping the "things to keep on your device" (Magisk related) so i don't have to carry an otg and drive everywhere i go? Thank you sir, you almost get more thanks than posts! Talk about reputation!
culiacanazo said:
Own domain huh?
Click to expand...
Click to collapse
I keep a few of them around. It was nice to finally find a good use for that one...
but my phone so happens to require a data format every time for gsi's, where would you recommend keeping the "things to keep on your device" (Magisk related) so i don't have to carry an otg and drive everywhere i go?
Click to expand...
Click to collapse
Do you have to completely wipe the device? Or can you keep internal storage intact? If not, it sounds like you're out of luck.
Nice thread hijack, by the way... :laugh:
Didgeridoohan said:
Do you have to completely wipe the device?
Click to expand...
Click to collapse
Well i do a factory reset, flash system img and reboot, let it loop because it will, and then do a data format before it will boot, so system, caches, and data go... (Huawei, see)
Didgeridoohan said:
Nice thread hijack, by the way... :laugh:
Click to expand...
Click to collapse
I kinda stayed on topic didn't i? :crying:
You linked to your help guide which i read the beginning of that by the way has nothing to do with the help you offered to the op and reminded me of my struggles with a totally different device and problem!!
It's like how I'm related to my grandma's cousin's wife's sister's doctor's neighbor's son's friend, ain't it?
Sent from my Huawei Mate 10 Pro using XDA Labs
Would be cool if someone could share the adb solution. In the FAQ is just written "email me for this" wtf?!? It is ****ing anoying to reflash the whole system everytime a module isnt working (yeah thats what you need to do if your device doesnt have twrp, and a lot of a/b devices dont have twrp). Also you need to delete all user datas because you flashed the system new and the new system doesnt know the encryption key for the user datas. There need to be a better solution than using twrp or email the dev for adb solution.
The easiest way would be to make it possible that magisk manager can manage (remove/deactivate) the modules while there is no patched boot.img installed. This would solve all problems related to a/b devices without twrp and magisk modules (not booting or anything else) just flash stock boot.img remove the problematic module flash patched boot.img and done. This is not possible because the module section in magisk manager is hidden when there is no patched boot.img installed.
Second thing i noticed, magisk manager doesnt reset the active modules when you wipe the app data. This should be a MUST. Would also solve the problem of not booting modules without wiping the whole system on a/b devices without twrp.
Apply .disable_magisk
saturday_night said:
Would be cool if someone could share the adb solution. In the FAQ is just written "email me for this" wtf?!? It is ****ing anoying to reflash the whole system everytime a module isnt working (yeah thats what you need to do if your device doesnt have twrp, and a lot of a/b devices dont have twrp). Also you need to delete all user datas because you flashed the system new and the new system doesnt know the encryption key for the user datas. There need to be a better solution than using twrp or email the dev for adb solution.
The easiest way would be to make it possible that magisk manager can manage (remove/deactivate) the modules while there is no patched boot.img installed. This would solve all problems related to a/b devices without twrp and magisk modules (not booting or anything else) just flash stock boot.img remove the problematic module flash patched boot.img and done. This is not possible because the module section in magisk manager is hidden when there is no patched boot.img installed.
Second thing i noticed, magisk manager doesnt reset the active modules when you wipe the app data. This should be a MUST. Would also solve the problem of not booting modules without wiping the whole system on a/b devices without twrp.
Click to expand...
Click to collapse
Hi!. I have this user of XDA Dev. hanging out for a time... well the fact is I'm new. My problem (not the only one) maybe merge a kind of solution to this. And this could be putting the ".disable_magisk" blank file inside the cache partition as an ADB Sideload update.
Next to this. I've found that to do that it's not as simply as it seems to be cause I'm on a Samsung Galaxy S7 Nougat 7.0 Version. And all the examples with update-binary file I have, are from downgrade versions...
I'm stuck in a bootloop due to the Magisk Xposed SDK 24 module. I think this module & encription is not good (as I've read on the Xpose module thread).
So, here I'm asking how to make an script to run directly on the Stock recovery using ADB Sideload, which will put the blank ".disable_magisk" file inside the /cache partition. I need just this, and I think this could help some people who are stuck on this issue.
Now, I have this Thread. But really I need the advice of an expert telling me what to do in order to achieve this. As I think this is an easy labor, but you have to know how to do it... If someone is able to clarify please, I will appreciate so much.
Thanks!
---------- Post added at 05:51 PM ---------- Previous post was at 05:41 PM ----------
neromanello said:
Hi!. I have this user of XDA Dev. hanging out for a time... well the fact is I'm new. My problem (not the only one) maybe merge a kind of solution to this. And this could be putting the ".disable_magisk" blank file inside the cache partition as an ADB Sideload update.
Next to this. I've found that to do that it's not as simply as it seems to be cause I'm on a Samsung Galaxy S7 Nougat 7.0 Version. And all the examples with update-binary file I have, are from downgrade versions...
I'm stuck in a bootloop due to the Magisk Xposed SDK 24 module. I think this module & encription is not good (as I've read on the Xpose module thread).
So, here I'm asking how to make an script to run directly on the Stock recovery using ADB Sideload, which will put the blank ".disable_magisk" file inside the /cache partition. I need just this, and I think this could help some people who are stuck on this issue.
Now, I have this Thread. But really I need the advice of an expert telling me what to do in order to achieve this. As I think this is an easy labor, but you have to know how to do it... If someone is able to clarify please, I will appreciate so much.
Thanks!
Click to expand...
Click to collapse
I need to know how to locate the mount point of my /cache partition at the stock recovery ADB Sideload. Then, to mount it, transfer the blank file to it, and then unmount /cache. I think it's an easy labor. So here my incomplete updater-script:
ui_print("Trying to make an script with ADB Sideload..."); CRLF
ui_print("Creating file to disable Magisk Modules..."); CRLF
I NEED THE MOUNT POINT HERE CRLF
ifelse package_extract_file(".disable_magisk", "/cache/.disable_magisk") == "t", ui_print("OK!"), ui_print("Failed!"); CRLF
UNMOUNT COMMAND HERE. CRLF
--last blank line--
So, I need to complete that, BUT things gets difficult when I need the update-binary for my Nougat 7.0 version, and to sign the whole .zip file in order my stock recovery recognizes it. I think this last thing could be made by this Thread. But really I don't know. Please help.
Thanks!.

Does anyone have a guide for installing Magisk on Android x86_64 for PC?

As far as I know there is no TWRP for Android x86_64 for PC. How could I ever get Magisk 14 installed?
https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
I'm thinking on using it on Bliss which is running Nougat 7.2 x86_64. I really want root but some apps will not work with root.
Magisk manager has an option to install magisk without recovery, of course this means you will need some sort of root solution before hand
Xmaster24 said:
Magisk manager has an option to install magisk without recovery, of course this means you will need some sort of root solution before hand
Click to expand...
Click to collapse
No it doesn't. It means you'll need a copy of your device's boot image and some way to flash it to your device after the Manager has patched it. No root required...
Didgeridoohan said:
No it doesn't. It means you'll need a copy of your device's boot image and some way to flash it to your device after the Manager has patched it. No root required...
Click to expand...
Click to collapse
Well he is talking about a pc which does not use a boot image the same way a normal device does, anyways Bliss rom comes with root.
EDIT: actually now that you mention that I was not aware you could select a boot image to patch in magisk manager, if he does that he can just copy the boot image to wherever Bliss rom stores the emulated boot image
Xmaster24 said:
Well he is talking about a pc which does not use a boot image the same way a normal device does, anyways Bliss rom comes with root
Click to expand...
Click to collapse
I know... So in other words it's probably not gonna happen. Magisk relies entirely on patching the boot image.
My answer to your post was simply to prevent any future misunderstandings for anyone reading it. :good:
Well I think RMXtools or similar is used to mount the .img file and root it with SuperSU for Android x86 for PC. Could this also be done for Magisk?
I would need to know exactly where the files would need to go I guess and also which image to mount for Android x86 for PC
saulin78 said:
Well I think RMXtools or similar is used to mount the .img file and root it with SuperSU for Android x86 for PC. Could this also be done for Magisk?
I would need to know exactly where the files would need to go I guess and also which image to mount for Android x86 for PC
Click to expand...
Click to collapse
And that was made with the system or systemless type of install for SuperSU? Magisk can only be installed systemlessly...
If it's possible, you can probably find the info you need here: https://github.com/topjohnwu/Magisk
Android x86 has no boot partition. It contains kernel binary and initrd image.
Didgeridoohan said:
And that was made with the system or systemless type of install for SuperSU? Magisk can only be installed systemlessly...
If it's possible, you can probably find the info you need here: https://github.com/topjohnwu/Magisk
Click to expand...
Click to collapse
For PC installations of Android x86 you can edit the system and data images with that tool. I believe root is achieved by editing the system partition.
Bliss already comes pre-rooted or without root, depending on which *.iso is used for the installation. I picked the rooted image and tried to uninstall SuperSU which looks like I did successfully, however this app I have still detects that the device has been modified or is rooted it says.
I will install the non-root version today and see if the message goes away. If it does then I know there must still be traces of root on the other image. Now the ideal thing would be to get Magisk somehow installed because then I could hide the root which seems to work for the apps I have tried it on on my Shield Android TV Box.
**Edit**
Well Magisk on Android x86 sure seems possible judging by the posts and screenshots from youling 257
https://groups.google.com/forum/#!s...elevance/android-x86/omGg6QZlEGc/H4_QXjhQBwAJ
However this all seems way too complicated for me.
https://groups.google.com/forum/#!msg/android-x86/311n2ivCLYw/hfIZnqkXBwAJ
I was able to install Magisk V12.0 on Android x86 7.1.2 rc2, using this tools to create a "fake" boot.img using kernel and ramdisk.img files:
https://forum.xda-developers.com/showthread.php?t=2319018
But I had to make small modifications in the install script and magic_mask.sh to bypass some errors and correctly mount system to the magisk folder. Newer versions don't have magic_mask.sh anymore but a binary, so unless you modify the source and compile it yourself I think it won't work. Probably because v12.0 is somewhat old I can't install modules automatically using Magisk Manager tho...
https://forum.xda-developers.com/phoenix-os/phoenix-os-news-qa--development/magisk-15-3-t3735310

future of SuperSU vs. Magisk

The guy who made SuperSU, @ChainfireXDA , retired from SuperSU. 2.82 SR5 was his last beta release. Some Chinese owned company named CCMT bought SuperSU a while back, but @ChainfireXDA retired from the aforementioned on 03OCT2017 (10th anniversary). https://plus.google.com/+Chainfire/posts/6Sp6t9LxtQZ
https://desktop.firmware.mobi
https://www.chainfire.eu
SuperSU at XDA
https://forum.xda-developers.com/apps/supersu
So, since nothing has yet been posted by CCMT for SuperSU (as of 14NOV2017), it seems that @topjohnwu Magisk will become more prominent.
Magisk at XDA
https://forum.xda-developers.com/apps/magisk
The purpose of this thread was what exactly?
choosing rooting app for OEM unlocked Moto Z2 Force
TheKnux said:
The purpose of this thread was what exactly?
Click to expand...
Click to collapse
Since Moto Z2 Force Sprint and T-Mobile variants are OEM unlockable, the long term choice of a systemless root for an OEM unlocked Moto Z2 Force seems to be a relevant topic for discussion and/or news for Moto Z2 Force. I wanted SuperSU to be developed further by @ChainfireXDA , but his retirement from SuperSU likely means that to get the most up-to-date systemless rooting app for my OEM unlocked Moto Z2 Force, I will have to soon switch to @topjohnwu Magisk.
The point of this thread was that we had to work extra hard for magisk support and we now have it via mine and @Uzephi kernel we have figured out why there are bootloops and will be adressing here shortly
On OEM unlocked T-Mobile Moto Z2 Force with latest TWRP (as of 15NOV2017), I just switched to Magisk 14.3 beta from SuperSU 2.82 SR5 beta w/SU Hide 1.09. In this long process, I lost all my data because Magisk 14.3 beta did not properly disable force encryption! I really didn't think it was going to be as hard as it was. It absolutely refused to boot properly with default upstream kernel (i.e., that comes along with latest TWRP; kernel probably soon to be tweaked per previous post) and latest Magisk 14.3 beta no matter how many times I formatted data, etc. I ended up having to use SuperR's Kitchen free for Linux.
SuperR's Kitchen free for Linux
https://forum.xda-developers.com/apps/superr-kitchen/kitchen-superr-s-kitchen-v1-1-50-v2-1-6-t3597434
SuperR's Kitchen donate version for Windows/Linux
https://forum.xda-developers.com/apps/superr-kitchen/windows-linux-superr-s-kitchen-v3-0-0-0-t3601702
jhofseth said:
On OEM unlocked T-Mobile Moto Z2 Force with latest TWRP (as of 15NOV2017), I just switched to Magisk 14.3 beta from SuperSU 2.82 SR5 beta w/SU Hide 1.09. In this long process, I lost all my data because Magisk 14.3 beta did not properly disable force encryption! I really didn't think it was going to be as hard as it was. It absolutely refused to boot properly with default upstream kernel (i.e., that comes along with latest TWRP; kernel probably soon to be tweaked per previous post) and latest Magisk 14.3 beta no matter how many times I formatted data, etc. I ended up having to use T-Mobile 05AUG2017 kernel, no-verity-opt-encrypt-5.2 (attached), and Android Terminal TWRP Installer. But the important thing is Magisk 14.3 beta is finally working with latest Moto Z2 Force TWRP!
Click to expand...
Click to collapse
Interesting experiment... two questions:
1. have you tried using flashable zip to unforce encryption for "any kernel" by @erfanoabdi on our device?
2. since latest TWRPs by @joemossjr come with a (little) modified/recompiled kernel, why don't disable forced encryption by default on them?
enetec said:
Interesting experiment... two questions:
1. have you tried using flashable zip to unforce encryption for "any kernel" by @erfanoabdi on our device?
2. since latest TWRPs by @joemossjr come with a (little) modified/recompiled kernel, why don't disable forced encryption by default on them?
Click to expand...
Click to collapse
i didn't read thread and other posts but please don't install my zip here
that will harm the device in worst way
1) Z2 have a/b boot partition
2) different fstab and partition table
@enetec remove my flashable zip from your old post
erfanoabdi said:
...
@enetec remove my flashable zip from your old post
Click to expand...
Click to collapse
:good:
P. S. : Welcome back pal!
P. P. S. : we *want* you on Z2!!!
re-encrypting not due to upstream kernel with TWRP
enetec said:
Interesting experiment... two questions:. ....
2. since latest TWRPs by @joemossjr come with a (little) modified/recompiled kernel, why don't disable forced encryption by default on them?
Click to expand...
Click to collapse
The re-encrypting was not the fault of the upstream kernel with TWRP, it was that the 14.3 beta Magisk didn't properly disable force encryption in a stock boot image. It errored & told me to use a stock boot image during Magisk direct install (i.e., inside Magisk manager), so I dd flashed a stock boot image and FlashFire flashed Magisk right afterward. Yeah.....force encryption fun! Eventually, I ended up having to use SuperR's Kitchen free for Linux. All's well that ends well.
SuperR's Kitchen free for Linux
https://forum.xda-developers.com/apps/superr-kitchen/kitchen-superr-s-kitchen-v1-1-50-v2-1-6-t3597434
SuperR's Kitchen donate version for Windows/Linux
https://forum.xda-developers.com/apps/superr-kitchen/windows-linux-superr-s-kitchen-v3-0-0-0-t3601702
jhofseth said:
The re-encrypting was not the fault of the upstream kernel with TWRP
Click to expand...
Click to collapse
Never intended that... I was only asking why don't include directly in modified kernel the possibility to remain unencrypted...
enetec said:
Never intended that... I was only asking why don't include directly in modified kernel the possibility to remain unencrypted...
Click to expand...
Click to collapse
I think @joemossjr and @Uzephi try, but this encryption can be frustrating. Many techniques that are supposed to stop it don't work properly. Somehow SuperSU 2.82 beta SR5 does a good job of stopping it when installed systemlessly. No version of Magisk that I've tested stops encryption on our phone--even though it is supposed to stop force encryption by default.
jhofseth said:
I think @joemossjr and @Uzephi try, but this encryption can be frustrating. Many techniques that are supposed to stop it don't work properly. Somehow SuperSU 2.82 beta SR5 does a good job of stopping it when installed systemlessly. No version of Magisk that I've tested stops encryption on our phone--even though it is supposed to stop force encryption by default.
Click to expand...
Click to collapse
user data is formatted f2fs and system/boot/etc ext4. SU decrypts both while magisk sees f2fs and decrypts only f2fs partitions.
Flashable unencrypter must format data will not work on stock kernel. But will with twrp.
https://drive.google.com/file/d/1Cr-7SiSiHpUDM9HYpyeXVsPHEB9Z9wym/view?usp=drivesdk
enetec said:
Never intended that... I was only asking why don't include directly in modified kernel the possibility to remain unencrypted...
Click to expand...
Click to collapse
the "encrypt" part is in /system, not kernel. I can add a module when I build with anykernel to do the same thing as joemoss's zip. But it isn't the kernel. The kernel will work both encrypted and decrypted.
Uzephi said:
the "encrypt" part is in /system, not kernel. I can add a module when I build with anykernel to do the same thing as joemoss's zip. But it isn't the kernel. The kernel will work both encrypted and decrypted.
Click to expand...
Click to collapse
I could be wrong, but I have maturated the idea that disabling force encryption is one of (many...) things which can be done both working on /boot or /system....
I had posted @erfanoabdi script for Moto Z (Griffin) even to have it studied for an eventual porting... (I'm quite sure it works on /boot... )
More... I think even SuperSU method could work on /boot: if it worked modifying /system, a kernel reflashing shoudn't disable it's tweak... am I wrong?
enetec said:
I could be wrong, but I have maturated the idea that disabling force encryption is one of (many...) things which can be done both working on /boot or /system....
I had posted @erfanoabdi script for Moto Z (Griffin) even to have it studied for an eventual porting... (I'm quite sure it works on /boot... )
More... I think even SuperSU method could work on /boot: if it worked modifying /system, a kernel reflashing shoudn't disable it's tweak... am I wrong?
Click to expand...
Click to collapse
AnyKernel pulls apart the boot image and injects the kernel. it doesn't put the image back correctly. to try this, dd pull your boot image and play with AIK (linux solution to manually add a kernel). Don't edit anything and it will lose root as well when you reflash the repacked boot image. it is something in the ramdisk that doesn't get saved.
Uzephi said:
AnyKernel pulls apart the boot image and injects the kernel. it doesn't put the image back correctly. to try this, dd pull your boot image and play with AIK (linux solution to manually add a kernel). Don't edit anything and it will lose root as well when you reflash the repacked boot image. it is something in the ramdisk that doesn't get saved.
Click to expand...
Click to collapse
Understood. But @ChainfireXDA should have found a solution to this... or not?
enetec said:
Understood. But @ChainfireXDA should have found a solution to this... or not?
Click to expand...
Click to collapse
How can he? he doesn't have the device to test this out. He just patches the boot image the normal way like other devices. (albeit it took some community testing to get the boot image and ramdisk to work for our device, but hey, you get what you can when the dev doesn't have your device)
enetec said:
Understood. But @ChainfireXDA should have found a solution to this... or not?
Click to expand...
Click to collapse
@Uzephi wrote, "data is formatted f2fs and system/boot/etc ext4. SU decrypts both while magisk sees f2fs and decrypts only f2fs partitions."
So, I think that's why when we formatted data ext4 in TWRP, SuperSU 2.82 beta SR5 was OK but not so for Magisk.
Ok what uzephi is trying to say is encryption in handled in our fstab.qcom. which if you have a stock kernel it's gonna be in there and one's gonna be in system and another in system_root. So in the fstab there is this line for userdata which isn't used as you can see the # means it's not used. When magisk sees this because it's right above our userdata it modifies the "forceencrypt" part to "encryptable" which allows decryption on the f2fs partition but we don't use that. Follow me? Now below that one is ours. And where you see the term "fileencryption" that's just another term for force encrypt. So when magisk is flashed it only sees the one above it and changes it and goes on. Now the difference between magisk and supersu is supersu looks for terms like "verify" for dm verity and "forceencrypt" for encryption and also "fileencryption" and removed the verify term to remove verity and changes all the above terms if noticed to "encryptable" instead of going line by line supersu does it better. Now if you have twrp it has a fstab in it that patched already but what I forgot to check is where twrp puts it and where it puts it is n in the root of our device where it doesn't belong. So that's why I made a flashable zip that sends that modified fstab to system where when the system boots it will see the new modified fstab and realize that it can boots.
#/dev/block/bootdevice/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,nobarrier,inline_xattr,inline_data wait,check,formattable,forceencrypt=/dev/block/bootdevice/by-name/metadata
/dev/block/bootdevice/by-name/userdata /data ext4 nobarrier,noatime,nosuid,nodev,discard,data=ordered,noauto_da_alloc wait,check,formattable,fileencryption=ice

[DEV][Help][pre-Magisked] Integrating Magisk into kernel

Hi, I am trying to make some kind of "pre-Magisked" kernel, so that, when I flash that kernel already contains the necessary files to Magisk Superuser, avoiding the need to flash Magisk after each kernel flash.
I know the current script patches the ramdisk image when installing it, but I cant see which changes are executed exactly. Tried some of them resulting in bootloop
So, is there a way to create a pre-Magisked kernel or, at least, integrate basic files and later manually install Magisk Manager APK? There was a way to do it in Nougat with SuperSU which doesnt work with Oreo anymore...
bamsbamx said:
Hi, I am trying to make some kind of "pre-Magisked" kernel, so that, when I flash that kernel already contains the necessary files to Magisk Superuser, avoiding the need to flash Magisk after each kernel flash.
I know the current script patches the ramdisk image when installing it, but I cant see which changes are executed exactly. Tried some of them resulting in bootloop
So, is there a way to create a pre-Magisked kernel or, at least, integrate basic files and later manually install Magisk Manager APK? There was a way to do it in Nougat with SuperSU which doesnt work with Oreo anymore...
Click to expand...
Click to collapse
No its not possible to have a pre magisk'd kernel as magisk sets up files in /data/adb which you cannot do later on otherwise magisk will be non functional, you must flash the zip after wiping your data.

Categories

Resources