F-Droid Installation on Ubunu

Hi

I am new to fdroid

I am installing fdroid on ubuntu using following procedure

Just i am unable to perform this command

cp /path/to/\*.apk /usr/share/nginx/www/fdroid/repo/

When i open http://localhost/fdroid/repo/ it opens in abnormal codes as following

This XML file does not appear to have any style information associated with it. The document tree is shown below.
fdroid
open icon=“icon.png” name=“My First F-Droid Repo Demo” pubkey=“30820505308202eda00302010202046c14cfa8300d06092a864886f70d01010b050030333110300e060355040b1307462d44726f6964311f301d060355040313167a6f686169622d7669727475616c2d6d616368696e65301e170d3231313030313037313034395a170d3439303231363037313034395a30333110300e060355040b1307462d44726f6964311f301d060355040313167a6f686169622d7669727475616c2d6d616368696e6530820222300d06092a864886f70d01010105000382020f003082020a028202010081c25ab45c498b0c939c7c8966aeee18cf3ab2727f4f37e22c7a84fa617b4af6532bfc812000883099bdd2562fe76f56071a2b7b33c43e11ae9b40634ecb6b048fbc8df6fac01db6f34c0504107d6255149db32f83d364274605cd3b1693a2c7c62932f18da3cfb02f0c883a3177ea85d976a994538ef36e9cc93c2c06d37a00095ac2f5cb83831b542c3fa53450cbc207fbcaadf96d25aac193ab1ae717316f88cd12a641bdc3bd05653b75f4358d4abe9a27431695453b8b937bbe570f660d1111254bf5acd31d908f528c2e7afa536a36d4f3ffd605cc3927f82d328babdd3ec3190882219f9fd1a4f9fbd3d955959de7d5d1d05e82b993a28f3caf2f34edbf3b263a63d3e9acda1b10248b5145df3c0edbebd1e03ce34431de17685b2a221e761647f1031daed9c4ce1c79cadc6926405663acc5bf463848bf3409fe616cc9653e1f07996f6aa00c93bbfc49437994ef055b8f3f22b0c64f88808dd23bfc722388326d93749aa511874938d54babdf00ef5320b26a5386c35450b159d3edf579329de787e05ab9dbf9621bc422dddadcc45ee49cc6483e26a44abea2739512d53e42c53a6063076a96f622bfb3e4338b913224030de9e96422f1f71447dddb133159a88f3cc39646a12b02e11e13490bd956e18e3e89a2f248bcb82950591320e637c18725b38105e42ea4d1f79506ef25c5f87dd9ae7075410d8a520c9b0203010001a321301f301d0603551d0e041604149c2a11d0847e0d23eef543771295b273bc27ced1300d06092a864886f70d01010b050003820201002bfeb79014b305c9c26a13112e326108760734b3881202c3b0ca06fedc4efca663b05f825eee1ac3085b307cb88a1cf63d8b72e563f0bb1b855f510aecde27b24d5259106d2e62dfc9dfdaab109ad34c3be14fb3667bd3906d247ea79b6e286475578fec0b4ed5b72c5d97c1bd2a646c7dfba6178d6fe3f75f570d150dd9db1808aafee56c20f08bae16d613dbc5570c3e9453b8e71e684eec7f666f1be4363f9ea8357db482027f6453c67c9443e5e351ef47da95f1557f10cd71c2a2eab79d3215852f1d686966ac2b382cadba0772d587299a6557d53f415de57e6e52d41df4a38665810a0af814747052474a8674823e03e8db868916a87b6cf8e0cdb1df1de91089ab33631f3b93635442f5ab6ebfa45d21451bb8ceadb58edde40e97c9e934e44e4f7d38835ff9ebdd43e364c49489774715d913bb64487ceb651789b7223b704a72034a5dd8e29273dc82f6f7ddd9793868fbb585516041c1cebca79ba35105f1e61543619482459dfd74540c918918cb83789f6a2fe7f39fd7ee4102cbf0f035b1b79111ba7e18599a5171ffef99a89580a9754bd18ff7760869c44949be4fbe7c8e0a78a28ad01439ab8a130b4d1f2687ee345f663a38950281d89b9eee7be17c87f4d3a0d426b8b4982778ff3d6fa765d45c1de6bb68eeb308a197facfb8d4e362caeec9b0d89e2e99d3d9f7c3c11509a0d6ee366a79bac245bb26” timestamp=“1633075103” url=“https://MyFirstFDroidRepo.org/fdroid/repo” version=“20000”>

