Adding Support for a device
To add support for your device, the first thing you need to do is to hunt down your device tree. If you are not sure where your device tree is located, google it or ask in your device's subforum. Now, it is time to add the files required to build.
From the root of directory where you have downloaded the pac source (~/android/pac), go to the vendor/pac directory
. This is where we will be making the changes necessary to build for your device. Here are the files that need to be modified/added. Obviously, substitute your devices codename for CODENAME.
This file grabs your device and kernel tree. Look at the dependencies file of a device that is similar to yours to figure out what you need to place in here. A list of all the devices we support and their respective codenames can be found here
. Again, if you are unsure about what to place here, you may want to ask for help in your devices subforum. Whenever possible, try to use the CM device tree. For the vendor files, keep the account name as "Pinky-Inky-and-Clyde" but change the repository to the appropriate OEM (check here
for repos). Do not worry if the vendor files for your device are not in that repository. We will be adding them later.
Here is a sample CODENAME.dependencies file for a Samsung device (note that the account names are case sensitive):
Once you have done this, go to the root of your pac source (~/android/pac for this guide), and run
This will attempt to create the file .repo/local_manifests/roomservice.xml and then sync up the sources. If you have to make changes to your dependencies, please remove the roomservice.xml file and re-run the script again to ensure that no incorrect repositories are left lingering.
Go to the vendor files directory (~/android/pac/vendor/YOUR_OEM), and search for the vendor files of your device. If they are not there, you will have to search for them online and copy them into the folder.
Alternatively, if your device has an extract-files.sh script, in the device tree (located in device/OEM/CODENAME), you can hook up your device via usb and run that command to grab the vendor files directly from your device. In this case, connect your device and run:
Again, look at the same file for a device that is similar to yours and make the appropriate changes for your device.
Here is a sample pac_CODENAME.mk file for a hdpi device:
# Check for target product
# OVERLAY_TARGET adds overlay asset source
OVERLAY_TARGET := pa_hdpi
# PAC device overlay
PRODUCT_PACKAGE_OVERLAYS += vendor/pac/overlay/pac/hdpi_480x800
# PAC boot logo
PRODUCT_COPY_FILES += \
# Copy bootanimation
PRODUCT_COPY_FILES += \
# include PAC common configuration
# Inherit CM device configuration
$(call inherit-product, device/samsung/CODENAME/cm.mk)
PRODUCT_NAME := pac_CODENAME
Note: for the PAC device overlay, look inside vendor/pac/overlay/pac for the available overlays. Likewise, for the bootanimation and boot logo, look in their respective directories for the available sizes.
Add a line that looks something like this in the appropriate area of this file (under the appropriate OEM, and in alphabetical order, please).
--- The below files are not necessary for successful compilation, but are required if you submit your device for official PAC support. ---
For these files, follow the format of the other devices.