yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] h3110:
Report! 3.5.4 works fine and settings are kept during reboots.

But I found that there are some delays before the key mapping start to work when the phone boots up.

Maybe it's a limitation or something, no biggie.

Great thanks for the update!
[Xposed Framework Modules] dk_zero-cool:
It would have been a problem had I not already taken that into consideration. I am very familiar with the Linux permission system as I use Linux on everything and have done so for many years. The configuration file created by the module part has also had it's permission and ownership changed. The permissions was changes to full access for owner and group and no access for everyone else. The ownership was changes to the app as owner and android system as group, which is where the module service is running. So the app part still has priority control over the configuration file and therefore should have no problem writing to it.
[Xposed Framework Modules] egingell:
The group says "system" on mine (both config.xml and its parent folder (shared_prefs)). Still using version 3.4.0b1 (I generally don't update unless I have to). Kind of a moot point, though. :)

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] dk_zero-cool:
Yes it's like I said

Owner = The app

Group = System (Android)

Permissions = 0770 on folders and 0660 on files which means that the app and Android has full access, and no one else. But the app is still the owner which means that it should have no problems writing and reading the file.
[Xposed Framework Modules] egingell:
Yeah. Should... In order for that to work, shouldn't com.spazedog.additionsgb also be in the system group?

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] dk_zero-cool:
No. You don't have to allow access to a parent folder in order to allow access the it's sub folders. In this case I did not even have to allow access to the sub-folder, I could just have provided access to the file itself. It was just in case the module at some point should be able to delete/recreate the file.

Android has a very good example of this also. Apps cannot access /data or /data/data. But they can access /data/data/<their package name>
[Xposed Framework Modules] egingell:
Well, there has to be a reason why the older version couldn't access the prefs file. I guess one can't get around selinux by simply changing file attributes.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] dk_zero-cool:
SELinux does not care at all about the file permissions. It has it's own preference files where rules are written about which processes has access to which part of the file system and how much access. Older Android versions had an option of making preference files world-readable and world-writable, which SELinux supported. But this feature has been deprecated for a long time and in Lollipop it seams as if Google has finally removed the world-writable option by restricting it in SELinux. This is what broke the module and reset the settings during boot as the group "system" could no longer be allowed to write to the file despite the fact that it has been added in the file permissions.
[Xposed Framework Modules] egingell:
Oy. So unnecessary.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] francwalter:
I deleted the data or uninstalled, configured in the app or in the module and each time I did a reboot, but always the button configuration is gone after the reboot.

Is there a very special way to keep the settings through a reboot and to go around this bug?
[Xposed Framework Modules] dk_zero-cool:
Well first of all you can make sure that you do not block things in the app using modules such as XPrivacy. When you shutdown your device (or reboot), the module sends a broadcast to the app with the new configurations. The app then writes these settings to the file. Unless of cause this is somehow blocked.

Secondly, try taking a log while shutting off the device, after you have made some changes. This should show if there is an error during this procedure. But first enable debug and reboot to activate it. You cannot use a logcat app for this, it has to be done using ADB from a terminal because any logcat apps will be shutdown along with everything else.
[Xposed Framework Modules] francwalter:
No, I don't use XPrivacy (at the moment). I am on CM12 where Xprivacy won't run, as the Xposed FW doesn't supply it (yet).

It is interesting that the Setting "Long press delay" is permanent, only the configured Keys are not.

Is it possible that this module won't work on CM12 (nightly from yesterday)? Is it tested on CM12?
[Xposed Framework Modules] dk_zero-cool:
Yes it works on CM12, I use that myself. I did have problems on 12.1 though, but I will not look into that until rovo89 himself takes a look at the framework as the ROM in general ran quite strange after installing romracer's 5.1 version.

However you are describing the exact same issue that was in version 3.5.3. Did you update to 3.5.4?
[Xposed Framework Modules] francwalter:
Yes, I updated to 3.5.4. First through Xposed, then through GP, where I uninstalled before or clean data.

