Skip to content

Instantly share code, notes, and snippets.

apupeikis /
Created May 10, 2011
Multi-Threaded Canvas Draws
private ImageView imageView;
// ...
public void onDoingSomethingGood() {
new Thread(new Runnable() {
public void run() {
final Bitmap bitmap = loadImageFromOutside(""); Runnable() {
public void run() {
ameerhamza6733 / AdmobConsentSimple
Last active Jun 8, 2020
Simple for Consent sdk android admob
View AdmobConsentSimple
video tutorial for consent sdk android
If you want i do your job you can hair me any time at
mnoble01 / international phone number mask
Last active Jun 15, 2020
i18n libphonenumber mask (with in-hand country code)
View international phone number mask
This is using the JS port of Google's libphonenumber.
As far as I know, though, all of the APIs are the same or similar
// I just hardcoded "US" as the country, but of course you can use any country iso code
var ctry = 'US';
var exampleNumber = i18n.phonenumbers.PhoneNumberUtil.getInstance()
.getExampleNumberForType(ctry, i18n.phonenumbers.PhoneNumberType.MOBILE); // returns PhoneNumber instance
eybisi /
Created Dec 12, 2018
get decrypted payload from all apk files
#get apks from server? wget -np -e robots=off -m
#Place all apks in the same dir as py file or change os.listdir parameter
#you can get del.js from my repo
import os
from androguard.core.bytecodes import apk
import frida
import time
device = frida.get_usb_device()
files = [f for f in os.listdir("./")]
for f in files:
brettwold /
Last active Sep 24, 2020
Android adding a popup context menu to a RecyclerView
public class CustomAdapter extends RecyclerView.Adapter<CustomAdapter.ViewHolder> {
private List<CustomObject> objects;
private OnItemSelectedListener listener;
private final boolean withContextMenu;
class ViewHolder extends RecyclerView.ViewHolder
implements View.OnClickListener, View.OnCreateContextMenuListener, PopupMenu.OnMenuItemClickListener {
yoshiki / pom.xml
Created Oct 13, 2011
Maven pom.xml for Android library project
View pom.xml
<project xmlns=""
laaptu / DpToPxAndPxToDp
Last active Jan 4, 2021
Android convert dp to px and vice versa
View DpToPxAndPxToDp
public static float convertPixelsToDp(float px){
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
float dp = px / (metrics.densityDpi / 160f);
return Math.round(dp);
public static float convertDpToPixel(float dp){
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
float px = dp * (metrics.densityDpi / 160f);
return Math.round(px);
* Copyright (C) 2017 The Android Open Source Project
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
srayhunter /
Last active Jan 13, 2021
Android ADB over Wifi

Android ADB over Wifi

Here is a simple way to use ADB over wifi with your device. Make sure that ADB can reach your device over the network.

  1. Connect device to usb

  2. Restart the ADB daemon to listening on TCP port

     adb tcpip 5555
You can’t perform that action at this time.