Recently I developed an Android application which is very difficult to maintain. We are stuck in a complicated situation. We developed Android Apps which contained 500k LOC and another team developed the same application for SetupBox which is 300k LOC.
These two applications share some logics and features but they have different UI. For the first phase of developed two applications. As a result we have two different APKs, one for Mobile and another for SetupBox.
Now we want to develop the next version of the Mobile Application where the UI has completely changed and is very similar to the Android TV. In addition both applications share same logics (e.g webService, databases,...).
I want to know: How can we develop the second version of Mobile with minimum effort according to explanation?