Repo Created

This commit is contained in:
Fr4nz D13trich 2025-11-15 17:44:12 +01:00
parent eb305e2886
commit a8c22c65db
4784 changed files with 329907 additions and 2 deletions

41
Android.mk Normal file
View file

@ -0,0 +1,41 @@
# Copyright (c) 2015 μg Project Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := GmsCore
LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := GmsCore
gmscore_root := $(LOCAL_PATH)
gmscore_dir := play-services-core
gmscore_out := $(TARGET_COMMON_OUT_ROOT)/obj/APPS/$(LOCAL_MODULE)_intermediates
gmscore_build := $(gmscore_dir)/build
gmscore_apk := $(gmscore_build)/outputs/apk/release/play-services-core-release-unsigned.apk
$(gmscore_root)/$(gmscore_apk):
rm -Rf $(gmscore_root)/$(gmscore_build)
mkdir -p $(ANDROID_BUILD_TOP)/$(gmscore_out)
ln -s $(ANDROID_BUILD_TOP)/$(gmscore_out) $(ANDROID_BUILD_TOP)/$(gmscore_root)/$(gmscore_build)
echo "sdk.dir=$(ANDROID_HOME)" > $(gmscore_root)/local.properties
cd $(gmscore_root) && git submodule update --recursive --init
cd $(gmscore_root)/$(gmscore_dir) && JAVA_TOOL_OPTIONS="$(JAVA_TOOL_OPTIONS) -Dfile.encoding=UTF8" ../gradlew assembleRelease
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(gmscore_apk)
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)

177
LICENSE Normal file
View file

@ -0,0 +1,177 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product 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 NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of 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 reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

208
LICENSES/Apache-2.0.txt Normal file
View file

