Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rdrobinson3 on github.
  • I am treyrobinson (https://keybase.io/treyrobinson) on keybase.
  • I have a public key ASAU6UMWLkhrmwREaraKJywTO8tAi5_LF6_i1ZdsqJ6xywo

To claim this, I am signing this object:

@rdrobinson3
rdrobinson3 / pull-apk-from-phone.txt
Created April 27, 2017 16:11 — forked from frengky/pull-apk-from-phone.txt
How to pull apk from android phone
# Determine the package name of the app, e.g. "com.example.someapp". Skip this step if you already know the package name.
adb shell pm list packages
Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.
# Get the full path name of the APK file for the desired package.
adb shell pm path com.example.someapp
The output will look something like this: package:/data/app/com.example.someapp-2.apk
# Pull the APK file from the Android device to the development box.
adb pull /data/app/com.example.someapp-2.apk path/to/desired/destination
@rdrobinson3
rdrobinson3 / squash alias
Created August 26, 2014 14:46
Squash alias for git
rb = "!sh -c 'git rebase -i HEAD~$1' -"
@rdrobinson3
rdrobinson3 / delete-merged
Created August 7, 2014 10:38
Delete branches that have merged into master
alias rm-merged-local="git fetch --prune && git branch --merged master | \grep -v 'master' | xargs git branch -D"
@rdrobinson3
rdrobinson3 / protobuf.sh
Created October 28, 2013 15:20
Protobuf final install step
protoc --java_out=src/main/java -I../src ../src/google/protobuf/descriptor.proto
@rdrobinson3
rdrobinson3 / AndroidGitIgnore
Created October 23, 2013 19:42
.gitignore file for those moving to Android Studio
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
@OnClick(R.id.sign_in_button)
public void attemptLogin() {
}
class LoginFragment extends Fragment {
@InjectView(R.id.username)
EditText username;
@InjectView(R.id.password)
EditText password;
View view = inflater.inflate(R.layout.fragment_login, container, false);
mUserNameEditText = (EditText) view.findViewById(R.id.username);
mPasswordEditText = (EditText) view.findViewById(R.id.password);
public class MyAdapter extends BaseAdapter {
@Override public void getView(int position, View view, ViewGroup parent) {
ViewHolder holder;
if (view != null) {
holder = (ViewHolder) view.getTag();
} else {
view = inflater.inflate(R.layout.whatever, parent, false);
holder = new ViewHolder(view);
view.setTag(holder);
}