[Epic 4G Android Development] Unjustified Dev:
Part 2 Adding Device Support

Making your device supported Now that you have you have the device tree

I will be demonstrating how to add your device to any ROM.

First step is after you synced to have a visit on their Github.

In this example I will be using Pac-man since I already added our device to their source. Please note that this is just a start and you would have to review another device if the phone is not supported for the Rom you want to build.

https://github.com/PAC-man/android_vendor_pac/commit/4f60080b14c6eb5cf0393645cc89e937610f755d

on here as you can see the files I added and modified to get a build going pay attention to them.

If your device isn't supported like on Paranoid Android review another device as an example.

https://github.com/ParanoidAndroid/android_vendor_pa/commit/6c49f44d75e2ad72a9633d8aa742f7901596c60c

You can see that they added a product file and other things. I will be reviewing a few examples but get a look at the files they modified and try to understand why.

Step 1 the first thing you should look for on a Rom you like is the VendorSetup.sh File like this one usually in vendor/Rom-name

You Would Have to append the epic to the end of the file or the build will not lunch.In this example I used RootBox

add_lunch_combo rootbox_d2att-userdebug
add_lunch_combo rootbox_d2tmo-userdebug
add_lunch_combo rootbox_d2vzw-userdebug
add_lunch_combo rootbox_grouper-userdebug
add_lunch_combo rootbox_i605-userdebug
add_lunch_combo rootbox_i9100-userdebug
add_lunch_combo rootbox_i9100g-userdebug
add_lunch_combo rootbox_i9300-userdebug
add_lunch_combo rootbox_l900-userdebug
add_lunch_combo rootbox_maguro-userdebug
add_lunch_combo rootbox_mako-userdebug
add_lunch_combo rootbox_n7000-userdebug
add_lunch_combo rootbox_n7100-userdebug
add_lunch_combo rootbox_quincyatt-userdebug
add_lunch_combo rootbox_toro-userdebug
add_lunch_combo rootbox_t0lte-userdebug
[B]add_lunch_combo rootbox_epicmtd-userdebug[/B]

Next step would be adding Your Product specs please Note this is not found in all ROMs but most of them.

look for vendor/RomName/Products and find AndroidProducts.mk append the epic to the end. In the first example it does not change format. In second one it will. I will include both formats.

1st one usually not used as you can see I added the epic to AndroidProducts so that it can find my build product spec.

PRODUCT_MAKEFILES := $(LOCAL_DIR)/d2att.mk \
$(LOCAL_DIR)/d2tmo.mk \
$(LOCAL_DIR)/d2vzw.mk \
[B]$(LOCAL_DIR)/epicmtd.mk \[/B]
$(LOCAL_DIR)/fascinatemtd.mk
$(LOCAL_DIR)/grouper.mk \
$(LOCAL_DIR)/i605.mk \
$(LOCAL_DIR)/i9100.mk \
$(LOCAL_DIR)/i9100g.mk \
$(LOCAL_DIR)/i9300.mk \
$(LOCAL_DIR)/l900.mk \
$(LOCAL_DIR)/maguro.mk \
$(LOCAL_DIR)/mako.mk \
$(LOCAL_DIR)/n7000.mk \
$(LOCAL_DIR)/n7100.mk \
$(LOCAL_DIR)/quincyatt.mk \
$(LOCAL_DIR)/toro.mk \
$(LOCAL_DIR)/t0lte.mk

2nd one more commonly used pa= paranoid android that part will change in this format depending on the ROM

ifeq (pa_grouper,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_grouper.mk
endif
ifeq (pa_i9100,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_i9100.mk
endif
ifeq (pa_i9300,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_i9300.mk
endif
ifeq (pa_i9305,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_i9305.mk
endif
ifeq (pa_maguro,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_maguro.mk
endif
ifeq (pa_mako,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_mako.mk
endif
ifeq (pa_manta,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_manta.mk
endif
ifeq (pa_n7100,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_n7100.mk
endif
ifeq (pa_tf700t,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_tf700t.mk
endif
ifeq (pa_tilapia,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_tilapia.mk
endif
ifeq (pa_toro,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_toro.mk
endif
ifeq (pa_toroplus,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_toroplus.mk
endif
ifeq (pa_bravo,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_bravo.mk
endif
ifeq (pa_crespo,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_crespo.mk
endif
ifeq (pa_endeavoru,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_endeavoru.mk
endif
[B]ifeq (pa_epicmtd,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_epicmtd.mk
endif[/B]

Next step will be creating a product spec refer to other files for guidance please note the files you tell it to use must exist

The build Fingerprint should always be the same as the one from device/sasmung/epicmtd/cm.mk. Please note this is only for RootBox.

This file is called on by AndroidProducts.mk.

For example this file would be named epicmtd.mk or it could be named pa_epicmtd.mk depending on the Rom.

# Inherit AOSP device configuration for epicmtd.
$(call inherit-product, device/samsung/epicmtd/full_epicmtd.mk)

# Inherit CDMA common stuff.
$(call inherit-product, vendor/rootbox/configs/cdma.mk)

# Inherit RootBox goods.
$(call inherit-product, vendor/rootbox/configs/common.mk)

# Epic 4G Overlays
PRODUCT_PACKAGE_OVERLAYS += vendor/rootbox/overlay/epicmtd

# PA OVERLAY_TARGET
OVERLAY_TARGET := pa_hdpi

# Setup device specific product configuration.
PRODUCT_NAME := rootbox_epicmtd
PRODUCT_BRAND := samsung
PRODUCT_DEVICE := epicmtd
PRODUCT_MODEL := SPH-D700
PRODUCT_MANUFACTURER := samsung

#Set build fingerprint / ID / Product Name ect.
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=SPH-D700 TARGET_DEVICE=SPH-D700 BUILD_FINGERPRINT=sprint/SPH-D700/SPH-D700:2.3.5/GINGERBREAD/EI22:user/release-keys PRIVATE_BUILD_DESC="SPH-D700-user 2.3.5 GINGERBREAD EI22 release-keys"

# Copy bootanimation.zip
PRODUCT_COPY_FILES += \
vendor/rootbox/prebuilt/hdpi/bootanimation.zip:system/media/bootanimation.zip

I will Finish This Up Later and Polish it Up