Skip to content

Instantly share code, notes, and snippets.

Hello,
This mail is about a new trend in smartphones, which is under-display fingerprint sensors, which lacks Treble HAL, and I believe it would be very useful to have one.
I believe it is possible for AOSP team to both define the HAL (well imo that's the minimum), and have a minimal implementation (though ugly from an UX point of view), without too much work. This would require cooperation from people handling biometrics, and people handling surfaceflinger.
There are currently two kinds of under-display fingerprint.
- Ultrasonic which basically just work, except that they require visual clues for the user
- Optical fingerprint sensor which requires cooperation from the display
First issue for both technologies is to show to the user the position of the fingerprint sensor.
/system/bin/ip link add eth_slave type veth peer name slave
ifconfig eth0 down
ip link set eth0 name nfsif
ifconfig nfsif up
#We're changing ip routes/interfaces while nfs is mounted... sounds very safe.
ifconfig nfsif 0.0.0.0 up
brctl addbr br0
#Add nfsif first to get the same MAC, and, hopefully, same IP
@luca020400
luca020400 / gapps
Last active September 13, 2019 13:01
adb shell rm -rf /system/app/ExtShared /system/app/PrintRecommendationService /system/priv-app/PackageInstaller /system/priv-app/PermissionController /system/product/app/Email /system/product/app/Gallery2 /system/product/app/PhotoTable /system/product/app/QuickSearchBox /system/product/priv-app/OneTimeInitializer /system/product/priv-app/Provision; push app/GoogleExtShared app/GooglePrintRecommendationService etc/permissions/privapp-permissions-google.xml priv-app/GooglePackageInstaller priv-app/GooglePermissionControllerPrebuilt product/app/Chrome product/app/Drive product/app/GoogleContactsSyncAdapter product/app/GoogleTTS product/app/LocationHistoryPrebuilt product/app/Music2 product/app/Maps product/app/Photos product/app/PrebuiltGmail product/app/TrichromeLibrary product/app/Videos product/app/WebViewGoogle product/app/YouTube product/etc/permissions/com.google.android.maps.xml product/etc/permissions/privapp-permissions-google-ps.xml product/etc/permissions/privapp-permissions-google-p.xml product/etc/
VENDOR_SEPOL_PATH="${1}"
OUT_DIR="${2}"
rm -rf contexts contexts-sorted vendor-contexts ${OUT_DIR}
mkdir -p ${OUT_DIR}/vendor
context_files="file_contexts hwservice_contexts property_contexts seapp_contexts"
for context_file in $context_files; do
while read context_line; do
if ! grep -Frq "`echo "${context_line}" | cut -f1`" ../../../device/qcom/sepolicy/ ../../../system/sepolicy/ --exclude-dir=prebuilts --exclude-dir=compat; then
@verticalgrain
verticalgrain / chip-flashing-guide-nov-2018.md
Last active July 12, 2024 17:30
NextThingCo C.H.I.P. Flashing guide as of November, 2018

Below are the steps required to flash a NextThingCo CHIP or PocketCHIP from the command line, as of November 2018. The web flasher no longer works, and there are numerous errors when flashing from the command line, mostly due to broken dependencies. The following method works for flashing a CHIP as of November 2018:

Note: Flashing must be done on Linux. Tested on Ubuntu and Rasparian. Mac OS seems to not work.

  1. Download and unpack the CHIP-SDK.zip from one of the following:
  1. Download and unpack CHIP-tools.zip from one of the following:
Modules using the Blueprint build system:
oreo-mr1-release/external/fec/Android.bp: misc_undefined: ["integer"],
oreo-mr1-release/external/fec/Android.bp: misc_undefined: ["integer"],
oreo-mr1-release/external/libvpx/libwebm/Android.bp: cfi: true,
oreo-mr1-release/external/libvpx/libwebm/Android.bp: cfi: true,
oreo-mr1-release/external/libvpx/Android.bp: cfi: true,
oreo-mr1-release/external/libvpx/Android.bp: cfi: true,
oreo-mr1-release/external/libvpx/Android.bp: blacklist: "cfi_blacklist.txt",
oreo-mr1-release/external/flac/libFLAC/Android.bp: cfi: true,
@lrvick
lrvick / yubikey-provision-ssh.sh
Created August 3, 2017 22:09
Provision SSH key into Yubikey
#!/bin/bash
# Script to automate the provisioning of a new SSH certificate onto a yubikey device.
set -e
set -u
set -o pipefail
for path in "/usr/lib64/opensc-pkcs11.so" \
"/usr/lib/opensc-pkcs11.so" \
#!/usr/bin/env python
#
# shipit.py
# v1.7.1
#
# Written by Dan Pasanen, 2016
# WTFPL
#
# CHANGES
# v1.0 - initial release
# Script to add back comments removed from source code
# Example use case: comments stripped out of HTC kernel releases
#
# Copyright (C) 2016 Sultan Qasim Khan
#
# Usage:
# 1. Find the closest upstream source release with comments (eg. CAF)
# 2. After checking out the closest upstream release, create a git
# commit overlaying the OEM modifications. Do this by replacing
# all files with the OEM versions and committing the change.
#! /usr/bin/python
import argparse
import os.path
import glob
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description='''\
Replacing values in arrays.xml with @string/ links. Generates three new files for each locale: