<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sobuj Miah</title>
    <description>The latest articles on DEV Community by Sobuj Miah (@soobujmiah).</description>
    <link>https://dev.to/soobujmiah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4127675%2F078572a4-1901-46b7-a309-2b570e36be22.png</url>
      <title>DEV Community: Sobuj Miah</title>
      <link>https://dev.to/soobujmiah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/soobujmiah"/>
    <language>en</language>
    <item>
      <title>Building a Real Android Development Loop on an ARM64 Phone with Ternux + ADT</title>
      <dc:creator>Sobuj Miah</dc:creator>
      <pubDate>Thu, 17 Sep 2026 22:47:29 +0000</pubDate>
      <link>https://dev.to/soobujmiah/building-an-arm64-android-development-environment-adt-ternux-4bi1</link>
      <guid>https://dev.to/soobujmiah/building-an-arm64-android-development-environment-adt-ternux-4bi1</guid>
      <description>&lt;p&gt;What if your Android phone could be more than the device you build for?&lt;/p&gt;

&lt;p&gt;What if it could also be the Linux development environment you build on, while remaining connected to a real Android device for the complete build, test, debug, and validation cycle?&lt;/p&gt;

&lt;p&gt;That is the direction I am exploring with two projects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ternux — a Debian + Xfce4 Linux workspace on Android using Termux and PRoot&lt;/li&gt;
&lt;li&gt;ADT — a native ARM64 Android development toolchain for Linux&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Together, they create an interesting workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Write / Modify Code
        ↓
      Build
        ↓
      Sign
        ↓
   ADB Install
        ↓
   Real Device
        ↓
      Test
        ↓
   Read Logs
        ↓
     Debug
        ↓
      Fix
        ↓
     Rebuild
        ↓
     Repeat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part is the loop.&lt;/p&gt;

&lt;p&gt;Ternux: the Linux workspace&lt;/p&gt;

&lt;p&gt;Ternux provides a Debian + Xfce4 Linux environment directly on an ARM64 Android device through Termux and PRoot.&lt;/p&gt;

&lt;p&gt;It provides the userspace needed for development while using the Android device's existing kernel.&lt;/p&gt;

&lt;p&gt;The environment can include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Debian ARM64
- Xfce4
- Termux:X11
- Linux development tools
- Git
- compilers and build tools
- Mesa graphics
- Zink → Turnip on supported Adreno devices
- Vulkan tools
- optional LLM and development workloads
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;No Android root is required.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The goal is not to emulate another computer.&lt;/p&gt;

&lt;p&gt;It is to turn the Android device itself into a portable Linux workspace.&lt;/p&gt;

&lt;p&gt;ADT: the Android development layer&lt;/p&gt;

&lt;p&gt;Ternux provides the workspace.&lt;/p&gt;

&lt;p&gt;ADT provides the Android development toolchain.&lt;/p&gt;

&lt;p&gt;ADT targets Linux ARM64 environments and provides native ARM64 Android build and platform tooling, including:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- "aapt"
- "aapt2"
- "aidl"
- "zipalign"
- "dexdump"
- "adb"
- "fastboot"
- "apksigner"
- "d8"
- Android platforms
- supporting JDK/CMake/Ninja tooling
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important distinction is that ADT is not simply a collection of Android binaries.&lt;/p&gt;

&lt;p&gt;The host tools are built for the ARM64 Linux environment.&lt;/p&gt;

&lt;p&gt;That makes an ARM64 Android phone running Ternux a viable host for the development workflow.&lt;/p&gt;

&lt;p&gt;The real-device connection changes the workflow&lt;/p&gt;

&lt;p&gt;A build environment becomes much more useful when it can communicate with the actual Android device.&lt;/p&gt;

&lt;p&gt;ADB provides that bridge.&lt;/p&gt;

&lt;p&gt;From the Linux/PRoot environment, the development workflow can communicate with an Android device through ADB when the device is appropriately paired and accessible.&lt;/p&gt;