@ -0,0 +1,208 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION,
AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution
as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct
or indirect, to cause the direction or management of such entity, whether
by contract or otherwise, or (ii) ownership of fifty percent (50%) or more
of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions
granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled object
code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form,
made available under the License, as indicated by a copyright notice that
is included in or attached to the work (an example is provided in the Appendix
below).
"Derivative Works" shall mean any work, whether in Source or Object form,
that is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative
Works shall not include works that remain separable from, or merely link (or
bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative
Works thereof, that is intentionally submitted to Licensor for inclusion in
the Work by the copyright owner or by an individual or Legal Entity authorized
to submit on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication
sent to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor
for the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently incorporated
within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this
License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable copyright license to reproduce, prepare
Derivative Works of, publicly display, publicly perform, sublicense, and distribute
the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License,
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section) patent
license to make, have made, use, offer to sell, sell, import, and otherwise
transfer the Work, where such license applies only to those patent claims
licensable by such Contributor that are necessarily infringed by their Contribution(s)
alone or by combination of their Contribution(s) with the Work to which such
Contribution(s) was submitted. If You institute patent litigation against
any entity (including a cross-claim or counterclaim in a lawsuit) alleging
that the Work or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses granted to You
under this License for that Work shall terminate as of the date such litigation
is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or
Derivative Works thereof in any medium, with or without modifications, and
in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy
of this License; and
(b) You must cause any modified files to carry prominent notices stating that
You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source
form of the Work, excluding those notices that do not pertain to any part
of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution,
then any Derivative Works that You distribute must include a readable copy
of the attribution notices contained within such NOTICE file, excluding those
notices that do not pertain to any part of the Derivative Works, in at least
one of the following places: within a NOTICE text file distributed as part
of the Derivative Works; within the Source form or documentation, if provided
along with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works
that You distribute, alongside or as an addendum to the NOTICE text from the
Work, provided that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction,
or distribution of Your modifications, or for any such Derivative Works as
a whole, provided Your use, reproduction, and distribution of the Work otherwise
complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any
Contribution intentionally submitted for inclusion in the Work by You to the
Licensor shall be under the terms and conditions of this License, without
any additional terms or conditions. Notwithstanding the above, nothing herein
shall supersede or modify the terms of any separate license agreement you
may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names,
trademarks, service marks, or product 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 NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to
in writing, Licensor provides the Work (and each Contributor provides its
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied, including, without limitation, any warranties
or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness
of using or redistributing the Work and assume any risks associated with Your
exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether
in tort (including negligence), contract, or otherwise, unless required by
applicable law (such as deliberate and grossly negligent acts) or agreed to
in writing, shall any Contributor be liable to You for damages, including
any direct, indirect, special, incidental, or consequential damages of any
character arising as a result of this License or out of the use or inability
to use the Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all other commercial
damages or losses), even if such Contributor has been advised of the possibility
of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work
or Derivative Works thereof, You may choose to offer, and charge a fee for,
acceptance of support, warranty, indemnity, or other liability obligations
and/or rights consistent with this License. However, in accepting such obligations,
You may act only on Your own behalf and on Your sole responsibility, not on
behalf of 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 reason of your accepting any such warranty
or additional liability. END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "[]" replaced with your own identifying
information. (Don't include the brackets!) The text should be enclosed in
the appropriate comment syntax for the file format. We also recommend that
a file or class name and description of purpose be included on the same "printed
page" as the copyright notice for easier identification within third-party
archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

324
LICENSES/CC-BY-4.0.txt Normal file
View file

@ -0,0 +1,324 @@
Creative Commons Attribution 4.0 International Creative Commons Corporation
("Creative Commons") is not a law firm and does not provide legal services
or legal advice. Distribution of Creative Commons public licenses does not
create a lawyer-client or other relationship. Creative Commons makes its licenses
and related information available on an "as-is" basis. Creative Commons gives
no warranties regarding its licenses, any material licensed under their terms
and conditions, or any related information. Creative Commons disclaims all
liability for damages resulting from their use to the fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions
that creators and other rights holders may use to share original works of
authorship and other material subject to copyright and certain other rights
specified in the public license below. The following considerations are for
informational purposes only, are not exhaustive, and do not form part of our
licenses.
Considerations for licensors: Our public licenses are intended for use by
those authorized to give the public permission to use material in ways otherwise
restricted by copyright and certain other rights. Our licenses are irrevocable.
Licensors should read and understand the terms and conditions of the license
they choose before applying it. Licensors should also secure all rights necessary
before applying our licenses so that the public can reuse the material as
expected. Licensors should clearly mark any material not subject to the license.
This includes other CC-licensed material, or material used under an exception
or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public licenses, a licensor
grants the public permission to use the licensed material under specified
terms and conditions. If the licensor's permission is not necessary for any
reasonfor example, because of any applicable exception or limitation to copyrightthen
that use is not regulated by the license. Our licenses grant only permissions
under copyright and certain other rights that a licensor has authority to
grant. Use of the licensed material may still be restricted for other reasons,
including because others have copyright or other rights in the material. A
licensor may make special requests, such as asking that all changes be marked
or described. Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations for the public
: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution
4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to
be bound by the terms and conditions of this Creative Commons Attribution
4.0 International Public License ("Public License"). To the extent this Public
License may be interpreted as a contract, You are granted the Licensed Rights
in consideration of Your acceptance of these terms and conditions, and the
Licensor grants You such rights in consideration of benefits the Licensor
receives from making the Licensed Material available under these terms and
conditions.
Section 1 Definitions.
a. Adapted Material means material subject to Copyright and Similar Rights
that is derived from or based upon the Licensed Material and in which the
Licensed Material is translated, altered, arranged, transformed, or otherwise
modified in a manner requiring permission under the Copyright and Similar
Rights held by the Licensor. For purposes of this Public License, where the
Licensed Material is a musical work, performance, or sound recording, Adapted
Material is always produced where the Licensed Material is synched in timed
relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar
Rights in Your contributions to Adapted Material in accordance with the terms
and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights closely
related to copyright including, without limitation, performance, broadcast,
sound recording, and Sui Generis Database Rights, without regard to how the
rights are labeled or categorized. For purposes of this Public License, the
rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
d. Effective Technological Measures means those measures that, in the absence
of proper authority, may not be circumvented under laws fulfilling obligations
under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996,
and/or similar international agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or any other
exception or limitation to Copyright and Similar Rights that applies to Your
use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database, or other
material to which the Licensor applied this Public License.
g. Licensed Rights means the rights granted to You subject to the terms and
conditions of this Public License, which are limited to all Copyright and
Similar Rights that apply to Your use of the Licensed Material and that the
Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights under this
Public License.
i. Share means to provide material to the public by any means or process that
requires permission under the Licensed Rights, such as reproduction, public
display, public performance, distribution, dissemination, communication, or
importation, and to make material available to the public including in ways
that members of the public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright resulting
from Directive 96/9/EC of the European Parliament and of the Council of 11
March 1996 on the legal protection of databases, as amended and/or succeeded,
as well as other essentially equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights under
this Public License. Your has a corresponding meaning.
Section 2 Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor
hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive,
irrevocable license to exercise the Licensed Rights in the Licensed Material
to:
A. reproduce and Share the Licensed Material, in whole or in part; and
B. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions
and Limitations apply to Your use, this Public License does not apply, and
You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor authorizes
You to exercise the Licensed Rights in all media and formats whether now known
or hereafter created, and to make technical modifications necessary to do
so. The Licensor waives and/or agrees not to assert any right or authority
to forbid You from making technical modifications necessary to exercise the
Licensed Rights, including technical modifications necessary to circumvent
Effective Technological Measures. For purposes of this Public License, simply
making modifications authorized by this Section 2(a)(4) never produces Adapted
Material.
5. Downstream recipients.
A. Offer from the Licensor Licensed Material. Every recipient of the Licensed
Material automatically receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this Public License.
B. No downstream restrictions. You may not offer or impose any additional
or different terms or conditions on, or apply any Effective Technological
Measures to, the Licensed Material if doing so restricts exercise of the Licensed
Rights by any recipient of the Licensed Material.
6. No endorsement. Nothing in this Public License constitutes or may be construed
as permission to assert or imply that You are, or that Your use of the Licensed
Material is, connected with, or sponsored, endorsed, or granted official status
by, the Licensor or others designated to receive attribution as provided in
Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this
Public License, nor are publicity, privacy, and/or other similar personality
rights; however, to the extent possible, the Licensor waives and/or agrees
not to assert any such rights held by the Licensor to the limited extent necessary
to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties
from You for the exercise of the Licensed Rights, whether directly or through
a collecting society under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly reserves any right
to collect such royalties.
Section 3 License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following
conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed
Material:
i. identification of the creator(s) of the Licensed Material and any others
designated to receive attribution, in any reasonable manner requested by the
Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication
of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and
include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner
based on the medium, means, and context in which You Share the Licensed Material.
For example, it may be reasonable to satisfy the conditions by providing a
URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required
by Section 3(a)(1)(A) to the extent reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's License You apply
must not prevent recipients of the Adapted Material from complying with this
Public License.
Section 4 Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to
Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract,
reuse, reproduce, and Share all or a substantial portion of the contents of
the database;
b. if You include all or a substantial portion of the database contents in
a database in which You have Sui Generis Database Rights, then the database
in which You have Sui Generis Database Rights (but not its individual contents)
is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or
a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace
Your obligations under this Public License where the Licensed Rights include
other Copyright and Similar Rights.
Section 5 Disclaimer of Warranties and Limitation of Liability.
a. Unless otherwise separately undertaken by the Licensor, to the extent possible,
the Licensor offers the Licensed Material as-is and as-available, and makes
no representations or warranties of any kind concerning the Licensed Material,
whether express, implied, statutory, or other. This includes, without limitation,
warranties of title, merchantability, fitness for a particular purpose, non-infringement,
absence of latent or other defects, accuracy, or the presence or absence of
errors, whether or not known or discoverable. Where disclaimers of warranties
are not allowed in full or in part, this disclaimer may not apply to You.
b. To the extent possible, in no event will the Licensor be liable to You
on any legal theory (including, without limitation, negligence) or otherwise
for any direct, special, indirect, incidental, consequential, punitive, exemplary,
or other losses, costs, expenses, or damages arising out of this Public License
or use of the Licensed Material, even if the Licensor has been advised of
the possibility of such losses, costs, expenses, or damages. Where a limitation
of liability is not allowed in full or in part, this limitation may not apply
to You.
c. The disclaimer of warranties and limitation of liability provided above
shall be interpreted in a manner that, to the extent possible, most closely
approximates an absolute disclaimer and waiver of all liability.
Section 6 Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights
licensed here. However, if You fail to comply with this Public License, then
Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section
6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured
within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
c. For the avoidance of doubt, this Section 6(b) does not affect any right
the Licensor may have to seek remedies for Your violations of this Public
License.
d. For the avoidance of doubt, the Licensor may also offer the Licensed Material
under separate terms or conditions or stop distributing the Licensed Material
at any time; however, doing so will not terminate this Public License.
e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or
conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed
Material not stated herein are separate from and independent of the terms
and conditions of this Public License.
Section 8 Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not
be interpreted to, reduce, limit, restrict, or impose conditions on any use
of the Licensed Material that could lawfully be made without permission under
this Public License.
b. To the extent possible, if any provision of this Public License is deemed
unenforceable, it shall be automatically reformed to the minimum extent necessary
to make it enforceable. If the provision cannot be reformed, it shall be severed
from this Public License without affecting the enforceability of the remaining
terms and conditions.
c. No term or condition of this Public License will be waived and no failure
to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation
upon, or waiver of, any privileges and immunities that apply to the Licensor
or You, including from the legal processes of any jurisdiction or authority.
Creative Commons is not a party to its public licenses. Notwithstanding, Creative
Commons may elect to apply one of its public licenses to material it publishes
and in those instances will be considered the "Licensor." The text of the
Creative Commons public licenses is dedicated to the public domain under the
CC0 Public Domain Dedication. Except for the limited purpose of indicating
that material is shared under a Creative Commons public license or as otherwise
permitted by the Creative Commons policies published at creativecommons.org/policies,
Creative Commons does not authorize the use of the trademark "Creative Commons"
or any other trademark or logo of Creative Commons without its prior written
consent including, without limitation, in connection with any unauthorized
modifications to any of its public licenses or any other arrangements, understandings,
or agreements concerning use of licensed material. For the avoidance of doubt,
this paragraph does not form part of the public licenses.
Creative Commons may be contacted at creativecommons.org.

121
LICENSES/CC0-1.0.txt Normal file
View file

@ -0,0 +1,121 @@
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.

View file

@ -1,3 +1,31 @@
# microg-gms
# microG Services
MicroG Framework
[![Build status](https://github.com/microg/GmsCore/actions/workflows/build.yml/badge.svg)](https://github.com/microg/GmsCore/actions/workflows/build.yml)
<a href=TRANSLATION.md>
<img src="https://hosted.weblate.org/widget/microg/svg-badge.svg" alt="Translation status" />
</a>
microG Services is a FLOSS (Free/Libre Open Source Software) framework to allow applications designed for Google Play Services to run on systems, where Play Services is not available.
### Please refer to the [wiki](https://github.com/microg/GmsCore/wiki) for downloads and instructions
## Translations
If you'd like to help translate microG, take a look at [TRANSLATION](TRANSLATION.md).
License
-------
Copyright 2013-2025 microG Project Team
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

11
TRANSLATION.md Normal file
View file

@ -0,0 +1,11 @@
# Translating microG
microG [can be translated using Weblate](https://hosted.weblate.org/projects/microg/#languages). Thanks Weblate for free libre hosting!
Preferably do not use pull requests to submit translations, as merge conflicts can happen easily. If you already made one or did it manually, you can try [importing](https://docs.weblate.org/en/latest/user/files.html#uploading-translations) the files manually into Weblate.
> [!TIP]
> At the moment, the [microG-UI-tools](play-services-core/microg-ui-tools) component is not available for translation using Weblate. You may want to open a pull request for this. This component stores strings for the "Self-Check" menu and a few other things.
If your language does not seem to be available for translation, you may have to add it first. If you're not logged in, you'll need to create an account and configure your known languages, once that's set up, you should be able to get working.
Thanks for your help maintaining accessibility for other users worldwide! We appreciate it.

291
artwork/ic_gamepad.svg Normal file
View file

@ -0,0 +1,291 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="299.98224"
height="299.67419"
viewBox="0 0 299.98226 299.6742"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="ic_gamepad.svg"
inkscape:export-filename="/home/marvin/Development/IDEA/microg_gradle_build_root/play-services-core/src/main/res/drawable-xxhdpi/ic_gamepad.png"
inkscape:export-xdpi="43.202557"
inkscape:export-ydpi="43.202557">
<defs
id="defs4">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Drop Shadow"
id="filter4067"
x="-0.5"
y="-0.5"
width="2"
height="2">
<feFlood
flood-opacity="1"
flood-color="rgb(0,0,0)"
result="flood"
id="feFlood4069" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="in"
result="composite1"
id="feComposite4071" />
<feGaussianBlur
in="composite"
stdDeviation="6"
result="blur"
id="feGaussianBlur4073" />
<feComponentTransfer
id="feComponentTransfer13">
<feFuncA
type="linear"
slope="0.2"
id="feFuncA15" />
</feComponentTransfer>
<feOffset
dx="0"
dy="6"
result="offset"
id="feOffset4075"
stdDeviation="8" />
<feComposite
in="SourceGraphic"
in2="offset"
operator="over"
result="composite2"
id="feComposite4077" />
</filter>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4266">
<path
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 354.99922,92.361314 c -29.48241,0 -53.85,21.058586 -58.98632,49.011716 l -0.0234,-0.004 -19.10156,108.32813 a 24.999997,24.999997 0 0 0 20.27929,28.96094 24.999997,24.999997 0 0 0 22.00977,-6.94922 l 0.01,0.008 0.19141,-0.19336 44.16406,-44.16211 102.91407,0 44.16406,44.16211 0.1914,0.19336 0.0117,-0.008 a 24.999997,24.999997 0 0 0 22.00782,6.94922 24.999997,24.999997 0 0 0 20.27929,-28.96094 l -19.09961,-108.32813 -0.004,0 -0.0195,0.004 C 528.85138,113.4199 504.48183,92.361314 474.99941,92.361314 l -119.99804,0 -0.002,0 z"
id="path4268"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4270">
<path
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 354.99922,92.361314 c -29.48241,0 -53.85,21.058586 -58.98632,49.011716 l -0.0234,-0.004 -19.10156,108.32813 a 24.999997,24.999997 0 0 0 20.27929,28.96094 24.999997,24.999997 0 0 0 22.00977,-6.94922 l 0.01,0.008 0.19141,-0.19336 44.16406,-44.16211 102.91407,0 44.16406,44.16211 0.1914,0.19336 0.0117,-0.008 a 24.999997,24.999997 0 0 0 22.00782,6.94922 24.999997,24.999997 0 0 0 20.27929,-28.96094 l -19.09961,-108.32813 -0.004,0 -0.0195,0.004 C 528.85138,113.4199 504.48183,92.361314 474.99941,92.361314 l -119.99804,0 -0.002,0 z"
id="path4272"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4274">
<path
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 354.99922,92.361314 c -29.48241,0 -53.85,21.058586 -58.98632,49.011716 l -0.0234,-0.004 -19.10156,108.32813 a 24.999997,24.999997 0 0 0 20.27929,28.96094 24.999997,24.999997 0 0 0 22.00977,-6.94922 l 0.01,0.008 0.19141,-0.19336 44.16406,-44.16211 102.91407,0 44.16406,44.16211 0.1914,0.19336 0.0117,-0.008 a 24.999997,24.999997 0 0 0 22.00782,6.94922 24.999997,24.999997 0 0 0 20.27929,-28.96094 l -19.09961,-108.32813 -0.004,0 -0.0195,0.004 C 528.85138,113.4199 504.48183,92.361314 474.99941,92.361314 l -119.99804,0 -0.002,0 z"
id="path4276"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4278">
<path
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 354.99922,92.361314 c -29.48241,0 -53.85,21.058586 -58.98632,49.011716 l -0.0234,-0.004 -19.10156,108.32813 a 24.999997,24.999997 0 0 0 20.27929,28.96094 24.999997,24.999997 0 0 0 22.00977,-6.94922 l 0.01,0.008 0.19141,-0.19336 44.16406,-44.16211 102.91407,0 44.16406,44.16211 0.1914,0.19336 0.0117,-0.008 a 24.999997,24.999997 0 0 0 22.00782,6.94922 24.999997,24.999997 0 0 0 20.27929,-28.96094 l -19.09961,-108.32813 -0.004,0 -0.0195,0.004 C 528.85138,113.4199 504.48183,92.361314 474.99941,92.361314 l -119.99804,0 -0.002,0 z"
id="path4280"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4282">
<path
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 354.99922,92.361314 c -29.48241,0 -53.85,21.058586 -58.98632,49.011716 l -0.0234,-0.004 -19.10156,108.32813 a 24.999997,24.999997 0 0 0 20.27929,28.96094 24.999997,24.999997 0 0 0 22.00977,-6.94922 l 0.01,0.008 0.19141,-0.19336 44.16406,-44.16211 102.91407,0 44.16406,44.16211 0.1914,0.19336 0.0117,-0.008 a 24.999997,24.999997 0 0 0 22.00782,6.94922 24.999997,24.999997 0 0 0 20.27929,-28.96094 l -19.09961,-108.32813 -0.004,0 -0.0195,0.004 C 528.85138,113.4199 504.48183,92.361314 474.99941,92.361314 l -119.99804,0 -0.002,0 z"
id="path4284"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4286">
<path
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 354.99922,92.361314 c -29.48241,0 -53.85,21.058586 -58.98632,49.011716 l -0.0234,-0.004 -19.10156,108.32813 a 24.999997,24.999997 0 0 0 20.27929,28.96094 24.999997,24.999997 0 0 0 22.00977,-6.94922 l 0.01,0.008 0.19141,-0.19336 44.16406,-44.16211 102.91407,0 44.16406,44.16211 0.1914,0.19336 0.0117,-0.008 a 24.999997,24.999997 0 0 0 22.00782,6.94922 24.999997,24.999997 0 0 0 20.27929,-28.96094 l -19.09961,-108.32813 -0.004,0 -0.0195,0.004 C 528.85138,113.4199 504.48183,92.361314 474.99941,92.361314 l -119.99804,0 -0.002,0 z"
id="path4288"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4290">
<path
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 354.99922,92.361314 c -29.48241,0 -53.85,21.058586 -58.98632,49.011716 l -0.0234,-0.004 -19.10156,108.32813 a 24.999997,24.999997 0 0 0 20.27929,28.96094 24.999997,24.999997 0 0 0 22.00977,-6.94922 l 0.01,0.008 0.19141,-0.19336 44.16406,-44.16211 102.91407,0 44.16406,44.16211 0.1914,0.19336 0.0117,-0.008 a 24.999997,24.999997 0 0 0 22.00782,6.94922 24.999997,24.999997 0 0 0 20.27929,-28.96094 l -19.09961,-108.32813 -0.004,0 -0.0195,0.004 C 528.85138,113.4199 504.48183,92.361314 474.99941,92.361314 l -119.99804,0 -0.002,0 z"
id="path4292"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4294">
<path
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 354.99922,92.361314 c -29.48241,0 -53.85,21.058586 -58.98632,49.011716 l -0.0234,-0.004 -19.10156,108.32813 a 24.999997,24.999997 0 0 0 20.27929,28.96094 24.999997,24.999997 0 0 0 22.00977,-6.94922 l 0.01,0.008 0.19141,-0.19336 44.16406,-44.16211 102.91407,0 44.16406,44.16211 0.1914,0.19336 0.0117,-0.008 a 24.999997,24.999997 0 0 0 22.00782,6.94922 24.999997,24.999997 0 0 0 20.27929,-28.96094 l -19.09961,-108.32813 -0.004,0 -0.0195,0.004 C 528.85138,113.4199 504.48183,92.361314 474.99941,92.361314 l -119.99804,0 -0.002,0 z"
id="path4296"
inkscape:connector-curvature="0" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2"
inkscape:cx="177.50974"
inkscape:cy="142.62777"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
fit-margin-left="11.5"
fit-margin-right="11.5"
fit-margin-top="56.5"
fit-margin-bottom="56.5"
units="px" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-265.00899,-35.861337)">
<path
style="opacity:1;fill:#689f38;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 534.00781,141.36914 -49.24023,8.68164 0.4082,2.31055 -190.17578,0 0,75 171.45703,0 44.16406,44.16211 0.19141,0.19336 0.01,-0.008 a 25,25 0 0 0 22.00976,6.94922 25,25 0 0 0 20.2793,-28.96093 L 534.01,141.36896 l -0.002,0 z"
id="rect4154"
inkscape:connector-curvature="0"
clip-path="url(#clipPath4294)" />
<path
style="opacity:1;fill:#8bc34a;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 355,92.361328 c -29.48242,0 -53.85001,21.058592 -58.98633,49.011722 l -0.0234,-0.004 -19.10156,108.32813 a 25,25 0 0 0 20.2793,28.96093 25,25 0 0 0 22.00976,-6.94922 l 0.008,0.008 0.1914,-0.19336 59.16407,-59.16211 96.45898,0 c 33.24,0 60,-26.76 60,-60 0,-33.24 -26.76,-60.000002 -60,-60.000002 l -120,0 z"
id="rect4152"
inkscape:connector-curvature="0"
clip-path="url(#clipPath4290)" />
<g
id="g4210"
clip-path="url(#clipPath4286)">
<path
id="rect4147"
d="m 349,122.36133 0,24 -24,0 0,16 24,0 0,24 16,0 0,-24 24,0 0,-16 -24,0 0,-24 -16,0 z"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
inkscape:connector-curvature="0" />
<g
id="g4204">
<circle
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path4158"
cx="478"
cy="174.3622"
r="10" />
<circle
r="10"
cy="132.3622"
cx="478"
id="circle4164"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<circle
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="circle4166"
cx="458"
cy="153.8622"
r="10" />
<circle
r="10"
cy="153.8622"
cx="498"
id="circle4168"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
</g>
<path
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 281.78571,250.21935 13.75,-106.07143 L 390,205.75506 321.96429,272.18363 Z"
id="path4187"
inkscape:connector-curvature="0"
clip-path="url(#clipPath4282)" />
<path
inkscape:connector-curvature="0"
id="path4159"
d="m 534.00781,141.36914 -49.24023,8.68164 0.4082,2.31055 -190.17578,0 0,75 171.45703,0 44.16406,44.16211 0.19141,0.19336 0.01,-0.008 a 25,25 0 0 0 22.00976,6.94922 25,25 0 0 0 20.2793,-28.96093 L 534.01,141.36896 l -0.002,0 z"
style="opacity:1;fill:#689f38;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;"
clip-path="url(#clipPath4278)" />
<path
inkscape:connector-curvature="0"
id="path4161"
d="m 355,92.361328 c -29.48242,0 -53.85001,21.058592 -58.98633,49.011722 l -0.0234,-0.004 -19.10156,108.32813 a 25,25 0 0 0 20.2793,28.96093 25,25 0 0 0 22.00976,-6.94922 l 0.008,0.008 0.1914,-0.19336 59.16407,-59.16211 96.45898,0 c 33.24,0 60,-26.76 60,-60 0,-33.24 -26.76,-60.000002 -60,-60.000002 l -120,0 z"
style="opacity:1;fill:#8bc34a;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4067)"
clip-path="url(#clipPath4274)" />
<g
id="g4163"
style="filter:url(#filter4067)"
clip-path="url(#clipPath4270)">
<path
inkscape:connector-curvature="0"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 349,122.36133 0,24 -24,0 0,16 24,0 0,24 16,0 0,-24 24,0 0,-16 -24,0 0,-24 -16,0 z"
id="path4165" />
<g
id="g4167">
<circle
r="10"
cy="174.3622"
cx="478"
id="circle4169"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<circle
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="circle4171"
cx="478"
cy="132.3622"
r="10" />
<circle
r="10"
cy="153.8622"
cx="458"
id="circle4173"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<circle
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="circle4175"
cx="498"
cy="153.8622"
r="10" />
</g>
</g>
<path
inkscape:connector-curvature="0"
id="path4177"
d="m 281.78571,250.21935 13.75,-106.07143 L 390,205.75506 321.96429,272.18363 Z"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
clip-path="url(#clipPath4266)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1,275 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="256"
height="256"
viewBox="0 0 256 256"
id="svg3059"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="ic_microg_settings.svg"
inkscape:export-filename="/home/marvin/Development/IDEA/microg_gradle_build_root/play-services-core/src/main/res/mipmap-mdpi/ic_microg_settings.png"
inkscape:export-xdpi="16.879999"
inkscape:export-ydpi="16.879999">
<metadata
id="metadata3069">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3067">
<linearGradient
id="linearGradient3847">
<stop
style="stop-color:#6a8592;stop-opacity:1;"
offset="0"
id="stop3853" />
<stop
id="stop3851"
offset="1"
style="stop-color:#627f8d;stop-opacity:1;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3847"
id="linearGradient3845"
x1="11.978406"
y1="2.0046263"
x2="11.978406"
y2="21.906435"
gradientUnits="userSpaceOnUse"
gradientTransform="scale(10.666667,10.666667)" />
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Drop Shadow"
id="filter4067"
x="-0.5"
y="-0.5"
width="2"
height="2">
<feFlood
flood-opacity="1"
flood-color="rgb(0,0,0)"
result="flood"
id="feFlood4069" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="in"
result="composite1"
id="feComposite4071" />
<feGaussianBlur
in="composite"
stdDeviation="6"
result="blur"
id="feGaussianBlur4073" />
<feComponentTransfer
id="feComponentTransfer13">
<feFuncA
type="linear"
slope="0.2"
id="feFuncA15" />
</feComponentTransfer>
<feOffset
dx="0"
dy="6"
result="offset"
id="feOffset4075"
stdDeviation="8" />
<feComposite
in="SourceGraphic"
in2="offset"
operator="over"
result="composite2"
id="feComposite4077" />
</filter>
<filter
inkscape:label="Edge Tint/Shade"
inkscape:menu="Shadows and Glows"
inkscape:menu-tooltip="Adds a colorizable drop shadow inside"
color-interpolation-filters="sRGB"
id="filter4119">
<feOffset
dx="0"
dy="5"
result="result11"
id="feOffset4123"
in="SourceGraphic" />
<feComposite
id="feComposite4151"
operator="in"
in="SourceGraphic"
result="result6"
in2="result11" />
<feFlood
id="feFlood4153"
flood-color="rgb(255,255,255)"
flood-opacity="0.20000000000000001"
result="result10" />
<feBlend
id="feBlend4157"
mode="normal"
in="result6"
result="result13"
in2="result10" />
<feComposite
id="feComposite4159"
in2="SourceGraphic"
operator="in"
result="result2" />
<feBlend
result="result12"
in2="SourceGraphic"
mode="normal"
id="feBlend4161"
blend="normal" />
<feOffset
id="feOffset4149"
result="result11"
dy="-5"
dx="0"
in="SourceGraphic" />
<feComposite
result="result6"
in="result12"
operator="in"
in2="result11"
id="feComposite4125" />
<feFlood
result="result10"
in="result6"
flood-opacity="0.20000000000000001"
flood-color="rgb(0,0,0)"
id="feFlood4127" />
<feBlend
mode="normal"
in2="result10"
id="feBlend4129"
in="result6" />
<feComposite
result="result2"
operator="in"
in2="result12"
id="feComposite4131" />
<feBlend
blend="normal"
id="feBlend4133"
in="result2"
mode="normal"
in2="result12"
result="result12" />
</filter>
</defs>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1016"
id="namedview3065"
showgrid="false"
inkscape:zoom="2"
inkscape:cx="143.89356"
inkscape:cy="79.9122"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg3059" />
<path
sodipodi:nodetypes="csccccccccssccccccccsccccccccsscccccccc"
inkscape:connector-curvature="0"
style="fill:url(#linearGradient3845);fill-opacity:1;filter:url(#filter4067)"
id="path3085"
d="M 207.25333,138.45333 C 207.68,135.04 208,131.62667 208,128 c 0,-3.62667 -0.32,-7.04 -0.74667,-10.45333 L 229.76,99.946667 c 2.02667,-1.6 2.56,-4.48 1.28,-6.826667 L 209.70667,56.213333 c -1.28,-2.346666 -4.16,-3.2 -6.50667,-2.346666 L 176.64,64.533333 C 171.09333,60.266667 165.12,56.746667 158.61333,54.08 L 154.56,25.813333 c -0.32,-2.56 -2.56,-4.48 -5.22667,-4.48 l -42.66666,0 c -2.66667,0 -4.90667,1.92 -5.22667,4.48 L 97.386667,54.08 C 90.88,56.746667 84.906667,60.373333 79.36,64.533333 L 52.8,53.866667 c -2.453333,-0.96 -5.226667,0 -6.506667,2.346666 L 24.96,93.12 c -1.386667,2.346667 -0.746667,5.226667 1.28,6.826667 L 48.746667,117.54667 C 48.32,120.96 48,124.48 48,128 c 0,3.52 0.32,7.04 0.746667,10.45333 l -22.506667,17.6 c -2.026667,1.6 -2.56,4.48 -1.28,6.82667 l 21.333333,36.90667 c 1.28,2.34666 4.16,3.2 6.506667,2.34666 l 26.56,-10.66666 c 5.546667,4.26666 11.52,7.78666 18.026667,10.45333 L 101.44,230.18667 c 0.32,2.56 2.56,4.48 5.22667,4.48 l 42.66666,0 c 2.66667,0 4.90667,-1.92 5.22667,-4.48 L 158.61333,201.92 c 6.50667,-2.66667 12.48,-6.29333 18.02667,-10.45333 l 26.56,10.66666 c 2.45333,0.96 5.22667,0 6.50667,-2.34666 L 231.04,162.88 c 1.28,-2.34667 0.74667,-5.22667 -1.28,-6.82667 z" />
<path
d="M 0,0 H 256 V 256 H 0 z"
id="path3061"
inkscape:connector-curvature="0"
style="fill:none" />
<path
d="M 207.25333,138.45333 C 207.68,135.04 208,131.62667 208,128 c 0,-3.62667 -0.32,-7.04 -0.74667,-10.45333 L 229.76,99.946667 c 2.02667,-1.6 2.56,-4.48 1.28,-6.826667 L 209.70667,56.213333 c -1.28,-2.346666 -4.16,-3.2 -6.50667,-2.346666 L 176.64,64.533333 C 171.09333,60.266667 165.12,56.746667 158.61333,54.08 L 154.56,25.813333 c -0.32,-2.56 -2.56,-4.48 -5.22667,-4.48 l -42.66666,0 c -2.66667,0 -4.90667,1.92 -5.22667,4.48 L 97.386667,54.08 C 90.88,56.746667 84.906667,60.373333 79.36,64.533333 L 52.8,53.866667 c -2.453333,-0.96 -5.226667,0 -6.506667,2.346666 L 24.96,93.12 c -1.386667,2.346667 -0.746667,5.226667 1.28,6.826667 L 48.746667,117.54667 C 48.32,120.96 48,124.48 48,128 c 0,3.52 0.32,7.04 0.746667,10.45333 l -22.506667,17.6 c -2.026667,1.6 -2.56,4.48 -1.28,6.82667 l 21.333333,36.90667 c 1.28,2.34666 4.16,3.2 6.506667,2.34666 l 26.56,-10.66666 c 5.546667,4.26666 11.52,7.78666 18.026667,10.45333 L 101.44,230.18667 c 0.32,2.56 2.56,4.48 5.22667,4.48 l 42.66666,0 c 2.66667,0 4.90667,-1.92 5.22667,-4.48 L 158.61333,201.92 c 6.50667,-2.66667 12.48,-6.29333 18.02667,-10.45333 l 26.56,10.66666 c 2.45333,0.96 5.22667,0 6.50667,-2.34666 L 231.04,162.88 c 1.28,-2.34667 0.74667,-5.22667 -1.28,-6.82667 z"
id="path3063"
style="fill:url(#linearGradient3845);fill-opacity:1;filter:url(#filter4119)"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csccccccccssccccccccsccccccccsscccccccc" />
<path
style="fill:#000000;fill-opacity:0.0627451"
d="m 168.08594,86.261719 -61.18164,3.882811 -21.070314,38.94043 0.929686,38.94043 69.212888,52.29102 2.63672,-18.39649 c 6.50667,-2.66667 12.48067,-6.29312 18.02734,-10.45312 l 26.5586,10.66601 c 2.45333,0.96 5.22781,9.6e-4 6.50781,-2.3457 l 21.33203,-36.90625 c 1.28,-2.34667 0.74738,-5.22813 -1.27929,-6.82813 L 207.25391,138.45312 C 207.68058,135.03979 208,131.62667 208,128 c 0,-3.62667 -0.31942,-7.0398 -0.74609,-10.45312 l 1.66601,-1.30274 z"
id="rect4273"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccsccc" />
<g
transform="matrix(0.82891149,0,0,0.82891149,-202.06341,-173.42617)"
id="g6310"
inkscape:export-xdpi="102"
inkscape:export-ydpi="102"
style="filter:url(#filter4067)">
<path
d="m 437.1019,402.53183 a 55,55 0 0 1 -66.39087,8.74053"
sodipodi:open="true"
sodipodi:end="2.0943951"
sodipodi:start="0.78539816"
sodipodi:ry="55"
sodipodi:rx="55"
sodipodi:cy="363.64096"
sodipodi:cx="398.21103"
sodipodi:type="arc"
id="path6302"
style="opacity:1;fill:none;fill-opacity:1;stroke:#92a6b1;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#a3ffe6;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path6304"
sodipodi:type="arc"
sodipodi:cx="398.21103"
sodipodi:cy="363.64096"
sodipodi:rx="55"
sodipodi:ry="55"
sodipodi:start="2.0943951"
sodipodi:end="3.403392"
sodipodi:open="true"
d="M 370.71103,411.27236 A 55,55 0 0 1 345.08511,349.40592" />
<path
d="m 345.08511,349.40592 a 55,55 0 0 1 25.62592,-33.39636"
sodipodi:open="true"
sodipodi:end="4.1887902"
sodipodi:start="3.403392"
sodipodi:ry="55"
sodipodi:rx="55"
sodipodi:cy="363.64096"
sodipodi:cx="398.21103"
sodipodi:type="arc"
id="path6306"
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#d0dadc;stroke-width:30;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path6308"
sodipodi:type="arc"
sodipodi:cx="398.21103"
sodipodi:cy="363.64096"
sodipodi:rx="55"
sodipodi:ry="55"
sodipodi:start="4.1887902"
sodipodi:end="5.4977871"
sodipodi:open="true"
d="m 370.71103,316.00956 a 55,55 0 0 1 66.39087,8.74053" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

91
artwork/ic_recaptcha.svg Normal file
View file

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
~ SPDX-FileCopyrightText: 2021, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="48mm"
height="48mm"
viewBox="0 0 48 48"
version="1.1"
id="svg8">
<defs
id="defs2">
<linearGradient
id="linearGradient883"
x1="52.914062"
y1="90.708984"
x2="52.914062"
y2="78.548767"
gradientUnits="userSpaceOnUse">
<stop
style="stop-color:#1e88e5;stop-opacity:1"
offset="0"
id="stop877" />
<stop
style="stop-color:#2196f3;stop-opacity:1"
offset="1"
id="stop879" />
</linearGradient>
<linearGradient
id="linearGradient887"
gradientUnits="userSpaceOnUse"
x1="52.914062"
y1="90.708984"
x2="52.914062"
y2="78.548767"
gradientTransform="matrix(0,0.26458333,-0.26458333,0,48.00017,-8.2278639e-8)">
<stop
style="stop-color:#3949ab;stop-opacity:1"
offset="0"
id="stop904" />
<stop
style="stop-color:#3f51b5;stop-opacity:1"
offset="1"
id="stop906" />
</linearGradient>
<linearGradient
id="linearGradient918"
x1="24.000086"
y1="1.9998779"
x2="46.000294"
y2="24.000086"
gradientUnits="userSpaceOnUse">
<stop
style="stop-color:#ffffff;stop-opacity:0.09411765"
offset="0"
id="stop912" />
<stop
style="stop-color:#ffffff;stop-opacity:0"
offset="1"
id="stop914" />
</linearGradient>
</defs>
<g
id="layer1">
<path
id="circle855"
style="fill:#bdbdbd;fill-opacity:1;stroke:#000000;stroke-width:0"
d="M 7.5585938,90.708984 V 153.07227 L 22.445312,138.18555 a 83.149605,83.149605 0 0 0 36.44336,29.34375 83.149605,83.149605 0 0 0 90.615238,-18.02539 L 117.43359,117.43359 A 37.795276,37.795276 0 0 1 90.708984,128.50391 37.795276,37.795276 0 0 1 55.695312,104.93555 L 69.921875,90.708984 H 52.914062 Z"
transform="scale(0.26458333)" />
<path
id="circle857"
style="fill:url(#linearGradient883);fill-opacity:1;stroke:#000000;stroke-width:0"
d="M 28.345703,7.5585938 43.232422,22.445312 A 83.149605,83.149605 0 0 0 7.5585938,90.708984 H 52.914062 A 37.795276,37.795276 0 0 1 76.482422,55.695312 L 90.708984,69.921875 V 52.914062 7.5585938 h -0.257812 z"
transform="scale(0.26458333)" />
<path
id="path885"
style="fill:url(#linearGradient887);fill-opacity:1;stroke:#000000;stroke-width:0"
d="M 46.000292,7.4997999 42.061515,11.438578 A 21.999999,21.999999 0 0 0 24.000085,1.9998779 V 14.000179 a 10,10 0 0 1 9.264034,6.235795 l -3.764112,3.764111 h 4.499984 12.000301 v -0.06821 z" />
<path
id="path910"
style="fill:url(#linearGradient918);fill-opacity:1;stroke:#000000;stroke-width:0"
d="M 46.000292,7.4997999 42.061515,11.438578 C 37.949082,5.5254753 31.202646,1.9998641 24.000085,1.9998779 L 46.000292,24.000085 v -0.06821 z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

73
artwork/styles/README.md Normal file
View file

@ -0,0 +1,73 @@
## The files
* `style-microg-normal-openmaptiles.json` is a pure OpenMapTiles schema version of microG's custom style. The sources are set to Stadia but could be modified to be used with another schema-compliant vendor, e.g. MapTiler.
* `style-microg-normal-stadia.json` is a variant with Stadia custom layers.
* `style-microg-normal-mapbox.json` is a historic, unmaintained variant for use with Mapbox.
* `style-microg-satellite-*.json` is the same, but with a satellite layer (the stadia variant is almost pure openmaptiles, but openmaptiles does not specify a satellite layer).
* `style-stadia-outdoors.json` is identical to Stadia's Outdoors style, but with added microG metadata.
* `sprite_sources` files can be generated to a single sprite file as found in the app's assets using `spreet` (see below).
* PBF files for fonts can be generated using `build_pbf_glyphs` from the `fonts` folder.
## Resources
### For creating styles
* Tool: https://maputnik.github.io/
* Style spec: https://maplibre.org/maplibre-style-spec/
* https://maplibre.org/maplibre-style-spec/expressions/
* Style schema: **https://openmaptiles.org/schema/**
* Schema tileset explorer (requires maptiler login): https://cloud.maptiler.com/tiles/v3-openmaptiles/
#### Vendor-specific
* Mapbox
* https://docs.mapbox.com/data/tilesets/reference/mapbox-streets-v8/
* Stadia
* https://docs.stadiamaps.com/custom-styles/
* https://docs.stadiamaps.com/tilesets/
### For converting assets
* https://github.com/flother/spreet
* https://github.com/stadiamaps/sdf_font_tools/tree/main/build_pbf_glyphs
Commands:
```
$ cp style-microg-{satellite,normal}-{mapbox,stadia}.json style-stadia-outdoors.json style-mapbox-outdoors-v12.json ../../play-services-maps-core-mapbox/src/main/assets/
$ spreet sprite_sources/ ../../play-services-maps-core-mapbox/src/main/assets/sprites
$ spreet --retina sprite_sources/ ../../play-services-maps-core-mapbox/src/main/assets/sprites@2x
$ build_pbf_glyphs --overwrite -c fonts/combinations.json fonts/ ../../play-services-maps-core-mapbox/src/main/assets
$ rm -r ../../play-services-maps-core-mapbox/src/main/assets/OpenSans\ Regular # remove temporary files
```
* We combine Open Sans Regular with Roboto Regular so that no glyphs are missing.
* A symbolic link in the assets folder points from the font stack specification "Open Sans Regular,Arial Unicode MS Regular" to "Roboto Regular". It is unclear why MapLibre sometimes tries to access this font and fails rendering entire tiles if it is not present.
The assets are referenced using `asset://` in the style. For using Maputnik, it may be convenient to set the glyphs and sprites source to these Mapbox-hosted sources:
```
"sprite": "mapbox://sprites/microg/cjui4020201oo1fmca7yuwbor/8fkcj5fgn4mftlzuak3guz1f9",
"glyphs": "mapbox://fonts/microg/{fontstack}/{range}.pbf",
```
## Legal
* normal and satellite microG styles based on Mapbox Basic, part of the Mapbox Open Styles, licensed under
* Style code: BSD license
* Style virtual features / design: CC BY 3.0
* Reference: https://github.com/mapbox/mapbox-gl-styles/blob/master/LICENSE.md
* derivation created by larma
* derivation created by /e/ foundation
* makes use of snippets from [Stadia's variant of OSM Bright](https://docs.stadiamaps.com/map-styles/osm-bright/), also a derivation of Mapbox Open Styles
* Style code: BSD 3-Clause License
* Style design: CC-BY 4.0
* Reference: https://stadiamaps.com/attribution/
* fonts: Roboto family, licensed Apache 2.0, https://fonts.google.com/specimen/Roboto/about
* outdoor style based on https://docs.stadiamaps.com/map-styles/outdoors/#__tabbed_1_2
* Style code: BSD 3-Clause License
* Style design: CC-BY 4.0
* Reference: https://stadiamaps.com

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
{"Roboto Regular": ["Roboto Regular", "OpenSans Regular"]}

View file

@ -0,0 +1 @@
<svg height="3.675mm" viewBox="0 0 3.675 3.675" width="3.675mm" xmlns="http://www.w3.org/2000/svg"><circle cx="1.8375" cy="1.8375" fill="#f1f1f1" r="1.5875" stroke="#000" stroke-linejoin="round" stroke-width=".5"/><circle cx="1.8375" cy="1.8375" r=".8375"/></svg>

After

Width:  |  Height:  |  Size: 263 B

View file

@ -0,0 +1 @@
<svg height="3.675mm" viewBox="0 0 3.675 3.675" width="3.675mm" xmlns="http://www.w3.org/2000/svg"><circle cx="1.8375" cy="1.8375" fill="#f1f1f1" r="1.5875" stroke="#000" stroke-linejoin="round" stroke-width=".5"/></svg>

After

Width:  |  Height:  |  Size: 220 B

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#7c9eb2"/><circle cx="146.34181" cy="137.42532" fill="#fdfefe" r="2.910417"/></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#4a96f2"/><circle cx="146.34181" cy="137.42532" fill="#fdfefe" r="2.910417"/></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#4bb646"/><circle cx="146.34181" cy="137.42532" fill="#fdfefe" r="2.910417"/></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#ff9f67"/><circle cx="146.34181" cy="137.42532" fill="#fdfefe" r="2.910417"/></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#909ce0"/><circle cx="146.34181" cy="137.42532" fill="#fdfefe" r="2.910417"/></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#f88182"/><circle cx="146.34181" cy="137.42532" fill="#fdfefe" r="2.910417"/></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#18b5c6"/><circle cx="146.34181" cy="137.42532" fill="#fdfefe" r="2.910417"/></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#4a96f2"/><g fill="#fff" transform="matrix(1.5414832 0 0 1.5414832 -30.296322 -19.456248)"><path d="m421.41797 376.0625v1.89062h4.33984l2.53321 9.44922.50586 1.88868.43945 1.64257h.002l.0664.24805h11.13086l.50781-1.89062h-9.21289l-.50586-1.88868h10.22461l2.02539-7.56054h-14.27539l-1.01651-3.7793z" transform="scale(.26458333)"/><circle cx="113.5" cy="104.5" r=".5"/><circle cx="116.5" cy="104.5" r=".5"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#ee74b5"/><g fill="#fff" transform="matrix(.89551285 0 0 .89551285 -7.238636 45.969034)"><path d="m165 106.5v-7.5c.29327-.293268.73192-.268074 1 0v4.5h4.5v-3.5c5.07182 0 4.09714 1.87459 5.7 2.8.48177-3.645274 1.53341-3.066587 1.8-2.8v6.5h-1v-1.5h-11v1.5z" fill-rule="evenodd"/><circle cx="168.29794" cy="101.42219" r="1.578561"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#18b5c6"/><g fill="#fff" transform="matrix(.86592127 0 0 .86592127 -2.163787 50.010331)"><path d="m648.18945 359.05469-20.78711 15.11914v3.77929h3.7793v22.67774h-3.7793v3.7793h3.7793 3.7793 26.45703 3.7793 3.77929v-3.7793h-3.77929v-22.67774h3.77929v-3.77929zm-13.22851 15.11914h26.45703v26.45703h-26.45703z" transform="scale(.26458333)"/><path d="m169 105v-5h1l1.5 2.5 1.5-2.5h1v5h-1v-3l-1.5 2.5-1.5-2.5v3z" fill-rule="evenodd"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#ff9f67"/><g fill="#fff" fill-rule="evenodd" transform="matrix(.84666669 0 0 .84666669 77.603065 38.947402)"><path d="m78.5 122.5v-5.5l-2-1v-4l1-.5v3.5h1.25v-4h1v4h1.25v-3.5l1 .5v4l-2 1v5.5z"/><path d="m84 122.5v-4.5l-1-1.5v-3.5l1-1.5h1.25v11z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#ff9f67"/><g fill="#fff" fill-rule="evenodd" transform="matrix(.84666669 0 0 .84666669 77.603065 38.947402)"><path d="m78.5 122.5v-5.5l-2-1v-4l1-.5v3.5h1.25v-4h1v4h1.25v-3.5l1 .5v4l-2 1v5.5z"/><path d="m84 122.5v-4.5l-1-1.5v-3.5l1-1.5h1.25v11z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1 @@
<svg height="92.999779" viewBox="0 0 16.933344 24.606192" width="64.000038" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-137.87515 -129.17038)"><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="4.08037518155" ry="2.40450734772"/><ellipse cx="146.40876024661" cy="151.37206462861" fill-opacity=".054902" rx="2.24020674571" ry="1.3201216811"/><path d="m146.34182 129.17084c-.0881-.002-.17618.003-.26427.005-2.28771.0716-4.44847 1.06626-5.99081 2.75739-3.15142 3.45515-2.9054 8.81073.54956 11.96235.16713.15072.34027.29455.51892.43141.7154.65297 1.42437 1.30889 2.10982 1.97244 1.12466 1.08871 1.70326 2.61841 1.73177 3.75584.0284 1.13741.60701 1.71123 1.31876 1.71166h.0263.0262c.71175-.00043 1.29031-.57425 1.31876-1.71166.0284-1.13743.60711-2.66713 1.73177-3.75584.68545-.66355 1.39442-1.31947 2.10983-1.97244.17865-.13682.35178-.28069.51892-.43141 3.45496-3.15162 3.70097-8.5072.54955-11.96235-1.54233-1.69113-3.70309-2.68576-5.9908-2.75739-.0881-.002-.17622-.007-.26427-.005z" fill="#fff" fill-opacity=".439216"/><path d="m146.33394 129.59439c-.0645-.002-.14664.003-.24327.005-2.17353.0681-4.22614 1.01237-5.69153 2.61911-2.9967 3.2855-2.76347 8.36527.52068 11.36293 0 0 .00086.00086.00086.00086l.00088.00088c.15817.14242.32176.27824.49093.40779a.42338839.42338839 0 0 1 .0279.0237c.71681.65424 1.42849 1.31227 2.11858 1.9803 1.21492 1.17607 1.82947 2.77852 1.8613 4.04988.0119.49877.14411.82793.3054 1.02209.16121.19423.34764.27638.58981.27653h.0263.0254c.24217-.00015.42859-.0823.5898-.27653.16121-.19416.29355-.52332.3054-1.02209.0318-1.27136.64639-2.87381 1.86129-4.04988.6901-.66803 1.40178-1.32606 2.11857-1.9803a.42338839.42338839 0 0 1 .0279-.0237c.16946-.12989.33347-.2659.4918-.40867 3.28504-2.99754 3.51851-8.07798.52154-11.36379-1.46537-1.60674-3.518-2.55103-5.69151-2.61911-.0967-.002-.17877-.007-.24329-.005a.42338839.42338839 0 0 1 -.0152 0z" fill="#18b5c6"/><g fill="#fff" fill-rule="evenodd" transform="matrix(1.5250824 0 0 1.5250824 -60.090906 57.270513)"><path d="m132.5826 52.285918v2.505274c.45346.453464.9767.681045 1.50017.681095.52347-.00005 1.04671-.227631 1.50017-.681095v-2.505274c-.42743.24678-.96402.370009-1.50017.370004-.53614.000005-1.07273-.123224-1.50017-.370004zm.52607 1.232482h.43718v.413412h-.43718zm1.51102 0h.43718v.413412h-.43718z"/><path d="m510.74219 189.58008v6.75586c.25847-.11144.51818-.2208.74804-.35352l1.24024-.7168v-1.02734h1.65234v1.5625h-.0566v5.49414c.68783.21489 1.38626.32806 2.08594.32813 1.97847-.00019 3.95606-.86034 5.66992-2.57422v-9.46875c-1.61548.93271-3.64353 1.39845-5.66992 1.39844-2.02636.00001-4.0544-.46573-5.66992-1.39844zm7.69922 4.6582h1.65234v1.5625h-1.65234z" transform="scale(.26458333)"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -0,0 +1 @@
<svg height="5mm" viewBox="0 0 8 5" width="8mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214 4 1 4-1v-3l-4-1-4 1z" fill="#3879c6" fill-rule="evenodd" transform="translate(553.95238 242.73214)"/></svg>

After

Width:  |  Height:  |  Size: 221 B

View file

@ -0,0 +1 @@
<svg height="5mm" viewBox="0 0 8.5 5" width="8.5mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214 4.25 1 4.25-1v-3l-4.25-1-4.25 1z" fill="#3879c6" fill-rule="evenodd" transform="translate(553.95238 242.73214)"/></svg>

After

Width:  |  Height:  |  Size: 237 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 6.75 4.25" width="6.75mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h6.5v-4h-6.5z" fill="#3879c6" fill-rule="evenodd" stroke="#4378ba" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 261 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 8.25 4.25" width="8.25mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h8v-4h-8z" fill="#3879c6" fill-rule="evenodd" stroke="#4378ba" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 257 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 9.5 4.25" width="9.5mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h9.25v-4h-9.25z" fill="#3879c6" fill-rule="evenodd" stroke="#4378ba" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 261 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 10.75 4.25" width="10.75mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h10.5v-4h-10.5z" fill="#3879c6" fill-rule="evenodd" stroke="#4378ba" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 265 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 11.75 4.25" width="11.75mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h11.5v-4h-11.5z" fill="#3879c6" fill-rule="evenodd" stroke="#4378ba" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 265 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 6.75 4.25" width="6.75mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h6.5v-4h-6.5z" fill="#6ca043" fill-rule="evenodd" stroke="#77975e" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 261 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 8.25 4.25" width="8.25mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h8v-4h-8z" fill="#6ca043" fill-rule="evenodd" stroke="#77975e" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 257 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 9.5 4.25" width="9.5mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h9.25v-4h-9.25z" fill="#6ca043" fill-rule="evenodd" stroke="#77975e" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 261 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 6.75 4.25" width="6.75mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h6.5v-4h-6.5z" fill="#da6161" fill-rule="evenodd" stroke="#d2665a" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 261 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 8.25 4.25" width="8.25mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h8v-4h-8z" fill="#da6161" fill-rule="evenodd" stroke="#d2665a" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 257 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 6.75 4.25" width="6.75mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h6.5v-4h-6.5z" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 255 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 8.25 4.25" width="8.25mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h8v-4h-8z" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 251 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 9.5 4.25" width="9.5mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h9.25v-4h-9.25z" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 255 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 10.75 4.25" width="10.75mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h10.5v-4h-10.5z" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 259 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 11.75 4.25" width="11.75mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h11.5v-4h-11.5z" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 259 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 6.75 4.25" width="6.75mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h6.5v-4h-6.5z" fill="#fedc37" fill-rule="evenodd" stroke="#e0c336" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 261 B

View file

@ -0,0 +1 @@
<svg height="4.25mm" viewBox="0 0 8.25 4.25" width="8.25mm" xmlns="http://www.w3.org/2000/svg"><path d="m-553.95238-238.73214h8v-4h-8z" fill="#fedc37" fill-rule="evenodd" stroke="#e0c336" stroke-width=".25" transform="translate(554.07738 242.85714)"/></svg>

After

Width:  |  Height:  |  Size: 257 B

View file

@ -0,0 +1 @@
<svg height="9.25mm" viewBox="0 0 9.75 9.25" width="9.75mm" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-34.680889 -99.37176)"><path d="m34.680889 99.37176v2.31262.46224 6.47514h9.75v-6.47514-.46224-2.31262z" fill="none" opacity="0"/><g transform="matrix(.26458333 0 0 .26458333 34.680889 98.621857)"><path d="m5.6347656 9.4492188c-.0811165.5943042-.151061 1.2432762-.2226562 1.8886722h26.0253906c-.0716-.645438-.141534-1.294334-.222656-1.8886722z" fill="#fff"/><path d="m5.4121094 11.337891c-.5505705 4.963119-.722417 11.13158 1.2011718 14.646484 2.2440076 4.100409 11.8124998 7.558594 11.8124998 7.558594s9.56654-3.458185 11.810547-7.558594c1.923599-3.514922 1.751749-9.683352 1.201172-14.646484z" fill="#3879c6"/><path d="m6.6132812 3.7792969s-.5311359 2.3921723-.9785156 5.6699219h25.5800784c-.447375-3.2776502-.978516-5.6699219-.978516-5.6699219s-3.722719 2.8339843-5.90625 2.8339843-5.904297-2.8339843-5.904297-2.8339843-3.722718 2.8339843-5.90625 2.8339843c-2.183531 0-5.9062498-2.8339843-5.9062498-2.8339843z" fill="#c63838"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1 @@
<svg height="9.25mm" viewBox="0 0 9.75 9.25" width="9.75mm" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-34.680889 -99.37176)"><path d="m34.680889 99.37176v2.31262.46224 6.47514h9.75v-6.47514-.46224-2.31262z" fill="none" opacity="0"/><g transform="matrix(.30192990203 0 0 .26458333 33.99238871648 98.621857)"><path d="m5.6347656 9.4492188c-.0811165.5943042-.151061 1.2432762-.2226562 1.8886722h26.0253906c-.0716-.645438-.141534-1.294334-.222656-1.8886722z" fill="#fff"/><path d="m5.4121094 11.337891c-.5505705 4.963119-.722417 11.13158 1.2011718 14.646484 2.2440076 4.100409 11.8124998 7.558594 11.8124998 7.558594s9.56654-3.458185 11.810547-7.558594c1.923599-3.514922 1.751749-9.683352 1.201172-14.646484z" fill="#3879c6"/><path d="m6.6132812 3.7792969s-.5311359 2.3921723-.9785156 5.6699219h25.5800784c-.447375-3.2776502-.978516-5.6699219-.978516-5.6699219s-3.722719 2.8339843-5.90625 2.8339843-5.904297-2.8339843-5.904297-2.8339843-3.722718 2.8339843-5.90625 2.8339843c-2.183531 0-5.9062498-2.8339843-5.9062498-2.8339843z" fill="#c63838"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1 @@
<svg height="9.25mm" viewBox="0 0 9.75 9.25" width="9.75mm" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-34.680889 -99.37176)"><path d="m34.680889 99.37176v2.31262.46224 6.47514h9.75v-6.47514-.46224-2.31262z" fill="none" opacity="0"/><g transform="matrix(.33929282531 0 0 .26458333 33.30398271191 98.621857)"><path d="m5.6347656 9.4492188c-.0811165.5943042-.151061 1.2432762-.2226562 1.8886722h26.0253906c-.0716-.645438-.141534-1.294334-.222656-1.8886722z" fill="#fff"/><path d="m5.4121094 11.337891c-.5505705 4.963119-.722417 11.13158 1.2011718 14.646484 2.2440076 4.100409 11.8124998 7.558594 11.8124998 7.558594s9.56654-3.458185 11.810547-7.558594c1.923599-3.514922 1.751749-9.683352 1.201172-14.646484z" fill="#3879c6"/><path d="m6.6132812 3.7792969s-.5311359 2.3921723-.9785156 5.6699219h25.5800784c-.447375-3.2776502-.978516-5.6699219-.978516-5.6699219s-3.722719 2.8339843-5.90625 2.8339843-5.904297-2.8339843-5.904297-2.8339843-3.722718 2.8339843-5.90625 2.8339843c-2.183531 0-5.9062498-2.8339843-5.9062498-2.8339843z" fill="#c63838"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1 KiB

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

125
build.gradle Normal file
View file

@ -0,0 +1,125 @@
/*
* SPDX-FileCopyrightText: 2013 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
buildscript {
ext.cronetVersion = '102.5005.125'
ext.wearableVersion = '0.1.1'
ext.kotlinVersion = '1.9.22'
ext.coroutineVersion = '1.7.3'
ext.annotationVersion = '1.7.1'
ext.appcompatVersion = '1.6.1'
ext.biometricVersion = '1.1.0'
ext.coreVersion = '1.12.0'
ext.fragmentVersion = '1.6.2'
ext.lifecycleVersion = '2.7.0'
ext.loaderVersion = '1.1.0'
ext.materialVersion = '1.11.0'
ext.mediarouterVersion = '1.6.0'
ext.multidexVersion = '2.0.1'
ext.navigationVersion = '2.7.7'
ext.preferenceVersion = '1.2.0'
ext.recyclerviewVersion = '1.3.2'
ext.webkitVersion = '1.10.0'
ext.slf4jVersion = '1.7.36'
ext.volleyVersion = '1.2.1'
ext.okHttpVersion = '4.12.0'
ext.ktorVersion = '2.3.12'
ext.wireVersion = '4.9.9'
ext.tinkVersion = '1.13.0'
ext.androidBuildGradleVersion = '8.2.2'
ext.androidBuildVersionTools = '34.0.0'
ext.androidMinSdk = 19
ext.androidTargetSdk = 29
ext.androidCompileSdk = 35
ext.localProperties = new Properties()
try {
var stream = rootProject.file('local.properties').newDataInputStream()
ext.localProperties.load(stream)
stream.close()
} catch (ignored) {
// Ignore
}
ext.hasModule = (String name, boolean enabledByDefault) -> {
return ext.localProperties.getProperty("modules." + name, enabledByDefault.toString()).toBoolean()
}
repositories {
mavenCentral()
google()
}
dependencies {
classpath "com.android.tools.build:gradle:$androidBuildGradleVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "com.squareup.wire:wire-gradle-plugin:$wireVersion"
}
}
def execResult(... args) {
providers.exec { commandLine args }.standardOutput.asText.get()
}
def ignoreGit = providers.environmentVariable('GRADLE_MICROG_VERSION_WITHOUT_GIT').getOrElse('0') == '1'
def gmsVersion = "25.09.32"
def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', ''))
def vendingVersion = "40.2.26"
def vendingVersionCode = Integer.parseInt(vendingVersion.replaceAll('\\.', ''))
def gitVersionBase = !ignoreGit ? execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').trim().substring(1) : "v0.0.0.$gmsVersionCode"
def gitCommitCount = !ignoreGit ? Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD").trim()) : 0
def gitCommitId = !ignoreGit ? execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').trim().split(' ')[0] : '0000000'
def gitDirty = false
if (!ignoreGit) {
execResult('git', 'status', '--porcelain').lines().each { stat ->
def status = stat.substring(0,2)
def file = stat.substring(3)
if (status == '??') {
if (subprojects.any { p -> file.startsWith(p.name + '/') }) {
logger.lifecycle('Dirty file: {} (untracked)', file)
gitDirty = true
} else {
logger.info('New file outside module: {} (ignored for dirty check)', file)
}
} else {
logger.lifecycle('Dirty file: {} (changed)', file)
gitDirty = true
}
}
}
def ourVersionBase = gitVersionBase.substring(0, gitVersionBase.lastIndexOf('.'))
def ourVersionMinor = Integer.parseInt(ourVersionBase.substring(ourVersionBase.lastIndexOf('.') + 1))
def ourGmsVersionCode = gmsVersionCode * 1000 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0)
def ourGmsVersionName = "$ourVersionBase.$gmsVersionCode" + (gitCommitCount > 0 && !gitDirty ? "-$gitCommitCount" : "") + (gitDirty ? "-dirty" : "") + (gitCommitCount > 0 && !gitDirty ? " ($gitCommitId)" : "")
def ourVendingVersionCode = 80000000 + vendingVersionCode * 100 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0)
def ourVendingVersionName = "$ourVersionBase.$vendingVersionCode" + (gitCommitCount > 0 && !gitDirty ? "-$gitCommitCount" : "") + (gitDirty ? "-dirty" : "") + (gitCommitCount > 0 && !gitDirty ? " ($gitCommitId)" : "")
logger.lifecycle('Starting build for GMS version {} ({})...', ourGmsVersionName, ourGmsVersionCode)
allprojects {
apply plugin: 'idea'
group = 'org.microg.gms'
version = ourGmsVersionName
ext.vendingAppVersionName = ourVendingVersionName
ext.vendingAppVersionCode = ourVendingVersionCode
ext.appVersionCode = ourGmsVersionCode
ext.isReleaseVersion = false
}
subprojects {
repositories {
mavenCentral()
google()
if (hasModule("hms", false)) maven {url 'https://developer.huawei.com/repo/'}
}
}

View file

@ -0,0 +1,38 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
android {
namespace 'org.microg.signature.fake'
compileSdk androidCompileSdk
defaultConfig {
minSdk androidMinSdk
targetSdk androidTargetSdk
}
flavorDimensions = ['target']
productFlavors {
"default" {
dimension 'target'
}
"huawei" {
dimension 'target'
}
}
buildFeatures {
aidl = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
}

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ SPDX-FileCopyrightText: 2023 microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application>
<receiver
android:name="com.huawei.signature.diff.InitReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
<action android:name="android.intent.action.PACKAGE_RESTARTED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<provider
android:name="com.huawei.signature.diff.InitProvider"
android:authorities="${applicationId}.signature.diff.init"
android:enabled="true"
android:exported="false"
android:initOrder="1000" />
<service
android:name="com.huawei.signature.diff.SignatureService"
android:process=":signature"
android:exported="true">
<intent-filter>
<action android:name="com.huawei.signature.diff" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
</application>
</manifest>

View file

@ -0,0 +1,14 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.huawei.signature.diff;
/**
* Interface for Huawei Differentiated Signature Capability
* See https://forums.developer.huawei.com/forumPortal/en/topic/0202128603315033024
*/
interface ISignatureService {
String[] querySignature(String packageName, boolean suggested);
}

View file

@ -0,0 +1,75 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.huawei.signature.diff;
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
import org.microg.signature.fake.R;
public class AppListDatabaseOpenHelper extends SQLiteOpenHelper {
private static final String TAG = AppListDatabaseOpenHelper.class.getSimpleName();
private static final String DATABASE_NAME = "app_list.db";
public static final String TABLE_APPLIST = "applist";
public static final String COLUMN_NAME = "name";
public static final String COLUMN_FAKE = "fake";
private static final int DATABASE_VERSION = 3;
private static final String DROP_APP_LIST_TABLE = "DROP TABLE IF EXISTS " + TABLE_APPLIST;
private static final String CREATE_APP_LIST_TABLE = "CREATE TABLE IF NOT EXISTS " + TABLE_APPLIST + "(" +
COLUMN_NAME + " VARCHAR(255) PRIMARY KEY, " +
COLUMN_FAKE + " INTEGER CHECK(" + COLUMN_FAKE + " >= 0 and " + COLUMN_FAKE + " <= 1)" +
")";
private final Context context;
public AppListDatabaseOpenHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
this.context = context;
}
@Override
public void onCreate(SQLiteDatabase db) {
Log.d(TAG, "onCreate");
db.execSQL(DROP_APP_LIST_TABLE);
db.execSQL(CREATE_APP_LIST_TABLE);
initData(db);
}
@Override
public void onOpen(SQLiteDatabase db) {
super.onOpen(db);
if (!db.isReadOnly()) {
initData(db);
}
}
private void initData(SQLiteDatabase db) {
String[] wantFakeApps = context.getResources().getStringArray(R.array.signature_want_fake);
String[] neverFakeApps = context.getResources().getStringArray(R.array.signature_never_fake);
if (wantFakeApps.length == 0 && neverFakeApps.length == 0) {
return;
}
for (String app : wantFakeApps) {
db.insertWithOnConflict(TABLE_APPLIST, null, generateValues(app, true), SQLiteDatabase.CONFLICT_REPLACE);
}
for (String app : neverFakeApps) {
db.insertWithOnConflict(TABLE_APPLIST, null, generateValues(app, false), SQLiteDatabase.CONFLICT_REPLACE);
}
}
private ContentValues generateValues(String packageName, boolean fake) {
ContentValues contentValues = new ContentValues();
contentValues.put(COLUMN_NAME, packageName);
contentValues.put(COLUMN_FAKE, fake ? 1 : 0);
return contentValues;
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
onCreate(db);
}
}

