Skip to content

Device configs for making a ramdisk-recovery.img that you can boot in the Android emulator

Notifications You must be signed in to change notification settings

FilipinOTech/android_device_emulator_twrp

 
 

Repository files navigation

Team Win Recovery Project (TWRP)

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

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

More information about the project.

If you have code changes to submit those should be pushed to OmniROM's gerrit instance. A guide can be found here.

About

Device configs for making a ramdisk-recovery.img that you can boot in the Android emulator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 55.9%
  • Makefile 23.8%
  • Shell 20.3%