This file contains hidden or 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
| [General] | |
| skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1 | |
| bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
| # dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114 | |
| loglevel = notify | |
| [Proxy] | |
| BJ-All = custom | |
| BJ-HK-Azure = custom | |
| BJ-US-Azure = custom |
This file contains hidden or 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 android.content.Context; | |
| import android.os.Debug; | |
| import java.io.File; | |
| public class OomExceptionHandler implements Thread.UncaughtExceptionHandler { | |
| private static final String FILENAME = "out-of-memory.hprof"; | |
| public static void install(Context context) { | |
| Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler(); |
This file contains hidden or 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
| ---Java | |
| //I used this on Android | |
| //before you proceed, you need to ensure your private key is PKCS8 since that is what can be read natively in java. | |
| //If your key begins with -----BEGIN RSA PRIVATE KEY-----, the it is ssleay and you need to convert it using the openssl command below | |
| //openssl pkcs8 -topk8 -inform pem -in ssleay-private-key.key -outform pem -nocrypt -out pkcs8-private-key.pem | |
| final private static String RSA_PRIVATE_KEY = | |
| "-----BEGIN PRIVATE KEY-----\n" + | |
| "MI...\n" + |
This file contains hidden or 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
| public class BatteryActivity extends Activity { | |
| //UI Elements | |
| private TextView mTextViewLevel; | |
| private TextView mTextViewTemperature; | |
| private TextView mTextViewVoltage; | |
| private TextView mTextViewHealth; | |
| //Battery details | |
| private int level; |
This file contains hidden or 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 android.app.Activity; | |
| import android.content.Context; | |
| import android.hardware.display.DisplayManager; | |
| import android.os.Bundle; | |
| import android.view.Display; | |
| /** | |
| * A base activity for watch faces that have callbacks for the various screen states (dim, awake, and off) | |
| * as well as a callback for when the watch face is removed. | |
| * <p/> |
This file contains hidden or 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
| <!-- Declare the permission for body sensor --> | |
| <uses-permission android:name="android.permission.BODY_SENSORS" /> |
This file contains hidden or 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 | |
| # This is a wrapper for adb. If there are multiple devices / emulators, this script will prompt for which device to use | |
| # Then it'll pass whatever commands to that specific device or emulator. | |
| # Run adb devices once, in event adb hasn't been started yet | |
| BLAH=$(adb devices) | |
| # Grab the IDs of all the connected devices / emulators | |
| IDS=($(adb devices | sed '1,1d' | sed '$d' | cut -f 1 | sort)) |
This file contains hidden or 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
| 301 https://github.com/zxdrive/imouto.host |
This file contains hidden or 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 | |
| # Android 4.3+ changes app's internal directory permissions and you can not just pull your | |
| # databases to your computer, so I did this as a workaround to extract my databases. | |
| # I only use it for debug, use it under your responsability. | |
| package=$1 | |
| db_name=$2 | |
| path="/data/data/$package/" |
NewerOlder