&lt;p&gt;That means the developer does not have to stop after:&lt;/p&gt;

&lt;p&gt;source → compile → APK&lt;/p&gt;

&lt;p&gt;The APK can continue through:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APK
 ↓
ADB
 ↓
Install
 ↓
Launch
 ↓
Test on real hardware
 ↓
Collect logs
 ↓
Diagnose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is important because a successful compilation does not prove that an application works correctly on the target device.&lt;/p&gt;

&lt;p&gt;Real-device testing exposes things that compilation alone cannot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- ABI problems
- JNI loading failures
- runtime crashes
- permission issues
- device-specific behavior
- graphics/runtime problems
- process failures
- incorrect assumptions about the Android environment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Manual development loop&lt;/p&gt;

&lt;p&gt;The simplest version is completely manual.&lt;/p&gt;

&lt;p&gt;A developer can work inside Ternux, use ADT to build the application, connect to the device through ADB, install the APK, run it, inspect the result, and then return to the source.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────┐
│ Edit source  │
└──────┬───────┘
       ↓
┌──────────────┐
│ Build + Sign │
└──────┬───────┘
       ↓
┌──────────────┐
│ ADB Install  │
└──────┬───────┘
       ↓
┌──────────────┐
│ Real Device  │
└──────┬───────┘
       ↓
┌──────────────┐
│ Test + Logs  │
└──────┬───────┘
       ↓
┌──────────────┐
│ Debug + Fix  │
└──────┬───────┘
       │
       └──────────→ Build again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a short feedback loop between development and reality.&lt;/p&gt;

&lt;p&gt;Why the real device matters&lt;/p&gt;

&lt;p&gt;A simulator or static build check can answer some questions.&lt;/p&gt;

&lt;p&gt;A physical device answers different questions.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;«Did the native library actually load?»&lt;/p&gt;

&lt;p&gt;«Did Android select the expected "arm64-v8a" binary?»&lt;/p&gt;

&lt;p&gt;«Does the application process remain alive?»&lt;/p&gt;

&lt;p&gt;«What does "logcat" report?»&lt;/p&gt;

&lt;p&gt;«Does the application behave correctly on this specific Android version and hardware?»&lt;/p&gt;

&lt;p&gt;Those questions require execution.&lt;/p&gt;

&lt;p&gt;That is why ADT's validation work focuses on the complete path rather than simply checking whether binaries exist.&lt;/p&gt;

&lt;p&gt;The documented validation chain is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Native source
    ↓
ARM64 shared library
    ↓
APK packaging
    ↓
Signing
    ↓
ADB installation
    ↓
ARM64 ABI selection
    ↓
JNI loading
    ↓
Native execution
    ↓
Log output
    ↓
Process remains alive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From manual testing to agent-assisted development&lt;/p&gt;

&lt;p&gt;This is where the architecture becomes more interesting.&lt;/p&gt;

&lt;p&gt;Once the development environment, build tools, ADB access, logs, and source tree are available from the same Linux workspace, an agent can potentially operate the same feedback loop.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;/p&gt;

&lt;p&gt;Human:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;build → install → test → read logs → diagnose → fix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the workflow can become:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent
  ↓
Modify code
  ↓
Build
  ↓
Install with ADB
  ↓
Run/test
  ↓
Collect logs
  ↓
Analyze failure
  ↓
Modify code
  ↓
Build again
  ↓
Repeat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent does not need a special imaginary development environment.&lt;/p&gt;

&lt;p&gt;It can use the same tools a developer uses.&lt;/p&gt;

&lt;p&gt;For example, an agent operating inside the Linux/PRoot environment could conceptually invoke:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./gradlew assembleDebug
adb &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; app-debug.apk
adb shell am force-stop com.example.app
adb shell monkey &lt;span class="nt"&gt;-p&lt;/span&gt; com.example.app 1
adb logcat &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then it can inspect the output, identify a failure, make a controlled change, and start another iteration.&lt;/p&gt;

