To get started with the building process, you'll need to get familiar with Git and Repo.
Install JDK 8:
sudo apt install openjdk-8-jdk
Tested on Ubuntu 16.04,16.10,17.04,18.04,18.10,19.04,21.04:
sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
Tested on Ubuntu 20.04
sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libncurses5 libsdl1.2-dev libssl-dev libwxgtk3.0-gtk3-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
- Making required directories
- Obtaining the repo binary
- Adding repo binary to your path
- Giving the repo binary proper permissions
- Initializing an empty repo
- Syncing the repo
Alright, so now we’re getting there. I have outlined the basics of what we’re about to do and broke them down as I know them. This is all pretty much going to be copy/paste so it’ll be fairly difficult to screw this up :)
mkdir ~/bin
PATH=~/bin:$PATH
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
To initialize your local repository, use a command like this:
repo init -u https://github.com/CherishOS/android_manifest.git -b uqpr2
repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags
From root directory of Project, perform following commands in terminal
. build/envsetup.sh
brunch device-codename
<!-- Whether the device supports Smart Pixels -->
<bool name="config_supportSmartPixels">true</bool>
# FOD animations
EXTRA_UDFPS_ANIMATIONS := true
<!-- Whether to show min/max refresh rate in display settings -->
<bool name="config_show_refresh_rate_controls">true</bool>
<bool name="config_supports_dynamic_refresh_rate_controls">true</bool>
<!-- Night Light FOD -->
<bool name="disable_fod_night_light">true</bool>
<!-- Pocket Lock -->
<bool name="config_pocketModeSupported">true</bool>
<!-- Battery health -->
<bool name="config_supportBatteryHealth">true</bool>
<string name="config_batteryCalculatedCapacity">/sys/class/power_supply/bms/charge_full</string>
<string name="config_batteryDesignCapacity">/sys/class/power_supply/bms/charge_full_design</string>
<string name="config_batteryChargeCycles">/sys/class/power_supply/bms/cycle_count</string>
# allow system apps to read battery status
r_dir_file(system_app, sysfs_battery_supply)
You can apply for officialy maintaining the ROM for your device.