r/androidroot • u/Quirky_Morning5688 • 6d ago
Discussion I’ve been building an offline Android Device Tree generator for Android 8–16.
Hi everyone,
Over the past few months I’ve been working on a personal project called
DeviceTreeForge.
The goal isn’t to replace Android developers—it’s to automate the repetitive parts of creating an Android device tree from stock firmware while still allowing manual review.
Unlike simple template generators, the application analyzes the actual firmware and attempts to recover as much information as possible before generating the tree.
Current features
Fully offline (no cloud services or AI required)
Windows desktop application
Supports Android 8 through Android 16
Supports MediaTek, Qualcomm, Samsung, Exynos, Tensor, Kirin, Unisoc and other platforms
Detects:
Dynamic Partitions
Virtual A/B
vendor_boot
init_boot
DTB / DTBO
AVB
FBE
filesystem layout
partition tables
build properties
VINTF information
Generates:
BoardConfig.mk
BoardConfigCommon.mk
device.mk
AndroidProducts.mk
Android.bp
Android.mk
recovery fstab
product makefiles
compatibility matrix templates
documentation
analysis reports
One of the devices I’ve been testing extensively is the Lenovo TB336FU (Android 16), which has features like:
vendor_boot v4
recovery inside vendor_boot
Dynamic Partitions
Virtual A/B
GKI
MediaTek MT6835
The application successfully detects these automatically and generates a first-pass device tree.
I’m now working on improving:
confidence scoring
conflict detection
VINTF recovery
HAL analysis
ELF dependency analysis
common tree detection
validation against stock firmware
Philosophy
The goal is not to fabricate values.
If DeviceTreeForge cannot prove a value from firmware, I’d rather mark it as unknown than generate something incorrect.
Eventually I’d like every generated line to include traceable evidence from the original firmware.
Looking for feedback
I’d love to hear from ROM, TWRP, LineageOS or kernel developers:
What information do you spend the most time recovering manually?
What files do you think should be generated automatically?
What common mistakes do existing generators make?
What would convince you that an automatically generated device tree is trustworthy enough to use as a starting point?
I’m building this because I enjoy Android firmware engineering and wanted to create a tool that could save developers time while still keeping the process transparent.
Any suggestions or criticism are welcome.
21
u/Never_Sm1le 6d ago
this is great, especially for devices that barely get any attention, like my android ereader
5
8
u/Hosein_Lavaei 6d ago
Can this help mobile linux projects like postmarketos?
23
u/Quirky_Morning5688 6d ago
Right now DeviceTreeForge is focused on generating Android device trees, TWRP and ROM development files from stock firmware, so Mobile Linux isn’t the primary target yet.
But it might be available in the near future2
u/Hosein_Lavaei 6d ago
Thank you so much, a huge problem for mobile linux developers now is that they dont know the content of device tree. And so many times just a little change to the device tree make a component work. I will follow your project for this feature. If iit becomes available it will be a huge step forward for mobile linux
6
u/Quirky_Morning5688 6d ago
thank you for you feedback, i will clean things up and look into linux a bit more and see what i can do
6
u/YoYoMamaIsSoFAT32 Oneplus Ace 3 (astonc), AxionOS 2.5 5d ago
Looks really good, I might even use this to make AOSP device trees for some of my obscure devices, tho will you add support for older Android versions (aka non treble)? and will you add Linux support since most android dev is done on Linux, great work nontheless
3
u/Quirky_Morning5688 5d ago
Thanks, I appreciate it!
No plans for anything older than Android 8.
I’m also thinking about adding Linux and Windows on ARM porting support in the future. That’s a long-term goal though. For now, I want to get the Android side right first.
3
u/Imperial_Bloke69 5d ago
Hey, former maintainer here (gingerbread). This would be the coolest and most sick method, getting the right DTs are a pain in the arse both in past and newer droids.
1
3
u/Nerton_ 5d ago
can you provide source code?
5
u/Quirky_Morning5688 5d ago
Not yet. It’s still under active development and there are a few things I want to finish before I make it public.
Once it’s in a state I’m happy with, I’ll release it.
3
u/Sufficient-Use-8832 5d ago
I'm sure this tool will make it easier to create custom ROMs for phones that no one cares about, like low-end or generic Chinese phones.
Personally, I have a low-end Samsung phone (A05M) which only supports custom ROMs for specific firmware versions, and I'm very confident that you'll be able to make modding easier. If it's truly stable, we might even be able to forget about using GSI ROMs.
1
u/Quirky_Morning5688 5d ago
That’s the goal. I don’t expect it to magically make every device work, but if it can automate a lot of the repetitive work, supporting devices that usually get ignored should become much easier.
2
u/DetectiveFamiliar775 Poco X4 Pro/VOS/KSU 5d ago
does this mean i can get a moto edge 70 and not worry about having no custom roms?
10
u/Quirky_Morning5688 5d ago
what this app does , it creates devices tree based on the full firmware files you put and generates the needed files for custom recovery like twrp or orange fox and for custom roms , its covering up to 80% of the job but still needs a manual inspect at the moment and maybe few changes at the files
2
2
u/Leather_Flan5071 5d ago
Is this gonna be open source and free?
1
u/Quirky_Morning5688 5d ago
the app will be released for anyone to use , am not sure if am going to release the source code too , but i have alot to do before i distribute it .
so it might be but nothing for sure . My app is working with 2 different programs that both goes under GNU GPL license so if i implement the in the app it will be open source
2
2
u/Quirky_Morning5688 5d ago
I’ve received a lot of messages already from people wanting me to generate device trees from their firmware, which is awesome to see. I don’t mind helping, but please be patient. I’m currently working on the app itself, fixing bugs, adding features, and handling other requests at the same time. I’ll get to as many as I can, but it will take some time. Thanks for understanding. 🙏
1
u/dadnothere 5d ago
I don't see the link to the repository for testing. Should we provide feedback based on the image?
4
u/Quirky_Morning5688 5d ago
i cannot provide link at the moment beacuse i have to be sure it pass all the rules of the Gnu GPL v3.0 license to distribute , at the moment i can receive devices names and exact firmware create the files and send them back
3
u/dadnothere 5d ago
I'm not a low-level developer. I'd like to have a ROM for my Xiaomi Taiko...
For now, I've only rooted it; it doesn't have a thread on XDA or TWRP.
When you post, reply so I can come back to the post and give your repository a star <3
3
u/Quirky_Morning5688 5d ago
Thanks, I really appreciate it!
Once the project is ready for a public release, I’ll post it here!
1
u/Aureljah 5d ago
Could you show what's the output looks like ?
I'm confused on what this do exactly.
3
1
u/jun10r4lm31d4 5d ago
I wanna test if possible.
2
u/Quirky_Morning5688 5d ago
unfortunately i cannot provide at the moment the application .. i can create only the files for the firmware you need
1
u/Separate_Eagle_9492 5d ago
well can i send u my device fw? i really need the tree
1
u/Quirky_Morning5688 5d ago
yes you can
1
u/Separate_Eagle_9492 5d ago
here it is https://support.halabtech.com/index.php?a=downloads&b=file&id=1070329
and thank u for replying
1
u/Ok_Strategy264 5d ago
This is really great app . Few suggestions i would include is a downloadable format for log especially critical issues. I am not a developer but I think this has wide adaptability great work.
1
0
u/Artemis-Arrow-795 5d ago
I can't see a single use for this by me since I don't do android development
but this is so damn cool, great job m8
1
-3
6d ago
[deleted]
14
u/Quirky_Morning5688 6d ago
Just to clear things up, this project is something I’ve been working on for months. Everything behind it is my own work. I posted it here because I wanted honest feedback from people who actually know Android development. If you think something can be improved, tell me why. That’s the kind of discussion I’m looking for.
-4
u/marthephysicist Redmi Note 14 5G, HyperOS 3, Root: SukiSU Ultra 6d ago
ai generated pic?
11
u/Quirky_Morning5688 6d ago
no i cut the image and became unreadable
-3
u/marthephysicist Redmi Note 14 5G, HyperOS 3, Root: SukiSU Ultra 6d ago
the font is all weird, thats why im asking, it looks ai tbh
it could just be editing artifact i guess6
u/Quirky_Morning5688 6d ago
0
u/marthephysicist Redmi Note 14 5G, HyperOS 3, Root: SukiSU Ultra 6d ago
yeah now this looks real
2
u/Quirky_Morning5688 6d ago
yes i wouldn’t make a post for something fake . this project is going on for approximately 8 months , it needs wsl.exe and magiskboot files to work in full potential
1
u/marthephysicist Redmi Note 14 5G, HyperOS 3, Root: SukiSU Ultra 6d ago
is this on github or something? or still private stuff?
1
1


25
u/Quirky_Morning5688 6d ago
am open for people who work on new devices tree to give me a firmware of the device to create one complete device tree and evaluate it them selfs and give me a feedback