Does anybody know if it would somehow be possible to install an app, then change its name, signature, disk location and so on so that you can install the app again without the system telling you that the app is already installed?
I had several occasions where this would have been helpful. The only ones I can remember now are: Installing two versions of the same launcher and installing OWM twice so you can upload data to both websites.
Now I know there is the option for Multiple Users via XPosed but that never really worked well for me and also you can’t run both versions of the app at the same time (e.g. as a background service).
I guess one option for FOSS apps would be to create your own build but I don’t think I could ever acquire the skills to do so myself.
There is Android for work (more info with less PR) which let’s you create a “work” space on your phone with different (or the same apps) for private and work use. However you need an EMM provider for that. (I just remember that I don’t even know whether it works with Android 4.2.2).
As you mention already, you could also compile it yourself if you have the source code. That’s not that complicated but is some work. Android Studio does everything for you if you have a project already. The non-trivial part is to know what you need to change in order to make it different enough to be recognized as its own app but similar enough to still have it work.
I also think app settings would mess if the app itself isn’t designed for multiple instances running, because AFAIK every app stores its settings in an own directory so if you run two instances of a single app I suppose the last which runs stores its settings overwriting the first one’s.
That should not be the case for most apps if you follow the instructions linked by @huskers and change the package name.
Android stores settings and data at a different path for each package, and if you change that package name, then you should be fine.
However you are right for some apps, that create their own directory outside of the management of the Operating System (for instance WhatsApp creates a “WhatsApp” directory where it stores media, etc). AFAIK this is rare though.
Exactly, this is what I meant, sorry for not explaining well, I think also at K9 which stores its settings in a dir outside the standard /data dir (I have it on /storage/sdcard0/com.fsck.k9)
I think this will heavily depend on each single application and needs to be tested.
Thank you for the link
This looks very much like it uses the package name (com.fsck.k9 is the package name) as an directory. So maybe (if it is programmed in a smart way), changing the package name, which is necessary in any case, would also change the used directory.
However I wonder, why do you want to install K9 twice in the first place? Doesn’t it allow for different accounts?