Not possible to uninstall it in Xposed, is it possible that Xposed keeps the old version without showing it that it is old?

In Xposed it says 3.5.4 as well.

How could I for sure clean this module?

I am not sure that an uninstall of a Xposed module does a complete and clean uninstall. I had issues with another module ("Bring back the JB GPS Icon") which still did functions but I had it disabled and uninstalled, so I guess there is maybe indeed rests of the module in the system, possible?
[Xposed Framework Modules] dk_zero-cool:
Uninstalling modules will remove everything. However everything that has been loaded into the android processes will not be cleared until a reboot. When uninstall an app, Android will only shutdown the app process. But modules hook into other processes as well and these will not be affected by an uninstall. Not until you reboot and thereby closes all processes.
[Xposed Framework Modules] francwalter:
Good.

The Debug CheckBox just means, it is made entries to the syslog by the module? Without the debug checkbox no notice to the system?

So I guess my only way to get this module running is to catlog it with adb and look into the hopefully generated error messages.
[Xposed Framework Modules] dk_zero-cool:
Just output logcat to a file and I will look through it. And yes, debug tells the module to print information to syslog, but errors will of cause be printed anyways. The debug information just makes it easier to figure out the cause of the problems.
[Xposed Framework Modules] AssassinsLament:
I'm also having issues with settings being lost after reboot. I have the latest Google Play version.
[Xposed Framework Modules] Dj Telo:
I am definitely still losing the configuration after a reboot. Restoring a backup with titanium backup and soft rebooting will make it appear again... I will make some more tests to try to give you more details.
[Xposed Framework Modules] dk_zero-cool:
What Android versions are affected by this? It can't be a general issue as both my 5.0 and my 4.1 device works perfectly with this new version.

Also have anyone with a clean install had issues. I have been seeing a lot of Titanium being written in some of these threads and that app is not fully optimized for newer Android versions. I use it myself some times, but it does need some updating.
[Xposed Framework Modules] Dj Telo:
5.0.2, CM12 on a S4. Now I am going to flash the latest nightly with a clean install. I'll report how it goes with your module.
[Xposed Framework Modules] dk_zero-cool:
Okay great I will do the same on my a little older S3
[Xposed Framework Modules] dk_zero-cool:
Well it seams as if SELinux is getting more and more strict, even in 5.0 updates. Newer CM's fails for me to now since SELinux now also restricts read access to the preference file. I am currently working around this. I already moved the write part to the app and now I am moving the read part over there as well. It will sadly add a certain delay to the module during boot as the settings will not be restored until the app get's started by an onBoot trigger. But at least this should ensure that the settings are restored properly. Maybe I will find another way later, but for now it's best to make it work rather than spending time investigating for better solutions.
[Xposed Framework Modules] dk_zero-cool:
Took some time, but I manage to find a suitable workaround for this latest SELinux issue with the configuration. New version has been uploaded to all sources. Hopefully this should be the end of the configuration problems.
[Xposed Framework Modules] AssassinsLament:
Just tried it and my settings survived a reboot. Thanks!
[Xposed Framework Modules] shaktishekhar:
Lost all my settings 4.2.2 KK On note 3 neo

Lost all my settings after update of PS version restored settings soft reboot helped me but why this lost settings

am on KK 4.2.2 Note 3 neo Samsung :confused:
[Xposed Framework Modules] ayoubij:
Whats wrong with 3.5.2 its the only version that properly works. Why change it? Maybe im missing smthg
[Xposed Framework Modules] egingell:
A) Read the last few posts and the change log.

B) If it works for you, then don't update it.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] shaktishekhar:
I restored settings with TB after soft reboot it takes the settings but after a normal reboot it again loose settings

I checked inside data/data the config xml is present but still the app is not reading those settings keeps loosing data after reboots

---------- Post added at 09:47 AM ---------- Previous post was at 09:34 AM ----------

