[OFFICIAL] Xposed for Lollipop/Marshmallow/Nougat/Oreo [v90-beta3, 2018/01/29]

Status
Not open for further replies.

rovo89

Senior Recognized Developer
Jan 4, 2012
2,585
81,215
203
It seems that more and more people get nervous about whether (and when) there will be Xposed for Nougat or not, so I felt I should say something.

Why does it take that long? Because with every release, I try to ensure that Xposed integrates nicely with the improvements in the new ART version. The step from Lollipop to Marshmallow wasn't huge. It was an evolution, some things even made it possible to integrate Xposed in a more elegant way. On the whole, it was mainly careful porting than rather innovating.

With Nougat, something fundamental has changed. If you're using Nougat already, you'll have noticed that installations are much faster now. That's because APKs aren't compiled immediately (AOT), but start in (slower) interpreting mode. Sounds bad, but they have enabled JIT, which will quickly compile those methods that are used very often. That will restore the well-known and constantly improving performance of native code. Besides that, ART keeps a list of these frequently used methods ("profiling"). When the device is idle, it finally does the AOT compilation, but based on the profiling data. After that, you get the great performance right after starting the app. JIT is still waiting in case the usage patterns change, and I think it will also adjust the profile and improve the AOT compilation.

That results in various different compilation states and more complexity. Besides that, there were many issues in the past caused by Xposed's need to recompile the whole ROM and all apps: It sometimes caused boot loops when the odex files were too heavily pre-optimized, it blocked quite some storage space to store the recompiled files, and I needed to disable some optimizations like inlining and direct pointer calls. I hope that I can make use of the JIT compiler to avoid that in Nougat. If Xposed knew from where a method is called, it could invalidate the callers' compiled code, so that they would temporarily use the interpreter. If they're important enough, JIT will recompile them.

I have already done a lot of research and experiments for this and I'm currently trying to implement this. But as you can imagine, all of that is much effort and can easily take hundreds of hours. That's net (working) time, not real time. If I worked on Xposed 24 hours a day, that might be done within a week or two. But, in the last year or so, my "time for Xposed stuff" was about 5 hours a week, sometimes more and sometimes less. You can do the math yourselves... There are just so many other (non-technical) things that I need or want to do. If you substract the time it took me to build the new installer version, move the repo to a new server and restore compatibility with the Nov 2016 security patches, that's even less time for new stuff.

So yes, I'm still working on Nougat support, whenever my free time allows it, but I don't have any idea when it will be done. Once it's done, you'll know. :)
 

rovo89

Senior Recognized Developer
Jan 4, 2012
2,585
81,215
203
So Android O seems to be coming on Monday. I would have really liked to release official Xposed for Nougat a long time ago, but unfortunately I'm not done yet. :( The good news is that I'm really getting closer now, having finally flashed it to my Pixel phone. I'm still convinced that the way I implemented it will offer full stability without neglecting performance. :) I'll be AFK for the next two weeks, but will continue my tests and fixes afterwards. Again, I think it's totally worth the wait. Thanks for your patience! ;)
 

rovo89

Senior Recognized Developer
Jan 4, 2012
2,585
81,215
203
Finally! I know you've been waiting for official Xposed for Nougat for a long time, and here it is. You'll find the download links in the usual place (see first post). Make sure to also use Xposed Installer 3.1.2 (update is also in first post).

If you'd like to know what exactly you've been waiting for, check out this XDA article. Besides much background information on Xposed and its history, it includes a detailed statement by myself about what you'll get on top of the unofficial versions. You can find that statement right above the "Conclusion" headline, click the box to show it.

Note that I've also released new binaries for Marshmallow and Lollipop, although the changes are very minor. Mostly, they ensure that all releases are in sync.

I'd like to thank @wanam for testing and helping to fix the remaining bugs. He also tested it on the Samsung GS7. Also thanks to XDA for their continued support and for providing the infrastructure. And finally, thanks to you for being patient with me, coming up and implementing the new concept really took a long time (that I didn't always have).

Now go ahead and try it out. :) For any feedback and discussions, please use the new discussion thread.
 
Last edited:

rovo89

Senior Recognized Developer
Jan 4, 2012
2,585
81,215
203
OK, lots of feedback for official Xposed for Nougat, thanks :)

It's quite hard for me to find useful bug reports within the huge discussion thread, in the middle of much positive feedback, people complaining about certain modules not working (must usually be fixed by the module authors!) and posts where it's clearly a user problem. So thanks especially to those people who posted good bug reports (including full logs etc.) on GitHub. That drastically increases the chance of getting those bugs fixed.

Here's the how-to on reporting bugs: https://github.com/rovo89/XposedBridge/wiki/Bugs

And by the way, if you want to help improve Xposed and you're following the discussions anyway: Please help others, please try to find out whether they're really blocked by an Xposed Framework issue, and if so, encourage them to report it on GitHub as described above (or report it in their name). Thanks! :good:

The first fixes have found their way into version 88.1, only available for Nougat. That includes especially some fixes for Samsung ROMs, but might also fix bootloops and slowdowns on other devices. Besides that, I think I fixed a MIUI incompatibility, not sure if it works now (and to be honest, I don't give much priority to MIUI). There are still unfixed issues on the queue, and again, please keep reporting whatever you find.
 

rovo89

Senior Recognized Developer
Jan 4, 2012
2,585
81,215
203
Another update, version v88.2. It contains more fixes for incompatibilities with certain ROMs:
  • Fixed a bootloop on some Samsung ROMs, expecially Note 8
  • Fixed a crash on OnePlus devices when 100% charged (hopefully, didn't get much feedback)
  • More MIUI compatibility. There's still an open issue though, try disabling resource hooks in the installer if you still get bootloops.
  • Try to detect outdated (and therefore incompatible) Xposed Installer.

Files are available for Lollipop and Marshmallow as well, hoping that they add MIUI support there as well.

I've seen many reports that Xposed is installed, but not active. One of the reasons (on Nougat) could be that an old Xposed Installer is used. You really have to update Xposed Installer! Another reason was that the /data/user_de/0/de.robv.android.xposed.installer directory doesn't exist, which could be caused by installation on external storage. As this path is hardcoded across various places, only installation on internal storage will work.

The new Xposed Installer 3.1.3 (download in first post) checks for these situations and shows a warning with more steps to check. It also contains a new way for Xposed Framework ZIPs to specify that they need certain features in the installer (like using the new directory introduced in Nougat), to better prevent situations with outdated installers in the future.
Please update the installer as well!
 

rovo89

Senior Recognized Developer
Jan 4, 2012
2,585
81,215
203
I know many of you are waiting for Oreo support, and indeed I'm pretty far with that. :) 95% of the code are ported, basic functionality is working on Genymotion. The remaining 5% are obviously those parts of the code which are more difficult to port. I literally just upgraded my primary device to Android 8.1, so I can hopefully start some real testing soon. :fingers-crossed:

Nevertheless, I can announce another release right now: Xposed version v89. It's available for Android 5.0 to 7.1 and contains quite a few fixes for app crashes. I reported one of them to Google as I suspect it's a bug in the AOSP code. These crashes were hard to debug, that's why it took some time to fix them. These efforts also delayed my work on Oreo support, but they will also help to make the first Oreo version better right from the start.

Version v89 also includes a change in Xposed's process permissions, which should help on ROMs which reset app directory permissions on each reboot.
 
Last edited:

rovo89

Senior Recognized Developer
Jan 4, 2012
2,585
81,215
203
It's January 8 today, or as we write dates in Germany: 8.1. That means Oreo time! :)

Let's start with a beta phase this time. That means:
  • It's stable enough for me to use it on my daily driver (Pixel), and @wanam tested it on a Pixel 2.
  • I'm aware of a few app crashes that happen from time to time, but nothing that would stop me from using the device. I'm still investigating the root causes for these crashes and plan to post another beta once I think I've fixed them.
  • Please only report reproducable bugs on GitHub for now, i.e. bootloops and apps that crash every time you use them. Random app crashes are hard to capture and might the same that I'm looking into already.
  • I'll post the source code once we leave the beta phase. It isn't cleaned up yet, especially the parts shared with older Android versions. I'm a fan a nice, linear commit history, and if I push the source now, I can't fix up those commits anymore.

A general challenge for modules might be that they can no longer use XSharedPreferences in the system_server ("android") process. This was only possible in the past due to a complex chain of (uncritical) SELinux loopholes that I exploited. One of them was that the restriction on allowed services that system_server (and other processes) can register was interpreted as a prefix. "user" was allowed, so I could register "user.xposed.app", which modules contacted in the background when they used XSharedPreferences. Now they match service names exactly, so I have no chance to register a custom service anymore. I think @M66B uses the same trick in XPrivacy, which will probably also stop working now.

As a workaround, modules could load their preferences in initZygote(). Accessing preferences from there and from hooked normal apps should still work as good (or bad) as usual. I'll start thinking about good, universal alternatives once the number of open issues has reduced.

Downloads are available as usual.
If you need to uninstall, please use xposed-uninstaller-20180108-*.zip which cleans up some additional files. Otherwise, you'll probably end up in a bootloop.
 

rovo89

Senior Recognized Developer
Jan 4, 2012
2,585
81,215
203
There's a new Xposed Installer v3.15 available in the first post now. It fixes two crashes and provides two new features:
  • Fixed a crash in download list search on Oreo.
  • Fixed a crash when sending log on Oreo.
  • "Optimize apps now" menu item, will trigger "cmd package bg-dexopt-job". It's available since Oreo and will start the job that usually runs once per night if the device is charging. If you feel degraded performance after installing Xposed, it might be because all apps are running purely on JIT and interpreter. That's because Xposed needs additional information to identify methods it has to invalidate, and that information will be determined during the next compilation. If you want that to happen now, use this new feature. It took about 20 minutes on my Pixel. For more background, see https://source.android.com/devices/tech/dalvik/jit-compiler.
  • Detection if Verified Boot (dm-verity) is active. If yes, any changes to the system partition will be detected and you'll end up in a boot loop. The detection might not be 100% perfect yet, so if you notice false positives or negatives, please report a bug along with the output of "adb shell getprop".

I'm also publishing v90-beta2 and uninstaller 20180117, available via Xposed Installer and http://dl-xda.xposed.info/framework/. Remember that the first boot will take several minutes.

They support (un)installing Xposed via TWRP on Pixel and probably other "system root image" devices (where the system partition is mounted the root directory and /system is just a subdirectory). Also, the previous uninstaller had a typo, which probably led to boot loops on all devices. Please always use the latest uninstaller!
 
Last edited:

rovo89

Senior Recognized Developer
Jan 4, 2012
2,585
81,215
203
Another small update, v90-beta3 adds compatibility with Samsung's Oreo ROMs.
I have also backported some changes from Android P to Oreo 8.0, which I had previously only ported to Oreo 8.1. This might fix some app crashes, however I'm still working on fixing other known issues.

Oh, and also: Downloads are finally available via HTTPS. Site will follow soon. Thanks to @ddrager for the ongoing support with the servers! :)
 
Status
Not open for further replies.