Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions AndroidBoard.mk

This file was deleted.

8 changes: 5 additions & 3 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ TARGET_PREBUILT_KERNEL := device/emulator/twrp/kernAl
# Use this flag if the board has a ext4 partition larger than 2gb
BOARD_HAS_LARGE_FILESYSTEM := true

TARGET_RECOVERY_INITRC := device/emulator/twrp/recovery/init.rc
#TARGET_RECOVERY_INITRC := device/emulator/twrp/recovery/init.rc
TARGET_USERIMAGES_USE_EXT4 := true

# TWRP specific build flags
DEVICE_RESOLUTION := 720x1280
TW_THEME := portrait_mdpi
RECOVERY_GRAPHICS_USE_LINELENGTH := true
TWRP_CUSTOM_KEYBOARD := ../../../device/emulator/twrp/recovery/hardwarekeyboard.cpp
RECOVERY_SDCARD_ON_DATA := true
TW_EXCLUDE_MTP := true
# Dirty workaround to prevent errors related to the brightness file
TW_BRIGHTNESS_PATH := "/brightness"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

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.

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:
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:

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

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:
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:

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

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

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


You can find a compiling guide for TWRP [here](http://forum.xda-developers.com/showthread.php?t=1943625 "Guide").
Expand Down
4 changes: 0 additions & 4 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ endif
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel

PRODUCT_COPY_FILES += \
device/emulator/twrp/recovery/root/sbin/network_start.sh:recovery/root/sbin/network_start.sh \
device/emulator/twrp/recovery/root/sbin/create_partitions.sh:recovery/root/sbin/create_partitions.sh

$(call inherit-product, build/target/product/full.mk)

PRODUCT_NAME := teamwin_twrp
Expand Down
4 changes: 2 additions & 2 deletions recovery.fstab
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# mount point fstype device

/external_sd vfat /dev/block/mmcblk0p4 /dev/block/mmcblk0
/external_sd vfat /dev/block/mmcblk0p3 /dev/block/mmcblk0
/system ext4 /dev/block/mtdblock0
/data ext4 /dev/block/mtdblock1 length=-16384
/cache ext4 /dev/block/mmcblk0p3
/cache ext4 /dev/block/mtdblock2
/boot emmc /dev/block/mmcblk0p1
/recovery emmc /dev/block/mmcblk0p2
Loading