I De-Greenify Xposed Addition i noticed that when the phone boots up it shows a toast notification settings restoring something like that and confg is back so i suggest others either do not update or do not force kill or Greenify or something with xposed addition
[Xposed Framework Modules] dk_zero-cool:
SELinux has restricted any access to apps data folders. Nothing except the app itself can read/write to it on Lollipop. I therefore moved all configuration handling to the app. During boot and on shutdown, it will restore or save the settings to and from the module service. This does however mean that the app needs to be able to launch at boot. Also Xposed additions does not contain any background services of any kind, so there really is no need to Greenify it. I contains simple activities that already makes sure to release any references and such that it has during pause of the app (when you leave it).
[Xposed Framework Modules] shaktishekhar:
[MENTION=3147360]dk_zero-cool[/MENTION] Ok but one more thing if I by mistake long press back button and Xposed addition gets killed than also it wont restore config what about that?
[Xposed Framework Modules] dk_zero-cool:
Configs are restored after boot, just about the same time your lock screen get's visible. After that, the settings are contained and handled by the service just like it has always been. On shutdown the app is called again, it takes the configs (with any changes) and writes it back to the config file. If you at some point kill the app it will have no affect on the settings. The service cannot be killed and is not depended on the app running as it is running in the main system process. The only thing to make sure of, is that you do not have anything blocking the app from starting during boot, like Grenify or XPrivacy.

I am still looking into other solutions for this, like adding a small service to the app that can handle the read/write. It should not be as easily blocked as the current solution. But SELinux is getting quite strict and impossible to bypass, so the options are getting very limited. This was the best option for now to avoid having people wait another week or two for a fix.
[Xposed Framework Modules] egingell:
I don't know if you've exploited broadcast receivers, but that's how I get logs from the Xposed side to the Android side of UnToaster.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] dk_zero-cool:
That is the solution that is currently implemented. The module service sends a broadcast to the app when it is ready and again when it is shutting down.
[Xposed Framework Modules] francwalter:
Yeah! This works now! Thanks!

Settings persist reboot.

I made them in the app.

Didn't check adb debug since yet but now I can dismiss this.

Now I will buy the pro :)
[Xposed Framework Modules] shaktishekhar:
temp fix

View attachment com.spazedog.xposed.additionsgb-11.apk

I made dis.. until the Config issue fix comes

i will use dis.. :P
[Xposed Framework Modules] shaktishekhar:
I totally understand the issue..its fine :highfive:
[Xposed Framework Modules] Dj Telo:
Seems to work perfectly now, thanks!
[Xposed Framework Modules] ayoubij:
Between 3.5.2 and 3.5.5 the changelog is saying that trying to fix the not saved preferences.

Anyone who had a problem, the dev always told them then return to 3.5.2 until a solution is found.

I dont get whats the new thing between 3.5.2 and 3.5.5 for instance.

As for B read the sentence before to know why im asking
[Xposed Framework Modules] dk_zero-cool:
The difference is the way the app version are reading/writing the preferences. If you do not run Lollipop, then you can just stick with 3.5.2. All changes made so far has been to bypass SELinux restrictions in Lollipop. The 3.5.2 version uses the old way of handling this, which works for older ROM's and Lollipop with SELinux disabled. The 3.5.3 and 3.5.4 versions works for some ROMs, but the Lollipop fixes in those versions seams to break other ROM's. The 3.5.5 version contains a fix that works for all Lollipop and older ROM's.

Everything was about getting all Lollipop versions to load the configurations during boot.
[Xposed Framework Modules] Baldeep Singh:
Nokia XL, JB 4.1.2, currently on custom ROM (miniROM Kitkat)

I installed Xposed Framework, now XposedBridge and app_process both are active, i activated the module, reboot, I opened the app and then a dialog appears 'Missing System Service' with written 'The XposedAdditions System Service is currently not enabled. ...make sure that XposedBridge is installed and that this module is enabled.' I don't know why, I did everything, I want this badly
[Xposed Framework Modules] dk_zero-cool:
In that case something went wrong when trying to instantiate the service. You could start by checking the log viewer to see if it contains some errors. Those would help debug this.
[Xposed Framework Modules] Klelslol:
I'm actually having the same problem as the guy above, I also get the missing system service error. I updated to skydragon 4.0.0 today, and installed the 3.0 alpha2 version of Xposed. Xposed_bridge and app_process are both active. I checked the error log on the Xposed installer and I got this from it:

Cannot Load any Modules because data/data/de.robv.android.xposed.installer/conf/modules.list was not found.

The strange thing is that when you select modules from the xposed installer, the xposed additions module shows up and is selectable, but will not work, even after de-selecting the module, rebooting the phone, selecting the module again, and rebooting for a second time. The Xposed Additions error log is blank.

EDIT: After turning off every other module and only running Xposed Additions by itself, it works.
[Xposed Framework Modules] Baldeep Singh:
Error log is empty
[Xposed Framework Modules] Dj Telo:
Oh my... The settings are gone again! At what time exactly is the configuration file written? In other words, when is it safe to reboot ensuring that the changes are correctly stored?

I am going to explain what has happened exactly. This morning after updating the module I set a mapping to the home button and one rebooted. The change was still there, let's name this state A. So, I decided to make all the other mappings I normally use. I have rebooted again and the now what I see in the app is state A again!

I know that you are not a friend of Titanium Backup, but when I had everything set up I made a backup of the app. Seeing that now I lost everything, I tried to restore the backup. Anyway, I get to the famous state A...

Edit: I have restored the backup again and now everything is gone. Not even state A.

You must read me and think I'm crazy... I know.
[Xposed Framework Modules] dk_zero-cool:
I need a boot logcat. Not sure how to get that unless you know how to use a terminal with ADB?

I would start by checking what other modules you have installed. It might be something that breaks XposedAdditions. The settings are written when you shutdown the device or reboot. This is done using a trigger directly into the Android system and not based on any unreliable standard broadcast events, so this will run on every shutdown, unless you have something that is blocking the app from starting on broadcasts.

Also this might not even be a problem with saving the settings. Most likely this is a problems with restoring them at boot, which would indicate that you have something that is blocking the app from starting at boot.
[Xposed Framework Modules] Dj Telo:
Chrome pie.

Min min guard.

Hide carrier label.

True silent mode.

Youtube background playback.

YouTube adaway.

And nothing else.

What about the fact that a previous configuration has appeared magically?
[Xposed Framework Modules] dk_zero-cool:
I have no idea what your device is doing in the background. When I debug these things, I plugin my USB cable, open a terminal, start ADB Logcat streaming and turn on the device. Then I spend time going trough the log to see if it contains something that could explain whatever problem that I am working on. If not, well then I have to get creative.

If I am going to have a small chance of helping with this, at the very least I need a log like described above. I can view the log for you, but I have a little hard time getting it from your device.

But first it would be a good idea to disable all other modules (just a few checkboxes, quite easy). Then I would check to make sure that I do not have something like Geenify or similar stopping the app from starting during boot, maybe AppOps?
[Xposed Framework Modules] AssassinsLament:
Ok so before I went to bed last night, I checked and the settings survived a reboot... but I just read the comment by Dj Telo and so I just checked my settings, and it's gone. I didn't reboot my nexus 7 after checking last night either, so it seemed to have dissappeared without a reboot.

Running stock 5.0.2
[Xposed Framework Modules] dk_zero-cool:
If you have not yet rebooted the device and have root access, could you check the file

/data/user/0/com.spazedog.xposed.additionsgb/shared_prefs/config.xml
[Xposed Framework Modules] AssassinsLament:
I already rebooted. I'll test it again. After three reboots, the settings have stuck again so i'll let it sit for a while and see if it disappears again. If not, I'll check that file. Thanks
[Xposed Framework Modules] chiefroastbeef:
Hi zero-cool,

I'm trying out your module and it is amazing what it can do.

