$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"
Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell
and then run-as com.mypackage
( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs
),
but on a production release app downloaded from an app store you're most likely to see:
run-as: Package 'com.mypackage' is not debuggable
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.IOException; | |
import okhttp3.HttpUrl; | |
import okhttp3.Interceptor; | |
import okhttp3.OkHttpClient; | |
import okhttp3.Request; | |
/** An interceptor that allows runtime changes to the URL hostname. */ | |
public final class HostSelectionInterceptor implements Interceptor { | |
private volatile String host; |
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
[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 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
/** | |
* JapaneseCharacter contains static functions to do various tests | |
* on characters to determine if it is one of the various types of | |
* characters used in the japanese writing system. | |
* <p/> | |
* There are also a functions to translate between Katakana, Hiragana, | |
* and Romaji. | |
* | |
* @author Duane J. May <djmay@mayhoo.com> | |
* @version $Id: JapaneseCharacter.java,v 1.2 2002/04/20 18:10:24 djmay Exp $ |
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 | |
f=$(pwd) | |
mkdir drawable-mdpi drawable-hdpi drawable-xhdpi drawable-xxhdpi | |
# fake argv and argc in bash | |
argc=$#; argv[0]=$0 # argv[0] is a prog name | |
for foo in $( seq $argc ) | |
do |
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
for (var i=1;i<16;i++){ | |
document.getElementById("actionSelect"+i).click(); | |
document.getElementById("deleteLink_"+i).click(); | |
document.getElementsByClassName("ap_custom_close")[0].click(); | |
} |
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 python2 | |
# vim: set fileencoding=utf8 | |
import re, sys, os, random, time, json, logging, argparse, requests, urllib | |
from mutagen.id3 import ID3,TRCK,TIT2,TALB,TPE1,APIC,TDRC,COMM,TPOS,USLT | |
from HTMLParser import HTMLParser | |
parser = HTMLParser() | |
s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template |
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
/* Side notes for calling out things | |
-------------------------------------------------- */ | |
/* Base styles (regardless of theme) */ | |
.bs-callout { | |
margin: 20px 0; | |
padding: 15px 30px 15px 15px; | |
border-left: 5px solid #eee; |
NewerOlder