Skip to content

Commit 74d9043

Browse files
committed
E7544: PBRP-ify
1 parent f56b81d commit 74d9043

File tree

228 files changed

+4320
-46774
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+4320
-46774
lines changed

Android.bp

100644100755
File mode changed.

Android.mk

100644100755
File mode changed.

AndroidProducts.mk

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#
77

88
PRODUCT_MAKEFILES := \
9-
$(LOCAL_DIR)/twrp_E7544.mk
9+
$(LOCAL_DIR)/omni_E7544.mk
1010

1111
COMMON_LUNCH_CHOICES := \
12-
twrp_E7544-user \
13-
twrp_E7544-userdebug \
14-
twrp_E7544-eng
12+
omni_E7544-user \
13+
omni_E7544-userdebug \
14+
omni_E7544-eng

BoardConfig.mk

100644100755
Lines changed: 95 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
#
2-
# Copyright (C) 2022 The Android Open Source Project
3-
# Copyright (C) 2022 SebaUbuntu's TWRP device tree generator
4-
#
2+
# Copyright (C) 2023 The Android Open Source Project
3+
#
54
# SPDX-License-Identifier: Apache-2.0
65
#
76

87
DEVICE_PATH := device/micromax/E7544
98

10-
# For building with minimal manifest
11-
ALLOW_MISSING_DEPENDENCIES := true
12-
13-
14-
# Enable virtual A/B OTA
15-
# $(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
169

17-
# Installs gsi keys into ramdisk, to boot a developer GSI with verified boot.
18-
# $(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_keys.mk)
10+
ALLOW_MISSING_DEPENDENCIES := true
11+
BUILD_BROKEN_DUP_RULES := true
12+
BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true
13+
BUILD_BROKEN_PREBUILT_ELF_FILES := true
14+
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
15+
BUILD_BROKEN_MISSING_REQUIRED_MODULES := true
16+
RELAX_USES_LIBRARY_CHECK=true
1917

2018
# A/B
2119
ifeq ($(TARGET_IS_VAB),true)
@@ -24,6 +22,8 @@ AB_OTA_PARTITIONS += \
2422
vbmeta \
2523
vbmeta_system \
2624
vbmeta_vendor \
25+
vbmeta_product \
26+
vbmeta_system_ext \
2727
dtbo \
2828
boot \
2929
system \
@@ -35,7 +35,21 @@ endif
3535
# Recovery
3636
TARGET_NO_RECOVERY := true
3737
BOARD_USES_RECOVERY_AS_BOOT := true
38-
38+
TARGET_RECOVERY_DEVICE_MODULES += \
39+
libcap \
40+
libion \
41+
libxml2
42+
TW_RECOVERY_ADDITIONAL_RELINK_LIBRARY_FILES += \
43+
$(TARGET_OUT_SHARED_LIBRARIES)/libcap.so \
44+
$(TARGET_OUT_SHARED_LIBRARIES)/libion.so \
45+
$(TARGET_OUT_SHARED_LIBRARIES)/libxml2.so
46+
47+
# Additional Libraries
48+
TARGET_RECOVERY_DEVICE_MODULES += \
49+
libandroidicu
50+
$(OUT_DIR)/target/product/$(PRODUCT_DEVICE)/obj/SHARED_LIBRARIES/libandroidicu_intermediates/libandroidicu.so:$(TARGET_COPY_OUT_RECOVERY)/root/system/lib64/libandroidicu.so
51+
52+
3953
# Architecture
4054
TARGET_ARCH := arm64
4155
TARGET_ARCH_VARIANT := armv8-a
@@ -51,8 +65,10 @@ TARGET_2ND_CPU_ABI2 := armeabi
5165
TARGET_2ND_CPU_VARIANT := generic
5266
TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a55
5367

54-
# APEX
55-
DEXPREOPT_GENERATE_APEX_IMAGE := true
68+
# 64-bit
69+
TARGET_SUPPORTS_64_BIT_APPS := true
70+
TARGET_IS_64_BIT := true
71+
TARGET_USES_64_BIT_BINDER := true
5672

5773
# Bootloader
5874
TARGET_BOOTLOADER_BOARD_NAME := ums512_1h10
@@ -67,6 +83,7 @@ BOARD_KERNEL_CMDLINE := console=ttyS1,115200n8 buildvariant=user
6783
BOARD_KERNEL_PAGESIZE := 2048
6884
BOARD_RAMDISK_OFFSET := 0x05400000
6985
BOARD_KERNEL_TAGS_OFFSET := 0x00000100
86+
BOARD_DTB_OFFSET := 0x01f00000
7087
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION)
7188
BOARD_MKBOOTIMG_ARGS += --ramdisk_offset $(BOARD_RAMDISK_OFFSET)
7289
BOARD_MKBOOTIMG_ARGS += --tags_offset $(BOARD_KERNEL_TAGS_OFFSET)
@@ -79,9 +96,8 @@ TARGET_KERNEL_SOURCE := kernel/micromax/E7544
7996
TARGET_FORCE_PREBUILT_KERNEL := true
8097
ifeq ($(TARGET_FORCE_PREBUILT_KERNEL),true)
8198
TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilt/kernel
82-
TARGET_PREBUILT_DTB := $(DEVICE_PATH)/prebuilt/dtb.img
99+
TARGET_PREBUILT_DTB := $(DEVICE_PATH)/prebuilt/dtb
83100
BOARD_MKBOOTIMG_ARGS += --dtb $(TARGET_PREBUILT_DTB)
84-
BOARD_INCLUDE_DTB_IN_BOOTIMG :=
85101
endif
86102

87103
# Partitions
@@ -90,18 +106,40 @@ BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
90106
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
91107
BOARD_HAS_LARGE_FILESYSTEM := true
92108
BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4
93-
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4
94109
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
110+
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
111+
BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
95112
TARGET_COPY_OUT_VENDOR := vendor
96113
BOARD_SUPER_PARTITION_SIZE := 9126805504 # TODO: Fix hardcoded value
97114
BOARD_SUPER_PARTITION_GROUPS := micromax_dynamic_partitions
98115
BOARD_MICROMAX_DYNAMIC_PARTITIONS_PARTITION_LIST := system system_ext vendor product
99116
BOARD_MICROMAX_DYNAMIC_PARTITIONS_SIZE := 9122611200 # TODO: Fix hardcoded value
117+
BOARD_ROOT_EXTRA_SYMLINKS := \
118+
/vendor/bt_firmware:/bt_firmware \
119+
/mnt/vendor/socko:/socko \
120+
/mnt/sdcard/:sdcrad \
121+
/system/product/:product \
122+
/system/system_ext/:system_ext
123+
124+
125+
# AVB
126+
BOARD_AVB_ENABLE := true
127+
BOARD_AVB_VBMETA_SYSTEM := system
128+
BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
129+
BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA4096
130+
BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
131+
BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2
100132

101133
# UserIMG
102134
TARGET_USERIMAGES_USE_EXT4 := true
103135
TARGET_USERIMAGES_USE_F2FS := true
104136

137+
# File systems
138+
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
139+
140+
# System as root
141+
BOARD_SUPPRESS_SECURE_ERASE := true
142+
105143
# Partitions (listed in the file) to be wiped under recovery.
106144
TARGET_RECOVERY_WIPE := $(DEVICE_PATH)/recovery/root/system/etc/recovery.wipe
107145

@@ -110,10 +148,7 @@ TARGET_USES_MKE2FS := true
110148

111149
# Decryption
112150
TW_INCLUDE_CRYPTO := true
113-
TW_INCLUDE_CRYPTO_FBE := true
114-
TW_INCLUDE_FBE_METADATA_DECRYPT := true
115151
BOARD_USES_METADATA_PARTITION := true
116-
BOARD_USES_QCOM_FBE_DECRYPTION := true
117152
TW_USE_FSCRYPT_POLICY := 1
118153

119154
# Platform
@@ -125,8 +160,9 @@ TARGET_NO_BOOTLOADER := false
125160

126161
# Recovery
127162
TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
128-
TARGET_USERIMAGES_USE_EXT4 := true
129-
TARGET_USERIMAGES_USE_F2FS := true
163+
164+
# Properties
165+
TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
130166

131167
# Verified Boot
132168
BOARD_AVB_ENABLE := true
@@ -142,9 +178,28 @@ TW_THEME := portrait_hdpi
142178
TW_EXTRA_LANGUAGES := true
143179
TW_SCREEN_BLANK_ON_BOOT := true
144180
TW_INPUT_BLACKLIST := "hbtp_vm"
181+
TW_BRIGHTNESS_PATH := "/sys/devices/platform/backlight/backlight/sprd_backlight/brightness"
182+
TW_USE_TOOLBOX := true
183+
TW_INCLUDE_REPACKTOOLS := true
184+
TW_INCLUDE_FASTBOOTD := true
145185
TW_USE_TOOLBOX := true
146186
TW_INCLUDE_REPACKTOOLS := true
147187
TW_INCLUDE_FASTBOOTD := true
188+
RECOVERY_SDCARD_ON_DATA := true
189+
TW_USE_EXTERNAL_STORAGE := true
190+
TW_EXCLUDE_DEFAULT_USB_INIT := true
191+
TW_EXCLUDE_TWRPAPP := true
192+
TW_INCLUDE_NTFS_3G := true
193+
TW_NO_BIND_SYSTEM := true
194+
TW_NO_SCREEN_BLANK := true
195+
TW_SCREEN_BLANK_ON_BOOT := true
196+
TW_NO_SCREEN_TIMEOUT := true
197+
198+
199+
# resetprop and magiskboot
200+
TW_INCLUDE_RESETPROP := true
201+
TW_INCLUDE_REPACKTOOLS := true
202+
TW_INCLUDE_LIBRESETPROP := true
148203

149204
# Security patch level
150205
VENDOR_SECURITY_PATCH := 2021-08-01
@@ -156,15 +211,26 @@ TARGET_USES_LOGD := true
156211

157212
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/recovery/root/system/etc/recovery.fstab
158213

214+
# Workaround for error copying vendor files to recovery ramdisk
215+
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
216+
TARGET_COPY_OUT_VENDOR := vendor
217+
TARGET_COPY_OUT_PRODUCT := product
218+
TARGET_COPY_OUT_SYSTEM_EXT := system_ext
219+
159220
# Metadata
160221
BOARD_USES_METADATA_PARTITION := true
161-
TW_INCLUDE_FBE_METADATA_DECRYPT := true
222+
BOARD_ROOT_EXTRA_FOLDERS += metadata
223+
BOARD_EXT4_SHARE_DUP_BLOCKS := true
162224

163-
# Decryption
164-
TW_INCLUDE_CRYPTO := true
165-
TW_INCLUDE_CRYPTO_FBE := true
166-
BOARD_USES_QCOM_FBE_DECRYPTION := true
167-
TW_USE_FSCRYPT_POLICY := 1
225+
# PBRP Specific Build Flags
226+
PB_DISABLE_DEFAULT_TREBLE_COMP := false
227+
PB_DISABLE_DEFAULT_DM_VERITY := true
228+
PB_DEVICE_RATIO := "20:9"
229+
230+
# Other flags
231+
TW_NO_LEGACY_PROPS := true
232+
TW_OVERRIDE_SYSTEM_PROPS := "ro.build.version.sdk"
233+
TW_NO_SCREEN_BLANK := true
168234

169235
# Kernel module loading
170-
TW_LOAD_VENDOR_MODULES := "incrementalfs.ko kheaders.ko trace_irqsoff_bytedancy.ko trace_noschedule_bytedancy.ko trace_runqlat_bytedancy.ko"
236+
TW_LOAD_VENDOR_MODULES := "incrementalfs.ko kheaders.ko trace_irqsoff_bytedancy.ko trace_noschedule_bytedancy.ko trace_runqlat_bytedancy.ko"

README.md

100644100755
Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
# Android device tree for Micromax IN_2b (E7544)
1+
<h1 align="center">
2+
<br>
3+
<a href="https://pitchblackrecovery.com"><img src="https://raw.githubusercontent.com/shovon668/xda-template/r3/pbrp3-banner-xda.png" alt="Welcome to PitchBlack Recovery Project 👋"></a>
4+
<br>
25

3-
The Micromax IN2B (Model_E7544) is a entry-level smartphone from Micromax.
4-
Micromax announced this device on July 30 2021 and released in August 06 2021
6+
# 𝗠𝗶𝗰𝗿𝗼𝗺𝗮𝘅 𝗜𝗡_𝟮𝗯 (𝗘𝟳𝟱𝟰𝟰) 𝗗𝗲𝘃𝗶𝗰𝗲 𝗧𝗿𝗲𝗲
7+
𝔽𝕠𝕣 ℙ𝕚𝕥𝕔𝕙𝔹𝕝𝕒𝕔𝕜 ℝ𝕖𝕔𝕠𝕧𝕖𝕣𝕪 𝔹𝕦𝕚𝕝𝕕
58

6-
## Device specifications
9+
<img src="https://logos-download.com/wp-content/uploads/2016/06/Micromax_logo_orange_background.png"/>
10+
11+
𝑻𝒉𝒆 𝑴𝒊𝒄𝒓𝒐𝒎𝒂𝒙 𝑰𝑵𝟐𝑩 (𝑴𝒐𝒅𝒆𝒍_𝑬𝟕𝟓𝟒𝟒) 𝒊𝒔 𝒂 𝒆𝒏𝒕𝒓𝒚-𝒍𝒆𝒗𝒆𝒍 𝒔𝒎𝒂𝒓𝒕𝒑𝒉𝒐𝒏𝒆 𝒇𝒓𝒐𝒎 𝑴𝒊𝒄𝒓𝒐𝒎𝒂𝒙 𝑰𝒏𝒇𝒐𝒓𝒎𝒂𝒕𝒊𝒄𝒔. 𝑴𝒊𝒄𝒓𝒐𝒎𝒂𝒙 𝒂𝒏𝒏𝒐𝒖𝒏𝒄𝒆𝒅 𝒕𝒉𝒊𝒔 𝒅𝒆𝒗𝒊𝒄𝒆 𝒐𝒏 𝑱𝒖𝒍𝒚 𝟑𝟎 𝟐𝟎𝟐𝟏 𝒂𝒏𝒅 𝒓𝒆𝒍𝒆𝒂𝒔𝒆𝒅 𝒊𝒏 𝑨𝒖𝒈𝒖𝒔𝒕 𝟎𝟔 𝟐𝟎𝟐𝟏
12+
13+
14+
![](https://www.smartphonesbd.com/images/phones/micromax-in-2b.jpg)
715

816
Basic | Spec Sheet
917
-------:|:-------------------------
@@ -26,15 +34,19 @@ SELFIE CAMERA Single | 5 MP, f/2.2 Features : HDR
2634
USB | USB Type-C 2.0, OTG
2735
Sensors | Fingerprint (rear-mounted), accelerometer, proximity
2836
SAR | 0.85 W/kg (head) / 1.13 W/kg (body)
29-
## Device picture
30-
31-
![](https://www.smartphonesbd.com/images/phones/micromax-in-2b.jpg)
37+
### Copyright
3238

33-
```
34-
#
35-
# Copyright (C) 2022 The Android Open Source Project
36-
# Copyright (C) 2022 SebaUbuntu's TWRP device tree generator
37-
#
38-
# SPDX-License-Identifier: Apache-2.0
39-
#
40-
```
39+
40+
# Copyright (C) 2023 The PitchBlack Recovery Project
41+
42+
# Licensed under the Apache License, Version 2.0 (the "License");
43+
# you may not use this file except in compliance with the License.
44+
# You may obtain a copy of the License at
45+
#
46+
# http://www.apache.org/licenses/LICENSE-2.0
47+
#
48+
# Unless required by applicable law or agreed to in writing, software
49+
# distributed under the License is distributed on an "AS IS" BASIS,
50+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51+
# See the License for the specific language governing permissions and
52+
# limitations under the License.

bootctrl/Android.bp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// Copyright (C) 2023 The Android Open Source Project
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
cc_library {
18+
name: "bootctrl.default",
19+
defaults: ["bootctrl_hal_defaults"],
20+
static_libs: ["libgptutils"],
21+
}

device.mk

100644100755
Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,49 @@ AB_OTA_POSTINSTALL_CONFIG += \
1818
FILESYSTEM_TYPE_system=ext4 \
1919
POSTINSTALL_OPTIONAL_system=true
2020

21-
# Boot control HAL
21+
# f2fs utilities
2222
PRODUCT_PACKAGES += \
23-
android.hardware.boot@1.0-impl \
24-
android.hardware.boot@1.0-impl.recovery \
25-
android.hardware.boot@1.0-service
23+
sg_write_buffer \
24+
f2fs_io \
25+
check_f2fs
2626

27+
# Userdata checkpoint
28+
PRODUCT_PACKAGES += \
29+
checkpoint_gc
30+
31+
AB_OTA_POSTINSTALL_CONFIG += \
32+
RUN_POSTINSTALL_vendor=true \
33+
POSTINSTALL_PATH_vendor=bin/checkpoint_gc \
34+
FILESYSTEM_TYPE_vendor=ext4 \
35+
POSTINSTALL_OPTIONAL_vendor=true
36+
2737
# Health
2838
PRODUCT_PACKAGES += \
2939
android.hardware.health@2.1-impl \
30-
android.hardware.health@2.1-impl.recovery \
3140
android.hardware.health@2.1-service
3241

42+
# bootctrl HAL
3343
PRODUCT_PACKAGES += \
34-
bootctrl.ums512 \
44+
bootctrl.default \
45+
bootctrl.unisoc \
3546
bootctrl.ums512.recovery
36-
47+
3748
PRODUCT_PACKAGES += \
3849
otapreopt_script \
3950
cppreopts.sh \
4051
update_engine \
4152
update_verifier \
42-
update_engine_sideload
53+
update_engine_sideload \
54+
checkpoint_gc
4355

56+
PRODUCT_PACKAGES_DEBUG += \
57+
bootctl
58+
4459
# Fastbootd
4560
PRODUCT_PACKAGES += \
4661
fastbootd \
4762
android.hardware.fastboot@1.0-impl-mock \
4863
android.hardware.fastboot@1.0-impl-mock.recovery
4964

50-
51-
# QCOM Decryption
52-
PRODUCT_PACKAGES += \
53-
qcom_decrypt \
54-
qcom_decrypt_fbe
65+
# Hidl Service
66+
PRODUCT_ENFORCE_VINTF_MANIFEST := true

extract-files.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
5959
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
6060

6161
"${MY_DIR}/setup-makefiles.sh"
62+

0 commit comments

Comments
 (0)