diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..45986a7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,37 @@ +sudo: required +services: + - docker +before_install: + - docker pull surendrajat/twrp-builder:latest +before_script: + - cd $HOME && mkdir twrp + - wget -q https://github.com/TwrpBuilder/twrp-sources/releases/download/omni_twrp-5.1.1-cleaned/omni_twrp-5.1.1_cleaned.tar.xz + -O $HOME/twrp.tar.xz + - tar -xJf twrp.tar.xz --directory $HOME/twrp/ && rm twrp.tar.xz +script: + - cd $HOME/twrp/ && git clone https://github.com/TwrpBuilder/android_device_wiko_k600.git device/wiko/k600 + - git clone https://github.com/TwrpBuilder/android_device_generic_twrpbuilder.git device/generic/twrpbuilder + - git clone https://github.com/omnirom/android_bootable_recovery.git bootable/recovery --depth=1 + - | + docker run --rm -i -v "$(pwd):/root/twrp/:rw,z" surendrajat/twrp-builder bash << EOF + cd /root/twrp/ + source build/envsetup.sh && lunch omni_k600-eng && make -j16 recoveryimage + exit + EOF +after_success: + - export version=$(cat bootable/recovery/variables.h | grep "define TW_MAIN_VERSION_STR" | cut -d '"' -f2) + - cp $HOME/twrp/out/target/product/k600/recovery.img $HOME/twrp/TWRP-$version-k600-$(date +"%Y%m%d").img + +deploy: + skip_cleanup: true + provider: releases + api_key: "$GIT_OAUTH_TOKEN_TB" + file_glob: true + file: $HOME/twrp/*.img + on: + tags: false + repo: TwrpBuilder/android_device_wiko_k600 + branch: master +branches: + except: + - /^(?i:untagged)-.*$/ diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..b1829d1 --- /dev/null +++ b/Android.mk @@ -0,0 +1,23 @@ +# +# Copyright (C) 2018 The TwrpBuilder Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ifneq ($(filter k600,$(TARGET_DEVICE)),) + +LOCAL_PATH := device/wiko/k600/ + +include $(call all-makefiles-under,$(LOCAL_PATH)) + +endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..1d8b493 --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2018 The TwrpBuilder Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH := device/wiko/k600/ + +PRODUCT_MAKEFILES := $(LOCAL_PATH)/omni_k600.mk diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..c1a73b7 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,38 @@ +# +# Copyright (C) 2018 The TwrpBuilder Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH := device/wiko/k600 + +TARGET_BOARD_PLATFORM := mt6739 +TARGET_BOOTLOADER_BOARD_NAME := k600 + +# Recovery +TARGET_USERIMAGES_USE_EXT4 := true +BOARD_RECOVERYIMAGE_PARTITION_SIZE := 14858848 +BOARD_FLASH_BLOCK_SIZE := 0 +BOARD_HAS_NO_REAL_SDCARD := true +BOARD_HAS_NO_SELECT_BUTTON := true +BOARD_SUPPRESS_SECURE_ERASE := true +BOARD_HAS_NO_MISC_PARTITION := true +BOARD_RECOVERY_SWIPE := true +BOARD_USES_MMCUTILS := true +BOARD_SUPPRESS_EMMC_WIPE := true +TW_EXCLUDE_SUPERSU := true +TW_INPUT_BLACKLIST := "hbtp_vm" +TW_INCLUDE_CRYPTO := true +include $(LOCAL_PATH)/kernel.mk +include device/generic/twrpbuilder/BoardConfig32.mk + diff --git a/kernel b/kernel new file mode 100644 index 0000000..ba05a1c Binary files /dev/null and b/kernel differ diff --git a/kernel.mk b/kernel.mk new file mode 100644 index 0000000..980936a --- /dev/null +++ b/kernel.mk @@ -0,0 +1,22 @@ +# +# Copyright (C) 2018 The TwrpBuilder Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Kernel +TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel +BOARD_KERNEL_CMDLINE := bootopt=64S3,32S1,32S1 buildvariant=user androidboot.selinux=permissive +BOARD_KERNEL_BASE := 0x40000000 +BOARD_KERNEL_PAGESIZE := 2048 +BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x05000000 --tags_offset 0x04000000 diff --git a/omni_k600.mk b/omni_k600.mk new file mode 100644 index 0000000..bdf00c1 --- /dev/null +++ b/omni_k600.mk @@ -0,0 +1,22 @@ +# +# Copyright (C) 2018 The TwrpBuilder Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk) +PRODUCT_DEVICE := k600 +PRODUCT_NAME := omni_k600 +PRODUCT_BRAND := wiko +PRODUCT_MODEL := W_K600 +PRODUCT_MANUFACTURER := wiko diff --git a/recovery.fstab b/recovery.fstab new file mode 100644 index 0000000..3979620 --- /dev/null +++ b/recovery.fstab @@ -0,0 +1,24 @@ +# +# Copyright (C) 2018 The TwrpBuilder Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +/boot emmc /dev/block/platform/bootdevice/by-name/boot +/data ext4 /dev/block/platform/bootdevice/by-name/userdata flags=encryptable=/dev/block/platform/bootdevice/by-name/metadata +/system ext4 /dev/block/platform/bootdevice/by-name/system +/cache ext4 /dev/block/platform/bootdevice/by-name/cache +/misc emmc /dev/block/platform/bootdevice/by-name/para +/recovery emmc /dev/block/platform/bootdevice/by-name/recovery +/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable + diff --git a/stock/recovery.fstab b/stock/recovery.fstab new file mode 100644 index 0000000..3d6fe1f --- /dev/null +++ b/stock/recovery.fstab @@ -0,0 +1,70 @@ +# 1 "vendor/mediatek/proprietary/hardware/fstab/mt6739/fstab.in" +# 1 "" +# 1 "" +# 1 "vendor/mediatek/proprietary/hardware/fstab/mt6739/fstab.in" +# 52 "vendor/mediatek/proprietary/hardware/fstab/mt6739/fstab.in" +/dev/block/platform/bootdevice/by-name/system /system ext4 ro wait + + + + + + + +/dev/block/platform/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check,resize,forceencrypt=/dev/block/platform/bootdevice/by-name/metadata + +/dev/block/platform/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check +/dev/block/platform/bootdevice/by-name/protect1 /protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable +/dev/block/platform/bootdevice/by-name/protect2 /protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable + +/dev/block/platform/bootdevice/by-name/nvdata /nvdata ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check,formattable +/dev/block/platform/bootdevice/by-name/nvcfg /nvcfg ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable + + + + + + +/devices/bootdevice* auto vfat defaults voldmanaged=sdcard0:auto +/devices/platform/externdevice* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata +/devices/platform/mt_usb* auto vfat defaults voldmanaged=usbotg:auto + +/dev/block/platform/bootdevice/by-name/frp /persistent emmc defaults defaults + +/dev/block/platform/bootdevice/by-name/nvram /nvram emmc defaults defaults +/dev/block/platform/bootdevice/by-name/proinfo /proinfo emmc defaults defaults +/dev/block/platform/bootdevice/by-name/lk /bootloader emmc defaults defaults +/dev/block/platform/bootdevice/by-name/lk2 /bootloader2 emmc defaults defaults +/dev/block/platform/bootdevice/by-name/para /misc emmc defaults defaults +/dev/block/platform/bootdevice/by-name/boot /boot emmc defaults defaults +/dev/block/platform/bootdevice/by-name/recovery /recovery emmc defaults defaults +/dev/block/platform/bootdevice/by-name/logo /logo emmc defaults defaults +/dev/block/platform/bootdevice/by-name/expdb /expdb emmc defaults defaults +/dev/block/platform/bootdevice/by-name/seccfg /seccfg emmc defaults defaults + +/dev/block/platform/bootdevice/by-name/tee1 /tee1 emmc defaults defaults +/dev/block/platform/bootdevice/by-name/tee2 /tee2 emmc defaults defaults +# 105 "vendor/mediatek/proprietary/hardware/fstab/mt6739/fstab.in" +/dev/block/platform/bootdevice/by-name/md1img /md1img emmc defaults defaults +/dev/block/platform/bootdevice/by-name/md1dsp /md1dsp emmc defaults defaults +/dev/block/platform/bootdevice/by-name/md1arm7 /md1arm7 emmc defaults defaults +/dev/block/platform/bootdevice/by-name/md3img /md3img emmc defaults defaults + + + + + +/dev/block/platform/bootdevice/by-name/gz1 /gz1 emmc defaults defaults +/dev/block/platform/bootdevice/by-name/gz2 /gz2 emmc defaults defaults + +/dev/block/platform/bootdevice/by-name/spmfw /spmfw emmc defaults defaults + + +/dev/block/platform/bootdevice/by-name/mcupmfw /mcupmfw emmc defaults defaults + +/dev/block/platform/bootdevice/by-name/boot_para /boot_para emmc defaults defaults + + + +/dev/block/platform/bootdevice/by-name/loader_ext1 /loader_ext1 emmc defaults defaults +/dev/block/platform/bootdevice/by-name/loader_ext2 /loader_ext2 emmc defaults defaults