Using F-droid from the command line via adb

Is there a way to use F-droid from the command line via adb?

For some context, I want to create a script to automatically install everything I use an do other configurations when I use a new device, instead of doing it manually.

I use My App List for that.

Not claiming to be a bash expert, but it works for me:


# Do this once 
#adb shell 'pm list packages -f' | grep data > current_list_of_apps


   mkdir -p tmp
    [ "$oldRepo" != "$repo" ] && rm -f tmp/index.xml
   if [ ! -f tmp/index.xml ];then
      wget --quiet --connect-timeout=10 $repo/index.jar -O tmp/index.jar
      unzip -p tmp/index.jar index.xml > tmp/index.xml
   grep versioncode  tmp/index.xml | awk -F"apkname" '{print $2}'  | sed 's/[<]//'|  sed 's/[>]//' | sed 's/[/]//' > fdroid_list_of_all_apks

for i in `cat current_list_of_apps`
   if grep "$i" fdroid_list_of_all_apks > /dev/null
       echo "$i"
       TODOWNLOAD_APK=`grep "$i" fdroid_list_of_all_apks | head -1`
       wget --quiet --no-use-server-timestamps --connect-timeout=10 $repo"$TODOWNLOAD_APK" -O $i".apk"
       adb install $i".apk"
       sleep 5

Thank you all for your suggestions. All 3 methods are great for different situations.

In my case, I ended up creating a mix of the last 2 answers, creating a script to use fdroidcl to install all apps from a list and it’s working fine.

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