Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

karate #23

Open
wants to merge 23 commits into
base: oreo
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a69a4e4
vendor_aokp - Initial Oreo bring-up
STELIX Nov 9, 2017
5c9e0c9
vendor: Kill sepolicy
luca020400 Aug 18, 2017
1d9deff
vendor - Complete the rebrand
luca020400 Aug 17, 2017
949f662
vendor: Move to PRODUCT_DEFAULT_PROPERTY_OVERRIDES
luca020400 Aug 17, 2017
013a0bd
vendor: Kill telephony-ext
luca020400 Aug 18, 2017
68b18eb
libhealthd: Add android-base and minui include paths
AdrianDC Jul 24, 2017
9833cbd
Charger: Remove old alarm interface and update timerfd interface
luca020400 Sep 8, 2017
87bd04f
overlay: Remove default APN overlays
AdrianDC Aug 18, 2017
eabb3a2
vendor/aokp/lineage: sdk rebrand: step 1: update paths
sam3000 Sep 19, 2017
bdce8ce
vendor/aokp/lineage: sdk rebrand: step 2: update file contents
sam3000 Sep 19, 2017
7449bca
aokp - Refactor Lineage init rc file
sam3000 Sep 21, 2017
39fc5ed
Whitelist some of our own broadcast actions
bgcngm Oct 16, 2017
f14f4f1
Aokp: Remove duplicated endif
villarleg Nov 12, 2017
8980bf6
Revert "build: Kill colors" [2/2]
STELIX Nov 13, 2017
7b60547
Build - AOKPize the build [2/2]
STELIX Nov 13, 2017
d49227e
vendor/aokp - Build: fix brunch (aokp --> rainbowfarts)
championswimmer Feb 9, 2016
6066018
vendor/aokp - fix some reference
STELIX Nov 14, 2017
d257f31
vendor/aokp - remove unicorndust and add some device
STELIX Nov 15, 2017
5b2b880
vendor/aokp - update overlays
STELIX Nov 15, 2017
8697094
vendor/aokp - some more LOS/AOKPization
STELIX Nov 16, 2017
d4721dd
vendor/aokp - update branch
STELIX Nov 16, 2017
101af45
vendor/aokp - cleanup filenames [2/2]
STELIX Nov 20, 2017
8e63e2b
karate
Bala03 Nov 25, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Initializing Repository

Initiate core trees without any device/kernel/vendor:

$ repo init -u https://github.com/AOKP/platform_manifest.git -b nougat
$ repo init -u https://github.com/AOKP/platform_manifest.git -b oreo

Sync the repository:

Expand All @@ -32,7 +32,7 @@ After the sync is finished, please read the [instructions from the Android site]
You can also build for specific devices (eg. hammerhead) like this:

. build/envsetup.sh
lunch aokp_hammerhead-userdebug
lunch aokp_cheeseburger-userdebug
mka rainbowfarts

Remember to `make clobber && make clean` every now and then!
38 changes: 38 additions & 0 deletions addonsu/51-addonsu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/sbin/sh

. /tmp/backuptool.functions

list_files() {
cat <<EOF
bin/su
etc/init/superuser.rc
xbin/su
EOF
}

case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/"$FILE"
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
restore_file $S/"$FILE" "$R"
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
esac
13 changes: 13 additions & 0 deletions addonsu/mount-system.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/sbin/sh

if mount /system; then
exit 0
fi

# Try to get the block from /etc/recovery.fstab
block=`cat /etc/recovery.fstab | cut -d '#' -f 1 | grep /system | grep -o '/dev/[^ ]*' | head -1`
if [ -n "$block" ] && mount $block /system; then
exit 0
fi

exit 1
23 changes: 23 additions & 0 deletions addonsu/updater-script-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ui_print("Installing su addon...");
ifelse(is_mounted("/system"), unmount("/system"));
package_extract_file("mount-system.sh", "/tmp/mount-system.sh");
set_metadata("/tmp/mount-system.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/mount-system.sh") == 0 || abort("Could not mount /system");

