upost / MoneroMiner

Proof of concept for using xmrig mining inside an Android APK
GNU General Public License v3.0
157 stars 66 forks source link

file not found after run #5

Open TarrahArshad opened 6 years ago

TarrahArshad commented 6 years ago

// copy binaries to a path where we may execute it); Tools.copyFile(this, abi + "/xmrig", privatePath + "/xmrig"); Tools.copyFile(this, abi + "/libuv", privatePath + "/libuv.so"); Tools.copyFile(this, "libc++.so", privatePath + "/libc++_shared.so");

upost commented 5 years ago

Check your abi. Propably there is currently no binary for it. (The abi should be displayed in the logcat during start)

QuantumLeaper commented 5 years ago

Can confirm, the method of Tools.copyFile does not work on some phones. Tested on: Galaxy s9+, Exynos 9810, arm64-v8a. For some reason the files do not get copied resulting in: E/MiningSvc: exception: java.io.IOException: Cannot run program "./xmrig" (in directory "/data/user/0/de.ludetis.monerominer/files"): error=2, No such file or directory

Not seeing any errors regarding the file copy itself, which is odd.

sadakura commented 3 years ago

Can confirm, the method of Tools.copyFile does not work on some phones. Tested on: Galaxy s9+, Exynos 9810, arm64-v8a. For some reason the files do not get copied resulting in: E/MiningSvc: exception: java.io.IOException: Cannot run program "./xmrig" (in directory "/data/user/0/de.ludetis.monerominer/files"): error=2, No such file or directory

Not seeing any errors regarding the file copy itself, which is odd.

Same here on Samsung 10, will dig deeper and put out code if I Will be able to fix it.

garrylachman commented 2 years ago

This method is not works anymore. Im the dev of React Native XMRig. The workaround I found is to rename xmrig to xmrig.so and add the file as native lib. Only the files in lib folder are executable...