I've been working on something called WinAnd, and I thought it was time to share it with other developers.

The idea started with a question:

What if we could run Android applications on Windows without booting a Linux kernel, starting a virtual machine, or emulating an entire Android device?

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.

That's what WinAnd is about.

GitHub: https://github.com/Mubarrat/WinAnd

So, what am I actually building?

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.

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.

I'm trying to recreate the necessary parts of that environment and connect them to Windows.

The project has two main components:

  • WinAnd handles the Windows side: packaging, launching, runtime management, and the host environment.
  • WinAndSys contains the Android compatibility runtime and its system components.

I wanted to keep these separate so they could evolve and be versioned independently.

Some of the interesting things I've been working on

ELF loading

Android native libraries are ELF binaries, not Windows PE files.

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.

One particularly interesting challenge is that the guest and host have different expectations about thread state and execution.

Bionic

Android uses Bionic instead of Windows' native C runtime.

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

This has involved filesystem operations, threading, synchronization, TLS, and plenty of smaller compatibility details.

Some of these things are surprisingly easy to underestimate until you actually start implementing them.

ART

This is probably the part I'm most excited about.

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

I've been integrating stock ART using staged Android platform artifacts.

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

It's been a pretty deep learning experience.

Where does it stand right now?

There is already a considerable amount of infrastructure in place.

Some things I've implemented and tested include:

  • APK packaging into Windows executables.
  • ELF loading and execution fixtures.
  • Guest TLS and GS-related execution.
  • Linux syscall translation.
  • Virtual filesystem operations.
  • Runtime selection and management.
  • Multiple native compatibility and regression test suites.

ART integration has also progressed through significant parts of its initialization process.

But I want to be clear about something:

I haven't successfully created the Java VM yet, and I haven't launched an actual Android Activity.

I don't want to confuse loading libraries or passing individual tests with successfully running an Android application.

Those are different milestones, and I'm working toward the latter.

What's next?

My immediate goal is to get JNI_CreateJavaVM to return successfully.

After that, I want to execute a known DEX method, then work toward launching an actual Android Activity in a Windows window.

That first visible Activity would be a huge milestone for the project.

There's still a lot to figure out after that, including framework compatibility, graphics, input, and application lifecycle.

I'm not expecting everything to work immediately. I'd rather build the underlying pieces properly and understand the problems as they appear.

Why am I sharing this?

I think projects like this are interesting because they sit at the intersection of several areas of systems programming.

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

I'm sharing WinAnd because I'd genuinely like other developers to look at the implementation.

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

And if you simply find the idea interesting, feel free to explore the repository.

Repository: https://github.com/Mubarrat/WinAnd

WinAnd is open source under the MIT License and is still very much a work in progress.