if getprop("ro.build.system_root_image") != "true" then
package_extract_dir("system", "/system");
set_metadata("/system/addon.d/51-addonsu.sh", "uid", 0, "gid", 0, "mode", 0755, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/init/superuser.rc", "uid", 0, "gid", 0, "mode", 0644, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/su", "uid", 0, "gid", 2000, "mode", 0755, "selabel", "u:object_r:su_exec:s0");
symlink("/system/xbin/su", "/system/bin/su");
else
package_extract_dir("system", "/system/system");
set_metadata("/system/system/addon.d/51-addonsu.sh", "uid", 0, "gid", 0, "mode", 0755, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/system/etc/init/superuser.rc", "uid", 0, "gid", 0, "mode", 0644, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/system/xbin/su", "uid", 0, "gid", 2000, "mode", 0755, "selabel", "u:object_r:su_exec:s0");
symlink("/system/xbin/su", "/system/system/bin/su");
endif;

unmount("/system");
ui_print("Done");
set_progress(1.000000);
21 changes: 21 additions & 0 deletions addonsu/updater-script-remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ui_print("Removing su addon...");
ifelse(is_mounted("/system"), unmount("/system"));
package_extract_file("mount-system.sh", "/tmp/mount-system.sh");
set_metadata("/tmp/mount-system.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/mount-system.sh") == 0 || abort("Could not mount /system");

if getprop("ro.build.system_root_image") != "true" then
delete("/system/addon.d/51-addonsu.sh");
delete("/system/bin/su");
delete("/system/etc/init/superuser.rc");
delete("/system/xbin/su");
else
delete("/system/system/addon.d/51-addonsu.sh");
delete("/system/system/bin/su");
delete("/system/system/etc/init/superuser.rc");
delete("/system/system/xbin/su");
endif;

unmount("/system");
ui_print("Done");
set_progress(1.000000);
61 changes: 2 additions & 59 deletions aokp.devices
Original file line number Diff line number Diff line change
@@ -1,62 +1,5 @@
addison
amami
armani
angler
bacon
bullhead
cancro
condor
ether
d850
d851
d852
d855
f400
falcon
find7
find7s
flo
h815
hammerhead
hammerheadcaf
honami
i9100
i9300
ido
j5ltexx
j5nltexx
jagnm
klte
kltedv
kltespr
klteusc
lettuce
ls990
cheeseburger
m8
mako
manta
merlin
mido
oneplus2
oneplus3
onyx
osprey
otus
peregrine
pme
quark
s2
shamu
sirius
sprout4
sprout8
surnia
thea
titan
togari
tomato
vegetalte
vs985
x2
Z00A
Z008
karate
4 changes: 2 additions & 2 deletions build/core/apicheck_msg_current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ You have tried to change the API from what has been previously approved.

STOP.
Read this:
https://github.com/CyanogenMod/cm_platform_sdk/wiki/Creating-an-API-for-the-SDK#updating--verifying-the-api
https://github.com/LineageOS/android_lineage-sdk/wiki/Creating-an-API-for-the-SDK#updating--verifying-the-api

To make these errors go away, you have two choices:
1) You can add "@hide" javadoc comments to the methods, etc. listed in the
errors above.

2) You can update current.txt (locally) by executing the following command:
make update-cm-api
make update-lineage-api

^^^^^^^^^^^^^^^^^^
CONGRATS YOU EARNED A STINKEYE FROM CID!
Expand Down
2 changes: 1 addition & 1 deletion build/core/clear_vars.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
#CM-specific variable clears
#AOKP-specific variable clears
#
LOCAL_IGNORE_SUBDIR :=

Expand Down
12 changes: 6 additions & 6 deletions build/core/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

CM_SRC_API_DIR := $(TOPDIR)prebuilts/cmsdk/api
INTERNAL_CM_PLATFORM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/cm_public_api.txt
INTERNAL_CM_PLATFORM_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/cm_removed.txt
FRAMEWORK_CM_PLATFORM_API_FILE := $(TOPDIR)vendor/cmsdk/api/cm_current.txt
FRAMEWORK_CM_PLATFORM_REMOVED_API_FILE := $(TOPDIR)vendor/cmsdk/api/cm_removed.txt
FRAMEWORK_CM_API_NEEDS_UPDATE_TEXT := $(TOPDIR)vendor/aokp/build/core/apicheck_msg_current.txt
LINEAGE_SRC_API_DIR := $(TOPDIR)prebuilts/lineage-sdk/api
INTERNAL_LINEAGE_PLATFORM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/lineage_public_api.txt
INTERNAL_LINEAGE_PLATFORM_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/lineage_removed.txt
FRAMEWORK_LINEAGE_PLATFORM_API_FILE := $(TOPDIR)lineage-sdk/api/lineage_current.txt
FRAMEWORK_LINEAGE_PLATFORM_REMOVED_API_FILE := $(TOPDIR)lineage-sdk/api/lineage_removed.txt
FRAMEWORK_LINEAGE_API_NEEDS_UPDATE_TEXT := $(TOPDIR)vendor/aokp/build/core/apicheck_msg_current.txt

BUILD_MAVEN_PREBUILT := $(TOP)/vendor/aokp/build/core/maven_artifact.mk
PUBLISH_MAVEN_PREBUILT := $(TOP)/vendor/aokp/build/core/maven_artifact_publish.mk
Expand Down
2 changes: 1 addition & 1 deletion build/core/definitions.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# CM-specific macros
# AOKP-specific macros
#
define uniq
$(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
Expand Down
2 changes: 2 additions & 0 deletions build/core/mtk_target.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Bring in Mediatek helper macros
include vendor/aokp/build/core/mtk_utils.mk
5 changes: 5 additions & 0 deletions build/core/mtk_utils.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Board platforms lists to be used for
# TARGET_BOARD_PLATFORM specific featurization
MTK_BOARD_PLATFORMS := mt6592
MTK_BOARD_PLATFORMS += mt6582
MTK_BOARD_PLATFORMS += mt6572
40 changes: 40 additions & 0 deletions build/core/pathmap.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# Returns the path to the requested module's include directory,
# relative to the root of the source tree. Does not handle external
# modules.
#
# $(1): a list of modules (or other named entities) to find the includes for
#
define include-path-for
$(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_INCL))))
endef

# Enter project path into pathmap
#
# $(1): name
# $(2): path
#
define project-set-path
$(eval pathmap_PROJ += $(1):$(2))
endef

# Enter variant project path into pathmap
#
# $(1): name
# $(2): variable to check
# $(3): base path
#
define project-set-path-variant
$(call project-set-path,$(1),$(strip \
$(if $($(2)), \
$(3)-$($(2)), \
$(3))))
endef

# Returns the path to the requested module's include directory,
# relative to the root of the source tree.
#
# $(1): a list of modules (or other named entities) to find the projects for
define project-path-for
$(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_PROJ))))
endef
111 changes: 111 additions & 0 deletions build/core/qcom_target.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Target-specific configuration

# Bring in Qualcomm helper macros
include vendor/aokp/build/core/qcom_utils.mk

# Populate the qcom hardware variants in the project pathmap.
define ril-set-path-variant
$(call project-set-path-variant,ril,TARGET_RIL_VARIANT,hardware/$(1))
endef
define wlan-set-path-variant
$(call project-set-path-variant,wlan,TARGET_WLAN_VARIANT,hardware/qcom/$(1))
endef
define bt-vendor-set-path-variant
$(call project-set-path-variant,bt-vendor,TARGET_BT_VENDOR_VARIANT,hardware/qcom/$(1))
endef

# Set device-specific HALs into project pathmap
define set-device-specific-path
$(if $(USE_DEVICE_SPECIFIC_$(1)), \
$(if $(DEVICE_SPECIFIC_$(1)_PATH), \
$(eval path := $(DEVICE_SPECIFIC_$(1)_PATH)), \
$(eval path := $(TARGET_DEVICE_DIR)/$(2))), \
$(eval path := $(3))) \
$(call project-set-path,qcom-$(2),$(strip $(path)))
endef

ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
B_FAMILY := msm8226 msm8610 msm8974
B64_FAMILY := msm8992 msm8994
BR_FAMILY := msm8909 msm8916
UM_FAMILY := msm8937 msm8953

BOARD_USES_ADRENO := true

TARGET_USES_QCOM_BSP := true

# Tell HALs that we're compiling an AOSP build with an in-line kernel
TARGET_COMPILE_WITH_MSM_KERNEL := true

ifneq ($(filter msm7x27a msm7x30 msm8660 msm8960,$(TARGET_BOARD_PLATFORM)),)
# Enable legacy audio functions
ifeq ($(BOARD_USES_LEGACY_ALSA_AUDIO),true)
USE_CUSTOM_AUDIO_POLICY := 1
endif
endif

# Allow building audio encoders
TARGET_USES_QCOM_MM_AUDIO := true

# Enable color metadata for modern UM targets
ifneq ($(filter msm8996 msm8998 sdm660,$(TARGET_BOARD_PLATFORM)),)
TARGET_USES_COLOR_METADATA := true
endif

# List of targets that use master side content protection
MASTER_SIDE_CP_TARGET_LIST := msm8996 msm8998 sdm660

ifeq ($(call is-board-platform-in-list, $(B_FAMILY)),true)
MSM_VIDC_TARGET_LIST := $(B_FAMILY)
QCOM_HARDWARE_VARIANT := msm8974
else
ifeq ($(call is-board-platform-in-list, $(B64_FAMILY)),true)
MSM_VIDC_TARGET_LIST := $(B64_FAMILY)
QCOM_HARDWARE_VARIANT := msm8994
else
ifeq ($(call is-board-platform-in-list, $(BR_FAMILY)),true)
MSM_VIDC_TARGET_LIST := $(BR_FAMILY)
QCOM_HARDWARE_VARIANT := msm8916
else
ifeq ($(call is-board-platform-in-list, $(UM_FAMILY)),true)
MSM_VIDC_TARGET_LIST := $(UM_FAMILY)
QCOM_HARDWARE_VARIANT := msm8937
else
MSM_VIDC_TARGET_LIST := $(TARGET_BOARD_PLATFORM)
QCOM_HARDWARE_VARIANT := $(TARGET_BOARD_PLATFORM)
endif
endif
endif
endif

$(call set-device-specific-path,AUDIO,audio,hardware/qcom/audio-caf/$(QCOM_HARDWARE_VARIANT))
$(call set-device-specific-path,DISPLAY,display,hardware/qcom/display-caf/$(QCOM_HARDWARE_VARIANT))
$(call set-device-specific-path,MEDIA,media,hardware/qcom/media-caf/$(QCOM_HARDWARE_VARIANT))

$(call set-device-specific-path,CAMERA,camera,hardware/qcom/camera)
$(call set-device-specific-path,GPS,gps,hardware/qcom/gps)
$(call set-device-specific-path,SENSORS,sensors,hardware/qcom/sensors)
$(call set-device-specific-path,LOC_API,loc-api,vendor/qcom/opensource/location)
$(call set-device-specific-path,DATASERVICES,dataservices,vendor/qcom/opensource/dataservices)

$(call ril-set-path-variant,ril)
$(call wlan-set-path-variant,wlan-caf)
$(call bt-vendor-set-path-variant,bt-caf)

else

$(call project-set-path,qcom-audio,hardware/qcom/audio/default)
$(call project-set-path,qcom-display,hardware/qcom/display/$(TARGET_BOARD_PLATFORM))
$(call project-set-path,qcom-media,hardware/qcom/media/$(TARGET_BOARD_PLATFORM))

$(call project-set-path,qcom-camera,hardware/qcom/camera)
$(call project-set-path,qcom-gps,hardware/qcom/gps)
$(call project-set-path,qcom-sensors,hardware/qcom/sensors)
$(call project-set-path,qcom-loc-api,vendor/qcom/opensource/location)
$(call project-set-path,qcom-dataservices,$(TARGET_DEVICE_DIR)/dataservices)

$(call ril-set-path-variant,ril)
$(call wlan-set-path-variant,wlan)
$(call bt-vendor-set-path-variant,bt)

endif
Loading