I seem to have a problem whereby, when I do
adb install -r <module.apk>
then sometimes Xposed doesn't seem to find that the module has changed. To be sure I have to manually go into the GUI and click and unclick the module checkbox. Sometimes, rarely though, I get a popup detecting the module has been replaced and asks me directly if I want to reboot. Then it works.
Is this a known bug with Xposed for Nougat Android 7 etc.
Solved!
I found out that I most likely rebooted before the
Intent.ACTION_PACKAGE_ADDED intent was intercepted by Xposed Framework (probably)
This Intent most likely contained the path to the apk, which resides in a folder that every other time of a reinstallation changes suffix between "-1" and "-2". This seemed to be causing File not found by Xposed Framework every other (reinstallation) time.
Conclusion:
Don't reboot Xposed before the Intent.ACTION_PACKAGE_ADDED Intent is broadcast by Android!
It is a bit strange however, that I don't always seem to get that Xposed Framework "Do you want to reboot because a module has been updated" Toast however... though it seems to work anyway as long as you wait long enough though. Then, again, if the toast never show, then you won't know how long to wait, and sometimes it can take quite a while actually!
Related
I have 2 modules for Xposed.
Cool Tool and XPrivacy.
I inactivated them both in Xposed program but after reboot they still run at startup and Cool Tool don't seem to be affected at all, and XPrivacy says it's inactivated in Xposed. But why are they still running? I turned them of for a reason....
I have problems to solve that need Xposed to be shut down, but how can I shut Xposed down if it does not work?
Modules should be inactive but they still run..
How can I solve this issue? Xposed and it's modules must be totally shut off, nothing of them can be running.
I cannot uninstall them, I just want them shut down temporarily until I want to start them again.
sgs5 sm-g900f
As far as I know, the only way to deactivate xposed is to actually uninstall it within the xposed installer. You can always reinstall it again the same way...
Gesendet von meinem GT-N7000 mit Tapatalk
kgyirhj said:
I have 2 modules for Xposed.
Cool Tool and XPrivacy.
I inactivated them both in Xposed program but after reboot they still run at startup and Cool Tool don't seem to be affected at all, and XPrivacy says it's inactivated in Xposed. But why are they still running? I turned them of for a reason....
I have problems to solve that need Xposed to be shut down, but how can I shut Xposed down if it does not work?
Modules should be inactive but they still run..
How can I solve this issue? Xposed and it's modules must be totally shut off, nothing of them can be running.
I cannot uninstall them, I just want them shut down temporarily until I want to start them again.
Click to expand...
Click to collapse
You might be confusing the mods with their respective apps. An Xposed module is some extra functionality that is bundled with a regular app, and that the framework activates if it's turned on in the configuration. Even if you don't, the "rest of the app" will still be on your system, just not the module part. Many modules only consist of the Xposed stuff, while other apps may contain additional logic.
Greenify is one such example - you'll still have that app installed and running at startup even if you don't have Xposed installed at all. The 2 examples you mentioned might be the same situation, and if you're not happy with it, your only option is to uninstall them regardless of having Xposed or not.
kgyirhj said:
I have 2 modules for Xposed.
Cool Tool and XPrivacy.
I inactivated them both in Xposed program but after reboot they still run at startup and Cool Tool don't seem to be affected at all, and XPrivacy says it's inactivated in Xposed. But why are they still running? I turned them of for a reason....
I have problems to solve that need Xposed to be shut down, but how can I shut Xposed down if it does not work?
Modules should be inactive but they still run..
How can I solve this issue? Xposed and it's modules must be totally shut off, nothing of them can be running.
I cannot uninstall them, I just want them shut down temporarily until I want to start them again.
sgs5 sm-g900f
Click to expand...
Click to collapse
Tungstwenty said:
You might be confusing the mods with their respective apps. An Xposed module is some extra functionality that is bundled with a regular app, and that the framework activates if it's turned on in the configuration. Even if you don't, the "rest of the app" will still be on your system, just not the module part. Many modules only consist of the Xposed stuff, while other apps may contain additional logic.
Greenify is one such example - you'll still have that app installed and running at startup even if you don't have Xposed installed at all. The 2 examples you mentioned might be the same situation, and if you're not happy with it, your only option is to uninstall them regardless of having Xposed or not.
Click to expand...
Click to collapse
I just wanted to add that you can Deactivate them in the installed applications. That would put them to "hibernate" w/o having to uninstall them and w/o loosing their configurations. If what one wants is to stop any app (including Xposed modules) you can just try what I suggested (it only works for downloaded apps). The app will also dissapear from the Xposed module list. You can revert afterwards.
Does it happen to anyone else where running xposed dramatically decreases battery life?
-Running Xposed 2.7 Experimental1 on stock 4.4 rooted Droid Mini
Lately, I've been encountering some issues with Xposed in general.
-When downloading a new module
Anytime I find a new module I want, I download it normally and it downloads/installs no problem. But once it finishes, I don't get a notification to activate it and the module screen still says install. If I go to my modules, it's not there. I have to kill Xposed from recent apps and reopen it to my modules for the one I downloaded to be there, and only then can I activate it, which gives me the toast message to reboot.
-When updating an installed module
Similar to above, whenever I download a module update, it goes through normally, but after install, Xposed still says there's an update for said module, and said module disappears from my modules. Killing Xposed and reopening to my modules afterwards makes it show up, but in order for the module update changes to take effect, I have to disable the module, re-enable it, then reboot my phone.
Anyone have any idea? I've uninstalled and reinstalled the framework but that did nothing.
Samsung Xposed Safe Mode script v1.0
What does it do?
This is an init.d script which emulates the xposed safe mode where you can press any button during boot, get a vibrate (to know it detected you), and it will disable all your xposed modules. To be used in case of bootloops because of incompatible modules.
This only disables all modules so that you can boot. It does NOT actually uninstall or disable xposed itself.
Why would I need this?
I talked with the developer of xposed for Samsung, wanam, and apparently, xposed safe mode was disabled for Samsung devices due to a Knox issue (if you disabled xposed, Knox will hate you and refuse to boot the phone). This is good, but if you have a bootloop, AND you're on a bootloader locked device, you have NO CHOICE but to wipe your data. Ouch!! That's a heavy penalty for accidentally installing one malfunctioning module!
Or maybe your phone still is bootloader unlocked, but you're running Samsung xposed and safemode is still disabled for you. Then you'd rather have xposed safemode back just for the ease of not having to go through recovery to fix things.
How does it work?
1. Press any of three buttons during boot (volume keys, or home button). You have 10 seconds from bootup to choose to do this.
2. System will give you 2 short vibrates to tell you it detected it.
3. Press any button 4 more times, each time will give you another short vibration.
4. One long vibration will signal to you that xposed has been disabled.
5. The script will automatically reboot your device in 6 seconds. This is because we can't disable xposed, so xposed will STILL load modules on this bootup, which means you'll still see the bootloop momentarily until you reboot.
Great! How do I install it?
This is an init.d script, so you need init.d support in your phone. Obviously, if you have a bootlocked device, you probably don't have init.d support. This is not a guide on how to get init.d support, but I'll offer you a few tips you can use to search yourself.
- install-recovery.sh, since it's called by init.rc during boot, can be hijacked in order to create an init.d system.
- If install-recovery didn't work, SuperSU also includes an su.d directory which is executed at a similar time. Just throw a script in there, or throw a script in there which enables use of the init.d folder (run-parts /system/etc/init.d).
Anyways, here's how you install it:
- Place the script you downloaded into
Code:
/system/etc/init.d
OR
Code:
/system/su.d
Give the script proper permissions for the folder it's in
- For su.d folder, it is root:root 0700 (rwx------)
- For init.d folder, it could be a variety of permissions. My init.d folder runs as a result of su.d, so I gave it same permissions as su.d. If yours doesn't, then you might want to try root:root 0755 (rwxr-xr-x)
- The important point here is to make sure it's at least root user and group, readable and executable, rwxr-xr-x
Will it work on my device?
It should work on any device really, if you follow the simple instructions. But I've only tested it on the ATT S4 (Lollipop 5.0.1), so I can't guarantee it will work on your device. Test it out and see if it works for you! It probably will!
You saved me!
I'm glad to hear that! I love to hear and see a thanks, so make sure to click the thanks button and maybe write a post too!
Bugs and problems
You know how to report bugs and issues. State all relevant information related to the problem; device, problem in clear detail, with reproducible steps, and anything else you might need.
Related custom xposed builds
Here are a list of Samsung custom xposed builds I know this "safe mode problem" to be present in. (Don't forget, this problem is likely to be in any and all Samsung xposed custom builds due to the nature of the Knox problem).
[UNOFFICIAL] Xposed for Samsung Lollipop by arter97
[UNOFFICIAL][5.0][v87.1][03 Dec] Xposed for Samsung Lollipop 5.0.x
[UNOFFICIAL][5.1/6][v87.1][28 Nov]Xposed for Samsung Lollipop/Marshmallow
Disclaimer: As usual, while I've made every attempt to make it perfect, there are no guarantee it will work for you. By using this, you agree not to hold me accountable in case something bad happens to you (or it didn't save your device)! Do your own testing to make sure it works before you actually need to use it in an emergency!
FAQ
It didn't vibrate
You probably have a different device which places the vibrator in a different location. I don't have your device, so maybe you'll need to help me debug and find where the vibrator is located at.
It didn't work!
What happened? Give me some detailed information about exactly what you did, what happened, and the device you're on!
Some possible problems to investigate are:
Does the script have correct user: owner and permissions?
Is your init.d or su.d system even working? Make sure it is first
Nice work!
It should help with incompatible modules leading to a bootloop, but it won't prevent Xposed from loading, the flag "/data/data/de.robv.android.xposed.installer/conf/disabled" is ignored on my Xposed version, done here for a reason, i got many bootloop reports in the past by people accidentally triggering safe mode by physical buttons, leading to Knox refusing to deal with modified binaries.
Fortunately it does not seem to be the same with TouchWiz 7.0, so i will bring it back later for Nougat.
wanam said:
Nice work!
It should help with incompatible modules leading to a bootloop, but it won't prevent Xposed from loading, the flag "/data/data/de.robv.android.xposed.installer/conf/disabled" is ignored on my Xposed version, done here for a reason, i got many bootloop reports in the past by people accidentally triggering safe mode by physical buttons, leading to Knox refusing to deal with modified binaries.
Fortunately it does not seem to be the same with TouchWiz 7.0, so i will bring it back later for Nougat.
Click to expand...
Click to collapse
Thank you!
It certainly will help a lot for disabling incompatible modules. Yes, although it doesn't technically disable xposed itself. It's really great that future versions aren't that way!
I actually thought of creating another script which utilizes back and menu key buttons to actually uninstall xposed from backups (an actual disable xposed script of sorts), but I thought it was too much.
Hi! Is there a way to enable/disable a Magisk Module with a script?
I'm using a Xiaomi Mi A1 and I would like to use Measure App. It works only the first time (or so) I disable/enable the module to change device fingerprint. Is it possible to run a script that disables and re-enables the module at boot? Thanks.
Disabling and then enabling a module takes a reboot between every action. It can't be done in one boot...
But, I suspect that this might not actually be the solution you're looking for. Provide more details, please. What module are you talking about? What functionality is it that you're after? What is it that doesn't work? Logs. Etc...
Didgeridoohan said:
Disabling and then enabling a module takes a reboot between every action. It can't be done in one boot...
But, I suspect that this might not actually be the solution you're looking for. Provide more details, please. What module are you talking about? What functionality is it that you're after? What is it that doesn't work? Logs. Etc...
Click to expand...
Click to collapse
Thanks for your quick reply.
I'm using a module that changes device fingerprint to Pixel2 to be able to use Measure app. Measure works properly only one or two times after enabling the module. Then it stops finding available surfaces until I disable, re-enable module and reboot. The same problem occurs if I use your MagiskHide Props Config (great work btw). After disabling-enabling-rebooting Measure works properly again. If I simply reboot without touching the module Measure app starts but it can't find any suitable surface.
Here's a logcat, hope it helps.
Do I understand you correctly? You're talking about disabling/enabling the module in the Magisk Manager, right? And disabling and then enabling right after, with no reboot in-between? If so, that makes no sense, because the only thing disabling the module does is to create a file in the module folder named "disable". On the next boot, Magisk will detect this file and won't load the module. Enabling the module simply deletes the file again, and on the next boot the module will load (since there's no "disable" file)..
I really do believe there's something else going on...
Didgeridoohan said:
Do I understand you correctly? You're talking about disabling/enabling the module in the Magisk Manager, right? And disabling and then enabling right after, with no reboot in-between? If so, that makes no sense, because the only thing disabling the module does is to create a file in the module folder named "disable". On the next boot, Magisk will detect this file and won't load the module. Enabling the module simply deletes the file again, and on the next boot the module will load (since there's no "disable" file)..
I really do believe there's something else going on...
Click to expand...
Click to collapse
I know it makes no sense but it works that way for me and for other people with the same phone/module. I was trying to find a way to automate this process at every boot so that at least the first time (after every boot) I'll use Measure it will work well. Otherwise log keep saying "Received image measurement before corresponding IMU measurement" then app crashes.
I'm 100% sure that it's got nothing to do with creating and deleting a file named "disable" in the module directory... There's something else going on, it's just that noone's figured out what.
Didgeridoohan said:
I'm 100% sure that it's got nothing to do with creating and deleting a file named "disable" in the module directory... There's something else going on, it's just that noone's figured out what.
Click to expand...
Click to collapse
I really don't know but I can reproduce this bug every time. How can I create and delete this file? Is there a path where I can put this file or magisk.img can be mounted? Sorry if it sounds ridiculous, I am not a developer...
If you really want to try you can just place a boot script in post-fs-data.d that creates and deletes the file in the module directory. Something like:
Code:
#!/system/bin/sh
touch <path_to_module>/disable
rm -f <path_to_module>/disable
The path to the module depends on what version of Magisk you're using (although there's backwards compatibility symlinks in place). In the current stable release the modules are in /sbin/.magisk/img, but the current code (in the Canary builds and in future releases) have moved this to /data/adb/modules.
Perfectly working, thanks. I used macrodroid to run the scripts you gave me after every boot.
Hi, first time posting to XDA and I'll try to be concise, but I am tremendously confused and quite frightful of having to reflash/factory reset my entire device.
I got Magisk 6.1.0(165) after my Xposed Framework became more of a problem than a solution a long time ago, with a basic desire of rooting my device to control what apps boot at launch and examine Wakelocks and run an ad blocker.
For a long time, I did not update after the headache of clearing Safetynet and getting things functional.
Magisk prompted me to update, and I decided to after I had installed a few new apps that I now wanted to block from running on boot, but I never got around to finding a method to prevent apps from loading at startup like I desired with Xposed, i previously just disabled or uninstalled the problematic apps.
Before updating, I used TWRP to run a backup and rebooted.
After the update, Magisk informed me that the latest version i had updated to, was not supported and that it would behave asif it wasn't installed at all... Great...
I downloaded the zip to my device's SD card, and after a reboot noticed that I had Two installs of Magisk. When I held the icon to view app info, one of them would behave as I expected, and the other would show me additional options like modules, downloads, superuser and hide.
When I opened the second copy of Magisk, the first one vanished from my applications tray and cannot be found anymore, and Magisk now shows it's green checkmark next to Latest Version v20.4 and Installed Version 17.1 but Safetynet gives me an API error.
Clicking Update Magisk Manager from the menu offers to install v7.5.1(267) but I am wary enough that I am unsure if I should proceed and am not even sure if Magisk has a module that I am looking for-- Something to control what apps launch on startup.
Will updating Magisk Manager show a new list of additional modules to be downloaded and perhaps something that I am looking for? Should I be worried about bootlooping my device and needing to reset it?
I once used the Boot Manager found on the Xposed Framework, but it's long since become non-functional and became the reason why I simply uninstalled what was bothering me, but now I want to keep the new applications that I have and disable their bootup on start.
Is Magisk the place that I should be looking for such a feature?
Running a Samsung GalaxyS5.