[ROM][KANG³][CM9][UNOFFICIAL] Linaro Optimized Droid Incredible CM9 ROM - Droid Incredible Android Development

Because the CyanogenMod developers decided not to switch to the Linaro toolchain, I decided that I would do it myself. This ROM is very similar to invisiblek's nightlies, but has a few more patches from the CyanogenMod queue applied and other changes made to enable building with GCC 4.7 and -O3. I will try to put up a new build at least once every few days if there is much being merged into the CM9 tree.
The main benefit of using the Linaro optimized ROM is that the UI is faster and snappier. Some applications (especially heavy ones like Google Play) are noticeably less laggy. Also, you get higher benchmark scores. (Yay!)
My kernel is included as the stock kernel in this ROM.
As always, if you are in any doubt whatsoever, you should do a Nandroid backup before flashing this ROM.
Changelog:
8/15/2012
No changes from me; just updates from the CM repo
8/12/2012
Revert the patch increasing the number of cached app pages, as this used more memory and made the launcher homescreens lag
8/10/2012
No changes from me; just updates from the CM repo
8/7/2012
Remove the ext4 sdcard patch because it was causing multiple regressions in handling the sdcard, even though it was still fat32
8/6/2012
Apply patch (http://review.cyanogenmod.com/#/c/20061/) to remove videos intended only for the tuna device
Attempt to workaround the lag issues by making the browser kill itself when the last tab is closed
8/3/2012
Apply patch (http://review.cyanogenmod.com/#/c/20654/) to enable HTTPS Google searches in the stock browser for better privacy
Apply patch (http://review.cyanogenmod.com/#/c/19807/) to allow mounting ext4 sdcards
7/31/2012
Update to the Linaro 2012.7 toolchain
Compile the kernel with "-O3 -fno-tree-vectorization"
7/22/2012
Add TCP MSS iptables filter to the kernel as it seems to be used during tethering
Add the Linaro string processing optimizations to the ROM
7/21/2012
Include my "Lite" kernel with the ROM
Update to a new, unreleased-as-of-yet version of my kernel with more optimizations
7/16/2012
Disable WebGL again. It was causing hardlocks on a number of enabled sites
Apply patch (http://review.cyanogenmod.com/#/c/18490/) to allow for the downloading of "unsafe" attachment files in Email
7/10/2012
Apply patch (http://review.cyanogenmod.com/#/c/18319/) to speed up some app starts
Apply patch (http://review.cyanogenmod.com/#/c/17552/) to add more NEON optimizations to pixelflinger
Enable WebGL
7/8/2012
Apply Evan McClain's libskia update (fixes the blacked-out JPEG issue)
Fix some media players like MX Player (an instruction was missing because it was optimized out by O3)
Apply more optimization flags
6/27/2012
Initial release
Apply CM9 patches to fix compile failures with GCC 4.7 and enable O3 optimizations
Switch to libjpeg-turbo
Disable scrolling cache (increases scrolling smoothness for non-hardware-accelerated listviews)
Issues (specific to the Linaro optimized version):
Turning off Bluetooth causes the Phone app to crash. It restarts immediately, so there are no long-term effects.
Bluetooth file transfer (OPP) does not work. The Linaro team experiences this bug too and is currently looking for a solution. I will update as soon as a solution is found.
You can download the source I use to compile this ROM by following these instructions: https://github.com/invisiblek/android_device_htc_inc/blob/ics/README.md
Compiling Instructions:
These compiling instructions are for Linux. They should work on any distro, but I am using the latest release of (K)ubuntu.
Follow all of the instructions from the source link above except for the last one. This will download the source tree and get you set up to build.
Assuming you are already in the root directory of your source tree ("~/cm9" if you followed the above instructions), run the following commands in the terminal. Some of the git pulls will display a text editor screen. When you get this, just press Ctrl-O, Enter, and finally Ctrl-X.
Code:
cd external/skia
git pull http://review.cyanogenmod.com/CyanogenMod/android_external_skia refs/changes/85/14585/1
git pull http://review.cyanogenmod.com/CyanogenMod/android_external_skia refs/changes/86/14586/1
git pull http://review.cyanogenmod.com/CyanogenMod/android_external_skia refs/changes/87/14587/1
git pull http://review.cyanogenmod.com/CyanogenMod/android_external_skia refs/changes/88/14588/1
git commit -a
git pull http://review.cyanogenmod.com/CyanogenMod/android_external_skia refs/changes/89/14589/1
git pull http://review.cyanogenmod.com/CyanogenMod/android_external_skia refs/changes/10/15810/1
cd ../webkit
git pull http://review.cyanogenmod.com/CyanogenMod/android_external_webkit refs/changes/90/14590/1
git pull http://review.cyanogenmod.com/CyanogenMod/android_external_webkit refs/changes/91/14591/1
cd ../../frameworks/base
git pull http://review.cyanogenmod.com/CyanogenMod/android_frameworks_base refs/changes/92/14592/1
git pull http://review.cyanogenmod.com/CyanogenMod/android_frameworks_base refs/changes/80/17380/2
cd ../../external/freetype
git pull http://review.cyanogenmod.com/CyanogenMod/android_external_freetype refs/changes/54/12654/2
cd ../../build
git pull http://review.cyanogenmod.com/CyanogenMod/android_build refs/changes/58/17358/4
Follow the instructions here to replace your libjpeg with libjpeg-turbo.
Open the file ~/cm9/frameworks/base/core/java/android/widget/AbsListView.java in your favorite text editor. Go to line 753 and change it to read "setScrollingCacheEnabled(false);".
Open the file ~/cm9/bionic/libc/arch-arm/bionic/libgcc_compat.c in your favorite text editor. Go to line 114 and insert two new lines reading "XX(__aeabi_llsl) \" and "XX(__aeabi_llsr) \" below it.
Open the file ~/cm9/build/core/config.mk in your favorite text editor. Go to line 91 and change it to read "COMMON_GLOBAL_CFLAGS:= -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wno-error=strict-aliasing -Wno-error=enum-compare". Go to line 312 and change it to read "TARGET_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS) -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8". Go to line 315 and change it to read "TARGET_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS) -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8".
Open the file ~/cm9/build/core/combo/TARGET_linux-arm.mk in your favorite text editor. Go to line 47 and change it to read "prebuilt/$(HOST_PREBUILT_TAG)/toolchain/linaro-4.7.1/bin/arm-linux-androideabi-". Go to line 149 and change it to read "TARGET_GLOBAL_CPPFLAGS += -fvisibility-inlines-hidden".
Download this file and unzip it to ~/cm9/prebuilt/linux-x86/toolchain/linaro-4.7.1
You are finally ready to build! Open a terminal to the ~/cm9 directory, then run ". build/envsetup.sh" and "brunch inc". This will take a long time.

Great, going to try this out. Maybe the keyboard works better, I've shut down pop up and prediction.
Still lags horribly.
Edit: Is gapps included or do I need to flash them?
Edit: Wow.. Maybe some won't notice it, but I've seen an increase of speed and snapiness. Keyboard lag seems to have stopped somewhat.. its still there but its along better.
Sent from my ADR6300 using Tapatalk 2

withbloodskies said:
Great, going to try this out. Maybe the keyboard works better, I've shut down pop up and prediction.
Still lags horribly.
Edit: Is gapps included or do I need to flash them?
Edit: Wow.. Maybe some won't notice it, but I've seen an increase of speed and snapiness. Keyboard lag seems to have stopped somewhat.. its still there but its along better.
Sent from my ADR6300 using Tapatalk 2
Click to expand...
Click to collapse
You still need to flash Gapps. It would be illegal for me to include them.
The best workaround I have found for keyboard lag is to disable spellchecking. You still get autocorrect like in GB; it just doesn't put a red squiggly under misspelled words.

Good work, I'll have to try it out. Any chance you putting this up on goo.im and/or ROM Manager, to expedite the update process?

Very nice work,Thanks for your contribution .

PonsAsinorem said:
Good work, I'll have to try it out. Any chance you putting this up on goo.im and/or ROM Manager, to expedite the update process?
Click to expand...
Click to collapse
I will look at putting it on goo.im.

One last suggestion (for now) before I'm off to flash it: thought of changing the ROM and zip name just slightly so it's not confused with invisiblek? Maybe throw a linaro in there somewhere or something? Right now, they have the same names (and dates, too, shortly) with just the compile times and machines being different. Now off to flash.

PonsAsinorem said:
One last suggestion (for now) before I'm off to flash it: thought of changing the ROM and zip name just slightly so it's not confused with invisiblek? Maybe throw a linaro in there somewhere or something? Right now, they have the same names (and dates, too, shortly) with just the compile times and machines being different. Now off to flash.
Click to expand...
Click to collapse
I'm not quite sure how to do that. Can you tell me?

mamarley said:
I'm not quite sure how to do that. Can you tell me?
Click to expand...
Click to collapse
You'll have to do some tweaking to the bottom of this file. Hard to explain on the phone. As part of my compile script I wrote for my kangs, it sed/replaced the necessary lines with pons (I'd use linaro for yours). Experiment with it till it looks how you want it to. Any questions, let me know.
https://github.com/CyanogenMod/android_vendor_cm

mamarley said:
You still need to flash Gapps. It would be illegal for me to include them.
The best workaround I have found for keyboard lag is to disable spellchecking. You still get autocorrect like in GB; it just doesn't put a red squiggly under misspelled words.
Click to expand...
Click to collapse
I wanted to point out that I got keyboard lag on ICS even on my gnex. There's not much that can be done. I never did try disabling spell checker. Liquid 1.5 helped with its linaro optimizations but what helped more to me was the interactive governor I was using had input boost which boosts frequency upon using the touchscreen to minimize lag rather than wait for it to ramp up. The other part nay have been the go_high setting of 50% load. I'm not using all the technical terms but to high-speed frequency is user configurable and its the speed it will jump to at a specified load. It may exist in our current interactive governor.
I do know that there is no keyboard lag in jelly bean that I can tell.
Sent from my Galaxy Nexus using Tapatalk 2

tiny4579 said:
I do know that there is no keyboard lag in jelly bean that I can tell.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Its all that butter
Anyway I used DPI and it works but it makes alot of apps force close. I was on 175, the same thing happens on Evervolv's Roms too.
Sent from my ADR6300 using Tapatalk 2

Can i flash this over invisiblek's Cm9 nightlies?
Or do i have to do a full wipe?
I have all my apps and everything just the way i want it.. I really dont wanna wipe.

Gorilla* said:
Can i flash this over invisiblek's Cm9 nightlies?
Or do i have to do a full wipe?
I have all my apps and everything just the way i want it.. I really dont wanna wipe.
Click to expand...
Click to collapse
You can flash over.
I have been flashing over since the CM7 days and have never had any problems. I even flashed the CM9 ROM right on top of the CM7 ROM and only had to clear the data for 2 apps to get everything working again.

Marley, Im booting up now, I flashed it, flashed your Lite Kernel, and USB fast charge zip.
Heres to hoping for some sexy Linaro Goodness!
Ill report back to how this runs.

Gorilla* said:
Marley, Im booting up now, I flashed it, flashed your Lite Kernel, and USB fast charge zip.
Heres to hoping for some sexy Linaro Goodness!
Ill report back to how this runs.
Click to expand...
Click to collapse
Same here. Just booted up. This is legit. Snappier than the CM9 nightlies so far. I didn't flash the USB zip- what will that give me?

statusqu0 said:
Same here. Just booted up. This is legit. Snappier than the CM9 nightlies so far. I didn't flash the USB zip- what will that give me?
Click to expand...
Click to collapse
That enables USB Fast Charge. It will make your phone charge much faster when it is plugged into a PC or some third-party wall/car chargers.

mamarley said:
That enables USB Fast Charge. It will make your phone charge much faster when it is plugged into a PC or some third-party wall/car chargers.
Click to expand...
Click to collapse
Forgive my noob-ness, but will that damage the battery in any way?

statusqu0 said:
Forgive my noob-ness, but will that damage the battery in any way?
Click to expand...
Click to collapse
No, it just makes it charge in the same way it would if you plugged it into the stock wall charger.

seems good so far. a couple slow-downs at first but seem to have gone away.

Yea, seems snappier than the other cm9 rom..
Im just hoping i dont get phantom touchscreen issues.. like the screen typing for me,.

Related

[Q] About the ~200 line Linux kernel patch that does wonders

Hello, guys!
I guess most of you know about this "magic patch" that significantly boosts Linux speed. It's going to be merged in the 2.6.38 branch and it's shipping with Ubuntu Natty too. But this kernel patch can be applied to a previous kernel as well, just rebuilding it with this 224 magical lines of code.
What I wanted to know is if it's possibile to rebuild our kernels with this patch, if it is already, or if it's possibile but won't have significant boosts on Android devices.
You may read more about this on Phoronix. On the 2nd page there are video demos for lazy ones!
This has been discussed here twice &found not to help because we dont use harddisk.
Sent from my GT-I9000 using XDA App
was it "proven" or "theorized" ?
You can look it up here in dev. Search
Sent from my GT-I9000 using XDA App
ragin said:
This has been discussed here twice &found not to help because we dont use harddisk.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Thank you, but can you please link the thread with this discussion? I can't seem to find it. Also, this patch regards CPU, not hard disks.
this patch will be officially introduced in the 2.6.38 kernel..
also, this kernel will have about 50% more speed increase, due to the 200 lines patch and another issue resolved after it .. in general the upcoming kernel will be blazingly fast !!
there is a script that tries to do the same as the patch for earlier kernels. which I use on my Ubuntu laptop, and yes major performance increase !!
I tried to apply it to my previous phone (HTC Hero), but didn't work. I also asked Cyanogen on his twitter, but didn't care to give me an answer..
finally I gave up, and decided to wait for the next Android version that will have the 2.6.38 in the future..
MaXo64 said:
this patch will be officially introduced in the 2.6.38 kernel..
also, this kernel will have about 50% more speed increase, due to the 200 lines patch and another issue resolved after it .. in general the upcoming kernel will be blazingly fast !!
there is a script that tries to do the same as the patch for earlier kernels. which I use on my Ubuntu laptop, and yes major performance increase !!
I tried to apply it to my previous phone (HTC Hero), but didn't work. I also asked Cyanogen on his twitter, but didn't care to give me an answer..
finally I gave up, and decided to wait for the next Android version that will have the 2.6.38 in the future..
Click to expand...
Click to collapse
I'm using that script too on Maverick! I don't think there should be a significant increase in responsiveness if you apply it on high-end systems, but our SGS might benefit from it (as my old dual core system).
You say it didn't work on your Hero, but were there any errors in dmesg or you didn't find any significant change in speed?
thunderteaser said:
I'm using that script too on Maverick! I don't think there should be a significant increase in responsiveness if you apply it on high-end systems, but our SGS might benefit from it (as my old dual core system).
You say it didn't work on your Hero, but were there any errors in dmesg or you didn't find any significant change in speed?
Click to expand...
Click to collapse
dmesg should no difference. the script just showed a lot of errors.
I tried the "non-Ubuntu" version as described in Webupd8, but still similar errors.
I guess Android place the kernel differently from Linux desktops.
I might be mistaken, but SO kernel uses its. And haven't really noticed any difference with or without it.
MaXo64 said:
this patch will be officially introduced in the 2.6.38 kernel..
also, this kernel will have about 50% more speed increase, due to the 200 lines patch and another issue resolved after it .. in general the upcoming kernel will be blazingly fast !!
there is a script that tries to do the same as the patch for earlier kernels. which I use on my Ubuntu laptop, and yes major performance increase !!
I tried to apply it to my previous phone (HTC Hero), but didn't work. I also asked Cyanogen on his twitter, but didn't care to give me an answer..
finally I gave up, and decided to wait for the next Android version that will have the 2.6.38 in the future..
Click to expand...
Click to collapse
please don't spread incorrect facts:
* the "automated per tty task groups" (or autogroup) patch - by using cgroups (in CFS - the cpu scheduler) and thus isolating several taks from each other, giving them dedicated slices of cpu power - allows the system to be more responsive under load if there is a kind of cpu hog (task producing much load)
* the speed increase is due to Nick Piggin's VFS changes and Andrea Arcangeli & Mel Gorman's Transparent Hugepages (THP) support (and of course lots of other changes)
dupel said:
I might be mistaken, but SO kernel uses its. And haven't really noticed any difference with or without it.
Click to expand...
Click to collapse
that's correct: - "sched patch : automated per tty task groups (system more smooth and responsive) (v3(since 4_3) and v4(since 4_4))"
so you tried SO kernel with the patch applied and once reverted ?
but - yeah, I got you: I'm myself running a heavy patched 2.6.37 kernel with transparent hugepages, CFS autogroup, etc. enabled - and it certainly can play off its advantage most noticably during heavy system load
zacharias.maladroit said:
that's correct: - "sched patch : automated per tty task groups (system more smooth and responsive) (v3(since 4_3) and v4(since 4_4))"
so you tried SO kernel with the patch applied and once reverted ?
but - yeah, I got you: I'm myself running a heavy patched 2.6.37 kernel with transparent hugepages, CFS autogroup, etc. enabled - and it certainly can play off its advantage most noticably during heavy system load
Click to expand...
Click to collapse
So, please, correct my noobiness, isn't Android using TTY shells? If it's not than I understand why this patch can't be applied, but if it is, rebuilding a kernel with just 200 lines more is no big deal and we all could benefit from it. It's not very common for Android to be under heavy load but hey, it's going to be default in 2.6.38, so why not?
There is a better patch :
blog.internetnews.com/skerner/2010/11/forget-200-lines-red-hat-speed.html
But I don't know if android uses shells.
Protocamlann said:
There is a better patch :
blog.internetnews.com/skerner/2010/11/forget-200-lines-red-hat-speed.html
But I don't know if android uses shells.
Click to expand...
Click to collapse
Yes, that's exactly the script I was talking about a few posts ago. On my system running 2.6.35, I did not rebuild the kernel with the "patch of wonders" but applied this script. But as you may have read, it acts in userspace which is slightly different in Android (as far as I know it's not using the same environment variables and I don't know about any ~/.bashrc equivalents, but again correct me if I'm wrong), that's why a kernel-oriented patch would be more suitable.
* well, actually newer revisions of that patch don't make use of ttys but of the task session
so basically it seems to create separate groups for each task (or program for simplicity's sake)
(source)
I'm also not sure if current Android kernel revisions use CFS at all ("Android versus Linux?")
laststufo has the autogroup patch included in his SO Kernel but I don't know how to measure its effect ... (whether it makes any difference)
* other options to improve interactivity would be to use Lennart Poettering's bash-approach (the script), like MaXo64 already posted: link
since Android uses Bourne Shell (sh) instead of BASH the script might need to be rewritten
* if it's stable enough on the SGS - yet another option would be to use Con Kolivas BFS
thunderteaser said:
Yes, that's exactly the script I was talking about a few posts ago. On my system running 2.6.35, I did not rebuild the kernel with the "patch of wonders" but applied this script. But as you may have read, it acts in userspace which is slightly different in Android (as far as I know it's not using the same environment variables and I don't know about any ~/.bashrc equivalents, but again correct me if I'm wrong), that's why a kernel-oriented patch would be more suitable.
Click to expand...
Click to collapse
well, you could rewrite that script that it is run as a init-script (afaik in /system/init.d/ )
besides that:
there are stripped down (smaller) versions of bash 4.1* that are known to work on CM6 and the HTC Hero
so it should be a possibility to use that script on stock roms, too
if you can install busybox & root it, there also should be the possibility to install bash
zacharias.maladroit said:
* well, actually newer revisions of that patch don't make use of ttys but of the task session
so basically it seems to create separate groups for each task (or program for simplicity's sake)
(source)
I'm also not sure if current Android kernel revisions use CFS at all ("Android versus Linux?")
laststufo has the autogroup patch included in his SO Kernel but I don't know how to measure its effect ... (whether it makes any difference)
* other options to improve interactivity would be to use Lennart Poettering's bash-approach (the script), like MaXo64 already posted: link
since Android uses Bourne Shell (sh) instead of BASH the script might need to be rewritten
* if it's stable enough on the SGS - yet another option would be to use Con Kolivas BFS
Click to expand...
Click to collapse
It seems you're very well informed, so thanks for the infos you're posting!
I'm not a coder, though, so I hope a kernel developer could pick this up and go for BFS. You said laststufo already implemented this patch in his kernel, so that's really good! We should just find a way of testing its effectiveness.
zacharias.maladroit said:
well, you could rewrite that script that it is run as a init-script (afaik in /system/init.d/ )
besides that:
there are stripped down (smaller) versions of bash 4.1* that are known to work on CM6 and the HTC Hero
so it should be a possibility to use that script on stock roms, too
if you can install busybox & root it, there also should be the possibility to install bash
Click to expand...
Click to collapse
Yes, I've also seen bash shipping with some ROMs, so it's definitely possibile, though as I said before, I'm no coder...
thunderteaser said:
It seems you're very well informed, so thanks for the infos you're posting!
I'm not a coder, though, so I hope a kernel developer could pick this up and go for BFS. You said laststufo already implemented this patch in his kernel, so that's really good! We should just find a way of testing its effectiveness.
Click to expand...
Click to collapse
I'm a kernel-dev for linux-kernels so I got to know & learned to cherish them
just stumbled over a thread in the Epic 4G forum
for reference: [Q] [REQ] Galbraith Patch worked into kernals?
zacharias.maladroit said:
I'm a kernel-dev for linux-kernels so I got to know & learned to cherish them
Click to expand...
Click to collapse
You really are? That's great! So why don't you join laststufo to try maximizing the impact of his implemented "patch of wonders"? As I try to keep up with your techical chatting it seems I really can't do more than asking you to help!
zacharias.maladroit said:
just stumbled over a thread in the Epic 4G forum
for reference: [Q] [REQ] Galbraith Patch worked into kernals?
Click to expand...
Click to collapse
Uhm, so it seems BFS isn't stable on our hardware, pretty bad.

[ROM][UNOFFICIAL] Pons CM7.2 Inc builds (20120903)

CM7.2 Pons
Goo.Im Download for Kangs
Dev-Host Mirror
(updated only on request)
MediaFire Mirror
(updated only on request)
Changelog
Gapps
Gapps Mirror
Merged Commits for Gingerbread
Open Commits for Gingerbread
CyanogenMod 7 for the HTC Incredible :: V7.1.0 (9 Oct 2011)
Credits/Thanks​
All credit goes to Cyanogen and the rest of the CM team, and especially our HTC Incredible maintainers, as listed by the CyanogenMod site: jistone (aka CUViper/This Guy), slayher, and of course, koush, as well as the authors of the respective open commits.
Why a new the thread? The build bot has retired (as far as CM7 nightlys are concerned), and the current thread at [ROM] CM7.2 Nightlies for the Droid Incredible was designed with the official nightlys in mind. It has since deviated from that original aim, and to keep it from going off topic any further, I have created this thread.
For some reason, I have received several requests to put a donation link in my profile. You can always donate to the CyanogenMod project, but if you feel you HAVE to donate to me, I've put a link in my profile, and all donations will go towards upgrading my computer, so I can stay on top of this for CM9.
Changelog
In case you missed it the first time.
Known Issues/Bugs​
Per slayher: "Sometimes things are going to break, sometimes features are going to be removed, then added, then removed, then added back."
Just because it works in one build, doesn't mean it's going to work in the next.
TV-Out doesn't work on CM7 or any AOSP ROM
720P video recording
Theme Chooser causing WL widgets to disappear
FAQ​
Q: What's the ETA on....about how long till...when can I expect....?
A: The only rule of CyanogenMod: You don't ask for ETAs.
Q: Now that the Ice Cream Sandwich SDK has dropped, we're getting a port, right?!
A: Take a look at this PSA by Keyan Mobil
Q: What's this CM7.2, Android 2.3.7 business?
A: The kangs are built towards CM7.2, which is Android 2.3.7.
Q: How do I install a CM7.2 kang, coming from non-CM7?
A: The safest (definitely not the only, but my preferred) way is
Download kang from link
Reboot into recovery.
Make a backup/nandroid (to be safe)
Format system and boot under mounts
Wipe Data/Factory reset
Install zip from SDCard
Flash kang.
Flash Gapps (if this is your first time flashing a kang/CM7
Reboot
Enjoy
If any of you have data that you must absolutely save, then and only then should you use Titanium backup (or other backup apps) to restore your data. Please be sure not to restore any data to /system using these apps, as this will mostly likely corrupt your ROM.
Q: How do I update/flash these kangs?
A: The safest (definitely not the only, but my personal) way is
Download kang from link
Reboot into recovery.
Make a backup/nandroid (to be safe)
Wipe Cache
Wipe Dalvik
Install zip from SDCard
Flash kang.
Reboot
Enjoy
Q: How about that 720P? I hear it's handy.
A: Per slayher, "720P recording will not be coming to CM7 at this time. We *MAY* see it later if we get an HTC GB leak, using an MSM device (aka not omap). But for now, if you HAVE to have 720P recording, stick with CM6. The issue is that GB uses stagefright, and the hack it took to get 720p in CM6 wont work with stagefright. (it was done in opencore.) This is why we cant get it. The current driver implementation we have to work with is just not capable. So there you go, you can stop wondering/asking/hoping."
Q: How about CWM3/5? I'm having a problem where....
A: Try deleting the current recovery first.
Q: How do I fix the space error that pops up when I try to install some apps?
A: Per slayher, "If you get a Space error trying to install apps, just try installing again. I have encountered this error also and it is not related to actual free space, (unless you have a cubic crap ton (crapton * crapton * crapton) of apps installed)."
Q: How do I disable the shutter sound?
A: Per mattyg151, "I used root explorer to rename /system/media/audio/ui/camera_click.ogg to camera_click!.ogg ... no more camera shutter sound."
There is also an option at Menu > Settings > CyanogenMod setting > Sound > Mute camera shutter
Q: How do I increase the WiFi scan time to save battery life?
A: Per karnovaran, "One way to reduce battery drain is to increase the WiFi scan interval. It's set to 45 seconds, meaning it will scan every 45 seconds. If you change it to something like 90, obviously it will scan less often and use less battery. To do this, you have to edit the build.prop file in /system. The easiest way is with Root Explorer. Go to /system, mount r/w, open the build.prop in text editor and locate "wifi.supplicant_scan_interval=45" Change that value to 90 or whatever you want. Save the file, mount back to r/o, and reboot."
Q: Those automatic brightness settings are confusing. Anyone know of a good setting/rough guide?
A: This thread looks useful. So does this post
Q: How does that brightness slider thingey-majib work?
A: Per byrong "For those of you trying to figure out the new brightness-adjust-via-statusbar feature, do the following:
1. Settings > CM Settings > Interface > Status Bar Tweaks > StatusBar brightness (I'm guessing you guys already figured this part out)
2. Here's the trick: place your finger on the status bar, but don't drag it down. It will still 'peek' out some, but now you'll want to slowly drag your finger to the left or right while keeping it on the status bar itself. If you drag left, the screen will get darker; right for bright."
Q: I can't send no fancy mms picture messages!
A: Change you APN settings manually, (a popular way is to use GoSMS).
MMSC: http://mms.vtext.com/servlets/mms
MMS proxy: leave empty
MMS port: 80
Any more I should add? Let me know.
Sweetness. Thanks, Pons!
Clean and organized.
Redid the changelog that I use to keep track of the open commits. Linked it to a public viewable google document so I only have to maintain one across different sites.
Let me just say it was painful copying and pasting the thread from Rootz to here. Even after I tidied it up for xda's forum, it still looks terrible to me, especially compared to Rootz. XDA needs to switch forum software.
Thanks for putting these together! Been wanting to go back to something AOSP; this is a great way to get into it.
You're the man! Thanks so much for setting this up and maintaining for us. Your kangs are dope! Just wanted to say thanks man!
Thanks man.
-My life is a shooting range, people never change-
Great idea devoted thread for the kangs. Honestly I did not know you were doing that and I was using #258 still. Who knows what small differences I'll never notice I am missing. Time to flash.
I had to upgrade to a nexus but now I can unleash my Dinc from Verizon and "phone" duties.
I hope this isn't a dumb question, but what are Commits, and what is the difference between merged commits and open commits?
I've been running one of the kangs for a few days now and I love it. I was just curious because I see the survey at the top of the page and a couple links about commits, but I don't know what they are and after just a quick search I haven't found anything.
BlankDEP said:
I hope this isn't a dumb question, but what are Commits, and what is the difference between merged commits and open commits?
I've been running one of the kangs for a few days now and I love it. I was just curious because I see the survey at the top of the page and a couple links about commits, but I don't know what they are and after just a quick search I haven't found anything.
Click to expand...
Click to collapse
CyanogenMod goes through a review process, where anyone can submit code. The code submitted is called a commit. If it passes scrutiny and works, it gets merged into the official CM repository. This approved commit is called a merged commit. All official nightlys (and RC's and stables when they get to that point) only have merged commits.
An open commit is a change to the code that is currently being reviewed and hasn't been approved to be included in the next CM...yet, or ever for that matter. Some open commits get merged eventually (either as they are, or after they've been updated a time or fifteen), other open commits get abandoned. Some users like the additional functionality of these open commits, at the potential cost of stability.
I've started releasing kangs two at a time. One completely stock with only merged commits (just like the official CM7 build bot would have done, may it rest in peace), and the next kang with the same amount of merged commits, plus some interesting looking open ones (most have been requested by users, other merely look like they won't make your phone explode).
And don't hesitate to ask questions, at least after a quick google search.
Pons do you know why we don't have TV out yet? We have kernel source now I thought.
PonsAsinorem said:
CyanogenMod goes through a review process, where anyone can submit code. The code submitted is called a commit. If it passes scrutiny and works, it gets merged into the official CM repository. This approved commit is called a merged commit. All official nightlys (and RC's and stables when they get to that point) only have merged commits.
An open commit is a change to the code that is currently being reviewed and hasn't been approved to be included in the next CM...yet, or ever for that matter. Some open commits get merged eventually (either as they are, or after they've been updated a time or fifteen), other open commits get abandoned. Some users like the additional functionality of these open commits, at the potential cost of stability.
I've started releasing kangs two at a time. One completely stock with only merged commits (just like the official CM7 build bot would have done, may it rest in peace), and the next kang with the same amount of merged commits, plus some interesting looking open ones (most have been requested by users, other merely look like they won't make your phone explode).
And don't hesitate to ask questions, at least after a quick google search.
Click to expand...
Click to collapse
Thank you so much for the response. It makes a lot more sense to me now. I might take a look at what some of those open commits do and test them out, I have not problem having to restore or flash a newer stabler one if needed.
BlankDEP said:
Thank you so much for the response. It makes a lot more sense to me now. I might take a look at what some of those open commits do and test them out, I have not problem having to restore or flash a newer stabler one if needed.
Click to expand...
Click to collapse
Good on ya mate! Take a chance and get cool features that may never be available
Sent from Tapatalk
Thanks, Pons. These KANGs brought me back to CM7 after like 9 months on MIUI builds. Just got tired of the instability and random problems with the new MIUI builds. These CM7 kangs are awesome. Great work!
Kitchen theming not sticking
Sorry if this is a dumb question, I haven't been on CM7 in a while, and hadn't tried using UOT for anything on it before.
I set up a new battery style and applied the zip. It themed over fine after booting up, but eventually it reverted to the stock CM7 battery after an hour or so.
Anyone have any suggestions on getting a new battery style to stick? Thanks.
miketwoms said:
Sorry if this is a dumb question, I haven't been on CM7 in a while, and hadn't tried using UOT for anything on it before.
I set up a new battery style and applied the zip. It themed over fine after booting up, but eventually it reverted to the stock CM7 battery after an hour or so.
Anyone have any suggestions on getting a new battery style to stick? Thanks.
Click to expand...
Click to collapse
You can another way but it may be a little more complicated? Not onto recovery, mount system, then adb pull the systemui.apk, decompile it with apk manager, swap out the png's for the battery with those from the SystemUI.apk, recompile the SystemUI.apk, then pull the png's from the recompiled apk with 7Zip and drop them into the original SystemUI.apk, and adb push it back to the phone.
EDIT: And although I haven't tried this next method, it may work? You could boot into recovery, mount the system, adb pull the SystemUI.apk, explore it with 7Zip, and simply drop the battery png's from the uot (which you are exploring the same way) into the folder the battery png's are located in within the SystemUI.apk and it will overwrite them (provided the files are named the same. They NEED to be named exactly the same). the adb push that systemUI.apk back to the phone. No decompiling or Recompiling done...
So yeah, not sure if that will work do to compression and stuff..
Sent from Tapatalk
thanks. I might give that 2nd option a try.
[CONTEST #5] CDMA Nexus: People's Choice Edition
Vote for The CM maintainer for the OG Incredible Josh Stone aka CUViper.
http://rootzwiki.com/user/25563-cuviper/
He's been great to us and the incredible community; let's try and return the favor.
New kang is up. Check the changelog, and/or download location.

[ROM] Cyanogenmod 10.1 with App Permission Control (unofficial)

OpenPDroid is an awesome mod developed and maintained by CollegeDev, FFU5y, Mateor, Pastime1971, Syvat and Wbedard that allows you to configure for each app separately exactly which permissions it should have and block or spoof everything else. Unfortunately, it can only be used if the core platform is integrated directly into the ROM. (For more details, see http://forum.xda-developers.com/showthread.php?t=2098156)
Since I have completed the integration anyway during my attempts to fix the HDMI rotation bug (without success so far, I'm afraid) and the current version of CM does not seem to contain any more critical bugs, I thought others might like to make use of my ROM as well.
I therefore hereby present: CM 10.1 with OpenPDroid integration. Besides the platform integration I made the following changes:
PDroid Manager app integration.
Standard CM Updates are disabled by default.
CM anonymous stats collection is disabled by default.
Google Analytics integration has been removed from the CM stats collection module.
Updates and anonymous stats collection can simply be enabled again using the menu. (Warning! Applying a normal CM update purges the OpenPDroid integration!)
I will try to at least provide updates to newer versions at critical update moments and will perhaps provide some more in between.
You'll need to have ClockworkMOD installed in order to flash this ROM.
Downloads:
11/07/13: Version based on CM 10.1.1 stable. Steps:
1. Flash the stable version of CM 10.1.1 (10/07/13) for our device.
2. Flash this OpenPDroid patch.
3. Install PDroid Manager either from the Play Store or using the APK attached to this post.
10/07/13: (based on source code 09/07)
10/07/13: https://mega.co.nz/#!uswGGQ6K!Wt9JAFDBElZQ2i74yNxMrkz3y7kO4U8-LWK2dLx_L8s
10/07/13: MD5: 99fc3769c9b2354a844ac1ac92504650
16/05/13: (build with standard CM kernel)
16/05/13: https://mega.co.nz/#!StIyQbzD!GfgNa3Seha74UnSahokwIzvcZ9UVqKaa2P38_LlxuMY
16/05/13: MD5: ad036e4035291bba901ad90826ab0abf
13/05/13: (general source code cleanup)
13/05/13: https://mega.co.nz/#!KoxixajK!Wn91VGj5ooOFYXs-Vt8QJDkU8Bo7VuR40_939hd3YMg
13/05/13: MD5: dffad528804bf830c4b225b0bfff5a76
09/05/13: (WerewolfJB kernel v003 new)
09/05/13: https://mega.co.nz/#!2txwmS4S!aR4bHG6BHMkoTPabi8Z0K0r4hPsUICmKO9ROaaIYOg0
09/05/13: MD5: 4a75829296a167a563ad78ffe26991de
05/05/13: (vibration,memory management)
05/05/13: https://mega.co.nz/#!bsQERDaS!RHB4rHhQsDf9XauyOpeMySAiDt1gtc8Y7gnsckdWOlo
05/05/13: MD5: e05017acf9e50affcba7379050514d63
01/05/13: (merged in the WerewolfJB kernel, fixed headphone button actions)
01/05/13: https://mega.co.nz/#!ig5hCJYY!eHM5vwER9zEEZJRk9_C6vCvclH14rDcKa9CyBcU9kTc
01/05/13: MD5: 3ababb1c0cda47874ed7d688de032638
28/04/13 (adjusted some device references for improved custom recovery compatibility)
28/04/13: https://mega.co.nz/#!71BgVLBY!PEcEHAYxpDZVZcQycpgGJ2QeJZZ0HbgVdjaBkiD72bg
28/04/13: MD5: 7f2616736dd78940e37d1e14ea47084f
24/04/13: (storage, power profiles)
24/04/13: https://mega.co.nz/#!j44XWBDb!UrmGEhCUcjbj8Q3WTj1EkDrImXJXwcNGvEMIHFm-TvE
24/04/13: MD5: 491a500c5bef958d7575a6ce62fae1aa
23/04/13: https://mega.co.nz/#!75IDhCAA!EpwDqHm6W6fG3mk0lNaC0XPWvlsJxi2TjEpjJPEuj6Q
23/04/13: MD5: 609c76958796f19fb04aee217c44ba98
PS. If anyone ever discovers the correct procedure for calling the proprietary nvidia tegra driver api, please let me know.
is the baseband wakelock solved in this rom?
Who can change the other network disk ,thx
xtribas said:
is the baseband wakelock solved in this rom?
Click to expand...
Click to collapse
The main additional problem that this ROM currently fixes compared to standard CM is that of blatant privacy violation.
Since the wakelock issue seems to be related to mobile data use, and I don't have a data subscription, experimentation with this would quickly rack up my phone bill. If someone comes up with a solution I'd be happy to patch it out though.
Hansey said:
Who can change the other network disk ,thx
Click to expand...
Click to collapse
I assume you're referring here to the swapping of disk names when using MTP. I actually only noticed this bug last night and it should be easy to fix. I plan to have it patched out in the next version.
Update 24/04/13 uploaded, involving official CM patches for MTP storage & power profile settings.
Is there a guide how to compile it my self?
DavidXanatos said:
Is there a guide how to compile it my self?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1994860
DavidXanatos said:
Is there a guide how to compile it my self?
Click to expand...
Click to collapse
At the Cyanogenmod website there are instructions for compiling yourself. You can apply the OpenDroid patches using the link I included in the post. Make sure to synchronize the proprietary files with those provided by Cyanogenmod or some aspects will fail to work.
@Wenque - As the original CM on which you based this has the incorrectly labelled hardware platform which means it can only be flashed with the one particular version of CWM, could you possibly modify your version so the coding is for X3, not for P880 - then it could be flashed with any recovery.
SimonTS said:
@Wenque - As the original CM on which you based this has the incorrectly labelled hardware platform which means it can only be flashed with the one particular version of CWM, could you possibly modify your version so the coding is for X3, not for P880 - then it could be flashed with any recovery.
Click to expand...
Click to collapse
Thanks for pointing this out, as I wasn't aware that my ROMs still suffered from this problem. I'll look into it.
Wenque said:
Thanks for pointing this out, as I wasn't aware that my ROMs still suffered from this problem. I'll look into it.
Click to expand...
Click to collapse
No problem. I got the 'Status 7' message when I tried to flash it, due to the P880.
This problem goes away with the latest (v6.0.3.1) version of CWM, so it's not massively important I guess. It would be better if CM modified their builds to reflect the correct hardware identifier.
May be worth you expanding your OP slightly to contain a link to the correct CWM - just to make it easier for people to find.
SimonTS said:
No problem. I got the 'Status 7' message when I tried to flash it, due to the P880.
This problem goes away with the latest (v6.0.3.1) version of CWM, so it's not massively important I guess. It would be better if CM modified their builds to reflect the correct hardware identifier.
May be worth you expanding your OP slightly to contain a link to the correct CWM - just to make it easier for people to find.
Click to expand...
Click to collapse
Good idea. I'll probably just expand the model check in the update script for future uploads so it accepts both references.
Update 28/04/13 uploaded, for some improved custom recovery compatibility. As every update, it also contains all official CM patches.
All patches between this version and the last one are minor, so for people who have installed the previous version of the ROM there is no need to update to this one.
Is anyone else having problems with GPS on this ROM? I am going to try going back to all the old methods I used on my HTC DesireS, but thought I'd ask here as well.
For those who wonder what the old methods were, have a look at derekgordon.com
SimonTS said:
Is anyone else having problems with GPS on this ROM? I am going to try going back to all the old methods I used on my HTC DesireS, but thought I'd ask here as well.
For those who wonder what the old methods were, have a look at derekgordon.com
Click to expand...
Click to collapse
No-body?
I have tried ths both with Derek Gordon's gps.conf modification, and with my own one using just the UK NTP servers and no fancy settings.
If I reboot the phone and run GPS Status & Toolbox it takes between 3 and 5 minutes to get the first lock. This happens whether I do it immediately on reboot or leave the phone alone for an hour first. Once it has established a first good lock, GPS seems to be very good - relocks quickly and stays in the background happily.
The problem is the first lock - it's almost as if the hardware is actually starting off disabled and takes time to warm up or something.
Can someone else using this ROM please test to confirm? I will try this with the standard CM 10.1 build and also with the Stock ROM again, but can't do so for a couple of days.
Update 01/05/13 uploaded. I swapped the default CM kernel with the WerewolfJB kernel (thanks laufersteppenwolf!) and I fixed the headphone button actions (key 248 HEADSETHOOK).
SimonTS said:
Is anyone else having problems with GPS on this ROM? I am going to try going back to all the old methods I used on my HTC DesireS, but thought I'd ask here as well.
For those who wonder what the old methods were, have a look at derekgordon.com
Click to expand...
Click to collapse
Sorry SimonTS, but I don't know whether this version fixes your GPS problems. Perhaps I'll have time to look into it later.
Wenque said:
Update 01/05/13 uploaded. I swapped the default CM kernel with the WerewolfJB kernel (thanks laufersteppenwolf!) and I fixed the headphone button actions (key 248 HEADSETHOOK).
Sorry SimonTS, but I don't know whether this version fixes your GPS problems. Perhaps I'll have time to look into it later.
Click to expand...
Click to collapse
No need to apologise mate. I have tried the WerewolfJB kernel, but it doesn't seem to make any difference. I'm going to look at running the WerewolfJB ROM for a while as GPS seems to work perfectly in that, but hopefully you will get time to build a new version as I really want a ROM with pDroid in it.
SimonTS said:
No need to apologise mate. I have tried the WerewolfJB kernel, but it doesn't seem to make any difference. I'm going to look at running the WerewolfJB ROM for a while as GPS seems to work perfectly in that, but hopefully you will get time to build a new version as I really want a ROM with pDroid in it.
Click to expand...
Click to collapse
All you really need to do is copy the good /system/etc/gps.conf file to the PDroid ROM and make sure that you do not block too many permissions. You are probably using Google's SUPL server to help you obtain an initial location estimation and you don't want to block that if you rely on fast GPS locks.
You can do this by first copying the gps.conf file to a safe location (root of sdcard for instance in /mnt/shell/emulated/) and then performing the following steps:
- Use the terminal emulator with the following commands:
= su
= mount -o remount,rw /system
- Now copy the good gps.config file over the current one (for instance using root-permission File Manager or 'su', 'cp /mnt/shell/emulated/gps.conf /system/etc/' )
- Either reboot now or use the terminal emulator with the following commands:
= su
= mount -o remount,ro /system
Wenque said:
All you really need to do is copy the good /system/etc/gps.conf file to the PDroid ROM and make sure that you do not block too many permissions. You are probably using Google's SUPL server to help you obtain an initial location estimation and you don't want to block that if you rely on fast GPS locks.
You can do this by first copying the gps.conf file to a safe location (root of sdcard for instance in /mnt/shell/emulated/) and then performing the following steps:
- Use the terminal emulator with the following commands:
= su
= mount -o remount,rw /system
- Now copy the good gps.config file over the current one (for instance using root-permission File Manager or 'su', 'cp /mnt/shell/emulated/gps.conf /system/etc/' )
- Either reboot now or use the terminal emulator with the following commands:
= su
= mount -o remount,ro /system
Click to expand...
Click to collapse
It's not that simple mate, but thanks for the reply. I know all about the gps.conf file as we used to have real problems with GPS on my old Desire S. The problem I see with this build and the standard CM is almost as if it doesn't know how to talk to the GPS hardware properly.
With the WerewolfJB build and my own gps.conf file I can get a lock in under 10 seconds sometimes, and always under 20.

[10-06-2014][ROM][DISCONTINUED] UnityROM-2 v.2.5.0 [CM-11][Optimized]

UnityROM-2 v.2.5.0
*****Discontinued.... No way to test actively till I have a functional build.*****
HTC One M7 Sprint Edition ( m7spr )
​
Development Section...
Want to contribute to the project or become team member?
Contact Me by PM here or leave a post detailing what you can and are willing to do for the projects' advancement.
My Github: https://github.com/LiquidSmokeX64
All current project sources can be found there .
ALSO MY FOOL-PROOF BUILD GUIDE & SCRIPTS ARE THERE FOR THOSE TOO IMPATIENT TO WAIT FOR MY NEXT RELEASE .
**Sources current as of version 2.5.0**
**10/06/2014**
Direct link to guide:
https://github.com/LiquidSmokeX64/Guides-Scripts
Note: Noob Friendly. If you're new to building ROMs or have never done it at all. I will help for as long as you maintain civility and focus on the project goals.​
Installation errors out. Here is a pastebin of log saved after error
http://pastebin.com/fz15gwwn
Edit: I was able to install after removing that set perm line from updater. I will let ya know how it goes.
gruesomewolf said:
Installation errors out. Here is a pastebin of log saved after error
http://pastebin.com/fz15gwwn
Edit: I was able to install after removing that set perm line from updater. I will let ya know how it goes.
Click to expand...
Click to collapse
Ok. I just removed it too. My bad adaptation from Evo LTE. Nothing too bad luckily.
Reuploading the fixed version now.
LiquidSmokeX64 said:
Ok. I just removed it too. My bad adaptation from Evo LTE. Nothing too bad luckily.
Reuploading the fixed version now.
Click to expand...
Click to collapse
Seems to be running very well, once I got past that installation error....
Nice and smooth, especially with my aosp kernel...
gruesomewolf said:
Seems to be running very well, once I got past that installation error....
Nice and smooth, especially with my aosp kernel...
Click to expand...
Click to collapse
So. You're a kernel dev... Got a question for you. How do I add more CFLAGS to the makefile without it not booting or whatever? I've tried adding -O3 to the 2 places I know to put CFLAGS. Same place I put the -w so it would work with GCC 4.8
gruesomewolf said:
Seems to be running very well, once I got past that installation error....
Nice and smooth, especially with my aosp kernel...
Click to expand...
Click to collapse
Will you be releasing this kernel for the Evo 4G? [emoji14] Evo4gnoob here
LiquidSmokeX64 said:
So. You're a kernel dev... Got a question for you. How do I add more CFLAGS to the makefile without it not booting or whatever? I've tried adding -O3 to the 2 places I know to put CFLAGS. Same place I put the -w so it would work with GCC 4.8
Click to expand...
Click to collapse
I wouldn't say Im a kernel dev....more of a dabler...lol. I sent you a pm with my makefile so you can see adjustments I made for my kernels latest build (not yet publicly released)
Notorious said:
Will you be releasing this kernel for the Evo 4G? [emoji14] Evo4gnoob here
Click to expand...
Click to collapse
Umm....no I dont have any plans for that ATM
gruesomewolf said:
I wouldn't say Im a kernel dev....more of a dabler...lol. I sent you a pm with my makefile so you can see adjustments I made for my kernels latest build (not yet publicly released)
Umm....no I dont have any plans for that ATM
Click to expand...
Click to collapse
Was joking lol
Notorious said:
Was joking lol
Click to expand...
Click to collapse
So you're allowing the integration of it? Just to be clear.
So I'm not sure why but the kernel borked again. Maybe I need to go through one flag at a time? Or maybe forgot something....?
gruesomewolf said:
Seems to be running very well, once I got past that installation error....
Nice and smooth, especially with my aosp kernel...
Click to expand...
Click to collapse
Hey. Im having nothing but issues building it in the ROM so I was curious if you could tell me what I need to do after copying the msm8960 folder to a new place and adding in the makefile changes? Ive never built a kernel independently before but would like it to be a boot.img like normal so I can just replace the one in the ROM zip with the new one. Im sure it's pretty easy, just figured I'd ask you rather than comb through 80 guides saying different stuff lol.
LiquidSmokeX64 said:
Hey. Im having nothing but issues building it in the ROM so I was curious if you could tell me what I need to do after copying the msm8960 folder to a new place and adding in the makefile changes? Ive never built a kernel independently before but would like it to be a boot.img like normal so I can just replace the one in the ROM zip with the new one. Im sure it's pretty easy, just figured I'd ask you rather than comb through 80 guides saying different stuff lol.
Click to expand...
Click to collapse
Could you pm me with more info. Exact process of building, errors during build, any changes made to source, etc.
I'm gonna download your source later, together we should be able to figure this out.
gruesomewolf said:
Could you pm me with more info. Exact process of building, errors during build, any changes made to source, etc.
I'm gonna download your source later, together we should be able to figure this out.
Click to expand...
Click to collapse
I'm not seeing errors. Hell I removed everything but the -O3 spots and it still refused to boot. I dont know what the deal is....
Anytim I do ANYTHING to the kernel its dead, no matter how stupid it is.
gruesomewolf said:
Could you pm me with more info. Exact process of building, errors during build, any changes made to source, etc.
I'm gonna download your source later, together we should be able to figure this out.
Click to expand...
Click to collapse
BTW. The makefile is borked. And was curious if you knew how to build AOSP for this device? CM was pretty easy, I'd figure AOSP isn't too different. Then I can try to get Android L running once I have a working Android K to cross-reference to and make the version specific changes in device, kernel, vendor, qcom-common, and s4-common
LiquidSmokeX64 said:
So. You're a kernel dev... Got a question for you. How do I add more CFLAGS to the makefile without it not booting or whatever? I've tried adding -O3 to the 2 places I know to put CFLAGS. Same place I put the -w so it would work with GCC 4.8
Click to expand...
Click to collapse
When certain flags or 03 is added it creates a larger zImage. In order to compensate the boot.img needs needs modified, either by kernel installer or if baked in the rom hex edited. To change the ramdiskaddr.
Sent from my HTCONE using Tapatalk
thicklizard said:
When certain flags or 03 is added it creates a larger zImage. In order to compensate the boot.img needs needs modified, either by kernel installer or if baked in the rom hex edited. To change the ramdiskaddr.
Sent from my HTCONE using Tapatalk
Click to expand...
Click to collapse
Absolutely correct. And to elaborate on this just a bit more. Since your source building here, you can actually adjust the ramdiskadd with the scripts, considering it uses mkbootimg commands to build the boot.img.
An additional line in your devices board config, to give it a new ramdiskaddr size. Then an additional line in the build folder factory_ramdisk.mk , to handle the command for a new ramdiskaddr size should do the trick.
As for your other question about building aosp. I'm afraid that would be beyond my area of expertise. You would have significantly modify aosp code to allow for caf. It would be much harder then building cm, cause cm already has all the adjustments needed for caf devices
thicklizard said:
When certain flags or 03 is added it creates a larger zImage. In order to compensate the boot.img needs needs modified, either by kernel installer or if baked in the rom hex edited. To change the ramdiskaddr.
Sent from my HTCONE using Tapatalk
Click to expand...
Click to collapse
gruesomewolf said:
Absolutely correct. And to elaborate on this just a bit more. Since your source building here, you can actually adjust the ramdiskadd with the scripts, considering it uses mkbootimg commands to build the boot.img.
An additional line in your devices board config, to give it a new ramdiskaddr size. Then an additional line in the build folder factory_ramdisk.mk , to handle the command for a new ramdiskaddr size should do the trick.
As for your other question about building aosp. I'm afraid that would be beyond my area of expertise. You would have significantly modify aosp code to allow for caf. It would be much harder then building cm, cause cm already has all the adjustments needed for caf devices
Click to expand...
Click to collapse
I read this and my eyes glaze over. But you are in good hands with these two helping you. :highfive:
Yeah I'm working on it guys. Read the integrated kernel building guide and trying that. But if I could just get it to build me the boot.IMG and get my ramdisk sizes and whatever I'm looking at where to edit it in the device/BoardConfig changed the defconfig to a custom one I made based off the original one from the working boot.IMG but changed the I/O scheduler & CPU governed defaults. Gave it a local name (UnityKernel-x.x.x) and am fighting its last issues. So if nothing else help building it independently might be the most useful now. So if nothing else I can push a new boot.img
My bad. It just says the boot partition size so I think I might be almost there

CM12 - building, optimising, fixing, having fun

Hi all o/
To celebrate two weeks of my successful CM12 building and hacking, I'm starting this thread. Its purpose is to discuss general CM12 building steps for beginners like myself, bugs and fixes, applying @JustArchi's optimisation flags, solving the resulting build failures.... and all the other CM12/S4Mini-related questions that don't belong to F4k's [ROM] thread but end up there (I was guilty of that).
First of all, my thanks go to:
@arco68 for making it possible to build ROMs for our S4mini
CyanogenMod team for the ROM itself
@F4k for his kernel and all the other excellent contributions to this forum
@JustArchi for finding what he found
In this first post I will outline the steps needed to build a vanilla unofficial CM12 for serranoltexx. serranoltexx is the only device I have so this is what I'll introduce. I suspect building serrano3gxx is just as simple (just replace the device name in all the relevant steps). I don't know what to do to build for i9192, if you do please contribute
Building your own CM12 ROM
Main article: http://wiki.cyanogenmod.org/w/Build_for_serranoltexx
The article above tells you how to build CM11, but CM12 builds just as well with minor modifications I'll outline here. To follow those steps you need a Linux installation. I will write how you can make an example Lubuntu-based virtual machine on your Windows box in a post below.
Modifications to the build steps:
"Install the SDK" -- you can skip that, because in the end we will not use any SDK tools.
"Install the Build Packages" - replace jdk6 with jdk7 everywhere, as Java 7 is needed to build Lollipop.
"Create the directories" - I will assume you've followed those steps and everything is under ~/android/system/
"Initialize the CyanogenMod source repository" replace "cm-11.0" with "cm-12.0" of course
"Extract proprietary blobs" we will do this completely differently. If you try to use extract-files.sh, the script will fail, and when I finally fixed the script my camera didn't work...
So, do this instead (credit to @F4k and @kyrillos13 for answering my question on page 90 of F4k's ROM thread)
* Go to https://github.com/TheMuppets/proprietary_vendor_samsung
* Switch branch to cm-12.0
* Use the "Download ZIP" button to get the copy of the entire thing. The zip is big (500 MB? ish) and 95% of it useless for us, so if you're trying to save some bandwidth you can try to do this trick to get only the "serrano-common" folder. If you do, make a post here with exact steps for others
* Copy the "serrano-common" folder to ~/android/system/vendor/samsung/ (to clarify, final directory structure should include ~/android/system/vendor/samsung/serrano-common/proprietary/app/ folder among others)
"Turn on caching to speed up build" - sounds like a good idea but we're going to be playing with compiler options, which diminishes its usefulness. It also uses a lot of disk space. Only follow it if you want your daily increments to build fast, and you don't expect to be doing global changes such as optimisation flag changes often. I didn't do this step.
This concludes my first post in this thread. I personally have never had problems with building after this part (except when I had not enough space or memory) and the resulting vanilla builds always worked for me fine. Feel encouraged!
Next post: some tricks and useful commands
A random selection of interesting things:
What recovery is good for applying my builds
Well they're all good, and they all work I bet. What I use is Phil's Touch and I'm on version 6.48.4 and it's worked perfectly.
How do I dirty flash my build on top of another CM12 build
I keep doing that since early F4k's builds and have no problems (yet!!). The trick is to only keep /data, while wiping everything else:
* Copy your newly build .zip file to your sdcard (you'll want to have a large enough sd card, I think)
* (if you want to) copy F4k's kernel and/or gapps too.
* Reboot your phone, go to recovery
* Backup your current phone. Seriously, never miss that step.
* Format /system (in Phil's Touch that's under "mounts and storage")
* Format /cache (as above)
* Select "install zip from sd card" and choose your ROM
* (if you want to) repeat "install zip from sd card" for F4k's kernel and/or gapps.
* Reboot your phone. It will take ~5 minutes or so for ART to re-compile all your apps
Soo my build didn't work. Wat do??
* Reboot to Recovery
* What I do is another backup. This gives me a nice archive containing my broken build, which I can later investigate
* Use recovery to restore the backup you've made before applying your build
* Reboot. You're back on a build that worked. Phew~
* (if you want to investigate) copy both backups (one that works and one that doesn't) to your PC. Uncompress the contents of /system for both, see if they obviously differ (such as one having binary blobs and one not lol).
Use F4k's kernel if you want to
Up to you, but here it is: https://s.basketbuild.com/devs/F4k/kernel_f4k-lp
I use it and as a result, I don't bother to optimise/improve CM12 kernel. I also don't care if I ever mis-compile CM12 kernel (not that it ever happens).
Gapps location
I use "mini" from here: https://s.basketbuild.com/devs/TKruzze/Android 5.0.1 GApps and all I can say is that it worked for me so far.
I made some changes and I forgot what I did
Command "repo status" will give you a list of all the files you've modified across all the git repositories.
I made some changes to a file and I forgot how it looked before
Go to that file's directory (or at least its git repository, but it's somewhat hard to figure out what is the repository structure in your workspace) and issue "git diff" command. It will produce a diff file with all your changes.
I made some changes to a file and I want to undo that
Go to that file's directory and issue "git checkout [filename]" command. It will drop your changes and replace the file with original.
My build finished and I want to make a new, fresh, one
You want to say "make clean" before you do "brunch serranoltexx" again.
Coming up: Basic JustArchi-inspired optimisations
Main article: http://forum.xda-developers.com/showthread.php?t=2754997
In the mid of 2014, @JustArchi recognised that all of Android has always been built with -Os option - meaning that the binaries are optimised for small size and not for execution speed. -Os is sometimes necessary (as it was on very early Android devices), but the "usual" build optimisation has always been -O2 meaning optimise for speed. Or -O3, which runs even more optimisations for speed (which might or might not help relative to O2 and will always make compilation slower).
Applying those optimisations has never been easier, because Lollipop is already built with GCC 4.8 (which was very highly recommended, but not in default toolchain, before). So all we need to do is activate -O3 by modifying some makefiles.
Does it do anything
In 0xbenchmark, several graphics-related tests (draw-arc, draw-circle) are up to six times faster. Does it matter? Dunno! But it's fun to see such a thing anyway!
What is THE most important file to modify?
Here: ~/android/system/build/core/combo/TARGET_linux-arm.mk
Line 70 defines "TARGET_arm_CFLAGS", this is the base compiler flags for *kernel* and starts with -O2. You can change that -O2 to -O3 if you want, but if you use F4k's kernel then it will do nothing in practice.
Line 77 defines TARGET_thumb_CFLAGS, this is the base compiler flags for android binaries. It clearly has -Os staring you in the face. Aha!! Change that to -O3 (or -O2) and you've just applied 90% of all compiler optimisations you can make. Build again. Your zip will be larger, this means it worked.
So I did that and it didn't finish building
Heh you're right, I lied. Unfortunately GCC is not as perfect as we'd wish and it will produce new errors or warnings with -O3 flag. Some of them make sense, some baffle me... Here's a list of what I had to change:
Error building android/system/frameworks//media/libstagefright/codecs/amrwbenc/src/isp_az.c, compiler detects array index out of bounds
It doesn't make any sense if you ask me (and I stared at the code a lot). There are two arrays f1 and f2. f1 has size [NC16k + 1] and f2 has size [NC16k], and if f1 is big enough then f2 should be big enough, but GCC disagrees.
For an off chance that GCC is right, I made f2 bigger [NC16k + 1]. Since nobody does sizeof(f2) it causes no change in logic, it marely allocates one extra (unused) word on stack. Made GCC happy.
[edit] this fix is unnecessary on gcc 4.8.5; see "Using SaberMod toolchain to build your CM12" on page 3 for how to use updated gcc[/edit]
Error building android/system/frameworks/av/media/libstagefright/codecs/m4v_h263/dec/src/deringing_[chroma|luma].cpp, cryptic "assuming when assuming" message
Another weird one. It *seems* to me that GCC unrolled a loop, and then looked at the unrolled loop index condition and concluded it's dumb after the unrolling, and complains. Modify:
android/system/frameworks/media/libstagefright/codecs/m4v_h263/dec/Android.mk
Find line: Local_CFLAGS += -Werror
Replace with: Local_CFLAGS += -Werror -Wno-error=strict-overflow
Error linking libhwcomposer, symbols "configRotator", "configMdp" and "updateSource" not found
Those three functions are defined with |inline| in the cpp files, while a compiler option tells gcc that inline implies static (dunno why it works with -Os, it really should never work). Open:
~/android/system/hardware/qcom/display-caf/msm8960/libhwcomposer/hwc_utils.cpp
Line 1238, remove "inline"
Line 1309, remove "inline"
Line 1335, remove "inline"
That is all, should build now!
Anything else uses -Os?
Yes, there's a bunch of Android.mk files that locally override the -O3 flag we just set with -Os (or -O2). You can make a global search, but here's a list of some important ones:
* every makefile under external/chromium_org/. This is the built-in web browser and unfortunately every single makefile does the override, and there's over9000 of them. If you want to change them all, you probably want to write a script of some sort. If you do, share one here lol.
* third_party/android_crazy_linker/src/Android.mk, adds -Os to LOCAL_CFLAGS. I do not know what crazy linker is, but if you want that to be bigger and faster, change that to -O3.
* third_party/zlib/zlib.target.linux-arm.mk, adds -Os to MY_CFLAGS_Release. Zlib sounds like something that should be fast, change that to -O3.
* modules/audio_processing/ lots of .mk files use -Os. How weird. You're only interested in *.target.linux-arm.mk, other targets do not apply to us.
* external/... some of the Android.mk files there use -Os. Some seem to matter.
Phew ~ next up: some more interesting optimisations that worked for me.
Compile for cortex-a15 target
The CPU in our S4mini is called Krait. It's neither Cortex-A9 nor Cortex-A15, but it's supposed to be similar to A15. However, the CM12 build system does not have an appropriate entry for Krait and defaults to generic A7+Neon, a choice that is not VERY bad but presumably not optimal either.
Go to file: ~/android/system/build/core/combo/arch/arm/armv7-a-neon.mk
Find the line that detects a15-compatible architectures (cortex-a15 and denver):
ifneq (,$(filter cortex-a15 denver,$(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)))
add krait to the list:
ifneq (,$(filter krait cortex-a15 denver,$(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)))
Activate neon vector extensions
[edit] see "Activate neon vector extensions, for real this time" on page 3 for a working, but hacky, solution[/edit]
Activate linker optimisations
In the in file: build/core/combo/select.mk there's room for some linker parameters.
Find the line that says:
$(combo_var_prefix)GLOBAL_LDFLAGS :=
and change it to:
$(combo_var_prefix)GLOBAL_LDFLAGS := -Wl,-O1
(that's: dash whiskey lima comma dash oscar one, no spaces, in case it's not readable)
I do not know what kind of optimisations linker makes, but this parameter asks it to make them.
Thanks a lot for this helpful and informative how-to. This is really appreciated if one likes to build the rom on his own.
Regards!
where can i download YOUR build of cm12?
well done!
This is a great write up. Anybody contributing for necessary mods required for duos will value add
I'm glad you guys like it I'll post some more tomorrow.
Howdareme said:
where can i download YOUR build of cm12?
Click to expand...
Click to collapse
Mine? I don't upload them anywhere because I don't see much point, making a near-identical copy of F4k's rom. Plus I am very lazy ;ppp
Now, to say something useful: if you're building any time soon, you might want to include this patch: http://review.cyanogenmod.org/#/c/82572/
It seems like there's a serious resource leak any time you switch your screen off.
Thanks for sharing this wonderful information!
sysKin said:
* Go to https://github.com/TheMuppets/proprietary_vendor_samsung
* Switch branch to cm-12.0
* Use the "Download ZIP" button to get the copy of the entire thing.
Click to expand...
Click to collapse
You might wanna consider adding that repo to a local manifest instead. See also @k2wls excellent guide: How to make your own CM-11.0 for your S4 mini
you can save the 500mb download by just adding this to .repo/local_manifests/roomservice.xml
Code:
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" />
although perhaps we should be using arco's repo instead of the muppets?
https://github.com/arco/proprietary_vendor_samsung
also we should make a list of recommend patches from gerrit.
arco doesn't seem to be doing anything s4mini-specific at the moment, tonnes of work on bluetooth it seems:
http://review.cyanogenmod.org/#/q/owner:"Arne+Coucheron"+branch:"cm-12.0",n,z
sej7278 said:
you can save the 500mb download by just adding this to .repo/local_manifests/roomservice.xml
Code:
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" />
although perhaps we should be using arco's repo instead of the muppets?
https://github.com/arco/proprietary_vendor_samsung
Click to expand...
Click to collapse
Wooo thanks, this is exactly the kind of knowledge I'm hoping we can put in one place, and I'm a noob when it comes to android build system (and |repo| script).
also we should make a list of recommend patches from gerrit.
Click to expand...
Click to collapse
Yup!
sysKin said:
Wooo thanks, this is exactly the kind of knowledge I'm hoping we can put in one place, and I'm a noob when it comes to android build system (and |repo| script).
Click to expand...
Click to collapse
well it won't actually save you a 500mb download, it'll just download it using repo, but at least it'll keep it up-to-date this way (as i recall there is a way to just checkout the directories you want, but i can't remember it, think you have to list every directory you don't want and remove it).
you can also add revision="cm-12.0" to the end of the tag, but cm-12.0 is the default now anyway.
i'd say USE_CCACHE=1 is worth doing, unless you're making major changes for every build, it defaults to only using 1Gb these days.
also if like me you've already checked out the cm-11.0 branch, you can switch to cm12 using:
Code:
repo init -b cm-12.0
repo sync -j16
built ok after a second repo sync (think i was in the middle of a merge window) and it turns out you don't need to get the prebuilts anymore, the terminal app is part of the source now.
oh and the screen off memory leak patch has been merged now.
it did take my 3.2ghz core-i5 with ccache on an ssd and 12gb ram about 2.5 hours to build, so a lot longer than cm7/9/10 (30-45mins) and a bit longer than cm11 (1.5-2 hours)
edit: actually a warm ccache only saved 5-10mins it seems, much more java than c/c++ in android these days i guess.
stop "settings > device > buttons" from crashing: http://review.cyanogenmod.org/#/c/83030/ (merged)
still looking for how to:
1. enable editting quick settings tiles
2. unmount usb mass storage,
3. take a screenshot from reboot menu / edit the reboot menu
4. edit the lockscreen settings
For those of us suffering from network-derived timezone resetting to GMT+0 (not a fun thing to happen overnight when you need your alarm clock!), there is this possible solution:
http://review.cyanogenmod.org/#/c/83219/
Love this thread.......
Thanks @sysKin., have you try diffrenent toolchain ?
happyta5 said:
have you try diffrenent toolchain ?
Click to expand...
Click to collapse
Not yet, not on this build. I did use a different toolchain when I compiled CM 10.2 but without any knowledge about how repo works it was just one huge mess. Many guides here only deepened my misunderstandings by showing me how to replace kernel toolchain (ie what builds the kernel) saying nothing about rest-of-android toolchain (and I don't even remember some details of that anymore...).
Also, I never managed to successfully compile CM 10.2 with contemporary GCC 4.9 - too many weird internal compiler errors and other strangeness. Do you have any information about successes with current tools? There wouldn't be much point using different toolchains if GCC/clang/etc remain the same (well, GCC 4.8.4 was released on 19th of December, might be worth trying).
With some pointers from this thread, I'm able to build CM12 using ArchiDroid linaro 4.8 and 4.9 ToolChain with -O3 Optimized. CM seems run faster. I'm using @F4k kernel for the moment since I like the undervolt alot. May be I'll try SaberMod ToolChain later .....
Cheers ...
happyta5 said:
With some pointers from this thread, I'm able to build CM12 using ArchiDroid linaro 4.8 and 4.9 ToolChain with -O3 Optimized. CM seems run faster.
Click to expand...
Click to collapse
Could you share more about what you did? In particular, did you change the "android-eabi" toolchain or the "arm-eabi" toolchain?
The only instructions I've seen which explain how to use linaro toolchain refer to the "android-eabi" one, and if my understanding is correct, that's used only for building the kernel...

Categories

Resources