Skip to content

Instantly share code, notes, and snippets.

View 18712886438's full-sized avatar
🪀
Focusing

CallMESuper 18712886438

🪀
Focusing
View GitHub Profile
@anestisb
anestisb / art_9.0_compact_dex_converter.patch
Last active March 16, 2025 10:52
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",
@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active November 22, 2025 01:53 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@ppoffice
ppoffice / 01_Android_LXC_Note.md
Last active November 7, 2024 12:48
LXC for Android 9.0.0 r18 Goldfish

Steps to build Android kernel and system for LXC:

  1. Download Android SDK, NDK, system and kernel source code;
  2. Download modified lxc and libcap source code (ppoffiec/lxc-android, ppoffice/libcap-android)
  3. Build Android system from source first so that we can link to its shared library when we build lxc (or maybe we don't have to);
  4. Modify Android kernel config and make sure lxc-checkconfig does not report any missing features. Then build kernel;
  5. Modify Android system/core/rootdir/init.rc according to init.rc.diff. Make sure you mount all the cgroup subsystems needed (cpu, cpuacct, cpuset, memory, pids, devices, freezer, blkio) under /sys/fs/cgruop, otherwise lxc won't find them;
  6. Rebuilt the Android system image so that the modified init.rc is in the image;
  7. Fire up the emulator with custom kernel (emulator -kernel kernel-file-path) and use adb shell and dmesg to check if everything is doing ok.
@FreddieOliveira
FreddieOliveira / docker.md
Last active November 22, 2025 14:26
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@vvb2060
vvb2060 / am_proc_start.cpp
Created July 19, 2022 17:12
monitor app process start
#include <unistd.h>
#include <string>
#include <cinttypes>
#include <android/log.h>
#include <sys/system_properties.h>
using namespace std;
extern "C" {
@SeeFlowerX
SeeFlowerX / hook_snprintf_with_filter.js
Last active December 28, 2022 07:06
有时候想hook一下libc中的函数,但是调用太多分不出来,我们可以使用lr来判断,通过下面的typescript脚本实现了对来自特定so特定偏移的调用;如果要直接获取lr信息,可以使用get_lr_info
// 有时候想hook一下libc中的函数,但是调用太多分不出来,我们可以使用lr来判断,通过下面的typescript脚本实现了对来自特定so特定偏移的调用
function hook_snprintf(){
let libc = Process.getModuleByName("libc.so");
let libdemo = Process.getModuleByName("libdemo.so");
let symbol = "snprintf";
let symbol_addr = libc.getExportByName(symbol);
log(`[${symbol}_addr] ${symbol_addr}`);
Interceptor.attach(symbol_addr, {
onEnter: function(args){
this.result = args[0];
@lateautumn233
lateautumn233 / lxc.md
Last active June 29, 2025 02:50
在安卓上运行Lxc容器

Lxc on Android 📱

1. 编译内核

1.1. 调整内核配置

使用此仓库快捷添加配置

git fetch https://github.com/lateautumn233/android_kernel_docker main
git merge -s ours --no-commit --allow-unrelated-histories --squash FETCH_HEAD
@hldr4
hldr4 / checkKB.py
Created February 24, 2024 03:10
Script to check whether a given attestation keybox is revoked on Google's CRL
import requests
import sys
import xml.etree.ElementTree as ET
from cryptography import x509
'''
Usage: checkKB.py keybox.xml
Checks the EC and RSA certificates against the official CRL