yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] JustArchi:
I'm definitely going to add support for CM-12.0 and OmniROM 5.0 when they'll get to the "compilable" stage.

Firstly I need to build a clean cm-12.0 for my i9300 device, then I'll definitely start working on updated ArchiDroid optimizations commit, who knows, maybe we achieve even more in terms of useful compile flags.

But it's too early to say anything. At the moment Lollipop barely made it to google sources.
[Android Software/Hacking General [Developers Only]] desalesouche:
you might be aware but official cm12 is out since a few

repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0

i have been testing the caf version but i got a lot of error...

you or hers devs compiling cm12 might share their build errors and solution here

http://xdaforums.com/showpost.php?p=56548698&postcount=5653

for now we are two but i hope a lot of more soon.

it would be more easy and fast to fix cm12 build :fingers-crossed:
[Android Software/Hacking General [Developers Only]] JustArchi:
They're nowhere close to stable state.

I can't experiment with flags if problems come from upstream Android repo. It's impossible. I need to hold on at least a few days more.
[Android Software/Hacking General [Developers Only]] desalesouche:
i think to do same things as i can even finish any of my 4 android L sources (vanir-aosp/cm12/aospa-legacy/aicp)
[Android Software/Hacking General [Developers Only]] satyr007:
Got question about clang unknown arguments in lollipop. Isnt it better to add these flags to /build/core/clang/arm.mk -> CLANG_CONFIG_arm_UNKNOWN_CFLAGS := \ -flags ?
[Android Software/Hacking General [Developers Only]] sparksco:
Solution should be here:

https://github.com/SaberDroid/external_clang/commit/c8ee28aa8fa25d1a8f395f40d75c63c0ab2a9f1c

I fixed this back in jellybean. Original do not use

https://github.com/SaberMod/android_external_clang/commit/c79e6d4409727b13db04aca4f9231a7f6c8c14ef

Here's a little script.

cd external/clang && git remote add sd https://github.com/SaberDroid/external_clang.git && git fetch sd kitkat && git merge sd/kitkat && cd ../../;
[Android Software/Hacking General [Developers Only]] JustArchi:
But... why.

https://github.com/ArchiDroid/android_build/blob/cm-11.0/core/llvm_config.mk#L17

To fix compilation, it's enough to add -Qunused-arguments there. Compilator will tell you about unknown flags, but won't throw an error on that. My commit from V3 onwards adds this.

Of course there are many ways to fix this issue, you may even define all unknown flags, same as Google did. But in terms of "quick and proper fixes", this one is the best one imho.
[Android Software/Hacking General [Developers Only]] sparksco:
Essentially the same thing, I just prefer to fix directly in clang instead of outside of it in llvm. Nothing really "better" about llvm.
[Android Software/Hacking General [Developers Only]] JustArchi:
I prefer to edit one file instead of X of them, but that's me probably :p.
[Android Software/Hacking General [Developers Only]] Rycon33:
[MENTION=5161352]JustArchi[/MENTION], this one not anymore in your repo?

JustArchi/Linaro

I was using it last time but seems not anymore in your repo.

Edit: Oops, found it on Archidroid github, been awhile. Only this time I'm compiling again.?
[Android Software/Hacking General [Developers Only]] JustArchi:
It's ArchiDroid/Toolchain now :).
[Android Software/Hacking General [Developers Only]] desalesouche:
may be you can add that file from cm11/build/core/llvm_config.mk .

but may be it will create problem? idk
[Android Software/Hacking General [Developers Only]] satyr007:
Change file: core/clang/config.mk

CLANG_CONFIG_UNKNOWN_CFLAGS := \

-funswitch-loops \

-fno-tree-sra \

-finline-limit=64 \

-Wno-psabi \

-Wno-unused-but-set-variable \

-Wno-unused-but-set-parameter \

-Wmaybe-uninitialized \

-Wno-maybe-uninitialized \

-Wno-error=maybe-uninitialized \

-fno-canonical-system-headers \

-funsafe-loop-optimizations \

-fsection-anchors \

-ftree-loop-im \

-ftree-loop-ivcanon \

-fgcse-sm \

-fgcse-las \

-fweb
[Android Software/Hacking General [Developers Only]] JustArchi:
I'm working on CM12 for my beloved i9300, it's in alpha stage, but it works correctly in terms of Android, so I think that I'll start working on V4 for Lollipop soon. But it will take a few weeks more, I need to be sure that there are no upstream bugs before starting to... generate them :).
[Android Software/Hacking General [Developers Only]] Rycon33:
Apologies for a little OT question from here, does anybody tried Linaro 4.9 or 4.10(for ROM) on any Lollipop build already? TIA
[Android Software/Hacking General [Developers Only]] satyr007:
I tried on hammerhead (slimrom), not booting (at least it passed google logo without modification, kitkat wihout hack didnt even pass logo...). Linaro 4.8 works fine.

PS I managed to add flags to c,c++ and clang. U can add all flags to arm,thumb,release with some new warning disables. Cpp is working with -O3 only. The same with clang, added only -O3. Will try to add commits to github and post it here:)
[Android Software/Hacking General [Developers Only]] WhiteNeo:
I know it's a little off-topic, but.. How can I find out what's causing my newly compiled CM12 to bootloop?

Phone is not yet a visible usb device.. So no adb. I think. :(

Is it possible to make the adb daemon start with the boot animation? If yes, how? :)
[Android Software/Hacking General [Developers Only]] desalesouche:
adaptative blacklight? but may be others reason?
[Android Software/Hacking General [Developers Only]] jukiewalsh:
Anyone have an ide of a way to bypass these errors?

host C++: libnativehelper <= libnativehelper/toStringArray.cpp
host C++: libnativehelper <= libnativehelper/JniInvocation.cpp
error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option]
make: *** [/home/jukie/android/system/out/host/linux-x86/obj/SHARED_LIBRARIES/libnativehelper_intermediates/JNIHelp.o] Error 1
make: *** Waiting for unfinished jobs....
error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option]
make: *** [/home/jukie/android/system/out/host/linux-x86/obj/SHARED_LIBRARIES/libnativehelper_intermediates/JniConstants.o] Error 1
error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option]
make: *** [/home/jukie/android/system/out/host/linux-x86/obj/SHARED_LIBRARIES/libnativehelper_intermediates/JniInvocation.o] Error 1
error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option]
make: *** [/home/jukie/android/system/out/host/linux-x86/obj/SHARED_LIBRARIES/libnativehelper_intermediates/toStringArray.o] Error 1
[Android Software/Hacking General [Developers Only]] Neo:
1) Remove the -Werror=unused-but-set-variable flag from both build/core/combo/select.mk and build/core/combo/TARGET_linux-arm.mk

2) Rebuild your envsetup.sh and continue building.
[Android Software/Hacking General [Developers Only]] desalesouche:
i have soft reboot all the time. Blefish from xda told me he had no more reboot since it switched to java-7-openjdk.

i am building right now, will feed back .

don't read my previous post, let's say i was tired...xD
[Android Software/Hacking General [Developers Only]] WhiteNeo:
Haha :D It's alright. :)

I'm already using this java version to build.

Probably I'll just have to replace one binary file. And I do know which one.. Will try it out this afternoon. :good:
[Android Software/Hacking General [Developers Only]] bigsupersquid:
it does start there in cm11 but won't let you access it by default.

try these props.

ro.debuggable=1

ro.adb.secure=0

ro.secure=0

persist.service.adb.enable=1

persist.sys.root_access=1
[Android Software/Hacking General [Developers Only]] WhiteNeo:
Is it fine if I set those props in build.prop or do I need to edit another file?
[Android Software/Hacking General [Developers Only]] Neo:
That's where they go.
[Android Software/Hacking General [Developers Only]] WhiteNeo:
Thanks.

Just tried adding those props.. But computer is unauthorized and so I can't do any debugging..

Is there a way to bypass this limitation? (I'm willing to compile a new kernel if I have to.)
[Android Software/Hacking General [Developers Only]] JustArchi:
AFAIK you need adb insecure to do that.

Personally, if I can't access ADB but kernel is booting, I make an init.d script:

/system/etc/init.d/00_DEBUG

Then wait a minute, reboot back to recovery, and copy your file.
[Android Software/Hacking General [Developers Only]] WhiteNeo:
Great script! :) Tried this myself but it didn't work unfortunately.

However, I've found out that if you copy the /data/misc/adb/adb_keys file from a working and authorized rom to your bootlooping rom zip and add some lines to the updater-script to make it install, adb works flawlessly afterwards. :good:

Was able to grab a log of my bootloop now.. Any opinions or ideas? :)

