Remove All Ads from XDA

[OFFICIAL] Xposed for Lollipop/Marshmallow/Nougat [v88.1, 2017/10/10]

2,572 posts
Thanks Meter: 74,931
 
By rovo89, Senior Recognized Developer on 13th February 2015, 08:48 PM
Thread Closed Email Thread
7th October 2015, 11:05 PM |#21  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 74,931
 
Donate to Me
More
Framework version 75 adds compatibility with the latest 5.1.1 ROMs (v19 and later) which include a change to app_process. This version should be compatible with both, newer and older 5.1.x ROMs. The change didn't affect 5.0.x. This version also disables the dex2oat watchdog, so especially on older devices with less performance, Xposed might now be working.

Fixing this issue prevented me from gettings started with Marshmallow so far, but I'm on it. My Nexus 9 is running on stock AOSP 6.0 already and the sources are synced to the build server (thanks to XDA for providing it). I assume that integrating the hooking mechanism should work relatively smoothless (although there were some bigger architectural changes). However, there are some new things, e.g. JIT and the optimizing compiler that need more attention to ensure that methods which could potentially be hooked are really called instead of being optimized away.

I can't give any timeline for this, it's done when it's done, and Xposed is not the only thing in my life. That said, donations are always very welcome as a little extra motivation.
The Following 1,234 Users Say Thank You to rovo89 For This Useful Post: [ View ]
 
 
25th October 2015, 05:30 PM |#22  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 74,931
 
Donate to Me
More
Quick status update: I have transferred most of my ART modifications to the 6.0 source code and the few app_process AOSP changes to my binary. It's more difficult than 5.0 - > 5.1 (which was not much more than a fix update) as Google has refactored and reworked the code in many places. So I had to find out where the code has moved and how it works now (and sometimes, this led to cleaner modifications, which is nice).

Recompilation of odex files seems to work fine, but needs more testing. I also didn't disable any ART optimizations yet, which will be necessary to ensure that hooked methods are actually called.

A simple test hook is working fine now, as is booting with the modified ART libraries. However, it's not booting yet due to some kind of stack corruption. I have no idea how difficult it will be to find and fix the root cause and how many more issues I will run into.

So as always, I can't and won't give any ETAs. Just wanted to let you know that I'm on a good way and say thanks for the donations I've received lately.

PS: Marshmallow muffins today, yummy!
The Following 1,256 Users Say Thank You to rovo89 For This Useful Post: [ View ]
10th November 2015, 06:29 PM |#23  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 74,931
 
Donate to Me
More
Meanwhile, most things are working fine. My Nexus 9 is booting and running with Xposed enabled. I have fixed the root cause of a couple of crashes which unfortunately needed much time for analysis (with the outcome that three additional lines fix it). There are a few more things I need to test, but I think you can expect a first version later this week. It should be stable enough for daily use, even though not all modules will work out of the box due to the usual amount of changes in AOSP.

Also, due to popular demand, I have added a Bitcoin address to my donation page now.
The Following 1,040 Users Say Thank You to rovo89 For This Useful Post: [ View ]
14th November 2015, 09:43 PM |#24  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 74,931
 
Donate to Me
More
Marshmallow!

I have just uploaded version 76 with support for Android 6.0 (Marshmallow). Even though I tested it only on my Nexus 9/arm64, I'm confident that the arm and x86 builds will work fine as well. The Xposed Installer app didn't require any changes, you can still use version 3.0 alpha4.

What else can I say about it? Well, as expected, the upgrade from 5.1 to 6.0 was a much bigger one than from 5.0 to 5.1. Therefore, porting the Xposed-related changes in ART was more complicated, but as Google has done a lot of refactoring, I could simplify some of my own changes as well. Pretty much everything is ported now, except for support for gzipped and encrypted files - let's see if vendors even use them on 6.0.

The only limitations I'm aware of at this time are:
- I have only tested this with SuperSU installed, due to which dm-verity and some SELinux rules are disabled. Especially dm-verity would definitely conflict with the modifications of the system partition.
- Access to preferences files might be blocked by SELinux, and Xposed is currently not able to work around that. (*) Some modules might be affected by this, nevertheless I strongly recommend to keep SELinux enabled and enforcing to keep your device as safe as possible.
- I could not test all Xposed APIs. The system is booting without any error messages from Xposed, but some functions that the framework makes available might still need to be adjusted for Marshmallow.
- Obviously, modules themselves might need to be updated as well due to changes in AOSP. Please be patient and give module developers the time to make the required changes. If you absolutely "cannot live" without module X, don't update to Marshmallow yet.
- Some issues might arise from JIT (disabled by default, even in AOSP) and the "optimizing" compiler (which rewrites apps' code to be more efficient, due to which some calls might simply be skipped). Both of these are new in Marshmallow and might have various consequences in combination with Xposed, from hooks that silently don't work to crashes. However, as it's running stable for me, I decided not to disable them and will instead look into them in more detail if concrete issues are reported.

Three more things:
- I plan to publish a new version for Lollipop (5.0/5.1) within the next days, with backports of some of the changes I did for Marshmallow. This needs some more testing though.
- I know that some vendors seem to have backported the latest 5.1 security fix (see a few posts above) to 5.0, due to which Xposed is no longer working. This should also be fixed with the next version.
- I will push the changes to GitHub soon, also within the next days (once I have made sure they don't break 5.0/5.1).

And now: Have fun flashing Marshmallow and Xposed! Discussions go here.


(*) For developers: Marshmallow now lets apps run with context "u:r:untrusted_app:s0:c512,c768" instead of "u:r:untrusted_app:s0". If the app is run by a secondary user, the level ("c<nnn>,c<nnn>") is different, and system apps (like Settings) don't have such a level at all. The SELinux policy allows access to app data files only when the the level of the file and the process matches exactly, therefore you can no longer access preferences created by a primary user app from apps like Settings or while logged in as secondary user. I do have workarounds for Zygote and system_server, but I can't use them for normal apps in their current state as it might open big security holes.
The Following 848 Users Say Thank You to rovo89 For This Useful Post: [ View ]
15th November 2015, 12:23 AM |#25  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 74,931
 
Donate to Me
More
Quote:
Originally Posted by rovo89

Some issues might arise from JIT (disabled by default, even in AOSP) and the "optimizing" compiler (which rewrites apps' code to be more efficient, due to which some calls might simply be skipped).

Yeah. I was wondering why I didn't come across any issues at all with the optimizing compiler during development - especially as Xposed Installer relies on certain methods not being optimized away. It turned out that a special kind of optimization wasn't done for debuggable versions of apps - so on my device, with Xposed Installer installed via Eclipse, everything was fine, but when you have the release build, some hooks are ineffective because the method is never really called, so the active Xposed version wasn't detected properly...

That's why I had to upload a new version 77 which disables the method inliner for the optimizing compiler as well, just like it was for the normal ("quick") compiler already. It will also trigger the recompilation of all oat files, so the first boot will take longer again.
The Following 483 Users Say Thank You to rovo89 For This Useful Post: [ View ]
15th November 2015, 07:58 PM |#26  
rovo89's Avatar
OP Senior Recognized Developer
Thanks Meter: 74,931
 
Donate to Me
More
As promised, I have just uploaded version 78. It contains:
- [5.0 only] Bootloop on ROMs where the vendor has merged a recent security fix from 5.1
- [5.0/5.1 only] Backports of a few changes on Xposed that I had initially done for 6.0
- [6.0 only] Fix XModuleResources.createInstance() API method
- Fix for the invokeOriginalMethod() API method

Now, the 5.0, 5.1 and 6.0 ZIPs are in sync again. In the future, I plan to release ZIPs for all three Android versions at the same time again - even in case the changes affect only one version. I think that's better than having to keep track of the latest release per version. This time was an exception due to the backports that I needed to verify.

The source code is also published on GitHub now.
The Following 1,007 Users Say Thank You to rovo89 For This Useful Post: [ View ]