1
0
Fork 0
mirror of https://codeberg.org/errhammr/Lucia-App.git synced 2024-12-21 15:22:21 +00:00

Initial commit

This commit is contained in:
errhammr 2021-04-13 19:31:05 +02:00
commit e51feceaa4
No known key found for this signature in database
GPG key ID: 9B1AA694388E0B28
50 changed files with 1794 additions and 0 deletions

87
.gitignore vendored Normal file
View file

@ -0,0 +1,87 @@
# Built application files
*.apk
*.aar
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# Keystore files
*.jks
*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# Version control
vcs.xml
# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
# Android Profiling
*.hprof

3
.idea/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

1
.idea/.name Normal file
View file

@ -0,0 +1 @@
Lucia

6
.idea/compiler.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
</component>
</project>

25
.idea/jarRepositories.xml Normal file
View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>

9
.idea/misc.xml Normal file
View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

101
LICENSE_DE.txt Normal file
View file

@ -0,0 +1,101 @@
OPEN-SOURCE-LIZENZ FÜR DIE EUROPÄISCHE UNION v. 1.2
EUPL © Europäische Union 2007, 2016
Diese Open-Source-Lizenz für die Europäische Union („EUPL“) gilt für Werke (im Sinne der nachfolgenden Begriffsbestimmung), die unter EUPL-Bedingungen zur Verfügung gestellt werden. Das Werk darf nur in der durch diese Lizenz gestatteten Form genutzt werden (insoweit eine solche Nutzung dem Urheber vorbehalten ist).
Das Werk wird unter den Bedingungen dieser Lizenz zur Verfügung gestellt, wenn der Lizenzgeber (im Sinne der nachfolgenden Begriffsbestimmung) den folgenden Hinweis unmittelbar hinter dem Urheberrechtshinweis dieses Werks anbringt:
Lizenziert unter der EUPL
oder in einer anderen Form zum Ausdruck bringt, dass er es unter der EUPL lizenzieren möchte.
1.Begriffsbestimmungen
Für diese Lizenz gelten folgende Begriffsbestimmungen:
— „Lizenz“:diese Lizenz.
— „Originalwerk“:das Werk oder die Software, die vom Lizenzgeber unter dieser Lizenz verbreitet oder zugänglich gemacht wird, und zwar als Quellcode und gegebenenfalls auch als ausführbarer Code.
— „Bearbeitungen“:die Werke oder Software, die der Lizenznehmer auf der Grundlage des Originalwerks oder seiner Bearbeitungen schaffen kann. In dieser Lizenz wird nicht festgelegt, wie umfangreich die Änderung oder wie stark die Abhängigkeit vom Originalwerk für eine Einstufung als Bearbeitung sein muss; dies bestimmt sich nach dem Urheberrecht, das in dem unter Artikel 15 aufgeführten Land anwendbar ist.
— „Werk“:das Originalwerk oder seine Bearbeitungen.
— „Quellcode“:diejenige Form des Werkes, die zur Auffassung durch den Menschen bestimmt ist und die am besten geeignet ist, um vom Menschen verstanden und verändert zu werden.
— „Ausführbarer Code“:die — üblicherweise — kompilierte Form des Werks, die von einem Computer als Programm ausgeführt werden soll.
— „Lizenzgeber“:die natürliche oder juristische Person, die das Werk unter der Lizenz verbreitet oder zugänglich macht.
— „Bearbeiter“:jede natürliche oder juristische Person, die das Werk unter der Lizenz verändert oder auf andere Weise zur Schaffung einer Bearbeitung beiträgt.
— „Lizenznehmer“ („Sie“):jede natürliche oder juristische Person, die das Werk unter den Lizenzbedingungen nutzt.
— „Verbreitung“ oder „Zugänglichmachung“:alle Formen von Verkauf, Überlassung, Verleih, Vermietung, Verbreitung, Weitergabe, Übermittlung oder anderweitiger Online- oder Offline-Bereitstellung von Vervielfältigungen des Werks oder Zugänglichmachung seiner wesentlichen Funktionen für dritte natürliche oder juristische Personen.
2.Umfang der Lizenzrechte
Der Lizenzgeber erteilt Ihnen hiermit für die Gültigkeitsdauer der am Originalwerk bestehenden Urheberrechte eine weltweite, unentgeltliche, nicht ausschließliche, unterlizenzierbare Lizenz, die Sie berechtigt:
— das Werk uneingeschränkt zu nutzen,
— das Werk zu vervielfältigen,
— das Werk zu verändern und Bearbeitungen auf der Grundlage des Werks zu schaffen,
— das Werk öffentlich zugänglich zu machen, was das Recht einschließt, das Werk oder Vervielfältigungsstücke davon öffentlich bereitzustellen oder wahrnehmbar zu machen oder das Werk, soweit möglich, öffentlich aufzuführen,
— das Werk oder Vervielfältigungen davon zu verbreiten,
— das Werk oder Vervielfältigungen davon zu vermieten oder zu verleihen,
— das Werk oder Vervielfältigungen davon weiter zu lizenzieren.
Für die Wahrnehmung dieser Rechte können beliebige, derzeit bekannte oder künftige Medien, Träger und Formate verwendet werden, soweit das geltende Recht dem nicht entgegensteht. Für die Länder, in denen Urheberpersönlichkeitsrechte an dem Werk bestehen, verzichtet der Lizenzgeber im gesetzlich zulässigen Umfang auf seine Urheberpersönlichkeitsrechte, um die Lizenzierung der oben aufgeführten Verwertungsrechte wirksam durchführen zu können. Der Lizenzgeber erteilt dem Lizenznehmer ein nicht ausschließliches, unentgeltliches Nutzungsrecht an seinen Patenten, sofern dies zur Ausübung der durch die Lizenz erteilten Nutzungsrechte am Werk notwendig ist.
3.Zugänglichmachung des Quellcodes
Der Lizenzgeber kann das Werk entweder als Quellcode oder als ausführbaren Code zur Verfügung stellen. Stellt er es als ausführbaren Code zur Verfügung, so stellt er darüber hinaus eine maschinenlesbare Kopie des Quellcodes für jedes von ihm verbreitete Vervielfältigungsstück des Werks zur Verfügung, oder er verweist in einem Vermerk im Anschluss an den dem Werk beigefügten Urheberrechtshinweis auf einen Speicherort, an dem problemlos und unentgeltlich auf den Quellcode zugegriffen werden kann, solange der Lizenzgeber das Werk verbreitet oder zugänglich macht.
4.Einschränkungen des Urheberrechts
Es ist nicht Zweck dieser Lizenz, Ausnahmen oder Schranken der ausschließlichen Rechte des Urhebers am Werk, die dem Lizenznehmer zugutekommen, einzuschränken. Auch die Erschöpfung dieser Rechte bleibt von dieser Lizenz unberührt.
5.Pflichten des Lizenznehmers
Die Einräumung der oben genannten Rechte ist an mehrere Beschränkungen und Pflichten für den Lizenznehmer gebunden:
Urheberrechtshinweis, Lizenztext, Nennung des Bearbeiters: Der Lizenznehmer muss alle Urheberrechts-, Patent- oder Markenrechtshinweise und alle Hinweise auf die Lizenz und den Haftungsausschluss unverändert lassen. Jedem von ihm verbreiteten oder zugänglich gemachten Vervielfältigungsstück des Werks muss der Lizenznehmer diese Hinweise sowie diese Lizenz beifügen. Der Lizenznehmer muss auf jedem abgeleiteten Werk deutlich darauf hinweisen, dass das Werk geändert wurde, und das Datum der Bearbeitung angeben.
„Copyleft“-Klausel: Der Lizenznehmer darf Vervielfältigungen des Originalwerks oder Bearbeitungen nur unter den Bedingungen dieser EUPL oder einer neueren Version dieser Lizenz verbreiten oder zugänglich machen, außer wenn das Originalwerk ausdrücklich nur unter dieser Lizenzversion — z. B. mit der Angabe „Nur EUPL V. 1.2“ — verbreitet werden darf. Der Lizenznehmer (der zum Lizenzgeber wird) darf für das Werk oder die Bearbeitung keine zusätzlichen Bedingungen anbieten oder vorschreiben, die die Bedingungen dieser Lizenz verändern oder einschränken.
Kompatibilitäts-Klausel: Wenn der Lizenznehmer Bearbeitungen, die auf dem Werk und einem anderen Werk, das unter einer kompatiblen Lizenz lizenziert wurde, basieren, oder die Kopien dieser Bearbeitungen verbreitet oder zugänglich macht, kann dies unter den Bedingungen dieser kompatiblen Lizenz erfolgen. Unter „kompatibler Lizenz“ ist eine im Anhang dieser Lizenz angeführte Lizenz zu verstehen. Sollten die Verpflichtungen des Lizenznehmers aus der kompatiblen Lizenz mit denjenigen aus der vorliegenden Lizenz (EUPL) in Konflikt stehen, werden die Verpflichtungen aus der kompatiblen Lizenz Vorrang haben.
Bereitstellung des Quellcodes: Wenn der Lizenznehmer Vervielfältigungsstücke des Werks verbreitet oder zugänglich macht, muss er eine maschinenlesbare Fassung des Quellcodes mitliefern oder einen Speicherort angeben, über den problemlos und unentgeltlich so lange auf diesen Quellcode zugegriffen werden kann, wie der Lizenznehmer das Werk verbreitet oder zugänglich macht.
Rechtsschutz: Diese Lizenz erlaubt nicht die Benutzung von Kennzeichen, Marken oder geschützten Namensrechten des Lizenzgebers, soweit dies nicht für die angemessene und übliche Beschreibung der Herkunft des Werks und der inhaltlichen Wiedergabe des Urheberrechtshinweises erforderlich ist.
6.Urheber und Bearbeiter
Der ursprüngliche Lizenzgeber gewährleistet, dass er das Urheberrecht am Originalwerk innehat oder dieses an ihn lizenziert wurde und dass er befugt ist, diese Lizenz zu erteilen.
Jeder Bearbeiter gewährleistet, dass er das Urheberrecht an den von ihm vorgenommenen Änderungen des Werks besitzt und befugt ist, diese Lizenz zu erteilen.
Jedes Mal, wenn Sie die Lizenz annehmen, erteilen Ihnen der ursprüngliche Lizenzgeber und alle folgenden Bearbeiter eine Befugnis zur Nutzung ihrer Beiträge zum Werk unter den Bedingungen dieser Lizenz.
7.Gewährleistungsausschluss
Die Arbeit an diesem Werk wird laufend fortgeführt; es wird durch unzählige Bearbeiter ständig verbessert. Das Werk ist nicht vollendet und kann daher Fehler („bugs“) enthalten, die dieser Art der Entwicklung inhärent sind.
Aus den genannten Gründen wird das Werk unter dieser Lizenz „so, wie es ist“ ohne jegliche Gewährleistung zur Verfügung gestellt. Dies gilt unter anderem — aber nicht ausschließlich — für Marktreife, Verwendbarkeit für einen bestimmten Zweck, Mängelfreiheit, Richtigkeit sowie Nichtverletzung von anderen Immaterialgüterrechten als dem Urheberrecht (vgl. dazu Artikel 6 dieser Lizenz).
Dieser Gewährleistungsausschluss ist wesentlicher Bestandteil der Lizenz und Bedingung für die Einräumung von Rechten an dem Werk.
8.Haftungsausschluss/Haftungsbeschränkung
Außer in Fällen von Vorsatz oder der Verursachung von Personenschäden haftet der Lizenzgeber nicht für direkte oder indirekte, materielle oder immaterielle Schäden irgendwelcher Art, die aus der Lizenz oder der Benutzung des Werks folgen; dies gilt unter anderem, aber nicht ausschließlich, für Firmenwertverluste, Produktionsausfall, Computerausfall oder Computerfehler, Datenverlust oder wirtschaftliche Schäden, und zwar auch dann, wenn der Lizenzgeber auf die Möglichkeit solcher Schäden hingewiesen wurde. Unabhängig davon haftet der Lizenzgeber im Rahmen der gesetzlichen Produkthaftung, soweit die entsprechenden Regelungen auf das Werk anwendbar sind.
9.Zusatzvereinbarungen
Wenn Sie das Werk verbreiten, können Sie Zusatzvereinbarungen schließen, in denen Verpflichtungen oder Dienstleistungen festgelegt werden, die mit dieser Lizenz vereinbar sind. Sie dürfen Verpflichtungen indessen nur in Ihrem eigenen Namen und auf Ihre eigene Verantwortung eingehen, nicht jedoch im Namen des ursprünglichen Lizenzgebers oder eines anderen Bearbeiters, und nur, wenn Sie sich gegenüber allen Bearbeitern verpflichten, sie zu entschädigen, zu verteidigen und von der Haftung freizustellen, falls aufgrund der von Ihnen eingegangenen Gewährleistungsverpflichtung oder Haftungsübernahme Forderungen gegen sie geltend gemacht werden oder eine Haftungsverpflichtung entsteht.
10.Annahme der Lizenz
Sie können den Bestimmungen dieser Lizenz zustimmen, indem Sie das Symbol „Lizenz annehmen“ unter dem Fenster mit dem Lizenztext anklicken oder indem Sie Ihre Zustimmung auf vergleichbare Weise in einer nach anwendbarem Recht zulässigen Form geben. Das Anklicken des Symbols gilt als Anzeichen Ihrer eindeutigen und unwiderruflichen Annahme der Lizenz und der darin enthaltenen Klauseln und Bedingungen. In gleicher Weise gilt als Zeichen der eindeutigen und unwiderruflichen Zustimmung die Ausübung eines Rechtes, das in Artikel 2 dieser Lizenz angeführt ist, wie das Erstellen einer Bearbeitung oder die Verbreitung oder Zugänglichmachung des Werks oder dessen Vervielfältigungen.
11.Informationspflichten
Wenn Sie das Werk verbreiten oder zugänglich machen (beispielsweise, indem Sie es zum Herunterladen von einer Website anbieten), müssen Sie über den Vertriebskanal oder das benutzte Verbreitungsmedium der Öffentlichkeit zumindest jene Informationen bereitstellen, die nach dem anwendbaren Recht bezüglich der Lizenzgeber, der Lizenz und ihrer Zugänglichkeit, des Abschlusses des Lizenzvertrags sowie darüber, wie die Lizenz durch den Lizenznehmer gespeichert und vervielfältigt werden kann, erforderlich sind.
12.Beendigung der Lizenz
Die Lizenz und die damit eingeräumten Rechte erlöschen automatisch, wenn der Lizenznehmer gegen die Lizenzbedingungen verstößt. Ein solches Erlöschen der Lizenz führt nicht zum Erlöschen der Lizenzen von Personen, denen das Werk vom Lizenznehmer unter dieser Lizenz zur Verfügung gestellt worden ist, solange diese Personen die Lizenzbedingungen erfüllen.
13.Sonstiges
Unbeschadet des Artikels 9 stellt die Lizenz die vollständige Vereinbarung der Parteien über das Werk dar. Sind einzelne Bestimmungen der Lizenz nach geltendem Recht nichtig oder unwirksam, so berührt dies nicht die Wirksamkeit oder Durchsetzbarkeit der Lizenz an sich. Solche Bestimmungen werden vielmehr so ausgelegt oder modifiziert, dass sie wirksam und durchsetzbar sind. Die Europäische Kommission kann weitere Sprachfassungen oder neue Versionen dieser Lizenz oder aktualisierte Fassungen des Anhangs veröffentlichen, soweit dies notwendig und angemessen ist, ohne den Umfang der Lizenzrechte zu verringern. Neue Versionen werden mit einer eindeutigen Versionsnummer veröffentlicht. Alle von der Europäischen Kommission anerkannten Sprachfassungen dieser Lizenz sind gleichwertig. Die Parteien können sich auf die Sprachfassung ihrer Wahl berufen.
14.Gerichtsstand
Unbeschadet besonderer Vereinbarungen zwischen den Parteien gilt Folgendes:
— Für alle Streitigkeiten über die Auslegung dieser Lizenz zwischen den Organen, Einrichtungen und sonstigen Stellen der Europäischen Union als Lizenzgeber und einem Lizenznehmer ist der Gerichtshof der Europäischen Union gemäß Artikel 272 des Vertrags über die Arbeitsweise der Europäischen Union zuständig;
— Gerichtsstand für Streitigkeiten zwischen anderen Parteien über die Auslegung dieser Lizenz ist allein der Ort, an dem der Lizenzgeber seinen Wohnsitz oder den wirtschaftlichen Mittelpunkt seiner Tätigkeit hat.
15.Anwendbares Recht
Unbeschadet besonderer Vereinbarungen zwischen den Parteien gilt Folgendes:
— Diese Lizenz unterliegt dem Recht des Mitgliedstaats der Europäischen Union, in dem der Lizenzgeber seinen Sitz, Wohnsitz oder eingetragenen Sitz hat;
— diese Lizenz unterliegt dem belgischen Recht, wenn der Lizenzgeber keinen Sitz, Wohnsitz oder eingetragenen Sitz in einem Mitgliedstaat der Europäischen Union hat.
Anlage
„Kompatible Lizenzen“ nach Artikel 5 der EUPL sind:
— GNU General Public License (GPL) v. 2, v. 3
— GNU Affero General Public License (AGPL) v. 3
— Open Software License (OSL) v. 2.1, v. 3.0
— Eclipse Public License (EPL) v. 1.0
— CeCILL v. 2.0, v. 2.1
— Mozilla Public Licence (MPL) v. 2
— GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
— Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) für andere Werke als Software
— European Union Public Licence (EUPL) v. 1.1, v. 1.2
— Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) oder Strong Reciprocity (LiLiQ-R+)
Die Europäische Kommission kann diesen Anhang aktualisieren, um neuere Fassungen der obigen Lizenzen aufzunehmen, ohne hierfür eine neue Fassung der EUPL auszuarbeiten, solange diese Lizenzen die in Artikel 2 gewährten Rechte gewährleisten und den erfassten Quellcode vor ausschließlicher Aneignung schützen.
Alle sonstigen Änderungen oder Ergänzungen dieses Anhangs bedürfen der Ausarbeitung einer neuen Version der EUPL.

287
LICENSE_EN.txt Normal file
View file

@ -0,0 +1,287 @@
EUROPEAN UNION PUBLIC LICENCE v. 1.2
EUPL © the European Union 2007, 2016
This European Union Public Licence (the EUPL) applies to the Work (as defined
below) which is provided under the terms of this Licence. Any use of the Work,
other than as authorised under this Licence is prohibited (to the extent such
use is covered by a right of the copyright holder of the Work).
The Work is provided under the terms of this Licence when the Licensor (as
defined below) has placed the following notice immediately following the
copyright notice for the Work:
Licensed under the EUPL
or has expressed by any other means his willingness to license under the EUPL.
1. Definitions
In this Licence, the following terms have the following meaning:
- The Licence: this Licence.
- The Original Work: the work or software distributed or communicated by the
Licensor under this Licence, available as Source Code and also as Executable
Code as the case may be.
- Derivative Works: the works or software that could be created by the
Licensee, based upon the Original Work or modifications thereof. This Licence
does not define the extent of modification or dependence on the Original Work
required in order to classify a work as a Derivative Work; this extent is
determined by copyright law applicable in the country mentioned in Article 15.
- The Work: the Original Work or its Derivative Works.
- The Source Code: the human-readable form of the Work which is the most
convenient for people to study and modify.
- The Executable Code: any code which has generally been compiled and which is
meant to be interpreted by a computer as a program.
- The Licensor: the natural or legal person that distributes or communicates
the Work under the Licence.
- Contributor(s): any natural or legal person who modifies the Work under the
Licence, or otherwise contributes to the creation of a Derivative Work.
- The Licensee or You: any natural or legal person who makes any usage of
the Work under the terms of the Licence.
- Distribution or Communication: any act of selling, giving, lending,
renting, distributing, communicating, transmitting, or otherwise making
available, online or offline, copies of the Work or providing access to its
essential functionalities at the disposal of any other natural or legal
person.
2. Scope of the rights granted by the Licence
The Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
sublicensable licence to do the following, for the duration of copyright vested
in the Original Work:
- use the Work in any circumstance and for all usage,
- reproduce the Work,
- modify the Work, and make Derivative Works based upon the Work,
- communicate to the public, including the right to make available or display
the Work or copies thereof to the public and perform publicly, as the case may
be, the Work,
- distribute the Work or copies thereof,
- lend and rent the Work or copies thereof,
- sublicense rights in the Work or copies thereof.
Those rights can be exercised on any media, supports and formats, whether now
known or later invented, as far as the applicable law permits so.
In the countries where moral rights apply, the Licensor waives his right to
exercise his moral right to the extent allowed by law in order to make effective
the licence of the economic rights here above listed.
The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to
any patents held by the Licensor, to the extent necessary to make use of the
rights granted on the Work under this Licence.
3. Communication of the Source Code
The Licensor may provide the Work either in its Source Code form, or as
Executable Code. If the Work is provided as Executable Code, the Licensor
provides in addition a machine-readable copy of the Source Code of the Work
along with each copy of the Work that the Licensor distributes or indicates, in
a notice following the copyright notice attached to the Work, a repository where
the Source Code is easily and freely accessible for as long as the Licensor
continues to distribute or communicate the Work.
4. Limitations on copyright
Nothing in this Licence is intended to deprive the Licensee of the benefits from
any exception or limitation to the exclusive rights of the rights owners in the
Work, of the exhaustion of those rights or of other applicable limitations
thereto.
5. Obligations of the Licensee
The grant of the rights mentioned above is subject to some restrictions and
obligations imposed on the Licensee. Those obligations are the following:
Attribution right: The Licensee shall keep intact all copyright, patent or
trademarks notices and all notices that refer to the Licence and to the
disclaimer of warranties. The Licensee must include a copy of such notices and a
copy of the Licence with every copy of the Work he/she distributes or
communicates. The Licensee must cause any Derivative Work to carry prominent
notices stating that the Work has been modified and the date of modification.
Copyleft clause: If the Licensee distributes or communicates copies of the
Original Works or Derivative Works, this Distribution or Communication will be
done under the terms of this Licence or of a later version of this Licence
unless the Original Work is expressly distributed only under this version of the
Licence — for example by communicating EUPL v. 1.2 only. The Licensee
(becoming Licensor) cannot offer or impose any additional terms or conditions on
the Work or Derivative Work that alter or restrict the terms of the Licence.
Compatibility clause: If the Licensee Distributes or Communicates Derivative
Works or copies thereof based upon both the Work and another work licensed under
a Compatible Licence, this Distribution or Communication can be done under the
terms of this Compatible Licence. For the sake of this clause, Compatible
Licence refers to the licences listed in the appendix attached to this Licence.
Should the Licensee's obligations under the Compatible Licence conflict with
his/her obligations under this Licence, the obligations of the Compatible
Licence shall prevail.
Provision of Source Code: When distributing or communicating copies of the Work,
the Licensee will provide a machine-readable copy of the Source Code or indicate
a repository where this Source will be easily and freely available for as long
as the Licensee continues to distribute or communicate the Work.
Legal Protection: This Licence does not grant permission to use the trade names,
trademarks, service marks, or names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the copyright notice.
6. Chain of Authorship
The original Licensor warrants that the copyright in the Original Work granted
hereunder is owned by him/her or licensed to him/her and that he/she has the
power and authority to grant the Licence.
Each Contributor warrants that the copyright in the modifications he/she brings
to the Work are owned by him/her or licensed to him/her and that he/she has the
power and authority to grant the Licence.
Each time You accept the Licence, the original Licensor and subsequent
Contributors grant You a licence to their contributions to the Work, under the
terms of this Licence.
7. Disclaimer of Warranty
The Work is a work in progress, which is continuously improved by numerous
Contributors. It is not a finished work and may therefore contain defects or
bugs inherent to this type of development.
For the above reason, the Work is provided under the Licence on an as is basis
and without warranties of any kind concerning the Work, including without
limitation merchantability, fitness for a particular purpose, absence of defects
or errors, accuracy, non-infringement of intellectual property rights other than
copyright as stated in Article 6 of this Licence.
This disclaimer of warranty is an essential part of the Licence and a condition
for the grant of any rights to the Work.
8. Disclaimer of Liability
Except in the cases of wilful misconduct or damages directly caused to natural
persons, the Licensor will in no event be liable for any direct or indirect,
material or moral, damages of any kind, arising out of the Licence or of the use
of the Work, including without limitation, damages for loss of goodwill, work
stoppage, computer failure or malfunction, loss of data or any commercial
damage, even if the Licensor has been advised of the possibility of such damage.
However, the Licensor will be liable under statutory product liability laws as
far such laws apply to the Work.
9. Additional agreements
While distributing the Work, You may choose to conclude an additional agreement,
defining obligations or services consistent with this Licence. However, if
accepting obligations, You may act only on your own behalf and on your sole
responsibility, not on behalf of the original Licensor or any other Contributor,
and only if You agree to indemnify, defend, and hold each Contributor harmless
for any liability incurred by, or claims asserted against such Contributor by
the fact You have accepted any warranty or additional liability.
10. Acceptance of the Licence
The provisions of this Licence can be accepted by clicking on an icon I agree
placed under the bottom of a window displaying the text of this Licence or by
affirming consent in any other similar way, in accordance with the rules of
applicable law. Clicking on that icon indicates your clear and irrevocable
acceptance of this Licence and all of its terms and conditions.
Similarly, you irrevocably accept this Licence and all of its terms and
conditions by exercising any rights granted to You by Article 2 of this Licence,
such as the use of the Work, the creation by You of a Derivative Work or the
Distribution or Communication by You of the Work or copies thereof.
11. Information to the public
In case of any Distribution or Communication of the Work by means of electronic
communication by You (for example, by offering to download the Work from a
remote location) the distribution channel or media (for example, a website) must
at least provide to the public the information requested by the applicable law
regarding the Licensor, the Licence and the way it may be accessible, concluded,
stored and reproduced by the Licensee.
12. Termination of the Licence
The Licence and the rights granted hereunder will terminate automatically upon
any breach by the Licensee of the terms of the Licence.
Such a termination will not terminate the licences of any person who has
received the Work from the Licensee under the Licence, provided such persons
remain in full compliance with the Licence.
13. Miscellaneous
Without prejudice of Article 9 above, the Licence represents the complete
agreement between the Parties as to the Work.
If any provision of the Licence is invalid or unenforceable under applicable
law, this will not affect the validity or enforceability of the Licence as a
whole. Such provision will be construed or reformed so as necessary to make it
valid and enforceable.
The European Commission may publish other linguistic versions or new versions of
this Licence or updated versions of the Appendix, so far this is required and
reasonable, without reducing the scope of the rights granted by the Licence. New
versions of the Licence will be published with a unique version number.
All linguistic versions of this Licence, approved by the European Commission,
have identical value. Parties can take advantage of the linguistic version of
their choice.
14. Jurisdiction
Without prejudice to specific agreement between parties,
- any litigation resulting from the interpretation of this License, arising
between the European Union institutions, bodies, offices or agencies, as a
Licensor, and any Licensee, will be subject to the jurisdiction of the Court
of Justice of the European Union, as laid down in article 272 of the Treaty on
the Functioning of the European Union,
- any litigation arising between other parties and resulting from the
interpretation of this License, will be subject to the exclusive jurisdiction
of the competent court where the Licensor resides or conducts its primary
business.
15. Applicable Law
Without prejudice to specific agreement between parties,
- this Licence shall be governed by the law of the European Union Member State
where the Licensor has his seat, resides or has his registered office,
- this licence shall be governed by Belgian law if the Licensor has no seat,
residence or registered office inside a European Union Member State.
Appendix
Compatible Licences according to Article 5 EUPL are:
- GNU General Public License (GPL) v. 2, v. 3
- GNU Affero General Public License (AGPL) v. 3
- Open Software License (OSL) v. 2.1, v. 3.0
- Eclipse Public License (EPL) v. 1.0
- CeCILL v. 2.0, v. 2.1
- Mozilla Public Licence (MPL) v. 2
- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for
works other than software
- European Union Public Licence (EUPL) v. 1.1, v. 1.2
- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong
Reciprocity (LiLiQ-R+).
The European Commission may update this Appendix to later versions of the above
licences without producing a new version of the EUPL, as long as they provide
the rights granted in Article 2 of this Licence and protect the covered Source
Code from exclusive appropriation.
All other changes or additions to this Appendix require the production of a new
EUPL version.

