[Guide] Magisk Modules Disabler for booting into Magisk core-only Mode - Google Pixel 2 Guides, News, & Discussion

Tools needed: boot.img extractor. I recommend the one created by osm0sis from this thread:
https://forum.xda-developers.com/showthread.php?t=2073775
The first method was developed by osm0sis and removes magisk and all modules.
1. Unpack magisk_patched.img
2. Unzip overlay.dremove1.zip and place overlay.d folder in ramdisk folder.
3. Repack IMG
4. fastboot boot image-new.img created by repacking 8mg
This method is an offshoot of osm0sis version but boots core-only mode. Afterwards, remove the .disable-magisk file from the /cache folder for modules to work. Dot files are hidden files so if your root explorer can't see hidden files, run the "Remove disable_magisk" bat file in ADB.
1. Same as above but use the overlay.dcoreonly1.zip
For both methods you must be rooted for it to work. These are not cure all's for all bootloops.
Remove .disable_magisk bat file
https://www.androidfilehost.com/?fid=4349826312261684994
****************************************
Here is a fastboot bootable image to boot you into Magisk core-only mode in case you bootloop due to flashing a bad module and TWRP is not enough.
Once in fastboot:
fastboot boot image-newpixel2.img
You will boot with root but modules disabled. If something additional is needed, once booted to core-only, unzip the attached zip onto your pc where you can run ADB/fastboot and run the bat file. It will push .disable_magisk to your cache folder so that your modules will be disabled even after a reboot (zip says crosshatch but will work on any phone)
Boot image uploaded 11-24-19
https://www.androidfilehost.com/?fid=4349826312261644460

Related

Convert a twrp backup to flashable zip!

Might be quite helpful for many I think as myself was looking for this.
What worked for me on Win 10 Pro x64 using CYGWIN:
1)First unpack the TWRP backup archive.
2)Then grab the two files named:
system.ext4.win000
system.ext4.win001
3)Next rename these files to:
system.ext4.win000.tar
system.ext4.win001.tar
4)Download and Install CYGWIN
5)Go to:
C:\cygwin64\home\YOURUSERNAMEHERE
6)Create a folder named "untar"
7)Now type these command in CYGWIN Terminal
Code:
[COLOR="Red"]cd c:/[/COLOR]
Code:
[COLOR="Red"]cd C:/cygwin64/home/YOURUSERNAMEHERE/untar[/COLOR]
Code:
[COLOR="Red"]tar -xvf system.ext4.win000.tar
tar -xvf system.ext4.win001.tar[/COLOR]
8)That's it! The /system folder was just unpacked to the /untar dir we just created before. Now you can
We need a couple of more things yet:
9)Collect the 'boot.emmc.win' file from the unpacked TWRP archive and rename it to boot.img.
9.1)Optional. Collect the 'logo.emmc.win' file from the unpacked TWRP archive and rename it to logo.img.
10)Now collect a META-INF folder from any custom rom which is made for K3 Note (yes there are many! :laugh: )
We have all the files! Now we need just to create a zip file!
11)Select the META-INF,system and boot.img and create an archive using WinRAR, 7zip or similar.
Optional: Add also the logo.img in the zip if it's present in the TWRP backup.
12)Done.
Credits: @carl1961
911-Future_Maker said:
Might be quite helpful for many I think as myself was looking for this.
What worked for me on Win 10 Pro x64 using CYGWIN:
1)First unpack the TWRP backup archive.
2)Then grab the two files named:
system.ext4.win000
system.ext4.win001
3)Next rename these files to:
system.ext4.win000.tar
system.ext4.win001.tar
4)Download and Install CYGWIN
5)Go to:
C:\cygwin64\home\YOURUSERNAMEHERE
6)Create a folder named "untar"
7)Now type these command in CYGWIN Terminal
Code:
[COLOR="Red"]cd c:/[/COLOR]
Code:
[COLOR="Red"]cd C:/cygwin64/home/YOURUSERNAMEHERE/untar[/COLOR]
Code:
[COLOR="Red"]tar -xvf system.ext4.win000.tar
tar -xvf system.ext4.win001.tar[/COLOR]
8)That's it! The /system folder was just unpacked to the /untar dir we just created before. Now you can
We need a couple of more things yet:
9)Collect the 'boot.emmc.win' file from the unpacked TWRP archive and rename it to boot.img.
9.1)Optional. Collect the 'logo.emmc.win' file from the unpacked TWRP archive and rename it to logo.img.
10)Now collect a META-INF folder from any custom rom which is made for K3 Note (yes there are many! :laugh: )
We have all the files! Now we need just to create a zip file!
11)Select the META-INF,system and boot.img and create an archive using WinRAR, 7zip or similar.
Optional: Add also the logo.img in the zip if it's present in the TWRP backup.
12)Done.
Credits: @carl1961
Click to expand...
Click to collapse
How would I go about making a flashable Odin file from my TWRP backup? I want to flash it with Odin.
You are the best
Thanx Very Much
can we unpack backups taken from twrp-3.0.2 ?? I can't unpack them
It would be interesting to do the opposite. Owning boot.img, recovery.img, system.img and create a TWRP flashable backup.
When I unpack my backup created with TWRP, there is no "boot.emmc.win". I have data.ext4.win000, data.ext4.win001, and system.ext4.000 and the md5 hashes. That's it. Where do I find these? thanks
pwntrik said:
When I unpack my backup created with TWRP, there is no "boot.emmc.win". I have data.ext4.win000, data.ext4.win001, and system.ext4.000 and the md5 hashes. That's it. Where do I find these? thanks
Click to expand...
Click to collapse
I believe this would happen if you did not check the box for the Boot partition when you created the backup. If you make another backup with that box checked, you should see this file in the result.
is this possible to make it as a bat file to automate the process?
superbeef150 said:
I believe this would happen if you did not check the box for the Boot partition when you created the backup. If you make another backup with that box checked, you should see this file in the result.
Click to expand...
Click to collapse
Since I posted that, I figured out why there's no boot or recovery: TWRP doesn't give you the option in rbox's latest build (Not sure why?) You could easily use dd to make a backup of the boot and recovery sectors if you run Advanced>Terminal in TWRP.
hi..
I did all the steps but unfortunately it didn't work
---------------------------------------------------------------
Dr [email protected] ~
$ cd c:/
bash: cd: command not found