I have a HTC M8 running the ARTHD Lollipop rom. I was looking for ways to wake phone without having to use the top power button, or the motion gesture(it randomly wakes phone when I don't want it to wake) double tap.

Your app works for the most part, I am able to wake phone by pressing just the down volume button (I don't want the up volume button to be able to wake phone). However, after a couple minutes of screen off, the down volume button wake phone function stops working, but once wake phone with the top power button, the down volume button will be able to wake phone, until the phone is off for a long period of time.

Is this a deep sleep issue? Is there a work around so that I can wake the phone by pressing down volume button mapped from your app?

Thank you for your time, I plan on getting the pro version if this can be resolved.
[Xposed Framework Modules] shaktishekhar:
Why dont you.. give a startup reciver

Bootfinish reciver

If there is no data acess

Than y dont u plave config file into Public storage.. internal sd or something
[Xposed Framework Modules] Baldeep Singh:
Well i don't know what is boot logcat, terminal with ADB, i'm hearing the name for first time... I will still google it
[Xposed Framework Modules] shaktishekhar:
Insted of broadcast u should hav give recivers..2 restire config on boot
[Xposed Framework Modules] egingell:
Broadcast Receiver is one thing.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Xposed Framework Modules] dk_zero-cool:
Yes this is a problem on some devices, mostly HTC. Their kernels are some times build to stop reporting specific keys being pressed while in deep sleep. There is nothing that I can do about this as the kernel is below the Android Framework. I cannot change it. You can try to find a custom kernel in the forum for your device. Those are normally build without this issue.

Currently this module already uses a receiver for boot and shutdown. And I am not storing settings on the sdcard because this is not the purpose of the external storage. Settings goes in the app data folder whereas personal things like music, pictures and such goes into the storage. Some times also larger app things like maps for GPS and such, but even their settings are kept in the data folder. It might be easier but it is wrong.

The receivers are only temp. You can check github for the 4.x branch. Once I am finished, the module service will handle preferences trough a bound application service.
[Xposed Framework Modules] Baldeep Singh:
I still don't know, please explain me step-by-step how can i make a boot logcat?

I've used an app called Catlog but still can't understand what to do next.

I'm still stuck at 'Missing System Service' dialog
[Xposed Framework Modules] dk_zero-cool:
Logcat during boot needs to be done in a terminal via ADB. I am not sure how to do this on windows as I use Linux myself. Maybe a windwos tool like THIS can help you out.
[Xposed Framework Modules] Baldeep Singh:
I still didn't understand what does terminal and adb means, neither i got my answer on google, please tell what i have to do...

I should run Xposed Additions, then reboot, what?

I didn't got it, I have windows and Nokia XL device, I got Nokia X Manager, which shows ADB Push, ADB Pull, ADB Shell and install ADB Drivers, Do they help?

Well is logcat really important? Can't u just try to fix it and make it work
[Xposed Framework Modules] dk_zero-cool:
Install the driver from your X Manager, they will properly be needed. Then shutdown the device, plug it into your usb. Open the application that I linked above (I don't know how it works, you can write in that thread for help). Turn on your device and wait until it has booted. Then some how save the log from the program in the link and attach it here as a file attachment.

Is this some kind of a joke?

I will pretend that this was a serious question and answer it, despite that I am a little skeptical. How would I know what the problem is? I have no access to your device and there is a million things that can be the cause of this issue. The only way that I have any chance of knowing what is happening, is by getting a log from your device that hopefully contains some useful information about the problem.

Logcat is a tool created by Google to get logs from devices. It is normally executed in a terminal, but some people (Like the dev in the link) has made a few GUI applications that can be used instead. Logcat is not the most user friendly tool to work with, but for that you can blame Google as I did not make it. Never the less I need the output from it before I can fix anything.
[Xposed Framework Modules] Baldeep Singh:
You gave me the link for Virtuos Ten Studio, I installed it and connected my device to my pc, then I opened Logcat, too many lines are started generating, I opened Xposed Additions on my device, and then i stopped generating logcat, I saved it to a .txt file, I'm attaching that .txt file