[UNOFFICIAL] Xposed for Samsung Lollipop by arter97

arter97

Recognized Developer
Oct 14, 2012
3,753
33,661
263
23
Seoul
/* Intro */

3 months after the first functional Xposed for Lollipop by @rovo89 was introduced,
now here comes *somewhat* functional Xposed for Samsung Lollipop firmware.

Embrace yourself.

/* Technical background */

Why were Samsung users left out of the Xposed party?
Because Samsung has massively customized ART runtime included in their firmwares compared to AOSP.
And plus, because the system partition has so little space left, they have additionally implemented xz decompression on top of ART.
Those 2 main reasons has differentiated Samsung's ART from the rest of the ROM's ART.

More technical information on post 2.

/* Disclaimer */

Your warranty is now void.
I am not responsible for bricked devices, dead SD cards,
thermonuclear war, or you getting fired because the alarm app failed. Please
do some research if you have any concerns about features included in this project
before flashing it! YOU are choosing to make these modifications, and if
you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.

/* Prerequisite */

Due to my skills limitation, only deodex'ed ROMs are supported for now.
For more explanations, checkout post 2.

/* Supported firmwares */

Every ARMv7(32-bit) Samsung Lollipop Android 5.0 deodex'ed firmware should work.
But please note that I have tested this only on Galaxy S4, Note 3 and S5.

For 64-bit, please check http://forum.xda-developers.com/xposed/unofficial-xposed-samsung-lollipop-t3180960 by @wanam
For 32-bit on Android 5.1, I cannot develop on it as I don't have any 32-bit devices capable of running Android 5.1.

/* Before you download ... */

Donate to @rovo89
Donate to @wanam
Show your thanks to @_riddle
Without these people, this would not have been possible at all.

/* Details about binaries */

CyanogenMod's ART runtime changes merged - Performance improvements
Compiled using Linaro GCC 4.8
Method in-lining optimizations made in Android 5.1 merged
Few Android M ART runtime changes which were early-adopted by Samsung merged
-O3 and other compiler optimizations added
Release separated to "exynos" and "snapdragon" versions for more compiler optimizations
Optimize everything enabled

/* Download */

Attached below on XDA

/* How to install */

1. No matter what you do, back-up first.
2. Install XposedInstaller app from http://forum.xda-developers.com/showthread.php?t=3034811
3. Flash the attached Xposed framework zip on the custom recovery.

/* How to uninstall for V1 ~ V7 */

1. Flash the attached Xposed uninstaller zip on the custom recovery.

/* v75+ sticky note */

With v75 and up, this port do not longer touches core-libart.jar, thanks to @wanam.
This would potentially increase compatibility and fix other weirdness such as malfunctioning email app.
However, this introduces some variables.

First, there are more versions that you should choose.
Exynos and Snapdragon is quite self-explanatory, but there are now new "requestConcurrentGC" version for maximizing compatibility.

Don't know what to choose? Don't worry, it won't break your device if you install a wrong one.
If you install a wrong one, the installer will simply tell you that you should go with the other version.


As far as my testing goes, only the Korean Note 3 firmwares should install "requestConcurrentGC" version.

Uninstaller part have changed too.
You need to use uninstaller provided directly by @rovo89.
Do not use my uninstaller for v75 and up.
 

Attachments

Last edited:

arter97

Recognized Developer
Oct 14, 2012
3,753
33,661
263
23
Seoul
/* Technical information and Q&A */

Q: What took you so long?
A: @rovo89 has explained himself. http://forum.xda-developers.com/showpost.php?p=58949255&postcount=3

Q: Okay, you don't seem like a better developer than @rovo89. How did you do it?
A: Of course not. This is the main reason why deodex'ed ROM is a prerequisite.
Samsung has implemented all sorts of funny stuffs on their version of ART. See the link above.
To workaround this, converting a ROM to deodex'ed format somewhat brings back the oat formats to *AOSP-like* dex format(Huge thanks to @_riddle).
After deodexing is done, we can use source-built ART binaries with minimal modifications.
But due to my coding skills, I had to modify core-libart.jar to make it work again.
The core-libart.jar differs from every single device out there and it'll be a real headache to match with 1 ART binary version. That's why I've included the core-libart.jar on the installation zip file.
The included core-libart.jar has 2 different versions to correspond on the type of ROM user is using.
1 : Firmwares with appStartup
2 : Firmwares without appStartup
After deodexing, installing new ART stuffs, we can start the boot-up sequence.
Unfortunately again, /system/bin/installd passes some arguments that AOSP version of dex2oat do not understand. To bypass this, I've patched oat tools to ignore unimplemented arguments.
Now we can see the good old "Android is upgrading" pop-up and go have a cup of coffee while it dexopts all those hundreds of bloatwares.

