The emulator Bochs is a powerful tool for running x86 architecture on devices with other processors, including smartphones on Android. With its help, you can emulate old versions Windows (95/98/ME), DOS, Linux and even experiment with assembler. But installing Bochs on a mobile device has nuances: from choosing the right build to manually setting up configuration files.

Many users encounter problems when they first start - the emulator either does not start or works extremely slowly. The reason often lies in incorrect settings bochsrc.txt or the absence of BIOS binaries. In this article we will analyze three working installation methods (including the option without root), optimal settings for Android 10-14, as well as ways to speed up emulation through JIT compilation and dynamic translation.

โš ๏ธ Attention: Bochs does not support hardware graphics acceleration on most Android devices. For comfortable work, you will need a smartphone with a processor Snapdragon 8xx/Dimensity 9000 or similar in performance. On weak chips (for example Helio G80), emulation will be extremely slow, even with optimized settings.

Before starting, make sure that there is enough free space on the device - the disk image with Windows 95 occupies ~300 MB, and for Windows XP at least 1.5 GB will be required. Also prepare the BIOS files (BIOS-bochs-latest) and, if necessary, a boot floppy image (boot.img).

1. Which Bochs to choose for Android: comparison of assemblies

There is no official version of Bochs for Android , but there are several adapted assemblies from the community. Their key differences - support JIT, compatibility with architecture ARM64 and the presence of a graphical interface.

The most popular options:

  • ๐Ÿ“ฑ aBochs - ported version with a minimalistic GUI, supports SDL2 for graphics output Suitable. for Android 7+, but requires manual configuration of configs. Minus: there is no built-in image manager.
  • ๐Ÿ”ง Bochs for Termux โ€”console version, installed via Termux with graphics proxying via XServer XSDL. Plus: maximum flexibility of settings, minus: difficulty of installation for beginners.
  • โšก Bochs-PCEm (modification) - a hybrid of Bochs and PCEm, optimized for emulation IBM PC-compatible machines. Includes pre-configured profiles for DOS 6.22 and Windows 3.1.

For most users, aBochs โ€”it is easier to set up and has a graphical interface. Termux version suitable for those who plan to automate startup through scripts or use the emulator in conjunction with other tools (for example, QEMU).

โš ๏ธ Attention: Bochs assemblies from unverified sources (for example, with torrent trackers) may contain malicious code. Download files only from official repositories (GitHub) or trusted forums (XDA Developers, 4PDA).

๐Ÿ“Š What OS are you planning to emulate in Bochs?
Windows 95/98
DOS
Linux
Windows XP
Other

2. Step-by-step installation of aBochs on Android

Let's consider installation via aBochs โ€”the most universal option. The instructions are suitable for devices on Android 8.0 and newer, including Android 14.

Step. 1. Downloading files. folder

  • ๐Ÿ“ Download the APK file aBochs With GitHub (latest version - 2.7-stable).
  • ๐Ÿ’พ Download the archive from the BIOS (BIOS-bochs-latest) and unpack it into a folder /sdcard/bochs/bios/.
  • ๐Ÿ–ฅ๏ธ Prepare a disk image (for example, win95.img) or a boot floppy disk (freedos.img).

Step 2. APK installation

Before installation, allow the installation of applications from unknown sources:

  1. Go to Settings โ†’ Security โ†’ Unknown sources.
  2. Select the browser or file manager through which you will install the APK.
  3. Run the downloaded file aBochs.apk and follow instructions.

Step 3. Initial setup

When you first start aBochs you will be prompted to create a configuration file. Select the option "Create new config" and specify:

  • ๐Ÿ“‹ Configuration name (for example, win95).
  • ๐Ÿ–ฅ๏ธ Path to BIOS (/sdcard/bochs/bios/BIOS-bochs-latest).
  • ๐Ÿ’พ Path to disk image (/sdcard/bochs/disks/win95.img).
  • ๐Ÿ”„ Type of emulated processor (Pentium or 486 for DOS, Pentium MMX for Windows 95).

Downloaded APK file aBochs|Unpacked archive with BIOS in /sdcard/bochs/bios/|A disk image has been created (or a ready-made one has been downloaded)|Installation from unknown sources is allowed|Free space has been checked (minimum 1 GB)-->

3. Setting up a configuration file bochsrc.txt

File bochsrc.txt is the heart of Bochs. Its parameters determine whether the system will boot and at what speed it will work. Let's look at the key directives for emulation Windows 95:

Basic parameters:


Basic settings

megs: 64 # Amount of RAM (64 MB is enough for Win95)

romimage: file=/sdcard/bochs/bios/BIOS-bochs-latest

vgaromimage: file=/sdcard/bochs/bios/VGABIOS-lgpl-latest

boot: disk # Boot from disk (or 'floppy' for a floppy disk)

Hard disk

ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14

ata0-master: type=disk, path="/sdcard/bochs/disks/win95.img", mode=flat, cylinders=1024, heads=16, spt=63

Input devices

keyboard: type=mf, serial_delay=250, paste_delay=100000

mouse: enabled=1, type=ps2

Performance optimization:

To speed up emulation, add to the end of the file:


Enable JIT compilation (requires ARM64 support)

cpu: count=1, ips=1000000, model=pentium_mmx, reset_on_triple_fault=1, ignore_bad_msrs=1

magic_break: enabled=0

Graphics optimization

vga: extension=vbe, update_frequency=15

โš ๏ธ Attention: Parameter ips=1000000 sets the number of instructions per second. On weak devices (Snapdragon 6xx and below), reduce the value to 500000, otherwise the emulator will slow down or crash.

Critical detail: if you are emulating Windows 95, be sure to add line ne2k: enabled=1, ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=linux, ethdev=tap0 to support the network (without it, the installation will fail with an error "No network adapters found").

Parameter Value for DOS Value for Windows 95 Value for Windows XP
megs 16 64 256
cpu model 486 pentium_mmx pentium4
vga extension none vbe vbe + update_frequency=30
ata0-master mode flat flat concat (for images >2 GB)

4. Installing Windows 95 in Bochs on Android

Installation process Windows 95 in Bochs on a mobile device takes ~1.5-2 hours and requires preliminary preparation of a disk image. Here is a step-by-step algorithm:

Step 1. Create a disk image

Use the utility bximage (included with Bochs) to create a virtual hard disk:

bximage -hd=600 -func=create -q win95.img

Where 600 โ€”size in megabytes (minimum 500 MB for Win95).

Step 2. Preparing a boot floppy

Download the boot floppy image from FreeDOS (freedos.img) and place it in a folder /sdcard/bochs/disks/. In the file, add the line: Step 3. Start installation data-i="163">After downloading bochsrc.txt add the line:

floppya: 1_44=/sdcard/bochs/disks/freedos.img, status=inserted

Step 3: Start the installation

  1. Run aBochs and select the created config.
  2. From the boot menu select Boot from floppy (a:).
  3. After downloading FreeDOS run the command:
    fdisk

    Create a primary partition and format it (format c: /s).

  4. Mount the ISO image Windows 95 as a virtual CD-ROM (add to bochsrc.txt:
    ata0-slave: type=cdrom, path="/sdcard/bochs/isos/win95.iso", status=inserted
  5. Reboot the emulator (Ctrl+Alt+Del to Bochs) and run the installation from CD-ROM (D: โ†’ setup.exe).
๐Ÿ’ก

If the installation freezes at the stage of copying files, reduce the parameter ips to bochsrc.txt to 300000 and disable JIT (add line cpu: ips=300000, jit_compiler=0).

5. Solving common errors

Bochs on Android often produces cryptic errors, especially on the first launches. Let's look at the most common problems and ways to fix them:

Error: "Panic: No bootable device"

  • ๐Ÿ”น Cause: Incorrect path to the disk image in bochsrc.txt or missing boot sector.
  • ๐Ÿ”น Solution: Check the settings ata0-master: path and boot: disk. If you are using a floppy disk, make sure it is mounted (floppya: status=inserted).

Error: "Segmentation fault" at startup

  • ๐Ÿ”น Cause: Incompatibility of the Bochs assembly with the processor architecture (for example, ARMv7 instead of ARM64).
  • ๐Ÿ”น Solution: Download the version of Bochs compiled for your architecture. You can find it through the app. 95 CPU-Z (chapter SoC โ†’ Architecture).

Error: "Network adapter not found" in Windows 95

  • ๐Ÿ”น Cause: The network card configuration line is missing in bochsrc.txt.
  • ๐Ÿ”น Solution: Add parameters for ne2k (see section 3) and restart the emulator.

Problem: Slow operation (1-2 FPS)

  • ๐Ÿ”น Reason:
    • None JIT compilation (check cpu: jit_compiler=1).
    • The resolution of the emulated screen is too high (reduce vga: update_frequency).
    • Background processes on Android (close all applications through Settings โ†’ Applications).
How to speed up Bochs on weak devices

1. Reduce the amount of emulated RAM to 32 MB (megs: 32).

2. Turn off the sound (sb16: enabled=0).

3. Use cpu: model=486 instead of Pentium.

4. Replace vga extension=vbe with none (disables graphics acceleration, but will increase FPS).

5. Install ips=200000 and disable JIT (jit_compiler=0).

6. Alternatives to Bochs for Android

If Bochs is too slow or won't start, consider alternative emulators x86 for Android:

  • ๐Ÿš€ QEMU - supports hardware virtualization on devices with ARMv8 i Snapdragon 8xx. 2-3 times faster than Bochs, but requires root for full operation. Minus: complex network setup.
  • ๐Ÿ–ฅ๏ธ Limbo PC Emulator - graphical frontend for QEMU. Supports Windows XP i Linux "out of the box", but paid version (~$5).
  • ๐Ÿ’ป DOSBox Turbo - optimized for DOS games and applications. Not suitable for Windows, but works faster than Bochs on 90% of devices.
  • ๐Ÿ”„ ExaGear (outdated) โ€”previously allowed to run x86applications on ARM, but is no longer supported. Alternative - Box86/Box64 (requires root).

Performance comparison (test on Snapdragon 865):

Emulator Windows 95 (FPS) DOS (FPS) Requires root? Setting complexity
Bochs 5-10 15-20 No High
QEMU 15-25 30-50 Desirable Average
Limbo 20-30 40-60 No Low
DOSBox Turbo โ€” 50-100 No Low

โš ๏ธ Attention: Emulators x86 on ARMdevices will never work as fast as native applications If you need high. performance (for example, for games), consider remote access to the PC via Moonlight or Parsec.

7. Optimizing Bochs for games and multimedia

Bochs can be used not only to run the OS, but also for retro games (Doom, Quake) or multimedia (Winamp, QuickTime). This will require additional settings:

Sound settings:

Add to bochsrc.txt:


sb16: enabled=1, wavemode=1, loglevel=0, log=sb16.log, dmatimer=8254-systimer

speaker: enabled=1, mode=soundblaster

For Android 10+ may be required manually setting rights to record sound (allow access to the microphone in the application settings).

Graphics acceleration for games:

For Doom or Duke Nukem 3D use:


vga: extension=vbe, update_frequency=25

Disable unnecessary devices

parallel: enabled=0

serial: enabled=0

Example config for Quake:


cpu: model=pentium_mmx, ips=1500000, jit_compiler=1

vga: extension=vbe, update_frequency=30

sb16: enabled=1, midimode=0, wavemode=1

ne2k: enabled=0 # Disable the network for games

๐Ÿ’ก

For maximum FPS in games, reduce the resolution of the emulated screen up to 640x480 and turn off all unnecessary devices (printer, COM ports, network).

8. Security: risks and recommendations

Emulating older OSes on Android is associated with several risks:

  1. Guest OS vulnerabilities: Windows 95/98 have not received security updates for more than 20 years. Do not connect the emulated system to real networks (use ne2k: ethmod=null).
  2. Permissions issues: Bochs requests access to storage, microphone and network. Limit rights via Settings โ†’ Applications โ†’ Bochs โ†’ Permissions.
  3. Overheating of the device: Long-term emulation loads the processor. Use a cooling pad or limit the operating time (no more than 1 hour continuously).

Safety recommendations:

  • ๐Ÿ”’ Isolate Bochs from personal data: do not mount real Android folders in the emulator.
  • ๐Ÿ›ก๏ธ Use a sandbox: create a separate user on Android (if supported) to work with Bochs.
  • ๐Ÿ”„ Clear the application cache regularly through Settings โ†’ Storage โ†’ Cache Bochs.

โš ๏ธ Attention: Do not enter real passwords or bank card data in emulated OS. Attackers can intercept traffic through vulnerabilities in ne2knetwork emulation.

If you need a secure one. environment for software testing, consider UserLAnd (isolated Linux containers) or VirtualBox on a PC with forwarding to Android via RDP.

๐Ÿ“Š Have you already tried running Bochs on Android?
Yes, it worked.
Yes, but it didnโ€™t work
No, Iโ€™m just reading the instructions
I tried alternatives (QEMU, Limbo)

FAQ: Frequently asked questions about Bochs on Android

Can I run Windows XP in Bochs on a smartphone?

Technically yes, but this will require:

  • A device with Snapdragon 855+ or similar performance.
  • Disk image โ‰ฅ2 GB in size (use mode=concat in bochsrc.txt).
  • RAM โ‰ฅ256 MB (megs: 256).
  • Disable all background processes on Android.

Expect FPS โ‰ค5 even on flagships. For Windows XP it is better to use Limbo or remote access to a PC.

How to transfer a Bochs disk image from PC to Android?

Copy the file .img or .vdi to the folder /sdcard/bochs/disks/ and update the path in bochsrc.txtIf the image is created. in VirtualBox, convert it to format raw:

VBoxManage clonehd source.vdi target.img --format RAW

โš ๏ธ Make sure there is enough space on Android - images VirtualBox can take up to 10 GB.

Why doesnโ€™t Bochs see my keyboard?

The problem is typical for devices with custom firmware or non-standard layouts. Solutions:

  • Add to bochsrc.txt: keyboard: type=usb, serial_delay=500.
  • Use an external keyboard via OTG.
  • Switch to Hacker's Keyboard (application from Play Market with support Ctrl/Alt).
Is it possible to save the state of the emulator (as in VMware)?

Bochs does not support "snapshots" directly, but you can:

  1. Create a copy of the disk image (win95.img) before critical actions.
  2. Use a script to save the state (requires Termux i root):
    dd if=/dev/block/loop0 of=/sdcard/bochs/snapshots/win95_snap1.img
  3. For DOS: use the utility MEM.EXE for memory dump (limited functionality).
How to connect the Internet in emulated Windows 95?

Bochs emulates a network card NE2000, but to access the Internet you will need:

  1. Configure ne2k in bochsrc.txt (see section 3).
  2. Install the driver NE2000 in the guest OS (you can download from driverscollection.com).
  3. On Android, create a virtual bridge:
    su
    

    ifconfig tap0 up

    ip route add 192.168.0.0/24 dev tap0

  4. In the guest OS, register a static IP (for example, 192.168.0.2) and a gateway (192.168.0.1).

โš ๏ธ Attention: This method opens your local network to the emulated OS. Do not use it in public Wi-Fi.