Factory Reset and Magisk Modules - Introductions

Hello, this is my first post here in the XDA community!
I'm really in need of an answer to the following question: If I do a factory reset on my android smartphone, will the magisk modules be deleted?
Thanks in advance! <3

Welcome to the xda family.
Magisk itself resides in the boot image (boot partition).
Depending on the device, it might be in recovery or init_boot instead.
Magisk's configuration, settings and modules all reside in user data.
Factory Data Reset will erase user data.
Magisk will remain but, all modules and configuration will be gone after a Factory Reset.
Cheers.

Related

Xposed Lollipop Solutions to Problems

DISCLAIMER: I'M NOT RESPONSIBLE FOR ANYTHING IN THIS THREAD
If Xposed isn't working, here are some things to try:
-Install and activate a module
-Using the app 'SELinux Mode Change', set SELinux as permissive and (soft) reboot.
-If it doesn't work after a reboot, then soft reboot. You might need to do this after every normal reboot/power on. This is because SELinux is being set as permissive to late in the booting process, but soft reboot keeps it as permissive. Flashing a kernel with SELinux permissive would help
Edit: Here's a fix http://forum.xda-developers.com/showthread.php?p=59188984
-Mount system in recovery
-Flash it a second time in recovery
-For low storage issue, wipe dalvik cache and cache partition
-Don't use on TouchWiz
-Only for Armv7+
-You might end up in a boot loop
-There's no zip to reverse it yet, so you'll need to restore a backup or system partition.
Edit: You can flash this reverse zip, but he's asking people to test it, so I wouldn't use it unless you have a boot loop where you need to undoe it, or you're sure you know how to recover from a brick. Best to wait until it's been fully tested.
http://forum.xda-developers.com/showpost.php?p=58966408&postcount=2273
Thanks to piskor for making me aware of this.
Edit 2: It seems the download link was removed. Either way, I'm not sure if it would work on alpha 2.
-To test, use XGELS, it works quite well on Lollipop.
tzzeri said:
...
-There's no zip to reverse it yet, so you'll need to restore a backup or system partition.
...
Click to expand...
Click to collapse
For testing by boot loopers as @CarvedArt said
http://forum.xda-developers.com/showpost.php?p=58966408&postcount=2273
I couldn't get xposed on my Nexus 5 (5.0.2, stock, custom recovery) and every time I did flash the .arm file, I got into a bootloop.
So, I performed a factory reset, updated the TWRP from 2.8.1.0 to 2.8.5.2 version and everything worked like a charm.
I didn't need to install the selinux changer.

Starting clean: Magisk and Xposed Modules. How to install, order, etc.

Hello
Im going to wipe my entire Marshmallow ROM and go to Nougat.
I used Xposed modules a lot.
But Im intrested in some Magisk things as well so Id like to use both.
First thing after wiping is going to install Snapchat and log on. After that, I need Titanium Backup to freeze and make a backup copy which is where root and/or MagiskSU come in. I want to do it correctly and right so what is the correct way to go upon this in this scenario?
Thank you
riahc3 said:
Hello
Im going to wipe my entire Marshmallow ROM and go to Nougat.
I used Xposed modules a lot.
But Im intrested in some Magisk things as well so Id like to use both.
First thing after wiping is going to install Snapchat and log on. After that, I need Titanium Backup to freeze and make a backup copy which is where root and/or MagiskSU come in. I want to do it correctly and right so what is the correct way to go upon this in this scenario?
Thank you
Click to expand...
Click to collapse
The below order has worked fine for me in the past:
Wipe all partitions (I personally wipe internal storage as well) and format data
Reboot to recovery and copy the zips to the internal storage
Flash ROM
Flash GApps
Flash Magisk/SuperSU
Flash custom kernel
Wipe cache and dalvik-cache
Reboot and setup the phone
Setup Snapchat and backup it's app+data using Titanium Backup once logged in
Reboot to recovery
Flash Xposed
Wipe cache and dalvik-cache
Reboot
shadowstep said:
The below order has worked fine for me in the past:
Wipe all partitions (I personally wipe internal storage as well) and format data
Reboot to recovery and copy the zips to the internal storage
Flash ROM
Flash GApps
Flash Magisk/SuperSU
Flash custom kernel
Wipe cache and dalvik-cache
Reboot and setup the phone
Setup Snapchat and backup it's app+data using Titanium Backup once logged in
Reboot to recovery
Flash Xposed
Wipe cache and dalvik-cache
Reboot
Click to expand...
Click to collapse
Looks like a good solid order to get both Magisk and Xposed working on Nougat. Ill try to do that.
riahc3 said:
Looks like a good solid order to get both Magisk and Xposed working on Nougat. Ill try to do that.
Click to expand...
Click to collapse
You can also install systemless Xposed through magisk manager. It's a magisk module. Then you can easily turn off Xposed if you need to pass safetynet.
You can do it after setting everything else up. Then go into magisk manager and install Xposed (for your correct API) and the systemless Xposed installer APK (it's in the description in magisk manager for Xposed magisk module) then reboot, wipe cache and dalvik, and boot system. Some have said they had to install Xposed APK after first boot after installing framework in magisk.
madbat99 said:
You can also install systemless Xposed through magisk manager. It's a magisk module. Then you can easily turn off Xposed if you need to pass safetynet.
You can do it after setting everything else up. Then go into magisk manager and install Xposed (for your correct API) and the systemless Xposed installer APK (it's in the description in magisk manager for Xposed magisk module) then reboot, wipe cache and dalvik, and boot system. Some have said they had to install Xposed APK after first boot after installing framework in magisk.
Click to expand...
Click to collapse
So:
Wipe all partitions and data
Reboot to recovery and copy the zips to the internal storage
Flash ROM
Flash GApps
Flash Magisk/SuperSU
Flash custom kernel
Wipe cache and dalvik-cache
Reboot and setup the phone
Setup Snapchat and backup it's app+data using Titanium Backup once logged in
Open Magisk Manager
Install Systemless Xposed
Reboot to recovery
Wipe cache and dalvik-cache
Reboot
Install my Xposed modules
Thats your recommendation?
riahc3 said:
So:
Wipe all partitions and data
Reboot to recovery and copy the zips to the internal storage
Flash ROM
Flash GApps
Flash Magisk/SuperSU
Flash custom kernel
Wipe cache and dalvik-cache
Reboot and setup the phone
Setup Snapchat and backup it's app+data using Titanium Backup once logged in
Open Magisk Manager
Install Systemless Xposed
Reboot to recovery
Wipe cache and dalvik-cache
Reboot
Install my Xposed modules
Thats your recommendation?
Click to expand...
Click to collapse
To make an very full clean flash to get:
- SU access
- Custom kernel
- GApps
- Magisk
- Xposed
- Snapchat
Yeah :good:
riahc3 said:
So:
Wipe all partitions and data
Reboot to recovery and copy the zips to the internal storage
Flash ROM
Flash GApps
Flash Magisk/SuperSU
Flash custom kernel
Wipe cache and dalvik-cache
Reboot and setup the phone
Setup Snapchat and backup it's app+data using Titanium Backup once logged in
Open Magisk Manager
Install Systemless Xposed
Reboot to recovery
Wipe cache and dalvik-cache
Reboot
Install my Xposed modules
Thats your recommendation?
Click to expand...
Click to collapse
Don't forget the modified Xposed installer/manager APK. When you click on Xposed in magisk to get description the link for it is there. And I think you flash magisk zip after your custom kernel (because it modifies boot.img). And setup all your other stuff before Xposed (like opening magisk and make sure it's good). First boot after installing Xposed can take a while, it has to optimize pretty much everything. But everything else looks good.
Im just flashing a ROM (which I believe already has the custom kernel)
Very good list, but I have doubt about this order:
madbat99 said:
And I think you flash magisk zip after your custom kernel (because it modifies boot.img).
Click to expand...
Click to collapse
Because in first post in Magisk thread is stated:
Magisk said:
If you plan to flash a custom kernel, flash it AFTER installing Magisk.
Click to expand...
Click to collapse
thanks

System update in TWRP - Wipe/format system partition

Hy People,
What is the impact if i wipe system and format system partition before flash an update in TWRP?
I will lose some data? Call log, contacts, accounts or other things?
I will lose any Magisk modules?
I will lose any Xposed modules?
I will lose any system changes i already made?
I like to reflash the system wiping cache/dalvik and the system, then format system partition and flash the same system image, but i dont want to lose any data. Its safe?
Tks a lot
By wiping system you're just nuking system, no data is going to be lost. You will have to say bye to every mod you installed to system partition, if any.
Magisk modules, Xposed modules, call log, contacts etc. are all stored in data partition.
You're safe.
przemcio510 said:
By wiping system you're just nuking system, no data is going to be lost. You will have to say bye to every mod you installed to system partition, if any.
Magisk modules, Xposed modules, call log, contacts etc. are all stored in data partition.
You're safe.
Click to expand...
Click to collapse
Thanks. One other question. When i flash one full ROM(an update) over other ROM, the replaced system was completelly erased or its possible to remaining some garbage? Im focusing only in system partition. Tks again :good:
rgregor210881 said:
Thanks. One other question. When i flash one full ROM(an update) over other ROM, the replaced system was completelly erased or its possible to remaining some garbage? Im focusing only in system partition. Tks again :good:
Click to expand...
Click to collapse
Flashing ROM zip practically wipes (thus erases) entire system partition, but flashing one ROM on top of another isn't recommended, because it may bring problems such as force closes, because of incompatibility between databases.
rgregor210881 said:
What is the impact if i wipe system and format system partition before flash an update in TWRP?
I will lose some data? Call log, contacts, accounts or other things?
I will lose any Magisk modules?
Click to expand...
Click to collapse
I agree with the previous responses, but also add a few comments:
- If you are talking about a stock OOS update, you can often (but not always) keep your data when updating. This is called a "dirty" flash. But you should still plan on backing up your data before updating. As you may run into problems, and still need to "clean" flash (wipe data). As I like to put it: hope for the best, but prepare for the worst.
- For a more minor update, for example OOS 5.0.1 to 5.0.3, dirty flash is often okay (as mentioned). But something more major, such as OOS 4.x to 5.x, a clean flash is highly recommended, maybe even required. Even with minor updates, clean flash is recommended, if you want to reduce the chances of any bugs or problems.
- Once you flash the update (again I am assuming you mean an OOS update) you will be unrooted. Flash Magisk immediately after flashing the OOS update (do not reboot in between!). This will get you rooted again, and also prevent TWRP from being overwritten by stock recovery (which may happen if you flash the update, and reboot before rooting).
- After dirty flash and flashing Magisk, your Magisk modules should be present and working fine. Somewhat obvious, for clean flash, you will need to install Magisk modules again.

Magisk Module causing freeze at boot

I have a Moto x4 running android 8.1 Oreo with November security patches and magisk v18. Stock recovery and rom. I tried installing a couple magisk modules and the phone won't boot with magisk patched boot image installed. I have restored the stock boot image backup and the phone will run without magisk. I have erased magisk manager's cache, and even uninstalled magisk manager, but the modules are still installed and if i use fastboot boot patched_boot.img it won't boot. My system is encrypted and when I boot the TWRP bootable, I am unable to flash or delete anything outside of the user data or my SD card. I cannot install any zip including magisk manager for recovery or magisk core mode only module. I have tried everything I know to do and then some. Any input or assistance would be greatly appreciated. I would like to avoid resetting my data if possible.
Basically, I think I need to delete magisk.img from my system, but I cannot find it anywhere in my system partition using twrp's file browser. Also, I no longer have root access so I cannot adb root and adb shell into it.
Magisk image is in /data/adb. If you have access to /cache, create a file there named ".disable_magisk" (without quotation marks and with the leading dot). That'll enable Core Only Mode.
https://www.didgeridoohan.com/magis...agisk_functionality_bootloop_loss_of_root_etc
Didgeridoohan said:
Magisk image is in /data/adb. If you have access to /cache, create a file there named ".disable_magisk" (without quotation marks and with the leading dot). That'll enable Core Only Mode.
https://www.didgeridoohan.com/magis...agisk_functionality_bootloop_loss_of_root_etc
Click to expand...
Click to collapse
unfortunately, both the /data/adb and /cache are encrypted and inaccessible without root.
That is great to know for the future though, thanks
I got it to work. I needed to use the newest twrp bootable image in order to decrypt the data in recovery. Once this was done, I was able to erase magisk.img with no issues at all. Thanks for all the help.

Uninstall twrp without wiping data

Hi, please, I need help. I wanted to root my note 8 (exynos) using TWRP (with odin) and MAGISK. But at the reboot in recovery mode, TWRP asks me to wipe my data, something I don’t wanna do of course. The problem is i can’t go back because the system reboots in a loop and I can’t make a backup of my rom with all my data because it doesn’t recognize them, when I mount a partition I can’t select data. Thank you for helping me because I don’t wanna lose my files.

Categories

Resources