android
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| android [2019/12/20 21:51] – [Android Studio Ignored Files] jrseti | android [2021/02/04 22:22] (current) – [Galaxy S8/9/10 Get SNOOP file] jrseti | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| * .DS_Store | * .DS_Store | ||
| * .gradle | * .gradle | ||
| + | * .cxx | ||
| + | ====Pull APK from device==== | ||
| + | |||
| + | Get the list of installed packages to determine what to pull: | ||
| + | > adb shell pm list packages | grep tom | ||
| + | package: | ||
| + | package: | ||
| + | | ||
| + | With the package name, we can get the actual file name and location of the APK using: | ||
| + | > adb shell pm path com.fanqies.tomatofn | ||
| + | package:/ | ||
| + | | ||
| + | Then pull it: | ||
| + | adb pull / | ||
| + | | ||
| + | This will result in an APK file " | ||
| + | mv base.apk tomato.apk | ||
| + | |||
| + | ====Decompile app to android Studio==== | ||
| + | |||
| + | Follow directions at https:// | ||
| + | |||
| + | ====Sign an APK==== | ||
| + | |||
| + | rm -rf $1_pre.apk | ||
| + | rm -rf $1_signed.apk | ||
| + | rm -rf %1_aligned.apk | ||
| + | | ||
| + | apktool b -o $1_pre.apk $1 | ||
| + | ~/ | ||
| + | echo " | ||
| + | rm -rf $1_pre.apk | ||
| + | rm -rf $1_aligned.apk | ||
| + | | ||
| + | echo "" | ||
| + | echo -n " | ||
| + | echo $1_signed.apk | ||
| + | echo "" | ||
| + | |||
| + | Then uninstall the app on the phone. Then install it from your computer: | ||
| + | adb install tomato_project_signed.apk | ||
| + | | ||
| + | ====Debug over wifi==== | ||
| + | |||
| + | Follow directions at: https:// | ||
| + | |||
| + | Basically: | ||
| + | |||
| + | - Connect the phone to USB | ||
| + | - Make sure the device is present: "adb devices" | ||
| + | - adb tcpip 5555 | ||
| + | - Unplug the phone from USB | ||
| + | - Go to the Settings -> About phone -> Status to view the IP address of your phone. | ||
| + | - adb connect <IP address of your device>: | ||
| + | |||
| + | Note: The TCP connection may stop occasionally and need to be restarted. Run this to continually try to restart the connection every second: | ||
| + | |||
| + | watch -n 1 adb connect <IP address of your device>: | ||
| + | | ||
| + | ====Get BtSnoop logfile==== | ||
| + | |||
| + | DATE=`date +%d%m%y_%H%M%S` | ||
| + | #echo $DATE | ||
| + | FILENAME=btsnoop_hci.$DATE.log | ||
| + | JSON_FILENAME=btsnoop_hci.$DATE.json | ||
| + | #echo $FILENAME | ||
| + | mkdir -p logs | ||
| + | cd logs | ||
| + | mkdir -p temp | ||
| + | cd temp | ||
| + | adb bugreport > BUG_REPORT.txt >/ | ||
| + | unzip *.zip >/ | ||
| + | cp FS/ | ||
| + | cd .. | ||
| + | rm -rf temp | ||
| + | echo "The btsnoop logfile is logs/ | ||
| + | tshark -T json -r $FILENAME > | ||
| + | echo "The btsnoop JSON logfile is logs/ | ||
| + | |||
| + | ====Galaxy S8/9/10 Get SNOOP file==== | ||
| + | |||
| + | This is tested and verified working for S8, S9, S10+ Android 8.0 through to 9.1: | ||
| + | |||
| + | Input " | ||
| + | |||
| + | / | ||
android.1576878676.txt.gz · Last modified: 2019/12/20 21:51 by jrseti