Skip to content

AlrightAndroid-Brokenlab/platform_manifest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

AlrightOS - Q

Getting started

To get started with Android/AlrightOS, you'll need to get familiar with git and repo.

Sync

# Create directory
mkdir AlrightOS

# Now cd to new directy we created.
cd AlrightOS

# Initialize local repository
repo init -u https://github.com/AlrightAndroid-BrokenLab/platform_manifest.git -b Q

# Sync
repo sync -c -d --force-sync --no-clone-bundle --no-tags -j`nproc`

# And on one line if you want.
mkdir AlrightOS && cd AlrightOS && repo init -u https://github.com/AlrightAndroid-BrokenLab/platform_manifest.git -b Q && 
repo sync -c -d --force-sync --no-clone-bundle --no-tags -j`nproc`

Build

# Set up environment
$ . build/envsetup.sh

# Choose a target
$ lunch alright_$device-userdebug

# Build the code
$ make bacon

Build Flags

# Maintainer string are on 
> packages/apps/Settings/res/values/rr_strings.xml

# Choose the build type
$ export GAPPS=true
to add in gapps.
$ export GAPPS_ARM32=true
if you have a 32bit device and want to include gapps.

$ export GAPPS=false
will include several foss apps including microg.

exporting nothing or
$ export GAPPS=""
will create a standard vanilla build.

Important for FOD devices

For devices with in-display fingerprint, you need to adapt your devices to FOD 1.1 for things to work properly. FOD1.1 + fod-ext value to call the HAL layer

Also set this flag in device tree device.mk 

TARGET_HAS_FOD := true

For Devices who don't wish to adapt to 1.1, and wish to stick to los 1.0 ext impl, please merge the following two commits in frameworks/base and packages/apps/Settings 

thanks to Pavan Parmeshwar


Base: 
https://github.com/ResurrectionRemix/android_frameworks_base/commit/b27490b437a1bc2a767af6d0dd8a30aae96036f0

Settings
https://github.com/ResurrectionRemix/Resurrection_packages_apps_Settings/commit/24551c50223cbccd8fd74f053463f99e38ee93d8


Please don't forget extension lib

For devices with hardware keys, you need to add the following

Add these lines to <device_tree_path/overlay/frameworks/base/core/res/res/values/config.xml>

    <!-- Hardware 'face' keys present on the device, stored as a bit field.
         This integer should equal the sum of the corresponding value for each
         of the following keys present:
          1 - Home
          2 - Back
          4 - Menu
          8 - Assistant (search)
          16 - App switch
          32 - Camera
       For example, a device with Back, Home and AppSwitch keys would set this
       config to 19. -->
    <integer name="config_deviceHardwareKeys">72</integer>


    <!-- Hardware 'face' keys present on the device, stored as a bit field.
         This integer should equal the sum of the corresponding value for each
         of the following keys present:
          1 - Home
          2 - Back
          4 - Menu
          8 - Assistant (search)
          16 - App switch
          32 - Camera
       For example, a device with Back, Home and AppSwitch keys would set this
       config to 19. -->
    <integer name="config_deviceHardwareWakeKeys">72</integer>

    <!-- Button brightness -->
    <bool name="config_button_brightness_support">true</bool>
    <integer name="config_button_brightness_default">128</integer>

Numbers vary on how many hardware keys you have on your device. See the config description for how to add those.

Devices with alertsliders / custom key handlers

 You need to update your keyhandler class and paths to 

<device_tree_path/overlay/frameworks/base/core/res/res/values/config.xml>

# Like this 
    <!-- Paths to the libraries that contain device specific key handlers -->
    <string-array name="config_deviceKeyHandlerLibs" translatable="false">
        <item>/system/priv-app/LineageParts/LineageParts.apk</item>
    </string-array>

    <!-- Names of the key handler classes -->
    <string-array name="config_deviceKeyHandlerClasses" translatable="false">
        <item>org.lineageos.lineageparts.gestures.KeyHandler</item>
    </string-array>

For face unlock

Set TARGET_FACE_UNLOCK_SUPPORTED := true to build face unlock packages. Do this if your device supports face unlock (which it mostly does).

Other configs and locations in device tree

Use these lines in <device_tree_path/overlay/frameworks/base/core/res/res/values/config.xml>

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

    <!-- Whether device has physical tri state switch -->
    <bool name="config_hasAlertSlider">true</bool>

    <!-- Whether device has warp charging support -->
    <bool name="config_hasWarpCharger">true</bool>

    <!-- Whether device has Dash charging support -->
    <bool name="config_hasDashCharger">true</bool>

    <!-- Whether device has VOOC charging support -->
    <bool name="config_hasVoocCharger">false</bool>

    <!-- Path to fast charging status file to detect whether an oem fast charger is active -->
    <string name="config_oemFastChargerStatusPath" translatable="false"></string>
    <!-- Expected value from fast charging status file  -->
    <string name="config_oemFastChargerStatusValue" translatable="false"></string>

    <!-- Whether device supports variable refresh rate -->
    <bool name="config_hasVariableRefreshRate">true</bool>
    <!-- Default setting for refresh rate
      0 = Auto
      1 = 60HZ
      2 = 90Hz -->
    <integer name="config_defaultVariableRefreshRateSetting">2</integer>

    <!-- Systeminfo for quick settings header -->
    <string name="config_sysCPUTemp">/sys/class/<path_to_option></string>
    <string name="config_sysBatteryTemp">/sys/class/power_supply/battery/temp</string>
    <string name="config_sysGPUFreq">/sys/kernel/gpu/gpu_clock</string>
    <string name="config_sysGPULoad">/sys/kernel/gpu/gpu_busy</string>
    <integer name="config_sysCPUTempMultiplier"><device_specific_mulitplyer></integer>
    <integer name="config_sysBatteryTempMultiplier"><device_specific_mulitplyer></integer>
    Replace <path_to_option> and <device_specific_mulitplyer> with own device specific paths

    <!-- If Smart charging supported by kernel and device sepolicy -->
    <bool name="config_smartChargingAvailable">true</bool>

    <!-- Enable face auth when swiping security view
      for popup cameras-->
    <bool name="config_faceAuthOnSecurityView">true</bool>

Use these lines in <device_tree_path/overlay/frameworks/base/packages/SystemUI/res/values/config.xml>

    <!-- Allow devices to enforce the H265 encoder for screen recordings -->
    <bool name="config_useNewScreenRecEncoder">true</bool>

    <!-- The CPU temperature sensor path, defaults to empty -->
    <string name="config_cpuTempSensor" translatable="false"></string>

    <!-- The CPU temperature divider, if needed -->
    <integer name="config_cpuTempDivider" translatable="false">1</integer>

    <!-- Burn in protection -->
    <bool name="config_statusBarBurnInProtection">false</bool>
    <integer name="config_shift_interval">60</integer>

    <!-- Allow devices override audio panel location to the left side -->
    <bool name="config_audioPanelOnLeftSide">false</bool>

    <!-- FPSInfoService FPS node file path -->
    <string name="config_fpsInfoSysNode" translatable="false"></string>

Use these lines in <device_tree_path/overlay/packages/apps/Settings/res/values/config.xml>

    <!-- Use only if devices have variable intensity support for haptics-->
    <bool name="config_vibration_supports_multiple_intensities">true</bool>

    <!-- If device supports battery health options -->
    <bool name="config_supportBatteryHealth">true</bool>
    <string name="config_batChargeCycle">path</string>
    <string name="config_batDesCap">path</string>
    <string name="config_batCurCap">path</string>

    Replace path with device specific path

Please maintain proper authorship for all commits for above overlays

For OTA

Once you are done with your build you can upload your ota.json file from out/product directory if you are a maintainer.

Translations

We don't have crowdin at the moment so you can merge a pull request in our repos which require translations. Please validate your XMLs first. We will review them and merge them as soon as possible.

That's all for now.

Happy building

Credits