Search code examples
androidandroid-sourcecyanogenmodromrepo

Building Vanilla AOSP Rom with CM repos?


I'd like to know if I can build a pure Vanilla 6.0 ROM with CyanogenMod repos for my device. Here they are:

Device

Kernel

Should I do some particular edits (excluded adding my device to "lunch")?

Thank you :)


Solution

  • A quick try could be changing $(call inherit-product, vendor/cm/config/common_full_phone.mk) to $(call inherit-product, build/target/product/full.mk).

    This will use the AOSP default PRODUCT_PACKAGES (e.g. UI stuff like SystemUI, Launcher2 or platform relevant stuff like libpowermanager) which are mandatory for a working device (and some more, e.g. phone functionality). You can also use another, just look into build/target/product directory.

    What can happen now is, that Cyanogen did some changes on these PRODUCT_PACKAGES which work no longer without some stuff on top defined in previously removed vendor/cm/config/common_full_phone.mk.

    That is why I would personally go another way:

    Just use your device specific product configuration (the device repo) and the vendor specific prebuilt libraries (generated by the setup-makefiles.sh script in your product configuration) and of course the kernel within the AOSP stack of your choice (e.g. vanilla 6.0).

    If you are lucky it will work out of the box, but often there are some work arounds needed to make the prebuilt vendor libraries working. If so, your have to study the commit messages of the device repository to get some hints what the guys have done, who ported the device.

    Regardless which way you are choosing, you probably need to add some configuration file, permission files and/or flags. For an orientation look into the Cyanogenmod vendor_cm repository.

    It could also be a good try to change to configuration in vendor/cm/config/*.mk to get a nearly vanilla Android.

    I think for such a proposition you need time and patience. I hope I could give you some good starting points.