Skip to content

Instantly share code, notes, and snippets.

@anestisb
anestisb / oatdump_unquicken.patch
Last active April 14, 2024 17:36
oatdump vdex unquicken
project art/
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index a8ab7c6..2bb04a2 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -442,7 +442,7 @@ void CompilerDriver::CompileAll(jobject class_loader,
// We do not decompile a RETURN_VOID_NO_BARRIER into a RETURN_VOID, as the quickening
// optimization does not depend on the boot image (the optimization relies on not
// having final fields in a class, which does not change for an app).
@anestisb
anestisb / art_9.0_compact_dex_converter.patch
Last active December 20, 2023 07:36
Cdex to Dex converter utility using AOSP ART libdexlayout
diff --git a/dexlayout/Android.bp b/dexlayout/Android.bp
index 33ba58f..f3b2a7e 100644
--- a/dexlayout/Android.bp
+++ b/dexlayout/Android.bp
@@ -74,6 +74,13 @@ cc_defaults {
],
}
+cc_defaults {
+ name: "compact_dex_converter_defaults",
@anestisb
anestisb / gist:eb897bbbe49ff69ee1ab
Created November 6, 2014 14:33
AOSP android-5.0.0_r2..master Commit Diff
This file has been truncated, but you can view the full file.
anestisb@deephole:[aosp]: cat logMadness.sh
#!/opt/local/bin/bash
repo forall -c '
REPO_URL=$(git ls-remote --get-url)
echo "\nRepo: $REPO_PROJECT ($REPO_URL)"
if git rev-parse android-5.0.0_r2 >/dev/null 2>&1
then
git log --oneline --no-merges android-5.0.0_r2..master
else
@anestisb
anestisb / art_10.0_cdex_converter.patch
Created January 11, 2020 07:32
Cdex to Dex converter utility using AOSP ART libdexlayout
diff --git a/dexlayout/Android.bp b/dexlayout/Android.bp
index 838510be37..34186d85d7 100644
--- a/dexlayout/Android.bp
+++ b/dexlayout/Android.bp
@@ -132,6 +132,30 @@ cc_defaults {
],
}
+cc_defaults {
+ name: "compact_dex_converter_defaults",
--{ ./system/system/app/BasicDreams/BasicDreams.apk
Signer #1 certificate DN: CN=Android, OU=Android, O=Google Inc., L=Mountain View, ST=California, C=US
Signer #1 certificate SHA-256 digest: c566bebb895d29ebac0667d01dbe2bae5a4aa48947a8a1de8cdf208071a78387
Signer #1 certificate SHA-1 digest: 0d5987e059aa81028dcfa77c66030b669d8ed341
Signer #1 certificate MD5 digest: 2fbc68366c72b5d09065d44a1b44f40b
--{ ./system/system/app/Bluetooth/Bluetooth.apk
Signer #1 certificate DN: CN=Android, OU=Android, O=Google Inc., L=Mountain View, ST=California, C=US
Signer #1 certificate SHA-256 digest: 3ec1c473761c98da4933abd33d6d79f9cd88a954e300a389c93503cc47b4f75e
Signer #1 certificate SHA-1 digest: b841566dc2b469f31114bb271714b5dca644fd80
@anestisb
anestisb / art_9.0_oatdump_cdex.patch
Last active September 28, 2019 06:10
Patch for Android Pie ART oatdump to convert CompactDex to StandardDex before exporting
diff --git a/oatdump/Android.bp b/oatdump/Android.bp
index 71e276d..3d50229 100644
--- a/oatdump/Android.bp
+++ b/oatdump/Android.bp
@@ -35,6 +35,7 @@ art_cc_binary {
shared_libs: [
"libart",
"libart-compiler",
+ "libart-dexlayout",
"libart-disassembler",
@anestisb
anestisb / grok_reindex.sh
Last active June 25, 2019 14:56
OpenGrok conf
#!/bin/bash
readonly HTML_OUT="/var/lib/tomcat8/webapps/ROOT/index.html"
readonly DATA_ROOT="/var/opengrok"
readonly GROK_ROOT="/opt/opengrok/opengrok-1.2.6"
declare -ar IGNORE_PATTERNS=(
"-i *.3gp"
"-i *.a"
"-i *.app"
"-i *.bc"

This is an overview of the usefulness of PaX/grsecurity features for CopperheadOS especially when taking into account the overlap of the access control features with SELinux and that the Nexus line will be entirely 64-bit ARM. Note that it's missing most of the unnamed features without configuration options tied to them. A grsecurity kernel also comes with lots of security bug fixes backported from master, adapted from lkml submissions that were ignored, etc.

Previously, CopperheadOS used ports of PaX to the 3.4 Android kernels used by the Nexus 5 and Galaxy S4. The plan was to start from there, backporting from the PaX stable patches as needed along with reimplementing the relevant pieces of grsecurity without actually applying an old patch and backporting to it.

This is no longer the case for the published releases now that devices have moved to 64-bit ARM (which is not supported by PaX / grsecurity yet) and both the PaX and grsecurity stable patches have become private. There are still PaX ports for test

diff -ru vendor/build.prop /fast-datavault/aosp_prod/out_release_Linux_8.0.0_r3/aosp_prod/target/product/sailfish/vendor/build.prop
--- vendor/build.prop 2009-01-01 10:00:00.000000000 +0200
+++ /fast-datavault/aosp_prod/out_release_Linux_8.0.0_r3/aosp_prod/target/product/sailfish/vendor/build.prop 2017-09-13 10:44:54.183680870 +0300
@@ -1,7 +1,7 @@
-ro.vendor.build.date=Thu Aug 17 20:24:24 UTC 2017
-ro.vendor.build.date.utc=1503001464
-ro.vendor.build.fingerprint=google/sailfish/sailfish:8.0.0/OPR6.170623.012/4283428:user/release-keys
+ro.vendor.build.date=Wed Sep 13 10:44:19 EEST 2017
+ro.vendor.build.date.utc=1505288659

Keybase proof

I hereby claim:

  • I am anestisb on github.
  • I am anestisb (https://keybase.io/anestisb) on keybase.
  • I have a public key whose fingerprint is B144 C357 6031 F568 21C6 614C AAFF 72FE 2F4B B5DB

To claim this, I am signing this object: