[Guide]Magisk Modules Disabler for Modules gone wrong - Google Pixel 3 XL Themes, Apps, and Mods

Tools needed: boot.img extractor. I recommend the one created by osm0sis from this thread:
https://forum.xda-developers.com/showthread.php?t=2239421
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-newpixel3xl.img
You will boot with root but modules disabled. After you remove the offending module you will need to go to /cache folder and delete the .disable_magisk file before your modules will work.
fastboot boot image-newpixel3xlRemove.img
This one should remove magisk and all modules, then reboot and magisk should reinstall itself (ask to install necessary binaries). This is what osm0sis uses to recover from failed flashes. See this post:
https://forum.xda-developers.com/pi...odules-disabler-booting-magisk-t3976625/page2
Images are in this common folder. Pick the appropriate image for your phone.
6-4-20
https://www.androidfilehost.com/?w=files&flid=313291

Looking forward to this, Tulsa. Will be a real lifesaver and game changer.

sliding_billy said:
Looking forward to this, Tulsa. Will be a real lifesaver and game changer.
Click to expand...
Click to collapse
It's official. It works.

Tulsadiver said:
It's official. It works.
Click to expand...
Click to collapse
You are going to make a lot of people (who "forget" to disable the modules before update) very thankful.

sliding_billy said:
You are going to make a lot of people (who "forget" to disable the modules before update) very thankful.
Click to expand...
Click to collapse
I'm one of those, lol! Also, with the nutty stuff I try, I will be able to get by without a factory reset all the time

Tulsadiver said:
I'm one of those, lol! Also, with the nutty stuff I try, I will be able to get by without a factory reset all the time
Click to expand...
Click to collapse
This link worked, but the one on the Pixel 3 page results in a Mega decryption key error.

sliding_billy said:
This link worked, but the one on the Pixel 3 page results in a Mega decryption key error.
Click to expand...
Click to collapse
I pasted it again. Hopefully it works now.

Tulsadiver said:
I pasted it again. Hopefully it works now.
Click to expand...
Click to collapse
It works!

Thank you!!!!

Latest magisk canary added an adb command to remove modules if bootlopps happens ?

DvLAx3l said:
Latest magisk canary added an adb command to remove modules if bootlopps happens
Click to expand...
Click to collapse
That's what I heard. Do you know the steps on how it works? You flash a module and you bootloop. What do you do next?

Tulsadiver said:
That's what I heard. Do you know the steps on how it works? You flash a module and you bootloop. What do you do next?
Click to expand...
Click to collapse
Didn't try yet, I was searching on topjohnwu GitHub but I don't find nothing, it's in the changelog but I don't know ?

DvLAx3l said:
Didn't try yet, I was searching on topjohnwu GitHub but I don't find nothing, it's in the changelog but I don't know
Click to expand...
Click to collapse
Well, if it's an ADB fix, a person is going to have to, at the very least, flash boot.img (though probably system images depending on what you flashed), reboot without root. Enable the ADB mode, flash ADB commands, and reboot. Remove bad modules. Then, go back and root again.
Seems simpler to just flash the modded image-new.img, reboot with root, remove modules (with ADB if you like) and reboot.
Edit: what would be cool is an option to patch a boot.img in core-only mode, right from Magisk manager, where the other option is to patch the boot.img. All that would be needed on John's part is an edited init file in that option. That's the only difference.

Thanks for this! I could've really used this image a few times in the past...

Face_Plant said:
Thanks for this! I could've really used this image a few times in the past...
Click to expand...
Click to collapse
You and me both, buddy!

Got in to a bootloop situation with Bromite systemless webview module. I restored stock boot image and patched it with the latest canary build (the one with 'recovery mode' checked under advanced settings) and bootlooped again. I flashed this file, got in with magisk working, disabled the offending module, patched the boot image without recovery mode, then flashed the patched boot image and everything is up and running! Thanks for the help!

Ok thanks for this but after rebooting from home screen even if I disable/remove bad mods from magisk I still get rr's/boot loops. Would I need to uninstall magisk completely then and start fresh or what?

Jiggs82 said:
Ok thanks for this but after rebooting from home screen even if I disable/remove bad mods from magisk I still get rr's/boot loops. Would I need to uninstall magisk completely then and start fresh or what?
Click to expand...
Click to collapse
Can you open magisk manager? If so, uninstall magisk from there.
If not, once booted in core-only mode, unzip the contents of this zip in a folder you can use ADB from and run the bat file. It'll push the .disable_magisk file to the cache folder and totally disable any module activity.

Tulsadiver said:
Can you open magisk manager? If so, uninstall magisk from there.
If not, once booted in core-only mode, unzip the contents of this zip in a folder you can use ADB from and run the bat file. It'll push the .disable_magisk file to the cache folder and totally disable any module activity.
Click to expand...
Click to collapse
Yes I was able to open magisk but even if I uninstalled it I still had this weird bootlloop so before I saw this message I ended up just flashing factory 10 image clean this time just to be sure everything would flash/install successfully and luckily they did lol but thanks anyways and I will hold onto to these files for future references:good:

would the modded boot img that disables modules work for the pixel 3 as well?

Related

Disabling Dm-Verity Flag

After much searching I feel defeated for the moment. After unpacking the boot.img on my Chromebook and sifting through as much information as I can take I can only find the recovery.fstab! Where the heck does the main fstab / marlin.fstab live?
They moved them to another partition. To disable dm-verity, you have to recompile the kernel from source with this patch md: disable dm-verity. Or you can use SuperSU, but I'm not 100% sure about SuperSU.
Sent from my Pixel XL using Tapatalk
reddv1 said:
They moved them to another partition. To disable dm-verity, you have to recompile the kernel from source with this patch md: disable dm-verity. Or you can use SuperSU, but I'm not 100% sure about SuperSU.
Sent from my Pixel XL using Tapatalk
Click to expand...
Click to collapse
I got it. I manipulated Magisk's install script to achieve my goal :highfive:
tdct12 said:
I got it. I manipulated Magisk's install script to achieve my goal :highfive:
Click to expand...
Click to collapse
Sorry for bothering you but could you upload a version of the newest Magisk with dm-verity disabled? Also could you explain what values you changed in the Magisk install script to disable dm-verity? I would like to know so I can also mod new Magisk releases for myself.
Edit: I think I've found what value I needed to change but I need a tester as I don't have access to my Pixel right now. Would anyone be willing to test out these 2 zips for me on the Stock Oreo May patch? You can switch your active slots so that if this doesn't work you can swap back to your ROM that does work. Instructions are below.
Instructions Part 1:
1.) Switch your active slot to the one you aren't using with either one of these commands:
fastboot --set-active=a
fastboot --set-active=b
2.) Extract the Bootloader, Radio, image-marlin-opm4.171019.016.b1.zip, and flash-all.bat
3.) Remove system_other.img from image-marlin-opm4.171019.016.b1.zip (this is done to prevent your other slot from being overwritten)
4.) remove the '-w' from flash-all.bat so that your line looks like this: fastboot update image-marlin-opm4.171019.016.b1.zip
5.) Flash all of the images using the flash-all.bat
Instructions Part 2:
boot into TWRP recovery
flash the Magisk-noVerityTest.zip
flash the Hosts-testOreoMay.zip (Note: not sure if this will flash on the Pixel XL due to the update binary, but it is confirmed to flash on the smaller Pixel)
boot into system and go to a site with a lot of ads (Ex. theverge) and see if any ads load up

Can't root through SuperSU or Magisk on open beta 25 (android O)?

I've tried to root using Magisk to SuperSU but I'm into the same issue, The device get stuck on the boot screen until I re-flash the stock boot image, is there any solution for that's?
Not yet. Did this really require a thread of its own ?
skymera said:
Not yet. Did this really require a thread of its own ?
Click to expand...
Click to collapse
I just want to know how much will take so that it will be available.
rsm23 said:
I just want to know how much will take so that it will be available.
Click to expand...
Click to collapse
Nobody here can see in the future...
https://forum.xda-developers.com/showpost.php?p=74161852&postcount=3634
here try this Good Luck !
On my phone SuperSU 2.82 SR5 works fine. On other phones not, or SR3 woks....
Magisk 1.4 or 1.42 beta not working. I did not get boot loops, but not working.
rsm23 said:
I've tried to root using Magisk to SuperSU but I'm into the same issue, The device get stuck on the boot screen until I re-flash the stock boot image, is there any solution for that's?
Click to expand...
Click to collapse
Follow this guide brother
Magisk 14.0 & Oreo(beta25) still testing, later i'll share it)))
baskaflyfer said:
Magisk 14.0 & Oreo(beta25) still testing, later i'll share it)))
Click to expand...
Click to collapse
How did you achieve this?
baskaflyfer said:
Magisk 14.0 & Oreo(beta25) still testing, later i'll share it)))
Click to expand...
Click to collapse
This is a good news. Cannot wait for more details!
baskaflyfer said:
Magisk 14.0 & Oreo(beta25) still testing, later i'll share it)))
Click to expand...
Click to collapse
Does this seems ok to you : https://forum.xda-developers.com/oneplus-3t/how-to/magisk-oxygen-os-8-0-op3-3t-t3689901 ?
ashokmor007 said:
Follow this guide brother
Click to expand...
Click to collapse
Thanks, but I don't like SuperSU
---------- Post added at 08:41 AM ---------- Previous post was at 08:39 AM ----------
mr.charlie said:
Does this seems ok to you : https://forum.xda-developers.com/oneplus-3t/how-to/magisk-oxygen-os-8-0-op3-3t-t3689901 ?
Click to expand...
Click to collapse
Thanks, but too much of a hassle for me right now.
I think I'll just wait for an official Magisk update to be released, at this point
baskaflyfer said:
Magisk 14.0 & Oreo(beta25) still testing, later i'll share it)))
Click to expand...
Click to collapse
! We are looking forward to your description: how to take the steps? !
papzi57 said:
! We are looking forward to your description: how to take the steps? !
Click to expand...
Click to collapse
Be carefully, you can lose you data!!! For me all work fine)))
1.Flash Oreo via trwp
2.Downgarde bootloader for DM-Verity
3. Flash Magisk via twrp
4. Turn off the phone manualy
5.Turn on & boot in twrp
6.Do the backup of boot
7.And edit boot.win in hex editor on pc
Code:
androidboot.selinux=permissive
screen in attachment
8.And flash boot back, reboot.
P.S When you set selinux permissive via fastboot you'll have freeze (braking) in system - i don't know how it say
baskaflyfer said:
edit boot.win in hex editor
Click to expand...
Click to collapse
This worked for me too, but maybe some other users need more information on the boot partition
Oreo compatible TWRP: Download (Credits: @akhilnarang)
OOS Open Beta 25: Download (Official OnePlus Website)
Magisk 14.3 (Beta): Download (stolen from this thread)
Magisk Manager 5.4.0: Download (GitHub)
You are responsible, if it kills your device, but this was my way:
1. Full Backup in TWRP
2. Reboot into Fastboot Mode
3. Flash Oreo compatible TWRP
4. Use Volume Keys to select and boot into recovery
5. Install OOS Open Beta 25
Then i did a reboot and Steps 1&2 again but i don't think this is required.
6. Install Magisk 14.3 Beta
7. Create an image of the boot partition
Code:
adb shell
dd if=/dev/block/sde18 of=/sdcard/boot.img
exit
8. Copy the boot.img file to your computer
9. Open this file in a hex exitor, add the following text after "buildvariant=user" (image in baskaflyfer's answer) and save the file:
Code:
androidboot.selinux=permissive
10. Reboot into fastboot mode
11. Flash modified boot image
12. Reboot to OOS
13. Install the Magisk Manager APK
Is it safe?
Do you dirty flash open beta 25?
Why need I modifyed the boot. img? Why don't modifyeed it the Magisk for me?
Sent from my Pixel 2XL using XDA-Developers Legacy app
papzi57 said:
Is it safe?
Do you dirty flash open beta 25?
Why need I modifyed the boot. img? Why don't modifyeed it the Magisk for me?
Click to expand...
Click to collapse
I am not able to tell you how safe this method is.
Yes, i did a dirty flash of OOS Open Beta 25, but some apps lost their data (Jodel, photoTAN, ...) but not Google Authenticator :fingers-crossed:
I think the modification of the boot.img is device-specific. I can not tell you details about this because i don't know that either.
There might be another way to set selinux=permissive as recently described in this thread, but your bootloader need to allow the following command:
Code:
fastboot oem selinux permissive
If you are able to perform this command in fastboot mode, maybe you don't need to modify the boot.img manually. Just reboot to fastboot mode after the installation of Magisk in TWRP and type that command.
davidlueder said:
This worked for me too, but maybe some other users need more information on the boot partition
Oreo compatible TWRP: Download (Credits: @akhilnarang)
OOS Open Beta 25: Download (Official OnePlus Website)
Magisk 14.3 (Beta): Download (stolen from this thread)
Magisk Manager 5.4.0: Download (GitHub)
You are responsible, if it kills your device, but this was my way:
1. Full Backup in TWRP
2. Reboot into Fastboot Mode
3. Flash Oreo compatible TWRP
4. Use Volume Keys to select and boot into recovery
5. Install OOS Open Beta 25
Then i did a reboot and Steps 1&2 again but i don't think this is required.
6. Install Magisk 14.3 Beta
7. Create an image of the boot partition
Code:
adb shell
dd if=/dev/block/sde18 of=/sdcard/boot.img
exit
8. Copy the boot.img file to your computer
9. Open this file in a hex exitor, add the following text after "buildvariant=user" (image in baskaflyfer's answer) and save the file:
Code:
androidboot.selinux=permissive
10. Reboot into fastboot mode
11. Flash modified boot image
12. Reboot to OOS
13. Install the Magisk Manager APK
Click to expand...
Click to collapse
Is Magisk stable? Did you try any modules and which ones? Are they working fine?
ishanp said:
Is Magisk stable? Did you try any modules and which ones? Are they working fine?
Click to expand...
Click to collapse
I did not try any modules but multiple apps that require root: AirDroid, AFWall+, Amaze (Root enabled). They're working fine.
Additionally, this magically fixed my ctsProfile. Magisk's SafetyNet-Test is successful on my device now.
Edit: I was able to install ViPER4Android FX for Magisk v14+ (v2.5.0.5) by ShadySquirrel without any errors, but driver status tells me that it is not enabled. Maybe because they officially just support ROMs up to Android Lollipop.
davidlueder said:
Edit: I was able to install ViPER4Android FX for Magisk v14+ (v2.5.0.5) by ShadySquirrel without any errors, but driver status tells me that it is not enabled. Maybe because they officially just support ROMs up to Android Lollipop.
Click to expand...
Click to collapse
Try in terminal after boot:
Code:
su
setenforce 0
Restart ViperFX app. Please report, I am on SuperSU but will jump the moment my fav modules start working
Also I'm using Viper4Arise (bundled with Magnum Opus) right now. If that didn't work you can use that.

Magisk works!! [+ POC boot.img for 3/19/18 LOS 14.1]

Please also read the additional notes in post #2, as they are critical to getting Magisk working.
I decided to do some tinkering around with Magisk, and it actually DOES work on the kindles (at least the 8.9"). The problem is, Magisk's patcher just isolates the ramdisk part of the boot.img and doesn't add the boot signature or other magic back to the image when it's time to reflash the patched boot image. By dd'ing the signature (and other files) back to the image, I can get Magisk to successfully boot.
As part of the working POC (because it's exciting to actually see this!), I've uploaded the patched "Magiskified" boot image (which originally comes from the 20180319 LineageOS 14.1 ROM that was built about a week ago). For reference, this is patched by Magisk v16.0, and the setup is basically the same as the official boot.img makefile directions from CM12.1. (It was the most arbitrary source I found, and I doubt the magic used to create the boot images has changed, so I'm just using that script as a reference.) Try to stick to that ROM if you can - no telling what different ROM versions/variants might do if you're not careful.
I plan on releasing a flashable .zip soon (probably in a month? I have college to work through) to automate the patching process, and possibly even extract the official installer zips to work through Magisk's patching scripts manually so the required boot magic can be patched back into the image before it's ever flashed. (I'll try to take requests to manually patch other ROM boot.imgs if asked to in the meantime though.)
As a friendly reminder, please do NOT flash the official Magisk installer zips or any patched boot images that the app produces as is - they need to be "repatched" with the boot magic, or you'll have to fastboot flash your ROM's boot.img manually because the kindle will hang at the bootloader screen.
Important notes
The official Magisk v16.0 zip must be flashed on first install/reinstall in order to properly construct the environment. Flash the boot image attached in the OP immediately after without rebooting in between, or the image Magisk flashed will prevent the kindle from booting normally without advanced intervention.
SafetyNet does NOT pass the basic integrity OR advanced checks. At least, v16 doesn't. Maybe an earlier Magisk build does - feel free to try it once I get the automated patcher zip up and running.
For now, because you're flashing on LineageOS, you may want to flash the LOS 14.1 arm-based su removal zip from Lineage's downloads site. Verify you're downloading arm and not arm64.
How does one go about patching the boot image thats modified by magisk so it's able to be flashed?
kn0wbodh1 said:
How does one go about patching the boot image thats modified by magisk so it's able to be flashed?
Click to expand...
Click to collapse
It's complicated. I recommend not doing this unless you're willing to follow it to the letter - when I get to creating the automated patcher, this won't be necessary.
Make backups!!
extract the boot.img from your ROM .zip, copy it to the device internal storage
install the Magisk Manager app, download the Magisk .zip and choose "patch boot image"; navigate to said boot image file
copy the modified image to a computer (preferably one running a Linux OS like Ubuntu)
download the boot_cert and u-boot.bin files from the official LineageOS/CM device repo; place these files in the same directory as the boot.img file
open a Linux terminal pointed to the same directory as the boot.img file
run for i in $(seq 1024); do echo -ne "\x00\x50\x7c\x80" >> stack.tmp; done to create the remaining file
run cat boot_cert patched_boot.img > boot.img (assuming the Magisk image produced is named patched_boot.img); this is the boot "signature"
run dd if=u-boot.img of=boot.img bs=8117072 seek=1 conv=notrunc to tag the second bootloader on
finally, run dd if=stack.tmp of=boot.img bs=6519488 seek=1 conv=notrunc to add the stack file; copy the new boot.img back to the kindle
reboot into recovery, flash the Magisk .zip to build the environment, but do NOT reboot yet
choose "Flash .img" within TWRP, select the boot.img, and select "Boot" to flash to the boot partition; reboot to system once complete
profit!
monster1612 said:
It's complicated. I recommend not doing this unless you're willing to follow it to the letter - when I get to creating the automated patcher, this won't be necessary.
Make backups!!
extract the boot.img from your ROM .zip, copy it to the device internal storage
install the Magisk Manager app, download the Magisk .zip and choose "patch boot image"; navigate to said boot image file
copy the modified image to a computer (preferably one running a Linux OS like Ubuntu)
download the boot_cert and u-boot.bin files from the official LineageOS/CM device repo; place these files in the same directory as the boot.img file
open a Linux terminal pointed to the same directory as the boot.img file
run for i in $(seq 1024); do echo -ne "\x00\x50\x7c\x80" >> stack.tmp; done to create the remaining file
run cat boot_cert patched_boot.img > boot.img (assuming the Magisk image produced is named patched_boot.img); this is the boot "signature"
run dd if=u-boot.img of=boot.img bs=8117072 seek=1 conv=notrunc to tag the second bootloader on
finally, run dd if=stack.tmp of=boot.img bs=6519488 seek=1 conv=notrunc to add the stack file; copy the new boot.img back to the kindle
reboot into recovery, flash the Magisk .zip to build the environment, but do NOT reboot yet
choose "Flash .img" within TWRP, select the boot.img, and select "Boot" to flash to the boot partition; reboot to system once complete
profit!
Click to expand...
Click to collapse
Thank you very much for the detailed instructions. I'll be keeping an eye out for the automated patcher you mentioned. Would love to try out magisk on my 2015 fire.
kn0wbodh1 said:
Thank you very much for the detailed instructions. I'll be keeping an eye out for the automated patcher you mentioned. Would love to try out magisk on my 2015 fire.
Click to expand...
Click to collapse
The instructions only work against the 2012 fire (HD 8.9", 2nd generation). They will more than likely brick any other device. I don't recommend trying the instructions unless you're 100% sure your device is that specific model.
Hi, a month ago i flashed oifficial magisk 16 zip on a 8.9 kindle fire hd, and as you said, dont boot anymore, just satys on the kindle fire logo, please can you tell me how can i restore my device?, i havent used it in almost 3 years and i dont have a clue on what to do, i just wanted to install viper4android and now is dead.
erick_gc said:
Hi, a month ago i flashed oifficial magisk 16 zip on a 8.9 kindle fire hd, and as you said, dont boot anymore, just satys on the kindle fire logo, please can you tell me how can i restore my device?, i havent used it in almost 3 years and i dont have a clue on what to do, i just wanted to install viper4android and now is dead.
Click to expand...
Click to collapse
https://forum.xda-developers.com/showthread.php?t=2128848&p=75525760
I know it's not for the 8.9" but I was able to get my 7" working by repeating the procedure in step 5. Magisk messes up the kernel on the Kindle so all you have to do is reflash the kernel. You'll need a fastboot cable to get in fastboot mode though.
Take a look at the few posts before the one I linked to.
just wondering if you've had any luck with the flashable zip for magisk? Not confident enough to try it manually. Thanks in advance.
monster1612 said:
Please also read the additional notes in post #2, as they are critical to getting Magisk working.
I decided to do some tinkering around with Magisk, and it actually DOES work on the kindles (at least the 8.9"). The problem is, Magisk's patcher just isolates the ramdisk part of the boot.img and doesn't add the boot signature or other magic back to the image when it's time to reflash the patched boot image. By dd'ing the signature (and other files) back to the image, I can get Magisk to successfully boot.
As part of the working POC (because it's exciting to actually see this!), I've uploaded the patched "Magiskified" boot image (which originally comes from the 20180319 LineageOS 14.1 ROM that was built about a week ago). For reference, this is patched by Magisk v16.0, and the setup is basically the same as the official boot.img makefile directions from CM12.1. (It was the most arbitrary source I found, and I doubt the magic used to create the boot images has changed, so I'm just using that script as a reference.) Try to stick to that ROM if you can - no telling what different ROM versions/variants might do if you're not careful.
I plan on releasing a flashable .zip soon (probably in a month? I have college to work through) to automate the patching process, and possibly even extract the official installer zips to work through Magisk's patching scripts manually so the required boot magic can be patched back into the image before it's ever flashed. (I'll try to take requests to manually patch other ROM boot.imgs if asked to in the meantime though.)
As a friendly reminder, please do NOT flash the official Magisk installer zips or any patched boot images that the app produces as is - they need to be "repatched" with the boot magic, or you'll have to fastboot flash your ROM's boot.img manually because the kindle will hang at the bootloader screen.
Click to expand...
Click to collapse
barcia99 said:
just wondering if you've had any luck with the flashable zip for magisk? Not confident enough to try it manually. Thanks in advance.
Click to expand...
Click to collapse
You can't directly flash the official installer zips onto the Kindle - they currently bork the boot image "signature" (causing the bootloader exploit to break) and require reflashing the boot image from your ROM via fastboot to get things working again.
What I've thought of is adding some device detection logic to the installer script and then having it run through the process of properly repatching the boot image after the main Magisk install finishes in order to get things to work (as opposed to having a supplementary zip file work through that after an official build is flashed).
I forked the official Magisk repo a while ago and honestly forgot about it, but since v17 hit stable since then, I'm going to rebase those proposed changes against that version. No ETA on that as of yet - I've started back at college, so time is already kind of a rarity; in addition, given the age of the Kindles already (5+ years!), it may not be a thing to sustain long term. I still have my 8.9", so testing isn't an issue, but I don't expect Magisk running on these specific devices to function as expected (so more than likely SafetyNet will fall, probably Magisk Hide as well). I'm not 100% sure how it'll turn out, but these are pretty much going to be unofficial builds for as long as I/anyone else willing to run builds sees a benefit to doing so. When a build works to my satisfaction, I promise it'll go up on XDA.
monster1612 said:
You can't directly flash the official installer zips onto the Kindle - they currently bork the boot image "signature" (causing the bootloader exploit to break) and require reflashing the boot image from your ROM via fastboot to get things working again.
What I've thought of is adding some device detection logic to the installer script and then having it run through the process of properly repatching the boot image after the main Magisk install finishes in order to get things to work (as opposed to having a supplementary zip file work through that after an official build is flashed).
I forked the official Magisk repo a while ago and honestly forgot about it, but since v17 hit stable since then, I'm going to rebase those proposed changes against that version. No ETA on that as of yet - I've started back at college, so time is already kind of a rarity; in addition, given the age of the Kindles already (5+ years!), it may not be a thing to sustain long term. I still have my 8.9", so testing isn't an issue, but I don't expect Magisk running on these specific devices to function as expected (so more than likely SafetyNet will fall, probably Magisk Hide as well). I'm not 100% sure how it'll turn out, but these are pretty much going to be unofficial builds for as long as I/anyone else willing to run builds sees a benefit to doing so. When a build works to my satisfaction, I promise it'll go up on XDA.
Click to expand...
Click to collapse
thank's much. i'll continue to do some research also. i've had this kindle since it came out and remains stable with root and twrp. runs smooth and just plain like it. only negative is no sd card slot. again thanks for your hard work.
Hoping for the automated package
Here's hoping you get time to finish the automated flash package. I am not confident enough to attempt this even with your detailed instructions.
monster1612 said:
You can't directly flash the official installer zips onto the Kindle - they currently bork the boot image "signature" (causing the bootloader exploit to break) and require reflashing the boot image from your ROM via fastboot to get things working again.
What I've thought of is adding some device detection logic to the installer script and then having it run through the process of properly repatching the boot image after the main Magisk install finishes in order to get things to work (as opposed to having a supplementary zip file work through that after an official build is flashed).
I forked the official Magisk repo a while ago and honestly forgot about it, but since v17 hit stable since then, I'm going to rebase those proposed changes against that version. No ETA on that as of yet - I've started back at college, so time is already kind of a rarity; in addition, given the age of the Kindles already (5+ years!), it may not be a thing to sustain long term. I still have my 8.9", so testing isn't an issue, but I don't expect Magisk running on these specific devices to function as expected (so more than likely SafetyNet will fall, probably Magisk Hide as well). I'm not 100% sure how it'll turn out, but these are pretty much going to be unofficial builds for as long as I/anyone else willing to run builds sees a benefit to doing so. When a build works to my satisfaction, I promise it'll go up on XDA.
Click to expand...
Click to collapse
Successfully patched the boot image and installed magisk 18 and installed some modules and they work
Trey n said:
Successfully patched the boot image and installed magisk 18 and installed some modules and they work
Click to expand...
Click to collapse
Great! Will you post the boot image? What modules have you tried? Is Wifi, Bluetooth, and LTE working?
kgiesselman said:
Great! Will you post the boot image? What modules have you tried? Is Wifi, Bluetooth, and LTE working?
Click to expand...
Click to collapse
took me a while but also finally got it all working. Thanks for this guide. It may help us in the 7, 8 and 10 tablets. I also note my Jem is currently on CM13
monster1612 said:
It's complicated. I recommend not doing this unless you're willing to follow it to the letter - when I get to creating the automated patcher, this won't be necessary.
Make backups!!
extract the boot.img from your ROM .zip, copy it to the device internal storage
install the Magisk Manager app, download the Magisk .zip and choose "patch boot image"; navigate to said boot image file
copy the modified image to a computer (preferably one running a Linux OS like Ubuntu)
download the boot_cert and u-boot.bin files from the official LineageOS/CM device repo; place these files in the same directory as the boot.img file
open a Linux terminal pointed to the same directory as the boot.img file
run for i in $(seq 1024); do echo -ne "\x00\x50\x7c\x80" >> stack.tmp; done to create the remaining file
run cat boot_cert patched_boot.img > boot.img (assuming the Magisk image produced is named patched_boot.img); this is the boot "signature"
run dd if=u-boot.img of=boot.img bs=8117072 seek=1 conv=notrunc to tag the second bootloader on
finally, run dd if=stack.tmp of=boot.img bs=6519488 seek=1 conv=notrunc to add the stack file; copy the new boot.img back to the kindle
reboot into recovery, flash the Magisk .zip to build the environment, but do NOT reboot yet
choose "Flash .img" within TWRP, select the boot.img, and select "Boot" to flash to the boot partition; reboot to system once complete
profit!
Click to expand...
Click to collapse
This works on the Kindle Fire HD 7 as well, just use the files from the Tate repository.
Devo7v said:
https://forum.xda-developers.com/showthread.php?t=2128848&p=75525760
I know it's not for the 8.9" but I was able to get my 7" working by repeating the procedure in step 5. Magisk messes up the kernel on the Kindle so all you have to do is reflash the kernel. You'll need a fastboot cable to get in fastboot mode though.
Take a look at the few posts before the one I linked to.
Click to expand...
Click to collapse
I also have the same issue, but I'm confused as to your referencing for Step 5, because the guide says specifically not to flash the freedom-boot image if you already have a custom ROM present. Can you reiterate on what to do, please, or can I ignore this warning?
BrianSamsungTab said:
I also have the same issue, but I'm confused as to your referencing for Step 5, because the guide says specifically not to flash the freedom-boot image if you already have a custom ROM present. Can you reiterate on what to do, please, or can I ignore this warning?
Click to expand...
Click to collapse
I reflashed the freedom-boot and got everything working properly. It's been a few months so I don't remember if i had to continue anything when it finally booted, but I do know that I didn't lose any data. I still don't know if you need to flash freedom-boot, but it works if you do.
a little late to the party but-
i recently made the mistake of installing magisk and it put the kindle in a bootloop. is there a way to push the stock boot.img with this method or is that too quick and dirty
any advice is appreciated. im tempted to just do a full wipe via the stock recovery but if theres a more surgical method id go for it. i also have a linux debian machine available.

[GUIDE] Recovering from a magisk bootloop without twrp

Just to add my experience here, I flashed MARS_SOM magisk rom module which entered a seemingly unrecoverable endless bootloop. This was likely as it conflicted with another magisk module or xposed that I have installed, so not the fault of the rom!
However given we've no twrp yet, the best way (after a LOT of research!) to fix this wasn't easy or obvious. I thought I could just flash stock kernel, uninstall magisk, flash magisk again and uninstall the module. Which unfortunately you can't as they remain in the system files and without root, you can't touch them, though with root, it loads and you get the bootloop - so a vicious endless cycle!
The solution I managed to work out, rather than a full clean wipe was to extract the stock boot from downloaded firmware (using Xperifirm), convert it to an img file using UnSIN, use to unpack, place a certain folder in there (found via the link below), repack and then fastboot flash. This makes magisk operate in core root mode only allowing you to uninstall the module. Once the module is uninstalled, you can simply disable core only mode from the magisk settings.
This saved me from a full wipe!
See here for more details about that unpacking the img, copying a folder etc see here:
https://forum.xda-developers.com/pi...modules-disabler-booting-magisk-t3976621/amp/
This worked for me and so hope it helps someone out too!
cd993 said:
Just to add my experience here, I flashed MARS_SOM magisk rom module which entered a seemingly unrecoverable endless bootloop. This was likely as it conflicted with another magisk module or xposed that I have installed, so not the fault of the rom!
However given we've no twrp yet, the best way (after a LOT of research!) to fix this wasn't easy or obvious. I thought I could just flash stock kernel, uninstall magisk, flash magisk again and uninstall the module. Which unfortunately you can't as they remain in the system files and without root, you can't touch them, though with root, it loads and you get the bootloop - so a vicious endless cycle!
The solution I managed to work out, rather than a full clean wipe was to extract the stock boot from downloaded firmware (using Xperifirm), convert it to an img file using UnSIN, use to unpack, place a certain folder in there (found via the link below), repack and then fastboot flash. This makes magisk operate in core root mode only allowing you to uninstall the module. Once the module is uninstalled, you can simply disable core only mode from the magisk settings.
This saved me from a full wipe!
See here for more details about that unpacking the img, copying a folder etc see here:
https://forum.xda-developers.com/pi...modules-disabler-booting-magisk-t3976621/amp/
This worked for me and so hope it helps someone out too!
Click to expand...
Click to collapse
With Unsin (on windows at least) you can just drag your file over the cmd without having to mess with command lines
AJHutchinson said:
With Unsin (on windows at least) you can just drag your file over the cmd without having to mess with command lines
Click to expand...
Click to collapse
Yeah that's a handy little feature, makes converting it super simple!
cd993 said:
Just to add my experience here, I flashed MARS_SOM magisk rom module which entered a seemingly unrecoverable endless bootloop. This was likely as it conflicted with another magisk module or xposed that I have installed, so not the fault of the rom!
However given we've no twrp yet, the best way (after a LOT of research!) to fix this wasn't easy or obvious. I thought I could just flash stock kernel, uninstall magisk, flash magisk again and uninstall the module. Which unfortunately you can't as they remain in the system files and without root, you can't touch them, though with root, it loads and you get the bootloop - so a vicious endless cycle!
The solution I managed to work out, rather than a full clean wipe was to extract the stock boot from downloaded firmware (using Xperifirm), convert it to an img file using UnSIN, use to unpack, place a certain folder in there (found via the link below), repack and then fastboot flash. This makes magisk operate in core root mode only allowing you to uninstall the module. Once the module is uninstalled, you can simply disable core only mode from the magisk settings.
This saved me from a full wipe!
See here for more details about that unpacking the img, copying a folder etc see here:
https://forum.xda-developers.com/pi...modules-disabler-booting-magisk-t3976621/amp/
This worked for me and so hope it helps someone out too!
Click to expand...
Click to collapse
Hi there; I was in the same situation, flashing a corrupted magisk boot image from standard firmware for XQ-AT51, provided by same author for simple rooting Xperia 1 II; my phone was without xposed, it was in clean factory state. the magisk boot image was taken from another thread "[ROOT] Magisk patched Boot Images & Instructions" designated for rooting of Xperia 1 II;
unfortunately is the same author who build your ROM, he delivered also corrupted magisk image.
It was not enter in bootloop if you flash only one image on phone, not both; his instructions are wrong. the correct flashing instruction is below, at end of my comment.
I solved in smilar way like you: using flashtool to obtain XQ-AT51 ftf file: XQ-AT51_58.0.A.3.39_1321-7706_R13A.ftf;
Attention: the name of file depends of region firmware you want to flash and type of phone (single or dual sim); the given names are with title of example.
Then from download folder of flashtool form your disk C:\Users\username\.flashTool\firmwares\Downloads (username is your username on pc); check for file: boot_X-FLASH-ALL-2389.sin ( applicable for XQ-AT51) and convert the file to .img using unsin; check on xda for unsin, extract unsin archive in exe file and then drag & drop over unsin.exe the file boot_X-FLASH-ALL-2389.sin; will be generated boot_X-FLASH-ALL-2389.img file.
This name file can be other, is just an example, if you have another phone with firmware for other region, pay attention to this!
This can be flashed then back to phone using adb comands; fastboot flash boot boot_X-FLASH-ALL-2389.img;
The same image can be transfered to phone and used later to generate correct magisk image and root the phone.
Best to you all!
daphix said:
Hi there; I was in the same situation, flashing a corrupted magisk boot image from standard firmware for XQ-AT51, provided by same author for simple rooting Xperia 1 II; my phone was without xposed, it was in clean factory state. the magisk boot image was taken from another thread "[ROOT] Magisk patched Boot Images & Instructions" designated for rooting of Xperia 1 II;
unfortunately is the same author who build your ROM, he delivered also corrupted magisk image.
It was not enter in bootloop if you flash only one image on phone, not both; his instructions are wrong. the correct flashing instruction is below, at end of my comment.
I solved in smilar way like you: using flashtool to obtain XQ-AT51 ftf file: XQ-AT51_58.0.A.3.39_1321-7706_R13A.ftf;
Attention: the name of file depends of region firmware you want to flash and type of phone (single or dual sim); the given names are with title of example.
Then from download folder of flashtool form your disk C:\Users\username\.flashTool\firmwares\Downloads (username is your username on pc); check for file: boot_X-FLASH-ALL-2389.sin ( applicable for XQ-AT51) and convert the file to .img using unsin; check on xda for unsin, extract unsin archive in exe file and then drag & drop over unsin.exe the file boot_X-FLASH-ALL-2389.sin; will be generated boot_X-FLASH-ALL-2389.img file.
This name file can be other, is just an example, if you have another phone with firmware for other region, pay attention to this!
This can be flashed then back to phone using adb comands; fastboot flash boot boot_X-FLASH-ALL-2389.img;
The same image can be transfered to phone and used later to generate correct magisk image and root the phone.
Best to you all!
Click to expand...
Click to collapse
Thanks for that, glad you managed to fix your situation too!
cd993 said:
Thanks for that, glad you managed to fix your situation too!
Click to expand...
Click to collapse
What to posted you is very very usefull; it helps you to fix after flashing wrong magisk module.
:good:

[ROOT]Stock and Magisk patched boot images

Until TWRP is available for this device, root must be done by flashing patched boot image via fastboot. I'm still in the waiting period for the bootloader unlocking, but I prepared files in the meantime. Maybe someone will find them useful. Attached are stock boot and patched image with Magisk 21.1, EEA ROM version. Just unzip them and flash from fastboot.
Full version: V12.0.6.0.QJSEUXM_20201117
Edit: patched boot image reuploaded, the previous one didn't work (at least on my phone). This one has been tested and is working fine.
hello,
having the EEA version 12.0.6.0, as a boot patch can I immediately give the modded boot, in fastboot?
carabot said:
hello,
having the EEA version 12.0.6.0, as a boot patch can I immediately give the modded boot, in fastboot?
Click to expand...
Click to collapse
You can flash patched boot image directly, or just hotboot it (fastboot boot patched_image.img) and install Magisk from Magisk manager.
hello,
I did and at the moment everything is ok.
thanks
but there is a strange thing, Mixplorer, it does not change the permissions of the files, yet it has root permissions
I think the root is not perfect, I can't change the permissions of the files
carabot said:
I think the root is not perfect, I can't change the permissions of the files
Click to expand...
Click to collapse
Which files on which partition with what kind of permissions? RO partitions must be remounted as RW, but it's not always possible and using Magisk is usually a better and safer approach.
hello
let's talk about system partition files how can I remount as RO?
using Mixplorer, if I click comeback as RO, it tells me failed
carabot said:
hello
let's talk about system partition files how can I remount as RO?
using Mixplorer, if I click comeback as RO, it tells me failed
Click to expand...
Click to collapse
I keep my system partition RO so I can apply OTA updates, so I haven't tried it. You could try another app (for example Total commander), but you will be probably out of luck because of Android 10 limitation. Read more detailed explanation here https://android.stackexchange.com/q...m-partition-locked-to-read-only-in-android-10
I would suggest using Magisk module for system modifications.
hi
i tried other app manager like root explorer and es explorer, but the result is the same. i also installed magiskhideprops module, but my phone is not supported as fingerprint yet
What are you trying to achieve?
the terminal command to try to mount as RO would you know?
_mysiak_ said:
What are you trying to achieve?
Click to expand...
Click to collapse
full root to modify root files
carabot said:
full root to modify root files
Click to expand...
Click to collapse
I meant which files do you want to modify and why..
carabot said:
the terminal command to try to mount as RO would you know?
Click to expand...
Click to collapse
It's in the link above, along with explanation why it might be impossible to do.
I wanted to change the audio files regarding the volume, I wanted it a little higher
carabot said:
I wanted to change the audio files regarding the volume, I wanted it a little higher
Click to expand...
Click to collapse
Why don't you do it with a Magisk module? Once you install a module, you can edit it directly in /data/adb/modules folder.
i read android 10 problem, would you recommend me to mount with termux, installing vim?
_mysiak_ said:
Why don't you do it with a Magisk module? Once you install a module, you can edit it directly in /data/adb/modules folder.
Click to expand...
Click to collapse
i don't know about magisk modules that can affect volume controls
carabot said:
i don't know about magisk modules that can affect volume controls
Click to expand...
Click to collapse
If you know how to edit system mixer files, you should be able to build your own module (or adapt one of the existing ones). But of course it's up to you, I'm just offering a well known and working solution to your problem.
_mysiak_ said:
If you know how to edit system mixer files, you should be able to build your own module (or adapt one of the existing ones). But of course it's up to you, I'm just offering a well known and working solution to your problem.
Click to expand...
Click to collapse
unfortunately no, I edit the audio value of the system files, but I don't know how to build a module
Hello
the twrp for gauguin is online, to mount it i have to go back to the stock boot?

Categories

Resources