how to execute 'flutter run' with an apk path?

313

I finally found the option I need, it is called --use-application-binary, verbose mode needs to be enabled in order to see this option flutter run -h -v.

Share:
313
Nashat Ibraheem
Author by

Nashat Ibraheem

Updated on December 22, 2022

Comments

  • Nashat Ibraheem
    Nashat Ibraheem over 1 year

    Is there a way to execute flutter run with an apk path instead of a target path like: -t ./test_drive/main.dart?

    I have the instrumented apk in my hand and would like to run it in debug mode where I can get the Observatory debugger URL the same way I get it when running flutter run -t ./test_driver/main.dart:

    Using hardware rendering with device Android SDK built for x86 64. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
    Launching ./test_driver/main.dart on Android SDK built for x86 64 in debug mode...
    Running Gradle task 'assembleDebug'...                                  
    Running Gradle task 'assembleDebug'... Done                        12.4s
    ✓ Built build/app/outputs/flutter-apk/app-debug.apk.
    Installing build/app/outputs/flutter-apk/app.apk...                 3.8s
    Waiting for Android SDK built for x86 64 to report its views...         10ms
    Syncing files to device Android SDK built for x86 64...            217ms
    
    Flutter run key commands.
    r Hot reload. 🔥🔥🔥
    R Hot restart.
    h Repeat this help message.
    d Detach (terminate "flutter run" but leave application running).
    c Clear the screen
    q Quit (terminate the application on the device).
    An Observatory debugger and profiler on Android SDK built for x86 64 is available at: http://127.0.0.1:55897/aOmlBKN310Y=/