diff --git a/.gitignore b/.gitignore
index 7c39332..a6a8540 100755
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,7 @@ build/
# .idea/workspace.xml
# Local configuration file (sdk path, etc)
local.properties
+gradle.properties
keystore.properties
# Windows thumbnail db
.DS_Store
diff --git a/androidCommon/build.gradle b/androidCommon/build.gradle
deleted file mode 100755
index 4e45e09..0000000
--- a/androidCommon/build.gradle
+++ /dev/null
@@ -1,31 +0,0 @@
-apply plugin: 'com.android.library'
-
-android {
- compileSdkVersion 25
- buildToolsVersion "25.0.3"
-
- defaultConfig {
- minSdkVersion 8
- targetSdkVersion 25
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
- }
- }
-}
-
-dependencies {
-
- ext {
- supportLibVersion = '23.4.0'
- }
-
- compile "com.android.support:support-v4:${supportLibVersion}"
- compile "com.android.support:appcompat-v7:${supportLibVersion}"
- compile 'com.google.code.gson:gson:2.4'
- compile files('libs/RootTools-3.4.jar')
- compile files('libs/jackson-all-1.9.11.jar')
-}
diff --git a/androidCommon/libs/ROOTTOOLS_LICENSE b/androidCommon/libs/ROOTTOOLS_LICENSE
deleted file mode 100755
index d645695..0000000
--- a/androidCommon/libs/ROOTTOOLS_LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/androidCommon/libs/android-support-v4.jar b/androidCommon/libs/android-support-v4.jar
deleted file mode 100755
index aa0b1a5..0000000
Binary files a/androidCommon/libs/android-support-v4.jar and /dev/null differ
diff --git a/androidCommon/libs/android-support-v7-appcompat.jar b/androidCommon/libs/android-support-v7-appcompat.jar
deleted file mode 100755
index f9ad396..0000000
Binary files a/androidCommon/libs/android-support-v7-appcompat.jar and /dev/null differ
diff --git a/androidCommon/libs/gson-2.2.2.jar b/androidCommon/libs/gson-2.2.2.jar
deleted file mode 100755
index f2108e0..0000000
Binary files a/androidCommon/libs/gson-2.2.2.jar and /dev/null differ
diff --git a/androidCommon/libs/jackson-all-1.9.11.jar b/androidCommon/libs/jackson-all-1.9.11.jar
deleted file mode 100755
index 4ad3095..0000000
Binary files a/androidCommon/libs/jackson-all-1.9.11.jar and /dev/null differ
diff --git a/androidCommon/lint.xml b/androidCommon/lint.xml
deleted file mode 100755
index a6e4d14..0000000
--- a/androidCommon/lint.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/androidCommon/proguard-rules.txt b/androidCommon/proguard-rules.txt
deleted file mode 100755
index 590d0b3..0000000
--- a/androidCommon/proguard-rules.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in /Users/willi/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 *;
-#}
-# Allow obfuscation of android.support.v7.internal.view.menu.**
-# to avoid problem on Samsung 4.2.2 devices with appcompat v21
-# see https://code.google.com/p/android/issues/detail?id=78377
diff --git a/androidCommon/src/main/AndroidManifest.xml b/androidCommon/src/main/AndroidManifest.xml
deleted file mode 100755
index 6a8b267..0000000
--- a/androidCommon/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/androidCommon/src/main/java/com/asksven/android/common/AppRater.java b/androidCommon/src/main/java/com/asksven/android/common/AppRater.java
deleted file mode 100644
index a2384a7..0000000
--- a/androidCommon/src/main/java/com/asksven/android/common/AppRater.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- *
- */
-package com.asksven.android.common;
-
-
-import com.asksven.android.common.privateapiproxies.R;
-
-import android.app.Dialog;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.net.Uri;
-import android.view.View;
-import android.view.Window;
-import android.widget.Button;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-/**
- * @author sven From
- * http://www.androidsnippets.com/prompt-engaged-users-to-rate-your-app-in-the-android-market-appirater
- * Make sure to add following to strings.xml
- * AndroidCommon
- * com.asksven.androidcommon
- * Remind me later
- * Rate
- * No, thanks
- * If you enjoy using %s, please take a moment to rate it. Thanks for your support!
- *
- * To test it and to tweak the dialog appearence, you can call AppRater.showRateDialog(this, null)
- * from your Activity.
- *
- * Normal use is to invoke AppRater.app_launched(this) each time your activity is invoked
- * (eg. from within the onCreate method). If all conditions are met, the dialog appears.
- */
-public class AppRater
-{
- private final static int DAYS_UNTIL_PROMPT = 3;
- private final static int LAUNCHES_UNTIL_PROMPT = 7;
-
- public static void app_launched(Context ctx)
- {
- SharedPreferences prefs = ctx.getSharedPreferences("apprater", 0);
-
- SharedPreferences.Editor editor = prefs.edit();
-
- if (prefs.getBoolean("dontshowagain", false))
- {
- return;
- }
-
-
-
- // Increment launch counter
- long launch_count = prefs.getLong("launch_count", 0) + 1;
- editor.putLong("launch_count", launch_count);
-
- // Get date of first launch
- Long date_firstLaunch = prefs.getLong("date_firstlaunch", 0);
- if (date_firstLaunch == 0)
- {
- date_firstLaunch = System.currentTimeMillis();
- editor.putLong("date_firstlaunch", date_firstLaunch);
- }
-
- // Wait at least n days before opening
- if (launch_count >= LAUNCHES_UNTIL_PROMPT)
- {
- if (System.currentTimeMillis() >= date_firstLaunch + (DAYS_UNTIL_PROMPT * 24 * 60 * 60 * 1000))
- {
- showRateDialog(ctx, editor);
- }
- }
-
- editor.commit();
- }
-
- public static void showRateDialog(final Context ctx, final SharedPreferences.Editor editor)
- {
-
- final Dialog dialog = new Dialog(ctx);
- dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
- dialog.setContentView(R.layout.dialog_rate);
-
- TextView dialogTitle = (TextView) dialog.findViewById(R.id.dialog_title);
- dialogTitle.setText(ctx.getString(R.string.label_button_rate) + " " + ctx.getString(R.string.app_name));
-
- Button buttonRate = (Button) dialog.findViewById(R.id.buttonRate);
- buttonRate.setText(ctx.getString(R.string.label_button_rate));
- buttonRate.setOnClickListener(new Button.OnClickListener()
- {
- public void onClick(View v)
- {
- ctx.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + ctx.getString(R.string.app_pname))));
- if (editor != null)
- {
- editor.putBoolean("dontshowagain", true);
- editor.commit();
- }
- dialog.dismiss();
- }
- });
-
- Button buttonRemind = (Button) dialog.findViewById(R.id.buttonRemind);
- buttonRemind.setText(R.string.label_button_remind);
- buttonRemind.setOnClickListener(new Button.OnClickListener()
- {
- public void onClick(View v)
- {
- dialog.dismiss();
- }
- });
-
- Button buttonNoThanks = (Button) dialog.findViewById(R.id.buttonNoThanks);
- buttonNoThanks.setText(R.string.label_button_no_thanks);
- buttonNoThanks.setOnClickListener(new Button.OnClickListener()
- {
- public void onClick(View v)
- {
- if (editor != null)
- {
- editor.putBoolean("dontshowagain", true);
- editor.commit();
- }
- dialog.dismiss();
- }
- });
-
- dialog.show();
- }
-}
diff --git a/androidCommon/src/main/java/com/asksven/android/common/ReadmeActivity.java b/androidCommon/src/main/java/com/asksven/android/common/ReadmeActivity.java
deleted file mode 100644
index 0ac6bab..0000000
--- a/androidCommon/src/main/java/com/asksven/android/common/ReadmeActivity.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) 2011 asksven
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.asksven.android.common;
-
-
-import com.asksven.android.common.privateapiproxies.R;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.view.View;
-import android.webkit.WebSettings;
-import android.webkit.WebView;
-import android.widget.Button;
-
-/**
- *
- * @author sven
- *
- * Add following strings to your app
- * Other Apps
- * Dismiss
- * Follow me
- * https://twitter.com/#!/asksven
- * market://search?q=com.asksven
- *
- * and the activity to your manifest
- *
- */
-public class ReadmeActivity extends Activity
-{
- /**
- * @see android.app.Activity#onCreate(Bundle)
- */
- @Override
- protected void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
-
- setContentView(R.layout.readmewebview);
-
- WebView browser = (WebView)findViewById(R.id.webview);
-
- WebSettings settings = browser.getSettings();
- settings.setJavaScriptEnabled(true);
-
- // retrieve any passed data (filename)
- String strFilename = getIntent().getStringExtra("filename");
- String strURL = getIntent().getStringExtra("url");
-
- // if a URL is passed open it
- // if not open a local file
- if ( (strURL == null) || (strURL.equals("")) )
- {
- if (strFilename.equals(""))
- {
- browser.loadUrl("file:///android_asset/help.html");
- }
- else
- {
- browser.loadUrl("file:///android_asset/" + strFilename);
- }
- }
- else
- {
- browser.loadUrl(strURL);
- }
-
- final Button buttonClose = (Button) findViewById(R.id.buttonClose);
- buttonClose.setOnClickListener(new View.OnClickListener()
- {
- public void onClick(View v)
- {
- finish();
- }
- });
-
- final Button buttonRate = (Button) findViewById(R.id.buttonMarket);
- buttonRate.setOnClickListener(new View.OnClickListener()
- {
- public void onClick(View v)
- {
- openURL(ReadmeActivity.this.getString(R.string.market_link));
- finish();
- }
- });
- final Button buttonFollow = (Button) findViewById(R.id.buttonTwitter);
- buttonFollow.setOnClickListener(new View.OnClickListener()
- {
- public void onClick(View v)
- {
- openURL(ReadmeActivity.this.getString(R.string.twitter_link));
- finish();
- }
- });
-
- }
-
- public void openURL( String inURL )
- {
- Intent browse = new Intent( Intent.ACTION_VIEW , Uri.parse( inURL ) );
-
- startActivity( browse );
- }
-
-}
diff --git a/androidCommon/src/main/java/com/asksven/android/common/Shell.java b/androidCommon/src/main/java/com/asksven/android/common/Shell.java
deleted file mode 100755
index 9c1888d..0000000
--- a/androidCommon/src/main/java/com/asksven/android/common/Shell.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2014 asksven
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.asksven.android.common;
-
-import java.util.List;
-import junit.framework.TestCase;
-
-/**
- * @author sven
- */
-public class Shell extends TestCase {
- public void testShell() {
- List res = NonRootShell.getInstance().run("ls -l /");
- assertTrue(res != null);
- assertTrue(!res.isEmpty());
- }
-}
diff --git a/androidCommon/src/main/java/com/asksven/android/common/kernelutils/AlarmDumpsysTests.java b/androidCommon/src/main/java/com/asksven/android/common/kernelutils/AlarmDumpsysTests.java
deleted file mode 100755
index 73d2179..0000000
--- a/androidCommon/src/main/java/com/asksven/android/common/kernelutils/AlarmDumpsysTests.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- *
- */
-package com.asksven.android.common.kernelutils;
-
-import com.asksven.android.common.privateapiproxies.StatElement;
-import java.util.ArrayList;
-import junit.framework.TestCase;
-
-/**
- * @author sven
- */
-public class AlarmDumpsysTests extends TestCase {
-
- static ArrayList getTestData_4_3() {
- ArrayList myRet = new ArrayList() {{
- add("Alarm Stats:");
- add(" android +1m35s119ms running, 67 wakeups:");
- add(" +39s818ms 0 wakes 9 alarms: act=com.android.server.action.NETWORK_STATS_POLL");
- add(" +4s693ms 8 wakes 8 alarms: act=android.appwidget.action.APPWIDGET_UPDATE cmp={com.devexpert.weather/com.devexpert.weather.view.WidgetWeather5x2}");
- add(" com.google.android.gsf +5s50ms running, 30 wakeups:");
- add(" +5s50ms 30 wakes 30 alarms: cmp={com.google.android.gsf/com.google.android.gsf.checkin.EventLogService$Receiver}");
- add(" com.android.vending +46ms running, 4 wakeups:");
- add(" +29ms 1 wakes 1 alarms: cmp={com.android.vending/com.google.android.finsky.services.DailyHygiene}");
- add(" +17ms 3 wakes 3 alarms: cmp={com.android.vending/com.google.android.finsky.services.ContentSyncService}");
- }};
- return myRet;
- }
-
- static ArrayList getTestData_4_2() {
- ArrayList myRet = new ArrayList() {{
- add("Alarm Stats:");
- add(" com.google.android.gsf");
- add(" 8417ms running, 204 wakeups");
- add(" 17 alarms: act=com.google.android.intent.action.GTALK_RECONNECT flg=0x4");
- add(" 187 alarms: flg=0x4");
- add(" com.carl.trafficcounter");
- add(" 446486ms running, 5584 wakeups");
- add(" 5584 alarms: act=com.carl.trafficcounter.UPDATE_RUN flg=0x4");
- }};
-
- return myRet;
- }
-
- static ArrayList getTestData_2_3_7() {
- ArrayList myRet = new ArrayList() {{
- add("Alarm Stats:");
- add(" com.google.android.gsf");
- add(" Realtime wakeup (now=2014-07-01 13:18:57):");
- add(" RTC_WAKEUP #13: Alarm{409bfb70 type 0 com.google.android.gms}");
- add(" type=0 when=+5d7h36m8s686ms repeatInterval=579075000 count=0");
- add(" operation=PendingIntent{409e0ca0: PendingIntentRecord{40906778 com.google.android.gms broadcastIntent}}");
- add(" RTC_WAKEUP #12: Alarm{40a8fbb8 type 0 com.google.android.gms}");
- add(" type=0 when=+5d7h36m8s686ms repeatInterval=579075000 count=0");
- add(" operation=PendingIntent{40985ef8: PendingIntentRecord{40977218 com.google.android.gms broadcastIntent}}");
- add(" Alarm Stats:");
- add(" com.google.android.gsf");
- add(" 73040ms running, 38 wakeups");
- add(" 13 alarms: act=com.google.android.intent.action.GTALK_RECONNECT flg=0x4");
- add(" 25 alarms: act=com.google.android.intent.action.GTALK_HEARTBEAT flg=0x4");
- add(" com.android.vending");
- add(" 642ms running, 10 wakeups");
- add(" 4 alarms: flg=0x4 cmp=com.android.vending/com.google.android.finsky.services.DailyHygiene");
- add(" 6 alarms: flg=0x4 cmp=com.android.vending/com.google.android.finsky.services.ContentSyncService");
- add(" android");
- add(" 651712ms running, 44 wakeups");
- add(" 2 alarms: act=android.intent.action.DATE_CHANGED flg=0x20000004");
- add(" 1112 alarms: act=android.intent.action.TIME_TICK flg=0x40000004");
- add(" 110 alarms: act=com.android.server.ThrottleManager.action.POLL flg=0x4");
- add(" 27 alarms: act=android.net.wifi.DHCP_RENEW flg=0x4");
- add(" 4 alarms: act=android.bluetooth.profile_state.CONNECT flg=0x4");
- add(" 6 alarms: act=android.content.syncmanager.SYNC_ALARM flg=0x4");
- add(" 7 alarms: act=com.android.internal.policy.impl.KeyguardViewMediator.DELAYED_KEYGUARD flg=0x4");
- add(" com.quoord.tapatalkpro.activity");
- add(" 9573ms running, 36 wakeups");
- add(" 36 alarms: flg=0x4");
-/* com.android.providers.calendar
- 8348ms running, 13 wakeups
- 1 alarms: act=android.intent.action.EVENT_REMINDER dat=content://com.android.calendar/1404212922000 flg=0x4
- 2 alarms: act=android.intent.action.EVENT_REMINDER dat=content://com.android.calendar/1404154819000 flg=0x4
- 2 alarms: act=android.intent.action.EVENT_REMINDER dat=content://com.android.calendar/1404210053000 flg=0x4
- 5 alarms: act=com.android.providers.calendar.SCHEDULE_ALARM flg=0x4
- 2 alarms: act=android.intent.action.EVENT_REMINDER dat=content://com.android.calendar/1404151203000 flg=0x4
- 1 alarms: act=android.intent.action.EVENT_REMINDER dat=content://com.android.calendar/1404153003000 flg=0x4
- com.viber.voip
- 31314ms running, 111 wakeups
- 110 alarms: act=com.viber.voip.action.KEEP_ALIVE_RECEIVE flg=0x4
- 1 alarms: act=com.viber.voip.action.VERSION_CHECK flg=0x4
- org.sipdroid.sipua
- 7413ms running, 144 wakeups
- 144 alarms: flg=0x4
- com.android.deskclock
- 1189ms running, 1 wakeups
- 1 alarms: act=com.android.deskclock.ALARM_ALERT flg=0x4
- com.google.android.gms
- 94959ms running, 67 wakeups
- 47 alarms: flg=0x4
- 1 alarms: act=com.google.android.gms.icing.INDEX_RECURRING_MAINTENANCE flg=0x4 cmp=com.google.android.gms/.icing.service.IndexWorkerService
- 24 alarms: act=com.google.android.intent.action.SEND_IDLE flg=0x4
- 5 alarms: act=com.google.android.intent.action.GCM_RECONNECT flg=0x4
- com.android.phone
- 387ms running, 4 wakeups
- 4 alarms: act=com.android.phone.PhoneApp.ACTION_VIBRATE_45 flg=0x4
-*/
- }};
- return myRet;
- }
-
- static ArrayList getTestData_4_4_4() {
- ArrayList myRet = new ArrayList() {{
- add(" Alarm Stats:");
- add(" com.android.keyguard +246ms running, 6 wakeups:");
- add(" +246ms 6 wakes 6 alarms: act=com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD");
- add(" com.cyanogenmod.lockclock +4ms running, 0 wakeups:");
- add(" +4ms 0 wakes 2 alarms: act=com.cyanogenmod.lockclock.action.FORCE_WEATHER_UPDATE cmp={com.cyanogenmod.lockclock/com.cyanogenmod.lockclock.weather.WeatherUpdateService}");
- add(" android +1m23s914ms running, 10 wakeups:");
- add(" +1m21s585ms 0 wakes 446 alarms: act=android.intent.action.TIME_TICK");
- add(" +7s372ms 0 wakes 38 alarms: act=com.android.server.action.NETWORK_STATS_POLL");
- add(" +1s213ms 0 wakes 1 alarms: act=android.intent.action.DATE_CHANGED");
- add(" +763ms 6 wakes 6 alarms: act=android.content.syncmanager.SYNC_ALARM");
- add(" +205ms 3 wakes 3 alarms: act=com.android.server.IdleMaintenanceService.action.UPDATE_IDLE_MAINTENANCE_STATE");
- add(" +135ms 0 wakes 1 alarms: act=com.android.server.NetworkTimeUpdateService.action.POLL");
- add(" +134ms 1 wakes 1 alarms: act=android.net.ConnectivityService.action.PKT_CNT_SAMPLE_INTERVAL_ELAPSED");
- add(" com.android.deskclock +24s199ms running, 0 wakeups:");
- add(" +24s199ms 0 wakes 63 alarms: act=com.android.deskclock.ON_QUARTER_HOUR");
- add(" com.google.android.gms +51s865ms running, 0 wakeups:");
- add(" +34s205ms 0 wakes 2 alarms: cmp={com.google.android.gms/com.google.android.gms.playlog.uploader.UploaderAlarmReceiver}");
- add(" +17s530ms 0 wakes 10 alarms: cmp={com.google.android.gms/com.google.android.gms.common.download.DownloadAlarmReceiver}");
- add(" +88ms 0 wakes 2 alarms: cmp={com.google.android.gms/com.google.android.gms.security.snet.SnetService}");
- add(" +42ms 0 wakes 1 alarms: act=com.google.android.gms.icing.INDEX_RECURRING_MAINTENANCE cmp={com.google.android.gms/com.google.android.gms.icing.service.IndexWorkerService}");
- add(" com.touchtype.swiftkey +34s244ms running, 0 wakeups:");
- add(" +32s314ms 0 wakes 1 alarms: act=com.touchtype.ACTION_SCHEDULED_JOB cmp={com.touchtype.swiftkey/com.touchtype.CustomUpdaterScheduledJob}");
- add(" +1s855ms 0 wakes 3 alarms: act=com.touchtype.ACTION_SCHEDULED_JOB cmp={com.touchtype.swiftkey/com.touchtype.RefreshLanguageConfigurationScheduledJob}");
- add(" +75ms 0 wakes 1 alarms: act=com.touchtype.ACTION_SCHEDULED_JOB cmp={com.touchtype.swiftkey/com.touchtype.KeyboardUsesDailyScheduledJob}");
- add(" +2ms 0 wakes 1 alarms: cmp={com.touchtype.swiftkey/com.touchtype.ReferrerRegistrationService}");
- add(" com.android.phone +189ms running, 0 wakeups:");
- add(" +189ms 0 wakes 2 alarms: act=com.android.phone.UPDATE_CALLER_INFO_CACHE cmp={com.android.phone/com.android.phone.CallerInfoCacheUpdateReceiver}");
- }};
- return myRet;
- }
-
- /**
- * Test method for {@link com.asksven.android.common.kernelutils.AlarmsDumpsys#getAlarms()}.
- */
- public void testGetAlarms() {
- ArrayList test4_3 = AlarmsDumpsys.getAlarmsFrom_4_3(getTestData_4_3());
- assertNotNull(test4_3);
- assertTrue(test4_3.size() > 1);
- System.out.print(test4_3);
-
- ArrayList test2_3_7 = AlarmsDumpsys.getAlarmsPriorTo_4_2_2(getTestData_2_3_7());
- assertNotNull(test2_3_7);
- assertTrue(test2_3_7.size() > 1);
- System.out.print(test2_3_7);
-
- ArrayList test4_4_4 = AlarmsDumpsys.getAlarmsFrom_4_3(getTestData_4_4_4());
- assertNotNull(test4_4_4);
- assertTrue(test4_4_4.size() > 1);
- System.out.print(test4_4_4);
- }
-}
diff --git a/androidCommon/src/main/java/com/asksven/android/common/kernelutils/NetstatsTests.java b/androidCommon/src/main/java/com/asksven/android/common/kernelutils/NetstatsTests.java
deleted file mode 100755
index 1af8af4..0000000
--- a/androidCommon/src/main/java/com/asksven/android/common/kernelutils/NetstatsTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- *
- */
-package com.asksven.android.common.kernelutils;
-
-import com.asksven.android.common.privateapiproxies.StatElement;
-import java.util.ArrayList;
-import java.util.List;
-import junit.framework.TestCase;
-
-/**
- * @author sven
- */
-public class NetstatsTests extends TestCase {
-
- static ArrayList getTestData_1() {
- ArrayList myRet = new ArrayList() {{
- add("idx iface acct_tag_hex uid_tag_int cnt_set rx_bytes rx_packets tx_bytes tx_packets rx_tcp_bytes rx_tcp_packets rx_udp_bytes rx_udp_packets rx_other_bytes rx_other_packets tx_tcp_bytes tx_tcp_packets tx_udp_bytes tx_udp_packets tx_other_bytes tx_other_packets");
- add("2 rmnet0 0x0 10054 0 126043 536 83128 521 126043 536 0 0 0 0 83128 521 0 0 0 0");
- add("3 rmnet0 0x0 10054 1 797329 826 84364 551 797329 826 0 0 0 0 84364 551 0 0 0 0");
- add("4 rmnet0 0x1010000000000000 10054 0 113846 407 75741 372 113846 407 0 0 0 0 75741 372 0 0 0 0");
- add("5 rmnet0 0x1010000000000000 10054 1 9618 41 12646 43 9618 41 0 0 0 0 12646 43 0 0 0 0");
- add("6 rmnet0 0xffffff0100000000 10054 0 7595 14 1663 14 7595 14 0 0 0 0 1663 14 0 0 0 0");
- add("7 rmnet0 0xffffff0100000000 10054 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0");
- add("8 wlan0 0x0 10054 0 130404 350 72333 387 130404 350 0 0 0 0 72333 387 0 0 0 0");
- add("9 wlan0 0x0 10054 1 66344 113 24746 124 66344 113 0 0 0 0 24746 124 0 0 0 0");
- add("10 wlan0 0x1010000000000000 10054 0 107098 302 64738 321 107098 302 0 0 0 0 64738 321 0 0 0 0");
- add("11 wlan0 0x1010000000000000 10054 1 12130 69 20782 74 12130 69 0 0 0 0 20782 74 0 0 0 0");
- add("12 wlan0 0xffffff0100000000 10054 0 21831 27 3570 26 21831 27 0 0 0 0 3570 26 0 0 0 0");
- add("13 wlan0 0xffffff0100000000 10054 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0");
- add("14 wlan0 0xffffff0300000000 10054 0 591 4 2117 4 591 4 0 0 0 0 2117 4 0 0 0 0");
- add("15 wlan0 0xffffff0300000000 10054 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0");
- }};
- return myRet;
- }
-
- /**
- * Test method for {@link com.asksven.android.common.kernelutils.Netstats#parseNetstats(List))}.
- */
- public void testGetAlarms() {
- ArrayList test1 = Netstats.parseNetstats(getTestData_1());
- assertNotNull(test1);
- assertTrue(test1.size() > 1);
- System.out.print(test1);
- }
-}
diff --git a/androidCommon/src/main/res/drawable-hdpi/icon.png b/androidCommon/src/main/res/drawable-hdpi/icon.png
deleted file mode 100755
index 8074c4c..0000000
Binary files a/androidCommon/src/main/res/drawable-hdpi/icon.png and /dev/null differ
diff --git a/androidCommon/src/main/res/drawable-ldpi/icon.png b/androidCommon/src/main/res/drawable-ldpi/icon.png
deleted file mode 100755
index 1095584..0000000
Binary files a/androidCommon/src/main/res/drawable-ldpi/icon.png and /dev/null differ
diff --git a/androidCommon/src/main/res/drawable-mdpi/icon.png b/androidCommon/src/main/res/drawable-mdpi/icon.png
deleted file mode 100755
index a07c69f..0000000
Binary files a/androidCommon/src/main/res/drawable-mdpi/icon.png and /dev/null differ
diff --git a/androidCommon/src/main/res/layout/dialog_rate.xml b/androidCommon/src/main/res/layout/dialog_rate.xml
deleted file mode 100755
index 96aab5c..0000000
--- a/androidCommon/src/main/res/layout/dialog_rate.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/androidCommon/src/main/res/layout/main.xml b/androidCommon/src/main/res/layout/main.xml
deleted file mode 100755
index 8b860b4..0000000
--- a/androidCommon/src/main/res/layout/main.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
diff --git a/androidCommon/src/main/res/layout/readmewebview.xml b/androidCommon/src/main/res/layout/readmewebview.xml
deleted file mode 100755
index 4d54041..0000000
--- a/androidCommon/src/main/res/layout/readmewebview.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/androidCommon/src/main/res/values/colors.xml b/androidCommon/src/main/res/values/colors.xml
deleted file mode 100755
index 836592a..0000000
--- a/androidCommon/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- #27ae60
-
\ No newline at end of file
diff --git a/androidCommon/src/main/res/values/dimens.xml b/androidCommon/src/main/res/values/dimens.xml
deleted file mode 100755
index bf47bfc..0000000
--- a/androidCommon/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
- 18sp
- 16sp
- 10sp
-
-
-
diff --git a/androidCommon/src/main/res/values/strings.xml b/androidCommon/src/main/res/values/strings.xml
deleted file mode 100755
index bfb3cd6..0000000
--- a/androidCommon/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- Hello World!
-
- AndroidCommon
- com.asksven.androidcommon
- Remind me later
- Rate
- No, thanks
- If you enjoy using %s, please take a moment to rate it. Thanks for your support!
- https://twitter.com/#!/asksven
- market://search?q=com.asksven
- Other Apps
- Dismiss
- Follow me
-
-
diff --git a/app/build.gradle b/app/build.gradle
index bacdf88..8015ee4 100755
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -12,16 +12,22 @@ android {
targetSdkVersion 26
}
+ packagingOptions {
+ exclude 'META-INF/ASL2.0'
+ }
+
buildTypes {
debug {
debuggable true
minifyEnabled false
buildConfigField 'boolean', 'ENABLE_ANALYTICS', 'false'
+ buildConfigField 'String', 'ANALYTICS_KEY', System.properties['ANALYTICS_KEY']
}
release {
debuggable false
minifyEnabled false
buildConfigField 'boolean', 'ENABLE_ANALYTICS', 'true'
+ buildConfigField 'String', 'ANALYTICS_KEY', System.properties['ANALYTICS_KEY']
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
@@ -46,10 +52,13 @@ dependencies {
supportLibVersion = '26.1.0'
}
- compile project(':androidCommon')
+ compile files('libs/RootTools-3.4.jar')
compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile "com.android.support:design:${supportLibVersion}"
compile "com.android.support:cardview-v7:${supportLibVersion}"
compile 'com.splunk:mint-android-sdk:5.2.1'
compile 'com.github.lzyzsd:circleprogress:1.2.1'
+ compile 'org.codehaus.jackson:jackson-core-asl:1.9.13'
+ compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
+ compile 'com.google.code.gson:gson:2.8.0'
}
diff --git a/androidCommon/libs/RootTools-3.4.jar b/app/libs/RootTools-3.4.jar
similarity index 100%
rename from androidCommon/libs/RootTools-3.4.jar
rename to app/libs/RootTools-3.4.jar
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 0e97b86..5bbed9c 100755
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -17,7 +17,8 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
- android:theme="@style/AppTheme">
+ android:theme="@style/AppTheme"
+ android:name=".PerfTweakerApplication">
= 22)
+ {
+ m_proxy = new BatteryStatsProxy(ctx, true);
+ }
+ else
+ {
+ m_proxy = new BatteryStatsProxy(ctx);
+ }
}
return m_proxy;
}
-
- public void invalidate()
+
+ public void invalidate()
{
m_proxy = null;
}
@@ -113,7 +125,7 @@ public void invalidate()
/**
* Default cctor
*/
- private BatteryStatsProxy(Context context)
+ protected BatteryStatsProxy(Context context)
{
/*
* As BatteryStats is a service we need to get a binding using the IBatteryStats.Stub.getStatistics()
@@ -263,7 +275,167 @@ private BatteryStatsProxy(Context context)
}
}
-
+
+ protected BatteryStatsProxy(Context context, boolean dummy) // just need a different signature
+ {
+ /*
+ * Same as default cctor but reading the parcel as stream and not as byte[]
+ * see here for details: https://android.googlesource.com/platform/frameworks/base.git/+/nougat-mr2.1-release/core/java/com/android/internal/os/BatteryStatsHelper.java
+ */
+
+ try
+ {
+ ClassLoader cl = context.getClassLoader();
+
+ m_ClassDefinition = cl.loadClass("com.android.internal.os.BatteryStatsImpl");
+
+ // get the IBinder to the "batteryinfo" service
+ @SuppressWarnings("rawtypes")
+ Class serviceManagerClass = cl.loadClass("android.os.ServiceManager");
+
+ // parameter types
+ @SuppressWarnings("rawtypes")
+ Class[] paramTypesGetService= new Class[1];
+ paramTypesGetService[0]= String.class;
+
+ @SuppressWarnings("unchecked")
+ Method methodGetService = serviceManagerClass.getMethod("getService", paramTypesGetService);
+
+ String service = "batterystats";
+
+ // parameters
+ Object[] paramsGetService= new Object[1];
+ paramsGetService[0] = service;
+
+ if (CommonLogSettings.DEBUG)
+ {
+ Log.i(TAG, "invoking android.os.ServiceManager.getService(\"batteryinfo\")");
+ }
+ IBinder serviceBinder = (IBinder) methodGetService.invoke(serviceManagerClass, paramsGetService);
+
+ if (CommonLogSettings.DEBUG)
+ {
+ Log.i(TAG, "android.os.ServiceManager.getService(\"batteryinfo\") returned a service binder");
+ }
+
+ // now we have a binder. Let's us that on IBatteryStats.Stub.asInterface
+ // to get an IBatteryStats
+ // Note the $-syntax here as Stub is a nested class
+ @SuppressWarnings("rawtypes")
+ Class iBatteryStatsStub = cl.loadClass("com.android.internal.app.IBatteryStats$Stub");
+
+ //Parameters Types
+ @SuppressWarnings("rawtypes")
+ Class[] paramTypesAsInterface= new Class[1];
+ paramTypesAsInterface[0]= IBinder.class;
+
+ @SuppressWarnings("unchecked")
+ Method methodAsInterface = iBatteryStatsStub.getMethod("asInterface", paramTypesAsInterface);
+
+ // Parameters
+ Object[] paramsAsInterface= new Object[1];
+ paramsAsInterface[0] = serviceBinder;
+
+ if (CommonLogSettings.DEBUG)
+ {
+ Log.i(TAG, "invoking com.android.internal.app.IBatteryStats$Stub.asInterface");
+ }
+ Object iBatteryStatsInstance = methodAsInterface.invoke(iBatteryStatsStub, paramsAsInterface);
+
+ // and finally we call getStatistics from that IBatteryStats to obtain a Parcel
+ @SuppressWarnings("rawtypes")
+ Class iBatteryStats = cl.loadClass("com.android.internal.app.IBatteryStats");
+
+ @SuppressWarnings("unchecked")
+ Method methodGetStatisticsStream = iBatteryStats.getMethod("getStatisticsStream");
+ // returns a ParcelFileDescriptor
+
+ if (CommonLogSettings.DEBUG)
+ {
+ Log.i(TAG, "invoking getStatisticsStream");
+ }
+ ParcelFileDescriptor pfd = (ParcelFileDescriptor) methodGetStatisticsStream.invoke(iBatteryStatsInstance);
+
+
+ if (pfd != null)
+ {
+ FileInputStream fis = new ParcelFileDescriptor.AutoCloseInputStream(pfd);
+
+ try
+ {
+ if (CommonLogSettings.DEBUG) { Log.i(TAG, "retrieving parcel"); }
+
+ @SuppressWarnings("rawtypes")
+ Class[] paramTypes= new Class[1];
+ paramTypes[0]= FileDescriptor.class;
+
+
+ // we want to access MemoryFile.getSize(pfd.getFileDescriptor()) but this methos id hidden
+ Method methodGetSize = MemoryFile.class.getMethod("getSize", paramTypes);
+ methodGetSize.setAccessible(true);
+ int size = (int) methodGetSize.invoke(null, /* null = static method */ pfd.getFileDescriptor());
+ byte[] data = readFully(fis, size);
+ Parcel parcel = Parcel.obtain();
+ parcel.unmarshall(data, 0, data.length);
+ parcel.setDataPosition(0);
+
+ @SuppressWarnings("rawtypes")
+ Class batteryStatsImpl = cl.loadClass("com.android.internal.os.BatteryStatsImpl");
+
+ if (CommonLogSettings.DEBUG) { Log.i(TAG, "reading CREATOR field"); }
+ Field creatorField = batteryStatsImpl.getField("CREATOR");
+
+ // From here on we don't need reflection anymore
+ @SuppressWarnings("rawtypes")
+ Parcelable.Creator batteryStatsImpl_CREATOR = (Parcelable.Creator) creatorField.get(batteryStatsImpl);
+
+ m_Instance = batteryStatsImpl_CREATOR.createFromParcel(parcel);
+
+ }
+ catch (IOException e)
+ {
+ Log.w(TAG, "Unable to read statistics stream", e);
+ }
+ }
+
+ }
+ catch( Exception e )
+ {
+ if (e instanceof InvocationTargetException && e.getCause() != null) {
+ Log.e(TAG, "An exception occured in BatteryStatsProxy(). Message: " + e.getCause().getMessage());
+ } else {
+ Log.e(TAG, "An exception occured in BatteryStatsProxy(). Message: " + e.getMessage());
+ }
+ m_Instance = null;
+
+ }
+ }
+
+ // both these methods come from com/android/internal/os/BatteryStatsHelper.java
+ protected static byte[] readFully(FileInputStream stream) throws java.io.IOException {
+ return readFully(stream, stream.available());
+ }
+ protected static byte[] readFully(FileInputStream stream, int avail) throws java.io.IOException {
+ int pos = 0;
+ byte[] data = new byte[avail];
+ while (true) {
+ int amt = stream.read(data, pos, data.length-pos);
+ Log.i(TAG, "Read " + amt + " bytes at " + pos
+ + " of avail " + data.length);
+ if (amt <= 0) {
+ Log.i(TAG, "**** FINISHED READING: pos=" + pos
+ + " len=" + data.length);
+ return data;
+ }
+ pos += amt;
+ avail = stream.available();
+ if (avail > data.length-pos) {
+ byte[] newData = new byte[pos+avail];
+ System.arraycopy(data, 0, newData, 0, pos);
+ data = newData;
+ }
+ }
+ }
/**
* Returns true if the proxy could not be initialized properly
* @return true if the proxy wasn't initialized
@@ -321,7 +493,6 @@ public Long computeBatteryRealtime(long curTime, int iStatsType) throws BatteryI
* Returns the total, last, or current battery realtime in microseconds.
*
* @param curTime the current elapsed realtime in microseconds.
- * @param iStatsType one of STATS_TOTAL, STATS_LAST, or STATS_CURRENT.
*/
public Long getBatteryRealtime(long curTime) throws BatteryInfoUnavailableException
{
@@ -452,8 +623,6 @@ public Long getScreenOnTime(long batteryRealtime, int iStatsType) throws Battery
/**
* Returns if phone is on battery.
*
- * @param batteryRealtime the battery realtime in microseconds (@see computeBatteryRealtime).
- * @param iStatsType one of STATS_TOTAL, STATS_LAST, or STATS_CURRENT.
*/
public boolean getIsOnBattery() throws BatteryInfoUnavailableException
{
@@ -1381,7 +1550,7 @@ public ArrayList getSensorStats(Context context, long batteryRealti
}
SensorUsage myData = new SensorUsage(uidTotalSensorTime.longValue()/1000);
// try resolving names
- UidInfo myInfo = UidNameResolver.getInstance(context).getNameForUid(uid);
+ UidInfo myInfo = UidNameResolver.getInstance().getNameForUid(uid);
myData.setUidInfo(myInfo);
myData.setItems(myItems);
myRet.add(myData);
@@ -1465,7 +1634,7 @@ public ArrayList getSensorStats(Context context, long batteryRealti
}
SensorUsage myData = new SensorUsage(uidTotalSensorTime.longValue()/1000);
// try resolving names
- UidInfo myInfo = UidNameResolver.getInstance(context).getNameForUid(uid);
+ UidInfo myInfo = UidNameResolver.getInstance().getNameForUid(uid);
myData.setUidInfo(myInfo);
myData.setItems(myItems);
myRet.add(myData);
@@ -1717,8 +1886,6 @@ public Long getBluetoothOnTime(long batteryRealtime, int iStatsType) throws Batt
/**
* Returns the total, last, or current bluetooth on time in microseconds.
*
- * @param batteryRealtime the battery realtime in microseconds (@see computeBatteryRealtime).
- * @param iStatsType one of STATS_TOTAL, STATS_LAST, or STATS_CURRENT.
*/
public Long getBluetoothInStateTime(int state, int iStatsType) throws BatteryInfoUnavailableException
{
@@ -2274,8 +2441,6 @@ public ArrayList getWakelockStats(Context context, int iWakeType, i
/**
* Obtain the wakelock stats as a list of Wakelocks (@see com.asksven.android.common.privateapiproxies.Wakelock}
* @param context a Context
- * @param iWakeType a type of wakelock @see com.asksven.android.common.privateapiproxies.BatteryStatsTypes
- * @param iStatType a type of stat @see com.asksven.android.common.privateapiproxies.BatteryStatsTypes
* @return a List of Wakelock s
* @throws Exception
*/
@@ -2986,7 +3151,7 @@ else if (Build.VERSION.SDK_INT <= 21)
// we have data separated for Wifi and Mobile
myData = new NetworkUsage(uid, "Wifi", bytesReceivedWifi, bytesSentWifi);
// try resolving names
- UidInfo myInfo = UidNameResolver.getInstance(context).getNameForUid(uid);
+ UidInfo myInfo = UidNameResolver.getInstance().getNameForUid(uid);
myData.setUidInfo(myInfo);
myStats.add(myData);
@@ -2999,7 +3164,7 @@ else if (Build.VERSION.SDK_INT <= 21)
{
myData = new NetworkUsage(uid, bytesReceived, bytesSent);
// try resolving names
- UidInfo myInfo = UidNameResolver.getInstance(context).getNameForUid(uid);
+ UidInfo myInfo = UidNameResolver.getInstance().getNameForUid(uid);
myData.setUidInfo(myInfo);
myStats.add(myData);
}
@@ -3016,8 +3181,6 @@ else if (Build.VERSION.SDK_INT <= 21)
/**
* Obtain the network usage stats as a list of NetworkUsages (@see com.asksven.android.common.privateapiproxies.NetworkUsage}
- * @param context a Context
- * @param iStatType a type of stat @see com.asksven.android.common.privateapiproxies.BatteryStatsTypes
* @return a List of NetworkUsage s
* @throws Exception
*/
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/BatteryStatsTypes.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/BatteryStatsTypes.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/BatteryStatsTypes.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/BatteryStatsTypes.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/BatteryStatsTypesLolipop.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/BatteryStatsTypesLolipop.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/BatteryStatsTypesLolipop.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/BatteryStatsTypesLolipop.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItem.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItem.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItem.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItem.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemIcs.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemIcs.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemIcs.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemIcs.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemJellyBean.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemJellyBean.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemJellyBean.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemJellyBean.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemKitKat.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemKitKat.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemKitKat.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemKitKat.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemLolipop.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemLolipop.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemLolipop.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/HistoryItemLolipop.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/KernelWakelock.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/KernelWakelock.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/KernelWakelock.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/KernelWakelock.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/Misc.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/Misc.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/Misc.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/Misc.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/NativeKernelWakelock.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/NativeKernelWakelock.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/NativeKernelWakelock.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/NativeKernelWakelock.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/NetworkQueryProxy.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/NetworkQueryProxy.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/NetworkQueryProxy.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/NetworkQueryProxy.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/NetworkUsage.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/NetworkUsage.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/NetworkUsage.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/NetworkUsage.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/Notification.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/Notification.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/Notification.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/Notification.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/PackageElement.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/PackageElement.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/PackageElement.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/PackageElement.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/Process.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/Process.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/Process.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/Process.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/SensorUsage.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/SensorUsage.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/SensorUsage.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/SensorUsage.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/SensorUsageItem.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/SensorUsageItem.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/SensorUsageItem.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/SensorUsageItem.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/StatElement.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/StatElement.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/StatElement.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/StatElement.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/SystemPropertiesProxy.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/SystemPropertiesProxy.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/SystemPropertiesProxy.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/SystemPropertiesProxy.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/Wakelock.java b/app/src/main/java/com/asksven/android/common/privateapiproxies/Wakelock.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/privateapiproxies/Wakelock.java
rename to app/src/main/java/com/asksven/android/common/privateapiproxies/Wakelock.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/settings/GpsSettings.java b/app/src/main/java/com/asksven/android/common/settings/GpsSettings.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/settings/GpsSettings.java
rename to app/src/main/java/com/asksven/android/common/settings/GpsSettings.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/shellutils/Exec.java b/app/src/main/java/com/asksven/android/common/shellutils/Exec.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/shellutils/Exec.java
rename to app/src/main/java/com/asksven/android/common/shellutils/Exec.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/shellutils/ExecResult.java b/app/src/main/java/com/asksven/android/common/shellutils/ExecResult.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/shellutils/ExecResult.java
rename to app/src/main/java/com/asksven/android/common/shellutils/ExecResult.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/utils/ChargerUtil.java b/app/src/main/java/com/asksven/android/common/utils/ChargerUtil.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/utils/ChargerUtil.java
rename to app/src/main/java/com/asksven/android/common/utils/ChargerUtil.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/utils/DataStorage.java b/app/src/main/java/com/asksven/android/common/utils/DataStorage.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/utils/DataStorage.java
rename to app/src/main/java/com/asksven/android/common/utils/DataStorage.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/utils/DateUtils.java b/app/src/main/java/com/asksven/android/common/utils/DateUtils.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/utils/DateUtils.java
rename to app/src/main/java/com/asksven/android/common/utils/DateUtils.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/utils/GenericLogger.java b/app/src/main/java/com/asksven/android/common/utils/GenericLogger.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/utils/GenericLogger.java
rename to app/src/main/java/com/asksven/android/common/utils/GenericLogger.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/utils/MathUtils.java b/app/src/main/java/com/asksven/android/common/utils/MathUtils.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/utils/MathUtils.java
rename to app/src/main/java/com/asksven/android/common/utils/MathUtils.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/utils/SharedPreferencesUtils.java b/app/src/main/java/com/asksven/android/common/utils/SharedPreferencesUtils.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/utils/SharedPreferencesUtils.java
rename to app/src/main/java/com/asksven/android/common/utils/SharedPreferencesUtils.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/utils/StringUtils.java b/app/src/main/java/com/asksven/android/common/utils/StringUtils.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/utils/StringUtils.java
rename to app/src/main/java/com/asksven/android/common/utils/StringUtils.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/utils/SysUtils.java b/app/src/main/java/com/asksven/android/common/utils/SysUtils.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/utils/SysUtils.java
rename to app/src/main/java/com/asksven/android/common/utils/SysUtils.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/utils/SystemAppInstaller.java b/app/src/main/java/com/asksven/android/common/utils/SystemAppInstaller.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/utils/SystemAppInstaller.java
rename to app/src/main/java/com/asksven/android/common/utils/SystemAppInstaller.java
diff --git a/androidCommon/src/main/java/com/asksven/android/common/wifi/WifiManagerProxy.java b/app/src/main/java/com/asksven/android/common/wifi/WifiManagerProxy.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/common/wifi/WifiManagerProxy.java
rename to app/src/main/java/com/asksven/android/common/wifi/WifiManagerProxy.java
diff --git a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/Debug.java b/app/src/main/java/com/asksven/android/contrib/Debug.java
old mode 100755
new mode 100644
similarity index 91%
rename from androidCommon/src/main/java/com/asksven/andoid/common/contrib/Debug.java
rename to app/src/main/java/com/asksven/android/contrib/Debug.java
index 75a9f18..efd5175
--- a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/Debug.java
+++ b/app/src/main/java/com/asksven/android/contrib/Debug.java
@@ -1,7 +1,7 @@
/**
* Contrib by Chainfire (see https://raw.github.com/Chainfire/libsuperuser/master/libsuperuser/src/eu/chainfire/libsuperuser/Shell.java)
*/
-package com.asksven.andoid.common.contrib;
+package com.asksven.android.contrib;
/*
* Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
*
@@ -22,7 +22,7 @@
import android.os.Looper;
import android.util.Log;
-import com.asksven.android.common.privateapiproxies.BuildConfig;
+import com.performancetweaker.app.BuildConfig;
/**
* Utility class for logging and debug features that (by default) does nothing when not in debug mode
@@ -31,41 +31,49 @@ public class Debug {
// ----- DEBUGGING -----
- public static final String TAG = "libsuperuser";
- public static final int LOG_GENERAL = 0x0001;
- public static final int LOG_COMMAND = 0x0002;
-
- // ----- LOGGING -----
- public static final int LOG_OUTPUT = 0x0004;
- public static final int LOG_NONE = 0x0000;
- public static final int LOG_ALL = 0xFFFF;
private static boolean debug = BuildConfig.DEBUG;
- private static int logTypes = LOG_ALL;
- private static OnLogListener logListener = null;
- private static boolean sanityChecks = true;
+
+ /**
+ *
Enable or disable debug mode
+ *
+ *
By default, debug mode is enabled for development
+ * builds and disabled for exported APKs - see
+ * BuildConfig.DEBUG
*
* @param type LOG_* constants
- * @param enabled Enable or disable
+ * @param enable Enable or disable
*/
public static void setLogTypeEnabled(int type, boolean enable) {
if (enable) {
@@ -164,49 +172,39 @@ public static boolean getLogTypeEnabledEffective(int type) {
return getDebug() && getLogTypeEnabled(type);
}
- /**
- *
Get the currently registered custom log handler
- *
- * @return Current custom log handler or NULL if none is present
- */
- public static OnLogListener getOnLogListener() {
- return logListener;
- }
-
/**
*
Register a custom log handler
- *
+ *
*
Replaces the log method (write to logcat) with your own
* handler. Whether your handler gets called is still dependent
* on debug mode and message types being enabled for logging.
- *
+ *
* @param onLogListener Custom log listener or NULL to revert to default
*/
public static void setOnLogListener(OnLogListener onLogListener) {
logListener = onLogListener;
}
- // ----- SANITY CHECKS -----
-
/**
- *
Are sanity checks enabled ?
- *
- *
Note that debug mode must also be enabled for actual
- * sanity checks to occur.
- *
- * @return True if enabled
+ *
Get the currently registered custom log handler
+ *
+ * @return Current custom log handler or NULL if none is present
*/
- public static boolean getSanityChecksEnabled() {
- return sanityChecks;
+ public static OnLogListener getOnLogListener() {
+ return logListener;
}
+ // ----- SANITY CHECKS -----
+
+ private static boolean sanityChecks = true;
+
/**
*
Enable or disable sanity checks
*
*
Enables or disables the library crashing when su is called
* from the main thread.
*
- * @param enabled Enable or disable
+ * @param enable Enable or disable
*/
public static void setSanityChecksEnabled(boolean enable) {
sanityChecks = enable;
@@ -214,9 +212,21 @@ public static void setSanityChecksEnabled(boolean enable) {
/**
*
Are sanity checks enabled ?
- *
- *
Takes debug mode into account for the result.
- *
+ *
+ *
Note that debug mode must also be enabled for actual
+ * sanity checks to occur.
+ *
* @return True if enabled
*/
public static boolean getSanityChecksEnabledEffective() {
@@ -225,15 +235,11 @@ public static boolean getSanityChecksEnabledEffective() {
/**
*
Are we running on the main thread ?
- *
+ *
* @return Running on main thread ?
- */
+ */
public static boolean onMainThread() {
return ((Looper.myLooper() != null) && (Looper.myLooper() == Looper.getMainLooper()));
}
- public interface OnLogListener {
- void onLog(int type, String typeIndicator, String message);
- }
-
}
diff --git a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/Shell.java b/app/src/main/java/com/asksven/android/contrib/Shell.java
old mode 100755
new mode 100644
similarity index 97%
rename from androidCommon/src/main/java/com/asksven/andoid/common/contrib/Shell.java
rename to app/src/main/java/com/asksven/android/contrib/Shell.java
index c22e792..2d47654
--- a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/Shell.java
+++ b/app/src/main/java/com/asksven/android/contrib/Shell.java
@@ -14,12 +14,7 @@
* limitations under the License.
*/
-package com.asksven.andoid.common.contrib;
-
-import android.os.Handler;
-import android.os.Looper;
-
-import com.asksven.andoid.common.contrib.StreamGobbler.OnLineListener;
+package com.asksven.android.contrib;
import java.io.DataOutputStream;
import java.io.File;
@@ -37,15 +32,13 @@
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
+import android.os.Handler;
+import android.os.Looper;
+
/**
* Class providing functionality to execute commands in a (root) shell
*/
public class Shell {
- protected static String[] availableTestCommands = new String[]{
- "echo -BOC-",
- "id"
- };
-
/**
*
* Runs commands using the supplied shell, and returns the output, or null
@@ -56,7 +49,7 @@ public class Shell {
* Use {@link #run(String, String[], String[], boolean)} instead, and see
* that same method for usage notes.
*
- *
+ *
* @param shell The shell to use for executing the commands
* @param commands The commands to execute
* @param wantSTDERR Return STDERR in the output ?
@@ -94,7 +87,7 @@ public static List run(String shell, String[] commands, boolean wantSTDE
* something like 'ls -lR /' will probably have you run out of
* memory.
*
- *
+ *
* @param shell The shell to use for executing the commands
* @param commands The commands to execute
* @param environment List of all environment variables (in 'key=value'
@@ -196,6 +189,11 @@ public static List run(String shell, String[] commands, String[] environ
return res;
}
+ protected static String[] availableTestCommands = new String[] {
+ "echo -BOC-",
+ "id"
+ };
+
/**
* See if the shell is alive, and if so, check the UID
*
@@ -228,78 +226,13 @@ protected static boolean parseAvailableResult(List ret, boolean checkFor
return echo_seen;
}
- private interface OnResult {
- // for any onCommandResult callback
- int WATCHDOG_EXIT = -1;
- int SHELL_DIED = -2;
-
- // for Interactive.open() callbacks only
- int SHELL_EXEC_FAILED = -3;
- int SHELL_WRONG_UID = -4;
- int SHELL_RUNNING = 0;
- }
-
- /**
- * Command result callback, notifies the recipient of the completion of a
- * command block, including the (last) exit code, and the full output
- */
- public interface OnCommandResultListener extends OnResult {
- /**
- *
- * Command result callback
- *
- *
- * Depending on how and on which thread the shell was created, this
- * callback may be executed on one of the gobbler threads. In that case,
- * it is important the callback returns as quickly as possible, as
- * delays in this callback may pause the native process or even result
- * in a deadlock
- *
- *
- * See {@link Shell.Interactive} for threading details
- *
- *
- * @param commandCode Value previously supplied to addCommand
- * @param exitCode Exit code of the last command in the block
- * @param output All output generated by the command block
- */
- void onCommandResult(int commandCode, int exitCode, List output);
- }
-
- /**
- * Command per line callback for parsing the output line by line without
- * buffering It also notifies the recipient of the completion of a command
- * block, including the (last) exit code.
- */
- public interface OnCommandLineListener extends OnResult, OnLineListener {
- /**
- *
- * Command result callback
- *
- *
- * Depending on how and on which thread the shell was created, this
- * callback may be executed on one of the gobbler threads. In that case,
- * it is important the callback returns as quickly as possible, as
- * delays in this callback may pause the native process or even result
- * in a deadlock
- *
- *
- * See {@link Shell.Interactive} for threading details
- *
- *
- * @param commandCode Value previously supplied to addCommand
- * @param exitCode Exit code of the last command in the block
- */
- void onCommandResult(int commandCode, int exitCode);
- }
-
/**
* This class provides utility functions to easily execute commands using SH
*/
public static class SH {
/**
* Runs command and return output
- *
+ *
* @param command The command to run
* @return Output of the command, or null in case of an error
*/
@@ -311,7 +244,7 @@ public static List run(String command) {
/**
* Runs commands and return output
- *
+ *
* @param commands The commands to run
* @return Output of the commands, or null in case of an error
*/
@@ -321,7 +254,7 @@ public static List run(List commands) {
/**
* Runs commands and return output
- *
+ *
* @param commands The commands to run
* @return Output of the commands, or null in case of an error
*/
@@ -343,7 +276,7 @@ public static class SU {
/**
* Runs command as root (if available) and return output
- *
+ *
* @param command The command to run
* @return Output of the command, or null if root isn't available or in
* case of an error
@@ -356,7 +289,7 @@ public static List run(String command) {
/**
* Runs commands as root (if available) and return output
- *
+ *
* @param commands The commands to run
* @return Output of the commands, or null if root isn't available or in
* case of an error
@@ -367,7 +300,7 @@ public static List run(List commands) {
/**
* Runs commands as root (if available) and return output
- *
+ *
* @param commands The commands to run
* @return Output of the commands, or null if root isn't available or in
* case of an error
@@ -380,7 +313,7 @@ public static List run(String[] commands) {
* Detects whether or not superuser access is available, by checking the
* output of the "id" command if available, checking if a shell runs at
* all otherwise
- *
+ *
* @return True if superuser access available
*/
public static boolean available() {
@@ -406,7 +339,7 @@ public static boolean available() {
* This function caches its result to improve performance on multiple
* calls
*
- *
+ *
* @param internal Request human-readable version or application
* internal version
* @return String containing the su version or null
@@ -449,7 +382,7 @@ public static synchronized String version(boolean internal) {
/**
* Attempts to deduce if the shell command refers to a su shell
- *
+ *
* @param shell Shell command to run
* @return Shell command appears to be su
*/
@@ -473,7 +406,7 @@ public static boolean isSU(String shell) {
* Constructs a shell command to start a su shell using the supplied uid
* and SELinux context. This is can be an expensive operation, consider
* caching the result.
- *
+ *
* @param uid Uid to use (0 == root)
* @param context (SELinux) context name to use or null
* @return Shell command
@@ -508,7 +441,7 @@ public static String shell(int uid, String context) {
* Constructs a shell command to start a su shell connected to mount
* master daemon, to perform public mounts on Android 4.3+ (or 4.2+ in
* SELinux enforcing mode)
- *
+ *
* @return Shell command
*/
public static String shellMountMaster() {
@@ -520,7 +453,7 @@ public static String shellMountMaster() {
/**
* Detect if SELinux is set to enforcing, caches result
- *
+ *
* @return true if SELinux set to enforcing, or false in the case of
* permissive or not present
*/
@@ -580,6 +513,71 @@ public static synchronized void clearCachedResults() {
}
}
+ private interface OnResult {
+ // for any onCommandResult callback
+ public static final int WATCHDOG_EXIT = -1;
+ public static final int SHELL_DIED = -2;
+
+ // for Interactive.open() callbacks only
+ public static final int SHELL_EXEC_FAILED = -3;
+ public static final int SHELL_WRONG_UID = -4;
+ public static final int SHELL_RUNNING = 0;
+ }
+
+ /**
+ * Command result callback, notifies the recipient of the completion of a
+ * command block, including the (last) exit code, and the full output
+ */
+ public interface OnCommandResultListener extends OnResult {
+ /**
+ *
+ * Command result callback
+ *
+ *
+ * Depending on how and on which thread the shell was created, this
+ * callback may be executed on one of the gobbler threads. In that case,
+ * it is important the callback returns as quickly as possible, as
+ * delays in this callback may pause the native process or even result
+ * in a deadlock
+ *
+ *
+ * See {@link Shell.Interactive} for threading details
+ *
+ *
+ * @param commandCode Value previously supplied to addCommand
+ * @param exitCode Exit code of the last command in the block
+ * @param output All output generated by the command block
+ */
+ public void onCommandResult(int commandCode, int exitCode, List output);
+ }
+
+ /**
+ * Command per line callback for parsing the output line by line without
+ * buffering It also notifies the recipient of the completion of a command
+ * block, including the (last) exit code.
+ */
+ public interface OnCommandLineListener extends OnResult, StreamGobbler.OnLineListener {
+ /**
+ *
+ * Command result callback
+ *
+ *
+ * Depending on how and on which thread the shell was created, this
+ * callback may be executed on one of the gobbler threads. In that case,
+ * it is important the callback returns as quickly as possible, as
+ * delays in this callback may pause the native process or even result
+ * in a deadlock
+ *
+ *
+ * See {@link Shell.Interactive} for threading details
+ *
+ *
+ * @param commandCode Value previously supplied to addCommand
+ * @param exitCode Exit code of the last command in the block
+ */
+ public void onCommandResult(int commandCode, int exitCode);
+ }
+
/**
* Internal class to store command block properties
*/
@@ -613,8 +611,8 @@ public static class Builder {
private boolean wantSTDERR = false;
private List commands = new LinkedList();
private Map environment = new HashMap();
- private OnLineListener onSTDOUTLineListener = null;
- private OnLineListener onSTDERRLineListener = null;
+ private StreamGobbler.OnLineListener onSTDOUTLineListener = null;
+ private StreamGobbler.OnLineListener onSTDERRLineListener = null;
private int watchdogTimeout = 0;
/**
@@ -822,7 +820,7 @@ public Builder addCommand(String[] commands, int code,
* @param onLineListener Callback to be called for each line
* @return This Builder object for method chaining
*/
- public Builder setOnSTDOUTLineListener(OnLineListener onLineListener) {
+ public Builder setOnSTDOUTLineListener(StreamGobbler.OnLineListener onLineListener) {
this.onSTDOUTLineListener = onLineListener;
return this;
}
@@ -839,7 +837,7 @@ public Builder setOnSTDOUTLineListener(OnLineListener onLineListener) {
* @param onLineListener Callback to be called for each line
* @return This Builder object for method chaining
*/
- public Builder setOnSTDERRLineListener(OnLineListener onLineListener) {
+ public Builder setOnSTDERRLineListener(StreamGobbler.OnLineListener onLineListener) {
this.onSTDERRLineListener = onLineListener;
return this;
}
@@ -929,7 +927,7 @@ public Interactive open(OnCommandResultListener onCommandResultListener) {
* something like 'ls -lR /' will probably have you run out of
* memory when using a {@link Shell.OnCommandResultListener}. A work-around
* is to not supply this callback, but using (only)
- * {@link Shell.Builder#setOnSTDOUTLineListener(OnLineListener)}. This way,
+ * {@link Shell.Builder#setOnSTDOUTLineListener(StreamGobbler.OnLineListener)}. This way,
* an internal buffer will not be created and wasting your memory.
*
*
Callbacks, threads and handlers
@@ -972,8 +970,8 @@ public static class Interactive {
private final boolean wantSTDERR;
private final List commands;
private final Map environment;
- private final OnLineListener onSTDOUTLineListener;
- private final OnLineListener onSTDERRLineListener;
+ private final StreamGobbler.OnLineListener onSTDOUTLineListener;
+ private final StreamGobbler.OnLineListener onSTDERRLineListener;
private int watchdogTimeout;
private Process process = null;
@@ -1362,11 +1360,11 @@ private synchronized void processMarker() {
* @param line Line to process
* @param listener Callback to call or null
*/
- private synchronized void processLine(String line, OnLineListener listener) {
+ private synchronized void processLine(String line, StreamGobbler.OnLineListener listener) {
if (listener != null) {
if (handler != null) {
final String fLine = line;
- final OnLineListener fListener = listener;
+ final StreamGobbler.OnLineListener fListener = listener;
startCallback();
handler.post(new Runnable() {
@@ -1481,7 +1479,7 @@ private synchronized boolean open() {
STDIN = new DataOutputStream(process.getOutputStream());
STDOUT = new StreamGobbler(shell.toUpperCase(Locale.ENGLISH) + "-",
- process.getInputStream(), new OnLineListener() {
+ process.getInputStream(), new StreamGobbler.OnLineListener() {
@Override
public void onLine(String line) {
synchronized (Interactive.this) {
@@ -1505,7 +1503,7 @@ public void onLine(String line) {
}
});
STDERR = new StreamGobbler(shell.toUpperCase(Locale.ENGLISH) + "*",
- process.getErrorStream(), new OnLineListener() {
+ process.getErrorStream(), new StreamGobbler.OnLineListener() {
@Override
public void onLine(String line) {
synchronized (Interactive.this) {
diff --git a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/ShellNotClosedException.java b/app/src/main/java/com/asksven/android/contrib/ShellNotClosedException.java
old mode 100755
new mode 100644
similarity index 92%
rename from androidCommon/src/main/java/com/asksven/andoid/common/contrib/ShellNotClosedException.java
rename to app/src/main/java/com/asksven/android/contrib/ShellNotClosedException.java
index 37e2392..db4ca38
--- a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/ShellNotClosedException.java
+++ b/app/src/main/java/com/asksven/android/contrib/ShellNotClosedException.java
@@ -1,7 +1,7 @@
/**
* Contrib by Chainfire (see https://raw.github.com/Chainfire/libsuperuser/master/libsuperuser/src/eu/chainfire/libsuperuser/Shell.java)
*/
-package com.asksven.andoid.common.contrib;
+package com.asksven.android.contrib;
/**
* Exception class used to notify developer that a shell was not close()d
diff --git a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/ShellOnMainThreadException.java b/app/src/main/java/com/asksven/android/contrib/ShellOnMainThreadException.java
old mode 100755
new mode 100644
similarity index 95%
rename from androidCommon/src/main/java/com/asksven/andoid/common/contrib/ShellOnMainThreadException.java
rename to app/src/main/java/com/asksven/android/contrib/ShellOnMainThreadException.java
index 001051f..62de31e
--- a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/ShellOnMainThreadException.java
+++ b/app/src/main/java/com/asksven/android/contrib/ShellOnMainThreadException.java
@@ -1,7 +1,7 @@
/**
* Contrib by Chainfire (see https://raw.github.com/Chainfire/libsuperuser/master/libsuperuser/src/eu/chainfire/libsuperuser/Shell.java)
*/
-package com.asksven.andoid.common.contrib;
+package com.asksven.android.contrib;
/**
* Exception class used to crash application when shell commands are executed
* from the main thread, and we are in debug mode.
diff --git a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/StreamGobbler.java b/app/src/main/java/com/asksven/android/contrib/StreamGobbler.java
old mode 100755
new mode 100644
similarity index 93%
rename from androidCommon/src/main/java/com/asksven/andoid/common/contrib/StreamGobbler.java
rename to app/src/main/java/com/asksven/android/contrib/StreamGobbler.java
index cbd8cce..c6f1a2d
--- a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/StreamGobbler.java
+++ b/app/src/main/java/com/asksven/android/contrib/StreamGobbler.java
@@ -18,7 +18,7 @@
* limitations under the License.
*/
-package com.asksven.andoid.common.contrib;
+package com.asksven.android.contrib;
/*
* Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
@@ -46,17 +46,34 @@
* Thread utility class continuously reading from an InputStream
*/
public class StreamGobbler extends Thread {
+ /**
+ * Line callback interface
+ */
+ public interface OnLineListener {
+ /**
+ *
Line callback
+ *
+ *
This callback should process the line as quickly as possible.
+ * Delays in this callback may pause the native process or even
+ * result in a deadlock
+ *
+ * @param line String that was gobbled
+ */
+ public void onLine(String line);
+ }
+
private String shell = null;
private BufferedReader reader = null;
private List writer = null;
private OnLineListener listener = null;
+
/**
*
StreamGobbler constructor
- *
- *
We use this class because shell STDOUT and STDERR should be read as quickly as
+ *
+ *
We use this class because shell STDOUT and STDERR should be read as quickly as
* possible to prevent a deadlock from occurring, or Process.waitFor() never
* returning (as the buffer is full, pausing the native process)
- *
+ *
* @param shell Name of the shell
* @param inputStream InputStream to read from
* @param outputList List to write to, or null
@@ -69,11 +86,11 @@ public StreamGobbler(String shell, InputStream inputStream, List outputL
/**
*
StreamGobbler constructor
- *
- *
We use this class because shell STDOUT and STDERR should be read as quickly as
+ *
+ *
We use this class because shell STDOUT and STDERR should be read as quickly as
* possible to prevent a deadlock from occurring, or Process.waitFor() never
* returning (as the buffer is full, pausing the native process)
- *
+ *
* @param shell Name of the shell
* @param inputStream InputStream to read from
* @param onLineListener OnLineListener callback
@@ -100,23 +117,7 @@ public void run() {
// make sure our stream is closed and resources will be freed
try {
reader.close();
- } catch (IOException e) {
+ } catch (IOException e) {
}
}
-
- /**
- * Line callback interface
- */
- public interface OnLineListener {
- /**
- *
Line callback
- *
- *
This callback should process the line as quickly as possible.
- * Delays in this callback may pause the native process or even
- * result in a deadlock
- *
- * @param line String that was gobbled
- */
- void onLine(String line);
- }
}
diff --git a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/Util.java b/app/src/main/java/com/asksven/android/contrib/Util.java
old mode 100755
new mode 100644
similarity index 84%
rename from androidCommon/src/main/java/com/asksven/andoid/common/contrib/Util.java
rename to app/src/main/java/com/asksven/android/contrib/Util.java
index 5098946..eb992e8
--- a/androidCommon/src/main/java/com/asksven/andoid/common/contrib/Util.java
+++ b/app/src/main/java/com/asksven/android/contrib/Util.java
@@ -13,20 +13,42 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
-package com.asksven.andoid.common.contrib;
-
-import android.content.Context;
-import android.util.Log;
+package com.asksven.android.contrib;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
+import java.util.List;
+
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.preference.PreferenceManager;
+import android.text.format.DateFormat;
+import android.util.Log;
+import android.util.SparseArray;
public class Util {
diff --git a/androidCommon/src/main/java/com/asksven/android/system/AndroidVersion.java b/app/src/main/java/com/asksven/android/system/AndroidVersion.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/system/AndroidVersion.java
rename to app/src/main/java/com/asksven/android/system/AndroidVersion.java
diff --git a/androidCommon/src/main/java/com/asksven/android/system/Devices.java b/app/src/main/java/com/asksven/android/system/Devices.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/system/Devices.java
rename to app/src/main/java/com/asksven/android/system/Devices.java
diff --git a/androidCommon/src/main/java/com/asksven/android/system/Installation.java b/app/src/main/java/com/asksven/android/system/Installation.java
similarity index 100%
rename from androidCommon/src/main/java/com/asksven/android/system/Installation.java
rename to app/src/main/java/com/asksven/android/system/Installation.java
diff --git a/app/src/main/java/com/performancetweaker/app/PerfTweakerApplication.java b/app/src/main/java/com/performancetweaker/app/PerfTweakerApplication.java
new file mode 100644
index 0000000..303574a
--- /dev/null
+++ b/app/src/main/java/com/performancetweaker/app/PerfTweakerApplication.java
@@ -0,0 +1,20 @@
+package com.performancetweaker.app;
+
+import android.app.Application;
+import android.content.Context;
+
+public class PerfTweakerApplication extends Application {
+ private static Context context;
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ PerfTweakerApplication.context = getApplicationContext();
+ }
+
+
+ public static Context getAppContext()
+ {
+ return PerfTweakerApplication.context;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/performancetweaker/app/ui/MainActivity.java b/app/src/main/java/com/performancetweaker/app/ui/MainActivity.java
index ec33e7c..25710ef 100755
--- a/app/src/main/java/com/performancetweaker/app/ui/MainActivity.java
+++ b/app/src/main/java/com/performancetweaker/app/ui/MainActivity.java
@@ -3,7 +3,6 @@
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.content.ActivityNotFoundException;
-import android.content.ClipData;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
@@ -16,8 +15,6 @@
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
-import android.util.Log;
-import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ProgressBar;
@@ -57,7 +54,8 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (BuildConfig.ENABLE_ANALYTICS) {
- Mint.initAndStartSession(this.getApplication(), "7e3b93f8");
+ String analyticsKey = BuildConfig.ANALYTICS_KEY;
+ Mint.initAndStartSession(this.getApplication(), analyticsKey);
Mint.enableDebugLog();
Mint.enableLogging(true);
}
diff --git a/app/src/main/java/com/performancetweaker/app/ui/adapters/AlarmTriggerAdapter.java b/app/src/main/java/com/performancetweaker/app/ui/adapters/AlarmTriggerAdapter.java
index 8aeef49..3087cc1 100755
--- a/app/src/main/java/com/performancetweaker/app/ui/adapters/AlarmTriggerAdapter.java
+++ b/app/src/main/java/com/performancetweaker/app/ui/adapters/AlarmTriggerAdapter.java
@@ -33,7 +33,7 @@ public AlarmTriggerAdapter(Context ctx) {
totaltime += e.getWakeups();
}
inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- uidNameResolver = UidNameResolver.getInstance(context);
+ uidNameResolver = UidNameResolver.getInstance();
}
@Override
diff --git a/app/src/main/java/com/performancetweaker/app/ui/adapters/CpuWakelocksAdapter.java b/app/src/main/java/com/performancetweaker/app/ui/adapters/CpuWakelocksAdapter.java
index e9e3ccc..0963130 100755
--- a/app/src/main/java/com/performancetweaker/app/ui/adapters/CpuWakelocksAdapter.java
+++ b/app/src/main/java/com/performancetweaker/app/ui/adapters/CpuWakelocksAdapter.java
@@ -33,18 +33,9 @@ public class CpuWakelocksAdapter extends BaseAdapter {
public CpuWakelocksAdapter(Context ctx) {
this.context = ctx;
partialWakelocks = BatteryStatsUtils.getInstance(context).getCpuWakelocksStats(false);
- /*
- * calculate total time
- */
totalTime = (int) SystemClock.elapsedRealtime();
-// if (partialWakelocks != null && partialWakelocks.size() != 0) {
-// totalTime = 0;
-// for (Wakelock wl : partialWakelocks) {
-// totalTime += wl.getDuration() / 1000;
-// }
-// }
inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- uidNameResolver = UidNameResolver.getInstance(context);
+ uidNameResolver = UidNameResolver.getInstance();
}
@Override
diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml
deleted file mode 100755
index 63fc816..0000000
--- a/app/src/main/res/values-w820dp/dimens.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- 64dp
-
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 47c8224..aa9888b 100755
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -2,4 +2,8 @@
16dp16dp
+
+ 20sp
+ 16sp
+ 13sp
diff --git a/build.gradle b/build.gradle
index 73324b8..a320c35 100755
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.3.3'
+ classpath 'com.android.tools.build:gradle:3.0.0'
}
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 0ef9517..1f844ba 100755
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Tue May 02 20:30:56 IST 2017
+#Sat Nov 04 19:12:19 IST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
diff --git a/settings.gradle b/settings.gradle
index db664f9..e7b4def 100755
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,2 +1 @@
include ':app'
-include ':androidCommon'