mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-02-04 09:05:34 -05:00
Many fixes
This commit is contained in:
parent
e4435f9eac
commit
f5e2d2dece
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2014 The Android Open Source Project
|
# Copyright (C) 2016 The Android Open Source Project
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@ -23,11 +23,12 @@ include $(CLEAR_VARS)
|
|||||||
|
|
||||||
LOCAL_MODULE := FennecDOS
|
LOCAL_MODULE := FennecDOS
|
||||||
LOCAL_MODULE_CLASS := APPS
|
LOCAL_MODULE_CLASS := APPS
|
||||||
LOCAL_MULTILIB := both
|
|
||||||
LOCAL_CERTIFICATE := PRESIGNED
|
LOCAL_CERTIFICATE := PRESIGNED
|
||||||
|
LOCAL_DEX_PREOPT := false
|
||||||
|
LOCAL_MODULE_TARGET_ARCH := arm
|
||||||
|
|
||||||
LOCAL_OVERRIDES_PACKAGES := Jelly
|
LOCAL_OVERRIDES_PACKAGES := Jelly
|
||||||
LOCAL_DEX_PREOPT := false
|
|
||||||
LOCAL_SRC_FILES := prebuilt/Fennec_DOS-Shim.apk
|
LOCAL_SRC_FILES := prebuilt/Fennec_DOS-Shim.apk
|
||||||
|
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
diff --git a/keymaster_configuration.cpp b/keymaster_configuration.cpp
|
||||||
|
index 428197c..42df7d6 100644
|
||||||
|
--- a/keymaster_configuration.cpp
|
||||||
|
+++ b/keymaster_configuration.cpp
|
||||||
|
@@ -89,7 +89,10 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
regmatch_t matches[kPlatformVersionMatchCount];
|
||||||
|
- if (regexec(®ex, version_str, kPlatformVersionMatchCount, matches, 0 /* flags */)) {
|
||||||
|
+ int not_match
|
||||||
|
+ = regexec(®ex, version_str, kPlatformVersionMatchCount, matches, 0 /* flags */);
|
||||||
|
+ regfree(®ex);
|
||||||
|
+ if (not_match) {
|
||||||
|
ALOGI("Platform version string does not match expected format. Using version 0.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -109,7 +112,10 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
regmatch_t matches[kPlatformPatchlevelMatchCount];
|
||||||
|
- if (regexec(®ex, patchlevel_str, kPlatformPatchlevelMatchCount, matches, 0 /* flags */)) {
|
||||||
|
+ int not_match
|
||||||
|
+ = regexec(®ex, patchlevel_str, kPlatformPatchlevelMatchCount, matches, 0 /* flags */);
|
||||||
|
+ regfree(®ex);
|
||||||
|
+ if (not_match) {
|
||||||
|
ALOGI("Platform patchlevel string does not match expected format. Using patchlevel 0");
|
||||||
|
return 0;
|
||||||
|
}
|
@ -0,0 +1,96 @@
|
|||||||
|
diff --git a/include/keymaster/keymaster_configuration.h b/include/keymaster/keymaster_configuration.h
|
||||||
|
index 97b7fa5..69738fd 100644
|
||||||
|
--- a/include/keymaster/keymaster_configuration.h
|
||||||
|
+++ b/include/keymaster/keymaster_configuration.h
|
||||||
|
@@ -40,12 +40,24 @@
|
||||||
|
uint32_t GetOsVersion(const char* version_string);
|
||||||
|
|
||||||
|
/**
|
||||||
|
+ * Retrieves and parses OS version information from build properties. Returns 0 if the string
|
||||||
|
+ * doesn't contain a numeric version number.
|
||||||
|
+ */
|
||||||
|
+uint32_t GetOsVersion();
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
* Parses OS patch level string, returning year and month in integer form. For example, "2016-03-25"
|
||||||
|
* will be returned as 201603. Returns 0 if the string doesn't contain a date in the form
|
||||||
|
* YYYY-MM-DD.
|
||||||
|
*/
|
||||||
|
uint32_t GetOsPatchlevel(const char* patchlevel_string);
|
||||||
|
|
||||||
|
+/**
|
||||||
|
+ * Retrieves and parses OS patch level from build properties. Returns 0 if the string doesn't
|
||||||
|
+ * contain a date in the form YYYY-MM-DD.
|
||||||
|
+ */
|
||||||
|
+uint32_t GetOsPatchlevel();
|
||||||
|
+
|
||||||
|
} // namespace keymaster
|
||||||
|
|
||||||
|
#endif // SYSTEM_KEYMASTER_KEYMASTER_CONFIGURATION_H_
|
||||||
|
diff --git a/keymaster_configuration.cpp b/keymaster_configuration.cpp
|
||||||
|
index 42df7d6..ac6d3c1 100644
|
||||||
|
--- a/keymaster_configuration.cpp
|
||||||
|
+++ b/keymaster_configuration.cpp
|
||||||
|
@@ -70,15 +70,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
keymaster_error_t ConfigureDevice(keymaster2_device_t* dev) {
|
||||||
|
- char version_str[PROPERTY_VALUE_MAX];
|
||||||
|
- property_get(kPlatformVersionProp, version_str, "" /* default */);
|
||||||
|
- uint32_t version = GetOsVersion(version_str);
|
||||||
|
-
|
||||||
|
- char patchlevel_str[PROPERTY_VALUE_MAX];
|
||||||
|
- property_get(kPlatformPatchlevelProp, patchlevel_str, "" /* default */);
|
||||||
|
- uint32_t patchlevel = GetOsPatchlevel(patchlevel_str);
|
||||||
|
-
|
||||||
|
- return ConfigureDevice(dev, version, patchlevel);
|
||||||
|
+ return ConfigureDevice(dev, GetOsVersion(), GetOsPatchlevel());
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t GetOsVersion(const char* version_str) {
|
||||||
|
@@ -89,8 +81,8 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
regmatch_t matches[kPlatformVersionMatchCount];
|
||||||
|
- int not_match
|
||||||
|
- = regexec(®ex, version_str, kPlatformVersionMatchCount, matches, 0 /* flags */);
|
||||||
|
+ int not_match =
|
||||||
|
+ regexec(®ex, version_str, kPlatformVersionMatchCount, matches, 0 /* flags */);
|
||||||
|
regfree(®ex);
|
||||||
|
if (not_match) {
|
||||||
|
ALOGI("Platform version string does not match expected format. Using version 0.");
|
||||||
|
@@ -104,6 +96,12 @@
|
||||||
|
return (major * 100 + minor) * 100 + subminor;
|
||||||
|
}
|
||||||
|
|
||||||
|
+uint32_t GetOsVersion() {
|
||||||
|
+ char version_str[PROPERTY_VALUE_MAX];
|
||||||
|
+ property_get(kPlatformVersionProp, version_str, "" /* default */);
|
||||||
|
+ return GetOsVersion(version_str);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
uint32_t GetOsPatchlevel(const char* patchlevel_str) {
|
||||||
|
regex_t regex;
|
||||||
|
if (regcomp(®ex, kPlatformPatchlevelRegex, REG_EXTENDED) != 0) {
|
||||||
|
@@ -112,8 +110,8 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
regmatch_t matches[kPlatformPatchlevelMatchCount];
|
||||||
|
- int not_match
|
||||||
|
- = regexec(®ex, patchlevel_str, kPlatformPatchlevelMatchCount, matches, 0 /* flags */);
|
||||||
|
+ int not_match =
|
||||||
|
+ regexec(®ex, patchlevel_str, kPlatformPatchlevelMatchCount, matches, 0 /* flags */);
|
||||||
|
regfree(®ex);
|
||||||
|
if (not_match) {
|
||||||
|
ALOGI("Platform patchlevel string does not match expected format. Using patchlevel 0");
|
||||||
|
@@ -130,4 +128,10 @@
|
||||||
|
return year * 100 + month;
|
||||||
|
}
|
||||||
|
|
||||||
|
+uint32_t GetOsPatchlevel() {
|
||||||
|
+ char patchlevel_str[PROPERTY_VALUE_MAX];
|
||||||
|
+ property_get(kPlatformPatchlevelProp, patchlevel_str, "" /* default */);
|
||||||
|
+ return GetOsPatchlevel(patchlevel_str);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
} // namespace keymaster
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2014 The Android Open Source Project
|
# Copyright (C) 2016 The Android Open Source Project
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@ -23,11 +23,12 @@ include $(CLEAR_VARS)
|
|||||||
|
|
||||||
LOCAL_MODULE := FennecDOS
|
LOCAL_MODULE := FennecDOS
|
||||||
LOCAL_MODULE_CLASS := APPS
|
LOCAL_MODULE_CLASS := APPS
|
||||||
LOCAL_MULTILIB := both
|
|
||||||
LOCAL_CERTIFICATE := PRESIGNED
|
LOCAL_CERTIFICATE := PRESIGNED
|
||||||
|
LOCAL_DEX_PREOPT := false
|
||||||
|
LOCAL_MODULE_TARGET_ARCH := arm
|
||||||
|
|
||||||
LOCAL_OVERRIDES_PACKAGES := Jelly
|
LOCAL_OVERRIDES_PACKAGES := Jelly
|
||||||
LOCAL_DEX_PREOPT := false
|
|
||||||
LOCAL_SRC_FILES := prebuilt/Fennec_DOS-Shim.apk
|
LOCAL_SRC_FILES := prebuilt/Fennec_DOS-Shim.apk
|
||||||
|
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 518f42b01375427783ac267e342f96b3804babce
|
Subproject commit ce74e424e1c05e1b72af780fdca5311ff45facdd
|
@ -167,6 +167,10 @@ cat /tmp/ar/hosts >> rootdir/etc/hosts #Merge in our HOSTS file
|
|||||||
git revert 0217dddeb5c16903c13ff6c75213619b79ea622b d7aa1231b6a0631f506c0c23816f2cd81645b15f #Always update recovery
|
git revert 0217dddeb5c16903c13ff6c75213619b79ea622b d7aa1231b6a0631f506c0c23816f2cd81645b15f #Always update recovery
|
||||||
patch -p1 < $patches"android_system_core/0001-Harden_Mounts.patch" #Harden mounts with nodev/noexec/nosuid. Disclaimer: From CopperheadOS 13.0
|
patch -p1 < $patches"android_system_core/0001-Harden_Mounts.patch" #Harden mounts with nodev/noexec/nosuid. Disclaimer: From CopperheadOS 13.0
|
||||||
|
|
||||||
|
enterAndClear "system/keymaster"
|
||||||
|
patch -p1 < $patches"android_system_keymaster/0001-Backport_Fixes.patch" #Fixes from 8.1, appears to fix https://jira.lineageos.org/browse/BUGBASH-590
|
||||||
|
patch -p1 < $patches"android_system_keymaster/0002-Backport_Fixes.patch"
|
||||||
|
|
||||||
enterAndClear "system/vold"
|
enterAndClear "system/vold"
|
||||||
patch -p1 < $patches"android_system_vold/0001-AES256.patch" #Add a variable for enabling AES-256 bit encryption
|
patch -p1 < $patches"android_system_vold/0001-AES256.patch" #Add a variable for enabling AES-256 bit encryption
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ sed -i 's|>LineageOS|>DivestOS|' res/values*/strings.xml
|
|||||||
|
|
||||||
enter "vendor/cm"
|
enter "vendor/cm"
|
||||||
sed -i 's|https://lineageos.org/legal|https://divestos.xyz/pages/about.html|' config/common.mk;
|
sed -i 's|https://lineageos.org/legal|https://divestos.xyz/pages/about.html|' config/common.mk;
|
||||||
sed -i '/.*ZIPFILE=/s/lineage/divestos/' build/envsetup.sh
|
#sed -i '/.*ZIPFILE=/s/lineage/divestos/' build/envsetup.sh; #TODO: Enable before release and update server
|
||||||
rm -rf bootanimation #TODO: Create a boot animation
|
rm -rf bootanimation #TODO: Create a boot animation
|
||||||
|
|
||||||
cd $base
|
cd $base
|
||||||
|
@ -41,7 +41,7 @@ sed -i 's|>LineageOS|>DivestOS|' res/values*/strings.xml
|
|||||||
|
|
||||||
enter "vendor/lineage"
|
enter "vendor/lineage"
|
||||||
sed -i 's|https://lineageos.org/legal|https://divestos.xyz/pages/about.html|' config/common.mk;
|
sed -i 's|https://lineageos.org/legal|https://divestos.xyz/pages/about.html|' config/common.mk;
|
||||||
sed -i '/.*ZIPFILE=/s/lineage/divestos/' build/envsetup.sh
|
#sed -i '/.*ZIPFILE=/s/lineage/divestos/' build/envsetup.sh; #TODO: Enable before release and update server
|
||||||
rm -rf bootanimation #TODO: Create a boot animation
|
rm -rf bootanimation #TODO: Create a boot animation
|
||||||
|
|
||||||
cd $base
|
cd $base
|
||||||
|
Loading…
x
Reference in New Issue
Block a user