E/rmt_storage( 2039): Unable to change dir
E/rmt_storage( 2039): Failed in getting the physical address for shared mem
I/ServiceManager( 730): Waiting for service media.audio_policy...
W/AudioSystem( 730): AudioPolicyService not published, waiting...
I/ServiceManager( 730): Waiting for service media.audio_policy...
I/ServiceManager( 730): Waiting for service media.audio_policy...

EDIT: Just to clarify, "Waiting for service media.audio_policy..." is the problem.. I've tried removing rmt_storage binary, but the bootloop persisted. So Audio Policy is the reason.
[Android Software/Hacking General [Developers Only]] JustArchi:
This doesn't look like error caused by optimization flags or toolchain.

If there is a problem with optimization, it usually ends with a segfault - memory corruption or so.

I may suggest disabling SELinux (or forcing it to be permissive). Usually this is the reason for unknown permission denials.
[Android Software/Hacking General [Developers Only]] WhiteNeo:
Selinux is already set to permissive via kernel command line (and I can confirm it does indeed start in permissive mode), but keeps reverting to strict somewhen during boot.

This might indeed be the issue, but I can't figure out what service keeps reverting this setting.
[Android Software/Hacking General [Developers Only]] desalesouche:
cm12 and first boot time

it might be a little off top but for those compiling cm12 you can reduce first boot time in very efficient way.

cm12 without the commit boot in 14mn30 on my msm7x30 legacy device.

with the commit it boots in 1mn50

here is the commit:

https://github.com/Kirmaniarslan/an...mmit/07104f6c88b8db083a81b5973fbf9147714a0102
[Android Software/Hacking General [Developers Only]] desalesouche:
hi all ,any idea how to fix that?

https://github.com/sonyxperiadev/device-sony-leo/issues/3

thanks.
[Android Software/Hacking General [Developers Only]] 95A31:
[MENTION=5161352]JustArchi[/MENTION]

I am porting your optimization on Lollipop (here) but clang not allow anymore bypass unknow arguments and this is not more working. I am thinking filter out them like this but I do not know where they are defined in clang makefiles. I suppose they are in BUILD_EXECUTABLE_SUFFIX but I can not find it definition. Have you some ideas how to fix it?
[Android Software/Hacking General [Developers Only]] Khaon:
You have to add to the unknown list argument the unknown arguments, and you can also substitue any flags you want, here are some example:

unsupported flags

substitute flags
[Android Software/Hacking General [Developers Only]] 95A31:
New error here:

bionic/libc/upstream-netbsd/lib/libc/gen/popen.c: In function 'popen':
bionic/libc/upstream-netbsd/lib/libc/gen/popen.c:83:14: error: variable 'cur' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]

Tons of errors :silly:
[Android Software/Hacking General [Developers Only]] reS28raM:
IMMO this is the nasty one: that warning goes away only if you use -Os, even -O2 will not suffice. The question is: suppose we silence the warning, will the code afterthat compile rightly with - O3 or will we face some nasty bugs? I fear some insight into bionic inners is required to solve this... [MENTION=5161352]JustArchi[/MENTION]
[Android Software/Hacking General [Developers Only]] ezio84:
Maybe these two commits on aosp can be interesting:

https://android-review.googlesource.com/#/c/117412/

https://android-review.googlesource.com/#/c/117422
[Android Software/Hacking General [Developers Only]] reS28raM:
Thanks, wanna switch to Google toolchain. Anyway the error above occurs only when using GCC 4.8 - It doesn't occurs when using Linaro 4.8, which is what I'm using at the moment and what was used by slim's devs to test -03 optimizations on SlimLP
[Android Software/Hacking General [Developers Only]] ezio84:
Those commits could also solve the playstore glitches with gcc 4.9 :D
[Android Software/Hacking General [Developers Only]] WhiteNeo:
Could anyone of you point me to a SaberMod 4.8 androideabi toolchain that works with Lollipop?

Downloading Uberutils "lp" branch right now, but GitHub is really slow today..

Compilation currently stops after some minutes with the error "libatomic.a not fount".. But that file doesn't exist in any SaberMod version.

Linaro 4.8 works fine (and includes the missing file)

Could I just copy the missing files over to SaberMod? (Most likely not, but it's worth a question. :D)

Any help is appreciated!

Also, has anyone of you alread found some neccessary commits to compile CM12 arm and thumb with O3? :)

Thanks in advance!
[Android Software/Hacking General [Developers Only]] reS28raM:
Both your questions had already an answer here and below :D

http://xdaforums.com/showthread.php?p=57309324

I dont build CM but Slim for example only requires a #- Werror in frameworks_av to cleanly build with -03 and the right toolchain. Times are changing...

Also take a look at both SaberMod and SaberDroid on github and especially to ArchiDroid which is CM based. :D
[Android Software/Hacking General [Developers Only]] sparksco:
Not sure what github your using but try https: //github.com/SaberMod
[Android Software/Hacking General [Developers Only]] RMarkwald:
Were you able to get this error figured out? I'm getting the same error right now.
[Android Software/Hacking General [Developers Only]] Xileforce:
I'm in the same boat as well.
[Android Software/Hacking General [Developers Only]] Khaon:
this error should not happen. Please state target device, repo used and toolchain. Also if using custom flags report !

Sent from my nexus 10
[Android Software/Hacking General [Developers Only]] 95A31:
Original JustArchi is not more working on Lollipop. Check this repo that look like JustArchi + fixes for Lollipop
[Android Software/Hacking General [Developers Only]] Xileforce:
sadly still has same issue :(. seems to be an issue trying to use anything above -Os on thumb
[Android Software/Hacking General [Developers Only]] happyta5:
Same here.. even compile successful, rom reboot in a loop. FC all over places
[Android Software/Hacking General [Developers Only]] Khaon:
What are your tool chain, target device and are you using a custom android build? If yes can you as well link to it.

That error happened to me when I start building cm12 but cann't remember how I get rid off that
[Android Software/Hacking General [Developers Only]] Khaon:
Having the same issue with uberutils tool chain. What's the culprit? Host lacking of libraries? Or should the compiler has built in.

BTW your lastest tool chain from dev branch yields errors. Dunno anymore which now.

Do I have to download ndk and then what to do with uncompressed archive?

Thx

Sent from my Xiaomi MI2s
[Android Software/Hacking General [Developers Only]] WhiteNeo:
Try uberutils "lp" branch. Worked perfectly for me. :)
[Android Software/Hacking General [Developers Only]] sparksco:
There's master branch instead of dev… dev is only for developers and development. So if your not contributing to development that is what master branch is for…

Otherwise if your feeling like experimenting read up here:

https://github.com/SaberMod/toolchain_manifest/blob/master/README.md
[Android Software/Hacking General [Developers Only]] Khaon:
I know what means dev branch it was mostly regarding if you could in light us with your commit message and the fun to try it it would work... Wanted just to report and if you want logs I will provide them for you with pleasure.

Shouldn't be uber utils 'S tool chain stable and working? (pre-built are This doesn't occur with Google and linaro s.

Also I never knew on what sabermod differs from Google s and linaro linaro 's. Came only across some users comments very vague and didn't find good explanation. Does it happen you can redirect me to a material or explain succinctly.

Thx for answering.

Sent from my Xiaomi MI2s
[Android Software/Hacking General [Developers Only]] sparksco:
Sorry I can't understand half of what you said…
[Android Software/Hacking General [Developers Only]] Khaon:
Sorry was in a hurry, should have paid more attention to what I wrote and correct my message. On a comp now, I will rephrase so you can understand :).

No need to be antipatic :D.

I know what means dev branch and it aims for dev purposes. I wanted to see what happens when compiling the rom with it. Also, regarding this commit, I wanted to know if it implies I have to replace CM ndk folder with 10d

I had also the atomic error with some other sabermod tool chains( old less than one month). I wanted earlier this morning to know if the fix would come from an update of the toolchain or I could use some libraries? I have found an sm 4.8.4 working for me, yeah :good:.

Also because I never found how sabermod differs exactly from Google's and linaro's tool chain. I cCame only across many users commenting "it works better and/or rom is smoother." Kinda not explanatory.

If you know some resources, materials I could read to know basically the differences and learn a bit more about sm, I would really appreciate that!

Thx for answering and sorry for my last message, was it really not understandable.
[Android Software/Hacking General [Developers Only]] sparksco:
No problem. No you shouldn't have to replace ndk in ROM. The ndk is for gcc support in android.

Libatomic error is obviously on older toolchains when kitkat was around.

README is your best bet.

As far as what differs that's what you and other users are for [emoji4]

I don't share my personal opinions since they may be biased.
[Android Software/Hacking General [Developers Only]] Khaon:
OK thx those information's.

Sent from my nexus 10
[Android Software/Hacking General [Developers Only]] JustArchi:
https://github.com/ArchiDroid/andro...mmit/ccce6072b865aaa86e4e71e80fbc7dbad6449dfe

