Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wubydax committed Jul 15, 2016
0 parents commit 9cbea95
Show file tree
Hide file tree
Showing 131 changed files with 11,147 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/dictionaries/Anna.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 62 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
99 changes: 99 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
apply plugin: 'com.android.application'

/* Created by Roberto Mariani and Anna Berkovitch, 2015-2016
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
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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/>.*/

def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))


android {
// signingConfigs {
// gearSigningConfig {
// keyAlias keystoreProperties['keyAlias']
// keyPassword keystoreProperties['keyPassword']
// storeFile file(keystoreProperties['storeFile'])
// storePassword keystoreProperties['storePassword']
// }
// }
compileSdkVersion 24
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.wubydax.romcontrol.v2"
minSdkVersion 21
//noinspection OldTargetApi
targetSdkVersion 22
versionCode 1
versionName "1.0"
project.archivesBaseName = "RomControl"
}

buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// signingConfig signingConfigs.gearSigningConfig
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFile = new File(output.outputFile.parent,
output.outputFile.name.replace("-release", ""))
}
}
}
}
}

task installAndLaunchRelease(type: Exec, dependsOn: 'installRelease') {
commandLine 'adb', 'shell', 'am', 'start', '-n', 'com.wubydax.romcontrol.v2/.MainActivity'
}

task pushToDevice(type: Exec, dependsOn: 'assembleRelease') {
commandLine 'adb', 'push', './build/outputs/apk/RomControl.apk', '/sdcard/RomControl.apk'
}

task mountRW(type: Exec, dependsOn: 'pushToDevice') {
commandLine 'adb', 'shell', 'su', '-c', 'mount -o remount,rw /system'
}

task copyToPrivApp(type: Exec, dependsOn: 'mountRW') {
commandLine 'adb', 'shell', 'su', '-c', 'cp /storage/emulated/0/RomControl.apk /system/priv-app/RomControl.apk'
finalizedBy('chmodApk')
}

task chmodApk(type: Exec) {
commandLine 'adb', 'shell', 'su', '-c', 'chmod 644 /system/priv-app/RomControl.apk'
finalizedBy('mountRO')
}

task mountRO(type: Exec) {
commandLine 'adb', 'shell', 'su', '-c', 'mount -o remount,ro /system'
finalizedBy('rebootDevice')
}

task rebootDevice(type: Exec) {
commandLine 'adb', 'reboot'
}


dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:support-v4:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile files('libs/RootTools.jar')
}
Binary file added app/libs/RootTools.jar
Binary file not shown.
17 changes: 17 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\Anna\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
45 changes: 45 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.wubydax.romcontrol.v2">

<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.REBOOT"
tools:ignore="ProtectedPermissions"/>
<uses-permission android:name="android.permission.DEVICE_POWER"
tools:ignore="ProtectedPermissions"/>
<uses-permission android:name="android.permission.RECOVERY"/>

<application
android:name=".MyApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="@style/AppThemeDark"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

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

<service
android:name=".utils.BackupRestoreIntentService"
android:exported="false">
</service>
</application>

</manifest>
4 changes: 4 additions & 0 deletions app/src/main/assets/scripts/simple_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/system/bin/sh

cd /storage/emulated/0
echo "working from assets" >> test-assets.txt
Loading

0 comments on commit 9cbea95

Please sign in to comment.