androidandroid-sourcecyanogenmod

Build AOSP ROM with CyanogenMod device files


I would like to compile my own pure AOSP (Android 5.0 or 5.1) ROM for my Samsung Galaxy S4 Mini (serranoltexx). I read something about this here but I have a few more questions. I searched for the nessesary files on GitHub and found this here:

These are CM files so can I use them for an AOSP build? And do I have to change some of these files or can I use them to build my ROM without any changes? And also these files are for CM 12 (5.0.2) and maybe I want to compile a 5.1 ROM. Can I also use them for the new version of Android?


Solution

  • The device and vendor files are not really part of the AOSP, so you should have no trouble making the vanilla AOSP while including these specific trees. If a vanilla AOSP doesn't include your device in the available options, however, none of the source will use these device and vendor products to poll and use hardware features included in the 3rd party trees, so the end effect will be no new functionality.

    Part of porting would be to make sure the specific projects in the AOSP use the specific hardware features when necessary, as there is nothing there to tell it otherwise. Though these may work to enable specific cameras, or graphics drivers, etc, you won't get any extra functionality, other than the fact the devices exist (which may be enough).

    To include these projects in the build, you'll have to edit one of the main make files in the build/target/product directory of the AOSP. Ideally, you'd have your product specified here, but if you do not, you can add it to a generic makefile therein. See this post for info that will set you on the right path.

    This is a bit of a hack, and ideally you would be better off editing the setup scripts to be able to 'lunch' for your device. The scope of this is well beyond this post, but is covered by Karim Yaghmour's excellent Embedded Android.

    Hope this at least sets you off in the right direction!