fdroidcl

package module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2016 License: BSD-3-Clause Imports: 11 Imported by: 0

README

fdroidcl

GoDoc Build Status

F-Droid desktop client.

go get -u github.com/mvdan/fdroidcl/cmd/fdroidcl

This is not a replacement for the Android client.

While the Android client integrates with the system with regular update checks and notifications, this is a command line client that talks to connected devices via ADB.

Quickstart

Download the index:

fdroidcl update

Show all available apps:

fdroidcl search

Install an app:

fdroidcl install org.adaway
Commands
update                Update the index
search <regexp...>    Search available apps
show <appid...>       Show detailed info about an app
devices               List connected devices
download <appid...>   Download an app
install <appid...>    Install an app
upgrade <appid...>    Upgrade an app
uninstall <appid...>  Uninstall an app
defaults              Reset to the default settings

A specific version of an app can be selected by following the appid with an colon (:) and the version code of the app to select.

Config

You can configure the repositories to use in the config.json file, located in fdroidcl's config directory. This will be ~/.config/fdroidcl/config.json on Linux.

You can run fdroidcl defaults to create the config with the default settings.

Missing features
  • Index verification via jar signature - currently relies on HTTPS
  • Interaction with multiple devices at once
  • Hardware features filtering
Advantages over the Android client
  • Command line interface
  • Batch install/update/remove apps without root nor system privileges
  • Handle multiple Android devices
  • No need to install a client on the device
What it will never do
  • Run as a daemon, e.g. periodic index updates
  • Graphical user interface
  • Act as an F-Droid server
  • Swap apps with devices running the Android client

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoIndex     = errors.New("no xml index found inside jar")
	ErrNoSigs      = errors.New("no jar signatures found")
	ErrTooManySigs = errors.New("multiple jar signatures found")
)

Functions

This section is empty.

Types

type Apk

type Apk struct {
	VName   string    `xml:"version"`
	VCode   int       `xml:"versioncode"`
	Size    int64     `xml:"size"`
	MinSdk  int       `xml:"sdkver"`
	MaxSdk  int       `xml:"maxsdkver"`
	ABIs    CommaList `xml:"nativecode"`
	ApkName string    `xml:"apkname"`
	SrcName string    `xml:"srcname"`
	Sig     HexVal    `xml:"sig"`
	Added   DateVal   `xml:"added"`
	Perms   CommaList `xml:"permissions"`
	Feats   CommaList `xml:"features"`
	Hash    HexHash   `xml:"hash"`

	AppID string `xml:"-"`
	// contains filtered or unexported fields
}

Apk is an Android package

func (*Apk) IsCompatible added in v0.3.0

func (a *Apk) IsCompatible(device *adb.Device) bool

func (*Apk) IsCompatibleABI added in v0.3.0

func (a *Apk) IsCompatibleABI(ABIs []string) bool

func (*Apk) IsCompatibleAPILevel added in v0.3.0

func (a *Apk) IsCompatibleAPILevel(sdk int) bool

func (*Apk) SrcURL added in v0.2.0

func (a *Apk) SrcURL() string

func (*Apk) URL added in v0.2.0

func (a *Apk) URL() string

type ApkList added in v0.2.0

type ApkList []Apk

func (ApkList) Len added in v0.2.0

func (al ApkList) Len() int

func (ApkList) Less added in v0.2.0

func (al ApkList) Less(i, j int) bool

func (ApkList) Swap added in v0.2.0

func (al ApkList) Swap(i, j int)

type App

type App struct {
	ID        string    `xml:"id"`
	Name      string    `xml:"name"`
	Summary   string    `xml:"summary"`
	Added     DateVal   `xml:"added"`
	Updated   DateVal   `xml:"lastupdated"`
	Icon      string    `xml:"icon"`
	Desc      string    `xml:"desc"`
	License   string    `xml:"license"`
	Categs    CommaList `xml:"categories"`
	Website   string    `xml:"web"`
	Source    string    `xml:"source"`
	Tracker   string    `xml:"tracker"`
	Changelog string    `xml:"changelog"`
	Donate    string    `xml:"donate"`
	Bitcoin   string    `xml:"bitcoin"`
	Litecoin  string    `xml:"litecoin"`
	FlattrID  string    `xml:"flattr"`
	Apks      []Apk     `xml:"package"`
	CVName    string    `xml:"marketversion"`
	CVCode    int       `xml:"marketvercode"`
}

App is an Android application

func (*App) IconURL added in v0.2.0

func (a *App) IconURL() string

func (*App) IconURLForDensity added in v0.2.0

func (a *App) IconURLForDensity(density IconDensity) string

func (*App) SuggestedApk added in v0.3.0

func (a *App) SuggestedApk(device *adb.Device) *Apk

func (*App) TextDesc

func (a *App) TextDesc(w io.Writer)

type AppList added in v0.2.0

type AppList []App

func (AppList) Len added in v0.2.0

func (al AppList) Len() int

func (AppList) Less added in v0.2.0

func (al AppList) Less(i, j int) bool

func (AppList) Swap added in v0.2.0

func (al AppList) Swap(i, j int)

type CommaList added in v0.2.0

type CommaList []string

func (*CommaList) String added in v0.2.0

func (cl *CommaList) String() string

func (*CommaList) UnmarshalText added in v0.2.0

func (cl *CommaList) UnmarshalText(text []byte) error

type DateVal added in v0.2.0

type DateVal struct {
	time.Time
}

func (*DateVal) String added in v0.2.0

func (dv *DateVal) String() string

func (*DateVal) UnmarshalText added in v0.2.0

func (dv *DateVal) UnmarshalText(text []byte) error

type HexHash

type HexHash struct {
	Type string `xml:"type,attr"`
	Data HexVal `xml:",chardata"`
}

type HexVal added in v0.2.0

type HexVal []byte

func (*HexVal) String added in v0.2.0

func (hv *HexVal) String() string

func (*HexVal) UnmarshalText added in v0.2.0

func (hv *HexVal) UnmarshalText(text []byte) error

type IconDensity added in v0.2.0

type IconDensity uint
const (
	UnknownDensity IconDensity = 0
	LowDensity     IconDensity = 120
	MediumDensity  IconDensity = 160
	HighDensity    IconDensity = 240
	XHighDensity   IconDensity = 320
	XXHighDensity  IconDensity = 480
	XXXHighDensity IconDensity = 640
)

type Index

type Index struct {
	Repo Repo  `xml:"repo"`
	Apps []App `xml:"application"`
}

func LoadIndexJar

func LoadIndexJar(r io.ReaderAt, size int64, pubkey []byte) (*Index, error)

func LoadIndexXML added in v0.3.0

func LoadIndexXML(r io.Reader) (*Index, error)

type Repo added in v0.2.0

type Repo struct {
	Name        string `xml:"name,attr"`
	PubKey      string `xml:"pubkey,attr"`
	Timestamp   int    `xml:"timestamp,attr"`
	URL         string `xml:"url,attr"`
	Version     int    `xml:"version,attr"`
	MaxAge      int    `xml:"maxage,attr"`
	Description string `xml:"description"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL