adbf.sh
is adb-flutter command line script that composed with flutter and adb commands. Go to code
-
Default behaviour (flutter build + stop app + install app + start app + show logcat of app)
adbf.sh
-
You can combine all commands with passing arguments to script: Example:
adbf.sh stop start logcat
: Restart app and enter the logcat -
Package name is automatically resolved from "android/app/build.gradle" file. If you want to use diffrent pacakge name you can set as env variable like
PACKAGE=com.example.app adbf start
- You should run this script in root folder of flutter project
- build : this command will run
fvm flutter build apk --release
adbf.sh build
- start : this command will run
adb shell am start -n $PACKAGE/.MainActivity
adbf.sh start
- stop : this command will run
adb shell am force-stop $PACKAGE
adbf.sh stop
- install : this command will run
adb install -r build/app/outputs/flutter-apk/app-release.apk
adbf.sh install
- uninstall : this command will run
adb uninstall $PACKAGE
adbf.sh uninstall
- logcat : this command will run
adb logcat --format color --dividers | grep `adb shell ps | grep $PACKAGE | awk '{print $2}'`
adbf.sh logcat
- default
adbf.sh