[Guide] How to manually Patch N boot.img

So in this guide or tutorial i'll show you how to patch boot.img so it doesn't fails to boot.
what you'll need
Python (We're using a python script to unpack/repack)
This python script https://github.com/liudongmiao/bootimg
Text editor (notepad++) for windows is a good thing
Patience
Now if you have python installed navigate to the folder where your bootimg.py & boot.img exist
now open cmd or terminal depending on what system you're using. and enter:
python bootimg.py --extract-bootimg
python bootimh.py --extract-ramdisk
Now we need to disable dm-verity and such
To disable system check change: ro,barrier=1 wait,verify > ro,barrier=1 wait
it is recommended to do this to all partitions u want to be able to modify later.
now you can also remove dm-verity executable and is not needed and it most likely will cause your boot.img to fail.
There's probably need to patch se policy file as well so you could use phh zip to do this.
And thats it. Post 2 is to add superuser access but it'll be later
How to swap from phh to chainfire supersu
Open init.environ.rc and add
export PATH /su/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/su/xbin:/system/xbin
Above bootlogo
Now download the two zips and extract su folder to root of ramdisk
And the sbin to sbin folder but don't remove any files!
Now if u have trouble with remount system as rw you need to edit the fstab and remove the verify on its partition. Now just repack ramdisk and then repack boot and you should be done
LastStandingDroid said:
So in this guide or tutorial i'll show you how to patch boot.img so it doesn't fails to boot.
what you'll need
Python (We're using a python script to unpack/repack)
This python script https://github.com/liudongmiao/bootimg
Text editor (notepad++) for windows is a good thing
Patience
Now if you have python installed navigate to the folder where your bootimg.py & boot.img exist
now open cmd or terminal depending on what system you're using. and enter:
python bootimg.py --extract-bootimg
python bootimh.py --extract-ramdisk
Now we need to disable dm-verity and such
To disable system check change: ro,barrier=1 wait,verify > ro,barrier=1 wait
it is recommended to do this to all partitions u want to be able to modify later.
now you can also remove dm-verity executable and is not needed and it most likely will cause your boot.img to fail.
There's probably need to patch se policy file as well so you could use phh zip to do this.
And thats it. Post 2 is to add superuser access but it'll be later
Click to expand...
Click to collapse
Sorry, which tool do you use in order to extract boot img from UPDATE.APP?
And after unpack and repack ramdisk and boot is it normale that the new boot.img is smaller than the "original" boot.img?
Thanks, I'm trying to patch honor 5c boot image in order to root it.
Huawei Firmware Extractor will unpack the UPDATE.APP.
LastStandingDroid said:
So in this guide or tutorial i'll show you how to patch boot.img so it doesn't fails to boot.
what you'll need
Python (We're using a python script to unpack/repack)
This python script https://github.com/liudongmiao/bootimg
Text editor (notepad++) for windows is a good thing
Patience
Now if you have python installed navigate to the folder where your bootimg.py & boot.img exist
now open cmd or terminal depending on what system you're using. and enter:
python bootimg.py --extract-bootimg
python bootimh.py --extract-ramdisk
Now we need to disable dm-verity and such
To disable system check change: ro,barrier=1 wait,verify > ro,barrier=1 wait
it is recommended to do this to all partitions u want to be able to modify later.
now you can also remove dm-verity executable and is not needed and it most likely will cause your boot.img to fail.
There's probably need to patch se policy file as well so you could use phh zip to do this.
And thats it. Post 2 is to add superuser access but it'll be later
Click to expand...
Click to collapse
In which file we have to edit this line "ro,barrier=1 wait,verify > ro,barrier=1 wait". I have infinix smart 5 x657b. I extracted the boot file and from some instructions on google, I opened fstab file. But there is nothing like that line.
hassansuriya said:
In which file we have to edit this line "ro,barrier=1 wait,verify > ro,barrier=1 wait". I have infinix smart 5 x657b. I extracted the boot file and from some instructions on google, I opened fstab file. But there is nothing like that line.
Click to expand...
Click to collapse
There is a way to remove dm-verity and forceencrypt by just flashing a file in twrp.
[Deprecated] Universal DM-Verity, ForceEncrypt, Disk Quota Disabler [11/2/2020]
Hi all! For the past couple of months, I've been looking into making a more universal solution to disable dm-verity and forceencrypt. Needing to take different zips, modify them for different devices, and then cross your fingers when you switch...
forum.xda-developers.com
CHECK_123 said:
There is a way to remove dm-verity and forceencrypt by just flashing a file in twrp.
[Deprecated] Universal DM-Verity, ForceEncrypt, Disk Quota Disabler [11/2/2020]
Hi all! For the past couple of months, I've been looking into making a more universal solution to disable dm-verity and forceencrypt. Needing to take different zips, modify them for different devices, and then cross your fingers when you switch...
forum.xda-developers.com
Click to expand...
Click to collapse
but there is not any version of twrp recovery for my device. From where should I download it?
hassansuriya said:
but there is not any version of twrp recovery for my device. From where should I download it?
Click to expand...
Click to collapse
I found this "auto twrp recovery porter"
Mediatek (MTK) Auto TWRP recovery porter by Team Hovatek
If you wish to root your Mediatek Android phone, we'd dropped a guide on rooting using Magisk and stock boot.img at https://www.hovatek.com/forum/thread-21427.html , no custom recovery is required. Se
forum.hovatek.com
I dont know if it would work, you should try
You may have to sign up to get the andorid 9 and 10 version of the tool

[Guide] Unpack Update.app in phone

So there's threads about how to unpack UPDATE.APP on windows/PC/OS X so i decided why not do it on android too, this apps requires some additional tools to be downloaded just as OS X/Windows and linux needs as well. but process is otherwise similar. this tutorial doesn't need root!
NOTE THIS TUTORIAL isn't fully working on OREO on Huawei devices, it has some issues and i haven't found a workaround for it yet!​
Needed apps
Termux https://play.google.com/store/apps/details?id=com.termux
Recommended apps
Hacker keyboard
Needed files
https://github.com/atarii/split_updata.pl/blob/master/splitupdate
@Atarii 's modification of splitupdate to manually enter the partitions you want to unpack
The desired FW you wan't to unpack
Unpack process:
Download Termux
Open termux and type
termux-setup-storage This will allow termux to access your /sdcard
pkg install perl (this will install perl which the update.app process is using) once asked press y and enter.
copy the downloaded files to root of your SDCARD *We keep this simple*
Once copied type: cd storage
perl splitupdate UPDATE.APP partitionyouwanttoextract if everything goes well you should be good to go and having the selected files in a folder called output where selected files should be stored.
The unpack tutorial is done. But wait! If you want to browse the files you need to do one more thing or two.
Download android image kitchen
https://play.google.com/store/apps/details?id=com.redlee90.imagekitchenforandroid
This will allow you to *unpack boot/recovery and convert system image (also vendor, product, cust and version)
*in order to unpack a boot or recovery file you'll need to remove all code using a hex edit file until you see ANDROID text. Else it won't unpack. You can unpack aosp images easily with this tool and modify what you want and repack to flash it on your device tested with twrp image for honor 8.
I would suggest to not unpack/repack boot using this tool since it'll cause problem.
There's a python script that works to unpack boot and recovery which can be found https://github.com/liudongmiao/bootimg/blob/master/bootimg.py
For this you'll need to install python.
pkg install python and hit y and enter
Now you just do as the splitupdate part where you extract the file.
Command to unpack
python bootimg.py --unpack-bootimg similar is for ramdisk but you replace bootimg with ramdisk.
To repack just simply python bootimg.py --repack-bootimg
Please note if you repack ramdisk the boot might not work (it's a while since I tested this) now this covers up how you unpack boot and extract update.app from phone.
Credits to @Atarii for telling how to unpack boot on phone and for his custom splipupdate script
Sent from my FRD-L09 using Tapatalk
Known Issues:
If you get Killed when trying to extract system.img this is most likely because the image size is too big, this isn't due to small space available i guess its due to all ram is being taken yet i can't tell.
i get permission issues. yeah this can happen sometimes try chmod +x or chmod 0777 with root, it might help.
when typing termux-setup-storage i get lots of errors and i'm on 8.0 EMUI
This is not your fault it's a bug caused by android i'd guess, or app isn't adopted completely for 8.0

[MuXCustoM][ROM]+[Kernel][Z3CTW][ SGP611][23.5.A.1.291][Magisk 20.4][TWRP]

Custom Rom Xperia Z3CTW SGP611 Build 23.5.A.1.291_1290-4947_R2D By Mux
if you have questions or need files just PM me on XDA and i will try to help where i can...
the reason i made this tut is because there is almost no roms for this device available...
(not Responsible for any damages to device or peripherals through the process since there is always a chance something happens **but i had my device in almost every state and with the tools mentioned u should be able to revive it ** )
Included in this ROM (for you to build)
- Passes Saftynet
- Rooted with Magisk 20.4 (magisk hide working)
- Custom Kernel For Booting System and TWRP (made with rootkernel_v4.51_Windows_Linux.zip)
- Sony Ric Disabled / Enabled Depends on Rootkernel Config
- Netflix working
- Kernel can be set to Permissive via Terminal command.
- TWRP 3.0.2 (from Rootkernel_4.5.1)
- Remoteplay only works with Ric enabled and magisk uninstalled (make 2 boot.img for swapping in twrp)(due to sony device)
Apps i sugest u dl on ur rooted device
- FX File explorer
- Terminal for Android
- Netflix
- Vanced Manager
- Busybox (if needed)
IMPORTANT!! This Tutorial Ignores TA Partition So if you want to save them google How to Backup TA for SGP611 Before Following this Tutorial (some functionality can be regained through DRM opt in RootKernel
A Tutorial to Reproduce (*Do not Worry the Harder You Try The easier it gets)
1. Install Drivers for Fastboot and ADB in Device Manager for your device
- Boot Device to Fastboot by pressing Vol+ while Pluging USB Cable to PC Blue led indicates Fastboot Mode
- Go to Device Manager and Install Driver for S1boot
- Verify Driver installed Correctly
2. Install Flashtool Xperifirm, Flashtool Emma from Sony, Xperia Companion, copy Platform-tools folder to C:
(if u need any files PM)
3. Unlock Your Bootloader following instruction on Sony Developer Website (not going in to Details) *read warning above
before this
4. Download FTF firmware file With Flashtool Xperifirm For Your Device in My Case SGP611_23.5.A.1.291_1290-4947_R2D
By selecting XF Button in Flashtool after Closing xperifirm Flashtool will convert the files and they will be stored to
%user%\.flashTool\firmwares
5. Extract Kernel.sin Using 7zip or winrar from SGP611_23.5.A.1.291_1290-4947_R2D.ftf for patching boot.img
6. Open Flashtool and go to Tools menu select Sin Editor search and select the Kernel.sin Previously Extracted and press Extract
Data this will Create Kernel.elf
7. Go to RootKernelv4.51 Folder and copy the Kernel.elf there open CMD in address bar to folder and enter the command
(rootkernel kernel.elf boot.img) Select the option u like by Pressing y I selected all Options because I don’t have TA Backup
this will create a file Boot.img which is your Custom Boot Image if you want Recovery make Shure to say y when asked about
TWRP
8. Open PRFcreator and select all options click on the … for ftf and load the SGP611_23.5.A.1.291_1290-4947_R2D.ftf file
downloaded in step 3 click on the … for SuperSU and select the Magisk_20.4.zip set all check marks and create Flashable Zip
Zip is found in PRFcreator folder (this is your stock firmware zip)
9. Copy all files listed into a folder on your Internal storage
- Flashable-prerooted-signed.zip (created with PRFcreator)
- Moded Boot.img (Created with Rootkernelv4.51)
- Disable_ric_file.zip (if not moded in Boot.img)
- Magisk_20.4.zip (for Flashing Magisk After Flashing Boot.img)
10. Boot Phone in to Fastboot mode, Run CMD in address bar of Platform-tools folder, and Flash twrp 2.8.7.0 (yes will be
updated after Flashing Boot.img) by entering this command in ( Fastboot flash boot twrp-2.8.7.0-scorpion_windy.img )(**this
flashed to boot because u dont have recovery befor flashing the moded boot.img and this will be changed back by flashing
the stock ftf downloaded**)
if successful Unplug and boot tab it should boot to Teamwin TWRP recovery
11. In TWRP go to WIPE, Advanced Wipe, (Wipe: Cache, Dalvik-Cache, and System,)
before Flashing the Firmware Files
12. On main screen TWRP go to INSTALL and Install files following order
- Flashable-prerooted-signed.zip
- Moded Boot.img (by selecting flash image button at the bottom in TWRP)
- Disable_ric_file.zip
- Magisk_20.4.zip
13. Reboot to System Buy yourself a beer and Enjoy
where are the files ?

[SOLVED]9t - stuck in the bootloop with bad magisk module

[Android10 + MIUI 11]
1. Trying to add new module (extra power menu) and... kaboom - phone stuck at boot.
1a. I'm flashing orginal boot.img
2. No working^ TWRP for me - bootloop and/or data folder mounted in the read only mode or listed as complete mess. No chance for removing bad module.
3. ADB method for removing module - not working under Android 10 :/
4. The situation: no magisk, no root, no GPay
The question: is there anyway to prepare magisk boot image w/o modules loading?
https://forum.xda-developers.com/showpost.php?p=72542167&postcount=242
garett76 said:
[Android10 + MIUI 11]
1. Trying to add new module (extra power menu) and... kaboom - phone stuck at boot.
1a. I'm flashing orginal boot.img
2. No working^ TWRP for me - bootloop and/or data folder mounted in the read only mode or listed as complete mess. No chance for removing bad module.
3. ADB method for removing module - not working under Android 10 :/
4. The situation: no magisk, no root, no GPay
The question: is there anyway to prepare magisk boot image w/o modules loading?
Click to expand...
Click to collapse
Use TWRP, its File Manager.
Navigate to /data/adb/modules
Each installed module has its folder - recognize by name which folder corresponds to your errant module.
Put an empty file disable (for disabling) or remove (for removing) into that folder
Reboot but with the patched boot - on that next booting Magisk will find the file and disable or remove the given module
OtangeFox or certain unofficial TWRPs , or modules for TWRP also help to disable or remove Magidk modules by the same mechanism (leaving the file there for Magisk to find on next boot) - this way you can do it manually, not depending on additional tools and knowing how and why it actually works
zgfg said:
Use TWRP, its File Manager.
Navigate to /data/adb/modules
(cut)
Click to expand...
Click to collapse
Thank you!
Solved.
In the /data/adb/ was some folders with unreadable names. But only one included only 3 files, which is the number of my installed magisk modules. After removing them with TWRP file manager and sending patched magisk img phone booted succesfuly. Thank you!
garett76 said:
Thank you!
Solved.
In the /data/adb/ was some folders with unreadable names. But only one included only 3 files, which is the number of my installed magisk modules. After removing them with TWRP file manager and sending patched magisk img phone booted succesfuly. Thank you!
Click to expand...
Click to collapse
Ok, glad you solved.
But if you have stock MIUI 11, then official TWRP (3.4.0)
https://dl.twrp.me/davinci/
or 3.4.0.2 by brigudav (I prefer since it supports backup/restore for practically all partitions):
https://forum.xda-developers.com/showpost.php?p=83090455&postcount=1
should properly see all files and folders on Data and Internal memory.
Don't know for EEA weekly builds or if you flashed DFE (IMO, then specially shouldn't be a problem with unreadable names)

Categories

Resources