mvdan / fdroidcl Goto Github PK
View Code? Open in Web Editor NEWF-Droid desktop client
License: BSD 3-Clause "New" or "Revised" License
F-Droid desktop client
License: BSD 3-Clause "New" or "Revised" License
Very practical tool, thanks. It would be really convenient, if there was auto-completion for the package names for the install command. (We already have them locally, right?)
The basic version would just complete the local pathnames, while an advanced version could suggest/extend full package names based on some pattern (i.e. not necessarily starting with com...., but more similar to the search command, thereby possibly not requiring that step anymore).
Or should auto-completion already work? (I'm using zsh.)
Installer is currently set to null. Seems like you can do better than that although fdroid doesn't do very well either since it uses an external app to actually install unlike google play and amazon app store.
adb shell pm list packages -i -f -U | fgrep -i fdroid
package:/data/app/org.fdroid.fdroid-iuAasAj9JZFxU3XWeoSptQ==/base.apk=org.fdroid.fdroid installer=null uid:10473
adb shell pm list packages -i -f -U | fgrep -i antenna
package:/data/app/de.danoeh.antennapod-ipm6qV5SdjpZAUEcvlRjog==/base.apk=de.danoeh.antennapod installer=com.google.android.packageinstaller uid:10474
This was an example I found of how to set the installer when installing via adb
adb shell pm install -i "com.android.vending" -r /data/local/tmp/app.apk
but with that you need to push the file across first, unlike adb install. The -r will reinstall
--originating-uri: set URI where app was downloaded from
--referrer: set URI that instigated the install of the app
That is, replace these ADB commands:
# device info
adb shell getprop
# install an apk
adb install -r foo.apk
With their native Android counterparts:
getprop
pm install -r foo.apk
This way, this client could both be run from a laptop/desktop connected to an Android device via USB (ADB), or on an Android device directly.
Of course, the interface would still be command-line, which wouldn't be ideal. But at least the client would work. One could also imagine it being the basis of a client UI, or perhaps automatic updates via scripting, etc.
We'd need another group of tests which would build a fdroidcl
binary, adb push
it to a connected Android device, and check that the basics work there directly too.
With the (armv7) device attached, I used command:
fdroidcl download package-name
for several apps individually, including Tor browser and Tor browser alpha. I wanted to cache the apps before updating. Device was plugged in. Confirming,
"fdroidcl download org.torproject.torbrowser" gave:
Downloading https://guardianproject.info/fdroid/repo/tor-browser-10.5a11-android-x86_64-multi.apk... not modified
APK available in /home/myuser/.cache/fdroidcl/apks/tor-browser-10.5a11-android-x86_64-multi.apk
"fdroidcl download org.torproject.torbrowser_alpha" gave:
Downloading https://guardianproject.info/fdroid/repo/Orbot-16.3.3-RC-1-tor-0.4.3.6-fullperm-universal-release.apk... not modified
APK available in /home/myuser/.cache/fdroidcl/apks/Orbot-16.3.3-RC-1-tor-0.4.3.6-fullperm-universal-release.apk
Then "fdcroidcl install -u" gave:
Downloading https://guardianproject.info/fdroid/repo/tor-browser-10.0.12-android-armv7-multi.apk... done
Downloading https://guardianproject.info/fdroid/repo/tor-browser-10.5a11-android-armv7-multi.apk... done
Installing org.torproject.torbrowser
Installing org.torproject.torbrowser_alpha
I note x86_64, the one downloaded initially, is the first Available Version listed by:
fdroidcl show org.torproject.torbrowser
or
fdroidcl show org.torproject.torbrowser_alpha
For example:
Available Versions :
Version : 10.0.12 (86.1.0-Release) (2015808047)
Size : 82104872
MinSdk : 0
ABIs : x86_64
Is this the correct default behavior? Expected download command response was downloading the right apk for the attached device.
Is there an option to download the right device apk before running update?
See title.
Best regards,
Jonas
ps.
Thanks for this nice tool!
The F-Droid IVPN App shows that i have IVPN 2.8.2 Installed when I have 2.6.0 Installed on my Note 20 Ultra.
i can’t update to the 2.8.2 version because it shows that is is currently installed and when I uninstall IVPN app. The F-Droid Client still shows that i have version 2.8.2 installed.
I cannot resolve this problem. Please fix the F-Droid Client from this bug.
Please view 3 Screenshots from my Note 20 Ultra.
Very often the Package.VersCode
& Package.VersName
seem to instead parse out the targetSdk
(I'm seeing a lot of 29
s & 23
s, which matches that value for those packages I've checked) or other odd numbers that aren't the versionCode/versionName.
VersName
also frequently seems to get the versionName
, but from a completely different package.
From a glance at the code, the problem seems to be that there's no control that when we write the versions back, we're still in the same Package
'section' - since all packages are read at once. I still don't really understand why it goes wrong, since the versions aren't missing.
When I do something similar but reading packages singly dumpsys package <package>
it works fine:
OJFord/terraform-provider-android@510cf80#diff-fa6ddf3ce4282f3d8869a8556992a65df23f389ef71e94771c6b80e77d9301a3R267-R329
(I'd be happy to work on a patch if I can work out what's going wrong and you're amenable to it.)
If not, perhaps make search -c
or/and search -c \?
do it?
1 onny@onny ~/projects/android-syssetup % fdroidcl install org.videolan.vlc
Downloading http://f-droid.org/repo/org.videolan.vlc_1090005.apk... not modified
Installing org.videolan.vlc...
2016/03/25 17:20:37 Could not install org.videolan.vlc: no matching abis
Installing VLC via F-Droid works fine ...
Best regards,
Jonas
First, I'd like to request <permissions>
and <nativecode>
be added to the output of show
.
Second, is "Name" a typo for "Version" in the "Available Versions" section?
Currently you can do it with a script, such as https://iankelling.org/git/?p=fdroidcl-up;a=blob;f=fdroidcl-up;hb=HEAD
Hey bro, I often get TLS handshake timeouts on repo download and sometimes on apps downloads. Looks somewhat like this:
Downloading https://f-droid.org/repo/index.jar... update: could not update index: Get https://f-droid.org/repo/index.jar: net/http: TLS handshake timeout
and this:
Downloading https://f-droid.org/repo/cz.martykan.forecastie_14.apk... install: could not download cz.martykan.forecastie: Get https://f-droid.org/repo/cz.martykan.forecastie_14.apk: net/http: TLS handshake timeout
I would guess that this is related to the overall slowness of the fdroid servers. Maybe it's enough to increase the timeout times?
Very few people know how to build, install and uninstall programs written in Go. I can assure you that even if a program uses standard ./configure && make && make install
method, from time to time somebody asks how to build and install it. :) So, something like Quick Start guide with brief step-by-step instructions would be very helpful. At least there should be a link to the official documentation.
P.S. Very convenient and powerful tool!
Please add a possibility to list all apps and uninstall all apps which are currently installed.
That would make this tool into a nice cleanup tool for new Phones because with adb you could do work you could not do from inside the phone.
I don't actively work on this project right now, nor do I plan to do so in the near future. My interests currently lie in other open source projects, for better or worse.
There are a number of open issues by users, and some are fairly easy to fix, like #35.
If you would like to contribute, I'm happy to review PRs. I'm also happy to give someone direct write access (push to master) once they've had a few PRs merged. And, if that new person wants to maintain the project longer-term, I'm happy to transfer the github repository to a different user/org as well :)
Due to wrong SELinux attributes, downloading of an APK was failing with HTTP 403 error. Instead of reporting the error, fdroidcl
silently creates a zero-sized file in ~/.cache/fdroidcl/apks/
and then fails on SHA-256 check:
$ fdroidcl update
Downloading https://f-droid.org/repo/index.jar... not modified
Downloading https://f-droid.org/archive/index.jar... not modified
Downloading http://localhost/fdroid/repo/index.jar... not modified
$ fdroidcl upgrade org.gnu.icecat
Downloading http://localhost/fdroid/repo/icecatmobile-38.6.0.en-US.android-arm.apk...
2016/02/14 21:40:23 Could not download org.gnu.icecat: sha256 mismatch
Looks like HTTP reply code check is missing.
I have to deploy several times some lineage OS and a bunch of packages but time between install can be long.
I start to make a simple bash script to automaticly install packages.
I don’t know exactly the adb/android capabilities. (even if i have some good knowledge on GNU)
Some part of this post can be off-topic but it can help
Some other existing tool may exist to do some part off the stuff
First when i do a :
fdroidcl devices
A message to inform devices need adb activate can be a good remember.
it can be great if fdroidcl can automate as possible all the following process.
thx for your great job.
Hey, I am probably just doing something wrong, but could you please help me with this issue? I am on archlinux with a Sony Xperia SP connected. I successfully managed to install the app waveup, then uninstall it (did not start it in between), but now I can't install it again as I get this strange errors...
[amo@AmoNotebook ~]$ fdroidcl update
Downloading https://f-droid.org/repo/index.jar... not modified
[amo@AmoNotebook ~]$ fdroidcl install com.jarsilio.android.waveup
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x565c21]
goroutine 1 [running]:
github.com/mvdan/fdroidcl.(*Apk).URL(0xc4205e1c00, 0x0, 0x3)
/tmp/yaourt-tmp-amo/aur-fdroidcl/src/src/github.com/mvdan/fdroidcl/index.go:203 +0x51
main.downloadApk(0xc4205e1c00, 0xc4200d6700, 0xc4205e1c00)
/tmp/yaourt-tmp-amo/aur-fdroidcl/src/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/download.go:40 +0x40
main.downloadAndDo(0xc420096018, 0x1, 0x1, 0xc4200d6700, 0x734f40)
/tmp/yaourt-tmp-amo/aur-fdroidcl/src/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/install.go:49 +0xc4
main.runInstall(0xc42007c1d0, 0x1, 0x1)
/tmp/yaourt-tmp-amo/aur-fdroidcl/src/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/install.go:35 +0x1cc
main.main()
/tmp/yaourt-tmp-amo/aur-fdroidcl/src/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/main.go:180 +0x384
Grab the english versions via en-US
, if existing.
So, I found fdroidcl a couple of hours ago and I want to use it to install bromite on my phone. Bromite has its own repo for fdroid as seen here
https://www.bromite.org/fdroid
Here are the steps that I followed.
a) I ran fdroidcl defaults
to make fdroidcl create the ~/.config/fdroidcl/config.json. It worked, and these were its contents
$ cat .config/fdroidcl/config.json
{
"repos": [
{
"id": "f-droid",
"url": "https://f-droid.org/repo",
"enabled": true
},
{
"id": "f-droid-archive",
"url": "https://f-droid.org/archive",
"enabled": false
}
]
}
b) I added bromite's repo like it is described above, so now the config.json looks like so
$ cat .config/fdroidcl/config.json
{
"repos": [
{
"id": "f-droid",
"url": "https://f-droid.org/repo",
"enabled": true
},
{
"id": "f-droid-archive",
"url": "https://f-droid.org/archive",
"enabled": false
}
{
"id": "bromite",
"url": "https://fdroid.bromite.org/fdroid/repo",
"enabled": true
}
]
}
c) I ran fdroidcl update
to update the index, but only one of them, the stock one for fdroid was updated/downloaded
$ fdroidcl update
Downloading https://f-droid.org/repo/index-v1.jar... done
Why?
d) Bromite's repo was obviously not scanned at all, since searching for bromite returns no results. However searching for something else that exists on the main fdroid repo, does return results
$ fdroidcl search klar
de.marmaro.krt.ffupdater FFUpdater - 68.3.7 (42)
Downloader, installer and updater for browsers from Mozilla
org.mozilla.klar Firefox Klar - 8.0.15 (232)
Get The Privacy Browser. Fast & always private from Firefox, a browser you trust
So what am I doing wrong?
Debian testing x64, fdroidcl 0.5.0 running as a simple user
I ran ncdu earlier to check what is using the few GB of my ~ and I came accross this for ~/.cache
ncdu 1.14.1 ~ Use the arrow keys to navigate, press ? for help
--- /home/moi/.cache -----------------------------------------------------------
603.7 MiB [##########] /fdroidcl
45.2 MiB [ ] /thunderbird
12.5 MiB [ ] /mozilla
and the 600MB of fdroidcl are all from old apks of bromite
ncdu 1.14.1 ~ Use the arrow keys to navigate, press ? for help
--- /home/moi/.cache/fdroidcl/apks ---------------------------------------------
/..
100.6 MiB [##########] rel_84.0.4147.121_arm64_ChromeModernPublic.apk
100.6 MiB [######### ] rel_84.0.4147.90_arm64_ChromeModernPublic.apk
100.6 MiB [######### ] rel_84.0.4147.95_arm64_ChromeModernPublic.apk
100.6 MiB [######### ] rel_84.0.4147.119_arm64_ChromeModernPublic.apk
100.6 MiB [######### ] rel_84.0.4147.113_arm64_ChromeModernPublic.apk
100.6 MiB [######### ] rel_84.0.4147.106_arm64_ChromeModernPublic.apk
4.0 KiB [ ] rel_84.0.4147.95_arm64_ChromeModernPublic.apk-etag
4.0 KiB [ ] rel_84.0.4147.90_arm64_ChromeModernPublic.apk-etag
4.0 KiB [ ] rel_84.0.4147.121_arm64_ChromeModernPublic.apk-etag
4.0 KiB [ ] rel_84.0.4147.119_arm64_ChromeModernPublic.apk-etag
4.0 KiB [ ] rel_84.0.4147.113_arm64_ChromeModernPublic.apk-etag
4.0 KiB [ ] rel_84.0.4147.106_arm64_ChromeModernPublic.apk-etag
How about making a parameter that cleans that cache, like apt's clean and autoclean? Also, I think it is pointless to cache more than one apk from each package, so a "delete everything but the newst one" option would also be useful.
Thank you in advance.
Right now fdroidcl
always installs apps for all users.
I request an option to basically adb install --user <USER_ID|current|all> <pkgname>
.
Same for uninstall
.
Thank you!
Recently there was a share/export option added to F-Droid's Manage Installed Apps screen. It exports a CSV of the installed apps and versions. It would be awesome if fdroidcl could consume that CSV file and install all the apps listed, including the specified version. For example:
packageName,versionCode,versionName
org.adaway,61,3.3
com.amaze.filemanager,64,3.2.2
I'm on the latest master:
$ fdroidcl upgrade org.gnu.icecat
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x10 pc=0x40c5c0]
goroutine 1 [running]:
main.runUpgrade(0xc82000a440, 0x1, 0x1)
/home/xxx/golang/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/upgrade.go:37 +0x470
main.main()
/home/xxx/golang/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/main.go:180 +0x416
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/lib/golang/src/runtime/asm_amd64.s:1721 +0x1
I have IceCat 38.6 installed on my device while F-Droid repository contains only 38.7.1.
fdroidcl crashes here:
func runUpgrade(args []string) {
...
for _, app := range apps {
p, e := inst[app.ID]
...
cur := app.CurApk() // <<< returns nil
if p.VCode >= cur.VCode { // <<< crash here
log.Fatalf("%s is up to date", app.ID)
}
}
...
}
As far as I understand, runUpgrade()
tries to find current APK among APKs in the repo. This is not always the case, e.g. when APK has been moved to the archive and user tries to upgrade it after that.
I known that I won't be able to upgrade IceCat anyway due to #5. This issue is about upgrading APKs missing in the repo to the versions that are in the repo.
I know development is paused but I would raise this for the archive:
It would be nice if fdroidcl whould either remove apks directly after installing them or offered some cleaning mode. They take up quite some space after a while.
Currently you can do it with a script, such as https://iankelling.org/git/?p=fdroidcl-up;a=blob;f=fdroidcl-up;hb=HEAD
Please publish this app as snap or deb for Ubuntu.
Please set reasonable timeout for http.Client. As for now fdroidcl may show Downloading update...
without displaying any progress.
Hi there,
I wrote a script for updating devices some time ago, and I am using it without any problems since some time. It also supports repos with e.g. authentication, and auto-checks the version of the app if already installed. The script only downloads app if the installed version is outdated.
Maybe you can get some idea, or use parts of it in this application
#!/bin/bash
PACKAGES=""
REPO_USERNAME=""
REPO_PASSWORD=""
TMP="/tmp/androBootstrap"
REPOURL=""
REPODATA=""
SKIP=""
ret=""
ret2=""
coloredMessage(){
# $1: First colored text $2: Non colored Text
[ $# -gt 2 ] && echo -e "\033[1;32m$1\033[1;m $2" || echo -e "\033[1;31m$1\033[1;m $2"
}
getVersionCodeInstalledOnSystem(){
# VersionCode of system apk, otherwise -1
local versionCode=`adb shell dumpsys package "$1" | grep "versionCode=" | cut -d= -f2 | cut -d' ' -f1 | tr -d "\r"`
[ -z "$versionCode" ] && versionCode="-1"
ret="$versionCode"
}
getLatestPackageFDroid(){
# $REPODATA: Repository XML
# $1: Package name
[ "$SKIP" == "true" ] && return
local fdroid=$(echo "$REPODATA" | grep "<apkname>$1")
fdroid=$(echo "$fdroid" | sed 's/<[^>]*>//g')
fdroid=$(echo "$fdroid" | tr -s " " | rev | cut -d '_' -f1 | rev | cut -d '.' -f1 | sort -n -r)
local versionCode=$(echo "$fdroid" | head -n1)
ret="$REPOURL/$1_$versionCode.apk"
ret2="$versionCode"
}
loadFDroidRepo(){
# $1: Url to repository (https://f-droid.org/repo)
[ "$SKIP" == "true" ] && return
REPOURL="$1"
if [ -n "$REPO_USERNAME" -a -n "$REPO_PASSWORD" ] ; then
REPODATA=$(curl -s "$1/index.xml" --user "$REPO_USERNAME:$REPO_PASSWORD" | xmllint --format -)
else
REPODATA=$(curl -s "$1/index.xml" | xmllint --format -)
fi
}
showDownload(){
[ "$SKIP" == "true" ] && return
echo -e "\033[1;31mDownload:\033[1;m $1"
}
downloadApk(){
# $1: URL
# $2: Text, shows download info if set
local AGENT="Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5"
[ "$SKIP" == "true" ] && return
cd "$TMP"
# Info
[ -n "$2" ] && showDownload "$2"
# Download
if [ -n "$REPO_USERNAME" -a -n "$REPO_PASSWORD" ] ; then
curl -s -A "$AGENT" -J -O "$1" --user "$REPO_USERNAME:$REPO_PASSWORD"
else
curl -s -A "$AGENT" -J -O "$1"
fi
}
downloadWget(){
cd "$TMP"
wget -nc -q -O "$2.apk" "$1"
}
downloadMultiplePackagesFromFdroid(){
# PACKAGES must be defined as an Array.
for (( i=0; i < ${#PACKAGES[@]}; i=`expr $i + 2` )); do
local appname="${PACKAGES[$i]}"
local apppack="${PACKAGES[$i + 1]}"
getVersionCodeInstalledOnSystem "$apppack" && versionCodeOnSystem="$ret"
getLatestPackageFDroid "$apppack"
# Only download if not installed on system, or different version
if [ $ret2 -gt $versionCodeOnSystem -o "$versionCodeOnSystem" == "-1" ] ; then
downloadApk "$ret" "$appname"
else
coloredMessage "Skipping:" "$appname" "true"
fi
done
}
enterCredentials(){
[ "$SKIP" == "true" ] && return
if [ $# -gt 0 ] ; then
REPO_USERNAME="$1"
echo "Username: $1"
else
echo "Enter Username"
read REPO_USERNAME
fi
echo "Enter Password: "
read -s REPO_PASSWORD
}
clearCredentials(){
REPO_USERNAME=""
REPO_PASSWORD=""
}
#####################################
echo "Working folder: $TMP"
mkdir -p "$TMP"
####################################
# F-Droid packages (official)
loadFDroidRepo "https://f-droid.org/repo"
# dandelion
#getLatestPackageFDroid "com.github.dfa.diaspora_android"
#downloadApk "$ret" "dandelion"
PACKAGES=( \
"AF-Wall" "dev.ukanth.ufirewall" \
"Ad-Away" "org.adaway" \
"Barcode Scanner" "com.google.zxing.client.android" \
"Contact Merger" "de.measite.contactmerger" \
"Conversations" "eu.siacs.conversations" \
"DavDroid" "at.bitfire.davdroid" \
"Chromium Auto up2" "com.dosse.chromiumautoupdater" \
"NextCloud" "com.nextcloud.client" \
"Night Screen" "info.papdt.blackblub" \
"OpenTasks" "org.dmfs.tasks" \
"OsmAnd" "net.osmand.plus" \
"Silence IM" "org.smssecure.smssecure" \
"VLC" "org.videolan.vlc" \
"QuickDic" "de.reimardoeffinger.quickdic" \
)
downloadMultiplePackagesFromFdroid
####################################
# MYSERVER packages
PACKAGES=( \
"Omich" "com.omichsoft.newplayer" \
"Titanium" "com.keramidas.TitaniumBackup" \
)
enterCredentials "fdroid"
loadFDroidRepo "https://MYSERVER/fdroid"
downloadMultiplePackagesFromFdroid $PACKAGES
#### Install to phone
echo "APK --> Phone?"
cd "$TMP"
find . -iname "*.apk" -exec bash -c 'printf "\n\n" && adb install -r "{}"' \;
I'm actually not able to upgrade DAVx5. fdroid only show install: could not install at.bitfire.davdroid: exit status 1
Please show more details about the error.
There's a great app I use to automatically backup a list of installed apps every time an app is added/removed from my device, and it would be AWESOME if your desktop client was able to process a backup file and install the apps onto a device. The flow would be something like this:
This would be a good alternative since the f-droid folks seem to be totally against helping folks out (https://gitlab.com/fdroid/fdroidclient/issues/70)
Here's a link to the MyAppList app:
https://f-droid.org/repository/browse/?fdfilter=myapp&fdid=com.projectsexception.myapplist.open
I have been using f froid for a long time.
the problems which I faced the most is that I can't search the app ,whether in home page or category page.
So I want to the suggestion you to install a ''search button'' at the top
Thanks
On each app upgrade I get this error:
$ fdroidcl upgrade com.nutomic.syncthingandroid
Downloading http://f-droid.org/repo/com.nutomic.syncthingandroid_103.apk... done
Upgrading com.nutomic.syncthingandroid... panic: runtime error: index out of range
goroutine 1 [running]:
panic(0x8147a0, 0xc82000e100)
/usr/lib/golang/src/runtime/panic.go:481 +0x3e6
github.com/mvdan/fdroidcl/adb.getFailureCode(0xc820082320, 0x0, 0x0, 0x0, 0x0)
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/adb/device.go:117 +0x78
github.com/mvdan/fdroidcl/adb.(*Device).install(0xc8200c2770, 0xc820e47a98, 0x1, 0x1, 0xc820a59860, 0x45, 0x0, 0x0)
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/adb/device.go:157 +0x2b1
github.com/mvdan/fdroidcl/adb.(*Device).Upgrade(0xc8200c2770, 0xc820a59860, 0x45, 0x0, 0x0)
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/adb/device.go:165 +0x94
main.upgradeApk(0xc8200c2770, 0xc820940000, 0xc820a59860, 0x45)
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/upgrade.go:48 +0x143
main.downloadAndDo(0xc82002a000, 0x1, 0x1, 0xc8200c2770, 0x95b4b8)
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/install.go:53 +0x37d
main.runUpgrade(0xc82000a3e0, 0x1, 0x1)
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/upgrade.go:43 +0x522
main.main()
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/main.go:180 +0x3fb
App is actually upgraded. This may be related to the adb version (Platform-tools 24.0.3):
Android Debug Bridge version 1.0.36
Revision e02fe72a18c3-android
Target device is Nexus 9, Android 7.0 (NRD90R). Host is Fedora 24 x86-64. I use adb from the official SDK, not from Fedora repositories. fdroidcl from master @ 4d0eeea.
I have no idea why you aren't adding a comment section for f droid. You could do a anonymous review of the app. It may help developers to make their app better as well as users to understand whether that app is fit for their needs.
It happen frequently that fdroid repos are really slow to download. Fdroid have set up few official mirrors and it could be nice to add a features to fetch from one mirror IF the primary is too slow.
https://forum.f-droid.org/t/why-is-fdroid-down-all-the-time/5028/9
$ fdroidcl search unmentionable
$ fdroidcl search -c Time unmentionable
No such category: Time
Usage: fdroidcl search [<regexp...>] [-h]
Available options:
-c string
Filter apps by category
-i Filter installed apps
-o string
Sort order (added, updated)
-q Print package names only
-u Filter apps with updates
The error is there is a category "Time".
Is it may possible to install apps that are inside a work-profile, like you could create with Shelter?
Right now there's no way to download/install a version of an app other than the current.
On Debian Buster and Ubuntu Bionic, golang (1.11 or 1.10) may be too old to support this syntax:
$ go get mvdan.cc/fdroidcl
# mvdan.cc/fdroidcl
../go/src/mvdan.cc/fdroidcl/main.go:23:28: syntax error: unexpected o755, expecting comma or )
I looked around to see if there was a PPA supported by the Golang project, didn't see anything that seemed official or trustworthy.
I have a local repository with the following configuration:
{
"id": "binary",
"url": "http://localhost/fdroid/repo",
"enabled": true
}
I generate index using this command (fdroidserver from today's master, c2270f8):
fdroid update --create-metadata
The repo contains official build of GNU IceCat 38.6.0, while on my device (Nexus 4, Android 5.1.1) there is 38.5.2. Both APKs are signed with the same key.
What happens:
$ fdroidcl update
Downloading https://f-droid.org/repo/index.jar... not modified
Downloading https://f-droid.org/archive/index.jar... not modified
Downloading http://localhost/fdroid/repo/index.jar... done
$ fdroidcl upgrade org.gnu.icecat
2016/02/13 09:59:22 org.gnu.icecat is up to date
What was expected: fdroidcl
should upgrade org.gnu.icecat.
Android F-Droid client 0.98 correctly detects availability of an update.
Excerpt from index.xml
in ~/.config/fdroidcl/binary.jar
:
<application id="org.gnu.icecat">
<id>org.gnu.icecat</id>
<added>2016-02-13</added>
<lastupdated>2016-02-13</lastupdated>
<name>IceCatMobile</name>
<summary>IceCatMobile</summary>
<icon>org.gnu.icecat.2016020332.png</icon>
<desc>
<p>IceCatMobile</p>
</desc>
<license>Unknown</license>
<categories>None</categories>
<category>None</category>
<web/>
<source/>
<tracker/>
<marketversion/>
<marketvercode>0</marketvercode>
<package>
<version>38.6.0</version>
<versioncode>2016020332</versioncode>
<apkname>icecatmobile-38.6.0.en-US.android-arm.apk</apkname>
<hash type="sha256">e18ef4192c88245235784a4c17971c7aeab3c3f6e157a50ed8f75433e0b1634d</hash>
<sig>bccec4a591f0b61ed5cb283a4553e654</sig>
<size>37245301</size>
<sdkver>11</sdkver>
<added>2016-02-13</added>
<permissions>WRITE_SETTINGS,ACCESS_NETWORK_STATE,com.android.launcher.permission.UNINSTALL_SHORTCUT,READ_EXTERNAL_STORAGE,USE_CREDENTIALS,VIBRATE,READ_SYNC_SETTINGS,RECORD_AUDIO,CHANGE_WIFI_STATE,com.android.launcher.permission.INSTALL_SHORTCUT,org.gnu.icecat_fxaccount.permission.PER_ACCOUNT_TYPE,org.gnu.icecat_sync.permission.PER_ACCOUNT_TYPE,CAMERA,RECEIVE_BOOT_COMPLETED,com.android.browser.permission.READ_HISTORY_BOOKMARKS,org.gnu.icecat.permissions.BROWSER_PROVIDER,MANAGE_ACCOUNTS,org.gnu.icecat.permissions.PASSWORD_PROVIDER,NFC,WRITE_SYNC_SETTINGS,WAKE_LOCK,READ_SYNC_STATS,GET_ACCOUNTS,INTERNET,DOWNLOAD_WITHOUT_NOTIFICATION,AUTHENTICATE_ACCOUNTS,WRITE_EXTERNAL_STORAGE,ACCESS_WIFI_STATE,org.gnu.icecat.permissions.FORMHISTORY_PROVIDER,org.gnu.icecat.permission.PER_ANDROID_PACKAGE,ACCESS_FINE_LOCATION</permissions>
<nativecode>armeabi-v7a</nativecode>
</package>
</application>
The main help has the line
Use fdroidcl <command> -h for more info
at the bottom of the output.
However the -h
flag is not respected by almost all of the commands:
$ fdroidcl update -h
Downloading https://f-droid.org/repo/index-v1.jar... not modified
$ fdroidcl show -h
show: could not find app with ID '-h'
$ fdroidcl install -h
install: could not find app with ID '-h'
$ fdroidcl uninstall -h
Uninstalling -h
uninstall: could not uninstall -h: not installed
$ fdroidcl download -h
download: could not find app with ID '-h'
$ fdroidcl devices -h
<serialno> - <device>
$ fdroidcl list -h
list: invalid argument
$ fdroidcl defaults -h
defaults: no arguments allowed
$ fdroidcl version -h
version: no arguments allowed
Only search
prints out the usage information ... along with every single package it can find, spamming the usage information away with it.
$ fdroidcl search -h
Usage:
-c string
Filter apps by category
-d int
Select apps last updated in the last <n> days; a negative value drops them instead
-i Filter installed apps
-o string
Sort order (added, updated)
-q Print package names only
-u Filter apps with updates
<long list of all available packages>
Version:
$ fdroidcl version
v0.4.0
* [ x] The original app author has been notified (and supports the inclusion).
- https://gitlab.com/fdroid/rfp/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=
Are you ok with this (this comment will be used as reference)?
Are you willing to packagefdroidcl to F-Droid yourself?
Thanks for this awesome software, which I've used without a problem on Linux!
This time, I use MSYS2 bash
shell on Windows 10; I have installed go
as per https://stackoverflow.com/questions/37198369/use-go-lang-with-msys2 ; and then installed fdroidcl via go get -u mvdan.cc/fdroidcl
, seemingly without problems.
Here is what I get with usual adb
, with a rooted Samsung XCover2 connected via USB:
$ which adb
/c/bin/platform-tools_r28.0.1/adb
$ adb devices -l
List of devices attached
5205a3bd531d2112 device transport_id:1
$ adb shell "cat /system/build.prop" | grep -i abi
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
$ adb shell getprop | grep -i abi
[ro.product.cpu.abi2]: [armeabi]
[ro.product.cpu.abi]: [armeabi-v7a]
But, if I try via fdroidcl, I get this:
$ fdroidcl devices
devices: could not get devices: failed to get device ABIs
While I don't know go
, I can see in https://github.com/mvdan/fdroidcl/blob/bda1806/adb/device.go that fdroidcl
should likely call the system adb
that is available, via cmd := exec.Command("adb", "devices", "-l")
- so my guess is, that for some reason, it cannot find the path to adb
from the MSYS2 shell (however, I also have the same path to adb
in Windows PATH, so I can use the same adb
in cmd.exe
).
So, my questions are:
fdroidcl devices
?adb
- maybe via some environment variable?fdroidcl
working on this platform?Hello there,
I'm facing an error when trying to list devices on Debian 10:
$ fdroidcl devices
devices: could not get devices: failed to get device ABIs
Note that adb
is able to list devices:
$ adb devices -l
List of devices attached
3300e36aa634a2f7 device usb:2-2 product:s5neoltexx model:SM_G903F device:s5neolte transport_id:7
Here are pieces of information I gathered:
fdroidcl version: v0.5.0 (0.5.0-3+b3 installed from bullseye)
adb version:
Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5
Installed as /usr/lib/android-sdk/platform-tools/adb
fdroidcl update
works fine and downloads the index
Another occurrence of the same error:
$ fdroidcl download zen.meditation.android
Downloading https://f-droid.org/repo/zen.meditation.android_1644109.apk... done
APK available in /home/amnesia/.cache/fdroidcl/apks/zen.meditation.android_1644109.apk
$ fdroidcl install zen.meditation.android
install: could not get devices: failed to get device ABIs
Any hint?
(I can provide more info if necessary)
Related issue (same error but on Windows 10): #49
I dont know why but if I use fdroidcl on a phone I get a install: could not install net.osmand.plus: exit status 1
this app was bought and installed by Google play. fdroidcl stop on this error and do not proceed further.
Please add an exclude option and also a skip error option to the install
command.
I like to use search -o updated
to search for actively maintained apps, but
currently there's no way to tell just how recently any of them is updated.
From there I'd like to request,
search
results. yyyy-mm-dd
or <n> days
or <n>d
.search -d 14
for last 14 days.Some of these may apply to "added", too.
When apps []fdroidcl.App
are loaded from cache-gob
they have nil repo
pointer. This causes a crash on each install after the first one (when data was loaded from XML):
$ fdroidcl install com.vonglasow.michael.satstat
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4aba19]
goroutine 1 [running]:
panic(0x8147a0, 0xc82000e150)
/usr/lib/golang/src/runtime/panic.go:481 +0x3e6
github.com/mvdan/fdroidcl.(*Apk).URL(0xc8205ee700, 0x0, 0x0)
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/index.go:203 +0x1c9
main.downloadApk(0xc8205ee700, 0x0, 0x0)
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/download.go:40 +0x42
main.downloadAndDo(0xc82002a000, 0x1, 0x1, 0xc8200ca770, 0x95b458)
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/install.go:49 +0x1f4
main.runInstall(0xc82000a3e0, 0x1, 0x1)
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/install.go:35 +0x2a7
main.main()
/home/relan/opt/golang/src/github.com/mvdan/fdroidcl/cmd/fdroidcl/main.go:180 +0x3fb
I use golang-bin-1.6.3-2.fc24.x86_64.
This patch fixes the issue but breaks backward compatibility because it changes cache-gob
format:
diff --git a/index.go b/index.go
index fcce635..31c1e77 100644
--- a/index.go
+++ b/index.go
@@ -86,7 +86,7 @@ func (a *App) IconURLForDensity(density IconDensity) string {
if len(a.Apks) == 0 {
return ""
}
- return fmt.Sprintf("%s/%s/%s", a.Apks[0].repo.URL,
+ return fmt.Sprintf("%s/%s/%s", a.Apks[0].RepoURL,
getIconsDir(density), a.Icon)
}
@@ -196,15 +196,15 @@ type Apk struct {
Hash HexHash `xml:"hash"`
AppID string `xml:"-"`
- repo *Repo `xml:"-"`
+ RepoURL string `xml:"-"`
}
func (a *Apk) URL() string {
- return fmt.Sprintf("%s/%s", a.repo.URL, a.ApkName)
+ return fmt.Sprintf("%s/%s", a.RepoURL, a.ApkName)
}
func (a *Apk) SrcURL() string {
- return fmt.Sprintf("%s/%s", a.repo.URL, a.SrcName)
+ return fmt.Sprintf("%s/%s", a.RepoURL, a.SrcName)
}
func (a *Apk) IsCompatibleABI(ABIs []string) bool {
@@ -260,7 +260,7 @@ func LoadIndexXML(r io.Reader) (*Index, error) {
for j := range app.Apks {
apk := &app.Apks[j]
apk.AppID = app.ID
- apk.repo = &index.Repo
+ apk.RepoURL = index.Repo.URL
}
}
return &index, nil
Users need to delete ~/.config/fdroidcl/cache-gob
after applying this patch.
I made my first installation/upgrade earlier on bromite with fdroidcl and it worked perfectly as you can see from its output below.
$ fdroidcl install org.bromite.bromite
Downloading https://fdroid.bromite.org/fdroid/repo/rel_83.0.4103.101_arm64_ChromeModernPublic.apk... done
Installing org.bromite.bromite
It took some time to download the apk, since I am on an 8Mbps connection, so I thought it was stuck at first. So, can you please add a progress bar, preferably for both the download and the installation process?
Thank you in advance.
I know there is no hardware compatibility check at the moment. But may I ask how to check it manually? With the f-droid app on my phone, it will show compatibility. Is it possible to get this information with something like fdroidcl show app-id
?
I have an old phone which runs a version lower than Android 4.4, so compatibility is a major issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.