Skip to content

Instantly share code, notes, and snippets.

View kabouzeid's full-sized avatar

Karim Abou Zeid kabouzeid

View GitHub Profile
@kabouzeid
kabouzeid / apk2jar.sh
Last active September 16, 2016 21:14
Bash script to quickly decompile an APK. Required tools dex2jar and apktool can be installed via homebrew. Tested on OSX.
#!/bin/bash
apkname=$(basename "$1" .apk)
extractfolder=$PWD/$apkname
unzip -o "$1" classes.dex -d "$extractfolder"
d2j-dex2jar "$extractfolder/classes.dex" -o "$extractfolder/$apkname.jar"
apktool d "$1" -o "$extractfolder/apktool" -f
@kabouzeid
kabouzeid / StopWatch.java
Last active September 12, 2015 12:02
Simple thread safe stop watch for Java.
package com.kabouzeid.gramophone.helper;
/**
* Simple thread safe stop watch.
*
* @author Karim Abou Zeid (kabouzeid)
*/
public class StopWatch {
/**
@kabouzeid
kabouzeid / InternalStorageUtil.java
Created June 22, 2015 10:28
A simple helper class for Android to read and write any serializeable object to the internal storage
package com.kabouzeid.gramophone.util;
import android.content.Context;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;