View file

@ -0,0 +1,72 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.huawei.signature.diff;
import android.app.ActivityManager;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.util.Log;
import java.util.List;
public class InitProvider extends ContentProvider {
private static final String TAG = "InitProvider";
@Override
public boolean onCreate() {
Log.d(TAG, "onCreate");
if (!isServiceRunning(getContext(), getContext().getPackageName(), SignatureService.class.getName())) {
Intent intent = new Intent(getContext(), SignatureService.class);
try {
getContext().startService(intent);
} catch (Exception ignored) {
}
}
return false;
}
private boolean isServiceRunning(Context context, String packageName, String serviceName) {
ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningServiceInfo> serviceInfoList = manager.getRunningServices(Integer.MAX_VALUE);
if (serviceInfoList == null) {
return false;
}
for (ActivityManager.RunningServiceInfo info : serviceInfoList) {
if (info.service.getPackageName().equals(packageName) && info.service.getClassName().equals(serviceName)) {
return true;
}
}
return false;
}
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
return 0;
}
@Override
public String getType(Uri uri) {
return null;
}
@Override
public Uri insert(Uri uri, ContentValues values) {
return null;
}
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
return null;
}
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
return 0;
}
}

View file

@ -0,0 +1,29 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.huawei.signature.diff;
import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
/**
* This is to make sure the process is initialized at boot.
*/
public class InitReceiver extends BroadcastReceiver {
private static final String TAG = "InitReceiver";
@SuppressLint("UnsafeProtectedBroadcastReceiver")
@Override
public void onReceive(Context context, Intent intent) {
Log.d(TAG, "onReceive");
try {
context.startService(new Intent(context, SignatureService.class));
} catch (Exception ignored) {
}
}
}

View file

@ -0,0 +1,106 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.huawei.signature.diff;
import static com.huawei.signature.diff.AppListDatabaseOpenHelper.COLUMN_NAME;
import static com.huawei.signature.diff.AppListDatabaseOpenHelper.TABLE_APPLIST;
import android.app.Service;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Binder;
import android.os.IBinder;
import android.os.Parcel;
import android.os.RemoteException;
import android.util.Log;
import org.microg.signature.fake.R;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.Date;
public class SignatureService extends Service {
private static final String TAG = "SignatureService";
private SQLiteDatabase database;
private AppListDatabaseOpenHelper openHelper;
private long start;
@Override
public void onCreate() {
super.onCreate();
this.openHelper = new AppListDatabaseOpenHelper(this);
this.database = openHelper.getWritableDatabase();
this.start = System.currentTimeMillis();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.i(TAG, "onStartCommand");
return START_STICKY;
}
@Override
public IBinder onBind(Intent intent) {
return binder;
}
@Override
public void onDestroy() {
this.openHelper.close();
super.onDestroy();
}
@Override
protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
writer.println("Started: " + new Date(start));
}
private final ISignatureService.Stub binder = new ISignatureService.Stub() {
@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
if (Binder.getCallingUid() > 10000) {
Log.w(TAG, "Illegal access from app");
reply.writeException(new UnsupportedOperationException("Illegal"));
return true;
}
return super.onTransact(code, data, reply, flags);
}
@Override
public String[] querySignature(String packageName, boolean suggested) throws RemoteException {
try (Cursor cursor = database.query(TABLE_APPLIST, null, COLUMN_NAME + "=?",
new String[]{packageName}, null, null, null)) {
switch (cursor.getCount()) {
case 0:
return getResult(suggested);
case 1:
if (cursor.moveToFirst()) {
int shouldFake = cursor.getInt(1);
return getResult(shouldFake == 1);
}
break;
default:
throw new IllegalArgumentException("result size: " + cursor.getCount());
}
} catch (Exception e) {
Log.w(TAG, e);
}
return getResult(false);
}
private String[] getResult(boolean useFakeSignature) {
if (useFakeSignature) {
return new String[]{getString(R.string.fake_signature),};
} else {
return new String[]{getString(R.string.real_signature),};
}
}
};
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ SPDX-FileCopyrightText: 2023 microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string-array name="signature_want_fake">
<item>com.google.android.gms</item>
<item>com.android.vending</item>
<item>com.spotify.music</item>
<item>com.getir</item>
<item>com.pozitron.iscep</item>
<item>com.widgetable.theme.android</item>
<item>pro.huobi</item>
<item>com.tarparos.phigaea</item>
<item>com.artem.scotepio</item>
<item>com.sabah.deprembs</item>
<item>com.boynergrup.hopi</item>
<item>com.belbim.istanbulkart</item>
<item>com.a101.plus</item>
<item>com.widgetable.theme.android</item>
<item>net.wargaming.wot.blitz</item>
<item>com.litatom.app</item>
<item>com.ataexpress.tiklagelsin</item>
<item>tr.com.petrolofisi</item>
<item>com.mobisoft.beymen</item>
<item>com.unilever.algida</item>
<item>com.mobisoft.morhipo</item>
<item>com.zzkko</item>
<item>com.didilabs.kaavefali</item>
<item>com.airbnb.android</item>
<item>com.mobillium.papara</item>
<item>co.com.fincaraiz.app</item>
<item>com.frisby.frisby</item>
</string-array>
<string-array name="signature_never_fake">
<item>com.truecaller</item>
</string-array>
</resources>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2014 microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="fake_signature">
308204433082032ba003020102020900c2e08746644a308d300d06092a864886f70d01010405003074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964301e170d3038303832313233313333345a170d3336303130373233313333345a3074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f696430820120300d06092a864886f70d01010105000382010d00308201080282010100ab562e00d83ba208ae0a966f124e29da11f2ab56d08f58e2cca91303e9b754d372f640a71b1dcb130967624e4656a7776a92193db2e5bfb724a91e77188b0e6a47a43b33d9609b77183145ccdf7b2e586674c9e1565b1f4c6a5955bff251a63dabf9c55c27222252e875e4f8154a645f897168c0b1bfc612eabf785769bb34aa7984dc7e2ea2764cae8307d8c17154d7ee5f64a51a44a602c249054157dc02cd5f5c0e55fbef8519fbe327f0b1511692c5a06f19d18385f5c4dbc2d6b93f68cc2979c70e18ab93866b3bd5db8999552a0e3b4c99df58fb918bedc182ba35e003c1b4b10dd244a8ee24fffd333872ab5221985edab0fc0d0b145b6aa192858e79020103a381d93081d6301d0603551d0e04160414c77d8cc2211756259a7fd382df6be398e4d786a53081a60603551d2304819e30819b8014c77d8cc2211756259a7fd382df6be398e4d786a5a178a4763074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964820900c2e08746644a308d300c0603551d13040530030101ff300d06092a864886f70d010104050003820101006dd252ceef85302c360aaace939bcff2cca904bb5d7a1661f8ae46b2994204d0ff4a68c7ed1a531ec4595a623ce60763b167297a7ae35712c407f208f0cb109429124d7b106219c084ca3eb3f9ad5fb871ef92269a8be28bf16d44c8d9a08e6cb2f005bb3fe2cb96447e868e731076ad45b33f6009ea19c161e62641aa99271dfd5228c5c587875ddb7f452758d661f6cc0cccb7352e424cc4365c523532f7325137593c4ae341f4db41edda0d0b1071a7c440f0fe9ea01cb627ca674369d084bd2fd911ff06cdbf2cfa10dc0f893ae35762919048c7efc64c7144178342f70581c9de573af55b390dd7fdb9418631895d5f759f30112687ff621410c069308a
</string>
<string name="real_signature">
308202ed308201d5a003020102020426ffa009300d06092a864886f70d01010b05003027310b300906035504061302444531183016060355040a130f4e4f47415050532050726f6a656374301e170d3132313030363132303533325a170d3337303933303132303533325a3027310b300906035504061302444531183016060355040a130f4e4f47415050532050726f6a65637430820122300d06092a864886f70d01010105000382010f003082010a02820101009a8d2a5336b0eaaad89ce447828c7753b157459b79e3215dc962ca48f58c2cd7650df67d2dd7bda0880c682791f32b35c504e43e77b43c3e4e541f86e35a8293a54fb46e6b16af54d3a4eda458f1a7c8bc1b7479861ca7043337180e40079d9cdccb7e051ada9b6c88c9ec635541e2ebf0842521c3024c826f6fd6db6fd117c74e859d5af4db04448965ab5469b71ce719939a06ef30580f50febf96c474a7d265bb63f86a822ff7b643de6b76e966a18553c2858416cf3309dd24278374bdd82b4404ef6f7f122cec93859351fc6e5ea947e3ceb9d67374fe970e593e5cd05c905e1d24f5a5484f4aadef766e498adf64f7cf04bddd602ae8137b6eea40722d0203010001a321301f301d0603551d0e04160414110b7aa9ebc840b20399f69a431f4dba6ac42a64300d06092a864886f70d01010b0500038201010007c32ad893349cf86952fb5a49cfdc9b13f5e3c800aece77b2e7e0e9c83e34052f140f357ec7e6f4b432dc1ed542218a14835acd2df2deea7efd3fd5e8f1c34e1fb39ec6a427c6e6f4178b609b369040ac1f8844b789f3694dc640de06e44b247afed11637173f36f5886170fafd74954049858c6096308fc93c1bc4dd5685fa7a1f982a422f2a3b36baa8c9500474cf2af91c39cbec1bc898d10194d368aa5e91f1137ec115087c31962d8f76cd120d28c249cf76f4c70f5baa08c70a7234ce4123be080cee789477401965cfe537b924ef36747e8caca62dfefdd1a6288dcb1c4fd2aaa6131a7ad254e9742022cfd597d2ca5c660ce9e41ff537e5a4041e37
</string>
</resources>

