Skip to content

Instantly share code, notes, and snippets.

View dodola's full-sized avatar
:octocat:
Focusing

dodola dodola

:octocat:
Focusing
View GitHub Profile
@dodola
dodola / WSA_Houdini_Extracter.bat
Created February 12, 2023 18:15 — forked from natsumerinchan/WSA_Houdini_Extracter.bat
Extract libhoudini from WSA.
@echo off
@rem Set variables
set "TMP_PATH=/data/local/tmp"
set "WSA_PORT=127.0.0.1:58526"
@rem Check whether platform-tools is exist or not
adb devices >nul
if not %errorlevel% == 0 (
cls
echo [ERROR] It seems that adb is not exist!
#!/usr/bin/env python3
import argparse
import struct
# little endian, 32-bit words
# Could check for magic 0x01020304 / 0x04030201 to determine endianness
ENDI = '<'
WORD_PAT = ENDI + 'I'
WORD_SZ = struct.calcsize(WORD_PAT)
@dodola
dodola / gist:02a94bf507a4470e4e8138bffc328592
Created November 1, 2018 00:31 — forked from syoyo/gist:9acc46554723db14d3a5
clang/LLVM for Android ARM64 corss compile script
#!/bin/bash
rm -rf CMake*
export NDK=/home/syoyo/local/android-ndk-r10e
export SYSROOT=$NDK/platforms/android-21/arch-arm64
export CC="$NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc"
export CXX="$NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++"
@dodola
dodola / gist:0b78eb36e6d84955dfcb6ccac601fd20
Created October 24, 2018 03:06 — forked from dzhioev/gist:6127982
android cout 重定向
#include <android/log.h>
class androidbuf: public std::streambuf {
public:
enum { bufsize = 128 }; // ... or some other suitable buffer size
androidbuf() { this->setp(buffer, buffer + bufsize - 1); }
private:
int overflow(int c) {
if (c == traits_type::eof()) {
*this->pptr() = traits_type::to_char_type(c);
@dodola
dodola / GLTextureView.java
Created March 2, 2016 11:13 — forked from eleventigers/GLTextureView.java
GLTextureView from GLSurfaceView
import java.io.Writer;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGL11;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.egl.EGLSurface;
import javax.microedition.khronos.opengles.GL;
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software