Unable to perfom flutter run and adb install/uninstall on Custom Rom [Android 11 (Rooted-Magisk) ]

585 Views Asked by At

I recently installed the Pixel Experience Plus ROM on my Redmi Note 8 Pro. When I try a streamed install or uninstall through adb , it fails and $ flutter run command fails/stalls at the "installing apk" step.

This applies to existing apps as well as new apps created with $ flutter create <appname>.

Please help get these to work PS: reverting back to MIUI might work but I wouldn't post this question if I wanted to do that

I am attaching relevant logs here :

  • $ flutter run -v logs here

  • $ flutter doctor -v

[✓] Flutter (Channel stable, 2.5.0, on Microsoft Windows [Version 10.0.19043.1237], locale en-IN)
    • Flutter version 2.5.0 at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4cc385b4b8 (3 weeks ago), 2021-09-07 23:01:49 -0700
    • Engine revision f0826da7ef
    • Dart version 2.14.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Suraj\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Android Studio (version 4.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[✓] VS Code (version 1.57.1)
    • VS Code at C:\Users\Suraj\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.25.0

[✓] Connected device (3 available)
    • Redmi Note 8 Pro (mobile) • da45voeatoonheha • android-arm64  • Android 11 (API 30)
    • Chrome (web)              • chrome           • web-javascript • Google Chrome 93.0.4577.82
    • Edge (web)                • edge             • web-javascript • Microsoft Edge 94.0.992.31

• No issues found!
  • $ adb install 'C:\Users\Suraj\Desktop\projs\newapp\build\app\outputs\apk\debug\app-debug.apk' log below
Performing Streamed Install
adb: failed to install C:\Users\Suraj\Desktop\projs\newapp\build\app\outputs\apk\debug\app-debug.apk:
0

There are 0 best solutions below