I've been trying to build AOSP ROM for OnePlus Two.
I've made a working-dir
folder in my ubuntu's home
. Installed all required tools and scripts like, java, python, make, git and some lib files.
I've downloaded compressed sources(No .repo
folder included), so I've only aosp5.1.0
folder with me. I've downloaded them form here. (Heavily Compressed Android Sources). Extracted them to working-dir
using terminal.
I've cloned device tree
from this repository
https://github.com/krishna422/android_device_oneplus_oneplus2 into working-dir/device/oneplus/oneplus2
kernel source
from this repositoryhttps://github.com/krishna422/android_kernel_oneplus_msm8994 into working-dir/kernel/oneplus/oneplus2
vendor tree
from this repository https://github.com/krishna422/proprietary_vendor_oneplus into working-dir/vendor/oneplus/oneplus2
So the files in working-dir
are,
aosp5.1.0, device, kernel, vendor
files in aosp5.1.0
are
Files in aosp5.1.0 Screenshot
I've copied
working-dir/device/oneplus/ folder into aosp5.1.0/device
then, I opened cmd, navigated to aosp5.1.0
folder typed source build/envsetup.sh
I got
krishna@krishna:~/working-dir/aosp5.1.0$ source build/envsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including evice/oneplus/android_device_oneplus_oneplus2/vendorsetup.sh
including sdk/bash_completion/adb.bash
then I typed lunch
I got,
krishna@krishna:~/working-dir/aosp5.1.0$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_mips-eng
4. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
7. m_e_arm-userdebug
8. mini_emulator_arm64-userdebug
9. mini_emulator_x86_64-userdebug
10. mini_emulator_x86-userdebug
11. mini_emulator_mips-userdebug
12. cm_oneplus2-user
13. cm_oneplus2-userdebug
14. cm_oneplus2-eng
Which would you like?
when I selected 12,13,14
, I get the following error, others are working well.
build/core/product_config.mk:222: *** Can not locate config makefile for product "cm_oneplus2". Stop.
** Don't have a product spec for: 'cm_oneplus2'
** Do you have the right repo manifest?
krishna@krishna:~/working-dir/aosp5.1.0$
Please help
You need to have a file called AndroidProducts.mk
in your device tree. Put something like the following in it.
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/oneplus2.mk
It should match what you have in the vendorsetup.sh
and the oneplus2.mk
should exist.
See the example in the LineageOS repo
https://github.com/LineageOS/android_device_oneplus_oneplus2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With