View file

@ -0,0 +1,33 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
android {
namespace 'com.google.firebase.auth'
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
buildFeatures {
aidl = true
}
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
dependencies {
api project(':play-services-basement')
annotationProcessor project(':safe-parcel-processor')
}

View file

@ -0,0 +1,50 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
dependencies {
api project(':firebase-auth')
implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.appcompat:appcompat:$appcompatVersion"
implementation project(':play-services-base-core')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion"
implementation "com.android.volley:volley:$volleyVersion"
}
android {
namespace "org.microg.gms.firebase.auth.core"
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
kotlinOptions {
jvmTarget = 1.8
}
}

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<application>
<service android:name="org.microg.gms.firebase.auth.FirebaseAuthService">
<intent-filter>
<action android:name="com.google.firebase.auth.api.gms.service.START" />
</intent-filter>
</service>
<activity
android:name="org.microg.gms.firebase.auth.ReCaptchaActivity"
android:exported="false"
android:process=":ui"
android:theme="@style/Theme.AppCompat.Light.Dialog.Alert.NoActionBar" />
<service
android:name="org.microg.gms.firebase.auth.ReCaptchaOverlayService"
android:exported="false"
android:process=":ui" />
</application>
</manifest>

View file

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html style="margin: 5px">
<body style="margin: 5px">
<div id='recaptcha-container'></div>
<div style="padding-top: 150px">
<svg xmlns="http://www.w3.org/2000/svg"
style="margin: auto; background: none; display: block; shape-rendering: auto;" width="64px" height="64px"
viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
<rect x="17.5" y="20.2285" width="15" height="59.543" fill="#000000">
<animate attributeName="y" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1"
values="10;30;30" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.2s"></animate>
<animate attributeName="height" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1"
values="80;40;40" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.2s"></animate>
</rect>
<rect x="42.5" y="30" width="15" height="40" fill="#000000">
<animate attributeName="y" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1"
values="15;30;30" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.1s"></animate>
<animate attributeName="height" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1"
values="70;40;40" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.1s"></animate>
</rect>
<rect x="67.5" y="30" width="15" height="40" fill="#000000">
<animate attributeName="y" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1"
values="15;30;30" keySplines="0 0.5 0.5 1;0 0.5 0.5 1"></animate>
<animate attributeName="height" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1"
values="70;40;40" keySplines="0 0.5 0.5 1;0 0.5 0.5 1"></animate>
</rect>
</svg>
</div>
<!-- Firebase App (the core Firebase SDK) is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.22.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.22.0/firebase-auth.js"></script>
<script type="text/javascript">
var firebaseConfig = {
apiKey: "%apikey%"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
window.onload = () => {
window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container', {
'size': 'invisible',
'callback': function (response) {
MyCallback.onReCaptchaToken(response);
}
});
recaptchaVerifier.verify();
}
</script>
</body>
</html>

