Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Quick Adaptation guide

Stella Bloom edited this page Feb 10, 2024 · 1 revision

Oh my, Kasumi wasn't adapted to the ROM you want yet? No biggie, I got you covered!

I'll be going repo by repo and step by step here after you're done getting the base sources, so you won't feel weirded out!

Let's start!

Getting the sources

This one is the simplest one. Just download kasumi-mistress.xml from local_manifests repo into .repo/local_manifests directory and adapt the single <remove-project /> tag to the name base ROM's partner wallpaper stub has in source. If you already clone our GCGOP as part of your device sources, you WILL have to comment out this line and avoid using KASUMI_INCLUDE_GCGOP variable as it will try to forcefully include GCGOP from vendor/kasumi/gcgop instead of vendor/gcgop (that's the new path I'm using for GCGOP to keep consistency with the rest of the source).

vendor/extra (android_vendor_extra)

We'll have to import the versioning structure to Kasumi's versioning Makefile (version.mk) here.

To do so, follow the steps down below;

  1. Open both vendor/extra/version.mk and vendor/rom/config/version.mk or vendor/rom/config/common.mk, depending on which one contains the versioning variables (The former is more commonly used since Lineage switched to that on Android 12, but there are some ROMs that still use the latter as to not cause possible breakages in their code), in an editor of your choice.
  2. Check for and replace the existing variables in Kasumi's versioning Makefile with the ones from the ROM. See the end of these steps for examples.
  3. Try to lunch rom_device-userdebug and see if the versioning changes took effect. If they didn't, you might have to relax out how the variables and properties are set.

Examples for the versioning properties (In the case of Kasumi4Bootleggers);

  • PIXELBUILDS_VERSION -> BOOTLEGGERS_VERSION (Also make sure to copy and adapt the relevant variables, don't just rename the existing!)
  • PB_VERSION -> PRODUCT_VERSION_MAJOR (Just rename the variable, don't try to make up your own versioning - It will only cause confusion.)
  • PB_BUILD_TYPE -> BOOTLEGGERS_BUILD_TYPE (Just rename the variable, don't try to make up your own build type - It will only cause confusion.)

So that's all about Kasumi Extras, now to the overlays!

vendor/kasumi/overlay (android_vendor_kasumi_overlay)

This one is the hardest, both when initially developing and adapting it to other ROMs - I'm not the one to blame here, it's the ROMs that use fragmented and obscure code when putting their designs to work.

  • First, we'll have to adapt the name of the variable for displaying "Kasumi version" located in common/ directory. You can use the following command as a jumpstart;
sed -i 's/custom_firmware_version/rom_version_title/' common/packages/apps/Settings/res/values*/strings.xml

You don't have to rename the XML name here, all XMLs in the res directory that have the root directory as <resources /> will be parsed and compiled into XMLs like boolean.xml, string.xml, etc when compiling the APK.

  • Now go into banner/packages/apps/Settings and use something like the following command to rename the banner in both of the drawable folders;
rename pixelbuilds_banner bootleg_about drawable*/pixelbuilds_banner.png
  • Once that's done, we'll have to overlay the corresponding layout XML by renaming what we already have to the name used by the ROM;
rename pixelbuilds_banner bootleg_about layout/pixelbuilds_banner.xml

And that's it, now to the tones!

vendor/kasumi/tones (android_vendor_kasumi_tones)

Actually there's nothing you have to do directly in this repo, but there's a patch you have to apply on the ROM's vendor configuration in order to make default tones work.


And that's all about it, you should be all packed for the build process! Just build the ROM as you would without these changes and see the magic happen (If you did it right)!