<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sanand</title>
    <description>The latest articles on DEV Community by Sanand (@sanandmv7).</description>
    <link>https://dev.to/sanandmv7</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F471409%2Fd6ca3fee-61ae-4522-a90e-3526134d66dd.png</url>
      <title>DEV Community: Sanand</title>
      <link>https://dev.to/sanandmv7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sanandmv7"/>
    <language>en</language>
    <item>
      <title>How to publish your apps on F-Droid?</title>
      <dc:creator>Sanand</dc:creator>
      <pubDate>Sat, 26 Sep 2020 11:03:23 +0000</pubDate>
      <link>https://dev.to/sanandmv7/how-to-publish-your-apps-on-f-droid-2epn</link>
      <guid>https://dev.to/sanandmv7/how-to-publish-your-apps-on-f-droid-2epn</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;F-Droid is a community-maintained repository of free and open-source software for Android, similar to Google Play store. But unlike Google Play store, F-Droid only contains open-source apps that respect your freedom.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Publishing apps on F-Droid may seem a little confusing for newbies.&lt;br&gt;
Recently, I published my first free and open-source app on F-Droid(Check it out &lt;a href="https://f-droid.org/packages/tech.projectmatris.antimalwareapp" rel="noopener noreferrer"&gt;here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;In this post, I will walk you through the steps that I followed to publish my app on F-Droid.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;NOTE: Your app can be included in F-Droid only if it is completely open-source - including all libraries and dependencies used. Learn more about their inclusion policy &lt;a href="https://www.f-droid.org/en/docs/Inclusion_Policy/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Note that I am using Linux environment and I didn't test these on a Windows machine.&lt;/p&gt;
&lt;h5&gt;
  
  
  Step 1:
&lt;/h5&gt;

&lt;p&gt;First you need a &lt;a href="https://gitlab.com" rel="noopener noreferrer"&gt;GitLab&lt;/a&gt; account beacuse the F-Droid repository is hosted on GitLab. After registering on GitLab, you need to fork &lt;a href="https://gitlab.com/fdroid/fdroiddata" rel="noopener noreferrer"&gt;fdroiddata&lt;/a&gt; repository.&lt;/p&gt;
&lt;h5&gt;
  
  
  Step 2:
&lt;/h5&gt;

&lt;p&gt;Install &lt;a href="https://gitlab.com/fdroid/fdroidserver" rel="noopener noreferrer"&gt;fdroidserver&lt;/a&gt;. This can be done using apt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install fdroidserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But I faced some issues while using fdroidserver that is installed using apt.&lt;br&gt;
So I recommend using it directly from master:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://gitlab.com/fdroid/fdroidserver.git
export PATH="$PATH:$PWD/fdroidserver"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Step 3:
&lt;/h5&gt;

&lt;p&gt;Clone fdroiddata(or your fork) and enter it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://gitlab.com/fdroid/fdroiddata
cd fdroiddata
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Step 4:
&lt;/h5&gt;

&lt;p&gt;Run the following commands to make sure &lt;code&gt;fdroid&lt;/code&gt; works and reads the metadata files properly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fdroid init
fdroid readmeta
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Step 5:
&lt;/h5&gt;

&lt;p&gt;Use &lt;code&gt;fdroid import&lt;/code&gt; command to add your project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fdroid import --url https://github.com/YOUR-USERNAME/REPO --subdir app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace with the link to your project repository after --url tag.&lt;/p&gt;

&lt;h5&gt;
  
  
  Step 6:
&lt;/h5&gt;

&lt;p&gt;The above step will create a file in the metadata directory, something like &lt;em&gt;metadata/app.id.yml&lt;/em&gt;&lt;br&gt;
Open and edit this file using a text editor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nano metadata/YOUR-APP-ID.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You have to fill in your app details like Categories, License, WebSite etc. You can read about it &lt;a href="https://f-droid.org/en/docs/Build_Metadata_Reference" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h5&gt;
  
  
  Step 7:
&lt;/h5&gt;

&lt;p&gt;Run the following command to make sure that the metadata file is complete and error free:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fdroid readmeta
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Step 8:
&lt;/h5&gt;

&lt;p&gt;Run the following command to clean up your file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fdroid rewritemeta YOUR-APP-ID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Step 9:
&lt;/h5&gt;

&lt;p&gt;Run the following command and make sure that it doesn't report any warnings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fdroid lint YOUR-APP-ID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If there are any warnings, fix them.&lt;/p&gt;

&lt;h5&gt;
  
  
  Step 10:
&lt;/h5&gt;

&lt;p&gt;Let's actually build the app using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fdroid build -v -l YOUR-APP-ID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don't have Android Sdk set up on your computer or if you don't set it up correctly, you may encounter an error in this step. Don't worry, install the sdk and set the path correctly. In my case, the path was not set correctly. So I used following commands to correct the error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: If you still encounter any errors/warnings due to something that is not configured in your machine, I recommend moving to next step and check if the pipeline is passing after it is pushed to GitLab.&lt;/p&gt;

&lt;h5&gt;
  
  
  Step 11:
&lt;/h5&gt;

&lt;p&gt;Now you can commit and push to our GitLab repository(to your fork). This can be done using the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
git commit -m "Added &amp;lt;Your App Name Here&amp;gt;"
git remote set-url origin https://gitlab.com/YOUR-USERNAME/fdroiddata.git
git push -u origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Step 12:
&lt;/h5&gt;

&lt;p&gt;Check the CI/CD pipelines. Now you can make a merge request which will be reviewed by F-Droid maintainers and if everything is fine, they will merge it to their main branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Additional Info:&lt;/strong&gt; If you want to include, graphic assets like icon, screenshots etc. you can include it by adding a Fastlane or Triple-T folder structure in your app's repo. You can read about it &lt;a href="https://f-droid.org/en/docs/All_About_Descriptions_Graphics_and_Screenshots/#fastlane-structure" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
For example, I included a fastlane folder structure in my app's repo by creating these folders: fastlane/metadata/android/&lt;br&gt;
You can add graphic assets in the images folder. If you want to include screenshots, you need to create a folder called phoneScreenshots inside images and add your screenshots there. You can also add summary and descriptions also in fastlane/metadata/android/ folder and remove it from the metadata YML file so that you don't need to open a new merge request each time you make any changes in description, summary etc. If you need reference, check out my project &lt;a href="https://github.com/projectmatris/antimalwareapp" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Finally, don't forget to update the commit id in the metadata YML file.&lt;/p&gt;

&lt;p&gt;Phew, that's it!&lt;/p&gt;

&lt;p&gt;It may take one or two days to appear in the F-Droid app store after your app metadata is merged. &lt;/p&gt;

&lt;p&gt;You can advertise the download of your app in F-Droid using the &lt;a href="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" rel="noopener noreferrer"&gt;official grafic&lt;/a&gt;. &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffdroid.gitlab.io%2Fartwork%2Fbadge%2Fget-it-on.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffdroid.gitlab.io%2Fartwork%2Fbadge%2Fget-it-on.png"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" height="75"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So what do you think about F-Droid? Did you publish your apps on F-Droid? Let me know in the discussion below.&lt;/p&gt;

&lt;h4&gt;
  
  
  References:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://gitlab.com/fdroid/fdroiddata/-/blob/master/CONTRIBUTING.md" rel="noopener noreferrer"&gt;https://gitlab.com/fdroid/fdroiddata/-/blob/master/CONTRIBUTING.md&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.f-droid.org/en/docs/Inclusion_Policy/" rel="noopener noreferrer"&gt;https://www.f-droid.org/en/docs/Inclusion_Policy/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://f-droid.org/docs/Build_Metadata_Reference/" rel="noopener noreferrer"&gt;https://f-droid.org/docs/Build_Metadata_Reference/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://f-droid.org/en/docs/All_About_Descriptions_Graphics_and_Screenshots/" rel="noopener noreferrer"&gt;https://f-droid.org/en/docs/All_About_Descriptions_Graphics_and_Screenshots/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.fossasia.org/publish-an-open-source-app-on-fdroid/" rel="noopener noreferrer"&gt;https://blog.fossasia.org/publish-an-open-source-app-on-fdroid/&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>opensource</category>
      <category>android</category>
    </item>
    <item>
      <title>LibreAV - Free And Open-Source Anti-Malware For Android Using Machine Learning</title>
      <dc:creator>Sanand</dc:creator>
      <pubDate>Fri, 18 Sep 2020 17:03:41 +0000</pubDate>
      <link>https://dev.to/sanandmv7/libreav-free-and-open-source-anti-malware-for-android-using-machine-learning-53aa</link>
      <guid>https://dev.to/sanandmv7/libreav-free-and-open-source-anti-malware-for-android-using-machine-learning-53aa</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr3yqgtpmiskgks8iiu8k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr3yqgtpmiskgks8iiu8k.png" alt="LibreAV Graphic"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://f-droid.org/packages/tech.projectmatris.antimalwareapp" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffdroid.gitlab.io%2Fartwork%2Fbadge%2Fget-it-on.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Feel free to contribute on &lt;a href="https://github.com/projectmatris/antimalwareapp" rel="noopener noreferrer"&gt;Github&lt;/a&gt;
&lt;/h3&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;Android is the most popular operating system today. The popularity of the Android platform has also attracted malware developers towards it. Malware attack is a challenging issue among the Android user community. So it is necessary to make the platform safe for users by providing a defence mechanism against malware.&lt;br&gt;
Traditional virus detection relies on the use of signatures. The problem with signatures alone is that new types of viruses such as polymorphic ones can mutate their code, making signature generation difficult or impossible. By utilising a machine learning approach, we can detect malware without explicit knowledge of their presence.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is LibreAV?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;LibreAV is an attempt to detect malware on Android devices using a machine learning approach&lt;/strong&gt; that is powered by TensorFlow. We use a two-layer neural network trained with a carefully selected set of features. The neural network is tuned in such a way that it performs efficiently on mobile devices where computational resources are limited. Tests show that LibreAV performs efficiently and effectively even on low-end mobile devices. With LibreAV, you can scan all the installed apps in your device in a matter of seconds. It also has a real-time scan feature which alerts you whenever an app is installed or updated.&lt;/p&gt;

&lt;p&gt;We welcome contributions from your side. That is why we released it as open-source under GNU GPLv3. The motivation behind LibreAV is to make the digital world a safe and secure place. LibreAV is expected to be supported by the open-source community. So your contributions are very important to us.&lt;/p&gt;

&lt;p&gt;Check out LibreAV, let's fight malware together.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Android is a trademark of Google LLC.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>machinelearning</category>
      <category>contributorswanted</category>
      <category>hacktoberfest</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
