Rebuild an old app

I have a several years old apk build with Ionic 1. Because there is a small bug that is very easy to fix just by replacing a string in a js file, I need to rebuild this apk. I see that the change is easy to do because the apk is just a zip file, I modified the js file, I’ve updated the signature for the file, I resigned the apk but after following the steps explained https://ionicframework.com/docs/v1/guide/publishing.html the app cant be installed on a test phone (permissions granted on the phone of course). The apk is resigned with a different key bc the original one was lost. What am I doing wrong? What else can I do to generate a new apk using this code?

Sorry to hear you lost your signing key. Unfortunately, once it is lost there is nothing that can be done to recreate it. Since you can not sign the app with the same key, it can not be updated locally nor on the Google Play Store. You have to create a new app id and new store listing. The old app is now an orphan.

I need to rebuild an apk from source code only - Ionic v.1. I see that the curent Ionic CLI supports creating type 1 blank projects. What is the process to do this please, in the past I used a cloud service for the build that no longer exists now.

Why not convert it to v4?

Time and effort. To convert an entire app just for a minor bug its not a good ideea. Just rebuild a well tested app is the best path.