Skip to content

Instantly share code, notes, and snippets.

Cheef's Grand APDU List Smartcard Selected Information APDU list
Reference: http://web.archive.org/web/20090630004017/http://cheef.ru/docs/HowTo/APDU.info
#------------+------------------------+------------------------+----------------------+--------------------------------+
|ClaIns P1 P2|Lc Send Data |Le Recv Data | Specification | Description |
+------------+------------------------+------------------------+----------------------+--------------------------------+
| 04 | ISO 7816-9 6.3 | DEACTIVATE FILE |
| A0 04 00 00 00 | 3GPP TS 11.11 | INVALIDATE |
| A0 04 00 00 00 | SAGEM SCT U34 6.15 | INVALIDATE |
+------------+------------------------+------------------------+----------------------+--------------------------------+
@PEMessage
PEMessage / android-cli-build.md
Created July 8, 2025 01:13 — forked from stkptr/android-cli-build.md
Guide for getting a command line buildsystem for Android apps set up

Developing Android apps without Android Studio (Debian 12)

If you're looking to develop an Android app you might be led to Android Studio. It's the IDE recommended and developed by Google for the express purpose of Android development. It does what it needs to, but if you look at the system requirements you will see some alarming numbers. If you're using an older system, or simply don't want to use AndroidStudio, this is the guide for you.

Installing packages

We won't be using many apt packages due to permissions issues and incompatible versions. That being said:

$ sudo apt install openjdk-17-jdk sdkmanager kotlin
@PEMessage
PEMessage / build-static-uchardet.sh
Created June 12, 2025 16:53
build-static-uchardet.sh
#!/bin/sh
docker build -t chardet-builder - <<EOF
# Dockerfile with caching optimizations
FROM alpine:3.18 AS builder
# Install dependencies in a single layer for caching
RUN apk add \
musl-dev git make
RUN apk add \
@PEMessage
PEMessage / build-static-vmtouch.sh
Created June 12, 2025 16:52
build-static-vmtouch.sh
#!/bin/sh
# Credit: https://gist.github.com/Saoneth/02f08d4714e6fc035e7017c74b3ef29a
docker run -t \
-e UID="$(id -u)" \
-e GID="$(id -g)" \
-v "$PWD":/w \
-w /tmp \
--rm \
alpine \
sh -c '
@PEMessage
PEMessage / build-static-ast-grep.sh
Created June 12, 2025 16:51
build-static-ast-grep.sh
#!/bin/sh
# Credit: https://gist.github.com/Saoneth/02f08d4714e6fc035e7017c74b3ef29a
docker run -t \
-e UID="$(id -u)" \
-e GID="$(id -g)" \
-v "$PWD":/w \
-w /tmp \
--rm \
alpine \
sh -c "
@PEMessage
PEMessage / build-static-ag.sh
Created June 12, 2025 16:49
build-static-ag.sh
#!/bin/sh
# Credit: https://www.gkbrk.com/static-zstd-binary
docker run -t \
-e UID="$(id -u)" \
-e GID="$(id -g)" \
-v "$PWD":/w \
-w /tmp \
--rm \
-it \
alpine:3.18 \
@PEMessage
PEMessage / gdb-trace.py
Created June 11, 2025 01:50 — forked from quark-zju/gdb-trace.py
Trace all function calls using gdb
#!/usr/bin/env python
try:
import gdb
inside_gdb = True
except ImportError:
inside_gdb = False
if inside_gdb:
@PEMessage
PEMessage / dump-type.py
Created June 3, 2025 03:09 — forked from jimblandy/dump-type.py
GDB Python script to define a command for inspecting types.
# Put this in a file BLAH/dump-type.py and then put this in your ~/.gdbinit file
# (or type it at the GDB prompt):
#
# source BLAH/dump-type.py
#
# Then you can say:
#
# (gdb) help jimb-dump-type
#
# and you should get a help message.
@PEMessage
PEMessage / backtrace.cpp
Created January 16, 2025 03:00 — forked from xiaozhuai/backtrace.cpp
Android native c++ get back trace (stacktrace)
#include <tinyformat.h>
#include <unwind.h>
#include <cxxabi.h>
#include <dlfcn.h>
struct android_backtrace_state {
void **current;
void **end;
};
@PEMessage
PEMessage / backtrace.cpp
Created January 16, 2025 03:00 — forked from xiaozhuai/backtrace.cpp
Android native c++ get back trace (stacktrace)
#include <tinyformat.h>
#include <unwind.h>
#include <cxxabi.h>
#include <dlfcn.h>
struct android_backtrace_state {
void **current;
void **end;
};