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.

Implementation details

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.

Gotchas and common issues

  • Permission checks - verify user access rights and sudo privileges before executing system-level operations.

  • Environment configuration - double-check path variables and dependency versions to prevent runtime failures.

  • Backup safeguards - maintain configuration backups before applying system or database modifications.

Following these steps ensures clean configuration and reliable execution for recreate dts file from a running android device.