yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] JustArchi:
It's physically impossible for my commit to cause java errors, you have problem elsewhere.
[Android Software/Hacking General [Developers Only]] mastero9017:
What about this? AOSP with UBERTC 4.9

http://pastebin.com/w3ng3zj4
[Android Software/Hacking General [Developers Only]] JustArchi:
ICE.

I see in stacktrace calls to gimple, so you can remove -fgraphite flags from archidroid.mk.
[Android Software/Hacking General [Developers Only]] mastero9017:
UBERTC should work fine with -fgraphite i think?
[Android Software/Hacking General [Developers Only]] JustArchi:
:rolleyes:
[Android Software/Hacking General [Developers Only]] mastero9017:
What i have to change in this script to get -floop flags?

https://github.com/UBERTC/uber-scripts/blob/master/arm-linux-androideabi-4.9

Can you suggest other TC similar to uber with all possible flags built in?
[Android Software/Hacking General [Developers Only]] JustArchi:
SaberMod. Also available on my github with newest august version. I'm using it at the moment.
[Android Software/Hacking General [Developers Only]] akhilnarang:
[MENTION=5161352]JustArchi[/MENTION] which toolchain would you recommend for 64bit devices?
[Android Software/Hacking General [Developers Only]] JustArchi:
Probably SM.
[Android Software/Hacking General [Developers Only]] Kayant:
[MENTION=5161352]JustArchi[/MENTION]

Just wanted to say thanks for your work and sharing it. For me it's the best type of optimization patch as I find it much easier to read, understand and maintain than going with things like Optipop's optimizations which I was using previously or Sabermod's due to the minimal changes needed. The extra milliseconds I gain or lose wasn't worth it for me. Also thanks for using the cross-ng tool after getting round to installing it right I was able to use your .config to get 5.2 with -mcpu=cortex-a7, -mfpu=neon-vfpv4 quite easily. I can see how awesome/versatile the tool can be if you have the knowledge unlike me :p(Hopefullu will change with time ;).

Just wanted to know what your thoughts are on this project -

http://xdaforums.com/android/software-hacking/wip-compile-android-5-0-2-qualcomm-llvm-t3035162
[Android Software/Hacking General [Developers Only]] JustArchi:
I was never a big fan of LLVM. I have no thoughts about that.
[Android Software/Hacking General [Developers Only]] side:
hello and thanks for ur dev :)

i am new on rom building and i would like to try your optimizations.

i use s4 9505 and i build nightly CM12.1 roms...what repos do i need to add to my room services?

i tryed many things from post#1 but didnt manage to do something :/
[Android Software/Hacking General [Developers Only]] sparksco:
These cortex and neon options are now available for people that compile their own sabermod toolchains. arm and arm64

https://plus.google.com/+PaulBeeler/posts/YUYaafAJsSf
[Android Software/Hacking General [Developers Only]] UchihaKakarot:
Hello,

I need some help. On my ROM compiled with archi optimisations 4.1 and archi toolchain, none of the music players are able to read the mp3 files. Can someone please help me in fixing this issue?

Thanks.
[Android Software/Hacking General [Developers Only]] WhiteNeo:
This commit should help :)
[Android Software/Hacking General [Developers Only]] UchihaKakarot:
Thanks, I will give it a shot and report back to you.
[Android Software/Hacking General [Developers Only]] Vynikal:
And it indeed does, but CM has recently merged new google code and the above commit gives conflicts.
[Android Software/Hacking General [Developers Only]] sparksco:
Conflicts aren't the end of the world if you know how to fix them.
[Android Software/Hacking General [Developers Only]] Vynikal:
Yes, and I did so, I just wanted to point it out.
[Android Software/Hacking General [Developers Only]] tuankiet65:
Tip if you're experiencing memory hogs (like GCC eating 60-70% of your memory, especially on large source files like external/deqp/modules/glshared/glsBuiltinPrecisionTests.cpp): try to remove the -fipa-pta flag from the flags list. From GCC manual:
[Android Software/Hacking General [Developers Only]] JustArchi:
This commit will for sure increase both memory usage and compilation time, as every additional optimization step needs to be done. However I didn't see any excessive changes, perhaps because I'm using custom toolchain.
[Android Software/Hacking General [Developers Only]] Adi Shakthi:
Hi@JustArchi

After using JustArchi optimization successfully in my ROM SOKP L[ both arm 64 and 32] builds i would like to use this as in my

Android M based roms . My friend i just want to know is there any new version of optimization made to Android M ? If yes kindly link me and i want it badly on my upcoming AOSP/CAF based Sungsonic Roms.

also am going to give a try to use old optimization is M if it is works i will let you know here .

And Last .....after using this i never felt the need of any other optimization in roms .....Frankly far far best stuff what you made bro ...there is no other equal stuff for JustArchi Optimizations. Thanks a ton for your hard work on bring this bro.
[Android Software/Hacking General [Developers Only]] JustArchi:
Nice to see that other developers also notice the boost :).

No, I didn't work for optimizations for M yet. If I cook something nice, which is quite possible, I'll most likely provide them later.

It's not a stuff that can be blindly applied out of the box. I mean yes, you can try to use my old LP flags on M, but you may still require to get rid of some in order to fix your build. Also, it's quite possible that old KK flags that had to be disabled in LP may work again, so, as I said, it's not a simple copy & paste.
[Android Software/Hacking General [Developers Only]] :
I got no network when trying to call after applying the commits. Any hint?
[Android Software/Hacking General [Developers Only]] abrakadabra_srb:
I have the same problem with my HTC One on CM12.1, everything works except for making phone calls. As soon as I initiate a call, network drops and restarts.
[Android Software/Hacking General [Developers Only]] Adromir:
Whenever i try to use Sabermod-TC sabermod-4.9-arm-linux-androideabi through my roomservice.xml (looking like this)

<manifest>
<remove-project name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" />
<project name="ArchiDroid/Toolchain" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" remote="github" revision="architoolchain-5.2-arm-linux-gnueabihf" />
<remove-project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" />
<project name="ArchiDroid/Toolchain" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" remote="github" revision="sabermod-4.9-arm-linux-androideabi" />
</manifest>

building breaks with

prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../libexec/gcc/arm-linux-androideabi/4.9.x-sabermod/cc1: error while loading shared libraries: libisl.so.15: cannot open shared object file: No such file or directory

When I use the roomservice.xml suggested in the first post of archi, everything works fine. But if i am not mistaken that is the Ubter-TC right (the text above says sabermod TC)?
[Android Software/Hacking General [Developers Only]] piskor:
[MENTION=4804493]Adromir[/MENTION]

There is an info in OP about libisl* library error

You can also extend your LD_LIBRARY_PATH variable

Here is an example from my build. Change /home/lap/android/system/ to your $BUILD_DIR variable

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/lap/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/lib/
export LD_LIBRARY_PATH
[Android Software/Hacking General [Developers Only]] Adromir:
[MENTION=3037460]piskor[/MENTION] thanks: That worked as it seems :)
[Android Software/Hacking General [Developers Only]] kogone:
works perfectly on bacon caf sultan!
[Android Software/Hacking General [Developers Only]] tuankiet65:
Wrong thread, sorry :'(
[Android Software/Hacking General [Developers Only]] akhilnarang:
Wipe ccache
[Android Software/Hacking General [Developers Only]] tuankiet65:
Also deleted because I posted in the wrong thread, sorry :'(
[Android Software/Hacking General [Developers Only]] haoyangw:
Does anyone have the commits for JustArchi's ART fix and Not booting kernel? The links posted by [MENTION=5161352]JustArchi[/MENTION] are dead(the repos are gone :(). Thanks!
[Android Software/Hacking General [Developers Only]] haoyangw:
I'm trying to compile cm12 with JustArchi Optimizations 4.1 but ROM bootloops because of ART problems(when I replace the art libs with ones from xposed/previous ROM versions without the optimizations ROM boots). Does anyone know of a patch/fix for this that I can apply? Thanks a lot!
[Android Software/Hacking General [Developers Only]] JustArchi:
CM12+ doesn't need any ART fixes.
[Android Software/Hacking General [Developers Only]] haoyangw:
Weird but my ROM(cm12) still bootloops, and it is definitely ART-related because when I replace the art libs with xposed ones or previously compiled ones without your optimizations ROM boots. Do you have any idea? Thanks a lot and sorry for any spam!
[Android Software/Hacking General [Developers Only]] TrueFriend-cz:
Where is ROM with this optimalizations for Xperia Z? Thanks
[Android Software/Hacking General [Developers Only]] DSA:
in the xperia z forum
[Android Software/Hacking General [Developers Only]] sparksco:
Try one of these. I think disabling clang might fix it...

https://github.com/SaberMod/SaberMod_art/commits/lollipop
[Android Software/Hacking General [Developers Only]] haoyangw:
Hmm when I disable Clang I get lots of atomic.h errrors with GCC 4.8/4.9, do you have a fix for that? It originates from "error: #error <atomic> is not implemented". Thanks!

---------- Post added at 02:54 PM ---------- Previous post was at 02:18 PM ----------

@JustArchi and when I use your ArchiToolchain's uber 4.9 branch I get AndroidConfig.h: __GLIBC__ not defined warnings that I do not face on other toolchains(like official uber 4.9). Does it affect the compiled ROM in anyway? And is there a cause? I know it's just warnings that can be disregarded but I'm just interested :) Thanks a lot for your time and effort spent on optimizations! :D
[Android Software/Hacking General [Developers Only]] sparksco:
I'm not sure since I disable clang differently by using vendor/sm... Some people have used those commits before but I've personally never tried them.

https://gitlab.com/SaberMod/android-vendor-sabermod/commits/master
[Android Software/Hacking General [Developers Only]] haoyangw:
interesting you do not get any atomic errors? which version of gcc are you using and which version of android are you compiling? I'm using gcc 4.9 for android 5.0.2 and it errors out on atomic.h stuff :/
[Android Software/Hacking General [Developers Only]] sparksco:
no
[Android Software/Hacking General [Developers Only]] haoyangw:
Hmm do you use Sabermod ART? And which version of gcc and which external/libcxx repo do you use?
[Android Software/Hacking General [Developers Only]] olokos:
I'm only building kernel now and I'm quite puzzled as to where can I enter those flags. I've gone through the commit, but it doesn't really apply to kernel building alone. Could somebody or [MENTION=5161352]JustArchi[/MENTION] direct me where do I need to enter those flags for kernel only?

Thanks.

Here's my repo:

https://github.com/olokos/OK-Kernel-Z1-LP/tree/14.6.A.0.xxx
[Android Software/Hacking General [Developers Only]] faizauthar12:
now it's time to said to u [MENTION=5161352]JustArchi[/MENTION]

thanks for ur optimization ,made my legacy device run smoothly and good :)

anyway

i have some question with GCC 4.8++

well..i got weird bug,sleep is going to shut down :/

my device is running with kernel version 3.0.15

maybe someone can help :)
[Android Software/Hacking General [Developers Only]] Joeisgood99:
Successfully build CM12.1 with JustaArchis optimisations for HTC m7

Applied all commits in v4.1

commented out ARCHIDROID_GCC_CFLAGS += -fgraphite -fgraphite-identity in experimental section of archidroid.mk

changed LOCAL_CFLAGS += -O3 to LOCAL_CFLAGS += -Os in /external/libvpx/libvpx.mk

remove "inline" from hardware/qcom/display-caf/msm8960/libhwcomposor/hwc_utils.cpp

was able to compile rom with ubertc-4.8 and kernel with ubertc-5.2

Thanks to [MENTION=5161352]JustArchi[/MENTION] for all your work/sharing/help.

Thanks guys :)
[Android Software/Hacking General [Developers Only]] haoyangw:
[MENTION=5161352]JustArchi[/MENTION] could you add in OP to avoid gcc 4.9 when compiling android 5.x, or use this fix(for any android version). Using the above fix fixed my bootloop on cm12 with JustArchi commits, and it seems for android 5.x ART is incompatible with GCC 4.8(on android 5.1.x device boots but art gives segfault). Thanks a lot for your hard work! And sorry if I bothered you!

Sent from my G920I
[Android Software/Hacking General [Developers Only]] Mata99:
[MENTION=5161352]JustArchi[/MENTION] do you think will come out a version for Android 6.0 ?
[Android Software/Hacking General [Developers Only]] JustArchi:
Yes, but it will take time. This is not a simple copy & paste, but actual hours spent on compiling and testing regressions.

If I was about to put my optimizations in one image, it would be this:
[Android Software/Hacking General [Developers Only]] sombree:
[MENTION=5161352]JustArchi[/MENTION] or anyone else - any idea where should i look for the cause of this graphical glitches? It showed up few days ago i think. It happens only in play store (tested with gallery, snapchat and instagram - they're all fine) and not for all images too. I've checked on official nightly and there everything is fine (by that i've eliminated possibility of broken kernel or problem in CM source itself).
[Android Software/Hacking General [Developers Only]] rpdroky:
if i use the toolchain on the rom only , and then i flash a custom kernel , will the rom toolchain stack ?
[Android Software/Hacking General [Developers Only]] amaces:
Thanks for mentioning this. After leaving CM12 alone for a couple of months, I discovered that ART doesn't like Android EABI 4.9 anymore, and 4.8 runs into ICEs in other parts of the system. Selectively switching to 4.8 in art/{compiler,runtime}, the fix that you pointed out, was the only way to keep the optimization flags.
[Android Software/Hacking General [Developers Only]] JustArchi:
2 toolchains are used, androideabi for ROM, and eabi for kernel. If you flash custom kernel, obviously kernel compiled with eabi toolchain is not being used anymore. So it depends to which TC you're referring to.
[Android Software/Hacking General [Developers Only]] rpdroky:
my bad for not specifying , i was refer to androideabi
[Android Software/Hacking General [Developers Only]] JustArchi:
Then you should know answer already.
[Android Software/Hacking General [Developers Only]] rpdroky:
Yes and i apologise , i missunderstand it bigtime

Thanks Archi
[Android Software/Hacking General [Developers Only]] Joeisgood99:
No rule to make target

Any one know why I might be getting the following error?

The first few times I successfully compiled CM-12.1 with JustArchi's ArchiDroid Optimizations V4.1, I hard coded the commit in to my repo. It compiled fine so i "un did" the changes, forked relevant cm projects, cherry-picked V4.1 as well as two other fixes on the OP and built. Now Im getting this error

Import includes file: /home/joeisgood99/cm12.1/out/target/product/m7/obj/EXECUTABLES/sshd_intermediates/import_includes

Export includes file: external/openssh/Android.mk -- /home/joeisgood99/cm12.1/out/target/product/m7/obj/EXECUTABLES/sshd_intermediates/export_includes

make: *** No rule to make target '/home/joeisgood99/cm12.1/out/target/product/m7/obj/SHARED_LIBRARIES/libqdutils_intermediates/export_includes', needed by '/home/joeisgood99/cm12.1/out/target/product/m7/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/import_includes'. Stop.

make: *** Waiting for unfinished jobs....

What stumps me is that the V4.1 doesn’t touch "external/openssh/Android.mk". What could the V4.1 commit do in build/core to mess with external/.../xx.mk ?? (if im reading in to the error message correctly) When I change the relevant projects back to revision="cm-12.1" in my roomservice.xml and re sync (keeping uber toolchains) the build works fine.

FIXED!

Problem was an error in my roomservice.xml I wasnt syncing all of android_hardware_qcom_display, leaving gaps in my local repo.
[Android Software/Hacking General [Developers Only]] Vynikal:
Hi all,

I just wanted to share my JustArchi commit revisited for CM13, which I use for my private builds.

https://github.com/Vynikal/android_build/commit/a586041d0515894355044a518610d4607a8b3e71

I use a build right now (built with UBER 5.3), seems fully working for now.

BUT, I am not any kind of developer, debugger, etc. so I don't know what could be wrong or not up to date.

I would like an experienced developer to take a look at the flags to point out wrong parts.

My commit doesn't take in account an exceeding recoveryimage size, so keep it in mind.
[Android Software/Hacking General [Developers Only]] Adromir:
I would like to try it. If I am not totally wrong, i could replace the original "android_build" in my source tree with yours via local manifest or do i have to cherry pick (sorry, i am a bit stupid about that. Just beginning)
[Android Software/Hacking General [Developers Only]] Vynikal:
You'd better use cherrypick, because I'm not gonna update the repository, it is there only for reference.
[Android Software/Hacking General [Developers Only]] desalesouche:
i made a cm12.1 build. the only bug i could notice is that i lost root, that should be ok in cm12.1.

Is there any solution?
[Android Software/Hacking General [Developers Only]] JustArchi:
Out of scope of this thread, my optimizations to do not alter root inclusion.

I've just started checking what can be adapted from old commit to M, so thanks for the heads up, I'll need to test another dozen of builds and devices to find optimal solution :).
[Android Software/Hacking General [Developers Only]] desalesouche:
using this https://github.com/ArchiDroid/Toolchain/tree/uber-4.9-arm-linux-androideabi

https://github.com/ArchiDroid/Toolchain/tree/architoolchain-4.9-arm-linux-gnueabi-generic

i don't know which one is breaking root for me, but if i don't use them, root is back...

problem related to kernel....

any idea ?
[Android Software/Hacking General [Developers Only]] desalesouche:
my bad i would like to correct previous post.

what is breaking root is i think compiling with user instead userdebug, as state here .

https://github.com/ArchiDroid/android_build/commit/f9b983e8e11624b48ae575da206f1baf6979772c
[Android Software/Hacking General [Developers Only]] JustArchi:
Yes, because root is enabled only on userdebug builds.
[Android Software/Hacking General [Developers Only]] rpdroky:
No more clang errors , thanks mate , btw , you mentioned that you use uber 5.3 , for the kernel was easyer , all i needed is to just add compiler-gcc5.h to

include/linux/ to make it work , but the androideabi-5.3 always gave me this error:

target thumb C++: libcamera_client <= frameworks/av/camera/Camera.cpp
target thumb C++: libcamera_client <= frameworks/av/camera/CameraMetadata.cpp
target thumb C++: libcamera_client <= frameworks/av/camera/CaptureResult.cpp
target thumb C++: libcamera_client <= frameworks/av/camera/CameraParameters2.cpp
target thumb C++: libcamera_client <= frameworks/av/camera/ICamera.cpp
target thumb C++: libcamera_client <= frameworks/av/camera/ICameraClient.cpp
frameworks/base/libs/androidfw/ResourceTypes.cpp: In member function 'android::status_t android::ResStringPool::setTo(const void*, size_t, bool)':
frameworks/base/libs/androidfw/ResourceTypes.cpp:571:28: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]
(!mHeader->flags&ResStringPool_header::UTF8_FLAG &&
^
cc1plus: all warnings being treated as errors

any ideas how can i fix it? ive tryed even adding til 5.3 to TARGET_linux-arm.mk like this:

ifneq ($(filter 4.6 4.6.% 4.7 4.7.% 4.8 4.8.% 4.9 4.9.% 5.0 5.0.% 5.1 5.1.% 5.2 5.2.% 5.3 5.3.%, $($(combo_2nd_arch_prefix)TARGET_GCC_VERSION)),)

Thanks in advance
[Android Software/Hacking General [Developers Only]] Vynikal:
Try this (the bold parentheses)

[B]([/B](!mHeader->flags&ResStringPool_header::UTF8_FLAG[B])[/B] &&

Contrary to my commit description, this isn't any list of allowed toolchains, this only sets more flags in case of not mentioned toolchains. I only thought I'd complete the list.

tl;dr won't solve anything
[Android Software/Hacking General [Developers Only]] rpdroky:
Nope , it didn't work , but i got the ideea , thanks alot for that

target thumb C++: libcamera_client <= frameworks/av/camera/ICameraServiceListener.cpp
frameworks/base/libs/androidfw/ResourceTypes.cpp: In member function 'android::status_t android::ResStringPool::setTo(const void*, size_t, bool)':
frameworks/base/libs/androidfw/ResourceTypes.cpp:571:30: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]
((!mHeader->flags&ResStringPool_header::UTF8_FLAG) &&
^
cc1plus: all warnings being treated as errors

And apologises to [MENTION=5161352]JustArchi[/MENTION] for beeing of-topic
[Android Software/Hacking General [Developers Only]] JustArchi:
Just because some of you are wondering.

Yes, I'm testing how M works with my optimizations, with UBERTC toolchains, and testing which newly introduced or previously disabled (for compatibility reasons) flags may work again. If you need simple copy-pasta that should work properly, you can find it here and don't forget to click thanks. In the meantime I'm working on V5 for M, which will come at some point, when I test that everything works for at least 2, preferably 3 of my devices, including ARM64 one - OnePlus 2, which is now my main device.

As I said many times, it's kind of long process, because every flag has to be carefully tested, and because it's being applied globally - also with caution. Full builds take time, tests as well. This commit is already "too device-based", and may require additional fixes for you, so the point now is to require as few as possible, while being compatible with as many as possible devices out of the box.

So yeah, it will come out, eventually.
[Android Software/Hacking General [Developers Only]] beeeto:
Hey bud,

I see you are working hard to put those optimizations on.

How are you actually measuring if all this flag game are doing their thing? Is it the same methodology you used at ArchiDroid Optimizations V4.1? Or are you paying attention to the actual size of the build?

Just a bit curious about it :)

Kind regards!
[Android Software/Hacking General [Developers Only]] JustArchi:
Size of the build? No. Since when size of the build has any outcome on the performance that optimizations bring? Bigger is not faster - bigger is not slower either.

Question is what you want to measure. Performance? It's enough to write 20 lines in C that will use internal binaries to do a thing, such as recently introduced toybox. I'm too lazy to post all of that but I write my tests as I need them.
[Android Software/Hacking General [Developers Only]] amaces:
Just in case it helps your current forays, I had ported your V4 commit to Marshmallow, and have tested additional changes (see HEAD~3 & HEAD~2 here). All these flag sets work without ICEs with either UBERTC 4.9 or 5.[23] Android EABIs, although they're not necessarily optimized for M, and may even hurt in some places. P.S. My platforms are Cortex-A9 (OMAP4470).
[Android Software/Hacking General [Developers Only]] limjh16:
Hi, does this work with other ROMs which aren't CM based such as Slim? Am planning to include for my ROM.
[Android Software/Hacking General [Developers Only]] JustArchi:
You have many duplicated flags already defined by given optimization levels.

Also are you really sure that you can build your ROM with UBERTC 5.3? It gives me many errors related to broken types such as char16_t. Probably because of default standard change between 4.9 and 5.0+.
[Android Software/Hacking General [Developers Only]] JustArchi:
Yes, as long as you resolve possible conflcits and other issues yourself.