androidcordovaionic-frameworkgoogle-chrome-devtoolschrome-debugging

Debug/Inpect Ionic Apk With Google DevTools


I am trying to inspect and debug a apk file with google dev tools.I don't have application codes and application written with ionic, but I have an apk file. I followed the steps in this source; https://developers.google.com/web/tools/chrome-devtools/remote-debugging/

it is helpful only for chrome not for apk.I can see Chrome but I can not see webviews,ionic app etc.. I tried many things but couldn't find a solution.I tried; ionic cordova run android

but I got error that; ionic cordova run android can only be run in an ionic project dişrectory. Thanks for help.


Solution

  • Check if the apk you have is a debug or release apk. Also, since you just have the APK you can't run ionic specific commands. If it a debug APK then you can run the app in a simulator or a device and Use Chrome DevTools -> Remote Devices -> Find your device. You should be able to see the App Name to debug.

    Check this thread to see how do you find out your APK is debuggable: https://stackoverflow.com/a/8161107/4590795