install mac adb; fix flatten.pl