yashsingh1/xdaforums huggingface dataset:
[Galaxy Ace II Android Development] ace2nutzer:
Many thanks Guys ! I think i know what is the problem ... I'll setup the build again... so later (next build) i think it should work of 99% of probability :)
[Galaxy Ace II Android Development] beardedpanda:
Could anyone upload for me 13/03 build? I don't have a local copy of it.

Wysłane z mojego GT-I8160 przy użyciu Tapatalka
[Galaxy Ace II Android Development] ace2nutzer:
New Kernel is Up !!

Changelog:

20160507:

Use default Minfree Values (by CM Team)

Better Multitasking

btw: it'll work even better in combination with the ROM 20160506 Build.
[Galaxy Ace II Android Development] Dr360r:
You restored all the optimizations in latest 160506 (and fixed the libdvm.so)?
[Galaxy Ace II Android Development] ace2nutzer:
It doesn't work.

Will rebuild.
[Galaxy Ace II Android Development] Dr360r:
Right. Tested. Can install Poweramp only after replacing libdvm.so with the one from 160313.
[Galaxy Ace II Android Development] gepel:
One bug I found on 0405 is that sound recorder app doesn't work, it didn't work on 0705 build too..
[Galaxy Ace II Android Development] greeceeeee:
Do you have enabled allow purging of assets on settings -->performance --> memory managment?
[Galaxy Ace II Android Development] ace2nutzer:
Well, in a few Minutes new build is up.

I'll test too, poweramp + sound recorder app + amazon pics... (Yes started the first try to fix it :) )
[Galaxy Ace II Android Development] Dr360r:
Amazon pics not showing up, Poweramp not installing and Sound Recorder not working (build 160507).

[MENTION=5840412]ace2nutzer[/MENTION]: interesting stuff. Install 160507, go to google and search for a printer on Amazon. Go into Amazon. The pic won't show up. Tap the pages view button. The printer shows up. Tap the page. The printer vanishes again.
[Galaxy Ace II Android Development] ace2nutzer:
Yes this is all the time that way :)

I'll rework all code optimizations... i think they produce broken Code.

It looks like the ROM doesn't like to have something higher than -Os.

Strange thing, and honestly i can't understand this... don't now if it's GCC Bug itself or it's "bad" source Code or it's simply "normal" that it can't handle most of Optimizations that normally shouldn't cause any problems.

Just for better understanding:

The Kernel is using even many more aggressive Code Optimizations .. and so far everything is working like a charm.

Kernel and ROM is almost same (but not identical) both are written in "C" language ... and the ROM has in addition "C++" language.

However all optimizations for C .. are also Valid for C++ ... there are only a few optimization that are specific for C++ .. and not for C.

But even using C++ optimization for C .. will just cause the Compiler to stop the build process.

As u can see, u can't mess it up, u can't do anything wrong.

One more Addition, the ROM uses Java and Python too ... but this isn't relevant since the added Flags are only applied to C and C++.

So, i think the best way is to remove all optimizations higher than -Os ... except of some -Os clean ups, ARM-Mode and LTO Optimizations. I think that should work finally properly without to have a Phone with bugged Code. (simply too much annoying) ;)
[Galaxy Ace II Android Development] Dr360r:
How many leaps and bounds have we gotten away from the stock ROM's original code so far by the way? An Ocean? A Galaxy? :victory:
[Galaxy Ace II Android Development] beastuct:
Yea! That's what I was thinking too :laugh:
[Galaxy Ace II Android Development] ChronoMonochrome:
It just confirms that range of optimizations sets, which could be properly handled by all ROM modules, is quite limited. Btw, linux kernel code is by far cleaner and qualitatively compared to the code of some ROM modules. Maybe this clearity of a code is why kernel perfectly handles the most of popular optimizations. Of course, this is not only a reason. As noted, most of ROM modules are written on such high-level languages as C++ and have a very different purposes what they were written for. It becomes even more complex, when it turns out that some of them requires a very specific build environment, that is, some modules are itself using "hardcoded" optimizations just to get them work properly or to get compiled or whatever hacks that supposed to be used in module code which are sometimes about to interfere with optimizations. Even more unfortunate, most of modules were never supposed to be used (or tested by android devs) with optimization level different than -Os. This means that there will be at least a few modules that require flag -Os to work properly.
[Galaxy Ace II Android Development] ace2nutzer:
Anyway .. here the new ROM + Changelog...

