This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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++" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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! |