Skip to content

Latest commit

 

History

History
153 lines (122 loc) · 4.68 KB

README.md

File metadata and controls

153 lines (122 loc) · 4.68 KB

Cherish

CherishOS | Built with 💖

Credits:

And other ROMs

Getting Started:

To get started with the building process, you'll need to get familiar with Git and Repo.

Install the build packages:

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

Getting the source

  • 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 :)

Make directory for the repo binary
     mkdir ~/bin
Add directory for the repo binary to its path
     PATH=~/bin:$PATH
Downloading repo binary and placing it in the proper directory
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Giving the repo binary the proper permissions
    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

Then to sync up:

    repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags

Compilation of Cherish OS:

From root directory of Project, perform following commands in terminal

. build/envsetup.sh
 brunch device-codename

Important for Smart Pixel AOD

Add it in overlay/frameworks/base/core/res/res/values/config.xml

<!-- Whether the device supports Smart Pixels -->
<bool name="config_supportSmartPixels">true</bool>

Important for some devices

Also set this flag in device tree cherish_device.mk

    # FOD animations
    EXTRA_UDFPS_ANIMATIONS := true

Add it in overlay/frameworks/base/core/res/res/values/config.xml

<!-- 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

<!-- Night Light FOD -->
    <bool name="disable_fod_night_light">true</bool>

Pocket Lock

<!-- Pocket Lock -->
    <bool name="config_pocketModeSupported">true</bool>

Battery Health

Add overlay/packages/apps/Settings/res/values/config.xml

<!-- 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>

Add sepolicy/vendor/system_app.te

# allow system apps to read battery status
r_dir_file(system_app, sysfs_battery_supply)

Apply for Official Maintainership

You can apply for officialy maintaining the ROM for your device.

https://forms.gle/BWg1mPxHNv2W8eK79

XDA Template

Template