Exagear keeps seeing only Download folder, no External

Search This thread

xdaprogramm

Member
Mar 20, 2019
32
1
Exagear is windows Wine based emulator app that allows to run things in Windows environment including games. It's not developed any more, so it is at mercy of enthusiasts devs/nodevs. The thing it really lacks is the ability to browse your desired folders. It forces a look in SDcard's Download folder and thats it. Needless to say, internal SDcard has too low space and even 1GB could reduce a lot the space on older phone. So what does Exagear need? To browse your External SD card. It can't even browse internal .. all it does is Download\ folder. Ok you can browse root folder it seems... mnt/storage or mnt/media but whatever you can see in ADB like mnt/media_rw/30D0-DS35 or storage/30D0-DS35 (alpha-numeric is often the name of the card folder instead of ExtSDcard), you cannot see it in Exagear.

So what you see in your default file explorer
_mnt
____storage
_______________30D0-DS35
_______________emulated

you only see the emulated/ and 0/ and leads only to download/ cant even browse your other Internal folders!

(WINE armv7 can see all your folders and sdcard but it's not a working environment, ExaGear is the actual emulator that does it)

So it requires some modifications.

OUTSIDE modifying apk ive tried:
https://android.stackexchange.com/q...an-android-app-access-browse-external-sd-card

using bindfs and binding/mounting the External SD as Download folder... till you see the External SD folders and files in Download when you ls the download/ folder

But browse Exagear - no luck, it still sees Download folder (original) not mounted version. Same with other ways of mount.

By modifying the APK

Theres 3 versions of Exagear - 2.9, 3.0.1 and 4.7 but 4.7 is just with more installed DirectX and other graphics files and drivers.

Someone made it browse witth 2.9 but it's for 2.9 and version 2.9 of Exagear won't work,'This app has stopped working' when it's done installing all and you try it.
https://www.youtube.com/watch?v=02N5xR0_T5Q

The most stable version to me is 3.0.1 as 4.7 is 2GB rather not get that on internal memory (and still cant see past Download folder)

So with 3.0.1 I have used apktool to unpack APK and add
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

to Manifest.xml it already has the WRITE_ part... still nothing and I don't get what code or where it causes to read only Download folder.

Who can see how to make it work? Any enthusiasts for exagear?

The apk v3.0.1
http://www.mediafire.com/file/8fm6wwd6y23xmn2/ExaGear_PRO_3.0.apk/file

Obb
http://www.mediafire.com/file/o10tznkipir8oeb/obb.zip/file
 
Last edited:

xdaprogramm

Member
Mar 20, 2019
32
1
For some reason the Exagear app won't see it, keeps seeing Download\ with its original content even when I can see Download\ as the External SD after binding it, when browsing with ADB or even with the inbuilt file explorer of the phone. Wine app that it's based on can see all folders and External SD, but Wine isnt doing the job it cant run any applications, Exagear is made for that, so im trying to make Exagear work. Exagear cant even see the other folders on the interal memory just download folder.

Wtf it worked now o_O (after a lot of hassle and diff tries) the only thing I did different is I bound a specific folder on the External SD not just the root alphanumeric folder of the External card, e.g
Code:
adb shell data/local/tmp/bindfs -o nosuid,nodev,noexec,noatime -u 0 -g 9997 -p a-rwx,ug+rw,ugo+X --create-with-perms=a-rwx,ug+rw,ugo+X --xattr-none --chown-ignore --chgrp-ignore --chmod-ignore /mnt/media_rw/30D0-DS35/Legacy\ Games /mnt/runtime/write/emulated/0/download

if I turn off ADB debugging the whole empty Download\ folder will disappear, reappears after device reboot that will clear the binding but at least it works exagear seeing the bound folder when debugging on and until reboot.. until better workaround is found. Attaching a working bindfs, as some other x64 architecture I found elsewhere was incompatible.
 

Attachments

  • bindfs.zip
    186.2 KB · Views: 17
Last edited:

xdaprogramm

Member
Mar 20, 2019
32
1
Can this be done from the phone only? I installed Terminal Emulator and Magisk for SU and I can bind the folders the same way ( i see the download folder as the wanted External sd folder with ls) but when I launch Exagear it still sees the original Download folder, unlike when doing it with ADB. This is needed because with ADB if you reboot/battery dies, the bind is lost. Also you may not be near PC and have to redo every time, better do it from phone alone.

SOLUTION
Thx to Irfan Latif for help
OK here is how I did it with BINDFS never mind fbind (just uninstalled from Magisk, no need) or others. Firstly before writing the above command in Terminal Emulator that not only has to be in #su with Magisk but important to do is in Magisk Settings in Mount Namespace Mode to set it to Global. Then the terminal user changed to me not just from $ to # but it says :(unreachable)#

And it was in root mountspace. Now the above command where /mnt/media_rw/30D0-DS35/Legacy\ Games /mnt/runtime/write/emulated/0/download , dont use storage/emulated/0/download as this may reboot the phone and it doesnt like it.

It should work without using ScanMediaPlz apk but it can be used in case. Otherwise reboot phone and retry again command in Terminal till you see external SD content will be on the Download folder even in your phone's default File Explorer app. Maybe then Exagear will see, try Install New then Other app at the botton in Exagear's main menu to see if you can browse your now populated with External SD files location, and if it is, then it works like with ADB without usb debugging and without using a PC.

umount /mnt/runtime/write/emulated/0/download to unmount the Download folder, even when it is back to normal, the Exagear will see it as mounted, thus can use the Download folder normally and for Exa as mounted drive, until reboot. Thats even better.
 
Last edited:

xdaprogramm

Member
Mar 20, 2019
32
1
BindFS?
MAGISK?
Terminal Emulator?
ROOT your phone just for THAT?
FORGET all that unlike what I used just to make this work before.

Like other times I may have wasted hours and days trying to figure out how to make something work as I want, no answer anywhere, no success, and then I come some day in the future and it works from almost first time. Sometimes I amaze myself cause im not a dev :]

The most setup version is probably
here although it may still need to install additional packages to make things work.

So my biggest prob was that I did not want to see the app using the Download folder all the time, it may be for security of your phone to only be able to view one folder but I wanted at least this folder to be another and I still did not see how to change that. Finally the solution came and it requires some apk modification, I was ready to do that but before I could not find what exactly. Because why mix Download folder and put all your games there in one with download stuff?

To make the change one needs to know how to unpack an apk
https://www.reddit.com/r/Android/comments/11852r
this shows how. Using APK tool and better put the file name or folder name in quotes during the commands because it didn't want to repack properly. So, once you unpack the apk you need to go to the (if v 4.7) ExaGear_PRO_4.7\smali\com\eltechs\ed\startupActions\StartGuest.smali and open this file with text editor. This is the center of all evil:

Code:
const-string v2, "Download"

This tells it to always use this folder... finally I found that and yes, I changed it for example to

Code:
    const-string v2, "Games"

And then repacked. for repacking don't forget the quotes, I wasted HOURS wondering why the file won't compile.. it turned out dashes or dots caused problem in reading the name..

Code:
apktool_2.5.0.jar b "ExaGear_PRO_4.7_GamesFolder"

Again the reddit post explains how to decompile and APK do what you do and recompile. Don't forget to sign the apk or it won't install, commands are described in the reddit post but here it is:
Code:
signapk.jar certificate.pem key.pk8 [name of apk you just copied].apk [another name].apk
(make sure to have the tools downloaded first, there can be plenty of such signature files in various android dev sites or this one from the reddit post).

And it worked, now when I installed the APK and put the OBB with its folder before that in Android\obb\ , and the app works, it starts and now looks at my "Games" folder only. If you set the const-string v2, "/storage/emulated/0" or to "emulated" it might view all subfolders like all your phone folders but I wanted only just not use Download folder as that was stupid.

(And if not on new device, on my old one so far I had to install custom ROM to get later Android like 9, Magisk, ROOT (not warranty friendly), root commands, BINDFS command to symlink folders, ALL for that stupid change to get 1 different folder cause it's not been dev-ed in the abandoned app!)

NOW DONE!
 
Last edited: