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

Status
Not open for further replies.
Search This thread

rovo89

Senior Recognized Developer
Jan 4, 2012
2,585
81,433
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,433
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,433
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,433
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,433
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,433
The new installer incorrectly showed a "wrong base directory" error for ROMs older than Android 7.0. This is now fixed in Xposed Installer 3.1.4 (see first post), and the message now also includes the wrong directory for easier diagnosis.
 

rovo89

Senior Recognized Developer
Jan 4, 2012
2,585
81,433
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,433
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,433
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,433
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.

Top Liked Posts

  • There are no posts matching your filters.
  • 11509
    Note: This thread is here mostly for historical purposes. While Xposed is supported in various forms [EdXposed and LSPosed], developent on the Xposed primary app has completed. Xposed framework compatible modules are still in active development and supported by their respective developers.

    This is the announcement thread for Xposed for Lollipop, Marshmallow, Nougat and Oreo. I'll post all relevant news here, so subscribe to it if you'd like to stay informed.

    You can find a list with Q&A about Lollipop support on the XDA Portal. Please read it, you will find many answers there. :) Also see this article with much background information on new stuff for Nougat.

    Please install it only if you're willing to take the risk of boot loops. Just because it's working fine and stable for me doesn't mean it will work for everyone the same way. ;)

    Downloads:
    XposedInstaller_*.apk
    from this thread: Must be installed to manage installed modules, the framework won't work without it.

    xposed*.zip from https://dl-xda.xposed.info/framework/: Must be flashed with a custom recovery (e.g. TWRP) to install the framework.
    SDK21 is Android 5.0 (Lollipop), SDK22 is Android 5.1 (also Lollipop) and SDK23 is Android 6.0 (Marshmallow).
    For Nougat, SDK24 is Android 7.0 and SDK25 is Android 7.1.
    For Oreo, SDK26 is Android 8.0 and SDK27 is Android 8.1.
    I only support the latest Xposed version per Android release!

    xposed-uninstaller*.zip from https://dl-xda.xposed.info/framework/: Can be flashed with a custom recovery (e.g. TWRP) to uninstall the framework.

    The small .asc files are GPG signatures of the .zip files. You can verify them against this key (fingerprint: 0DC8 2B3E B1C4 6D48 33B4 C434 E82F 0871 7235 F333). That's actually the master key, the files are signed with subkey 852109AA.

    Known issues:
    - Before Nougat: Bootloops on Samsung stock ROMs. That's due to Samsung's changes to ART. There are unofficial builds that work around this by deodexing and adjusting the ROM.
    - Sony seems to have shipped some ROMs with corrupted services.odex (the embedded .dex is invalid). Those ROMs will bootloop with a "Fatal signal 6" or "No pending exception expected: java.lang.ArrayIndexOutOfBoundsException" error, which I unfortunately cannot fix (see https://github.com/rovo89/Xposed/issues/64)
    - Dell ships (at least) their Venue 8 7840 with a non-standard version of ART that is somewhere between 5.1 and 6.0 which obviously isn't supported by Xposed (see https://github.com/rovo89/Xposed/issues/77)

    For discussions, please use the discussion threads (Lollipop / Marshmallow / Nougat / Oreo) or another matching one in this subforum.
    4162
    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. :)
    2148
    Current status (Feb 19):

    The most important issue seems to be the incompatibility with Samsung stock ROMs, especially because it's leading to boot loops. I have been working hard on fixing this in the days since the release, however it's not just a single spot that needs fixing. Thanks to GermainZ for testing and providing good log files! So far, I have detected the following issues:
    - Enhanced .oat file format: Samsung has added a "TypeLookupTable", probably for performance reasons. The table itself will be ignored by Xposed, but it also means that the file format is slightly different. I have finally understood what they have done and added some logic to skip the referenes to this table.
    - Different size of the String class: They have added a clear() method, which is unusual as strings are usually immutable. As this class is one of few that have special support in native code, I had to add one entry to the virtual table of the class.
    - Additional fields in DexCache class: Offsets to some fields are different due to this and need to be handled in native code (as this another central class with native parts directly implemented in ART).
    - Verifier rejects ViewDebug class: Doesn't seem to be overly critical to me, yet to be tested whether it's working fine with original libraries.
    - Implementation missing for some native methods: Some methods in the reflection classes have been implemented in native code instead of Java. This means I will have to implement them as well.

    The changes done by Samsung are bigger than I expected, especially given that ART is very complex and mostly undocumented. Anyway, I still think that once these issues have been overcome, it's better to replace the libaries than trying to manipulate data structures and behavior from "outside" (app_process). Think about it: If they have done such big changes, it's very likely that offsets in these data structures are different from AOSP and would need special handling as well.


    It would of course be helpful to have an uninstaller ZIP in case you run into a bootloop. I didn't have time for that yet, but maybe someone can build an initial version that basically reverses the steps of the installer ZIP. For the ART libraries, that should be rather easy. You might want to stay away from moving app_process32 back in case you have SuperSU installed. It will need a special procedure to ensure you don't break either part or even your ROM.


    There are other issues for sure, for example it seems that some methods cannot be hooked. That's something that needs more investigation, but I would like to fix the more critical issue like the ones for Samsung first.


    That said, I won't be able to work on Xposed for the next days, definitely not before Monday. Keep in mind that this isn't my fulltime job and that an alpha phase might take some time. It would be illusionary to assume that we reach a stable state after a few days, with all the changes that have been done.
    2120
    As you have probably noticed, more than 2,000 posts have been made in the original thread about Xposed on Lollipop. I'm really overhelmed by all your feedback! Also many thanks to those people who have donated already, it's great to see how much Xposed means to you.

    Although so much discussion and helping each other is great, it's hard for anyone (including me) to follow. Hence, I have decided to create this thread were only I (and possibly the XDA moderators) will give some updates. This will make it easier for me to inform you about the current status, bugs I know about and so on. Feel free to subscribe to it or simply check from time to time. I'm not sure yet about the best way for me to get a consolidated overview of existing issues that have been confirmed by several people and ideally already have a sufficient information (like logcats, clear description of the error, ...) attached, but I hope we can work something out.
    1838
    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.