Jump to content

Compiling CM9 (and maybe CM10) for Blade


Guest sej7278

Recommended Posts

Guest shezar

SlowBlur: Flag indicating whether the surface flinger is inefficient at performing a blur. (false = slower, true = faster ui)

LimitedAlpha: Flag indicating whether the surface flinger has limited alpha compositing functionality in hardware. If set, the window manager will disable alpha trasformation in animations where not strictly needed. (true = faster ui)

Best performance: blur true, alpha true if I see this correctly. Right?

Link to comment
Share on other sites

Guest shezar

That's nice because on my build true/true is faster than the default f/t that got merged yesterday. My recent build was goddamn choppy while on true/true it's fluid. Really. I don't get what the artifacts with clock are: sometimes it doesn't fade in but simply pops up, what's the big deal with that?

Link to comment
Share on other sites

Guest sej7278

That's nice because on my build true/true is faster than the default f/t that got merged yesterday. My recent build was goddamn choppy while on true/true it's fluid. Really. I don't get what the artifacts with clock are: sometimes it doesn't fade in but simply pops up, what's the big deal with that?

true/true that is was before is definitely faster than it is now, that's not why CFX seems faster than CM9 obviously (as the change was only made to CFX a few days back).

the problem with launching the clock app from the app drawer is that the screen vertically squashes and horizontally widens, like its exploding or something odd, before redrawing the screen, this patch seems to make that less evident.

interesting that jventura's investigations show false/false to be best, which would seem illogical as true/true should be the fastest, and config_sf_slowBlur has been deprecated anyway it seems, so as long as config_sf_limitedAlpha=true everything should be fine.

my initial diff from the cfx repo's of a few weeks back showed only device.mk differed really. but now looking at the device trees there's some more minor differences. its looking like it must be the kernels not the vendor/device trees (where is the CFX kernel source on github these days?)

diff blade/BoardConfig.mk ~/coldfusionx/android_device_zte_blade/BoardConfig.mk

34a35

> BUILD_KERNEL := true

82a84

> BOARD_UMS_LUNFILE := "/sys/devices/platform/msm_hsusb/gadget/lun0/file"

86,87d87

<

< #DEBUG_DALVIK_VM := true

89d88

< BOARD_USE_QCOM_PMEM := true

94,95d92

< #TARGET_LIBAGL_USE_GRALLOC_COPYBITS := true
some coldfusionx-specific stuff in cm.mk device.mk and proprietary-files.txt has the new EV/OMX stuff in CFX lib/egl/libGLES_android.so is pulled in from proprietary-files.txt in CM9 but from blade-vendor-blobs.mk (in the vendor tree) in CFX. media_profiles.xml has a lot of differences regarding codecs etc. - wonder if that's the video playback issue with the recording fix?
diff blade/system.prop ~/coldfusionx/android_device_zte_blade/system.prop

13a14,15

> debug.camcorder.disablemeta=1

full device tree diff attached (vendor tree is more or less identical) device_diff.txt.zip

Edited by sej7278
Link to comment
Share on other sites

Guest shezar

the problem with launching the clock app from the app drawer is that the screen vertically squashes and horizontally widens, like its exploding or something odd, before redrawing the screen, this patch seems to make that less evident.

Ah I see what that is, I, too have experienced it with my 15/05 build. Weird thing is that when I reinstalled it upon today's slower one that problem disappeared o.O

(in steps: i had 15/05, I installed today's build over it, then I installed 15/05 again over the new one... please don't throw stones :) )

Oh and I tried out the camcorder patches: it records but force closes on save for me. Also there's a file that appears but MX can't play. Did I miss something?

Edited by shezar
Link to comment
Share on other sites

Guest sej7278

I think the GLESandroid could be the reason for the slowdown.

but its in both builds, just different places, the last CFX build i made put it in /system/lib/android/ unless perhaps its not called from anywhere.

as i understand it that's never used if the adreno200 versions are there anyway. and the files in CFX and CM9 are identical.

Link to comment
Share on other sites

Guest jventura

interesting that jventura's investigations show false/false to be best, which would seem illogical as true/true should be the fastest, and config_sf_slowBlur has been deprecated anyway it seems, so as long as config_sf_limitedAlpha=true everything should be fine.

I was testing the launcher without widgets. I've added widgets and my conclusion is that it seems slow also. It seems that the problem is not with these flags..

João Ventura

Link to comment
Share on other sites

Guest tilal6991

but its in both builds, just different places, the last CFX build i made put it in /system/lib/android/ unless perhaps its not called from anywhere.

as i understand it that's never used if the adreno200 versions are there anyway. and the files in CFX and CM9 are identical.

My proprietary repo is where the difference lies. And these libs are used for back up sw rendering in a few places as can be seen in egl.cfg. if you remove the android line then you can see by the errors thrown that the lib is being used.

Link to comment
Share on other sites

Guest tilal6991

Ah I see what that is, I, too have experienced it with my 15/05 build. Weird thing is that when I reinstalled it upon today's slower one that problem disappeared o.O

(in steps: i had 15/05, I installed today's build over it, then I installed 15/05 again over the new one... please don't throw stones :) )

Oh and I tried out the camcorder patches: it records but force closes on save for me. Also there's a file that appears but MX can't play. Did I miss something?

See the full commit message.

Link to comment
Share on other sites

Guest shezar

See the full commit message.

I don't see your point this time. I've read the commit message for the camera fix, hell, I've even read the comments but noone mentioned FC while stopping the recording.

And if you were refering to the first part of my comment: the clock-bug disappeared when I installed my build without the patch containing that xml.

But never mind.

Link to comment
Share on other sites

Guest targetbsp

I don't see your point this time. I've read the commit message for the camera fix, hell, I've even read the comments but noone mentioned FC while stopping the recording.

Did you get the lib mentioned as part 2 of the fix? I missed that for ages lol. The result of missing the lib is the phone rapidly runs out of memory, lags, crashes and the saved file is gibberish.

Edited by targetbsp
Link to comment
Share on other sites

Guest shezar

Did you get the lib mentioned as part 2 of the fix? I missed that for ages lol. The result of missing the lib is the phone rapidly runs out of memory, lags, crashes and the saved file is gibberish.

Ah-ha! Thanks, I assumed that it was already merged in the props. Well, there's my problem.

Link to comment
Share on other sites

Guest jventura

Did you get the lib mentioned as part 2 of the fix? I missed that for ages lol. The result of missing the lib is the phone rapidly runs out of memory, lags, crashes and the saved file is gibberish.

To add, I thought that it was enough to do "git clone https://github.com/k..._vendor_zte.git -b ics ", but it seems that the lib that tilal mentions is still not merged in koush's git, so you have to download it and copy it to /vendor/zte/proprietary/libs (or use a git command which I don't know.. :) )

Then you should copy the file to phone /system/lib. Anyone know why "adb remount" gives me "remount failed: Operation not permitted"? I've already gave root access to ADB.. adb remount used to work to me in gingerbread roms..

João Ventura

Edited by jventura
Link to comment
Share on other sites

Guest sej7278

My proprietary repo is where the difference lies. And these libs are used for back up sw rendering in a few places as can be seen in egl.cfg. if you remove the android line then you can see by the errors thrown that the lib is being used.

i thought that CFX was still using libGLES_android.so from blade-vendor-blobs.mk but i see it was removed weeks ago.

it seems CM9 is calling lib/egl/libGLES_android.so from both vendor/zte/blade/blade-vendor-blobs.mk and device/zte/blade/proprietary-files.txt

so you're saying to remove those lines and when something tries to use the lib for software rendering it can't and has to use the accelerated adreno200 libs?

Edited by sej7278
Link to comment
Share on other sites

Guest sej7278

Yeap, I thought that it was enough to do "git clone https://github.com/k..._vendor_zte.git -b ics ", but it seems that the lib that tilal mentions is still not merged in koush's git, so you have to download it and copy it to /vendor/zte/proprietary/libs (or use a git command which I don't know.. :) )

Then you should copy the file to phone /system/lib. Anyone know why "adb remount" gives me "remount failed: Operation not permitted"? I've already gave root access to ADB.. adb remount used to work to me in gingerbread roms..

