Author: Chris Lattner
  
    
      This file contains hidden or 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
    
  
  
    
  | 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 '/' '.') | 
  
    
      This file contains hidden or 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
    
  
  
    
  | package com.android.dex; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.util.Map; | |
| import java.util.TreeMap; | |
| import java.util.concurrent.atomic.AtomicInteger; | |
| public class Summary { | |
| public static void main(String[] args) throws IOException { | 
  
    
      This file contains hidden or 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
    
  
  
    
  | sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/ | |
| sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin | |
| sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane | |