Skip to content

Instantly share code, notes, and snippets.

@jasta
Created March 4, 2015 20:51
Show Gist options
  • Save jasta/c15e4b694dbfc180befa to your computer and use it in GitHub Desktop.
Save jasta/c15e4b694dbfc180befa to your computer and use it in GitHub Desktop.
import dalvik.system.*;
import java.util.*;
public class Test {
public static void main(String[] args) throws Exception {
DexFile d = DexFile.loadDex(args[0], null /* output */, 0);
Enumeration<String> e = d.entries();
while (e.hasMoreElements()) {
System.out.println(e.nextElement());
}
}
}
/*
$ time adb shell dalvikvm -cp /data/local/tmp/Test.dex Test /data/app/com.twitter.android-2/base.apk | wc -l
6109
real 0m0.863s
user 0m0.002s
sys 0m0.091s
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment