How to recreate dts file from a running Android device ?

As we have seen in “How to cross compile static dtc for ARM” we are able to get the DTC cross compiled statically which we will push to the embedded target which exposes the device tree from proc file system.

Using this statically compiled dtc, we will reverse engineer to create human readable DTS file which will give us many more insights into the running embedded target.

This post describes how you can push the DTC to Android device, but you can push/copy this to any device and recreate the DTS.

Execute below command on PC to push the statically compiled DTC binary to Android device using adb,

$ adb push dtc /sdcard/

Now, execute below commands on Android Device to regenerate the DTS file,

$ su
$ cd /
$ mount -o,remount,rw /system
$ mv /sdcard/dtc /system/bin
$ chmod 777 /system/bin/dtc
$ dtc -I fs /proc/device-tree -O dts

The above command will read the /proc/device-tree and recreate the human readable DTS source.

How to change whole app language in... x
How to change whole app language in android programmatically - Locale in android

Leave a Comment

Sign up to our newsletter!

ADB Commands Android Android Applications Android Build system Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia NDK / Middleware / HAL Operating System Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto Embedded Linux