Skip to content

Instantly share code, notes, and snippets.

/*
* Copyright 2012 CodeSlap - Cristian Castiblanco
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@m-ivanov
m-ivanov / dex.sh
Last active August 29, 2015 14:08 — forked from JakeWharton/dex.sh
function dex-method-count() {
cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'
}
function dex-method-count-by-package() {
dir=$(mktemp -d -t dex)
baksmali $1 -o $dir
for pkg in `find $dir/* -type d`; do
smali $pkg -o $pkg/classes.dex
count=$(dex-method-count $pkg/classes.dex)
name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.')
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
/*
* Copyright (C) 2013 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@m-ivanov
m-ivanov / update_android_sdk.sh
Created May 16, 2016 21:45 — forked from tabrindle/update_android_sdk.sh
Update/install android sdk packges automatically
#!/bin/bash
# Notes:
# - To list all possible packages, run `android list sdk -all --extended`
# - If install operation fails, it may be because selected module is obsolete
# - Enable --dry-mode on `android update sdk` to show what will be installed while actually doing nothing
# - `tools` and `platform-tools` install the newest package available
# - Build Tools - build-tool-xx.x.x selects a specific version to install
# - SDK Platforms - android-{API_Level} installs the SDK Platform for XX API Level ex. android-23 or android-19
# - System Images - sys-img-{architecture}-{platform}-android-{API_Level} ex. sys-img-x86_64-android-23 or sys-img-armeabi-v7a-android-23
@m-ivanov
m-ivanov / restore csharp
Last active June 25, 2018 09:24
aprite la console di PM e fare il resotre di tutta la solution
Update-Package –reinstall