Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
[ -d src/ ] || mkdir src
for x in *.scpt; do
osadecompile $x > src/${x/.scpt/}.applescript
done
@j796160836
j796160836 / ScreenCapture.sh
Created December 11, 2015 04:35
Capture Android screenshot and save into desktop folder
#!/bin/bash
export FILE_NAME=`date '+%Y_%m_%d_%H_%M_%S'`_screen
adb shell screencap -p /data/local/tmp/$FILE_NAME.png
adb pull /data/local/tmp/$FILE_NAME.png ~/Desktop/$FILE_NAME.png
@j796160836
j796160836 / CaptureDeviceLog.sh
Created December 11, 2015 04:37
Capture Android device log and save into desktop folder (Press Ctrl + C to stop capturing)
#!/bin/bash
adb logcat -v time | tee ~/Desktop/$(date '+%Y_%m_%d_%H_%M_%S')_log.txt
@j796160836
j796160836 / default.reg
Created December 22, 2015 15:50 — forked from P4/default.reg
Color schemes for Windows Command Prompt
Windows Registry Editor Version 5.00
; Default color scheme
; for Windows command prompt.
; Values stored as 00-BB-GG-RR
[HKEY_CURRENT_USER\Console]
; BLACK DGRAY
"ColorTable00"=dword:00000000
"ColorTable08"=dword:00808080
; BLUE LBLUE
@j796160836
j796160836 / SendBrowseIntent.sh
Created February 18, 2016 01:44
Send url scheme from mac to android phone
#!/bin/bash
adb shell am start -a android.intent.action.VIEW -d "$1"
@j796160836
j796160836 / ExtractWearAPK.sh
Created February 18, 2016 01:52
Extract wear micro app from handheld app ( apktool is needed. add apktool into $PATH variable or install apktool into /usr/local/bin/)
#!/bin/bash
if test $# -lt 1 ; then
echo "Usage: $0 <target-apk>"
exit 1
fi
FILE_NAME=$1
NEW_FILE_NAME=`echo $1 | sed 's/^\(.*\)\.\(.*\)$/\1/'`
TEMP_FOLDER=$NEW_FILE_NAME'_temp'
rm -R -f $TEMP_FOLDER
mkdir -p $TEMP_FOLDER
@j796160836
j796160836 / InspectAPK.sh
Last active February 22, 2022 16:46
Inspect APK's info like package name, version code, version name, etcetera
#!/bin/bash
apk_file=$1
if [ -z $apk_file ]; then
apk_file_num=`ls *.apk | wc -l | tr -d ' '`
if [ $apk_file_num -gt 1 ]; then
echo "Ambiguous apk_files. Please enter one APK to inspect."
exit -1
fi
apk_file=`ls *.apk`
@j796160836
j796160836 / AdbGoToSettings.sh
Created March 23, 2016 04:35
Go to app's settings page via ADB
#!/bin/bash
adb shell am start -a android.settings.APPLICATION_DETAILS_SETTINGS -d package:$1
@j796160836
j796160836 / AdbInputText.sh
Created March 23, 2016 04:38
Input text via ADB
#!/bin/bash
adb shell input text $1
@j796160836
j796160836 / genymotionwithplay.txt
Created May 18, 2016 06:58 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)