Could someone cherry-pick that and send back to omni's gerrit? I'm too lazy to do a repo sync, as I don't build Omni sources. It should be send to android-5.0 branch. Thanks!
[Android Software/Hacking General [Developers Only]] TheStrix:
Can we use SaberMod 4.8 toolchain with V3 Optimization?

And seeing your local manifest, the "forks" needed before this optimization is from CyanogenMod's git, what if I want to use it for ROMs other than CyanogenMod?
[Android Software/Hacking General [Developers Only]] roshan2989:
im compiling standalone kernel for myself and which flags should i put in the Makefile,as i read few pages back and there is a page mentioning about standalone kernel and i couldnt find the main makefile....help would be appreciated
[Android Software/Hacking General [Developers Only]] JustArchi:
Anything you want.

https://github.com/ArchiDroid/ArchiKernel/commit/41b1406d7304e3354b91a819f15a6a51b4c7a65c

This is a good start, but don't cherry pick this, instead, take a look at the makefile flags. I made them per-config-switchable, so I can change them as I want.

You probably want a simpler scenario, just remove IFs from makefile and you're done.
[Android Software/Hacking General [Developers Only]] desalesouche:
hi all. i noticed and some others too following bug with kernel and gcc 4.8 google or linaro.

i extract here part of link:

- camera flash turns on too fast, pics end up dark

Late camera flash is problem only on 4.8+ arm-eabi toolchains. On 4.7.4 works fine.﻿

you mean building the kernel with <4.8?﻿

Exactly. After trying 4.8 and 4.9, I rested on 4.7.4, where bug isn't present. Tried both Linaro and GCC.﻿

https://plus.google.com/+MichaelBes...6107710891583232562&oid=102871871861824394235

does someone else have the bug?

if someone know how to fix that ?

gcc4.7 seem to not fix the flash bug.

thanks.
[Android Software/Hacking General [Developers Only]] jgcaap:
Is this ready for cm12?
[Android Software/Hacking General [Developers Only]] sparksco:
I made a -O3 commit for liquid that works with gcc and clang compilers for android. This time it's in binary.mk. if something breaks you can add a LOCAL_MODULE name to have -O3 skip certain things.

https://github.com/SaberMod/LS_android_build/commit/3d9595a60e05c01ce150c0e549d8a69cd5b64e13
[Android Software/Hacking General [Developers Only]] Farooq95:
guys how to use this in cm12?
[Android Software/Hacking General [Developers Only]] desalesouche:
hi sir.I did recently a build of liquid smooth for my device with LIQUIFY optimization.

i had to build with prebuilt chromium cos LIQUIFY optimization breaks the build of it.

after that i could notice also that LIQUIFY prevent some apps like mx player to work . no LIQUIFY = mx player works on LS.

i would like to ask you if your commit fix the problem of WEBVIEWCHROMIUM.and if you are aware of some apps not working(-->mxplayer?)
[Android Software/Hacking General [Developers Only]] sparksco:
I never tried the liquify optimizations. Mxplayer works fine for me and building of that lib you said. You can use the forks on github if you want.

https://github.com/SaberMod

Anything that starts with LS_ and android_vendor_liquid
[Android Software/Hacking General [Developers Only]] Khaon:
From my own experience some optimization are breaking code such plex or other streaming program fails at running. Hm the culprit was not the chromium libs but smthinf else will report it
[Android Software/Hacking General [Developers Only]] PWn3R:
If I cherry pick this commit, I'm sure it will blow up my Beanstalk builds, correct? If I copy paste these changes into the files, do you think it will even be close to working? Beanstalk is based of CM12.
[Android Software/Hacking General [Developers Only]] sparksco:
Copy paste is the best way with credit otherwise you'll have a lot of conflicts with cherry-pick on cm. Should work fine LiquidSmooth is based on cm.
[Android Software/Hacking General [Developers Only]] PWn3R:
Thanks for the reply and I appreciate you answering the "noob dev" question. Thank you very much!

Edit: [MENTION=2394329]sparksco[/MENTION] - I completed the copy paste into the files, but now i get compile errors that it can't find any of the includes (features.h, etc) and it blows up. Any ideas?
[Android Software/Hacking General [Developers Only]] PWn3R:
Has anyone else had this issue?
[Android Software/Hacking General [Developers Only]] sparksco:
Well you didn't replace the whole build repo right? That shouldn't happen from those files only...