<?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: Mubarrat Hasan</title>
    <description>The latest articles on DEV Community by Mubarrat Hasan (@mubarrat).</description>
    <link>https://dev.to/mubarrat</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%2F4272926%2F15b278db-a91c-429b-ac9b-2c4cb1e22bb1.png</url>
      <title>DEV Community: Mubarrat Hasan</title>
      <link>https://dev.to/mubarrat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mubarrat"/>
    <language>en</language>
    <item>
      <title>I've been building WinAnd: An attempt to run Android apps natively on Windows</title>
      <dc:creator>Mubarrat Hasan</dc:creator>
      <pubDate>Sun, 29 Nov 2026 20:16:52 +0000</pubDate>
      <link>https://dev.to/mubarrat/ive-been-building-winand-an-attempt-to-run-android-apps-natively-on-windows-1abg</link>
      <guid>https://dev.to/mubarrat/ive-been-building-winand-an-attempt-to-run-android-apps-natively-on-windows-1abg</guid>
      <description>&lt;p&gt;I've been working on something called &lt;strong&gt;WinAnd&lt;/strong&gt;, and I thought it was time to share it with other developers.&lt;/p&gt;

&lt;p&gt;The idea started with a question:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What if we could run Android applications on Windows without booting a Linux kernel, starting a virtual machine, or emulating an entire Android device?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Instead of building another emulator, I wanted to explore a different approach: a Windows-native compatibility layer that can execute Android applications inside Windows processes.&lt;/p&gt;

&lt;p&gt;That's what WinAnd is about.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Mubarrat/WinAnd" rel="noopener noreferrer"&gt;https://github.com/Mubarrat/WinAnd&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  So, what am I actually building?
&lt;/h2&gt;

&lt;p&gt;Android applications depend on quite a lot of infrastructure. There's ART, Bionic, Android framework libraries, system services, Linux APIs, ELF shared libraries, and much more.&lt;/p&gt;

&lt;p&gt;Making an APK run on Windows isn't simply a matter of opening the file and executing it. There's an entire environment expected by the application.&lt;/p&gt;

&lt;p&gt;I'm trying to recreate the necessary parts of that environment and connect them to Windows.&lt;/p&gt;

&lt;p&gt;The project has two main components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;WinAnd&lt;/strong&gt; handles the Windows side: packaging, launching, runtime management, and the host environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WinAndSys&lt;/strong&gt; contains the Android compatibility runtime and its system components.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted to keep these separate so they could evolve and be versioned independently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some of the interesting things I've been working on
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ELF loading
&lt;/h3&gt;

&lt;p&gt;Android native libraries are ELF binaries, not Windows PE files.&lt;/p&gt;

&lt;p&gt;I've been building an ELF loading and execution infrastructure for Android x86-64 libraries. This involves relocations, symbol resolution, TLS, and dealing with differences between the Linux and Windows execution environments.&lt;/p&gt;

&lt;p&gt;One particularly interesting challenge is that the guest and host have different expectations about thread state and execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bionic
&lt;/h3&gt;

&lt;p&gt;Android uses Bionic instead of Windows' native C runtime.&lt;/p&gt;

&lt;p&gt;So I've also been developing a Windows implementation of Bionic, translating Android/Linux-facing functionality into Windows facilities and WinAnd's virtual filesystem.&lt;/p&gt;

&lt;p&gt;This has involved filesystem operations, threading, synchronization, TLS, and plenty of smaller compatibility details.&lt;/p&gt;

&lt;p&gt;Some of these things are surprisingly easy to underestimate until you actually start implementing them.&lt;/p&gt;

&lt;h3&gt;
  
  
  ART
&lt;/h3&gt;

&lt;p&gt;This is probably the part I'm most excited about.&lt;/p&gt;

&lt;p&gt;Getting Android Runtime (ART) working is essential if I want to execute Android Java/Kotlin applications rather than merely load their native libraries.&lt;/p&gt;

&lt;p&gt;I've been integrating stock ART using staged Android platform artifacts.&lt;/p&gt;

&lt;p&gt;The process has exposed all kinds of interesting problems involving TLS, guest execution state, Linux system calls, linker namespaces, and runtime initialization.&lt;/p&gt;

&lt;p&gt;It's been a pretty deep learning experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where does it stand right now?
&lt;/h2&gt;

&lt;p&gt;There is already a considerable amount of infrastructure in place.&lt;/p&gt;

&lt;p&gt;Some things I've implemented and tested include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;APK packaging into Windows executables.&lt;/li&gt;
&lt;li&gt;ELF loading and execution fixtures.&lt;/li&gt;
&lt;li&gt;Guest TLS and GS-related execution.&lt;/li&gt;
&lt;li&gt;Linux syscall translation.&lt;/li&gt;
&lt;li&gt;Virtual filesystem operations.&lt;/li&gt;
&lt;li&gt;Runtime selection and management.&lt;/li&gt;
&lt;li&gt;Multiple native compatibility and regression test suites.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ART integration has also progressed through significant parts of its initialization process.&lt;/p&gt;

&lt;p&gt;But I want to be clear about something:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I haven't successfully created the Java VM yet, and I haven't launched an actual Android Activity.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I don't want to confuse loading libraries or passing individual tests with successfully running an Android application.&lt;/p&gt;

&lt;p&gt;Those are different milestones, and I'm working toward the latter.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;My immediate goal is to get &lt;code&gt;JNI_CreateJavaVM&lt;/code&gt; to return successfully.&lt;/p&gt;

&lt;p&gt;After that, I want to execute a known DEX method, then work toward launching an actual Android Activity in a Windows window.&lt;/p&gt;

&lt;p&gt;That first visible Activity would be a huge milestone for the project.&lt;/p&gt;

&lt;p&gt;There's still a lot to figure out after that, including framework compatibility, graphics, input, and application lifecycle.&lt;/p&gt;

&lt;p&gt;I'm not expecting everything to work immediately. I'd rather build the underlying pieces properly and understand the problems as they appear.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why am I sharing this?
&lt;/h2&gt;

&lt;p&gt;I think projects like this are interesting because they sit at the intersection of several areas of systems programming.&lt;/p&gt;

&lt;p&gt;You end up learning about operating systems, executable formats, calling conventions, thread-local storage, dynamic linking, runtime internals, and compatibility engineering all at once.&lt;/p&gt;

&lt;p&gt;I'm sharing WinAnd because I'd genuinely like other developers to look at the implementation.&lt;/p&gt;

&lt;p&gt;If you have experience with ELF loaders, Bionic, ART, operating-system compatibility layers, or Windows internals, I'd especially appreciate your thoughts.&lt;/p&gt;

&lt;p&gt;And if you simply find the idea interesting, feel free to explore the repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/Mubarrat/WinAnd" rel="noopener noreferrer"&gt;https://github.com/Mubarrat/WinAnd&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WinAnd is open source under the MIT License and is still very much a work in progress.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>cpp</category>
      <category>windows</category>
      <category>android</category>
    </item>
  </channel>
</rss>