68
README.md Normal file
View file

@ -0,0 +1,68 @@
# Lucia App
In Germany, the government is rolling out an app for QR code based contact
tracing. The app claims to protect user data but actually it does not, at least
at the time of writing.
The name of that app shall not be named here. It will be referred to in this
document as the "real" app.
The Lucia app is capable of generating fake QR codes that users can use to
check in at locations while not providing any personal data whatsoever.
# How it works
The "real" app has four different ways of checking in at a location:
1. Letting a staff member at the location scan a QR code from your smartphone
2. Scanning a QR code provided by the location using your smartphone
3. Letting a staff member at the location scan a QR code from a special key tag
The Lucia app can help you check in using the first option. It generates and
shows a QR code that can be scanned by a staff member at the location. This QR
code will be considered valid by the check-in system. It does not, however,
contain any personal data about you.
The "real" app puts an encrypted identifier into the QR code that tells the
system who you are. This identifier is encrypted and cannot be decrypted by the
check-in system. The check-in system will simply forward the encrypted
identifier to a server where it will be stored. Some time later (days, maybe
weeks) and only when an infected person has visited the location at the same
time as you, the encrypted identifier will be decrypted.
The Lucia app makes use of the fact that encrypted data is indistinguishable
from random data. So instead of an encrypted identifier it puts random data
into the QR code. This does not interfere with the check-in process because
the check-in system does not decrypt the identifier. So basically, the Lucia
app allows you to enter any location that you would need the "real" app for.
It does not, however, let you perform a check-out procedure. That is not a
problem because you will automatically get checked out after 24 hours. Also
you will not be warned or contacted in the case of a possible infection.
# Why though?
I've created the app mainly out of curiosity. I wanted to see if it was possible
to create fake QR codes that let you complete the check-in procedure at
locations. It turned out to be possible and so I created this app to make it
accessible to every person using an Android smartphone (Version 4.4 "Kitkat" or
newer).
# Future plans
Currently I do not plan to develop this app any further. It does what it was
made for. I expect the "real" app to advance and it is likely that the Lucia
app will stop working some time in the future if the QR code format of the
"real" app changes. I may or may not adjust the Lucia app to be compatible
with any new or other features of the "real" app.
You can, however, fork this repository and tinker with the code. Try, learn and
improve things. Feel free to create pull requests or maintain your own fork.
# License
This app and it's source code are published under the terms of the EUPL version
1.2 only. See LICENSE_EN.txt for an English version of the license.
Diese App und ihr Quellcode werden unter den Bedingungen der EUPL Version 1.2
veröffentlicht. Siehe LICENSE_DE.txt für eine deutsche Fassung der Lizenz.

1
app/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

42
app/build.gradle Normal file
View file

@ -0,0 +1,42 @@
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "digital.selfdefense.lucia"
minSdkVersion 19
targetSdkVersion 30
versionCode 100
versionName "0.1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidmads.library.qrgenearator:QRGenearator:1.0.3'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

21
app/proguard-rules.pro vendored Normal file
View file

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View file

@ -0,0 +1,26 @@
package digital.selfdefense.lucia;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("digital.selfdefense.lucia", appContext.getPackageName());
}
}

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="digital.selfdefense.lucia">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.NotLuca">
<activity android:name="digital.selfdefense.lucia.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -0,0 +1,395 @@
/*
* Copyright 2021 The Lucia Developers
*
* Licensed under the EUPL, Version 1.2 only (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package digital.selfdefense.lucia;
import android.graphics.Bitmap;
import android.graphics.Point;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.Display;
import android.view.WindowManager;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import com.google.zxing.WriterException;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.UUID;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import androidmads.library.qrgenearator.QRGContents;
import androidmads.library.qrgenearator.QRGEncoder;
public class MainActivity extends AppCompatActivity {
Handler handler = new Handler();
Runnable runnable;
final int delay = 5000; // 5000 -> every 5 seconds
long lastTimestamp = 0;
/**
* Random UUID that is only around as long as the app runs.
* It is used to generate pseudo-random data.
*/
UUID randomTemporaryUuid = UUID.randomUUID();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// create new code on startup
this.createCode();
}
@Override
protected void onResume() {
MainActivity self = this;
handler.postDelayed(runnable = new Runnable() {
public void run() {
handler.postDelayed(runnable, delay);
self.createCode();
}
}, delay);
super.onResume();
}
@Override
protected void onPause() {
super.onPause();
handler.removeCallbacks(runnable); //stop handler when activity not visible super.onPause();
}
/**
* Creates a new QR code and shows it. Only one code will be generated for
* every minute. If this method is run multiple times within the same minute
* only the first run will create a new code. Subsequent runs will silently
* return without action to save some energy.
*/
protected void createCode() {
/*
The code contains the following data:
1) version: 1 Byte, always 3
2) device type: 1 Byte, always 1 (for Android)
3) key id: 1 Byte, random value
4) unix timestamp: 4 Bytes, rounded down to latest full minute, little
endian byte order
5) random payload: 89 Bytes, random. In the "real" app, this would
contain encrypted data and a verification tag that isn't decrypted/
checked upon check-in. Before a decryption attempt this looks like
random data, so this app will fill in random data to make it look
authentic.
6) checksum: 4 Bytes, the first 4 Bytes of the SHA256 digest of fields
1 to 5 concatenated.
During the check-in procedure only fields 1, 2, 4 and 6 are checked. The
others cannot be verified at the time of check-in and are stored for
later use. Since this app only aims to let people check-in anonymously,
this is acceptable.
*/
/**
* Field 1: Code version - always 3
*/
byte[] version = new byte[] {3};
/**
* Field 2: Device type - always 1 on Android devices
*
* 0 means iOS device
* 1 means Android device
* 2 means static QR code used on key tags
*/
byte[] deviceType = new byte[] {1};
// temporary variables in preparation for field 4
long unixTimestamp = System.currentTimeMillis() / 1000L;
long unixTimestampRounded = unixTimestamp / 60;
unixTimestampRounded *= 60;
/**
* Field 4: unix timestamp - rounded to current full minute, little
* endian byte order
*/
byte[] unixTimestampRoundedLE = Arrays.copyOfRange(longToBytesLE(unixTimestampRounded), 0, 4);
/**
* Field 3: key id - 1 random Byte
*/
byte[] keyId = generateRandomBytes(1, "lucia:code:part:keyId:uuid-" + randomTemporaryUuid.toString() + ":ts-" + unixTimestampRounded);
/**
* Field 5: random payload - 89 random Bytes
*/
byte[] randomPayload = generateRandomBytes(89, "lucia:code:part:randomPayload:uuid-" + randomTemporaryUuid.toString() + ":ts-" + unixTimestampRounded);
// abort early if timestamp hasn't changed because generating the code
// multiple times within the same minute will yield the same code
if(this.lastTimestamp == unixTimestampRounded) {
return;
}
else{
this.lastTimestamp = unixTimestampRounded;
}
// concatenate fields 1 to 5 into a byte array in preparation for the
// checksum calculation
byte[] rawCodeWithoutChecksum = new byte[version.length
+ deviceType.length
+ keyId.length
+ unixTimestampRoundedLE.length
+ randomPayload.length];
System.arraycopy(
version,
0,
rawCodeWithoutChecksum,
0,
version.length);
System.arraycopy(
deviceType,
0,
rawCodeWithoutChecksum,
version.length,
deviceType.length);
System.arraycopy(
keyId,
0,
rawCodeWithoutChecksum,
version.length + deviceType.length,
keyId.length);
System.arraycopy(
unixTimestampRoundedLE,
0,
rawCodeWithoutChecksum,
version.length + deviceType.length + keyId.length,
unixTimestampRoundedLE.length);
System.arraycopy(
randomPayload,
0,
rawCodeWithoutChecksum,
version.length + deviceType.length + keyId.length + unixTimestampRoundedLE.length,
randomPayload.length);
boolean success = true;
/**
* Field 6: checksum - first 4 Bytes of the SHA256 digest of the other
* fields
*/
byte[] checksum = new byte[4];
try {
// Calculate the checksum
MessageDigest md = MessageDigest.getInstance("SHA-256");
md.update(rawCodeWithoutChecksum);
byte[] digest = md.digest();
// copy the first 4 Bytes of the checksum into the appropriate var
System.arraycopy(
digest,
0,
checksum,
0,
checksum.length);
} catch (NoSuchAlgorithmException e) {
// this catches an error that only occurs of the "SHA-256" hashing
// algorithm cannot be found. This should never happen but we will
// catch the error anyways for good measure.
e.printStackTrace();
success = false;
}
if(success) {
// append the checksum to the previously concatenated code parts
byte[] rawCode = new byte[rawCodeWithoutChecksum.length + checksum.length];
System.arraycopy(
rawCodeWithoutChecksum,
0,
rawCode,
0,
rawCodeWithoutChecksum.length);
System.arraycopy(
checksum,
0,
rawCode,
rawCodeWithoutChecksum.length,
checksum.length);
// encode the raw bytes using Z85 to make it "printable"
String code = Z85.encode(rawCode);
// generate the QR code and show it
showQrCode(code);
// log the code components and final result to logcat
Log.i(
"Lucia Code",
"{\n"
+ "version: " + bytesToHex(version) + "\n"
+ "deviceType: " + bytesToHex(deviceType) + "\n"
+ "keyId: " + bytesToHex(keyId) + "\n"
+ "timestamp: " + bytesToHex(unixTimestampRoundedLE) + "\n"
+ "randomPayload: " + bytesToHex(randomPayload) + "\n"
+ "checksum: " + bytesToHex(checksum) + "\n"
+ "code: " + code + "\n"
+ "}"
);
}
}
/**
* Returns a byte array containing pseudo random bytes of a given length.
* This function is good enough for this app but DO NOT USE THIS FUNCTION TO
* CREATE RANDOM NUMBERS FOR CRYPTOGRAPHY!
* @param len the desired length of the byte array
* @param pers a String on which the random data will be generated out of.
* If you call this function twice with the same pers value,
* the exact same sequence of pseudo random bytes will be
* generated. This is why the calling function above includes
* a random UUID and the current timestamp into the pers value.
* @return a byte array containing len pseudo random bytes
*/
protected byte[] generateRandomBytes(int len, String pers) {
final String hashingAlgo = "HmacSHA256";
final int hashingBytes = 32;
try {
int count = 0;
byte[] init = hmac(hashingAlgo, pers.getBytes(), intToBytesBE(count));
byte[] result = new byte[]{};
for (count = 1; count <= (len / 4) + 1; count++) {
byte[] newResult = hmac(hashingAlgo, init, intToBytesBE(count));
byte[] oldResult = result;
result = new byte[oldResult.length + newResult.length];
System.arraycopy(oldResult, 0, result, 0, oldResult.length);
System.arraycopy(newResult, 0, result, oldResult.length, newResult.length);
}
return Arrays.copyOfRange(result, 0, len);
}
catch (NoSuchAlgorithmException | InvalidKeyException e) {
// in case of emergency return all zeros
byte[] result = new byte[len];
for(int i = 0; i < len; i++){
result[i] = 0;
}
return result;
}
}
/**
* Wrapper function for generating HMACs
* @param algorithm
* @param key
* @param message
* @return
* @throws NoSuchAlgorithmException
* @throws InvalidKeyException
*/
public static byte[] hmac(String algorithm, byte[] key, byte[] message) throws NoSuchAlgorithmException, InvalidKeyException {
Mac mac = Mac.getInstance(algorithm);
mac.init(new SecretKeySpec(key, algorithm));
return mac.doFinal(message);
}
/**
* Converts an int to a byte array containing 4 Bytes in big endian order
* @param data
* @return
*/
private static byte[] intToBytesBE(final int data) {
return new byte[] {
(byte)((data >> 24) & 0xff),
(byte)((data >> 16) & 0xff),
(byte)((data >> 8) & 0xff),
(byte)((data >> 0) & 0xff),
};
}
/**
* Converts a long to a byte array containing 8 Bytes in little endian order
* @param data
* @return
*/
private static byte[] longToBytesLE(final long data) {
return new byte[] {
(byte)((data >> 0) & 0xff),
(byte)((data >> 8) & 0xff),
(byte)((data >> 16) & 0xff),
(byte)((data >> 24) & 0xff),
(byte)((data >> 32) & 0xff),
(byte)((data >> 40) & 0xff),
(byte)((data >> 48) & 0xff),
(byte)((data >> 56) & 0xff),
};
}
/**
* Creates a QR code of a given String and shows it in the GUI
* @param text
*/
protected void showQrCode(String text) {
WindowManager manager = (WindowManager) getSystemService(WINDOW_SERVICE);
Display display = manager.getDefaultDisplay();
Point point = new Point();
display.getSize(point);
int width = point.x;
int height = point.y;
int smallerDimension = width < height ? width : height;
smallerDimension = smallerDimension * 3 / 4;
QRGEncoder qrgEncoder = new QRGEncoder(text, null, QRGContents.Type.TEXT, smallerDimension);
ImageView qrImage = (ImageView) findViewById(R.id.imageView2);
try {
Bitmap bitmap = qrgEncoder.encodeAsBitmap();
qrImage.setImageBitmap(bitmap);
} catch (WriterException e) {
e.printStackTrace();
}
}
/**
* The hexadecimal alphabet
*/
private static final char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray();
/**
* Converts a byte array to a hexadecimal String
* @param bytes
* @return
*/
public static String bytesToHex(byte[] bytes) {
char[] hexChars = new char[bytes.length * 2];
for (int j = 0; j < bytes.length; j++) {
int v = bytes[j] & 0xFF;
hexChars[j * 2] = HEX_ARRAY[v >>> 4];
hexChars[j * 2 + 1] = HEX_ARRAY[v & 0x0F];
}
return new String(hexChars);
}
}

View file

@ -0,0 +1,205 @@
package digital.selfdefense.lucia;
/*
* Copyright (c) 2015, Bubelich Mykola (bubelich.com)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
import java.nio.ByteBuffer;
import java.util.Arrays;
public final class Z85 {
private final static char[] _ALPHA = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#".toCharArray();
private final static int[] _RALPHA = {
68, 0, 84, 83, 82, 72, 0, 75, 76, 70, 65, 0, 63, 62,
69, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 64, 0, 73, 66, 74, 71,
81, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
77, 0, 78, 67, 0, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 79, 0, 80};
private final static int _RALSHIFT = 33;
public static String encode(byte[] input) throws RuntimeException {
if (input == null || input.length == 0) {
throw new IllegalArgumentException("Input is wrong");
}
int length = input.length;
int index = 0;
byte[] buff = new byte[4];
StringBuilder sb = new StringBuilder((input.length * 5 / 4) + 1);
while (length >= 4) {
buff[3] = input[index++];
buff[2] = input[index++];
buff[1] = input[index++];
buff[0] = input[index++];
sb.append(encodeQuarter(buff));
length -= 4;
}
if (length > 0) {
buff = new byte[length];
for (int i = length - 1; i >= 0; i--) {
buff[i] = input[index++];
}
sb.append(encodePadding(buff));
}
return sb.toString();
}
public static byte[] decode(String input) throws RuntimeException {
if (input == null || input.length() == 0) {
throw new IllegalArgumentException("Input is wrong");
}
int length = input.length();
int index = 0;
char[] buff = new char[5];
ByteBuffer bytebuff = ByteBuffer.allocate((length * 4 / 5));
while (length >= 5) {
buff[0] = input.charAt(index++);
buff[1] = input.charAt(index++);
buff[2] = input.charAt(index++);
buff[3] = input.charAt(index++);
buff[4] = input.charAt(index++);
bytebuff.put(decodeQuarter(buff));
length -= 5;
}
if (length > 0) {
char[] padding = new char[length];
for (int i = 0; i < length; i++) {
padding[i] = input.charAt(index++);
}
bytebuff.put(decodePadding(padding));
}
bytebuff.flip();
if (bytebuff.limit() == 0) {
throw new RuntimeException("Output is empty");
}
return Arrays.copyOf(bytebuff.array(), bytebuff.limit());
}
private static char[] encodeQuarter(byte[] data) {
long value = (data[0] & 0x00000000000000FFL) |
((data[1] & 0x00000000000000FFL) << 8) |
((data[2] & 0x00000000000000FFL) << 16) |
((data[3] & 0x00000000000000FFL) << 24);
char[] out = new char[5];
out[0] = _ALPHA[(int) ((value / 0x31C84B1L) % 85)];
out[1] = _ALPHA[(int) ((value / 0x95EEDL) % 85)];
out[2] = _ALPHA[(int) ((value / 0x1C39L) % 85)];
out[3] = _ALPHA[(int) ((value / 0x55L) % 85)];
out[4] = _ALPHA[(int) ((value) % 85)];
return out;
}
/**
* Encode padding scheme
*
* @param data byte[] Array of length = 4 of data
* @return char[] Encoded padding
*/
private static char[] encodePadding(byte[] data) {
long value = 0;
int length = (data.length * 5 / 4) + 1;
char[] out = new char[length];
switch (data.length) {
case 3:
value |= (data[2] & 0x00000000000000FFL) << 16;
case 2:
value |= (data[1] & 0x00000000000000FFL) << 8;
}
value |= (data[0] & 0x00000000000000FFL);
switch (data.length) {
case 3:
out[3] = _ALPHA[(int) ((value / 0x95EEDL) % 85)];
case 2:
out[2] = _ALPHA[(int) ((value / 0x1C39L) % 85)];
}
out[1] = _ALPHA[(int) ((value / 0x55L) % 85)];
out[0] = _ALPHA[(int) ((value) % 85)];
return out;
}
private static byte[] decodeQuarter(char[] data) {
long value = 0;
value += _RALPHA[data[0] - _RALSHIFT] * 0x31C84B1L;
value += _RALPHA[data[1] - _RALSHIFT] * 0x95EEDL;
value += _RALPHA[data[2] - _RALSHIFT] * 0x1C39L;
value += _RALPHA[data[3] - _RALSHIFT] * 0x55L;
value += _RALPHA[data[4] - _RALSHIFT];
return new byte[]{
(byte) (value >>> 24),
(byte) (value >>> 16),
(byte) (value >>> 8),
(byte) (value)
};
}
private static byte[] decodePadding(char[] data) {
long value = 0;
int length = data.length * 4 / 5;
switch (data.length) {
case 4:
value += _RALPHA[data[3] - _RALSHIFT] * 0x95EEDL;
case 3:
value += _RALPHA[data[2] - _RALSHIFT] * 0x1C39L;
case 2:
value += _RALPHA[data[1] - _RALSHIFT] * 0x55L;
}
value += _RALPHA[data[0] - _RALSHIFT];
byte[] buff = new byte[length];
for (int i = length - 1; i >= 0; i--) {
buff[length - i - 1] = (byte) (value >>> 8 * i);
}
return buff;
}
}

View file

@ -0,0 +1,39 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="2.1259842"
android:scaleY="2.1259842">
<path
android:pathData="M-0,0h50.8v50.8h-50.8z"
android:strokeWidth="2.64583325"
android:fillColor="#000000"
android:strokeColor="#00000000"/>
<path
android:pathData="m13.7487,30.154v-10.3011c0,-0.3175 -0.1587,-0.3351 -0.3704,-0.2117l-1.4817,0.829c-0.1235,0.0705 -0.1235,0.1058 -0.1235,0.2646 0,0.1411 0,0.194 0.1411,0.2117 0.5292,0.0705 0.5821,0 0.5821,0.829v8.3785c0,0.1411 -0.0176,0.194 -0.194,0.194h-0.5292c-0.1764,0 -0.194,0.0529 -0.194,0.194v0.4057c0,0.1411 0.0176,0.194 0.194,0.194 0.3351,0 0.9349,-0.0176 1.3758,-0.0176l1.5346,0.0176c0.1764,0 0.194,-0.0529 0.194,-0.194v-0.4057c0,-0.1411 -0.0176,-0.194 -0.194,-0.194h-0.7408c-0.1764,0 -0.194,-0.0529 -0.194,-0.194z"
android:strokeWidth="0.26458332"
android:fillColor="#ffffe2"
android:strokeColor="#00000000"/>
<path
android:pathData="m17.6122,31.2299c0.9349,0 2.0108,-0.6526 2.734,-1.3406 0,0 0.0176,0.6703 0,1.1465 -0.0176,0.2293 0.1587,0.2117 0.3175,0.1235 0.7937,-0.441 0.9878,-0.5644 1.4111,-0.7585 0.1058,-0.0529 0.0882,-0.1058 0.0882,-0.2293 0,-0.1764 -0.0176,-0.2117 -0.1411,-0.2117h-0.3175c-0.0882,0 -0.1587,-0.0176 -0.1587,-0.1235 0,-3.5454 0.0176,-4.4274 0.0176,-5.3622 0,-0.1764 -0.0529,-0.2646 -0.2999,-0.1411l-1.7463,0.9172c-0.1058,0.0529 -0.1235,0.0882 -0.1235,0.2469 0,0.1411 0,0.2117 0.1587,0.2293 0.6879,0.0882 0.8114,-0.0176 0.8114,0.4939l-0.0176,3.1397c-0.3881,0.4586 -1.0407,0.8114 -1.6933,0.8114 -0.635,0 -1.3406,-0.194 -1.3758,-1.3406 -0.0529,-1.4993 -0.0176,-2.7693 -0.0176,-4.3392 0,-0.2293 -0.0882,-0.2822 -0.3351,-0.1587l-1.4817,0.829c-0.1058,0.0529 -0.1235,0.0882 -0.1235,0.247 0,0.1587 0.0176,0.2117 0.1587,0.2293 0.4586,0.0353 0.5821,0.0882 0.5821,0.5115 0,0.9525 0.0176,1.711 0.0176,2.6811 0,1.3229 0.5468,2.3989 1.5346,2.3989z"
android:strokeWidth="0.26458332"
android:fillColor="#ffffe2"
android:strokeColor="#00000000"/>
<path
android:pathData="m25.9835,25.1269c1.1465,0 1.2876,0.9172 1.8344,0.9172 0.3528,0 0.5468,-0.2646 0.5468,-0.5468 0,-0.2293 -0.1235,-0.441 -0.3528,-0.6174 -0.4057,-0.3175 -0.9172,-0.4586 -1.6933,-0.4586 -1.9932,0 -3.3338,1.7639 -3.3338,3.6336 0,1.7639 1.1642,3.175 3.0868,3.175 1.1113,0 1.905,-0.5644 2.2578,-1.1818 0.0882,-0.1587 0.0353,-0.2822 -0.0529,-0.3175 -0.0882,-0.0353 -0.1411,-0.0176 -0.2999,0.1058 -0.3175,0.2469 -0.7585,0.4057 -1.1465,0.4057 -1.5346,0 -2.6988,-0.9701 -2.6988,-2.6105 0,-1.1642 0.3351,-2.5047 1.8521,-2.5047z"
android:strokeWidth="0.26458332"
android:fillColor="#ffffe2"
android:strokeColor="#00000000"/>
<path
android:pathData="m31.7277,21.2992c0.3175,0 0.6526,-0.2469 0.6526,-0.6703 0,-0.3881 -0.3351,-0.6703 -0.635,-0.6703 -0.3704,0 -0.6703,0.3528 -0.6703,0.6703 0,0.4233 0.3528,0.6703 0.6526,0.6703zM31.9746,30.348h-0.5821c-0.1764,0 -0.194,-0.0529 -0.194,-0.194 0,0 0,-4.4097 0.0176,-5.6621 0,-0.2117 -0.0706,-0.2822 -0.2999,-0.1587l-1.4817,0.8114c-0.1235,0.0706 -0.1235,0.1058 -0.1235,0.247 0,0.1587 0.0353,0.2117 0.1411,0.2293 0.4586,0.0706 0.5115,0.0882 0.5115,0.635v3.8982c0,0.1411 -0.0176,0.194 -0.194,0.194h-0.4762c-0.1764,0 -0.194,0.0529 -0.194,0.194v0.4057c0,0.1411 0.0176,0.194 0.194,0.194 0.3351,0 0.829,-0.0176 1.27,-0.0176 0.441,0 1.076,0.0176 1.4111,0.0176 0.1764,0 0.194,-0.0529 0.194,-0.194v-0.4057c0,-0.1411 -0.0176,-0.194 -0.194,-0.194z"
android:strokeWidth="0.26458332"
android:fillColor="#ffffe2"
android:strokeColor="#00000000"/>
<path
android:pathData="m36.4345,30.0305c0.1058,0.635 0.4762,1.1994 1.0407,1.1994 0.8819,0 1.4288,-0.635 1.6933,-1.0583 0.0882,-0.1587 0.0529,-0.2646 -0.0176,-0.2999 -0.0882,-0.0529 -0.194,-0.0176 -0.2999,0.0706 -0.1764,0.1587 -0.3528,0.3175 -0.6174,0.3175 -0.3528,0 -0.5468,-0.2822 -0.5468,-0.7232v-2.8575c0,-1.3758 -0.4233,-2.2754 -1.7286,-2.2754 -0.7585,0 -2.0461,0.6526 -2.4694,1.3405 -0.0882,0.1411 -0.0529,0.247 0.0353,0.2999 0.1058,0.0529 0.194,0.0176 0.3175,-0.0882 0.5468,-0.4586 1.1289,-0.6526 1.464,-0.6526 0.5997,0 1.1465,0.3528 1.1465,1.3406v0.9525c-1.0407,0.2469 -1.8697,0.5292 -2.2754,0.7232 -0.7232,0.3351 -1.2524,0.8114 -1.2524,1.6933 0,0.6526 0.5997,1.2171 1.1642,1.2171 0.6703,0 1.7992,-0.7937 2.346,-1.1994zM34.9352,30.2598c-0.441,0 -0.7408,-0.3704 -0.7408,-0.7585 0,-0.3528 0.1764,-0.6703 0.5644,-0.8996 0.3881,-0.2293 1.1818,-0.4939 1.6933,-0.5997v1.5699c-0.4057,0.3175 -1.076,0.6879 -1.5169,0.6879z"
android:strokeWidth="0.26458332"
android:fillColor="#ffffe2"
android:strokeColor="#00000000"/>
</group>
</vector>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000"
android:pathData="M0,0h108v108h-108z"/>
</vector>

View file

@ -0,0 +1,39 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="2.1259842"
android:scaleY="2.1259842">
<path
android:pathData="M-0,0h50.8v50.8h-50.8z"
android:strokeWidth="2.64583325"
android:fillColor="#000000"
android:strokeColor="#00000000"/>
<path
android:pathData="m13.7487,30.154v-10.3011c0,-0.3175 -0.1587,-0.3351 -0.3704,-0.2117l-1.4817,0.829c-0.1235,0.0705 -0.1235,0.1058 -0.1235,0.2646 0,0.1411 0,0.194 0.1411,0.2117 0.5292,0.0705 0.5821,0 0.5821,0.829v8.3785c0,0.1411 -0.0176,0.194 -0.194,0.194h-0.5292c-0.1764,0 -0.194,0.0529 -0.194,0.194v0.4057c0,0.1411 0.0176,0.194 0.194,0.194 0.3351,0 0.9349,-0.0176 1.3758,-0.0176l1.5346,0.0176c0.1764,0 0.194,-0.0529 0.194,-0.194v-0.4057c0,-0.1411 -0.0176,-0.194 -0.194,-0.194h-0.7408c-0.1764,0 -0.194,-0.0529 -0.194,-0.194z"
android:strokeWidth="0.26458332"
android:fillColor="#ffffe2"
android:strokeColor="#00000000"/>
<path
android:pathData="m17.6122,31.2299c0.9349,0 2.0108,-0.6526 2.734,-1.3406 0,0 0.0176,0.6703 0,1.1465 -0.0176,0.2293 0.1587,0.2117 0.3175,0.1235 0.7937,-0.441 0.9878,-0.5644 1.4111,-0.7585 0.1058,-0.0529 0.0882,-0.1058 0.0882,-0.2293 0,-0.1764 -0.0176,-0.2117 -0.1411,-0.2117h-0.3175c-0.0882,0 -0.1587,-0.0176 -0.1587,-0.1235 0,-3.5454 0.0176,-4.4274 0.0176,-5.3622 0,-0.1764 -0.0529,-0.2646 -0.2999,-0.1411l-1.7463,0.9172c-0.1058,0.0529 -0.1235,0.0882 -0.1235,0.2469 0,0.1411 0,0.2117 0.1587,0.2293 0.6879,0.0882 0.8114,-0.0176 0.8114,0.4939l-0.0176,3.1397c-0.3881,0.4586 -1.0407,0.8114 -1.6933,0.8114 -0.635,0 -1.3406,-0.194 -1.3758,-1.3406 -0.0529,-1.4993 -0.0176,-2.7693 -0.0176,-4.3392 0,-0.2293 -0.0882,-0.2822 -0.3351,-0.1587l-1.4817,0.829c-0.1058,0.0529 -0.1235,0.0882 -0.1235,0.247 0,0.1587 0.0176,0.2117 0.1587,0.2293 0.4586,0.0353 0.5821,0.0882 0.5821,0.5115 0,0.9525 0.0176,1.711 0.0176,2.6811 0,1.3229 0.5468,2.3989 1.5346,2.3989z"
android:strokeWidth="0.26458332"
android:fillColor="#ffffe2"
android:strokeColor="#00000000"/>
<path
android:pathData="m25.9835,25.1269c1.1465,0 1.2876,0.9172 1.8344,0.9172 0.3528,0 0.5468,-0.2646 0.5468,-0.5468 0,-0.2293 -0.1235,-0.441 -0.3528,-0.6174 -0.4057,-0.3175 -0.9172,-0.4586 -1.6933,-0.4586 -1.9932,0 -3.3338,1.7639 -3.3338,3.6336 0,1.7639 1.1642,3.175 3.0868,3.175 1.1113,0 1.905,-0.5644 2.2578,-1.1818 0.0882,-0.1587 0.0353,-0.2822 -0.0529,-0.3175 -0.0882,-0.0353 -0.1411,-0.0176 -0.2999,0.1058 -0.3175,0.2469 -0.7585,0.4057 -1.1465,0.4057 -1.5346,0 -2.6988,-0.9701 -2.6988,-2.6105 0,-1.1642 0.3351,-2.5047 1.8521,-2.5047z"
android:strokeWidth="0.26458332"
android:fillColor="#ffffe2"
android:strokeColor="#00000000"/>
<path
android:pathData="m31.7277,21.2992c0.3175,0 0.6526,-0.2469 0.6526,-0.6703 0,-0.3881 -0.3351,-0.6703 -0.635,-0.6703 -0.3704,0 -0.6703,0.3528 -0.6703,0.6703 0,0.4233 0.3528,0.6703 0.6526,0.6703zM31.9746,30.348h-0.5821c-0.1764,0 -0.194,-0.0529 -0.194,-0.194 0,0 0,-4.4097 0.0176,-5.6621 0,-0.2117 -0.0706,-0.2822 -0.2999,-0.1587l-1.4817,0.8114c-0.1235,0.0706 -0.1235,0.1058 -0.1235,0.247 0,0.1587 0.0353,0.2117 0.1411,0.2293 0.4586,0.0706 0.5115,0.0882 0.5115,0.635v3.8982c0,0.1411 -0.0176,0.194 -0.194,0.194h-0.4762c-0.1764,0 -0.194,0.0529 -0.194,0.194v0.4057c0,0.1411 0.0176,0.194 0.194,0.194 0.3351,0 0.829,-0.0176 1.27,-0.0176 0.441,0 1.076,0.0176 1.4111,0.0176 0.1764,0 0.194,-0.0529 0.194,-0.194v-0.4057c0,-0.1411 -0.0176,-0.194 -0.194,-0.194z"
android:strokeWidth="0.26458332"
android:fillColor="#ffffe2"
android:strokeColor="#00000000"/>
<path
android:pathData="m36.4345,30.0305c0.1058,0.635 0.4762,1.1994 1.0407,1.1994 0.8819,0 1.4288,-0.635 1.6933,-1.0583 0.0882,-0.1587 0.0529,-0.2646 -0.0176,-0.2999 -0.0882,-0.0529 -0.194,-0.0176 -0.2999,0.0706 -0.1764,0.1587 -0.3528,0.3175 -0.6174,0.3175 -0.3528,0 -0.5468,-0.2822 -0.5468,-0.7232v-2.8575c0,-1.3758 -0.4233,-2.2754 -1.7286,-2.2754 -0.7585,0 -2.0461,0.6526 -2.4694,1.3405 -0.0882,0.1411 -0.0529,0.247 0.0353,0.2999 0.1058,0.0529 0.194,0.0176 0.3175,-0.0882 0.5468,-0.4586 1.1289,-0.6526 1.464,-0.6526 0.5997,0 1.1465,0.3528 1.1465,1.3406v0.9525c-1.0407,0.2469 -1.8697,0.5292 -2.2754,0.7232 -0.7232,0.3351 -1.2524,0.8114 -1.2524,1.6933 0,0.6526 0.5997,1.2171 1.1642,1.2171 0.6703,0 1.7992,-0.7937 2.346,-1.1994zM34.9352,30.2598c-0.441,0 -0.7408,-0.3704 -0.7408,-0.7585 0,-0.3528 0.1764,-0.6703 0.5644,-0.8996 0.3881,-0.2293 1.1818,-0.4939 1.6933,-0.5997v1.5699c-0.4057,0.3175 -1.076,0.6879 -1.5169,0.6879z"
android:strokeWidth="0.26458332"
android:fillColor="#ffffe2"
android:strokeColor="#00000000"/>
</group>
</vector>

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/nl_bg"
tools:context=".MainActivity">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/greeting"
android:textColor="@color/nl_fg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
tools:layout_editor_absoluteY="18dp" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="64dp"
android:layout_marginTop="64dp"
android:layout_marginEnd="64dp"
android:layout_marginBottom="64dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:srcCompat="@drawable/ic_launcher_foreground" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="nl_bg">#FF000000</color>
<color name="nl_bg_alt">#FF404040</color>
<color name="nl_fg">#FFFFFFFF</color>
<color name="nl_fg_alt">#FFb0b0b0</color>
</resources>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#000000</color>
</resources>

View file

@ -0,0 +1,4 @@
<resources>
<string name="app_name">Lucia</string>
<string name="greeting">Dein anonymer QR-Code zum Einchecken:</string>
</resources>

View file

@ -0,0 +1,16 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.NotLuca" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/nl_bg</item>
<item name="colorPrimaryVariant">@color/nl_bg_alt</item>
<item name="colorOnPrimary">@color/nl_fg</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/nl_bg_alt</item>
<item name="colorSecondaryVariant">@color/nl_bg</item>
<item name="colorOnSecondary">@color/nl_fg_alt</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>

View file

@ -0,0 +1,17 @@
package digital.selfdefense.lucia;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}

24
build.gradle Normal file
View file

@ -0,0 +1,24 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.3"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

19
gradle.properties Normal file
View file

@ -0,0 +1,19 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View file

@ -0,0 +1,6 @@
#Thu Apr 08 19:46:10 CEST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

172
gradlew vendored Normal file
View file

@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

84
gradlew.bat vendored Executable file
View file

@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

2
settings.gradle Normal file
View file

@ -0,0 +1,2 @@
include ':app'
rootProject.name = "Lucia"