Ionic Cordova development workflow

Hi all,

TLDR: I’d like to know how to add Cordova to an existing Ionic project and install the build in my device.

I am trying to develop and deploy to my Android device an Ionic project using Cordova, I read the documentation but I feel the documentation for Cordova is not as good as the one for Capacitor. For example, in the section “Deploying Mobile” there’s nothing there about Cordova. Having said that, I have a few doubts:

How can I add Cordova to an existing Ionic project? I only care about Android. I think the command is cordova platform add android, but I am not entirely sure.

How do I prepare a build to run in Android Studio and install it in my device? If I’m not mistaken first I have to run npm build (like with Capacitor) but then I have no idea what follows. I found this command in the docs ionic cordova prepare android, but again, I am not sure.

I just feel the documentation is not clear enough about this process (using Cordova at least). Any help is greatly appreciated.

Have you taken a look at the docs for this?

This should get the setup for the native tooling and how to add that to an existing platform.

Though I would hightly suggest using Capacitor now over cordova.

I did read the docs, I had to go to the commands section to know what exactly ionic cordova prepare does.

Unfortunately I will have to go with Cordova because I need to target Android devices with old versions (4.4)