Skip to content

Commit 4d12d17

Browse files
committed
Updates for Android 5.1.1
1 parent b086095 commit 4d12d17

File tree

11 files changed

+18
-532
lines changed

11 files changed

+18
-532
lines changed

AndroidBoard.mk

Lines changed: 0 additions & 8 deletions
This file was deleted.

BoardConfig.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ TARGET_PREBUILT_KERNEL := device/emulator/twrp/kernAl
3535
# Use this flag if the board has a ext4 partition larger than 2gb
3636
BOARD_HAS_LARGE_FILESYSTEM := true
3737

38-
TARGET_RECOVERY_INITRC := device/emulator/twrp/recovery/init.rc
38+
#TARGET_RECOVERY_INITRC := device/emulator/twrp/recovery/init.rc
3939
TARGET_USERIMAGES_USE_EXT4 := true
4040

4141
# TWRP specific build flags
42-
DEVICE_RESOLUTION := 720x1280
42+
TW_THEME := portrait_mdpi
4343
RECOVERY_GRAPHICS_USE_LINELENGTH := true
44-
TWRP_CUSTOM_KEYBOARD := ../../../device/emulator/twrp/recovery/hardwarekeyboard.cpp
4544
RECOVERY_SDCARD_ON_DATA := true
45+
TW_EXCLUDE_MTP := true
46+
# Dirty workaround to prevent errors related to the brightness file
47+
TW_BRIGHTNESS_PATH := "/brightness"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
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.
44

5-
This branch of the device configs is intended to be used with Android 4.4.2 system image. For some reason there is no cache partition. In order to create a cache partition as well fake boot and recovery partitions, you will have to boot the emulator with a custom kernel. We added simply added support for reading a partition map to the kernel configuration. The source for this kernel is located here:
5+
This branch of the device configs is intended to be used with Android 5.1.1 system image. In order to create fake boot and recovery partitions, you will have to boot the emulator with a custom kernel. We simply added support for reading a partition table to the kernel configuration. The source for this kernel is located here:
66

77
[Kernel Source](https://android.googlesource.com/kernel/goldfish/+/android-goldfish-3.4 "Kernel Source")
88

9-
To boot this in the emulator, build your recoveryimage. With the Android emulator make a new device based on a Galaxy Nexus. Name it TWRP. Allow it to have a hardware keyboard and a sdcard sized to 1500MB. Give it a decent sized data partition like 500MB or more. TWRP will be using the data partition as an emulated storage setup as seen on most modern Android devices, so having some extra room may help. Then from your android-sdk/tools folder run the following command:
9+
To boot this in the emulator, build your recoveryimage. With the Android emulator make a new device based on a Galaxy Nexus. Name it TWRP. Allow it to have a hardware keyboard and a sdcard sized to 2000MB. Give it a decent sized data partition like 2000MB or more. TWRP will be using the data partition as an emulated storage setup as seen on most modern Android devices, so having some extra room may help. Then from your android-sdk/tools folder run the following command:
1010

1111
```
1212
./emulator -avd TWRP -ramdisk ~/omni_folder/out/target/product/twrp/ramdisk-recovery.img -kernel ~/omni_folder/device/emulator/twrp/goldfish_3.4_kernel
1313
```
1414

1515
After the first boot, wait for ADB to start up, then: adb shell /sbin/create_partitions.sh
1616

17-
This script will partition the sdcard with a boot, recovery, cache, and removable sdcard partition. It's designed to work with a 1500MiB sdcard. If you want a different sdcard size then you will need to modify the script in the omni_folder/device/emulator/twrp/recovery/root/sbin/create_partitions.sh location to suit your needs.
17+
This script will partition the sdcard with a boot, recovery, cache, and removable sdcard partition. It's designed to work with a 2000MiB sdcard. If you want a different sdcard size then you will need to modify the script in the omni_folder/device/emulator/twrp/recovery/root/sbin/create_partitions.sh location to suit your needs.
1818

1919

2020
You can find a compiling guide for TWRP [here](http://forum.xda-developers.com/showthread.php?t=1943625 "Guide").

device.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ endif
1717
PRODUCT_COPY_FILES += \
1818
$(LOCAL_KERNEL):kernel
1919

20-
PRODUCT_COPY_FILES += \
21-
device/emulator/twrp/recovery/root/sbin/network_start.sh:recovery/root/sbin/network_start.sh \
22-
device/emulator/twrp/recovery/root/sbin/create_partitions.sh:recovery/root/sbin/create_partitions.sh
23-
2420
$(call inherit-product, build/target/product/full.mk)
2521

2622
PRODUCT_NAME := teamwin_twrp

recovery.fstab

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# mount point fstype device
22

3-
/external_sd vfat /dev/block/mmcblk0p4 /dev/block/mmcblk0
3+
/external_sd vfat /dev/block/mmcblk0p3 /dev/block/mmcblk0
44
/system ext4 /dev/block/mtdblock0
55
/data ext4 /dev/block/mtdblock1 length=-16384
6-
/cache ext4 /dev/block/mmcblk0p3
6+
/cache ext4 /dev/block/mtdblock2
77
/boot emmc /dev/block/mmcblk0p1
88
/recovery emmc /dev/block/mmcblk0p2

0 commit comments

Comments
 (0)