This is a repository of apps to be used with F-Droid. Applications in this repository are either official binaries built by the original application developers, or are binaries built from source by the admin of f-droid.org using the tools on F-Droid · GitLab.


Please help

Please experts reply

Welcome! I would not call myself an expert, but I can try to help anyway. :wink:

To clear something up at first, when you say you are “installing fdroid on ubuntu”, what exactly do you want to do? Are you trying to host your own app repository on an Ubuntu server? Or are you trying to intall the F-Droid client on Ubuntu? Or something else entirely?

Thank for your reply first.

I am trying to install fdroid server to keep application on repository.

I have performed following commands by above mentioned procedure

$sudo apt-get install fdroidserver
$ mkdir ~/android-sdk-linux
$ cd ~/android-sdk-linux
$ wget https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip
$ echo “87f6dcf41d4e642e37ba03cb2e387a542aa0bd73cb689a9e7152aad40a6e7a08 commandlinetools-linux-6858069_latest.zip” | sha256sum -c
commandlinetools-linux-6858069_latest.zip: OK
$ unzip commandlinetools-linux-6858069_latest.zip
$ export ANDROID_HOME=“$HOME/android-sdk-linux”
$ ./cmdline-tools/bin/sdkmanager --sdk_root=“$ANDROID_HOME” platform-tools “build-tools;30.0.3”

sudo mkdir /usr/share/nginx/www/fdroid

sudo chown -R $USER /usr/share/nginx/www/fdroid

cd /usr/share/nginx/www/fdroid

fdroid init

Then copied apk files to fdroid/repo and run following command

Fdroid update -c

Fdroid update

After above operation i tried to access
Http://localhost/fdroid/repo

It opens source code of index.xml placed inside repo.

Awaited for response

Experts please help

1 Like

You don’t post this, the people that see your message and are able to respond will help you :smiley:
People on this forum are all volunteers, so it may take a little bit of time :wink:
(I am not an expert, so unfortunately I am not able to help)

1 Like

Your repository might actually be setup correctly, just your webserver is default redirecting to index.xml.
Have you tried adding your repo to the F-Droid client to see if it loads your apps correctly?

can u please define correct way of defining repo

I am doing in this wat

sudo mkdir /usr/share/nginx/www/fdroid

sudo chown -R $USER /usr/share/nginx/www/fdroid

cd /usr/share/nginx/www/fdroid

fdroid init

Then copied apk files to fdroid/repo and run following command

Fdroid update -c

Fdroid update

I try with client

Also config.yml has default configuration. does it needs some editing?

Root of nginx is set /usr/share/nginx/www/

Fdroid is directory is here in usr/share/nginx/www/fdroid

Please reply

is there somthing required to edit in configuration of nginx?

suggestion: inspect the contents of your config.yml, and recheck to ensure the file//directory permissions are set correctly

If you want to maintain a simple binary repository of APKs and packages obtained elsewhere, the process is quite simple:

  1. Set up the server tools

  2. Create a directory called fdroid, then run fdroid init in that directory to generate the signing key that uniquely identifies your repo.

  3. Optionally edit the config.yml file to your liking, detailed examples are in examples/config.yml

  4. Within fdroid, make a directory called repo and put APK files in it.

  5. Run fdroid update.

  6. If it reports that any metadata files are missing, you can create them in the metadata directory and run it again.

  7. To ease creation of metadata files, run fdroid update with the -c option. It will create ’skeleton’ metadata files that are missing, and you can then just edit them and fill in the details.

  8. Then, if you’ve changed things, run fdroid update again.

  9. Running fdroid update adds an icons directory into the repo directory, and also creates the repository index files (index.xml, index.jar, etc)

Have you tried adding your repo to the F-Droid client to see if it loads your apps correctly?

So? What does the Client say?

So my repository successfully open on android mobile application f-droid.apk

and i can download packages and install on my mobile

But still cannot open on web browser

That’s by design afaik, as its purpose is to be used on the actual Android devices.

1 Like

Also @zohaib09 you are likely exposing your private key.

Ok thanks a lot

Now i have new issue, when i placed number of apks it moved to archive by error invalid signature.

please help how to resolve this issue

Have you signed your APKs?

signed APKs? how to get it signed?

out of 30 apks only 1 apk remained in repo and all moved to archived