Skip to content

Commit 7838c09

Browse files
committed
Initial commit
0 parents  commit 7838c09

File tree

13 files changed

+677
-0
lines changed

13 files changed

+677
-0
lines changed

Android.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ifneq ($(filter twrp,$(TARGET_DEVICE)),)
2+
include $(all-subdir-makefiles)
3+
endif

AndroidBoard.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
LOCAL_PATH := $(call my-dir)
2+
3+
include $(CLEAR_VARS)
4+
5+
ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET)
6+
7+
# include the non-open-source counterpart to this file
8+
-include vendor/emulator/twrp/AndroidBoardVendor.mk

AndroidProducts.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PRODUCT_MAKEFILES := \
2+
$(LOCAL_DIR)/device.mk

BoardConfig.mk

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
USE_CAMERA_STUB := true
2+
3+
# inherit from the proprietary version
4+
-include vendor/emulator/twrp/BoardConfigVendor.mk
5+
6+
TARGET_NO_BOOTLOADER := true
7+
TARGET_BOOTLOADER_BOARD_NAME := twrp
8+
9+
# Platform
10+
TARGET_NO_RADIOIMAGE := true
11+
TARGET_BOARD_PLATFORM := omap4
12+
13+
# Architecture
14+
TARGET_CPU_ABI := armeabi-v7a
15+
TARGET_CPU_ABI2 := armeabi
16+
TARGET_CPU_SMP := true
17+
TARGET_ARCH_VARIANT := armv7-a-neon
18+
ARCH_ARM_HAVE_TLS_REGISTER := true
19+
20+
BOARD_KERNEL_BASE := 0x80000000
21+
# BOARD_KERNEL_CMDLINE :=
22+
23+
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x105c0000
24+
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x105c0000
25+
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x105c0000
26+
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x105c0000
27+
BOARD_FLASH_BLOCK_SIZE := 131072
28+
29+
TARGET_PREBUILT_KERNEL := device/emulator/twrp/kernAl
30+
31+
# Recovery:Start
32+
33+
# Use this flag if the board has a ext4 partition larger than 2gb
34+
BOARD_HAS_LARGE_FILESYSTEM := true
35+
36+
TARGET_RECOVERY_INITRC := device/emulator/twrp/recovery/init-twrp.rc
37+
TARGET_USERIMAGES_USE_EXT4 := true
38+
39+
# TWRP specific build flags
40+
DEVICE_RESOLUTION := 720x1280
41+
#RECOVERY_SDCARD_ON_DATA := true
42+
RECOVERY_GRAPHICS_USE_LINELENGTH := true
43+
#BOARD_HAS_NO_REAL_SDCARD := true
44+
TW_HAS_NO_BOOT_PARTITION := true
45+
TWRP_CUSTOM_KEYBOARD := ../../../device/emulator/twrp/recovery/hardwarekeyboard.cpp
46+

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
**Team Win Recovery Project (TWRP)**
2+
3+
This is a set of device configs that you can use to build and test TWRP in the Android emulator. Note that adb will take about 10 to 15 seconds after TWRP is booted to become available. Just wait and it will come online eventually.
4+
5+
To boot this in the emulator, build your recoveryimage. With the Android emulator make a new device based on a Galaxy Nexus. Allow it to have a hardware keyboard and a sdcard. Give it a name like TWRP. Then from your android-sdk/tools folder run the following command:
6+
./emulator -avd TWRP -ramdisk ~/cm_folder/out/target/product/twrp/ramdisk-recovery.img
7+
8+
You can find a compiling guide [here](http://forum.xda-developers.com/showthread.php?t=1943625 "Guide").
9+
10+
[More information about the project.](http://www.teamw.in/project/twrp2 "More Information")
11+
12+
If you have code changes to submit those should be pushed to our gerrit instance. A guide can be found [here](http://teamw.in/twrp2-gerrit "Gerrit Guide").

cm.mk

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Release name
2+
PRODUCT_RELEASE_NAME := twrp
3+
4+
# Inherit some common CM stuff.
5+
$(call inherit-product, vendor/cm/config/common_full_phone.mk)
6+
7+
# Inherit device configuration
8+
$(call inherit-product, device/emulator/twrp/device.mk)
9+
10+
## Device identifier. This must come after all inclusions
11+
PRODUCT_DEVICE := twrp
12+
PRODUCT_NAME := cm_twrp
13+
PRODUCT_BRAND := teamwin
14+
PRODUCT_MODEL := twrp
15+
PRODUCT_MANUFACTURER := teamwin

device.mk

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
2+
3+
# The gps config appropriate for this device
4+
$(call inherit-product, device/common/gps/gps_us_supl.mk)
5+
6+
$(call inherit-product-if-exists, vendor/emulator/twrp/twrp-vendor.mk)
7+
8+
DEVICE_PACKAGE_OVERLAYS += device/emulator/twrp/overlay
9+
10+
LOCAL_PATH := device/emulator/twrp
11+
ifeq ($(TARGET_PREBUILT_KERNEL),)
12+
LOCAL_KERNEL := $(LOCAL_PATH)/kernAl
13+
else
14+
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
15+
endif
16+
17+
PRODUCT_COPY_FILES += \
18+
$(LOCAL_KERNEL):kernel
19+
20+
PRODUCT_COPY_FILES += \
21+
device/emulator/twrp/recovery/root/sbin/network_start.sh:recovery/root/sbin/network_start.sh
22+
23+
#$(call inherit-product, build/target/product/full.mk)
24+
25+
PRODUCT_NAME := teamwin_twrp
26+
PRODUCT_BRAND := teamwin

kernAl

Whitespace-only changes.

recovery.fstab

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# mount point fstype device
2+
3+
/system yaffs2 system
4+
/cache yaffs2 cache
5+
/data yaffs2 userdata
6+
/sdcard vfat /dev/block/mmcblk0
7+

0 commit comments

Comments
 (0)