Q: Fantastic, but now I get a continuous logcat burps - http://pastebin.com/MxeAE76n
A: To avoid that, that's why I've put 2 different versions of core-libart.jar. But unfortunately on those cases, my installer has failed to recognize which version your ROM uses.
During the installation, the installer will output a message on which core-libart.jar is installed on your system.
After you see that logcat stuffs, please change to the opposite version of core-libart.jar the installer told you.
So for example, if the installer says core-libart1.jar is installed, extract the zip and replace /system/framework/core-libart.jar with core-libart2.jar within the zip.

Q: How do I deodex my ROM?
A: @joeldroid and @svadev have an awesome tool for you to deodex your ROM.
Go check http://forum.xda-developers.com/and.../script-app-joeldroid-lollipop-batch-t2980857 and http://forum.xda-developers.com/galaxy-s5/general/tool-deodex-tool-android-l-t2972025
Both worked flawlessly for me.

Q: Gimme tha sources!
A: https://github.com/arter97/android_art/tree/samsung-lollipop

Q: AAA and BBB modules are incompatible!
A: Most likely because they don't support Touchwiz Lollipop *yet*.

Q: You mother father gentleman, you bricked my phone!
A: Unfortunately, I had tested those only on 3 devices which, ironically, has the same processor. Maybe Exynos family is not support, I don't know.
I told you to back-up beforehand. Post log and we can probably work together and add your device/ROM supported.
 
Last edited:

arter97

Recognized Developer
Oct 14, 2012
3,753
33,661
263
23
Seoul
/* Changelog */

v75
Xposed v75 merged
(Fixes boot issue with latest Android 5.0 firmwares)
Method changed to use @wanam's XposedBridge

/* v75+ sticky note */

With v75 and up, this port do not longer touches core-libart.jar, thanks to @wanam.
This would potentially increase compatibility and fix other weirdness such as malfunctioning email app.
However, this introduces some variables.

First, there are more versions that you should choose.
Exynos and Snapdragon is quite self-explanatory, but there are now new "requestConcurrentGC" version for maximizing compatibility.

Don't know what to choose? Don't worry, it won't break your device if you install a wrong one.
If you install a wrong one, the installer will simply tell you that you should go with the other version.


As far as my testing goes, only the Korean Note 3 firmwares should install "requestConcurrentGC" version.

Uninstaller part have changed too.
You need to use uninstaller provided directly by @rovo89.
Do not use my uninstaller for v75 and up.


V6
Xposed v71 merged
Possible performance degradation issue fixed
Releases renamed to "exynos" and "snapdragon", now the "exynos" version is properly optimized for Exynos processor
Uninstaller added
Optimize everything enabled

V5
Xposed v65 merged - Now compatible with alpha4
Do not attempt to use uninstaller provided by rovo89, it will brick your device for now - TODO

V4
ART runtime & Xposed binary changes by rovo89 merged - Fixes logging and some other misc issues
CyanogenMod's ART runtime changes merged - Performance improvements
Compiled using Linaro GCC 4.8
Method in-lining optimizations made in Android 5.1 merged
Few Android M ART runtime changes which were early-adopted by Samsung merged
Few core-libart.jar smali durps fixed
-O3 and other compiler optimizations added
Release separated to "generic" and "krait" versions for more compiler optimizations
Generic - Devices with Exynos or other non-Krait Snapdragon SoCs; If you don't know which to choose, go with Generic.
Krait - Devices with Quadcore Krait Snapdragon SoCs.

V3
Another version of core-libart.jar added for GT-i9505 compatibility
(Firmwares without isMdfEnforced)
This update is unnecessary for devices which already runs Xposed with no issues.

V2
Source code modification attempted to hopefully fix boot issues with devices like Galaxy Alpha.
https://github.com/arter97/android_art/commit/eed217701cc2d3a57f940c5bd69b393c768777a9
This update is unnecessary for devices which already runs Xposed with no issues.
 
Last edited:

darkera13

Senior Member
Jun 19, 2012
567
6,010
0
www.gamesbai.com
Which one is the original method yours or arter's?
I'm confused
Me. I show a demo video 1 week ago. I public it first, even dont say but he base on my work is the true.
Xposed dont work with Samsung Lollipop Roms long time ago, the long time enough for all of you think this mission is impossible until i public my guide and he public after that about few hours.
 

noobiedev83

Senior Member
May 12, 2015
212
62
58
Me. I show a demo video 1 week ago. I public it first, even dont say but he base on my work is the true.
Xposed dont work with Samsung Lollipop Roms long time ago, the long time enough for all of you think this mission is impossible until i public my guide and he public after that about few hours.
It should at least give you credit for that because I do remember seen your post a week ago
 

arter97

Recognized Developer
Oct 14, 2012
3,753
33,661
263
23
Seoul
Me. I show a demo video 1 week ago. I public it first, even dont say but he base on my work is the true.
Xposed dont work with Samsung Lollipop Roms long time ago, the long time enough for all of you think this mission is impossible until i public my guide and he public after that about few hours.
Um, no offense but your method quite differs from mine.
I left out String.clear() and modified core-libart.jar to be compatible universally.
Your guide did not help me in anyways.

And I was also working on this weeks ago. Just didn't share it with the world which were *not-working* then.