mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-08-15 17:40:42 -04:00
Initial commit, long overdue
This commit is contained in:
commit
c0083c1519
292 changed files with 951990 additions and 0 deletions
|
@ -0,0 +1,21 @@
|
|||
From 17d82df9831a6e5801203ffe3b0e1aba177f7b20 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Tue, 19 Jan 2016 19:24:47 -0500
|
||||
Subject: [PATCH] mark as privileged app
|
||||
|
||||
---
|
||||
Android.mk | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Android.mk b/Android.mk
|
||||
index c6110a3..ce4e8cf 100644
|
||||
--- a/Android.mk
|
||||
+++ b/Android.mk
|
||||
@@ -19,6 +19,7 @@ $(fdroid_root)/$(fdroid_dir)/$(fdroid_apk):
|
||||
cd $(fdroid_root)/$(fdroid_dir) && gradle assembleRelease
|
||||
|
||||
LOCAL_CERTIFICATE := platform
|
||||
+LOCAL_PRIVILEGED_MODULE := true
|
||||
LOCAL_SRC_FILES := $(fdroid_dir)/$(fdroid_apk)
|
||||
LOCAL_MODULE_CLASS := APPS
|
||||
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
|
|
@ -0,0 +1,53 @@
|
|||
From 11419a198fb864d5479c9ce3f1ffdc63114020c0 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Fri, 4 Mar 2016 08:53:19 -0500
|
||||
Subject: [PATCH] remove privileged extension settings
|
||||
|
||||
---
|
||||
.../java/org/fdroid/fdroid/views/fragments/PreferencesFragment.java | 4 +++-
|
||||
app/src/main/res/xml/preferences.xml | 2 ++
|
||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/src/main/java/org/fdroid/fdroid/views/fragments/PreferencesFragment.java b/app/src/main/java/org/fdroid/fdroid/views/fragments/PreferencesFragment.java
|
||||
index 4304b87..b94ca31 100644
|
||||
--- a/app/src/main/java/org/fdroid/fdroid/views/fragments/PreferencesFragment.java
|
||||
+++ b/app/src/main/java/org/fdroid/fdroid/views/fragments/PreferencesFragment.java
|
||||
@@ -41,7 +41,7 @@
|
||||
Preferences.PREF_LANGUAGE,
|
||||
Preferences.PREF_KEEP_CACHE_TIME,
|
||||
Preferences.PREF_EXPERT,
|
||||
- Preferences.PREF_PRIVILEGED_INSTALLER,
|
||||
+ //Preferences.PREF_PRIVILEGED_INSTALLER,
|
||||
Preferences.PREF_ENABLE_PROXY,
|
||||
Preferences.PREF_PROXY_HOST,
|
||||
Preferences.PREF_PROXY_PORT,
|
||||
@@ -259,8 +259,10 @@ public void onResume() {
|
||||
|
||||
currentKeepCacheTime = Preferences.get().getKeepCacheTime();
|
||||
|
||||
+ /*
|
||||
initPrivilegedInstallerPreference();
|
||||
initUpdatePrivilegedExtensionPreference();
|
||||
+ */
|
||||
// this pref's default is dynamically set based on whether Orbot is installed
|
||||
boolean useTor = Preferences.get().isTorEnabled();
|
||||
useTorCheckPref.setDefaultValue(useTor);
|
||||
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
|
||||
index aa80594..573e443 100644
|
||||
--- a/app/src/main/res/xml/preferences.xml
|
||||
+++ b/app/src/main/res/xml/preferences.xml
|
||||
@@ -91,6 +91,7 @@
|
||||
android:summary="@string/unstable_updates_summary"
|
||||
android:defaultValue="false"
|
||||
android:dependency="expert" />
|
||||
+ <!--
|
||||
<CheckBoxPreference android:title="@string/system_installer"
|
||||
android:defaultValue="false"
|
||||
android:key="privilegedInstaller"
|
||||
@@ -100,5 +101,6 @@
|
||||
android:summary="@string/uninstall_system_summary"
|
||||
android:key="uninstallPrivilegedApp"
|
||||
android:dependency="expert" />
|
||||
+ -->
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
|
@ -0,0 +1,94 @@
|
|||
From c8fa50c18694d35a4c2e334d886056556b35749c Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sun, 20 Nov 2016 05:35:13 -0500
|
||||
Subject: [PATCH] non-Copperhead system app updates are incompatible
|
||||
|
||||
---
|
||||
.../org/fdroid/fdroid/CompatibilityChecker.java | 42 +++++++++++++++++++++-
|
||||
1 file changed, 41 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/src/main/java/org/fdroid/fdroid/CompatibilityChecker.java b/app/src/main/java/org/fdroid/fdroid/CompatibilityChecker.java
|
||||
index 74d3b0f..f71375f 100644
|
||||
--- a/app/src/main/java/org/fdroid/fdroid/CompatibilityChecker.java
|
||||
+++ b/app/src/main/java/org/fdroid/fdroid/CompatibilityChecker.java
|
||||
@@ -2,18 +2,23 @@
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
+import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.FeatureInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
+import android.content.pm.PackageManager.NameNotFoundException;
|
||||
+import android.content.pm.Signature;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
+import android.util.Log;
|
||||
|
||||
import org.fdroid.fdroid.compat.SupportedArchitectures;
|
||||
import org.fdroid.fdroid.data.Apk;
|
||||
-
|
||||
+import org.fdroid.fdroid.Utils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
+import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -29,6 +34,7 @@
|
||||
private final String[] cpuAbis;
|
||||
private final String cpuAbisDesc;
|
||||
private final boolean ignoreTouchscreen;
|
||||
+ private final HashMap<String, String> systemApps;
|
||||
|
||||
public CompatibilityChecker(Context ctx) {
|
||||
|
||||
@@ -56,6 +62,34 @@ public CompatibilityChecker(Context ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
+ systemApps = new HashMap<>();
|
||||
+ for (final ApplicationInfo ai: pm.getInstalledApplications(0)) {
|
||||
+ Signature sig;
|
||||
+ try {
|
||||
+ sig = ctx.getPackageManager().getPackageInfo(
|
||||
+ ai.packageName, PackageManager.GET_SIGNATURES).signatures[0];
|
||||
+ } catch (NameNotFoundException e) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ byte[] rawCertBytes = sig.toByteArray();
|
||||
+
|
||||
+ final byte[] fdroidSig = new byte[rawCertBytes.length * 2];
|
||||
+ for (int j = 0; j < rawCertBytes.length; j++) {
|
||||
+ byte v = rawCertBytes[j];
|
||||
+ int d = (v >> 4) & 0xF;
|
||||
+ fdroidSig[j * 2] = (byte) (d >= 10 ? ('a' + d - 10) : ('0' + d));
|
||||
+ d = v & 0xF;
|
||||
+ fdroidSig[j * 2 + 1] = (byte) (d >= 10 ? ('a' + d - 10) : ('0' + d));
|
||||
+ }
|
||||
+
|
||||
+ String hash = Utils.hashBytes(fdroidSig, "md5");
|
||||
+
|
||||
+ if ((ai.flags & ApplicationInfo.FLAG_SYSTEM) != 0 ||
|
||||
+ (ai.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) {
|
||||
+ systemApps.put(ai.packageName, hash);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
cpuAbis = SupportedArchitectures.getAbis();
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
@@ -119,6 +153,12 @@ private boolean compatibleApi(@Nullable String[] nativecode) {
|
||||
+ " while your architectures are " + cpuAbisDesc);
|
||||
}
|
||||
|
||||
+ String hash = systemApps.get(apk.packageName);
|
||||
+ if (hash != null && !hash.equalsIgnoreCase(apk.sig)) {
|
||||
+ Log.i(TAG, "incompatible system app: " + apk.packageName + " " + hash + " " + apk.sig);
|
||||
+ Collections.addAll(incompatibleReasons, "Not already installed as a system app");
|
||||
+ }
|
||||
+
|
||||
return incompatibleReasons;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
From c58e3bb0f5ee76b82c4249cd7b4432b7fb711add Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Tue, 6 Dec 2016 17:11:48 -0500
|
||||
Subject: [PATCH] use build tools 25.0.1
|
||||
|
||||
---
|
||||
app/build.gradle | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/build.gradle b/app/build.gradle
|
||||
index 7ae8ca4..a81160d 100644
|
||||
--- a/app/build.gradle
|
||||
+++ b/app/build.gradle
|
||||
@@ -146,7 +146,7 @@ if (!hasProperty('sourceDeps')) {
|
||||
|
||||
android {
|
||||
compileSdkVersion 24
|
||||
- buildToolsVersion '25.0.0'
|
||||
+ buildToolsVersion '25.0.1'
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
|
||||
buildTypes {
|
Loading…
Add table
Add a link
Reference in a new issue