Task #3204

merge kerplapp into fdroid

Added by hans almost 4 years ago. Updated over 3 years ago.

Status:ClosedStart date:04/06/2014
Priority:UrgentDue date:
Assignee:-% Done:

0%

Category:-
Target version:Integrate Kerplapp into FDroid
Component:

Description

kerplapp works, so time to merge it into FDroid for one stop shopping!

Associated revisions

Revision 76c0c13f
Added by hans over 3 years ago

move Apk and App classes to FDroid packages

These will then have to be normalized to FDroid's version.

refs #3204 https://dev.guardianproject.info/issues/3204

Revision e1832f0b
Added by hans over 3 years ago

AppEntry.loadLabel() mirrors PackageItemInfo.loadLabel()

make AppEntry.loadLabel() take a PackageManager as the argument, and clean
up the code surrounding it a bit.

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 86c8729d
Added by hans over 3 years ago

purge some dead code: Utils.getBinaryHash(File apk)

Only Utils.getBinaryHash(File apk, String algo) is used.

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 6919b67a
Added by hans over 3 years ago

port to FDroid's current Apk class

  • changes in Kerplapp's Apk class need to be folded into FDroid's
  • FDroid's ValueObject is included only to support porting

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 0a6bb2d1
Added by hans over 3 years ago

purge apkSourcePath and apkSourceName from Kerplapp's Apk.java

These were not needed at all, so we should not introduce them.

refs #3204 https://dev.guardianproject.info/issues/3204

Revision f5208e2a
Added by hans over 3 years ago

rename Apk.file to Apk.installedFile for clarity

This File is referring to the installed .apk file on the device's local
filesystem, i.e. in /data/app

refs #3204 https://dev.guardianproject.info/issues/3204

Revision ad6377b9
Added by hans over 3 years ago

port to FDroid's current App class

No real changes needed, just removed the unneeded init stuff in App() and
included some code from FDroid's App.java to make future comparison easier.

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 3ea0164a
Added by hans over 3 years ago

a quick cosmetic sync to FDroid's Repo.java

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 57744357
Added by hans over 3 years ago

set minSdkVersion to android-7 aka 2.0

This is what FDroid will be moving to in order to support appcompat-v7

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 8d8bc909
Added by hans over 3 years ago

use global, static properies in Application for local repo state

The Application class is meant to provide a place to store global state of
the app, so let's use it! FDroid uses it already, its called FDroidApp, so
the calls will get a lot shorter once in FDroid since KerplappApplication
will be replaced by FDroidApp.

Don't fear the global static properties! Getters and setters suck often.
Or maybe I've just been too deep in Python these days ;)

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 28c95e3f
Added by hans over 3 years ago

rename KerplappApplication to FDroidApp

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 760a9332
Added by hans over 3 years ago

rename AppSelectActivity to SelectLocalAppsActivity

refs #3204 https://dev.guardianproject.info/issues/3204

Revision f1f5a3bd
Added by hans over 3 years ago

rename KerplappActivity to LocalRepoActivity

refs #3204 https://dev.guardianproject.info/issues/3204

Revision fad0f182
Added by hans over 3 years ago

rename net.binaryparadox.kerplapp.repo to org.fdroid.fdroid.localrepo

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 1f78eac0
Added by hans over 3 years ago

rename LocalRepo to LocalRepoManager

refs #3204 https://dev.guardianproject.info/issues/3204

Revision a6bc86e9
Added by hans over 3 years ago

rename net.binaryparadox.kerplapp.network to org.fdroid.fdroid.net

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 98c47819
Added by hans over 3 years ago

move getDefaultRepoName() to org.fdroid.fdroid.Utils

org.fdroid.fdroid.Utils is the current FDroid location for static utility
methods.

refs #3204 https://dev.guardianproject.info/issues/3204

Revision b2c6ad6c
Added by hans over 3 years ago

refactor webserver class into much simplified NanoHTTPD subclass

The SimpleWebServer.java example had a lot more stuff than we needed in it,
plus it had some code that was only supported on android-9 or higher. I
stripped out anything that is not currently needed and merged
KerplappHTTPD and SimpleWebServer into a single class: LocalHTTPD.

This should now work down to android-7 at least.

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 3caec653
Added by Hans-Christoph Steiner over 3 years ago

generate QR Codes internally based on ZXing's core.jar

This app needs to be able to generate QR Codes regardless of what other
app might be installed, so zxing's core.jar needs to be embedded in this
app.

This also includes two classes which are modified versions of ZXing classes
that allow the generation of QR Codes without the Barcode Scanner app being
installed:
https://stackoverflow.com/questions/4782543/integration-zxing-library-directly-into-my-android-application

The classes are src/com/google/zxing/encode/Contents.java which is a copy
of zxing/android/src/com/google/zxing/client/android/Contents.java; and
src/com/google/zxing/encode/QRCodeEncoder.java which is a heavily stripped
and modified version of
zxing/android/src/com/google/zxing/client/android/encode/QRCodeEncoder.java

refs #3204 https://dev.guardianproject.info/issues/3204
refs #2470 https://dev.guardianproject.info/issues/2470

Revision a89e4143
Added by Hans-Christoph Steiner over 3 years ago

QR Code image generation into AsyncTask to keep things snappy

Generating the QR Code image can take some time, so do it in an AsyncTask
which then updates the ImageView once the QRCode is complete. This will be
used for the kerplapp repo swapping process.

refs #3204 https://dev.guardianproject.info/issues/3204
refs #3201 https://dev.guardianproject.info/issues/3201

Revision db0b1066
Added by Hans-Christoph Steiner over 3 years ago

nanohttpd submodule for supporting local HTTP repos

This webserver is the core of the kerplapp swap local repo when used over
IP connections (WiFi). It is the smallest Java webserver we could find. It
is included as a git submodule, but then only the actual source files that
are needed are included. They are symlinked in src/.

The git repo used is the one that we submitted upstream as a pull request.
The pull request contains changes required to support https://. It has not
yet been accepted, so we cannot yet use the official repo. Once the pull
request is included, this should be switched to the latest release in the
official git repo.

https://github.com/eighthave/nanohttpd
https://github.com/NanoHttpd/nanohttpd/pull/107

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 2c2d8c86
Added by Hans-Christoph Steiner over 3 years ago

monitor Wifi changes with BroadcastReceiver/Service

The local repo will need to both have current wifi settings in order to
send the correct IP address, SSID, etc. Also, this could be used to handle
interrupted downloads and updates, but that is not included in this commit.

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 5050605f
Added by Hans-Christoph Steiner over 3 years ago

Activity/Service for running a local repo via http://

This is a skeleton for the upcoming local repo (aka swap aka Kerplapp).
Right now, it just provides an Activity for controlling a Service which
manages a local webserver (nanohttpd). Next, it will be wired up to the
local repo created via a dedicated Activity for managing the list of apps
included in the local repo.

refs #3204 https://dev.guardianproject.info/issues/3204

Revision a9c88bb5
Added by Hans-Christoph Steiner over 3 years ago

build a local repo from a list of installed APKs

Wire up the "Setup Repo" button on the Local Repo view to generate an
FDroid repo on the device that is hosted with the local webserver. This
also generates an index.html for when people navigate to the local repo via
a browser. This index.html will allow them to both download FDroid and to
setup the repo on the device running the webserver on the local FDroid.

refs #3204 https://dev.guardianproject.info/issues/3204
refs #2668 https://dev.guardianproject.info/issues/2668

Revision 94dc2d01
Added by Hans-Christoph Steiner over 3 years ago

add wizard for sending FDroid to another device via WiFi/QR

This is a little helper to direct people to get a new device to download
FDroid from another device that already has it. It first prompts them to
join the same wifi network, and offers a QR Code to associate to the same
wifi. The next step is a QR Code for getting the URL to the local repo.
The index.html on that local repo includes a download link for FDroid and
a repo link to the local repo.

refs #3204 https://dev.guardianproject.info/issues/3204

Revision 08346b9b
Added by Hans-Christoph Steiner over 3 years ago

add Activity to choose which installed apps are in the local repo

This gets the data about which apps are installed from the ContentProvider
that pserwylo recently added for data about "Installed Apps" and presents
a list view for the user to select from by touching each line. Then if the
user chooses "Update Repo", it will regenerate the local repo based on the
current selection. It will always include FDroid in the local repo.

fixes #3232 https://dev.guardianproject.info/issues/3232
refs #3204 https://dev.guardianproject.info/issues/3204

Revision 5f317033
Added by Hans-Christoph Steiner over 3 years ago

init SelectLocalApps list from the apks in the local repo

When FDroid has been started, this checks the symlinked APKs in the local
repo and uses those package names to build up the list of selected local
apps. This gives the SelectLocalApps experience continuity across app
restarts.

refs #3204 https://dev.guardianproject.info/issues/3204

History

#1 Updated by hans over 3 years ago

  • Target version changed from improved security/usability to Integrate Kerplapp into FDroid

#3 Updated by hans over 3 years ago

  • Status changed from New to Closed

the kerplapp core is in the official 0.67-test release!

Also available in: Atom PDF