Skip to content

Instantly share code, notes, and snippets.

View hhhaiai's full-sized avatar
🎯
Focusing

hhhaiai hhhaiai

🎯
Focusing
View GitHub Profile
@hhhaiai
hhhaiai / whitelist.pac
Last active August 31, 2017 02:45 — forked from janlay/whitelist.pac
A white-list based PAC.
/*
* A white-list based PAC without regexp, by @janlay
* It's just simple and fast.
* Last update: May 20, 2015
* Special thanks to @Paveo
*/
function FindProxyForURL(url, host) {
// REPLACE PROXY WITH YOUR OWN'S
var PROXY = "PROXY 127.0.0.1:8800;SOCKS 127.0.0.1:8801";
var DEFAULT = "DIRECT";
@hhhaiai
hhhaiai / genymotionwithplay.txt
Last active August 31, 2017 02:45 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161892865 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
@hhhaiai
hhhaiai / update_gfwlist.sh
Created July 30, 2018 08:49 — forked from VincentSit/update_gfwlist.sh
Automatically update the PAC for ShadowsocksX. Only tested on OS X. (Deprecated)
#!/bin/bash
# update_gfwlist.sh
# Author : VincentSit
# Copyright (c) http://xuexuefeng.com
#
# Example usage
#
# ./whatever-you-name-this.sh
#
# Task Scheduling (Optional)
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAA
// 根据指定长度生成字母和数字的随机数
// 0~9的ASCII为48~57
// A~Z的ASCII为65~90
// a~z的ASCII为97~122
// https://blog.csdn.net/wangyy130/article/details/80084376
public static String createRandomCharData(int length) {
StringBuilder sb = new StringBuilder();
Random rand = new Random();// 随机用以下三个随机生成器
Random randdata = new Random();
int data = 0;
// 根据指定长度生成字母和数字的随机数
// 0~9的ASCII为48~57
// A~Z的ASCII为65~90
// a~z的ASCII为97~122
// https://blog.csdn.net/wangyy130/article/details/80084376
public static String createRandomCharData(int length) {
StringBuilder sb = new StringBuilder();
Random rand = new Random();// 随机用以下三个随机生成器
Random randdata = new Random();
int data = 0;
public static String randomAndroidID() {
String str[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F" };
StringBuilder sb = new StringBuilder();
Random random = new Random(System.nanoTime());
for (int i = 0; i < 16; i++) {
int iRand = random.nextInt(str.length);
String charmac = str[iRand];
sb.append(charmac);
}
public static String randomSerialNumber() {
String str[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I",
"J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
StringBuilder sb = new StringBuilder();
Random random = new Random(System.nanoTime());
for (int i = 0; i < 16; i++) {
int iRand = random.nextInt(str.length);
String charmac = str[iRand];
sb.append(charmac);
}
// 生成随机数字和字母
// https://blog.csdn.net/yaodong_y/article/details/8115250
public static String getStringRandomA(int length) {
String val = "";
Random random = null;
// 参数length,表示生成几位随机数
for (int i = 0; i < length; i++) {
random = new Random(System.nanoTime());
String charOrNum = random.nextInt(2) % 2 == 0 ? "char" : "num";
## 辅助工具页面
``` java
// vivo X7 (5.1.1) 不需要密码。 安装页面 com.bbk.launcher2/.Launcher
// oppo A59S (5.1) 密码框 com.coloros.safecenter/.verification.login.AccountActivity
// oppo A59S (5.1) 安装界面 com.android.packageinstaller/.OppoPackageInstallerActivity
// vivo Z1 (8.1.0) 安装框 com.bbk.account/.activity.AccountVerifyActivity
// vivo Z1 (8.1.0) 安装页面 com.android.packageinstaller/.VivoPackageInstallerActivity
// vivo Y69A (7.0) 密码框 com.bbk.account/.activity.AccountVerifyActivity
// vivo Y69A (7.0) 安装页面 com.android.packageinstaller/.PackageInstallerActivity