Home > Enterprise >  Is it possible to make a cordova app debuggable without recompiling?
Is it possible to make a cordova app debuggable without recompiling?

Time:09-22

I have an .apk file for an old version of an app but don't have the ability to rebuild the app from source using cordova. I'm trying to debug an error and would like to enable remote debugging. Is it possible to enable remote debugging of the webview without rebuilding the app?

I've tried unpacking the app using apktool, adding android:debuggable="true" to the AndroidManifest.xml and then repacking and resigning the .apk.

When I run the app I can see the device in the device list of chrome://inspect#devices but the webview is not appearing. Am I missing something?

View of chrome inspect devices. The device is recognised but the webview is note://

CodePudding user response:

On Android in order to debug a WebView inside of an app, the following must be set in the app's code:

WebView.setWebContentsDebuggingEnabled(true);

From: https://developer.chrome.com/docs/devtools/remote-debugging/webviews/

Given that you are reverse engineering an APK, you may want to look to see if the code exists and needs a special flag or attempt to add in the Smali code yourself.

  • Related