Duplicate an existing app

Hi, I’d like to copy an existing app and make an other one slightly different.
The problem is that I’d like to have both of them enabled at same time, but when im trying to enable my second app, an error occurs.


Does anyone ever faced this problem and could help me on that ?
I only copied the app folder and changed the name and ID.

How did you change the id? I presume just in appinfo/info.xml? There are probably other places you need to change it as well. Also, what about the namespace and any hardcoded self references?

Yes in appinfo/info.xml.
Im going to try to change that.
Any help if you know specifics locations would be appreciated :slightly_smiling_face:

Start with grep. Every application is different.

could you please share a link to the code?

Im trying to copy the “Files” app.

I modified all “Files” name which seem to be changed, I have this new following error when I try to activate my app now :



To explain a bit more I want to make a secondary storage app, I’d like to use “Files” app to store in nextcloud/data/user/files but I want an other “Files” app which store differents files on an other place on my server (nextcloud/data/user/files2 for example).

I changed the database name in /nextcloud/apps/files/lib/Migration/Versionxxxxxx.php
I can activate my app now but I have an internal server error when I want to acceed it.

I guess there is few path which need to be modified

{"reqId":"gb8CRp7iyyjiwQcGDs04","level":3,"time":"2021-07-07T07:54:39+00:00","user":"Damien","app":"index","method":"GET","url":"/index.php/apps/files2/","message":{"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve rootFolder! Class rootFolder does not exist","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["rootFolder"]}

did U find the resolution?
I am new here, an I am floating though posts, 'cause I am looking for something similar …
I want to reuse 3x Timetracker … basic “core” stay same, I want to reuse it with little upgrades - for different / unique solutions.
I can write down everything to a new topic - if somebody will be intteresting…
Very good app, but I feel, that not to many people are contributing on it…

Many thanx.