Skip to main content

twrpdtgen

PyPi version Codacy Badge

Create a TWRP-compatible device tree only from an Android recovery image (or a boot image if the device uses non-dynamic partitions A/B) of your device's stock ROM It has been confirmed that this script supports images built starting from Android 4.4 up to Android 12

Requires Python 3.8 or greater

Installation

pip3 install twrpdtgen

Linux only: Be sure to have cpio installed in your system (Install cpio using sudo apt install cpio or sudo pacman -S cpio based on what package manager you're using)

Instructions

python3 -m twrpdtgen <path to image>

When an image is provided, if everything goes well, there will be a device tree at output/manufacturer/codename

You can also use the module in a script, with the following code:

from twrpdtgen.device_tree import DeviceTree

# Get image info
device_tree = DeviceTree(image_path)

# Dump device tree to folder
device_tree.dump_to_folder(output_path)

License

#
# Copyright (C) 2022 The Android Open Source Project
#
# SPDX-License-Identifier: Apache-2.0
#

Metadata

Release files for twrpdtgen 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for twrpdtgen 3.0.0
File Size Uploaded
twrpdtgen-3.0.0.tar.gz 10.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for twrpdtgen 3.0.0
File Interpreter ABI Platform
twrpdtgen-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.5 kB

Release files / twrpdtgen-3.0.0.tar.gz

Download URL twrpdtgen-3.0.0.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
588a018619d20414cbe524e691fda7698aad772ce4d764d95110d10e1f9e86d3
BLAKE2b-256 checksum
How to use checksums
c9307a59f0f1f22ef64527863597df1040d380a3ef578444ffd1e61e66983588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.10.7 Linux/5.19.10-arch1-1

Release files / twrpdtgen-3.0.0-py3-none-any.whl

Download URL twrpdtgen-3.0.0-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e376ccfd55020aad691a44faac04001560655562b90a052b67453b974d12e3c5
BLAKE2b-256 checksum
How to use checksums
3b3d275eca2f1d4ec5728bd752b5d09e99eb398577ff147f206dbc30094015fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.10.7 Linux/5.19.10-arch1-1

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page