def test_device(tmp_path):
    """Create an AVD configuration file."""
    config_file = tmp_path / ".android" / "avd" / "testDevice.avd" / "config.ini"
    config_file.parent.mkdir(parents=True)

    # Write a default config. It contains:
    # * blank lines
    # * a key whose value explicitly contains an equals sign.
    with config_file.open("w") as f:
        f.write(
            """
avd.ini.encoding=UTF-8
hw.device.manufacturer=Google
hw.device.name=pixel
weird.key=good=bad

PlayStore.enabled=no
avd.name=beePhone
disk.cachePartition=yes
disk.cachePartition.size=42M
"""
        )

    return config_file