&lt;p&gt;The important boundary: autonomy needs control&lt;/p&gt;

&lt;p&gt;Autonomous execution does not mean giving an agent unrestricted access to everything on the phone.&lt;/p&gt;

&lt;p&gt;A safer architecture is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 Agent
                   │
                   ▼
            Ternux / PRoot
                   │
          ┌────────┴────────┐
          │                 │
       Source            Toolchain
          │                 │
          └────────┬────────┘
                   ▼
                  ADB
                   │
                   ▼
             Android Device

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent should operate within explicit permissions and a defined task boundary.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Task
 ↓
Build
 ↓
Install
 ↓
Run test
 ↓
Collect evidence
 ↓
Diagnose
 ↓
Propose/apply fix
 ↓
Re-test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A human can remain the authority over what the agent is allowed to change, while the repetitive build/test/debug cycle becomes automatable.&lt;/p&gt;

&lt;p&gt;Why I find this interesting&lt;/p&gt;

&lt;p&gt;The interesting idea is not simply:&lt;/p&gt;

&lt;p&gt;"Linux on Android."&lt;/p&gt;

&lt;p&gt;And it is not simply:&lt;/p&gt;

&lt;p&gt;"Android development on ARM64."&lt;/p&gt;

&lt;p&gt;It is the combination:&lt;/p&gt;

&lt;p&gt;«A portable ARM64 development environment connected to real Android hardware, with a feedback loop that can be operated manually or progressively automated by development agents.»&lt;/p&gt;

&lt;p&gt;That changes the phone from a passive target into an active development workstation.&lt;/p&gt;

&lt;p&gt;Two projects, one workflow&lt;/p&gt;

&lt;p&gt;The architecture can be summarized simply:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    Android Phone
                         │
                Termux + PRoot
                         │
                 ┌───────┴───────┐
                 │               │
              Ternux            ADT
                 │               │
           Linux workspace   Android tooling
                 │               │
                 └───────┬───────┘
                         │
                        ADB
                         │
                         ▼
                 Real Android Device
                         │
                 Test / Logs / Debug
                         │
                         └──────→ Fix

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ternux provides the Linux environment.&lt;/p&gt;

&lt;p&gt;ADT provides the Android development toolchain.&lt;/p&gt;

&lt;p&gt;ADB provides the device connection.&lt;/p&gt;

&lt;p&gt;The real device provides execution evidence.&lt;/p&gt;

&lt;p&gt;And an agent can potentially sit above the workflow and automate the repetitive parts.&lt;/p&gt;

&lt;p&gt;What I am exploring next&lt;/p&gt;

&lt;p&gt;The next step is not simply adding more tools.&lt;/p&gt;

&lt;p&gt;It is making the feedback loop increasingly reproducible:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build → Install → Test → Observe → Diagnose → Fix → Validate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with clear evidence at every stage.&lt;/p&gt;

&lt;p&gt;That could eventually make an ARM64 Android phone a surprisingly capable development platform—not because it replaces every desktop workflow, but because it makes development, testing, and automation possible on the same physical hardware.&lt;/p&gt;

&lt;p&gt;Projects&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Ternux" (&lt;a href="https://github.com/soobujmiah/ternux" rel="noopener noreferrer"&gt;https://github.com/soobujmiah/ternux&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;"ADT" (&lt;a href="https://github.com/soobujmiah/adt" rel="noopener noreferrer"&gt;https://github.com/soobujmiah/adt&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;"Portfolio" (&lt;a href="https://soobujmiah.github.io" rel="noopener noreferrer"&gt;https://soobujmiah.github.io&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am building this in public and documenting what is verified, what is observed, what is experimental, and what still needs testing.&lt;/p&gt;

</description>
      <category>termux</category>
      <category>linux</category>
      <category>development</category>
      <category>androiddev</category>
    </item>
  </channel>
</rss>
