Bootloop after rom update with toggle on certain roms
In the procedure for updating a rom in the FAQ, one is supposed to flash Xposed toggle which enables Xposed before booting the system. XPrivacy, in combination with the toggle, seems to cause certain roms to bootloop whereas others work fine. E.g. Paranoid Android and PAC bootloop whereas CyanogenMod does not.
After having been in contact with both the developer of the toggle and the developer of Xposed framework and sending logcats, it seems that XPrivacy is what causes it somehow.
It is just the first boot that doesn't work. If I flash the new rom update and then the toggle, the phone will bootloop. If I don't enable Xposed after the rom update, the phone manages to boot. Then I can install Xposed normally through the Xposed Installer, which for some reason, does not cause a bootloop when I reboot my phone. In other words, the bootloops only occur during the first boot if the toggle (or a backup script) is used after a rom update. If Xposed is not enabled before booting the first time, there will be no bootloops. So for some reason, copying the Xposed app_process to /system/bin/app_process causes a bootloop.
Could you please provide logcats and tell me what the author of the toggle and @rovo89 exactly said about this?
All posts related to this problem in the order of time written, though I think the last 5 posts will be most relevant to you since the first 6 were about a problem with the toggle and TWRP: http://forum.xda-developers.com/showpost.php?p=46190176&postcount=4271 http://forum.xda-developers.com/showpost.php?p=46190339&postcount=4273 http://forum.xda-developers.com/showpost.php?p=46204105&postcount=4287 http://forum.xda-developers.com/showpost.php?p=46209680&postcount=4293 http://forum.xda-developers.com/showpost.php?p=46216047&postcount=4294 http://forum.xda-developers.com/showpost.php?p=46216527&postcount=4295
http://forum.xda-developers.com/showpost.php?p=46217972&postcount=4297 http://forum.xda-developers.com/showpost.php?p=46218165&postcount=4298 http://forum.xda-developers.com/showpost.php?p=46221294&postcount=4299 http://forum.xda-developers.com/showpost.php?p=46226914&postcount=4304 http://forum.xda-developers.com/showpost.php?p=46227458&postcount=4305
After the last post, I sent an almost 3 mb large logcat to rovo89 via PM, which I now also sent to you on xda via PM.
After looking at it, he asked me to turn all modules off and try updating again before he would start thinking about it. I did and then it worked - no bootloop. My only modules are XPrivacy and rovo89's smiley replacer and since I've had this problems for a few weeks and I started using the smiley replaces three days ago, I assume it is related to XPrivacy.
After being able to boot when the modules were off, rovo89 told me to contact you.
I just don't want to give a direction as I'm not the developer of this surely great app. But I feel like many people tend to get stuck in bootloop, unusable device after _de_installation and such. I think one way to get a little closer to a recovery from stuff like this would be to get XPrivacy to know when it's time to get out of the way. One could maybe implement a thing such as a tracker for unsuccessful boot ups. Once a specific count is reached for the non-success case, Xprivacy should either disable its own or just let go through anything to give people a chance to recover from that threat instead of doing a complete wipe and re-install again. Another approach could be a file in a specific place that contains some specific data that no other app could ever guess.
I myself would take a good 6 hours to do a full install that satifies me when I have no NANDROID handy. I was not buged by an XPrivacy related re-install ever but I know that very uncomfortable situation from playing around with ie. modified Prism APKs or tries to strip down the size of the system to a bare minimum. One time you have made a dump mistake while stripping the system and you're f***ed. Same goes for a 'bad' XPrivacy template or an accidentally hit restriction for Android System....
Just my 2 cents that were in no way meant to sound rude or push anyone in any direction.
There is the possibility to simply flash a zip file which disables Xposed. This file is written to the SD card automatically when a user installs Xposed and it is also available from http://forum.xda-developers.com/showthread.php?t=1574401.
I think finding good (and reliable!) heuristics to detect wrong system behavior is hard. On the one hand, there are many different situations which can prevent you from reverting to safe settings (not only for XPrivacy, but also for other modules). On the other hand, you don't want the kill-switch to trigger just because you rebooted too fast.
There are plans and even some code to create the file /data/data/de.robv.android.xposed.installer/conf/disabled on certain key presses or touches. This disables most of Xposed (including all modules), so unless something is really messed up (but that will usually detected before the installation), you should get back into the system and can then correct your settings. This isn't finished yet, but again, you can simply flash the zip to disable Xposed completely.
@kosique In my opinion, one should never play around with things like this without nandroid backups. I never flash a nightly and I never update the framework or XPrivacy without first making a backup. In this case, the worst that seems to happen is a bootloop. Since it is related to /system, one could just format /system and re-flash the rom, resulting in no data loss since user data is stored on /data. In case one happens to restrict a system app, one could either flash the Xposed disabler @rovo89 mentions, format /system and re-flash the rom ( = removes the Xposed framework) or, in the worst case, remove the Xprivacy folder in /data using adb in recovery. Please note that I haven't tried the latter solution, though. As always: make a backup before trying anything like that.
Nonetheless, inexperienced users might find your suggestion useful and, according to me, the easier things are, the better :)
In summary, to me, this bug is not serious since it is not dangerous, although inexperienced users could find get problems. It is just annoying because it takes so much longer to update a rom.
I cannot determine using the logcat you have sent me what the cause is. The only real problem I see is that cLock is broadcasting before the system is ready.
I think I was using PAC at the time. Now I'm using Paranoid Android again, which doesn't include cLock. If you want, I could wipe my phone (resulting in a less messy logcat?), update once more and send you a new logcat?
I am closing this issue, because the toggle is not officially supported.