Modifying caches in ExaGear

From Exagear International
Jump to navigation Jump to search

This page contains instructions for modifying and building caches (.obb files) in ExaGear Windows Emulator.

You can also use the exagear-cache-creator tool to create cache from scratch using debootstrap(required PC or laptop).

Modify caches without changing packages on PC(laptop), and mobile devices

To modify the archive with the cache without replacing the packages of the system itself (for example, adding some program for Wine), you can use Microsoft Windows, GNU/Linux or Android OS.

Download and open .obb file

Download any ExaGear Windows Emulator cache that you need to modify, then open the archive in any archiver (eg 7-Zip(Windows), Ark(Linux), ZArchiver, RAR(Android)) without unpacking it.

Adding files/programs and creating shortcuts to the Start Menu for Wine (/opt folder)

Folder structure in ExaGear Windows Emulator .obb files.

This part of the manual indicates the actions, after which, programs for Wine will be added to the cache, with the ability to run them in the Start menu. If you need to modify the file system, or add/remove packages, you can find instructions below.

After opening the archive, you will see the folders of the Linux file system (shown in the photo).

/opt contains files, programs that are in the Start menu (for example WineD3D), as well as Wine files (the files may be in other folders, for example guestcont-pattern). This section of the manual will cover the option of adding files and shortcuts to the Start menu.

The guestcont-pattern folder contains the C: drive, which is used by Wine, as well as the path to shortcuts, registry files, etc.

Copy the file/program for Wine you need to /opt, having previously created a folder in the /opt directory itself (if you add many files of similar content, for example, different versions of WineD3D for Windows will be stored in the WineD3D folder).

Important! Know what you are doing before changing other folders and deleting files! Attempts to cut the cache "to the maximum" of files can lead to the so-called "break" of the cache and its inoperability.

Create shortcuts, check cache

After adding / deleting the necessary files or other cache modifications, you need to make shortcuts for later adding them to the Start menu.

Save the archive to (standard apk, names may vary). Delete (or clear its data) ExaGear Windows Emulator and install it again, but use the one you modified as the cache.

After unpacking the cache, run the container, and in the TFM file manager, go to Z:/opt and find the files you added there, click on it, and click "Create link", and go to the desktop folder (Desktop ). Copy the shortcut files (.lnk) to the D: drive, and then you need to exit ExaGear.

Reopen the modified .obb file, copy the shortcut files and go to /opt/guestcont-pattern/.wine/drive_c/users/Public. Copy shortcuts there (they can be renamed), you can create folders and put shortcuts there. After copying, save the archive, reinstall ExaGear Windows Emulator, and after starting the container, the shortcuts you added will be displayed in the start menu. Try running one of them. If a program references them, it should run. If an error appeared on the screen, then after creating the shortcuts, the path to the program was changed or the file was completely deleted. If everything works and the program starts, then the process of adding programs and shortcuts to them in the Start menu is completed.

Other modifications to the Linux file system without uninstalling/installing packages

You can also add other files to Wine, or modify the Linux file system, you know how it works. Please note that before changing other folders and deleting files, know what you are doing. Attempts to cut the cache "to the maximum" of files can lead to the so-called "break" of the cache and its inoperability.

Adding packages, replacing Wine in caches

Since ExaGear uses a Linux container to run Windows applications (using Wine) on ARM systems, a Linux distribution must be installed on a computer (laptop) to replace the Wine version. If it is not possible to install the system on a permanent basis, use virtual machines (VirtualBox, VMware, etc.).

To add packages or replace Wine in Android, this instruction uses Termux and Exagear-For-Termux

Important! Some caches may have removed the apt package manager. Since it is not used in this article, the solution is not described here.

Downloading Wine, cache, decompressing the cache, and entering it with chroot (for laptops, computers)

Download the cache and extract it to a separate folder (for example exagearcache)

In a terminal, mount the /dev, /proc, and /sys virtual file systems by issuing the following commands:

  1. sudo mount proc -t proc ./proc
  2. sudo mount sys -t sysfs ./sys
  3. sudo mount --bind /dev ./dev
  4. sudo mount --bind /dev/pts ./dev/pts

Switch to the cache filesystem terminal you are using:

sudo chroot ./ /usr/bin/env -i HOME=/root TERM="$TERM" /bin/bash --login

Before using the apt package manager, you need to update the PATH environment variable, which for some strange reason gets corrupted. Enter the command echo $PATH, copy its output, and export it back: export PATH="****" (Instead of parentheses, the output of the previous command should be specified.)

Downloading, decompressing the cache and entering it with Exagear-For-Termux(Android, Termux)

Download the ExaGear cache you want to modify, terminal emulator Termux, install it and enter the following commands to install Exagear-For-Termux (modified Exagear, which can be use in Termux):

  1. pkg update -y
  2. pkg install tar git wget zip unzip -y
  3. git clone ~/ExaTermux
  4. cd ~/ExaTermux
  5. git submodule init
  6. git submodule update

Detailed explanations of these commands can be found in the Github repository Exagear-for-Termux(English)

Enter the command termux-setup-storage (in order for Termux to access the /sdcard partition on your mobile device) and in the window that appears, allow access to the memory.

Create an exagear-fs folder (it stores the Exagear-For-Termux filesystem): mkdir ~/ExaTermux/exagear-fs and extract the .obb cache file to this folder: unzip /sdcard/ Download/obbname.obb -d ~/Exagear-for-Termux/exagear-fs

Go to the Exagear-For-Termux folder again and go to the guest system: ./ and check that you are in the arch command, the architecture should be specified i386.

Replacing Wine version

Check the package manager with the apt-get update command, the packages should be updated. If there is an error that the command is not found or that the .so libraries are not found, then apt is removed from your cache.

Remove Wine which was cached by default by default and install wget && apt-transport-https && software-properties-common (for downloading over https and adding repositories).

  1. apt remove wine-stable wine-stable-i386 winehq-stable -y && apt install wget apt-transport-https software-properties-common

And add the official Wine repository:

  1. wget -nc
  2. apt-key add winehq.key
  3. rm -R winehq.key
  4. apt-add-repository 'deb bionic main'(other version may be required instead of bionic, check command lsb_release -a)

Update the packages: apt update, and install the version of Wine you need (up to version 7, latest stable 7.0): apt install wine-stable-i386=version~bionic wine-stable=version~bionic winehq-stable=version~bionic

After installing Wine, you can remove unnecessary packages: apt remove software-properties-common apt-transport-https wget -y && apt autoremove -y

Repacking cache to .obb

If chroot is used, reboot the system to unmount virtual /dev, /proc /sysfs /dev/pts.

If using Exagear-For-Termux on Android, enter the exit command.

To create an archive in the folder with the unpacked cache, enter the command sudo zip --symlinks -r . (for computers, laptops with Linux distributions) or zip --symlinks -r . (if using Termux.)

After the archive is created, move it to the /sdcard folder on your phone (in Termux it is done by the command cp /sdcard and try to run ExaGear with this .obb if the cache will unpack and work, Wine will install wine-mono and wine-gecko when starting ExaGear and then updating the configuration, if the cache did not start (given an error), then Wine may not have been installed correctly.

Modifying ExaGear RPG/Strategies caches

The file system in the outdated ExaGear RPG/Strategies is truncated as much as possible, so updating Wine in the above way will not work. Also, there is no explorer there, so adding something to the Start menu will also not work with the method above.

It is possible to modify by very complex methods, but there is practically no point in this.

Author of the original instruction GFOXSH


Official website of Wine(winehq)