Skip to content

Instantly share code, notes, and snippets.

@varhub
Last active June 11, 2020 07:27
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save varhub/0b6d86e372d8b194cd84 to your computer and use it in GitHub Desktop.
Save varhub/0b6d86e372d8b194cd84 to your computer and use it in GitHub Desktop.
XPOSED - Recover from bootloop

XPOSED - Recover from bootloop

Tested with Lollipop and Marshmallow. Some file path had been changed since ICS/KK 1.


When you activate an Xposed module and produces a bootloop, there are three options to recover it:

  1. Restore a nandroid

  2. Disable Xposed

  3. Disable only problematic module

  4. Disable Xposed


Xposed framework has a self-feature to auto-disable it. It can be reached from command prompt (example: adb).

Just create empty file called disabled by typing:

touch /data/data/de.robv.android.xposed.installer/conf/disabled

Simple "install zip from recovery" is also possible 2 -- thaks to AK1149.

  1. Disable only problematic module

You can also remove single module from recovery.

Active modules can be found at: /data/data/de.robv.android.xposed.installer/conf/modules.list

Update: new file to do this trick at /data/data/de.robv.android.xposed.installer/conf/enabled_modules.xml. Officially supported, no more UI drawbacks.

From adb you can:

adb pull /data/data/de.robv.android.xposed.installer/conf/modules.list .
nano modules.list
# Delete problematic module's line
adb push modules.list /data/data/de.robv.android.xposed.installer/conf/modules.list
# Check
adb shell
cat /data/data/de.robv.android.xposed.installer/conf/modules.list

Notes

  • If you do it from recovery, notice that data partition should be mounted.
  • Regret edit files from Windows because it will include \r special character
  • Git Bash (git-scm) do NOT work with adb because it modify paths.
  • By editing modules.list, module is deactivate but retain Xposed Installer "tic", so you must deactivate and reactivate it again to synchronize data.

Bibliography


Written by varribas using StackEdit.

@varhub
Copy link
Author

varhub commented May 6, 2016

Indeed @kschang77, you can also do this. At now enabled_modules.xml has been moved along modules.list. So it seems to be now the official and supported way to do it.

PS: when I used Xprivacy, disable it for a while was never an option. So any method that disables xposed of every modules is blacklisted for me.
adb + pull + nano/vim + push is not a big deal to do it as correct as possible.

@david7697
Copy link

@kschang77 Thank you for the suggestion. I tried deleting "enabled_modules.xml" but it didn't seem to disable the Xposed Module because I was still stuck in a loop of "Unfortunately, system ui has stopped" messages after enabling a few modules at the same time.

I then tried renaming the "modules.list" file to "modules.listt" (so it was unrecognizeable by the system) using TWRP's file manager and it worked. So I think that file is the money shot. I didn't have to factory reset and re flash my ROM, so thanks for the suggestions. The commands in adb might do the a similar thing, though. Not sure.

@AlwyNjOshy
Copy link

i changed name /conf/modules.list to modules.listt but didnt work so changed enabled_modules.xml to enabled_moduless.xml also didnt work out for me, then I have to disable xposed fully by creating file through terminal touch /data/data/de.robv.android.xposed.installer/conf/disabled
Soruce : http://forum.xda-developers.com/xposed/xposed-lollipop-stuck-bootloop-t3055816

@andrikos
Copy link

I think the updated file is /data/data/de.robv.android.xposed.installer/shared_prefs/enabled_modules.xml

Thanks for the guide!

@fmfer
Copy link

fmfer commented May 18, 2017

You can safely uninstall a module without root, and without any special recovery image, simply with ADB in user mode:

In my case I was trying to uninstall GravityBox because it boot-looped after I activated image-blur for lock screen (wtf...) :

shell@konka92_wet_jb9:/ $ start servicemanager      
shell@konka92_wet_jb9:/ $ pm uninstall -k com.ceco.gm2.gravitybox              

Anyway, I think your fail-safe mechanism would be much much more useful if you looked for a file called something like "xposed.disabled" in the root of all partitions, so we don't need root privileges to be able to create it in case of an emergency. I lost many hours because of this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment