Skip to content

Instantly share code, notes, and snippets.

@dineshmm23
dineshmm23 / getPackageName.sh
Created January 7, 2021 10:00 — forked from benvium/getPackageName.sh
Script to extract the android package id (app id) from an android apk file, and another to uninstall an app when you have the apk handy.
# extract the android package id from a built apk file
# usage ./getPackageName.sh <path-to-apk>
line=`aapt dump badging "$1" | grep package:\ name`
# above returns:
# package: name='com.calvium.myapp' versionCode='1' versionName='1.0'
if [[ $line =~ name=\'(.+)\'\ versionCode ]]; then
echo ${BASH_REMATCH[1]}
else
echo "Failed to find package name"
@dineshmm23
dineshmm23 / readme-template.md
Created December 10, 2020 08:02 — forked from martensonbj/readme-template.md
Personal project README template

Project Name & Pitch

Example:

TweetWorld

An application used to filter data form Twitter based on user preference, built with React, Redux, JavaScript, and CSS.

Project Status

(only necessary if incomplete)

@dineshmm23
dineshmm23 / android-select-device
Created July 6, 2020 10:46 — forked from dtmilano/android-select-device
Script to select one connected device or emulator when running adb
#! /bin/bash
#=====================================================================
# Selects an android device
# Copyright (C) 2012-2013 Diego Torres Milano. All rights reserved.
#
# See:
# - http://dtmilano.blogspot.ca/2013/01/android-select-device.html
# - http://dtmilano.blogspot.ca/2012/03/selecting-adb-device.html
# for details on usage.
#=====================================================================
@dineshmm23
dineshmm23 / get_html_file.js
Created May 26, 2020 16:52 — forked from gengns/get_html_file.js
Get a local html file to insert into your Cordova Single Page Application
/**
Get local html files (views/widgets) to insert into your SPA
@param path ex:
path = 'file:///android_asset/www/view/page.html'
@param success
@param failure
*/
function get_html_file(path, success, failure) {
const xhr = new XMLHttpRequest()