forked from geiti94/android_device_samsung_a50dd
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Enzo Vieira | YukoSky <[email protected]>
- Loading branch information
0 parents
commit 50aa9df
Showing
11 changed files
with
343 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# Copyright (C) 2020 Projekt YuMi | ||
# | ||
# 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 := $(call my-dir) | ||
|
||
ifeq ($(TARGET_DEVICE),a50dd) | ||
|
||
include $(call all-subdir-makefiles,$(LOCAL_PATH)) | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Copyright (C) 2020 Projekt YuMi | ||
# | ||
# 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. | ||
# | ||
|
||
PRODUCT_MAKEFILES := \ | ||
$(LOCAL_DIR)/omni_a50dd.mk | ||
|
||
COMMON_LUNCH_CHOICES := omni_a50dd-eng |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# | ||
# Copyright (C) 2020 Projekt YuMi | ||
# | ||
# 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. | ||
# | ||
|
||
DEVICE_PATH := device/samsung/a50dd | ||
|
||
# Architecture | ||
TARGET_ARCH := arm64 | ||
TARGET_ARCH_VARIANT := armv8-a | ||
TARGET_CPU_ABI := arm64-v8a | ||
TARGET_CPU_ABI2 := | ||
TARGET_CPU_VARIANT := cortex-a73 | ||
|
||
# 2nd Architecture | ||
TARGET_2ND_ARCH := arm | ||
TARGET_2ND_ARCH_VARIANT := armv8-a | ||
TARGET_2ND_CPU_ABI := armeabi-v7a | ||
TARGET_2ND_CPU_ABI2 := armeabi | ||
TARGET_2ND_CPU_VARIANT := cortex-a53 | ||
|
||
# Others 64-bit flags | ||
TARGET_BOARD_SUFFIX := _64 | ||
TARGET_USES_64_BIT_BINDER := true | ||
|
||
# Kernel | ||
BOARD_CUSTOM_BOOTIMG_MK := $(DEVICE_PATH)/mkbootimg.mk | ||
BOARD_KERNEL_CMDLINE := androidboot.hardware=exynos9610 androidboot.selinux=permissive | ||
BOARD_NAME := SRPRL05B001RU | ||
BOARD_KERNEL_BASE := 0x10000000 | ||
BOARD_KERNEL_OFFSET := 0x00008000 | ||
BOARD_KERNEL_PAGESIZE := 2048 | ||
BOARD_RAMDISK_OFFSET := 0x01000000 | ||
BOARD_KERNEL_TAGS_OFFSET := 0x00000100 | ||
BOARD_BOOTIMG_HEADER_VERSION := 1 | ||
BOARD_MKBOOTIMG_ARGS += --kernel_offset $(BOARD_KERNEL_OFFSET) | ||
BOARD_MKBOOTIMG_ARGS += --ramdisk_offset $(BOARD_RAMDISK_OFFSET) | ||
BOARD_MKBOOTIMG_ARGS += --tags_offset $(BOARD_KERNEL_TAGS_OFFSET) | ||
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION) | ||
BOARD_MKBOOTIMG_ARGS += --board $(BOARD_NAME) | ||
|
||
# Prebuilt: Kernel | ||
BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb | ||
TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilt/Image.gz-dtb | ||
|
||
# Prebuilt: DTBO | ||
BOARD_PREBUILT_DTBOIMAGE := $(DEVICE_PATH)/prebuilt/dtbo.img | ||
BOARD_INCLUDE_RECOVERY_DTBO := true | ||
|
||
# System as root | ||
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true | ||
|
||
# Platform | ||
BOARD_VENDOR := samsung | ||
TARGET_SOC := universal9610 | ||
TARGET_BOARD_PLATFORM := exynos5 | ||
TARGET_BOARD_PLATFORM_GPU := mali-g72 | ||
|
||
# Assert | ||
TARGET_OTA_ASSERT_DEVICE := a50,a50dd | ||
|
||
# File systems: File System | ||
BOARD_HAS_LARGE_FILESYSTEM := true | ||
BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4 | ||
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4 | ||
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 | ||
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4 | ||
TARGET_USERIMAGES_USE_EXT4 := true | ||
TARGET_USERIMAGES_USE_F2FS := true | ||
|
||
# File systems: Block Flash | ||
BOARD_FLASH_BLOCK_SIZE := 131072 | ||
|
||
# File systems: Out dir | ||
TARGET_COPY_OUT_VENDOR := vendor | ||
TARGET_COPY_OUT_PRODUCT := product | ||
|
||
# Encryption | ||
PLATFORM_SECURITY_PATCH := 2099-12-31 | ||
PLATFORM_VERSION := 16.1.0 | ||
|
||
# Recovery | ||
BOARD_HAS_LARGE_FILESYSTEM := true | ||
TARGET_RECOVERY_PIXEL_FORMAT := "ABGR_8888" | ||
BOARD_SUPPRESS_SECURE_ERASE := true | ||
|
||
# TWRP Configs | ||
TW_THEME := portrait_hdpi | ||
TW_EXTRA_LANGUAGES := true | ||
TW_SCREEN_BLANK_ON_BOOT := true | ||
TW_INPUT_BLACKLIST := "hbtp_vm" | ||
TW_USE_TOOLBOX := true | ||
TW_HAS_DOWNLOAD_MODE := true | ||
TW_INCLUDE_NTFS_3G := true | ||
TW_EXCLUDE_SUPERSU := true | ||
TW_EXTRA_LANGUAGES := true | ||
TW_USE_NEW_MINADBD := true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Pitch Black Recovery Project for the Samsung Galaxy A50 | ||
|
||
### How to build ### | ||
|
||
```bash | ||
# Create dirs | ||
$ mkdir pb; cd pb | ||
|
||
# Init repo | ||
$ repo init --depth=1 -u git://github.com/PitchBlackRecoveryProject/manifest_pb.git -b android-10.0 | ||
|
||
# Clone a50dd repo | ||
$ git clone https://github.com/yukosky/android_device_samsung_a50dd -b pbrp-10.0 device/samsung/a50dd | ||
|
||
# Sync | ||
$ repo sync --no-repo-verify -c --force-sync --no-clone-bundle --no-tags --optimized-fetch --prune -j`nproc` | ||
|
||
# Build | ||
$ source build/envsetup.sh; lunch omni_a50dd-eng; mka recoveryimage | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# | ||
# Copyright (C) 2020 Projekt YuMi | ||
# | ||
# 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 := $(call my-dir) | ||
|
||
## Build and run dtbtool | ||
DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolCM$(HOST_EXECUTABLE_SUFFIX) | ||
LZ4_DT_IMAGE := $(PRODUCT_OUT)/dt.img | ||
|
||
ifndef TARGET_PREBUILT_DTB | ||
$(INSTALLED_DTIMAGE_TARGET): $(DTBTOOL) $(INSTALLED_KERNEL_TARGET) | ||
$(call pretty,"Target dt image: $@") | ||
$(DTBTOOL) $(BOARD_DTBTOOL_ARGS) -o $@ -s $(BOARD_KERNEL_PAGESIZE) -p $(KERNEL_OUT)/scripts/dtc/ $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/ | ||
$(hide) chmod a+r $@ | ||
lz4 -9 < $@ > $(LZ4_DT_IMAGE) || lz4c -c1 -y $@ $(LZ4_DT_IMAGE) | ||
$(hide) $(ACP) $(LZ4_DT_IMAGE) $@ | ||
@echo "Made DT image: $@" | ||
else | ||
$(INSTALLED_DTIMAGE_TARGET): $(TARGET_PREBUILT_DTB) | ||
cp $(TARGET_PREBUILT_DTB) $(INSTALLED_DTIMAGE_TARGET) | ||
endif | ||
|
||
## Overload bootimg generation: Same as the original, + --dt arg | ||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(BOOTIMAGE_EXTRA_DEPS) | ||
$(call pretty,"Target boot image: $@") | ||
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@ | ||
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE)) | ||
|
||
## Overload recoveryimg generation: Same as the original, + --dt arg | ||
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(recovery_ramdisk) $(recovery_kernel) \ | ||
$(RECOVERYIMAGE_EXTRA_DEPS) | ||
@echo ----- Making recovery image ------ | ||
$(call build-recoveryimage-target, $@) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# | ||
# Copyright (C) 2020 Projekt YuMi | ||
# | ||
# 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. | ||
# | ||
|
||
# Inherit some common Omni stuff. | ||
$(call inherit-product, vendor/pb/config/common.mk) | ||
|
||
# Inherit some aosp stuff | ||
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk) | ||
|
||
# Device identifier. This must come after all inclusions | ||
PRODUCT_DEVICE := a50dd | ||
PRODUCT_NAME := omni_a50dd | ||
PRODUCT_BRAND := samsung | ||
PRODUCT_MODEL := Samsung Galaxy A50 | ||
PRODUCT_MANUFACTURER := samsung | ||
PRODUCT_RELEASE_NAME := Samsung Galaxy A50 | ||
|
||
# Copy | ||
PRODUCT_COPY_FILES += $(call find-copy-subdir-files,*,$(LOCAL_PATH)/recovery/root,recovery/root) | ||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
on fs | ||
export ANDROID_ROOT /system_root | ||
|
||
on init | ||
write /proc/sys/kernel/hung_task_timeout_secs 0 | ||
|
||
on boot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# | ||
# Copyright 2017 The Android Open Source Project | ||
# | ||
# Copyright (C) 2020 Orange Fox Recovery | ||
# Thanks for geiti94 | ||
# | ||
# 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. | ||
# | ||
|
||
on init | ||
mount configfs none /sys/kernel/config | ||
mkdir /sys/kernel/config/usb_gadget/g1 0770 shell shell | ||
mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409 0770 shell shell | ||
mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1 0770 shell shell | ||
mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409 0770 shell shell | ||
mkdir /sys/kernel/config/usb_gadget/g1/functions/ffs.mtp 0770 shell shell | ||
mkdir /sys/kernel/config/usb_gadget/g1/functions/ffs.adb 0770 shell shell | ||
mkdir /dev/usb-ffs 0770 shell shell | ||
mkdir /dev/usb-ffs/adb 0770 shell shell | ||
mkdir /dev/usb-ffs/mtp 0770 mtp mtp | ||
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 | ||
mount functionfs mtp /dev/usb-ffs/mtp uid=2000,gid=2000 | ||
|
||
on boot | ||
write /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno} | ||
write /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer} | ||
write /sys/kernel/config/usb_gadget/g1/strings/0x409/product ${ro.product.model} | ||
write /sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409/configuration "Conf 1" | ||
write /sys/kernel/config/usb_gadget/g1/configs/c.1/MaxPower 0x3f | ||
symlink /sys/kernel/config/usb_gadget/g1/functions/ffs.mtp /sys/kernel/config/usb_gadget/g1/configs/c.1/ffs.mtp | ||
symlink /sys/kernel/config/usb_gadget/g1/functions/ffs.adb /sys/kernel/config/usb_gadget/g1/configs/c.1/ffs.adb | ||
setprop sys.usb.configfs 1 | ||
setprop sys.usb.controller 13200000.dwc3 | ||
|
||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb | ||
write /sys/class/android_usb/android0/enable 0 | ||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8 | ||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860 | ||
write /sys/class/android_usb/android0/functions ${sys.usb.config} | ||
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0 | ||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller} | ||
write /sys/class/android_usb/android0/enable 1 | ||
setprop sys.usb.state ${sys.usb.config} | ||
|
||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb | ||
write /sys/class/android_usb/android0/enable 0 | ||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18D1 | ||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x4EE7 | ||
write /sys/class/android_usb/android0/functions ${sys.usb.config} | ||
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0 | ||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller} | ||
write /sys/class/android_usb/android0/enable 1 | ||
setprop sys.usb.state ${sys.usb.config} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Android fstab file. | ||
# The filesystem that contains the filesystem checker binary (typically /system) cannot | ||
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK | ||
|
||
/boot emmc /dev/block/platform/13520000.ufs/by-name/boot flags=display="Kernel Image";backup=1;flashimg=1 | ||
/recovery emmc /dev/block/platform/13520000.ufs/by-name/recovery flags=display="Recovery Image";backup=1;flashimg=1 | ||
/product_image emmc /dev/block/platform/13520000.ufs/by-name/product flags=display="Product Image (CSC)";backup=1;flashimg=1 | ||
/system_image emmc /dev/block/platform/13520000.ufs/by-name/system flags=display="System Image";backup=1;flashimg=1 | ||
/vendor_image emmc /dev/block/platform/13520000.ufs/by-name/vendor flags=display="Vendor Image";backup=1;flashimg=1 | ||
|
||
# System and Vendor (and Product) Points | ||
/system_root ext4 /dev/block/platform/13520000.ufs/by-name/system flags=display="System";backup=1;wipeingui | ||
/product ext4 /dev/block/platform/13520000.ufs/by-name/product flags=display="Product";backup=1;wipeingui | ||
/vendor ext4 /dev/block/platform/13520000.ufs/by-name/vendor flags=display="Vendor";backup=1;wipeingui | ||
|
||
# Cache and ETC Points | ||
/cache ext4 /dev/block/platform/13520000.ufs/by-name/cache flags=display="Cache";backup=1;wipeingui | ||
/data ext4 /dev/block/platform/13520000.ufs/by-name/userdata | ||
/efs ext4 /dev/block/platform/13520000.ufs/by-name/efs flags=display="EFS";backup=1 | ||
|
||
# SDC and OTG Points | ||
/external_sd vfat /dev/block/mmcblk0p1 /dev/block/mmcblk0 flags=display="Micro SDcard";storage;wipeingui;removable | ||
/usb-otg vfat /dev/block/sdf1 /dev/block/sdf flags=display="USB-OTG";storage;wipeingui;removable |