-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
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') | ||
} |
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 *; | ||
#} |
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> |
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 |