I have tried to search it but couldn't find proper solution. So Posting question here to seek help.
We have developed an application for Android platform. It's already developed and in working condition.
Please note : Application is already designed to be system application, we just need to prevent app from uninstalling while factory reset.
Our basic requirement is, if someone formats or factory reset their phone, still the application will not be removed.
We are not sure how to make this possible and looking for an expert to help us out on this.
NOTE: we have mi Y2 phone with us for testing purpose, and willing to purchase other device if needed. We want this to work on Android version 6 and above.