João Ventura

adb has changed as have the permissions system.

first you have to allow root over adb in developer options on the phone, and also you have to use "adb root" from the pc now, before "adb shell" or "adb remount".

Link to comment
Share on other sites

Guest targetbsp

Yeah I just downloaded the camera lib in my web browser and copied it into the rom using root explorer and then into my VM for inclusion in future. I'm sure there are fancier ways of doing that in a more proper manner but that was quicker than seeking them out. :D

Link to comment
Share on other sites

Guest jventura

adb has changed as have the permissions system.

first you have to allow root over adb in developer options on the phone, and also you have to use "adb root" from the pc now, before "adb shell" or "adb remount".

Thanks! That information is hard to find.. Even now that I know the answer, still can't find the answer in Google..

Strange, even with the new lib in place, when I use the video camera, on the first press on the button it plays a sound, on the second, I get a FC.. I believe I've done a git checkout with the patch to solve this.. I'll check tomorrow and recompile from scratch again..

Link to comment
Share on other sites

Guest sej7278

Thanks! That information is hard to find.. Even now that I know the answer, still can't find the answer in Google..

Strange, even with the new lib in place, when I use the video camera, on the first press on the button it plays a sound, on the second, I get a FC.. I believe I've done a git checkout with the patch to solve this.. I'll check tomorrow and recompile from scratch again..

wipe dalvik and reboot a couple of times to make sure the old /system libs aren't cached somewhere still like in a running process. i found before that replacing the camera libs was really hard lol, feisty little buggers!

i'm trying a build overnight myself - gonna remove the two GLES lib lines and set alpha/blur back to true/true, see if we can get the best of both worlds.

Link to comment
Share on other sites

Guest jventura

i'm trying a build overnight myself - gonna remove the two GLES lib lines and set alpha/blur back to true/true, see if we can get the best of both worlds.

I've changed the name of /system/lib/egl/libGLES_android.so to libGLES_android.so2, rebooted, but all kept the same..

Also, I've tracked down some info about egl.cfg and found an interesting thread in XDA (http://forum.xda-dev...d.php?t=1104420), where a guy recomends to disable the software renderer altogether..

Our /device/zte/blade/egl.cfg has the following content:


0 0 android

0 1 adreno200

He recomends something that, for us would be:

0 1 adreno200

i.e., remove the first line, the software renderer.. I do not know what problems that would give.. ColdFusionX has the 2 lines, so I don't know if this would solve it.. More info: The documentation header for egl.cfg says:

# One line per configuration, of the form:

#

# D I TAG

#

# D: display (0: default)

# I: implementation (0: software, 1: hardware)

# TAG: a unique tag

#

# The library name loaded by EGL is constructed as (in that order):

#

# /system/lib/egl/libGLES_$TAG.so

# /system/lib/egl/lib{EGL|GLESv1_CM|GLESv2}_$TAG.so

#

Edit: Tilal mentioned previously that removing the "android" line from egl.cfg would throw errors. I've adb pull a changed egl.cfg file, rebooted, but no improvements, and no errors, although I only tested the launcher and basic apps like gallery, sms, etc..

Edited by jventura
Link to comment
Share on other sites

Guest jventura

My proprietary repo is where the difference lies

LOL, the answer my friends, has been always in front of our faces! I've done a simple thing: extract /system/lib from Coldfusion 15May, and adb pull everything to my phone's CM9 /system/lib.. What can i say, it is now very smooooooth.. :)

So, or we create a git branch somewhere with Tilal's proprietary files (or Tilal's do it in his git account), or we must find the "offending" lib.. Suggestions?

João Ventura

PS: The libGLES_android.so file is in Coldfusion's /system/lib/egl/, so, we were chasing the wrong direction..

Link to comment
Share on other sites

Guest sej7278

LOL, the answer my friends, has been always in front of our faces! I've done a simple thing: extract /system/lib from Coldfusion 15May, and adb pull everything to my phone's CM9 /system/lib.. What can i say, it is now very smooooooth.. :)

So, or we create a git branch somewhere with Tilal's proprietary files (or Tilal's do it in his git account), or we must find the "offending" lib.. Suggestions?

João Ventura

PS: The libGLES_android.so file is in Coldfusion's /system/lib/egl/, so, we were chasing the wrong direction..

yes i've got a feeling this is all crap!

i've set alpha/blur back to true/true and removed all references to libGLES_android.so and the clock app is doing the squishing again but the notification power thing is still doing slow fades when toggling wifi/brightness. i'm not sure if app drawer is perhaps faster.

i can't see how copying /system/lib from CFX to CM9 fixed anything to do with proprietary files as the only difference is this GLES line and libOmxVidEnc.so binaries differ. its more likely other differences within /system/lib, which are many, and probably come from kernel differences....

edit: interestingly, i've just done a diff of /system/lib from cm9 i built and tilal's cfx 15/05 and the GLES files differ - whereas the ones on the two githubs don't, so the CFX build isn't using the libs on github.


Binary files cm9_syslib/libEGL.so and cfx_syslib/libEGL.so differ

Binary files cm9_syslib/libGLESv1_CM.so and cfx_syslib/libGLESv1_CM.so differ

Binary files cm9_syslib/libGLESv2_dbg.so and cfx_syslib/libGLESv2_dbg.so differ

Binary files cm9_syslib/libGLESv2.so and cfx_syslib/libGLESv2.so differ

Binary files cm9_syslib/egl/libGLES_android.so and cfx_syslib/egl/libGLES_android.so differ

full diff: systemlib.txt.zip

Edited by sej7278
Link to comment
Share on other sites

Guest jventura

i can't see how copying /system/lib from CFX to CM9 fixed anything to do with proprietary files as the only difference is this GLES line and libOmxVidEnc.so binaries differ. its more likely other differences within /system/lib, which are many!

Sej, to have no doubts, first I deleted my phone's /system/lib/ and then I have copied the entire /system/lib folder from coldfusion (15/May version) to my CM9 phone /system/lib. So, my ROM is the CM9 compiled yesterday, with false/false in those settings blur/whatever (I think, although I don't think that it solves anything), and the /system/lib contents of coldfusion.. In coldfusion /system/lib/egl, the libGLES_android.so is there, so there is no point removing it!

This is very subjective, but although the ROM is faster (everything, from launcher, to menus, general interface), it does not seem as fast as Coldfusion (just a feeling, hard to prove), but is indeed faster that any Gingerbread I've used.. To me, CM9 is now usable! :)

Definitely there is/are some lib/libs that are doing the trick! My first suspicion goes towards the libs in /system/lib/egl.. I still have some time this morning for this, I will compare Koush's libs with Coldfusion's libs file sizes, it is easier to start with.. As soon as I find something I will inform here..

João Ventura

Edited by jventura
Link to comment
Share on other sites

Guest tilal6991

Sej, to have no doubts, first I deleted my phone's /system/lib/ and then I have copied the entire /system/lib folder from coldfusion (15/May version) to my CM9 phone /system/lib. So, my ROM is the CM9 compiled yesterday, with false/false in those settings blur/whatever (I think, although I don't think that it solves anything), and the /system/lib contents of coldfusion.. In coldfusion /system/lib/egl, the libGLES_android.so is there, so there is no point removing it!

This is very subjective, but although the ROM is faster (everything, from launcher, to menus, general interface), it does not seem as fast as Coldfusion (just a feeling, hard to prove), but is indeed faster that any Gingerbread I've used.. To me, CM9 is now usable! :)

Definitely there is/are some lib/libs that are doing the trick! My first suspicion goes towards the libs in /system/lib/egl.. I still have some time this morning for this, I will compare Koush's libs with Coldfusion's libs file sizes, it is easier to start with.. As soon as I find something I will inform here..

João Ventura

I don't think I explained what I meant very well.

The thing I'm saying is that that CM9 uses a prebuilt libGLES_android.so from koush's propeitary repo. Wheras CFX uses a source built one from the repos.

The prebuilt comes from the QCOM zip files which had the drivers but we don't need it. If that can be got rid of then I hope/expect that CM9 will be as smooth as CFX.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.