Skip to content

Commit

Permalink
Merge pull request #5 from n3alz/dev
Browse files Browse the repository at this point in the history
Update to v4.0
  • Loading branch information
n3alz authored Feb 15, 2021
2 parents 226887e + 255b4a7 commit 1f369ad
Show file tree
Hide file tree
Showing 195 changed files with 13,179 additions and 2,596 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gradle/
/local.properties
.idea/
.DS_Store
/app/build
/build
/captures
.externalNativeBuild
14 changes: 7 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Expand Down Expand Up @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -645,14 +645,14 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

{project} Copyright (C) {year} {fullname}
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand All @@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@

The first optimized android miner running on a blockchain created for IoT mining (uPlexa).

<img src="./screenshots/1.png" height="400" />
<img src="./screenshots/2.png" height="400" />
<img src="./screenshots/3.png" height="400" />

# Usage

This will currently only work on devices with ARM64 architecture.

Install and run the app, goto settings, enter your wallet address, press the start button
to start mining or stop to stop mining.

Run the app, enter your UPX address, select a pool, start mining!

# Notes

The xmrig binary is copied to the app's internal directory along with its dependent libraries.
(Because it can only be executed there)

The binary is started using the ProcessBuilder class, and the output is captured
into the app's scrolling pane once each secons.

Currently only arm64 binaries are included, and the app will refuse to work on
other architectures like x86 or 32 bit devices.
Currently only arm64 binaries are included, and the app will refuse to work on
other architectures like x86 or 32 bit devices.
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
/release
49 changes: 28 additions & 21 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,39 +1,46 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 26
buildToolsVersion "28.0.3"
compileSdkVersion 30
buildToolsVersion '30.0.3'

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility '1.8'
targetCompatibility '1.8'
}


defaultConfig {
applicationId "upx.uplexa.androidminer"
minSdkVersion 19
targetSdkVersion 26
versionCode 3
versionName "3.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

applicationId "com.uplexa.androidminer"
minSdkVersion 21
targetSdkVersion 28
versionCode 4
versionName "4.0"
buildConfigField "long", "BUILD_TIME", System.currentTimeMillis() + "L"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = false
}

buildTypes {
release {
minifyEnabled false
minifyEnabled false // Disable it for now, problem while fetching Json data for Pool API
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

}

dependencies {

implementation 'com.android.support.constraint:constraint-layout:1.1.3'

implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
//noinspection GradleDependency
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' // Keep the version 1.1.3
//noinspection GradleDependency
implementation 'com.google.android.material:material:1.1.0' // Keep the version 1.1.0
implementation 'com.github.KingsMentor:MobileVisionBarcodeScanner:2.0.0'
//noinspection GradleDependency
implementation 'androidx.appcompat:appcompat:1.1.0' // Keep the version 1.1.0
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'org.ocpsoft.prettytime:prettytime:4.0.2.Final'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.github.anastr:speedviewlib:1.5.2'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10'
}
76 changes: 70 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="upx.uplexa.androidminer"
<manifest package="io.uplexaproject.androidminer"
xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />

<application
android:allowBackup="true"
android:usesCleartextTraffic="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity" android:windowSoftInputMode="stateAlwaysHidden" android:theme="@style/AppTheme.NoActionBar">

<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="barcode" />

<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_notification" />

<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/c_white" />

<activity
android:name="io.uplexaproject.androidminer.MainActivity"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="adjustPan|stateHidden"
android:theme="@style/AppTheme.NoActionBar">
</activity>

<activity
android:name="io.uplexaproject.androidminer.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>

<activity
android:name="io.uplexaproject.androidminer.QrCodeScannerActivity"
android:parentActivityName="io.uplexaproject.androidminer.MainActivity">
</activity>

<activity
android:name="io.uplexaproject.androidminer.WizardHomeActivity"
android:parentActivityName="io.uplexaproject.androidminer.MainActivity">
</activity>

<activity
android:name="io.uplexaproject.androidminer.WizardAddressActivity"
android:parentActivityName="io.uplexaproject.androidminer.MainActivity">
</activity>

<activity
android:name="io.uplexaproject.androidminer.WizardPoolActivity"
android:parentActivityName="io.uplexaproject.androidminer.MainActivity">
</activity>

<activity
android:name="io.uplexaproject.androidminer.WizardSettingsActivity"
android:parentActivityName="io.uplexaproject.androidminer.MainActivity">
</activity>

<activity
android:name="io.uplexaproject.androidminer.BaseActivity"
android:parentActivityName="io.uplexaproject.androidminer.MainActivity">
</activity>

<service
android:name=".MiningService"
android:name="io.uplexaproject.androidminer.MiningService"
android:enabled="true"/>

<receiver
android:name="io.uplexaproject.androidminer.NotificationsReceiver"
android:enabled="true">
<intent-filter>
<action android:name="OPEN_ACTION"/>
<action android:name="STOP_ACTION"/>
</intent-filter>
</receiver>

</application>

</manifest>
</manifest>
27 changes: 0 additions & 27 deletions app/src/main/assets/config.json

This file was deleted.

Binary file removed app/src/main/assets/libc++.so
Binary file not shown.
File renamed without changes.
Binary file added app/src/main/assets/xmrig/arm64-v8a/xlarig
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added app/src/main/assets/xmrig/armeabi-v7a/xlarig
Binary file not shown.
File renamed without changes.
54 changes: 54 additions & 0 deletions app/src/main/assets/xmrig/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"api": {
"id": null,
"worker-id": null
},
"http": {
"enabled": false,
"host": "127.0.0.1",
"port": 0,
"access-token": null,
"restricted": true
},
"autosave": false,
"version": 1,
"background": false,
"colors": false,
"randomx": {
"init": -1,
"numa": false
},
"cpu": {
"enabled": true,
"huge-pages": true,
"hw-aes": null,
"priority": 3,
"asm": false,
"argon2-impl": null,
"*": $cpuconfig$
},
"donate-level": 0,
"donate-over-proxy": 0,
"log-file": null,
"pools": [
{
"algo": "$algo$",
"url": "$url$",
"user": "$username$",
"pass": "$pass$",
"rig-id": null,
"nicehash": false,
"keepalive": false,
"enabled": true,
"tls": false,
"tls-fingerprint": null,
"daemon": false
}
],
"print-time": 30,
"retries": 5000,
"retry-pause": 5,
"syslog": false,
"user-agent": null,
"watch": true
}
Binary file added app/src/main/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1f369ad

Please sign in to comment.