20160507 ROM:

Added more build.prop tweaks

Better Multitasking* / More Smooth*

CM Sources Update

* = Use it with 20160507 Kernel for best results.

I think this is finally the last build with broken Code.

Next Build is compiled with -Os -marm and partially enabled LTO.

All other aggressive optimizations are removed :)
[Galaxy Ace II Android Development] IAmLucky:
[MENTION=5840412]ace2nutzer[/MENTION] your kernel bug is back again, using yestarday's kernel+rom and brightness slider has broken values, after half way, brightness goes down to zero

(using notification slider brightness control), rom was installed without factory data reset.
[Galaxy Ace II Android Development] gepel:
I'm using latest kernel with 0405 ROM and I didn't faced with that problem.
[Galaxy Ace II Android Development] beardedpanda:
Latest ROM and Kernel and everything works OK.

Wysłane z mojego GT-I8160 przy użyciu Tapatalka
[Galaxy Ace II Android Development] IAmLucky:
interesting, i booted it up, and tried changing screen brightness and this bug existed, after some time using it now, it does not appear again,

Please, someone test this: Reboot phone, let it boot, and right after unlocking phone try changing screen brightness, and this bug will appear.

After turning off screen (clicking power button) and turning it back again, bug dissapears.

Before flashing everything, i did format /system
[Galaxy Ace II Android Development] beardedpanda:
I can only reproduced that on fresh installation of the ROM and kernel.

In rest of cases - works normally.

Wysłane z mojego GT-I8160 przy użyciu Tapatalka
[Galaxy Ace II Android Development] IAmLucky:
hmm, i did format /system but i did not wipe data. So not sure what is causing this. Though, its not anoying bug, because after screen off it works again, but still maybe if ace2nutzer have time, he can try to solve this :)
[Galaxy Ace II Android Development] C-Krawall:
...have some problems to upload videos via whatsapp
[Galaxy Ace II Android Development] beardedpanda:
Try different lenghts of the videos and please provide more info about this problem.
[Galaxy Ace II Android Development] Culateralligator:
I'm trying last ROM+kernel and it's great as usual.

About Sound Recorder... I never use this app as the sound is really awful.

I've tried other much better app and it works perfect.

If some "agressive" optimizations must be left... I have to say this last update is great for me.

I'm a Premium customer of Amazon, but I can live having to click on images to view them.

On the other hand, I understand if someone paid for PowerAmp full version, wants to install the app.
[Galaxy Ace II Android Development] beardedpanda:
[MENTION=5840412]ace2nutzer[/MENTION] [MENTION=6902149]Dr360r[/MENTION]

New version of manual is HERE

Thanks again [MENTION=6902149]Dr360r[/MENTION] !

I think we're now - Aces of the Galaxy with this ROM and kernel ^^
[Galaxy Ace II Android Development] ace2nutzer:
There is nothing to fix ... this "bug" is only appearing after a fresh installation .. and especially after swapping storages .. or format sdcards. Also i don't don't know where this custom Setting of Brightness is stored .. it's probably on /system or sd cards ...

So every time u install new ROM or format sdcard or system .. u'll face one time this issue, which it's immediately solved after screen OFF and ON.

Nope :) it's most likely crappy for u ;)

U Guys propably still don't understand how much serious it is to have a screwed up build.

If, because of some bad optimization u've found out that sound recorder app doesn't work properly.. (btw: if u switch to record format to WAV .. then it'll even FC :laugh: ) then it doesn't mean that ONLY this app is affected of bugged Code but it's very most likely that the whole ROM has then a buggy Code .. even if almost everything seems to work properly, but in reality if u check it deeper, then u'll find a lot of small issues. And even if u can't find problems, then it's probably anyway buggy ... also there is as far as i know no way to verify if the produced Code is really 100% correct or not, since the output is binary .... so if u open such a lib: libdvm.so u'll see only something like this:

001100011101010010101

011111011010010001110

Also i think that a less optimized Build, but clean build, will probably run better ;)
[Galaxy Ace II Android Development] Dr360r:
It has always crashed when trying to record after switching to WAV. Even on 20150714.
[Galaxy Ace II Android Development] Dr360r:
To sum it up effectively, ROMs are a pain in you know where. Kernels are not.
[Galaxy Ace II Android Development] ChronoMonochrome:
They don't accept pull requests from github, instead all the commits have to be passed through the code review system.

I don't think that particularly this flag comes from CM, it's likely from ffmpeg devs rather than CM. CM is usually strict about adding optimizations, so their optimizations not that far from AOSP ones.

In the fact, on ARM architecture, instruction sets aren't limited only to THUMB and ARM ISA, there is THUMB-2 which is used by default (whenever you use -mthumb flag) on CPUs that support it. Thumb set is not that bad as it might seem, and especially thumb-2 which can even outperform ARM set due to smaller size of binaries, and as result, better caching (higher L1 / L2 cache hit rate). Recently I started learning ARM assembly language - just by the way, because of the fact that Thumb is a simplified ARM set, it's a somewhat easier to read and understand listings writen on Thumb instructions set.

If I'm not mistaken, all the low level ROM part is compiled with ARM instructions set. Have no idea about why strict aliasing is enabled, even though compiler complains about violating aliasing rules, but I don't remember if that low-level part (libc, libm and rest of bionic) suffers from -O2 optimization.
[Galaxy Ace II Android Development] C-Krawall:
i´´ve tried differnt length. from 5 seconds to 20 seconds. it always take about 20 minutes to upload. to share it to another whatsapp contact take 20 minutes too.
[Galaxy Ace II Android Development] beastuct:
Hey [MENTION=5840412]ace2nutzer[/MENTION] tell me in detail how to flash your rom on gti8160P. I've tried everything but it wont boot (no boot animation at all). I donwloaded cm11 rom, your kernel and your Gapps you provided in download link (they are most recent versions). And what do I do with the P zipped file(i8160P support v1.0.zip)? In first attempt I just put the files as they are in sdcard, but cannot install cm11 rom (it says not compatible version). In second attempt I drag the files from (i8160P support v1.0.zip) file to cm11 file and it replaces them. And last I deleted (meta-inf and system folders and coppied-pasted from (i8160P support v1.0.zip) file. Now what do I flash first, your kernel or cm11??

P.S-I 'm using CWM-based Recovery v6.0.5.0 to flash it.
[Galaxy Ace II Android Development] beardedpanda:
It's happen on any Internet connection spots? For example: home wifi, mobile data connection, hot spots etc.? Which version of ROM and kernel do you use?

For me videos in Whatsapp works normally.

Which ROM do you use now?

You shouldn't replace any files in the ROM!!

If you on 4.1.2 JB stock ROM or any custom ROM:

1. In CWM recovery wipe data/factory reset, go to Mounts and storage and format /system then mount it again,

3. Flash ROM

4. Flash codina P support .zip

5. Flash kernel, NT app and Gapps

6. Reboot system now (Say Yes for fixing root if this message shows)

If error still persist try to install kernel first.
[Galaxy Ace II Android Development] ace2nutzer:
Install first kernel, then shutdown.

Then boot to recovery again..

And install like @up says .. Incl. Kernel again.
[Galaxy Ace II Android Development] beastuct:
[MENTION=7332124]beardedpanda[/MENTION], [MENTION=5840412]ace2nutzer[/MENTION] Thank you guys! It works like a charm, keep this up. Though, it would be more convenient if you provided this guide at your first post so that people can see it immediately and there is no trouble installing the rom. I can't just read all the 4600 comments to find the answer...
[Galaxy Ace II Android Development] IAmLucky:
its just 2000 posts bro, 2x times less than u said, but i get your point
[Galaxy Ace II Android Development] ace2nutzer:
I've never considered thumb-(1) since our CPU support thumb-2 ... so i had always only compared ARM vs. thumb2.

But do u not remember ? approx 1 year ago we had already did an research on the web and found out that pure native ARM instruction set is still faster than thumb-2 .. even if ARM has bigger code.

The matter and the most important point if it's really more convenient to use thumb-2 instead of ARM .. depends highly on the L1/L2 cache size ... ! - So now is the question: up to which cache size is Thumb-2 convenient, and up to which cache size is then ARM more convenient ?? - for sure for very small cache size is thumb-2 better, and for big cache size is ARM better ... but where stands our CPU ?? - Try to provide accurate informations, then u've made my day ! ;)
[Galaxy Ace II Android Development] ChronoMonochrome:
Yeah, but if I'm not mistaken, thumb-2 achieves 98% speed of ARM. Isn't that good enough, taken into account the fact that thumb-2 binaries usually smaller than ARM ones?

It's hard to give the exact numbers, because it seem to be entirely dependent on the code you are testing. The second thing that should be considered is the compiler you are using. According to this post ( http://stackoverflow.com/questions/...ormance-on-iphone-3gs-non-floating-point-code - first answer), it comes even more complex, given the fact that compiler and order of performing optimizations also matters.
[Galaxy Ace II Android Development] beardedpanda:
[MENTION=5840412]ace2nutzer[/MENTION] [MENTION=6902149]Dr360r[/MENTION]

New version of the manual is HERE. Please, check it out. ;)

Proper credits are in that post which I update regulary.

What is added:

1. Fix for incompatibility with flashing ROM on codinap,

2. Three more definitions in the Glossary section.
[Galaxy Ace II Android Development] ace2nutzer:
Nope, it was even more .. up to 15%. Your link says this too. Well i don't know what to do with smaller binaries.

Smaller binaries doesn't mean = faster. A smaller binary is usually less optimized = less peformance and less size.

The only advantage is to save some space on the NAND flash. .. So far if i compile the ROM in THUMB-2 Mode .. then it's only approx 4MB smaller ... (only compared zipped one). But with repartition this is completely not interesting.

I did several Tests with ROM + kernel ...

I've compiled the kernel completely @ -Os -marm .. and the performance was very poor.

But so far i didn't test to compile it with -mthumb. (i'll test)

Today I've tried to build the ROM with full -mthumb + LTO .. and it seems that LTO doesn't like to have THUMB.

Also According to your link using NEON + THUMB = poor Floating Point performance.

As i said, just according to your link.. but i don't trust what that guy is writing .. it sounds like a noob ... too much "maybe" and so on ... Also there is no really comparison.. we need proper comparison for cortex-A9 ARM vs. thumb2.

All other things are speculations here. I believe we'll end up to run benchmarks :D

[ROM+kernel in THUMB vs. ROM+kernel in ARM ;) )

Anyway, every time i switch from thumb to ARM (ROM) i can feel a faster and smoother phone ... but running some professional benchmarks would be of course much better !
[Galaxy Ace II Android Development] IAmLucky:
[MENTION=5840412]ace2nutzer[/MENTION] im not sure what is wrong, with latest rom + kernel (2016/05/07) but im currently charging my phone, aswel using it for browsing with power saving profile and phone is discharging... i see the light that it is "charging" but it is discharging. Should i do clean install?

EDIT: It seems i found a problem. I am not sure why i have some kind of service called 'Picasa uploader' it was running in my background all the time and it was waking up when connecting/disconnecting charger. I forced hybernate and now my phone is charging again. Maybe u added it? or i can easily uninstall it without problems? It might be that this comes out from GAPPs which were in your new FTP. I remember, gapps file was a different one before.
[Galaxy Ace II Android Development] beardedpanda:
I have that service too but my charging working normally even with Power Saving profile. I have same problem few ROMS ago. Just do fresh install. ;)
[Galaxy Ace II Android Development] ace2nutzer:
@up

i think this is default app from CM .. usually it shouldn't make any problems... also i wouldn't simply delete.

Check in NT-APP Charging Current --- set 700mA and make sure "Charger OFF" is unchecked !

btw: new ROM is up !!

20160509

Changelog later ..

I need to sort out that messed up with the first 3 posts ... ;)
[Galaxy Ace II Android Development] ChronoMonochrome:
As far as I remember, this is a "pure" difference between ARM and Thumb-1. Thumb-2 has almost the same execturion speed as ARM while binaries has lesser size.

This is right for -Os vs -O2, but it may not be necessarily rigth for -mthumb vs -marm comparison.

Nope, I think this is relevant for CPU that the topicstarter was asking about (e.g. iPhone 3G CPU). I don't think this is relevant commonly for ARMv7 architecture, but I can be mistaken.

Yeah, I was trying to find some tests regarding of comparison ARM vs THUMB sets, especially on cortex-a9, but was a quite dissapointed since I could only find a comparison in a general, but not for specific CPUs, and some links were just simply outdated. As you said, I'm afraid that sometime I'll end up writing some benchmark to get the more precise results. So far I haven't found a suitable benchmark that can show this difference (the whetstone benchmark linked in ArchiDroid optimizations topic doesn't fit because it simply shows no difference: there is no difference in performance between ARM and Thumb-2 sets, while binary compiled with -mthumb is just 4 bytes lesser than -marm).

Btw. I don't think it's right to simply enforce either -mthumb or -marm on the whole ROM. It would be more convenient to use ARM for performance critical modules while leaving THUMB-2 mode for the rest ones. This is exactly what is done in AOSP by default: only small part of ROM is actually using ARM mode, while the rest is compiled using THUMB. Though, I probably would try to extend ARM modules list to get the better results. I think that by default is just too much is compiled in THUMB mode - it was done to reduce ROM size despite of possible performance sacrifice in a general.
[Galaxy Ace II Android Development] beardedpanda:
[MENTION=5840412]ace2nutzer[/MENTION] [MENTION=6902149]Dr360r[/MENTION]

On 160509 build:

1. PowerAMP still can't be installed,

2. The Instagram videos still can't be send,

3. Amazon pic issue still there.
[Galaxy Ace II Android Development] Dr360r:
Sound recorder fixed (though it still won't record in WAV).
[Galaxy Ace II Android Development] IAmLucky:
BTW poweramp cannot be installed ALSO i had installed it before, now it force closes on latest versions when i try to open it.
[Galaxy Ace II Android Development] beardedpanda:
Could Power button problems be related to the screws from gps fix? I mean, if I tighten them it should work normally?
[Galaxy Ace II Android Development] ace2nutzer:
Changelog for

20160509 ROM:

Removed low.ram.config (caused foreground apps to FC)

Better Performance

Fixed Sound Recorder App

Compiled with full -Os -marm

Custom Flags for more Code Size reduction

Partially enabled LTO

----------------------------------------------------------------------------------------------------------

Nope, but i was wrong too ...

Check this:

http://elinux.org/images/8/8a/Experiment_with_Linux_and_ARM_Thumb-2_ISA.pdf

Page 15 ... ARM vs. THUMB .. THUMB has average 25% less speed than ARM :)

But this is useless for us, we have thumb-2 :)

According to that Benchmark thumb-2 speed is only 2% slower than ARM set.

(Test was NOT done with cortex-a9)

But according to CoreMark1:

https://wiki.linaro.org/MichaelHope/Sandbox/CoreMark1

thumb-2 is exactly 7% slower than ARM set

.... this time e real comparison on armv7-a cortex-a9 ;)

So we don't need to waste our precious Time :)

Nope, no need to waste time too ;)

U're (again) forgetting that the default AOSP optimizations are for compatibility reasons optimized for older cpu's with old thumb 16bit ISA set, without thumb-2 at all ... that's why u found there still the flag -mthumb-interwork which is not needed at all on cortex-a9 which i've sorted out at a very begin of starting optimizations :)

With the old thumb-1 set it was making sense to split them like AOSP did .. but with the new thumb-2 this is not needed anymore .. u can use on the whole kernel or ROM, a full set of ARM or thumb-2 ..... :)

read carefully again the last page here "Summary":

http://elinux.org/images/8/8a/Experiment_with_Linux_and_ARM_Thumb-2_ISA.pdf
[Galaxy Ace II Android Development] ChronoMonochrome:
Yeah, I know that it's obviously possible to build entire ROM in THUMB or ARM. I didn't mean that building ROM in a way it was supposed by AOSP devs is only possible. My assumption is that even having Thumb-2 instructions set support it's still can be beneficial (in terms of RAM requirements) to build some modules in ARM mode while others in Thumb-2. Though I probably anyway will need to do some benchmarks to check, in which cases it can be beneficial. Memory cost of using ARM set sometimes is quite high (compared to Thumb), so it might be useful to use Thumb-2, everywhere it possible (if it don't hurt performance too much).
[Galaxy Ace II Android Development] ace2nutzer:
I think u can measure up to +- 15% difference on speed for some binaries and libs, and depending on what u're testing .. (video encoding/decoding, mp3 encoding etc..), but i don't know how u want to do this .... how many libs and binaries the ROM have ?? - But i can imagine when u're done with testing all binaries + libs .. what is better thumb2 or arm for each binary and lib, and not to mention about RAM usage, then u're probably 200 years old :D

Is it really worth it ? :)