View file

@ -0,0 +1,663 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.firebase.auth
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.os.Build.VERSION.SDK_INT
import android.os.Handler
import android.os.Parcel
import android.provider.Telephony
import android.telephony.SmsMessage
import android.util.Log
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.lifecycleScope
import com.google.android.gms.common.api.CommonStatusCodes
import com.google.android.gms.common.api.Status
import com.google.android.gms.common.internal.GetServiceRequest
import com.google.android.gms.common.internal.IGmsCallbacks
import com.google.firebase.auth.ActionCodeSettings
import com.google.firebase.auth.EmailAuthCredential
import com.google.firebase.auth.PhoneAuthCredential
import com.google.firebase.auth.UserProfileChangeRequest
import com.google.firebase.auth.api.internal.*
import org.json.JSONArray
import org.json.JSONObject
import org.microg.gms.BaseService
import org.microg.gms.common.GmsService
import org.microg.gms.common.PackageUtils
import org.microg.gms.utils.digest
import org.microg.gms.utils.getCertificates
private const val TAG = "GmsFirebaseAuth"
fun JSONObject.getStringOrNull(key: String) = if (has(key)) getString(key) else null
fun JSONObject.getJSONArrayOrNull(key: String) = if (has(key)) getJSONArray(key) else null
fun JSONArray?.orEmpty() = this ?: JSONArray()
fun JSONObject.getJSONArrayLength(key: String) = getJSONArrayOrNull(key).orEmpty().length()
private val ActionCodeSettings.requestTypeAsString: String
get() = when (requestType) {
1 -> "PASSWORD_RESET"
2 -> "OLD_EMAIL_AGREE"
3 -> "NEW_EMAIL_ACCEPT"
4 -> "VERIFY_EMAIL"
5 -> "RECOVER_EMAIL"
6 -> "EMAIL_SIGNIN"
7 -> "VERIFY_AND_CHANGE_EMAIL"
8 -> "REVERT_SECOND_FACTOR_ADDITION"
else -> "OOB_REQ_TYPE_UNSPECIFIED"
}
private val UserProfileChangeRequest.deleteAttributeList: List<String>
get() {
val list = arrayListOf<String>()
if (shouldRemoveDisplayName) list.add("DISPLAY_NAME")
if (shouldRemovePhotoUri) list.add("PHOTO_URL")
return list
}
private fun Intent.getSmsMessages(): Array<SmsMessage> {
return if (SDK_INT >= 19) {
Telephony.Sms.Intents.getMessagesFromIntent(this)
} else {
(getSerializableExtra("pdus") as? Array<ByteArray>)?.map { SmsMessage.createFromPdu(it) }.orEmpty().toTypedArray()
}
}
class FirebaseAuthService : BaseService(TAG, GmsService.FIREBASE_AUTH) {
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService?) {
PackageUtils.getAndCheckCallingPackage(this, request.packageName)
val apiKey = request.extras?.getString(Constants.EXTRA_API_KEY)
val libraryVersion = request.extras?.getString(Constants.EXTRA_LIBRARY_VERSION)
if (apiKey == null) {
callback.onPostInitComplete(CommonStatusCodes.DEVELOPER_ERROR, null, null)
} else {
callback.onPostInitComplete(0, FirebaseAuthServiceImpl(this, lifecycle, request.packageName, libraryVersion, apiKey).asBinder(), null)
}
}
}
class FirebaseAuthServiceImpl(private val context: Context, override val lifecycle: Lifecycle, private val packageName: String, private val libraryVersion: String?, private val apiKey: String) : IFirebaseAuthService.Stub(), LifecycleOwner {
private val client by lazy { IdentityToolkitClient(context, apiKey, packageName, context.packageManager.getCertificates(packageName).firstOrNull()?.digest("SHA1")) }
private var authorizedDomain: String? = null
private suspend fun getAuthorizedDomain(): String {
authorizedDomain?.let { return it }
val authorizedDomain = try {
client.getProjectConfig().getJSONArray("authorizedDomains").getString(0)
} catch (e: Exception) {
Log.w(TAG, e)
"localhost"
}
this.authorizedDomain = authorizedDomain
return authorizedDomain
}
private suspend fun refreshTokenResponse(cachedState: String): GetTokenResponse {
var tokenResponse = GetTokenResponse.parseJson(cachedState)
if (System.currentTimeMillis() + 300000L < tokenResponse.issuedAt + tokenResponse.expiresIn * 1000) {
return tokenResponse
}
return client.getTokenByRefreshToken(tokenResponse.refreshToken).toGetTokenResponse()
}
private fun JSONObject.toGetTokenResponse() = GetTokenResponse().apply {
refreshToken = getStringOrNull("refresh_token")
accessToken = getStringOrNull("access_token")
expiresIn = getStringOrNull("expires_in")?.toLong()
tokenType = getStringOrNull("token_type")
}
private fun JSONObject.toGetAccountInfoUser(): GetAccountInfoUser = GetAccountInfoUser().apply {
localId = getStringOrNull("localId")
email = getStringOrNull("email")
isEmailVerified = optBoolean("emailVerified")
displayName = getStringOrNull("displayName")
photoUrl = getStringOrNull("photoUrl")
for (i in 0 until getJSONArrayLength("providerUserInfo")) {
getJSONArray("providerUserInfo").getJSONObject(i).run {
providerInfoList.providerUserInfos.add(ProviderUserInfo().apply {
federatedId = getStringOrNull("federatedId")
displayName = getStringOrNull("displayName")
photoUrl = getStringOrNull("photoUrl")
providerId = getStringOrNull("providerId")
phoneNumber = getStringOrNull("phoneNumber")
email = getStringOrNull("email")
rawUserInfo = this@run.toString()
})
}
}
password = getStringOrNull("rawPassword")
phoneNumber = getStringOrNull("phoneNumber")
creationTimestamp = getStringOrNull("createdAt")?.toLong() ?: 0L
lastSignInTimestamp = getStringOrNull("lastLoginAt")?.toLong() ?: 0L
}
private fun JSONObject.toCreateAuthUriResponse(): CreateAuthUriResponse = CreateAuthUriResponse().apply {
authUri = getStringOrNull("authUri")
isRegistered = optBoolean("registered")
providerId = getStringOrNull("providerId")
isForExistingProvider = optBoolean("forExistingProvider")
for (i in 0 until getJSONArrayLength("allProviders")) {
stringList.values.add(getJSONArray("allProviders").getString(i))
}
for (i in 0 until getJSONArrayLength("signinMethods")) {
signInMethods.add(getJSONArray("signinMethods").getString(i))
}
}
override fun applyActionCode(request: ApplyActionCodeAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: applyActionCode")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun applyActionCodeCompat(code: String?, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: applyActionCodeCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun changeEmail(request: ChangeEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: changeEmail")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun changeEmailCompat(cachedState: String?, email: String?, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: changeEmailCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun changePassword(request: ChangePasswordAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: changePassword")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun changePasswordCompat(cachedState: String?, password: String?, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: changePasswordCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun checkActionCode(request: CheckActionCodeAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: checkActionCode")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun checkActionCodeCompat(code: String?, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: checkActionCodeCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun confirmPasswordReset(request: ConfirmPasswordResetAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: confirmPasswordReset")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun confirmPasswordResetCompat(code: String?, newPassword: String?, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: confirmPasswordResetCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun createUserWithEmailAndPassword(request: CreateUserWithEmailAndPasswordAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
Log.d(TAG, "createUserWithEmailAndPassword")
try {
val tokenResult = client.signupNewUser(email = request.email, password = request.password, tenantId = request.tenantId)
val idToken = tokenResult.getString("idToken")
val refreshToken = tokenResult.getString("refreshToken")
val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse()
val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = true }
Log.d(TAG, "callback: onGetTokenResponseAndUser")
callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult)
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun createUserWithEmailAndPasswordCompat(email: String?, password: String?, callbacks: IFirebaseAuthCallbacks) {
createUserWithEmailAndPassword(CreateUserWithEmailAndPasswordAidlRequest().apply { this.email = email; this.password = password }, callbacks)
}
override fun delete(request: DeleteAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: delete")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun deleteCompat(cachedState: String?, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: deleteCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun finalizeMfaEnrollment(request: FinalizeMfaEnrollmentAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: finalizeMfaEnrollment")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun finalizeMfaSignIn(request: FinalizeMfaSignInAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: finalizeMfaSignIn")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun getAccessToken(request: GetAccessTokenAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
Log.d(TAG, "getAccessToken")
try {
callbacks.onGetTokenResponse(client.getTokenByRefreshToken(request.refreshToken).toGetTokenResponse())
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun getAccessTokenCompat(refreshToken: String?, callbacks: IFirebaseAuthCallbacks) {
getAccessToken(GetAccessTokenAidlRequest().apply { this.refreshToken = refreshToken }, callbacks)
}
override fun getProvidersForEmail(request: GetProvidersForEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
Log.d(TAG, "getProvidersForEmail")
try {
callbacks.onCreateAuthUriResponse(client.createAuthUri(identifier = request.email, tenantId = request.tenantId).toCreateAuthUriResponse())
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun getProvidersForEmailCompat(email: String?, callbacks: IFirebaseAuthCallbacks) {
getProvidersForEmail(GetProvidersForEmailAidlRequest().apply { this.email = email }, callbacks)
}
override fun linkEmailAuthCredential(request: LinkEmailAuthCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
Log.d(TAG, "linkEmailAuthCredential")
try {
val getTokenResponse = refreshTokenResponse(request.cachedState)
val accountInfoResult = client.getAccountInfo(idToken = getTokenResponse.accessToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser()
val setAccountInfo = client.setAccountInfo(idToken = getTokenResponse.accessToken, localId = accountInfoResult.localId, email = request.email, password = request.password).toGetAccountInfoUser()
accountInfoResult.email = setAccountInfo.email
accountInfoResult.isEmailVerified = setAccountInfo.isEmailVerified
accountInfoResult.providerInfoList = setAccountInfo.providerInfoList
callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult)
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun linkEmailAuthCredentialCompat(email: String?, password: String?, cachedState: String?, callbacks: IFirebaseAuthCallbacks) {
linkEmailAuthCredential(LinkEmailAuthCredentialAidlRequest().apply { this.email = email; this.password = password; this.cachedState = cachedState }, callbacks)
}
override fun linkFederatedCredential(request: LinkFederatedCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: linkFederatedCredential")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun linkFederatedCredentialCompat(cachedState: String?, verifyAssertionRequest: VerifyAssertionRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: linkFederatedCredentialCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun linkPhoneAuthCredential(request: LinkPhoneAuthCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: linkPhoneAuthCredential")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun linkPhoneAuthCredentialCompat(cachedState: String?, credential: PhoneAuthCredential?, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: linkPhoneAuthCredentialCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun reload(request: ReloadAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
try {
Log.d(TAG, "reload")
val getTokenResponse = refreshTokenResponse(request.cachedState)
val accountInfoResult = client.getAccountInfo(idToken = getTokenResponse.accessToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser()
Log.d(TAG, "callback: onGetTokenResponseAndUser")
callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult)
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun reloadCompat(cachedState: String?, callbacks: IFirebaseAuthCallbacks) {
reload(ReloadAidlRequest().apply { this.cachedState = cachedState }, callbacks)
}
override fun sendEmailVerification(request: SendEmailVerificationWithSettingsAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
try {
Log.d(TAG, "sendEmailVerification")
client.getOobConfirmationCode(
requestType = "VERIFY_EMAIL",
idToken = request.token,
iOSBundleId = request.settings?.iOSBundle,
iOSAppStoreId = request.settings?.iOSAppStoreId,
continueUrl = request.settings?.url,
androidInstallApp = request.settings?.androidInstallApp,
androidMinimumVersion = request.settings?.androidMinimumVersion,
androidPackageName = request.settings?.androidPackageName,
canHandleCodeInApp = request.settings?.handleCodeInApp
)
callbacks.onEmailVerificationResponse()
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun sendEmailVerificationCompat(token: String?, actionCodeSettings: ActionCodeSettings?, callbacks: IFirebaseAuthCallbacks) {
sendEmailVerification(SendEmailVerificationWithSettingsAidlRequest().apply { this.token = token; this.settings = actionCodeSettings }, callbacks)
}
override fun sendVerificationCode(request: SendVerificationCodeAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
try {
Log.d(TAG, "sendVerificationCode")
val reCaptchaToken = when {
request.request.recaptchaToken != null -> request.request.recaptchaToken
ReCaptchaOverlayService.isSupported(context) -> ReCaptchaOverlayService.awaitToken(context, apiKey, getAuthorizedDomain())
ReCaptchaActivity.isSupported(context) -> ReCaptchaActivity.awaitToken(context, apiKey, getAuthorizedDomain())
else -> throw RuntimeException("No recaptcha token available")
}
var sessionInfo: String? = null
var registered = true
val receiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
var smsCode: String? = null
for (message in intent.getSmsMessages()) {
smsCode = Regex("\\b([0-9]{6})\\b").find(message.messageBody)?.groups?.get(1)?.value
?: continue
Log.d(TAG, "Received SMS verification code: $smsCode")
break
}
if (smsCode == null) return
registered = false
context.unregisterReceiver(this)
try {
callbacks.onVerificationCompletedResponse(PhoneAuthCredential().apply {
this.phoneNumber = request.request.phoneNumber
this.sessionInfo = sessionInfo
this.smsCode = smsCode
})
Log.d(TAG, "callback: onVerificationCompletedResponse")
} catch (e: Exception) {
Log.w(TAG, e)
}
}
}
context.registerReceiver(receiver, IntentFilter("android.provider.Telephony.SMS_RECEIVED"))
var timeout = request.request.timeoutInSeconds * 1000L
if (timeout <= 0L) timeout = 120000L
Handler().postDelayed({
if (registered) {
Log.d(TAG, "Waited ${timeout}ms for verification code SMS, timeout.")
context.unregisterReceiver(receiver)
callbacks.onVerificationAutoTimeOut(sessionInfo)
Log.d(TAG, "callback: onVerificationAutoTimeOut")
}
}, timeout)
sessionInfo = client.sendVerificationCode(phoneNumber = request.request.phoneNumber, reCaptchaToken = reCaptchaToken).getString("sessionInfo")
callbacks.onSendVerificationCodeResponse(sessionInfo)
Log.d(TAG, "callback: onSendVerificationCodeResponse")
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun sendVerificationCodeCompat(request: SendVerificationCodeRequest, callbacks: IFirebaseAuthCallbacks) {
sendVerificationCode(SendVerificationCodeAidlRequest().apply { this.request = request }, callbacks)
}
override fun sendGetOobConfirmationCodeEmail(request: SendGetOobConfirmationCodeEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
try {
Log.d(TAG, "sendGetOobConfirmationCodeEmail")
client.getOobConfirmationCode(
requestType = request.settings?.requestTypeAsString ?: "OOB_REQ_TYPE_UNSPECIFIED",
email = request.email,
iOSBundleId = request.settings?.iOSBundle,
iOSAppStoreId = request.settings?.iOSAppStoreId,
continueUrl = request.settings?.url,
androidInstallApp = request.settings?.androidInstallApp,
androidMinimumVersion = request.settings?.androidMinimumVersion,
androidPackageName = request.settings?.androidPackageName,
canHandleCodeInApp = request.settings?.handleCodeInApp
)
Log.d(TAG, "callback: onResetPasswordResponse")
callbacks.onResetPasswordResponse(null)
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun sendGetOobConfirmationCodeEmailCompat(email: String?, actionCodeSettings: ActionCodeSettings?, callbacks: IFirebaseAuthCallbacks) {
sendGetOobConfirmationCodeEmail(SendGetOobConfirmationCodeEmailAidlRequest().apply { this.email = email; this.settings = actionCodeSettings }, callbacks)
}
override fun setFirebaseUiVersion(request: SetFirebaseUiVersionAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: setFirebaseUiVersion")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun setFirebaseUIVersionCompat(firebaseUiVersion: String?, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: setFirebaseUIVersionCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun signInAnonymously(request: SignInAnonymouslyAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
Log.d(TAG, "signInAnonymously")
try {
val tokenResult = client.signupNewUser(tenantId = request.tenantId)
val idToken = tokenResult.getString("idToken")
val refreshToken = tokenResult.getString("refreshToken")
val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse()
val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = true }
Log.d(TAG, "callback: onGetTokenResponseAndUser")
callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult)
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun signInAnonymouslyCompat(callbacks: IFirebaseAuthCallbacks) {
signInAnonymously(SignInAnonymouslyAidlRequest(), callbacks)
}
override fun signInWithCredential(request: SignInWithCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
Log.d(TAG, "signInWithCredential request: ${request.request}")
try {
val tokenResult = client.verifyAssertion(request.request.requestUri, request.request.postBody, request.request.returnSecureToken, request.request.returnIdpCredential)
Log.d(TAG, "signInWithCredential callback: $tokenResult ")
val idToken = tokenResult.getString("idToken")
val refreshToken = tokenResult.getString("refreshToken")
val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse()
val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser()
Log.d(TAG, "signInWithCredential callback: onGetTokenResponseAndUser")
callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult)
} catch (e: Exception) {
Log.w(TAG, "signInWithCredential callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun signInWithCredentialCompat(verifyAssertionRequest: VerifyAssertionRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "signInWithCredentialCompat verifyAssertionRequest: $verifyAssertionRequest")
signInWithCredential(SignInWithCredentialAidlRequest(verifyAssertionRequest), callbacks)
}
override fun signInWithCustomToken(request: SignInWithCustomTokenAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
Log.d(TAG, "signInWithCustomToken")
try {
val tokenResult = client.verifyCustomToken(token = request.token)
val idToken = tokenResult.getString("idToken")
val refreshToken = tokenResult.getString("refreshToken")
val isNewUser = tokenResult.optBoolean("isNewUser")
val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse()
val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = isNewUser }
Log.d(TAG, "callback: onGetTokenResponseAndUser")
callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult)
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun signInWithCustomTokenCompat(token: String, callbacks: IFirebaseAuthCallbacks) {
signInWithCustomToken(SignInWithCustomTokenAidlRequest().apply { this.token = token }, callbacks)
}
override fun signInWithEmailAndPassword(request: SignInWithEmailAndPasswordAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
Log.d(TAG, "signInWithEmailAndPassword")
try {
val tokenResult = client.verifyPassword(email = request.email, password = request.password, tenantId = request.tenantId)
val idToken = tokenResult.getString("idToken")
val refreshToken = tokenResult.getString("refreshToken")
val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse()
val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser()
Log.d(TAG, "callback: onGetTokenResponseAndUser")
callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult)
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun signInWithEmailAndPasswordCompat(email: String?, password: String?, callbacks: IFirebaseAuthCallbacks) {
signInWithEmailAndPassword(SignInWithEmailAndPasswordAidlRequest().apply { this.email = email; this.password = password }, callbacks)
}
override fun signInWithEmailLink(request: SignInWithEmailLinkAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: signInWithEmailLink")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun signInWithEmailLinkCompat(credential: EmailAuthCredential?, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: signInWithEmailLinkCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun signInWithPhoneNumber(request: SignInWithPhoneNumberAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
Log.d(TAG, "signInWithPhoneNumber")
try {
val tokenResult = client.verifyPhoneNumber(
phoneNumber = request.credential.phoneNumber,
temporaryProof = request.credential.temporaryProof,
sessionInfo = request.credential.sessionInfo,
code = request.credential.smsCode
)
val idToken = tokenResult.getString("idToken")
val refreshToken = tokenResult.getString("refreshToken")
val isNewUser = tokenResult.optBoolean("isNewUser")
val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse()
val accountInfoResult = client.getAccountInfo(idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = isNewUser }
Log.d(TAG, "callback: onGetTokenResponseAndUser")
callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult)
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun signInWithPhoneNumberCompat(credential: PhoneAuthCredential?, callbacks: IFirebaseAuthCallbacks) {
signInWithPhoneNumber(SignInWithPhoneNumberAidlRequest().apply { this.credential = credential }, callbacks)
}
override fun startMfaEnrollmentWithPhoneNumber(request: StartMfaPhoneNumberEnrollmentAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: startMfaEnrollmentWithPhoneNumber")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun startMfaSignInWithPhoneNumber(request: StartMfaPhoneNumberSignInAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: startMfaSignInWithPhoneNumber")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun unenrollMfa(request: UnenrollMfaAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: unenrollMfa")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun unlinkEmailCredential(request: UnlinkEmailCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: unlinkEmailCredential")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun unlinkEmailCredentialCompat(cachedState: String?, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: unlinkEmailCredentialCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun unlinkFederatedCredential(request: UnlinkFederatedCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: unlinkFederatedCredential")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun unlinkFederatedCredentialCompat(provider: String?, cachedState: String?, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: unlinkFederatedCredentialCompat")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun updateProfile(request: UpdateProfileAidlRequest, callbacks: IFirebaseAuthCallbacks) {
lifecycleScope.launchWhenStarted {
Log.d(TAG, "updateProfile")
try {
val getTokenResponse = refreshTokenResponse(request.cachedState)
val accountInfoResult = client.getAccountInfo(idToken = getTokenResponse.accessToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser()
val setAccountInfo = client.setAccountInfo(idToken = getTokenResponse.accessToken, localId = accountInfoResult.localId, displayName = request.request.displayName, photoUrl = request.request.photoUrl, deleteAttribute = request.request.deleteAttributeList).toGetAccountInfoUser()
accountInfoResult.photoUrl = setAccountInfo.photoUrl
accountInfoResult.displayName = setAccountInfo.displayName
callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult)
} catch (e: Exception) {
Log.w(TAG, "callback: onFailure", e)
callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message))
}
}
}
override fun updateProfileCompat(cachedState: String?, userProfileChangeRequest: UserProfileChangeRequest, callbacks: IFirebaseAuthCallbacks) {
updateProfile(UpdateProfileAidlRequest().apply { this.cachedState = cachedState; this.request = userProfileChangeRequest}, callbacks)
}
override fun verifyBeforeUpdateEmail(request: VerifyBeforeUpdateEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: verifyBeforeUpdateEmail")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
}
override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean {
if (super.onTransact(code, data, reply, flags)) return true
Log.d(TAG, "onTransact: $code, $data, $flags")
return false
}
}

View file

@ -0,0 +1,155 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.firebase.auth
import android.content.Context
import android.util.Log
import com.android.volley.NetworkResponse
import com.android.volley.ParseError
import com.android.volley.Request.Method.GET
import com.android.volley.Request.Method.POST
import com.android.volley.Response
import com.android.volley.VolleyError
import com.android.volley.toolbox.HttpHeaderParser
import com.android.volley.toolbox.JsonObjectRequest
import com.android.volley.toolbox.JsonRequest
import com.android.volley.toolbox.Volley
import org.json.JSONArray
import org.json.JSONException
import org.json.JSONObject
import org.microg.gms.utils.singleInstanceOf
import org.microg.gms.utils.toHexString
import java.io.UnsupportedEncodingException
import java.lang.RuntimeException
import java.nio.charset.Charset
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
import kotlin.coroutines.suspendCoroutine
private const val TAG = "GmsFirebaseAuthClient"
class IdentityToolkitClient(context: Context, private val apiKey: String, private val packageName: String? = null, private val certSha1Hash: ByteArray? = null) {
private val queue = singleInstanceOf { Volley.newRequestQueue(context.applicationContext) }
private fun buildRelyingPartyUrl(method: String) = "https://www.googleapis.com/identitytoolkit/v3/relyingparty/$method?key=$apiKey"
private fun buildStsUrl(method: String) = "https://securetoken.googleapis.com/v1/$method?key=$apiKey"
private fun getRequestHeaders(): Map<String, String> = hashMapOf<String, String>().apply {
if (packageName != null) put("X-Android-Package", packageName)
if (certSha1Hash != null) put("X-Android-Cert", certSha1Hash.toHexString().uppercase())
}
private suspend fun request(method: String, data: JSONObject): JSONObject = suspendCoroutine { continuation ->
queue.add(object : JsonObjectRequest(POST, buildRelyingPartyUrl(method), data, {
continuation.resume(it)
}, {
Log.d(TAG, "Error: ${it.networkResponse?.data?.decodeToString() ?: it.message}")
continuation.resumeWithException(RuntimeException(it))
}) {
override fun getHeaders(): Map<String, String> = getRequestHeaders()
})
}
suspend fun createAuthUri(identifier: String? = null, tenantId: String? = null, continueUri: String? = "http://localhost"): JSONObject =
request("createAuthUri", JSONObject()
.put("identifier", identifier)
.put("tenantId", tenantId)
.put("continueUri", continueUri))
suspend fun getAccountInfo(idToken: String? = null): JSONObject =
request("getAccountInfo", JSONObject()
.put("idToken", idToken))
suspend fun getProjectConfig(): JSONObject = suspendCoroutine { continuation ->
queue.add(JsonObjectRequest(GET, buildRelyingPartyUrl("getProjectConfig"), null, { continuation.resume(it) }, { continuation.resumeWithException(RuntimeException(it)) }))
}
suspend fun getOobConfirmationCode(requestType: String, email: String? = null, newEmail: String? = null, continueUrl: String? = null, idToken: String? = null, iOSBundleId: String? = null, iOSAppStoreId: String? = null, androidMinimumVersion: String? = null, androidInstallApp: Boolean? = null, androidPackageName: String? = null, canHandleCodeInApp: Boolean? = null): JSONObject =
request("getOobConfirmationCode", JSONObject()
.put("kind", "identitytoolkit#relyingparty")
.put("requestType", requestType)
.put("email", email)
.put("newEmail", newEmail)
.put("continueUrl", continueUrl)
.put("idToken", idToken)
.put("iOSBundleId", iOSBundleId)
.put("iOSAppStoreId", iOSAppStoreId)
.put("androidMinimumVersion", androidMinimumVersion)
.put("androidInstallApp", androidInstallApp)
.put("androidPackageName", androidPackageName)
.put("canHandleCodeInApp", canHandleCodeInApp))
suspend fun sendVerificationCode(phoneNumber: String? = null, reCaptchaToken: String? = null): JSONObject =
request("sendVerificationCode", JSONObject()
.put("phoneNumber", phoneNumber)
.put("recaptchaToken", reCaptchaToken))
suspend fun setAccountInfo(idToken: String? = null, localId: String? = null, email: String? = null, password: String? = null, displayName: String? = null, photoUrl: String? = null, deleteAttribute: List<String> = emptyList()): JSONObject =
request("setAccountInfo", JSONObject()
.put("idToken", idToken)
.put("localId", localId)
.put("email", email)
.put("password", password)
.put("displayName", displayName)
.put("photoUrl", photoUrl)
.put("deleteAttribute", JSONArray().apply { deleteAttribute.map { put(it) } }))
suspend fun signupNewUser(email: String? = null, password: String? = null, tenantId: String? = null): JSONObject =
request("signupNewUser", JSONObject()
.put("email", email)
.put("password", password)
.put("tenantId", tenantId))
suspend fun verifyCustomToken(token: String? = null, returnSecureToken: Boolean = true): JSONObject =
request("verifyCustomToken", JSONObject()
.put("token", token)
.put("returnSecureToken", returnSecureToken))
suspend fun verifyAssertion(requestUri: String? = null, postBody: String? = null, returnSecureToken: Boolean = true, returnIdpCredential: Boolean = true): JSONObject =
request("verifyAssertion", JSONObject()
.put("requestUri", requestUri)
.put("postBody", postBody)
.put("returnSecureToken", returnSecureToken)
.put("returnIdpCredential", returnIdpCredential))
suspend fun verifyPassword(email: String? = null, password: String? = null, tenantId: String? = null, returnSecureToken: Boolean = true): JSONObject =
request("verifyPassword", JSONObject()
.put("email", email)
.put("password", password)
.put("tenantId", tenantId)
.put("returnSecureToken", returnSecureToken))
suspend fun verifyPhoneNumber(phoneNumber: String? = null, sessionInfo: String? = null, code: String? = null, idToken: String? = null, verificationProof: String? = null, temporaryProof: String? = null): JSONObject =
request("verifyPhoneNumber", JSONObject()
.put("verificationProof", verificationProof)
.put("code", code)
.put("idToken", idToken)
.put("temporaryProof", temporaryProof)
.put("phoneNumber", phoneNumber)
.put("sessionInfo", sessionInfo))
suspend fun getTokenByRefreshToken(refreshToken: String): JSONObject = suspendCoroutine { continuation ->
queue.add(object : JsonRequest<JSONObject>(POST, buildStsUrl("token"), "grant_type=refresh_token&refresh_token=$refreshToken", { continuation.resume(it) }, { continuation.resumeWithException(RuntimeException(it)) }) {
override fun parseNetworkResponse(response: NetworkResponse): Response<JSONObject> {
return try {
val jsonString = String(response.data, Charset.forName(HttpHeaderParser.parseCharset(response.headers, PROTOCOL_CHARSET)))
Response.success(JSONObject(jsonString), null)
} catch (e: UnsupportedEncodingException) {
Response.error(ParseError(e))
} catch (je: JSONException) {
Response.error(ParseError(je))
}
}
override fun getBodyContentType(): String {
return "application/x-www-form-urlencoded"
}
override fun getHeaders(): Map<String, String> = getRequestHeaders()
})
}
}

View file

@ -0,0 +1,104 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.firebase.auth
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.content.Intent.*
import android.os.Bundle
import android.os.ResultReceiver
import android.util.Log
import android.webkit.JavascriptInterface
import android.webkit.WebSettings
import android.webkit.WebView
import androidx.appcompat.app.AppCompatActivity
import org.microg.gms.firebase.auth.core.R
import org.microg.gms.profile.Build
import org.microg.gms.profile.ProfileManager
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
import kotlin.coroutines.suspendCoroutine
private const val TAG = "GmsFirebaseAuthCaptcha"
class ReCaptchaActivity : AppCompatActivity() {
private val receiver: ResultReceiver?
get() = intent.getParcelableExtra(EXTRA_RESULT_RECEIVER)
private val hostname: String
get() = intent.getStringExtra(EXTRA_HOSTNAME) ?: "localhost:5000"
private var finished = false
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
openWebsite()
}
@SuppressLint("SetJavaScriptEnabled", "AddJavascriptInterface")
private fun openWebsite() {
val apiKey = intent.getStringExtra(EXTRA_API_KEY) ?: return finishResult(Activity.RESULT_CANCELED)
setContentView(R.layout.activity_recaptcha)
val view = findViewById<WebView>(R.id.web)
val settings = view.settings
settings.javaScriptEnabled = true
settings.useWideViewPort = false
settings.setSupportZoom(false)
settings.displayZoomControls = false
settings.cacheMode = WebSettings.LOAD_NO_CACHE
ProfileManager.ensureInitialized(this)
settings.userAgentString = Build.generateWebViewUserAgentString(settings.userAgentString)
view.addJavascriptInterface(ReCaptchaCallback(this), "MyCallback")
val captcha = assets.open("recaptcha.html").bufferedReader().readText().replace("%apikey%", apiKey)
view.loadDataWithBaseURL("https://$hostname/", captcha, null, null, "https://$hostname/")
}
fun finishResult(resultCode: Int, token: String? = null) {
finished = true
setResult(resultCode, token?.let { Intent().apply { putExtra(EXTRA_TOKEN, it) } })
receiver?.send(resultCode, token?.let { Bundle().apply { putString(EXTRA_TOKEN, it) } })
finish()
}
override fun onDestroy() {
super.onDestroy()
if (!finished) receiver?.send(Activity.RESULT_CANCELED, null)
}
companion object {
class ReCaptchaCallback(val activity: ReCaptchaActivity) {
@JavascriptInterface
fun onReCaptchaToken(token: String) {
Log.d(TAG, "onReCaptchaToken: $token")
activity.finishResult(Activity.RESULT_OK, token)
}
}
fun isSupported(context: Context): Boolean = true
suspend fun awaitToken(context: Context, apiKey: String, hostname: String? = null) = suspendCoroutine<String> { continuation ->
val intent = Intent(context, ReCaptchaActivity::class.java)
val resultReceiver = object : ResultReceiver(null) {
override fun onReceiveResult(resultCode: Int, resultData: Bundle?) {
try {
if (resultCode == Activity.RESULT_OK) {
continuation.resume(resultData?.getString(EXTRA_TOKEN)!!)
}
} catch (e: Exception) {
continuation.resumeWithException(e)
}
}
}
intent.putExtra(EXTRA_API_KEY, apiKey)
intent.putExtra(EXTRA_RESULT_RECEIVER, resultReceiver)
intent.putExtra(EXTRA_HOSTNAME, hostname)
intent.addFlags(FLAG_ACTIVITY_NEW_TASK)
intent.addFlags(FLAG_ACTIVITY_REORDER_TO_FRONT)
intent.addFlags(FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
context.startActivity(intent)
}
}
}

View file

@ -0,0 +1,173 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.firebase.auth
import android.annotation.SuppressLint
import android.app.Activity
import android.app.Service
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.ServiceConnection
import android.graphics.PixelFormat
import android.os.Bundle
import android.os.IBinder
import android.os.ResultReceiver
import android.provider.Settings
import android.util.DisplayMetrics
import android.util.Log
import android.view.*
import android.webkit.JavascriptInterface
import android.webkit.WebSettings
import android.webkit.WebView
import android.widget.FrameLayout
import org.microg.gms.firebase.auth.core.R
import org.microg.gms.profile.Build
import org.microg.gms.profile.ProfileManager
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
import kotlin.coroutines.suspendCoroutine
private const val TAG = "GmsFirebaseAuthCaptcha"
class ReCaptchaOverlayService : Service() {
private var receiver: ResultReceiver? = null
private var hostname: String? = null
private var apiKey: String? = null
private var finished = false
private var container: View? = null
private var windowManager: WindowManager? = null
override fun onBind(intent: Intent): IBinder? {
init(intent)
return null
}
override fun onUnbind(intent: Intent?): Boolean {
finishResult(Activity.RESULT_CANCELED)
return super.onUnbind(intent)
}
private fun init(intent: Intent) {
apiKey = intent.getStringExtra(EXTRA_API_KEY) ?: return finishResult(Activity.RESULT_CANCELED)
receiver = intent.getParcelableExtra(EXTRA_RESULT_RECEIVER)
hostname = intent.getStringExtra(EXTRA_HOSTNAME) ?: "localhost:5000"
windowManager = getSystemService(Context.WINDOW_SERVICE) as WindowManager
show()
}
@SuppressLint("SetJavaScriptEnabled", "AddJavascriptInterface")
private fun show() {
val layoutParamsType = if (android.os.Build.VERSION.SDK_INT >= 26) {
WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY
} else {
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT
}
val params = WindowManager.LayoutParams(
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.WRAP_CONTENT,
layoutParamsType,
0,
PixelFormat.TRANSLUCENT)
params.gravity = Gravity.CENTER or Gravity.START
params.x = 0
params.y = 0
val interceptorLayout: FrameLayout = object : FrameLayout(this) {
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
if (event.action == KeyEvent.ACTION_DOWN) {
if (event.keyCode == KeyEvent.KEYCODE_BACK || event.keyCode == KeyEvent.KEYCODE_HOME) {
finishResult(Activity.RESULT_CANCELED)
return true
}
}
return super.dispatchKeyEvent(event)
}
}
val inflater = getSystemService(Context.LAYOUT_INFLATER_SERVICE) as? LayoutInflater?
if (inflater != null) {
val container = inflater.inflate(R.layout.activity_recaptcha, interceptorLayout)
this.container = container
container.setBackgroundResource(androidx.appcompat.R.drawable.abc_dialog_material_background)
val pad = (5.0 * (resources.displayMetrics.densityDpi.toFloat() / DisplayMetrics.DENSITY_DEFAULT)).toInt()
container.setOnTouchListener { v, _ ->
v.performClick()
finishResult(Activity.RESULT_CANCELED)
return@setOnTouchListener true
}
val view = container.findViewById<WebView>(R.id.web)
view.setPadding(pad, pad, pad, pad)
val settings = view.settings
settings.javaScriptEnabled = true
settings.useWideViewPort = false
settings.setSupportZoom(false)
settings.displayZoomControls = false
settings.cacheMode = WebSettings.LOAD_NO_CACHE
ProfileManager.ensureInitialized(this)
settings.userAgentString = Build.generateWebViewUserAgentString(settings.userAgentString)
view.addJavascriptInterface(ReCaptchaCallback(this), "MyCallback")
val captcha = assets.open("recaptcha.html").bufferedReader().readText().replace("%apikey%", apiKey!!)
view.loadDataWithBaseURL("https://$hostname/", captcha, null, null, "https://$hostname/")
windowManager?.addView(container, params)
}
}
fun finishResult(resultCode: Int, token: String? = null) {
if (!finished) {
finished = true
receiver?.send(resultCode, token?.let { Bundle().apply { putString(EXTRA_TOKEN, it) } })
}
container?.let { windowManager?.removeView(it) }
}
companion object {
private val recaptchaServiceConnection = object : ServiceConnection {
override fun onServiceConnected(name: ComponentName?, service: IBinder?) {
Log.d(TAG, "onReCaptchaToken: onServiceConnected: $name")
}
override fun onServiceDisconnected(name: ComponentName?) {
Log.d(TAG, "onReCaptchaToken: onServiceDisconnected: $name")
}
}
class ReCaptchaCallback(private val overlay: ReCaptchaOverlayService) {
@JavascriptInterface
fun onReCaptchaToken(token: String) {
Log.d(TAG, "onReCaptchaToken: $token")
overlay.finishResult(Activity.RESULT_OK, token)
}
}
fun isSupported(context: Context): Boolean = android.os.Build.VERSION.SDK_INT < 23 || Settings.canDrawOverlays(context)
suspend fun awaitToken(context: Context, apiKey: String, hostname: String? = null) = suspendCoroutine { continuation ->
val intent = Intent(context, ReCaptchaOverlayService::class.java)
val resultReceiver = object : ResultReceiver(null) {
override fun onReceiveResult(resultCode: Int, resultData: Bundle?) {
context.unbindService(recaptchaServiceConnection)
try {
if (resultCode == Activity.RESULT_OK) {
continuation.resume(resultData?.getString(EXTRA_TOKEN)!!)
}
} catch (e: Exception) {
continuation.resumeWithException(e)
}
}
}
intent.putExtra(EXTRA_API_KEY, apiKey)
intent.putExtra(EXTRA_RESULT_RECEIVER, resultReceiver)
intent.putExtra(EXTRA_HOSTNAME, hostname)
context.bindService(intent, recaptchaServiceConnection, BIND_AUTO_CREATE)
}
}
}

View file

@ -0,0 +1,11 @@
/**
* SPDX-FileCopyrightText: 2024 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.firebase.auth
const val EXTRA_TOKEN = "token"
const val EXTRA_API_KEY = "api_key"
const val EXTRA_HOSTNAME = "hostname"
const val EXTRA_RESULT_RECEIVER = "receiver"

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="450dp"
android:orientation="vertical">
<WebView
android:id="@+id/web"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:minHeight="450dp" />
</FrameLayout>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest />

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth;
parcelable ActionCodeSettings;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth;
parcelable EmailAuthCredential;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth;
parcelable PhoneAuthCredential;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth;
parcelable UserProfileChangeRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable ApplyActionCodeAidlRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable ChangeEmailAidlRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable ChangePasswordAidlRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable CheckActionCodeAidlRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable ConfirmPasswordResetAidlRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable CreateAuthUriResponse;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable CreateUserWithEmailAndPasswordAidlRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable DeleteAidlRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable FinalizeMfaEnrollmentAidlRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable FinalizeMfaSignInAidlRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable GetAccessTokenAidlRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable GetAccountInfoUser;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable GetProvidersForEmailAidlRequest;

View file

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable GetTokenResponse;

Some files were not shown because too many files have changed in this diff Show more