- Some utilities:
sudo apt-get install vim tmux git
- Copy/paste from the command line:
sudo apt-get install xclip
public class Dexter { | |
private static String optimizedDirectory = "optimized"; | |
private static String workDirectory = "working"; | |
public static void loadFromAssets(Context context, String fileName) throws Exception { | |
File optimized = new File(optimizedDirectory); | |
optimized = context.getDir(optimized.toString(), Context.MODE_PRIVATE); | |
optimized = new File(optimized, fileName); |
// | |
// !!WARNING: Not recommended for production code!! | |
// | |
public class ClassLoaderActivity extends Activity | |
{ | |
public void onCreate(Bundle savedInstanceState) | |
{ | |
// file.jar has a dex'd "classes.dex" entry that you can generate with "dx" from any number of JARs or class files | |
ClassLoader dexLoader = new DexClassLoader("/path/to/file.jar", getCacheDir().getAbsolutePath(), null, getClassLoader()); | |
setAPKClassLoader(dexLoader); |
configurations { | |
apt | |
} | |
dependencies { | |
compile 'com.squareup.dagger:dagger:1.1.0' | |
apt 'com.squareup.dagger:dagger-compiler:1.1.0' | |
} | |
android.applicationVariants.all { variant -> |
#Python 2 | |
python -m SimpleHTTPServer 8080 | |
#Python 3 | |
python3 -m http.server 8113 |
function dex-method-count() { | |
cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"' | |
} | |
function dex-method-count-by-package() { | |
dir=$(mktemp -d -t dex) | |
baksmali $1 -o $dir | |
for pkg in `find $dir/* -type d`; do | |
smali $pkg -o $pkg/classes.dex | |
count=$(dex-method-count $pkg/classes.dex) | |
name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.') |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.country { | |
fill: #b8b8b8; | |
stroke: #fff; | |
stroke-width: .5px; | |
stroke-linejoin: round; | |
} |