Skip to content

Instantly share code, notes, and snippets.

@spacekitteh
spacekitteh / aosp.md
Created December 23, 2016 06:47 — forked from thestinger/aosp.md
NOT READY FOR PUBLISHING (i.e. future blog post): notes about problems with the Android Open Source Project

The Neglected Android Open Source Project

What is the Android Open Source Project?

The Android Open Source Project is essentially the Android source code for Nexus devices and the Pixel C. However, it's somewhat different from the internal source tree used to build stock Android for those devices.

It's important to note that it's only closely tied to the internal source code for stable releases. The master branch of AOSP does not closely track the internal development. The internal work is released as part of a stable update, and then merged into the AOSP master branch afterwards. AOSP master and the internal source tree are repeatedly merged into each other to some extent during a year of development, as some work happens out in the open (lots of the low-level userspace work) while other work happens internally. For some repositories, there's substantial amounts of both. The merges are primarily from AOSP into the internal tree until new stable source code is released. These strange workflows result

@spacekitteh
spacekitteh / whiteboardCleaner.md
Created December 18, 2015 03:08 — forked from lelandbatey/whiteboardCleaner.md
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

project build/
diff --git a/target/product/core.mk b/target/product/core.mk
index b108b145e..a8d4ac4b6 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -60,6 +60,10 @@ PRODUCT_PACKAGES += \
MmsService \
chromium \
Updater \
@spacekitteh
spacekitteh / gpg-offline-master.md
Created February 20, 2017 21:18 — forked from abeluck/gpg-offline-master.md
GPG Offline Master Key w/ smartcard
@spacekitteh
spacekitteh / shell.nix
Created March 8, 2017 01:16
trying to figure out nix shell
{ pkgs ? import <nixpkgs> {}, pkgs_i686 ? pkgs.pkgsi686Linux }:
{
myGit = pkgs.git.overrideDerivation (attrs: {
src = ./.;
withManual = false;
guiSupport = false;
tcl=null;
});
}
warning: dumping very large path (> 256 MiB); this may run out of memory
these paths will be fetched (9.00 MiB download, 56.27 MiB unpacked):
/nix/store/2h3nj26vfl2af3c5gsncpx0chpxfaq0g-perl-XML-SAX-0.96
/nix/store/62i4mwmaq01r2mjqh36m72nqwpypr8n9-docbook2X-0.8.8
/nix/store/75cd1i4kq6qnqlzjg09dbngwwc7gqh4l-perl-HTML-Parser-3.71-devdoc
/nix/store/791mnx4d43fc0ngk8lb76r5rkhbdgpvk-texinfo-5.2
/nix/store/8afrdhqf38qjrdci82hva2rxcsdhi9if-bash-4.4-p5-dev
/nix/store/9fkx78zm42zv5477j48ww8y00wlilaj1-hook
/nix/store/9h17p3cns85zaamc59k6h5jvnpgx3ca4-texinfo-6.3
/nix/store/9smylqhb4d6qp7wfi06b8hgwpl5592jx-libxslt-1.1.29-dev

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

[spacekitteh@spaceserv:~/nix-patches/nixpkgs/pkgs/build-support/fetchgitrepo]$ nix-build test.nix
these derivations will be built:
/nix/store/dl2ajlh08n7fpbn0rkc78hdylkpsmrn9-foo.drv
building path(s) ‘/nix/store/mrsbrb4abqgw0lidbc2bqkw33bab7wd8-foo’
warning: gpg (GnuPG) is not available.
warning: Installing it is strongly encouraged.
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno -2] Name or service not known
builder for ‘/nix/store/dl2ajlh08n7fpbn0rkc78hdylkpsmrn9-foo.drv’ failed with exit code 1
set_robust_list(0x7ffff7ff09e0, 24) = 0
getpid() = 70
close(3) = 0
close(5) = 0
dup2(4, 1) = 1
close(4) = 0
chdir("/nix/store/f44hzyym94vip9wp10jhsiq0igd67qyg-foo/.repo/repo") = 0
execve("/nix/store/9lhgvxka8m162d5db0my5cd4qpjii9sv-git-2.12.0/bin/git", ["git", "config", "--get-regexp", "url.*.insteadof"], [/* 53 vars */]) = 0
brk(NULL) = 0x83b000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffff7ff5000
execve("/nix/store/knkfkp3l1c4bskd9f0hi9jsl72ff5mzl-git-repo-1.23/bin/repo", ["repo", "init", "--manifest-url=https://github.co"..., "--manifest-name=HEAD", "--depth=1"], [/* 53 vars */]) = 0
brk(NULL) = 0x602000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffff7ff5000
access("/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/nix/store/l4v7h3zaiffrnqfqzy60f14h0s1mcp7a-python-2.7.13/lib/tls/x86_64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/l4v7h3zaiffrnqfqzy60f14h0s1mcp7a-python-2.7.13/lib/tls/x86_64", 0x7fffffffd090) = -1 ENOENT (No such file or directory)
open("/nix/store/l4v7h3zaiffrnqfqzy60f14h0s1mcp7a-python-2.7.13/lib/tls/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/l4v7h3zaiffrnqfqzy60f14h0s1mcp7a-python-2.7.13/lib/tls", 0x7fffffffd090) = -1 ENOENT (No such file or directory)
open("/nix/store/l4v7h3zaiffrnqfqzy60f14