To get started with Android, you'll need to get familiar with Git and Repo.
To initialize your local repository:
repo init -u git://github.com/PhilSmith31/platform_manifest.git -b aosp-7.1.2_r36
or if you use SSH:
repo init -u [email protected]:PhilSmith31/platform_manifest.git -b aosp-7.1.2_r36
Then to sync up:
repo sync -c --no-tags --no-clone-bundle
Afterwards clone the dependencies device, kernel, vendor, device-settings (always see .dependencies file for that):
git clone https://github.com/PhilSmith31/platform_device_xiaomi_gemini.git -b aosp-7.1.2_r36 device/xiaomi/gemini
git clone https://github.com/PhilSmith31/platform_kernel_xiaomi_msm8996.git -b bb kernel/xiaomi/msm8996
git clone <url-to-proprietary-vendor> -b <branch-name> vendor/xiaomi
git clone https://github.com/PhilSmith31/platform_packages_resources_devicesettings.git -b aosp-7.1.2_r36 packages/resources/devicesettings
Sync again and allow overwriting local changes (be sure that this is okay at the moment):
repo sync -c --no-tags --no-clone-bundle --force-sync
Set up build enviroment
. build/envsetup.sh
Select device (gemini)
lunch 2
Compile the rom
mka jdc