[SCRIPT][BASH]TWRP device tree generator[v1.1]

156 posts
Thanks Meter: 504
Post Reply Email Thread

Create a TWRP-compatible device tree only from a recovery.img and (optional) ADB

With this script I tried to write TwrpBuilder script in Bash, and somehow I succeded, supporing more features

  • Create device tree initial structure (like, etc.)
  • Add proper license headers in every file
  • Automatically detect device architecture
  • Pick stock recovery image info (eg. image size, kernel pagesize etc.)
  • Inherit more infos directly from the device with ADB (optional)
  • Create ad-hoc recovery.fstab
  • Add needed init.rc files
  • Take cmdline automatically
  • A/B support
  • System-as-root support
  • dt.img support (not appended DTBs)
  • dtbo.img support (device tree blobs overlay)
  • Samsung Odin TAR support
  • Samsung SEAndroid support
  • Ramdisk compression support (LZMA, 7Z, GZIP etc...)
  • MTK support
  • Extract stock kernel automatically
  • Fill without needing to inherit external makefiles (like TwrpBuilder does), making a clean and standalone device tree
  • Easily improveable with a text editor, w/o needing to know any programming language
  • Create a ready-to-push git repo in device tree folder

What is needed
  • A PC or a server with Linux, Bash and Git installed
  • Stock recovery image from a device OTA or a ROM dump
  • (optional) you can use ADB to retrieve additional informations

How to use it
  • Clone the repo
  • Open a terminal
  • Write
  • Follow the instructions

XDA:DevDB Information
[SCRIPT][BASH]TWRP device tree generator[v1.1], Tool/Utility for all devices (see above for details)

Source Code:

Version Information
Status: Stable
Current Stable Version: v1.2

Created 2020-04-19
Last Updated 2020-05-11
The Following 13 Users Say Thank You to SebaUbuntu For This Useful Post: [ View ] Gift SebaUbuntu Ad-Free
12th May 2020, 03:24 AM |#3  
Thanks Meter: 8
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2020-05-12 11-11-30.png
Views:	780
Size:	224.9 KB
ID:	5016925   Click image for larger version

Name:	Screenshot from 2020-05-12 11-22-49.png
Views:	770
Size:	92.8 KB
ID:	5016927  
The Following User Says Thank You to Royna For This Useful Post: [ View ] Gift Royna Ad-Free
18th June 2020, 02:33 PM |#4  
Erwin Abs's Avatar
Senior Member
Thanks Meter: 123
Donate to Me
is there a los tree generator device sir? 😁
15th August 2020, 01:53 PM |#5  
Thanks Meter: 30
Hi, trying to use this but I get error Arch not supported on my poco f2 pro. Any idea?
27th August 2020, 08:55 AM |#6  
TheSync's Avatar
Senior Member
Flag Sumedang
Thanks Meter: 1,228
Donate to Me
Amazing work, this tool useful for create basic configuration for recovery
12th September 2020, 07:29 PM |#7  
Junior Member
Thanks Meter: 5
Nice work!
but the descriptions says samsung odin tar support.
script accepts only .img files.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes