Help with java: Adding new 'app' to privileged-extension (edited)

Could some one please help me how to add a new pair in the code?

https://gitlab.com/fdroid/privileged-extension/-/blob/master/app/src/main/java/org/fdroid/fdroid/privileged/ClientWhitelist.java

public static HashSet<Pair<String, String>> whitelist = new HashSet<>(Arrays.asList(
        // certificate SHA-256 of https//f-droid.org/F-Droid.apk
        new Pair<>("org.fdroid.fdroid", "43238d512c1e5eb2d6569f4a3afbf5523418b82e0a3ed1552770abb9a9c9ccab")
));

Thanks

Do you really just want to add a new repo like the topic title says or do you want to develop an alternative F-Droid front-end/client app?

If you want to add a new repo, you can just do that from the client. No need to touch any code. If you want to develop an alternative client app, add the certificate of your alternative client to that line.

Thank you for the reply.
I meant a different app.

new Pair<>("org.fdroid.fdroid", "43238d512c1e5eb2d6569f4a3afbf5523418b82e0a3ed1552770abb9a9c9ccab","org.app.something,"sha256ofthecertificate"")

Is this correct syntax?

You want to add that to the official extension of to your own local build of it?

Yes. For my custom lineageOS build. Thanks

@benjura
if you are not modifying the F-Droid client use LOCAL_CERTIFICATE := PRESIGNED in the Makefile

May be I am unclear. I just want to add the official signal app’s sha256 so that it can be updated automatically.

Only apps signed using a certificate with a SHA-256 hash listed here
can access the Privileged Extension!

Do you mean that the syntax is correct?

new Pair<>("org.fdroid.fdroid", "43238d512c1e5eb2d6569f4a3afbf5523418b82e0a3ed1552770abb9a9c9ccab","org.thoughtcrime.securesms,"29f34e5f27f211b424bc5bf9d67162c0eafba2da35af35c16416fc446276ba26"")

That is not how that works.
That hash is merely the allowed list of other apps that it’ll install apps on behalf of.
Not which apps it will install.

You do not need to modify either.

1 Like

Signal has an internal updater…it can install…its updates…right?

That hash is merely the allowed list of other apps that it’ll install apps on behalf of.

So do I need find a repo that contains signal app? Then fdroid-client will automatically upgrade when needed. Is this correct?

Signal has an internal updater…it can install…its updates…right?

It needs manual intervention. I am installing this to a group of people - that do not want to touch anything except using apps - and hoping it Fdroid client will auto upgrade.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.