[4.4/4.4.x][PATCH] Qualcomm-optimized Dalvik & Bionic libraries

Search This thread

kszaq

Senior Member
Apr 4, 2011
301
842
For most up-to-date information on optimized libraries, please carefully read @osm0sis's post: http://xdaforums.com/showpost.php?p=53963337&postcount=1287
You should also read @Lethargy's post in the Nexus 5 thread: http://xdaforums.com/showpost.php?p=56038135&postcount=2918.


The outdated flashable ZIPs from this post have been deleted. Head over to post linked above for the latest libraries.

Have you ever wondered why your Nexus 4 performs worse than other flagship devices with the same quad-core CPU in benchmarks? Not any more! I present you with a very simple patch that will boost your performance to what other APQ8064-based devices offer.

Before using, please read the following Q&A.

Q: Will this void my warranty?
A:
Yes. Flash at your own risk.

Q: Can I use it?
A:
Yes, if you're on any 4.4/4.4.x ROM.

Q: How does this work?
A:
This patch consists of two files that include optimized bionic and Dalvik libraries for any KitKat ROM.

Q: What is bionic?
A:
It is a vital system library that provides i.a. basic math and memory access functions to every other library and application in Android.

Q: What is Dalvik?
A:
In short, Dalvik is a virtual machine in which every not-native-code app runs. You can read more about it in a Wikipedia article.

Q: How do I benefit from this patch?
A:
In two ways: bionic patch provides faster memory access and optimized some of the math operations, dalvik provides optimized Dalvik Virtual Machine library that allows faster code execution.

Q: Do I need this patch?
A:
It depends on what ROM you are using:
  • if you're on stock ROM, you'll benefit from flashing both bionic and dalvik patches,
  • if you're using a custom ROM, you most probably don't need bionic patch, as these are already included in most custom ROMs. You'd benefit only from flashing dalvik patch (if it's not already included by your ROM maintainer, of course),
  • don't use the bionic patch on CyanogenMod, PSX and probably others, because they already have more optimized versions!

Q: Why aren't these patches included in stock ROM?
A:
As for bionic - I don't know. Maybe that's because Google didn't want to include vendor-specific optimizations in AOSP or maybe simply because Qualcomm never posted them in Android Code Review to be merged. As for dalvik - because they are closed-source. Here'a a good explanation by @xboxfanj:
Part of the point of Nexus devices is that AOSP can produce nearly identical images minus GApps. Google would not use a proprietary dalvik as that is one of the core libraries. Using a proprietary dalvik would undermine AOSP. Although, an open libqc-dalvik or even just giving us that binary would be nice. Google could have a device specific extension similar to the adreno extensions onto renderscript and egl for dalvik. Proprietary dalvik won't happen, but an adreno extension could be cool.

Q: Where do these patches come from?
A:
These have been authored by Qualcomm. Bionic patch comes from Code Aurora Forum, Dalvik library has been extracted from Moto X 4.4. ROM. Another good read by @xboxfanj:
CAF has all Qualcomm's bionic patches and slight dalvik tweaks, however, the dalvik patches that are used here in the Moto X and any QCOM (non-Nexus) device, are mostly closed source. If you look at the change here: https://www.codeaurora.org/cgit/qui...0&id=337a595d746d34ade52e3aba2c739455dfd3cf57

You will see that most of that change is supporting other libraries (libqc-opt and libqc-dalvik), which is where their optimizations are. Unfortunately, both of those are closed source. libqc-opt is included in QCOM ROM zips as a shared library, so we can use that, however, libqc-dalvik is a static library, so we can't pull that from anywhere, as it is included in the libraries themselves and not put in system. This means that our only option to get all of Qualcomm's dalvik optimizations is to use their binaries rather than building from source, since building from source would mean missing any optimizations brought by libqc-dalvik, libqc-sqlite, and libqc-skia (the last two haven't been included in any patch, but are QCOM static libraries).

TLDR: QCOM's dalvik optimizations are closed source, so we are forced to use their binaries.

Remember to thank @xboxfanj for his very useful posts!

Q: What is the reason for including installd file?
A:
The installd binary is from stock Nexus 4 ROM and is included for compatibility with CyanogenMod and CM-based ROMs. This is because CyanogenMod changed installd to work with their dexopt-on-cache (see here: https://github.com/CyanogenMod/android_frameworks_native/commits/cm-11.0/cmds/installd) and it you don't flash stock installd you'd get hundreds of FCs and unusable ROM.

Q: How do I use this patch?
A:
Simple flash it over your current ROM in recovery. Remember to wipe Dalvik Cache after flashing. Full wipe is not needed.

Q: How do I revert?
A:
Simply flash over your current ROM and wipe Dalvik Cache afterwards. Full wipe is not needed.

Q: Can I flash it over an ODEXed ROM?
A:
Yes, but it is strongly recommended to use a deodexed ROM if you want to use Dalvik patch.

Q: How will this affect my battery life?
A:
It will be at least the same, if not better. Better performance = less CPU time spent on calculations = better battery life.

Q: I don't see any performance gains in some app, why is that?
A:
The dalvik patch doesn't affect apps that use native libraries, i.e. you won't see much performance gain in Chrome etc.

Q: I'm on X kernel, can I use it?
A:
Yes, use it with any kernel you like.

Q: Can I use it on other devices?
A:
Yes, you can use this patch on every Krait device that uses AOSP-based ROM (examples: Nexus 5, Nexus 7 2013). Don't flash it on stock ROM on non-Nexus devices, as they already include these optimizations (that includes Galaxy S4 and HTC One Google Play editions!).

Q: What if I use it on stock ROM and OTA arrives? Can I install the OTA straight away?
A:
You can't. You have to revert to stock libraries first. Keep in mind that every modification to stock ROM can mean problems when installing an OTA. You should revert to fully stock ROM to properly apply an OTA. For your courtesy, there's a revert ZIP attached for KRT15S and KOT49E ROMs. Remember that the safest way it to flash system.img from a factory image before applying an OTA once you made modifications to your /system partition!

Q: Can I use these patches on 4.4.1/4.4.2 stock ROM (KOT49E/KOT49H)?
A:
Yes, you can.

Q: Can I use ART with this patch installed?
A:
Yes, but you won't see any performance gains. In fact, with this patch Dalvik is faster than ART. I suppose ART will supersede Dalvik in performance in the future, but not yet.

Q: Where can I see some benchmark results before I flash?
A:
Head over to Nexus 4 Benchmarks thread.

Q: Do I need to be rooted to flash this?
A:
No. The only thing you need is custom recovery (CWM, TWRP etc.).

Q: Do I have to flash these patches every time I install an update/new ROM?
A:
Yes.

Don't replace these files on a running system (i.e. via a file explorer or adb)! If you do this, your phone will stop working and you'd have to reflash your ROM to make it work again. And you'll probably loose some data by doing so. Always use recovery to replace these libraries.

If you're running CM11 released after 1 March 2014 or any other ROM that includes fixes to DVM, please flash 4.4_qc-optimized_dalvik-cm11.zip. This is the only file you need, don't flash anything else from this thread!
 
Last edited:

meangreenie

Senior Member
Mar 6, 2012
2,584
732
Yep, good to have a dedicated thread.

I did notice a slight change, with there being no more dexopt file, just checking that this is correct?
 
  • Like
Reactions: kszaq

LudicrousPeed

Senior Member
Jul 11, 2012
134
33
In the benchmarks thread, I saw a comment that it probably won't work on CyanogenMod ROMs. Is that true?

Sent from my SCH-I535 using Tapatalk
 

max4wdc

Senior Member
Dec 25, 2011
299
157
i got bootloop !
with 4.4 stock.
-----------------------------------------------
I tested the patches on my custom ROM and it seemed to me that I didn't need to replace dexopt binary anymore yet from your bootloops it looks like we have to replace it anyhow. Thank for noticing! I've uploaded an updated dalvik patch, please try it now.
now it's working , my apps is upgrading now :D
it's boring (289 apps .... :| :D)
 
Last edited:

ofan666

Member
Sep 5, 2013
17
4
i have no bootloop flashed both files, after install, i did wipe cache and dalvik cache. But previously i already did patch motoX_4.4_qcoptimized.zip from kszaq posted at Nexus 4 Benchmark thread. I have Stock ROM + Kernel.
 

max4wdc

Senior Member
Dec 25, 2011
299
157
i see you change the dalvik file( "4.4_qc-optimized_dalvik.zip") !
i'm testing your new file .
 

kszaq

Senior Member
Apr 4, 2011
301
842
Yep, good to have a dedicated thread.

I did notice a slight change, with there being no more dexopt file, just checking that this is correct?

i got bootloop !
with 4.4 stock.

I tested the patches on my custom ROM and it seemed to me that I didn't need to replace dexopt binary anymore yet from your bootloops it looks like we have to replace it anyhow. Thank for noticing! I've uploaded an updated dalvik patch, please try it now.

In the benchmarks thread, I saw a comment that it probably won't work on CyanogenMod ROMs. Is that true?

Sent from my SCH-I535 using Tapatalk

It works for me on CyanogenMod. I figured out that the reason for it not having worked before was that CyanogenMod uses a modified installd binary (they patched it for Dexroot on Cache). As this is the only change they made I included stock installd binary (from stock Nexus 4 ROM) to make dalvik patch work with CM and any ROM that uses their base.
 
  • Like
Reactions: max4wdc

max4wdc

Senior Member
Dec 25, 2011
299
157
I tested the patches on my custom ROM and it seemed to me that I didn't need to replace dexopt binary anymore yet from your bootloops it looks like we have to replace it anyhow. Thank for noticing! I've uploaded an updated dalvik patch, please try it now.



It works for me on CyanogenMod. I figured out that the reason for it not having worked before was that CyanogenMod uses a modified installd binary (they patched it for Dexroot on Cache). As this is the only change they made I included stock installd binary (from stock Nexus 4 ROM) to make dalvik patch work with CM and any ROM that uses their base.

now work on 4.4 stock .:good:
 

animania260

Senior Member
Apr 7, 2013
87
94
Indianapolis
belialweb.net
Just wanted to say thank you! For this.
Doubled benchmark performance, which I don't care about but makes a lot of apps faster.

Very interesting stuff, I never knew the other devices had Qualcomm optimized bionic and dalvik libraries.

Working perfectly fine on stock KRT16S on Nexus 7 (2013)

Thanks again!

PS. I was interested in why initially you said this would only work on deodexd ROMs? Almost all production shipped firmware's are odex, are they not? Or is the MotoX a deodexd ROM/firmware?
Just curious.

Sent from my Nexus 7 using Tapatalk 4
 

howard bamber

Senior Member
Jun 4, 2012
1,408
183
Southport
Thanks made Dalvic quicker. Added 10 to antutu but phone was not set up for testing. Seems snappier which begs the question why is this not in official builds? Insane

Sent from my Nokia 3210
 

xboxfanj

Recognized Developer
Apr 24, 2011
7,313
7,797
St. Louis
Thanks made Dalvic quicker. Added 10 to antutu but phone was not set up for testing. Seems snappier which begs the question why is this not in official builds? Insane

Sent from my Nokia 3210
Qualcomm won't open source their libqc-dalvik optimizations and Google won't use a proprietary dalvik as dalvik is such a core part of Android. The goal of the AOSP is to keep as much open source as they can, sometimes at the cost of proprietary optimization.
 

purpse

Senior Member
Nov 19, 2011
50
7
Using the old zip from the benchmark thread, my atuntu jumped to 20000. With the 2 new zips I'm back to 17000. Tried the old zip again and back up to 20000. Any ideas why?

Sent from my Nexus 4 using xda app-developers app
 

motherninja

Senior Member
May 13, 2011
627
186
Paris Van Djava
I've tried both patches above on my Nexus 4 with Brainmaster's KRT16S ROM and Semaphore 1.8.0 kernel, after applied both patch I'm wiped the dalvik cache too, but my N4 cannot boot into OS, it just bootlooped to CWM recovery again and again.
 

MameTozhio

Senior Member
Apr 27, 2013
2,456
1,365
24
Working well on stock. If you have issues and you're odexed, wipe cache and dalvik.
 

kszaq

Senior Member
Apr 4, 2011
301
842
I've tried both patches above on my Nexus 4 with Brainmaster's KRT16S ROM and Semaphore 1.8.0 kernel, after applied both patch I'm wiped the dalvik cache too, but my N4 cannot boot into OS, it just bootlooped to CWM recovery again and again.

Have you re-downloaded the dalvik patch after I re-uploaded it yesterday? The first version missed dexopt binary and it caused bootloops.

Using the old zip from the benchmark thread, my atuntu jumped to 20000. With the 2 new zips I'm back to 17000. Tried the old zip again and back up to 20000. Any ideas why?

Sent from my Nexus 4 using xda app-developers app

What is your Dalvik score in AnTuTu? If it's about 1800, then the patch it working as it should and the lower score may be due the thermal throttling.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 381
    For most up-to-date information on optimized libraries, please carefully read @osm0sis's post: http://xdaforums.com/showpost.php?p=53963337&postcount=1287
    You should also read @Lethargy's post in the Nexus 5 thread: http://xdaforums.com/showpost.php?p=56038135&postcount=2918.


    The outdated flashable ZIPs from this post have been deleted. Head over to post linked above for the latest libraries.

    Have you ever wondered why your Nexus 4 performs worse than other flagship devices with the same quad-core CPU in benchmarks? Not any more! I present you with a very simple patch that will boost your performance to what other APQ8064-based devices offer.

    Before using, please read the following Q&A.

    Q: Will this void my warranty?
    A:
    Yes. Flash at your own risk.

    Q: Can I use it?
    A:
    Yes, if you're on any 4.4/4.4.x ROM.

    Q: How does this work?
    A:
    This patch consists of two files that include optimized bionic and Dalvik libraries for any KitKat ROM.

    Q: What is bionic?
    A:
    It is a vital system library that provides i.a. basic math and memory access functions to every other library and application in Android.

    Q: What is Dalvik?
    A:
    In short, Dalvik is a virtual machine in which every not-native-code app runs. You can read more about it in a Wikipedia article.

    Q: How do I benefit from this patch?
    A:
    In two ways: bionic patch provides faster memory access and optimized some of the math operations, dalvik provides optimized Dalvik Virtual Machine library that allows faster code execution.

    Q: Do I need this patch?
    A:
    It depends on what ROM you are using:
    • if you're on stock ROM, you'll benefit from flashing both bionic and dalvik patches,
    • if you're using a custom ROM, you most probably don't need bionic patch, as these are already included in most custom ROMs. You'd benefit only from flashing dalvik patch (if it's not already included by your ROM maintainer, of course),
    • don't use the bionic patch on CyanogenMod, PSX and probably others, because they already have more optimized versions!

    Q: Why aren't these patches included in stock ROM?
    A:
    As for bionic - I don't know. Maybe that's because Google didn't want to include vendor-specific optimizations in AOSP or maybe simply because Qualcomm never posted them in Android Code Review to be merged. As for dalvik - because they are closed-source. Here'a a good explanation by @xboxfanj:
    Part of the point of Nexus devices is that AOSP can produce nearly identical images minus GApps. Google would not use a proprietary dalvik as that is one of the core libraries. Using a proprietary dalvik would undermine AOSP. Although, an open libqc-dalvik or even just giving us that binary would be nice. Google could have a device specific extension similar to the adreno extensions onto renderscript and egl for dalvik. Proprietary dalvik won't happen, but an adreno extension could be cool.

    Q: Where do these patches come from?
    A:
    These have been authored by Qualcomm. Bionic patch comes from Code Aurora Forum, Dalvik library has been extracted from Moto X 4.4. ROM. Another good read by @xboxfanj:
    CAF has all Qualcomm's bionic patches and slight dalvik tweaks, however, the dalvik patches that are used here in the Moto X and any QCOM (non-Nexus) device, are mostly closed source. If you look at the change here: https://www.codeaurora.org/cgit/qui...0&id=337a595d746d34ade52e3aba2c739455dfd3cf57

    You will see that most of that change is supporting other libraries (libqc-opt and libqc-dalvik), which is where their optimizations are. Unfortunately, both of those are closed source. libqc-opt is included in QCOM ROM zips as a shared library, so we can use that, however, libqc-dalvik is a static library, so we can't pull that from anywhere, as it is included in the libraries themselves and not put in system. This means that our only option to get all of Qualcomm's dalvik optimizations is to use their binaries rather than building from source, since building from source would mean missing any optimizations brought by libqc-dalvik, libqc-sqlite, and libqc-skia (the last two haven't been included in any patch, but are QCOM static libraries).

    TLDR: QCOM's dalvik optimizations are closed source, so we are forced to use their binaries.

    Remember to thank @xboxfanj for his very useful posts!

    Q: What is the reason for including installd file?
    A:
    The installd binary is from stock Nexus 4 ROM and is included for compatibility with CyanogenMod and CM-based ROMs. This is because CyanogenMod changed installd to work with their dexopt-on-cache (see here: https://github.com/CyanogenMod/android_frameworks_native/commits/cm-11.0/cmds/installd) and it you don't flash stock installd you'd get hundreds of FCs and unusable ROM.

    Q: How do I use this patch?
    A:
    Simple flash it over your current ROM in recovery. Remember to wipe Dalvik Cache after flashing. Full wipe is not needed.

    Q: How do I revert?
    A:
    Simply flash over your current ROM and wipe Dalvik Cache afterwards. Full wipe is not needed.

    Q: Can I flash it over an ODEXed ROM?
    A:
    Yes, but it is strongly recommended to use a deodexed ROM if you want to use Dalvik patch.

    Q: How will this affect my battery life?
    A:
    It will be at least the same, if not better. Better performance = less CPU time spent on calculations = better battery life.

    Q: I don't see any performance gains in some app, why is that?
    A:
    The dalvik patch doesn't affect apps that use native libraries, i.e. you won't see much performance gain in Chrome etc.

    Q: I'm on X kernel, can I use it?
    A:
    Yes, use it with any kernel you like.

    Q: Can I use it on other devices?
    A:
    Yes, you can use this patch on every Krait device that uses AOSP-based ROM (examples: Nexus 5, Nexus 7 2013). Don't flash it on stock ROM on non-Nexus devices, as they already include these optimizations (that includes Galaxy S4 and HTC One Google Play editions!).

    Q: What if I use it on stock ROM and OTA arrives? Can I install the OTA straight away?
    A:
    You can't. You have to revert to stock libraries first. Keep in mind that every modification to stock ROM can mean problems when installing an OTA. You should revert to fully stock ROM to properly apply an OTA. For your courtesy, there's a revert ZIP attached for KRT15S and KOT49E ROMs. Remember that the safest way it to flash system.img from a factory image before applying an OTA once you made modifications to your /system partition!

    Q: Can I use these patches on 4.4.1/4.4.2 stock ROM (KOT49E/KOT49H)?
    A:
    Yes, you can.

    Q: Can I use ART with this patch installed?
    A:
    Yes, but you won't see any performance gains. In fact, with this patch Dalvik is faster than ART. I suppose ART will supersede Dalvik in performance in the future, but not yet.

    Q: Where can I see some benchmark results before I flash?
    A:
    Head over to Nexus 4 Benchmarks thread.

    Q: Do I need to be rooted to flash this?
    A:
    No. The only thing you need is custom recovery (CWM, TWRP etc.).

    Q: Do I have to flash these patches every time I install an update/new ROM?
    A:
    Yes.

    Don't replace these files on a running system (i.e. via a file explorer or adb)! If you do this, your phone will stop working and you'd have to reflash your ROM to make it work again. And you'll probably loose some data by doing so. Always use recovery to replace these libraries.

    If you're running CM11 released after 1 March 2014 or any other ROM that includes fixes to DVM, please flash 4.4_qc-optimized_dalvik-cm11.zip. This is the only file you need, don't flash anything else from this thread!
    56
    The One Plus One is built with Qualcomm's static library as well as their own optimizations, so that should be best.

    Manufacturer dalvik libs are usually just built with Qualcomm's static library as well as any CAF commits. The One Plus One has both of those, as well as other commits from master and other sources.

    While I'm still working on the Dalvik comparison (..a monster at 27 files), I thought I'd at least share the work I've done so far. Finally done everything! I've generally been booting up, waiting 10 minutes for the device to settle, done 2 benchmarks, compared improvements/defecits from previous, done 2 more benchmarks, back to recovery to try another lib. Pretty tedious. Thanks for everyone's patience/forgetfulness. ;)

    Bionic Patch Comparisons:
    Code:
    0a3a55e9df1922c989a7383e32f3a35b *system/lib/libc.so (~21500-22000)
    e24bc6034ea4f430e9b7b8f10de6fe28 *previous\bionic\libc.so ~=
    74f9d62bd5e844c20f8873a5d1bdecfa *Z2_bionic_and_dalvik_only\bionic\libc.so ~=
    6878120dfd4b57cfe30fb1e17061ff11 *MotoX-ghost-tmo_4.4.3\bionic\libc.so ~=
    4ef981ba3896c59cdb598b4219d1359d *OneM8-GPe_m8-Stock_4.4.3\bionic\libc.so ~=
    53d4ef5f9c0c614a08dab2004bacfa71 *OTA_1+One-KVT49L-Complete\bionic\libc.so ~=
    40878c34092bbbbb98750afcb997a3e0 *G3_BIONIC\system\lib\libc.so ~=
    
    28cfa3e2bad9b24a9371d17b85397e18 *system/lib/libm.so (~21500-22000)
    c839e016aedd459463f8549116d4ba12 *previous\bionic\libm.so (~25000-25500)
    becc1e3a54888e345169ecd5de81c180 *OTA_1+One-KVT49L-Complete\bionic\libm.so (~25000-25500)


    As you can see, the real magic appears to be only in libm.so, and it basically doesn't even matter which libc.so you use with it. And, between the two optimized libm.so options (all the others retained the same one that was included in the previous zip, from the OP), there was no obvious difference either, other than the checksum. So, if I had to choose between the one all the manufacturers used previously, and continue to use and the different/newer one from the OnePlus One, I think I'll defer to @xboxfanj's knowledge (quoted above, which presumably also applies to Bionic), and take the One's. QCOM+CAF+CM+others sounds good to me. Likely some improvements over the generic OEM optimized one, which appears to be stagnant. Might as well throw in the libc.so to match, just to be on the safe side. These are pulled from the latest "bacon" system.img (XNPH22R); the recent 25R OTA didn't change any of the Bionic files. :good:


    Updates:
    09/09/14 - added the latest 1+One Bionic patch, current to KTU84P_XNPH33R.
    09/09/14 - added the new LG G3 Bionic patch (credit to Lethargy), the current N5 thread favorite. libm.so is still the same as the old Moto ones, however.
    09/10/14 - reuploaded all with fixes to the install scripts to better preserve correct permissions on the backup files.
    10/15/14 - removed the outdated G3 Bionic patch, since it's outdated.
    10/15/14 - added the latest 1+One Bionic patch, current to KTU84Q_XNPH38R. (1514 downloads)
    09/08/15 - reupload revert file with UPDATE- naming scheme to avoid confusion.
    09/08/15 - added the latest 1+One Bionic patch, current to KTU84Q_XNPH05Q.


    ---------- Post added at 03:00 AM 09/09/2014 ---------- Previous post was at 03:16 AM 07/07/14 ----------


    Not much time left before Android L drops and makes all this optimized Dalvik stuff obsolete, but hey, let's make the most of it while we can! Then of course we can start having fun with optimized ART libs. :p

    Trying all the unique files from the various dumps I used for my Bionic comparison, I used the same method as last time adding Dalvik cache wipes, but AnTuTu updated their 3D test and seemingly other tests as well, so the base score has changed.

    [ Removed comparison since we've shown that the AnTuTu update made it invalid. It could be redone more reliably using the "Benchmark & Tuning" app but with Dalvik being obsolete now this isn't a priority. ]

    libdvm.so is the only file linked against libqc-opt, and dexopt, libdvm.so and libqc-opt.so are the only ones linked against libcutils.so. They're all linked against Bionic libc/libm so there should always be some Dalvik gains with even just the optimized bionic patch. installd isn't actually part of the Dalvik patch, and was only included by the OP for compatibility reasons; it's also linked against libcutils.so, but I've chosen to leave it out since it sounds like more people have trouble with it than without it lately.

    Interestingly you can put any dalvikvm, libcutils.so, and libqc-opt.so in you like and have it boot, but you need ROM-compatible dexopt, libcutils.so, and libdvm.so to boot fully once you add either libdvm.so or dexopt into the mix; you also need optimized versions of all 5 files to boot at all. This sort of matches the linking above, with the exception of libqc-opt.so, which appears fully interchangeable (makes sense too, since it's probably a precompiled vendor lib).

    MotoX and Z2 are completely compatible with eachother and Stock ROM to the point where I could have dexopt and libcutils.so files from the MotoX, and only libdvm.so from the Z2 and it still works fine. OneM8 is also Stock ROM compatible but requires all 3 matching files I mentioned above. 1+One, even with all 3 files, wouldn't boot on Stock ROM. Same goes for the cm11-only ones.

    Late in my testing I also found something like a "version number" in libqc-opt.so. "andr-perf 2.5.11" is the string present in the previous MotoX and current MotoX, where everything else has "andr-perf 2.5.18". The overall hex structure of those old libqc-opt.so files is similar to that of the old 1+One build, but the latest 1+One OTA updated it to be extremely similar to that of the OneM8. The cm11-only one is sort of on its own but closer to the others than the Motos, and the Z2 and OneM8 are very close. Safe to say that they and the latest 1+One are the current builds. It starts at hex offset 1450 if anyone else is curious. While doublechecking this, I found an actual build date a little further in libqc-opt.so, starting at hex offset 2000 in the newer ones. Z2 is listed as 01/07/14, OneM8 is 01/15/14 and latest 1+One is 06/07/14!

    More on the latest libqc-opt.so libraries by build date here: http://xdaforums.com/nexus-4/general/4-4-4-4-x-qualcomm-optimized-dalvik-t2546120/post55342290

    Anyway, despite my time benchmarking having been a huge waste, we know now exactly which files can go together, which is pretty interesting. It'd be totally possible to make a "Franken-mod" with, e.g. the latest One+1 dalvikvm and libqc-opt.so, and any combination of the Z2/MotoX files. @Lethargy created a few "Hybrid" files and have kept them updated. They're attached below CAF for CM/CAF based ROMs and the other for AOSP, along with Revert zips to undo the changes. ;) :cowboy:


    Updates:
    09/10/14 - reuploaded all with fixes to the install scripts to better preserve correct permissions on the backup files.
    09/10/14 - added a "Hybrid" using the latest libqc-opt.so and what I believe are the most optimized files from 1+One, Z3 and OneM8.
    09/19/14 - removed Z2 Dalvik patch, since it was made obsolete by the Z3.
    09/19/14 - added 2 more AOSP-compatible Hybrids using the most interesting combinations of 1+One, Z3 / 1+One, Z3 and MotoX2 files; and a CAF-compatible Hybrid using 1+One and Z3.
    10/01/14 - removed X2 Hybrid since it seems to have stopped working on AOSP, and removed M8 Dalvik since our new benchmarks show the Z3 Hybrid to be best currently.
    10/15/14 - removed 1+One, Z3 and M8 Hybrid since it's outdated.
    10/15/14 - added 1+One CAF-compatible since it's the latest (1026 downloads), and updated the AOSP-compatible Hybrid with the newer dalvikvm and libqc-opt.so from KTU84Q_XNPH38R. (2600 downloads)
    09/08/15 - reupload revert file with UPDATE- naming scheme to avoid confusion.
    09/08/15 - added 1+One CAF-compatible since it's the latest, and updated the AOSP-compatible Hybrid with the newer dalvikvm and libqc-opt.so from KTU84Q_XNPH05Q.


    The install zips back up what you have now, and the reverts restore them. Easiest way to do it, compatible with all devices (N4-N5-N7'13).

    P.P.S. If you found this handy then please check out my Odds and Ends thread for more flashable goodness! :D
    36
    Chill, Winston. I've added it to my list of sh*t to do later this week. Everyone can relax and stop posting the same ETA question over and over again now. :p

    Because people are just throwing sh*t together.

    I've got a couple burning updates to make for my kernel utilities, and then I'll get the latest Moto X libs and make an install zip and revert zip pair for us.

    It'll be device/ROM agnostic and just back up what you have before replacing and then revert by moving the backups back.

    Finally getting to this tonight and tomorrow. Sorry for the wait! I've·been·busy. ;)

    I've downloaded KK4.4.3 system dumps of the Moto X, OnePus One and HTC One M8 GPe. I'm going to checksum and compare the files we've been using and see if any are in common, to narrow things down. Then I'll start testing which work/don't, and those that do I'll benchmark to see which are the most improved. :good:

    Should have things ready for the end of the week at the latest. :cowboy:
    18
    Intrigued by the fact that the libraries improved the performance even when using ART I took the opportunity that flashing the new 4.4.1 rom gave me, to measure performance with antutu in different configurations. Here are the results:

    4.4.1 Stock @Dalvik:
    Total: 16746
    Multitask:2743
    Dalvik: 1124
    CPU Float Point: 1523
    3D Graphics: 3881
    Storage I/O:1112

    4.4.1 Stock @art:
    Total: 16669
    Multitask: 2769
    Dalvik: 991
    CPU Float Point: 1526
    3D Graphics: 3735
    Storage I/O: 1191

    4.4.1 Moto X Dalvik @art:
    Total: 17095
    Multitask: 2723
    Dalvik: 941
    CPU Float Point: 1512
    3D Graphics: 4382
    Storage I/O: 1139

    4.4.1 Moto X Dalvik+Bionic @art:
    Total: 18329 (Results for RAM and I/O performance were lower in this try than in any other, which tells me that something interrupted the benchmark in the background. Perhaps i've launched it too early after the system boot while stuff was still loading. The result should probably be closer to 19000)
    Multitask: 3127
    Dalvik: 968
    CPU Float Point: 1921
    3D Graphics: 5166
    Storage I/O: 985

    4.4.1 Moto X Dalvik+Bionic franco.kernel r197 @art: (My settings for franco.kernel Undervolt: -150mV, CPU throttle @ 70 degrees, everything else standard)
    Total: 20368
    Multitask: 3803
    Dalvik: 948
    CPU Float Point: 2130
    3D Graphics: 5820
    Storage I/O: 1217

    4.4.1 Moto X Dalvik+Bionic franco.kernel r197 @Dalvik (2 tries: straight after booting / 20min after booting):
    Total: 21100 / 21451
    Multitask: 3779 / 3857
    Dalvik: 1824 / 1826
    CPU Float Point: 2092 / 2131
    3D Graphics: 5955 / 6065
    Storage I/O: 1129 / 1165

    There are no revelations, but the test confirms a few things:
    1. These libraries are GOOOD.
    2. Franco kernel is GOOOD too. :)
    3. Even while running ART it's still worth to have the optimised libraries. Dalvik library alone seems to improve the 3D performance a bit, and the benefit of having dalivk and bionic together is obvious.
    4. It's worth to wait a reasonable amount of time after booting the system to make sure nothing's still loading in the background while running the benchmark. (duh ;) )
    5. We already knew it but dalvik has an edge over art in antutu, although the only difference (that of about 1000 points) comes from the Dalvik Test alone, and since I have no idea how this test is performed, and whether it relates to actual performance, i wouldn't worry about it too much.

    I've been running art since kitkat came out. Now i'll try optimised dalvik as my daily driver for a while and share my thoughts later.
    Hope this is helpful.
    17
    New Dalvik Patch coming soon. Not sure how big of a difference it'll make, but it's coming anyway.