Repository: microg/FakeStore Branch: main Commit: 133090a90ca4 Files: 44 Total size: 178.0 KB Directory structure: gitextract_2pkub_qd/ ├── .github/ │ └── workflows/ │ ├── build.yml │ └── reuse.yml ├── .gitignore ├── .reuse/ │ └── dep5 ├── LICENSES/ │ ├── Apache-2.0.txt │ ├── CC-BY-SA-4.0.txt │ └── CC0-1.0.txt ├── README.md ├── build.gradle ├── fake-signature/ │ ├── build.gradle │ └── src/ │ └── main/ │ ├── AndroidManifest.xml │ ├── aidl/ │ │ └── com/ │ │ └── huawei/ │ │ └── signature/ │ │ └── diff/ │ │ └── ISignatureService.aidl │ ├── java/ │ │ └── com/ │ │ └── huawei/ │ │ └── signature/ │ │ └── diff/ │ │ ├── AppListDatabaseOpenHelper.java │ │ ├── InitProvider.java │ │ ├── InitReceiver.java │ │ └── SignatureService.java │ └── res/ │ └── values/ │ ├── arrays.xml │ └── signature.xml ├── fake-store/ │ ├── build.gradle │ └── src/ │ └── main/ │ ├── AndroidManifest.xml │ ├── aidl/ │ │ └── com/ │ │ ├── android/ │ │ │ └── vending/ │ │ │ ├── billing/ │ │ │ │ └── IInAppBillingService.aidl │ │ │ └── licensing/ │ │ │ ├── ILicenseResultListener.aidl │ │ │ ├── ILicenseV2ResultListener.aidl │ │ │ └── ILicensingService.aidl │ │ └── google/ │ │ └── android/ │ │ └── finsky/ │ │ └── externalreferrer/ │ │ └── IGetInstallReferrerService.aidl │ ├── java/ │ │ ├── com/ │ │ │ ├── android/ │ │ │ │ └── vending/ │ │ │ │ ├── GrantFakeSignaturePermissionActivity.java │ │ │ │ ├── billing/ │ │ │ │ │ └── InAppBillingService.java │ │ │ │ └── licensing/ │ │ │ │ └── LicensingService.java │ │ │ └── google/ │ │ │ └── android/ │ │ │ └── finsky/ │ │ │ └── externalreferrer/ │ │ │ └── GetInstallReferrerService.java │ │ └── org/ │ │ └── microg/ │ │ └── vending/ │ │ └── ui/ │ │ └── MainActivity.java │ └── res/ │ ├── drawable-v26/ │ │ ├── ic_app_foreground.xml │ │ └── ic_app_foreground_mono.xml │ ├── mipmap-anydpi-v26/ │ │ ├── ic_app.xml │ │ └── ic_app_round.xml │ ├── values/ │ │ ├── strings.xml │ │ └── styles.xml │ ├── values-v11/ │ │ └── styles.xml │ └── values-v26/ │ └── ic_app_background.xml ├── gradle/ │ └── wrapper/ │ ├── gradle-wrapper.jar │ ├── gradle-wrapper.jar.license │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/workflows/build.yml ================================================ # SPDX-FileCopyrightText: 2020 microG Team # SPDX-License-Identifier: CC0-1.0 name: Build on: [pull_request, push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - uses: actions/setup-java@v3 with: distribution: adopt java-version: 17 cache: gradle - run: ./gradlew --no-daemon build env: TERM: dumb JAVA_OPTS: -Xmx2048m ================================================ FILE: .github/workflows/reuse.yml ================================================ # SPDX-FileCopyrightText: 2020 microG Team # SPDX-License-Identifier: CC0-1.0 name: REUSE Compliance Check on: [pull_request, push] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: fsfe/reuse-action@v1 ================================================ FILE: .gitignore ================================================ # SPDX-FileCopyrightText: 2014 microG Project Team # SPDX-License-Identifier: CC0-1.0 build/ .idea/ .gradle/ user.gradle local.properties *.iml ================================================ FILE: .reuse/dep5 ================================================ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Files: fake-store/src/main/res/mipmap-*/*.png Copyright: 2023 microG Project Team License: CC-BY-SA-4.0 ================================================ FILE: LICENSES/Apache-2.0.txt ================================================ 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. ================================================ FILE: LICENSES/CC-BY-SA-4.0.txt ================================================ Creative Commons Attribution-ShareAlike 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 reason–for example, because of any applicable exception or limitation to copyright–then 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-ShareAlike 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-ShareAlike 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. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. d. 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. e. 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. f. 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. g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. i. 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. j. Licensor means the individual(s) or entity(ies) granting rights under this Public License. k. 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. l. 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. m. 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. Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter's License You apply. C. 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. b. ShareAlike.In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. 1. The Adapter's License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. 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, including for purposes of Section 3(b); 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. ================================================ FILE: LICENSES/CC0-1.0.txt ================================================ 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. ================================================ FILE: README.md ================================================ FakeStore ========= An empty package that mocks the existence of the Google Play Store to the Play Services client. Requires the FAKE_PACKAGE_SIGNATURE patch to be functional. License ------- - Code is licensed under [Apache License 2.0](LICENSES/Apache-2.0) - Documentation and artwork are licensed under [Creative Commons Attribution-ShareAlike 4.0](LICENSES/CC-BY-SA-4.0) - Some files are placed unter the public domain using [Creative Commons CC0 1.0 Public Domain Dedication](LICENSES/CCO-1.0) ================================================ FILE: build.gradle ================================================ /* * SPDX-FileCopyrightText: 2015 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ buildscript { repositories { mavenCentral() google() } dependencies { classpath 'com.android.tools.build:gradle:8.0.1' } } def versionCode() { def stdout = new ByteArrayOutputStream() exec { commandLine 'git', 'rev-list', '--count', "HEAD"; standardOutput = stdout } return Integer.parseInt(stdout.toString().trim()) + 83700000 } def versionName() { def stdout = new ByteArrayOutputStream() if (rootProject.file("gradlew").exists()) exec { commandLine 'git', 'describe', '--tags', '--always', '--dirty'; standardOutput = stdout } else // automatic build system, don't tag dirty exec { commandLine 'git', 'describe', '--tags', '--always'; standardOutput = stdout } return stdout.toString().trim().substring(1) } allprojects { apply plugin: 'idea' version = versionName() ext.androidBuildVersionTools = "30.0.3" ext.appVersionCode = versionCode() ext.androidCompileSdk = 30 ext.androidTargetSdk = 29 ext.androidMinSdk = 9 } subprojects { group = 'org.microg' repositories { mavenCentral() google() } } ================================================ FILE: fake-signature/build.gradle ================================================ /* * 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 } buildFeatures { aidl = true } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { } ================================================ FILE: fake-signature/src/main/AndroidManifest.xml ================================================ ================================================ FILE: fake-signature/src/main/aidl/com/huawei/signature/diff/ISignatureService.aidl ================================================ /* * 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); } ================================================ FILE: fake-signature/src/main/java/com/huawei/signature/diff/AppListDatabaseOpenHelper.java ================================================ /* * 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 = 2; 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); 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_IGNORE); } for (String app : neverFakeApps) { db.insertWithOnConflict(TABLE_APPLIST, null, generateValues(app, false), SQLiteDatabase.CONFLICT_IGNORE); } } 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); } } ================================================ FILE: fake-signature/src/main/java/com/huawei/signature/diff/InitProvider.java ================================================ /* * 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.class.getSimpleName(); @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 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; } } ================================================ FILE: fake-signature/src/main/java/com/huawei/signature/diff/InitReceiver.java ================================================ /* * 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; /** * This is to make sure the process is initialized at boot. */ public class InitReceiver extends BroadcastReceiver { @SuppressLint("UnsafeProtectedBroadcastReceiver") @Override public void onReceive(Context context, Intent intent) { // We don't need to do anything, the process is already started. } } ================================================ FILE: fake-signature/src/main/java/com/huawei/signature/diff/SignatureService.java ================================================ /* * 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.getReadableDatabase(); 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.getCallingPid() > 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: fake-signature/src/main/res/values/arrays.xml ================================================ com.google.android.gms com.android.vending com.truecaller ================================================ FILE: fake-signature/src/main/res/values/signature.xml ================================================ 308204433082032ba003020102020900c2e08746644a308d300d06092a864886f70d01010405003074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964301e170d3038303832313233313333345a170d3336303130373233313333345a3074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f696430820120300d06092a864886f70d01010105000382010d00308201080282010100ab562e00d83ba208ae0a966f124e29da11f2ab56d08f58e2cca91303e9b754d372f640a71b1dcb130967624e4656a7776a92193db2e5bfb724a91e77188b0e6a47a43b33d9609b77183145ccdf7b2e586674c9e1565b1f4c6a5955bff251a63dabf9c55c27222252e875e4f8154a645f897168c0b1bfc612eabf785769bb34aa7984dc7e2ea2764cae8307d8c17154d7ee5f64a51a44a602c249054157dc02cd5f5c0e55fbef8519fbe327f0b1511692c5a06f19d18385f5c4dbc2d6b93f68cc2979c70e18ab93866b3bd5db8999552a0e3b4c99df58fb918bedc182ba35e003c1b4b10dd244a8ee24fffd333872ab5221985edab0fc0d0b145b6aa192858e79020103a381d93081d6301d0603551d0e04160414c77d8cc2211756259a7fd382df6be398e4d786a53081a60603551d2304819e30819b8014c77d8cc2211756259a7fd382df6be398e4d786a5a178a4763074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964820900c2e08746644a308d300c0603551d13040530030101ff300d06092a864886f70d010104050003820101006dd252ceef85302c360aaace939bcff2cca904bb5d7a1661f8ae46b2994204d0ff4a68c7ed1a531ec4595a623ce60763b167297a7ae35712c407f208f0cb109429124d7b106219c084ca3eb3f9ad5fb871ef92269a8be28bf16d44c8d9a08e6cb2f005bb3fe2cb96447e868e731076ad45b33f6009ea19c161e62641aa99271dfd5228c5c587875ddb7f452758d661f6cc0cccb7352e424cc4365c523532f7325137593c4ae341f4db41edda0d0b1071a7c440f0fe9ea01cb627ca674369d084bd2fd911ff06cdbf2cfa10dc0f893ae35762919048c7efc64c7144178342f70581c9de573af55b390dd7fdb9418631895d5f759f30112687ff621410c069308a 308202ed308201d5a003020102020426ffa009300d06092a864886f70d01010b05003027310b300906035504061302444531183016060355040a130f4e4f47415050532050726f6a656374301e170d3132313030363132303533325a170d3337303933303132303533325a3027310b300906035504061302444531183016060355040a130f4e4f47415050532050726f6a65637430820122300d06092a864886f70d01010105000382010f003082010a02820101009a8d2a5336b0eaaad89ce447828c7753b157459b79e3215dc962ca48f58c2cd7650df67d2dd7bda0880c682791f32b35c504e43e77b43c3e4e541f86e35a8293a54fb46e6b16af54d3a4eda458f1a7c8bc1b7479861ca7043337180e40079d9cdccb7e051ada9b6c88c9ec635541e2ebf0842521c3024c826f6fd6db6fd117c74e859d5af4db04448965ab5469b71ce719939a06ef30580f50febf96c474a7d265bb63f86a822ff7b643de6b76e966a18553c2858416cf3309dd24278374bdd82b4404ef6f7f122cec93859351fc6e5ea947e3ceb9d67374fe970e593e5cd05c905e1d24f5a5484f4aadef766e498adf64f7cf04bddd602ae8137b6eea40722d0203010001a321301f301d0603551d0e04160414110b7aa9ebc840b20399f69a431f4dba6ac42a64300d06092a864886f70d01010b0500038201010007c32ad893349cf86952fb5a49cfdc9b13f5e3c800aece77b2e7e0e9c83e34052f140f357ec7e6f4b432dc1ed542218a14835acd2df2deea7efd3fd5e8f1c34e1fb39ec6a427c6e6f4178b609b369040ac1f8844b789f3694dc640de06e44b247afed11637173f36f5886170fafd74954049858c6096308fc93c1bc4dd5685fa7a1f982a422f2a3b36baa8c9500474cf2af91c39cbec1bc898d10194d368aa5e91f1137ec115087c31962d8f76cd120d28c249cf76f4c70f5baa08c70a7234ce4123be080cee789477401965cfe537b924ef36747e8caca62dfefdd1a6288dcb1c4fd2aaa6131a7ad254e9742022cfd597d2ca5c660ce9e41ff537e5a4041e37 ================================================ FILE: fake-store/build.gradle ================================================ /* * SPDX-FileCopyrightText: 2015 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ apply plugin: 'com.android.application' android { namespace "com.android.vending" compileSdkVersion androidCompileSdk buildToolsVersion "$androidBuildVersionTools" defaultConfig { versionName version versionCode appVersionCode minSdkVersion androidMinSdk targetSdkVersion androidTargetSdk } buildFeatures { aidl = true } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { implementation project(':fake-signature') } if (file('user.gradle').exists()) { apply from: 'user.gradle' } ================================================ FILE: fake-store/src/main/AndroidManifest.xml ================================================ ================================================ FILE: fake-store/src/main/aidl/com/android/vending/billing/IInAppBillingService.aidl ================================================ /* * SPDX-FileCopyrightText: 2012 Google Inc. * SPDX-License-Identifier: Apache-2.0 */ /* * Copyright (c) 2012 Google Inc. * * 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. */ package com.android.vending.billing; import android.os.Bundle; /** * InAppBillingService is the service that provides in-app billing version 3 and beyond. * This service provides the following features: * 1. Provides a new API to get details of in-app items published for the app including * price, type, title and description. * 2. The purchase flow is synchronous and purchase information is available immediately * after it completes. * 3. Purchase information of in-app purchases is maintained within the Google Play system * till the purchase is consumed. * 4. An API to consume a purchase of an inapp item. All purchases of one-time * in-app items are consumable and thereafter can be purchased again. * 5. An API to get current purchases of the user immediately. This will not contain any * consumed purchases. * * All calls will give a response code with the following possible values * RESULT_OK = 0 - success * RESULT_USER_CANCELED = 1 - User pressed back or canceled a dialog * RESULT_SERVICE_UNAVAILABLE = 2 - The network connection is down * RESULT_BILLING_UNAVAILABLE = 3 - This billing API version is not supported for the type requested * RESULT_ITEM_UNAVAILABLE = 4 - Requested SKU is not available for purchase * RESULT_DEVELOPER_ERROR = 5 - Invalid arguments provided to the API * RESULT_ERROR = 6 - Fatal error during the API action * RESULT_ITEM_ALREADY_OWNED = 7 - Failure to purchase since item is already owned * RESULT_ITEM_NOT_OWNED = 8 - Failure to consume since item is not owned */ interface IInAppBillingService { /** * Checks support for the requested billing API version, package and in-app type. * Minimum API version supported by this interface is 3. * @param apiVersion billing API version that the app is using * @param packageName the package name of the calling app * @param type type of the in-app item being purchased ("inapp" for one-time purchases * and "subs" for subscriptions) * @return RESULT_OK(0) on success and appropriate response code on failures. */ int isBillingSupported(int apiVersion, String packageName, String type) = 0; /** * Provides details of a list of SKUs * Given a list of SKUs of a valid type in the skusBundle, this returns a bundle * with a list JSON strings containing the productId, price, title and description. * This API can be called with a maximum of 20 SKUs. * @param apiVersion billing API version that the app is using * @param packageName the package name of the calling app * @param type of the in-app items ("inapp" for one-time purchases * and "subs" for subscriptions) * @param skusBundle bundle containing a StringArrayList of SKUs with key "ITEM_ID_LIST" * @return Bundle containing the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes * on failures. * "DETAILS_LIST" with a StringArrayList containing purchase information * in JSON format similar to: * '{ "productId" : "exampleSku", * "type" : "inapp", * "price" : "$5.00", * "price_currency": "USD", * "price_amount_micros": 5000000, * "title : "Example Title", * "description" : "This is an example description" }' */ Bundle getSkuDetails(int apiVersion, String packageName, String type, in Bundle skusBundle) = 1; /** * Returns a pending intent to launch the purchase flow for an in-app item by providing a SKU, * the type, a unique purchase token and an optional developer payload. * @param apiVersion billing API version that the app is using * @param packageName package name of the calling app * @param sku the SKU of the in-app item as published in the developer console * @param type of the in-app item being purchased ("inapp" for one-time purchases * and "subs" for subscriptions) * @param developerPayload optional argument to be sent back with the purchase information * @return Bundle containing the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes * on failures. * "BUY_INTENT" - PendingIntent to start the purchase flow * * The Pending intent should be launched with startIntentSenderForResult. When purchase flow * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. * If the purchase is successful, the result data will contain the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response * codes on failures. * "INAPP_PURCHASE_DATA" - String in JSON format similar to * '{"orderId":"12999763169054705758.1371079406387615", * "packageName":"com.example.app", * "productId":"exampleSku", * "purchaseTime":1345678900000, * "purchaseToken" : "122333444455555", * "developerPayload":"example developer payload" }' * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that * was signed with the private key of the developer * TODO: change this to app-specific keys. */ Bundle getBuyIntent(int apiVersion, String packageName, String sku, String type, String developerPayload) = 2; /** * Returns the current SKUs owned by the user of the type and package name specified along with * purchase information and a signature of the data to be validated. * This will return all SKUs that have been purchased in V3 and managed items purchased using * V1 and V2 that have not been consumed. * @param apiVersion billing API version that the app is using * @param packageName package name of the calling app * @param type of the in-app items being requested ("inapp" for one-time purchases * and "subs" for subscriptions) * @param continuationToken to be set as null for the first call, if the number of owned * skus are too many, a continuationToken is returned in the response bundle. * This method can be called again with the continuation token to get the next set of * owned skus. * @return Bundle containing the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes on failures. * "INAPP_PURCHASE_ITEM_LIST" - StringArrayList containing the list of SKUs * "INAPP_PURCHASE_DATA_LIST" - StringArrayList containing the purchase information * "INAPP_DATA_SIGNATURE_LIST"- StringArrayList containing the signatures * of the purchase information * "INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the * next set of in-app purchases. Only set if the * user has more owned skus than the current list. */ Bundle getPurchases(int apiVersion, String packageName, String type, String continuationToken) = 3; /** * Consume the last purchase of the given SKU. This will result in this item being removed * from all subsequent responses to getPurchases() and allow re-purchase of this item. * @param apiVersion billing API version that the app is using * @param packageName package name of the calling app * @param purchaseToken token in the purchase information JSON that identifies the purchase * to be consumed * @return RESULT_OK(0) if consumption succeeded, appropriate response codes on failures. */ int consumePurchase(int apiVersion, String packageName, String purchaseToken) = 4; /** * Returns a pending intent to launch the purchase flow for upgrading or downgrading a * subscription. The existing owned SKU(s) should be provided along with the new SKU that * the user is upgrading or downgrading to. * @param apiVersion billing API version that the app is using, must be 5 or later * @param packageName package name of the calling app * @param oldSkus the SKU(s) that the user is upgrading or downgrading from, * if null or empty this method will behave like {@link #getBuyIntent} * @param newSku the SKU that the user is upgrading or downgrading to * @param type of the item being purchased, currently must be "subs" * @param developerPayload optional argument to be sent back with the purchase information * @return Bundle containing the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes * on failures. * "BUY_INTENT" - PendingIntent to start the purchase flow * * The Pending intent should be launched with startIntentSenderForResult. When purchase flow * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. * If the purchase is successful, the result data will contain the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response * codes on failures. * "INAPP_PURCHASE_DATA" - String in JSON format similar to * '{"orderId":"12999763169054705758.1371079406387615", * "packageName":"com.example.app", * "productId":"exampleSku", * "purchaseTime":1345678900000, * "purchaseToken" : "122333444455555", * "developerPayload":"example developer payload" }' * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that * was signed with the private key of the developer * TODO: change this to app-specific keys. */ Bundle getBuyIntentToReplaceSkus(int apiVersion, String packageName, in List oldSkus, String newSku, String type, String developerPayload) = 6; Bundle getBuyIntentV6(int apiVersion, String packageName, String sku, String type, String developerPayload, in Bundle extras) = 7; Bundle getPurchasesV6(int apiVersion, String packageName, String type, String continuationToken, in Bundle extras) = 8; int isBillingSupportedV7(int apiVersion, String packageName, String type, in Bundle extras) = 9; Bundle getPurchasesV9(int apiVersion, String packageName, String type, String continuationToken, in Bundle extras) = 10; Bundle consumePurchaseV9(int apiVersion, String packageName, String purchaseToken, in Bundle extras) = 11; Bundle getPriceChangeConfirmationIntent(int apiVersion, String packageName, String sku, String type, in Bundle extras) = 800; Bundle getSkuDetailsV10(int apiVersion, String packageName, String type, in Bundle skuBundle, in Bundle extras) = 900; Bundle acknowledgePurchase(int apiVersion, String packageName, String purchaseToken, in Bundle extras) = 901; } ================================================ FILE: fake-store/src/main/aidl/com/android/vending/licensing/ILicenseResultListener.aidl ================================================ /* * SPDX-FileCopyrightText: 2010 The Android Open Source Project * SPDX-FileCopyrightText: 2023 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ package com.android.vending.licensing; interface ILicenseResultListener { oneway void verifyLicense(int responseCode, String signedData, String signature); } ================================================ FILE: fake-store/src/main/aidl/com/android/vending/licensing/ILicenseV2ResultListener.aidl ================================================ /* * SPDX-FileCopyrightText: 2010 The Android Open Source Project * SPDX-FileCopyrightText: 2023 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ package com.android.vending.licensing; interface ILicenseV2ResultListener { oneway void verifyLicense(int responseCode, in Bundle responsePayload); } ================================================ FILE: fake-store/src/main/aidl/com/android/vending/licensing/ILicensingService.aidl ================================================ /* * SPDX-FileCopyrightText: 2010 The Android Open Source Project * SPDX-FileCopyrightText: 2023 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ package com.android.vending.licensing; import com.android.vending.licensing.ILicenseResultListener; import com.android.vending.licensing.ILicenseV2ResultListener; interface ILicensingService { oneway void checkLicense(long nonce, String packageName, ILicenseResultListener listener); oneway void checkLicenseV2(String packageName, ILicenseV2ResultListener listener, in Bundle extraParams); } ================================================ FILE: fake-store/src/main/aidl/com/google/android/finsky/externalreferrer/IGetInstallReferrerService.aidl ================================================ /* * SPDX-FileCopyrightText: 2023 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ package com.google.android.finsky.externalreferrer; interface IGetInstallReferrerService { Bundle getInstallReferrer(in Bundle request); } ================================================ FILE: fake-store/src/main/java/com/android/vending/GrantFakeSignaturePermissionActivity.java ================================================ /* * SPDX-FileCopyrightText: 2016 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ package com.android.vending; import android.annotation.TargetApi; import android.app.Activity; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; @TargetApi(Build.VERSION_CODES.M) public class GrantFakeSignaturePermissionActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (checkSelfPermission("android.permission.FAKE_PACKAGE_SIGNATURE") != PackageManager.PERMISSION_GRANTED) { requestPermissions(new String[]{"android.permission.FAKE_PACKAGE_SIGNATURE"}, 1); } else { setResult(RESULT_OK); finish(); } } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { if (requestCode == 1 && grantResults.length == 1) { setResult(grantResults[0] == PackageManager.PERMISSION_GRANTED ? RESULT_OK : RESULT_CANCELED); finish(); } } } ================================================ FILE: fake-store/src/main/java/com/android/vending/billing/InAppBillingService.java ================================================ /* * SPDX-FileCopyrightText: 2016 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ package com.android.vending.billing; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.os.Parcel; import android.os.RemoteException; import android.util.Log; import java.util.ArrayList; import java.util.List; public class InAppBillingService extends Service { private static final String TAG = "FakeInAppStore"; private final IInAppBillingService.Stub mInAppBillingService = new IInAppBillingService.Stub() { @Override public int isBillingSupported(int apiVersion, String packageName, String type) throws RemoteException { return isBillingSupportedV7(apiVersion, packageName, type, new Bundle()); } @Override public Bundle getSkuDetails(int apiVersion, String packageName, String type, Bundle skusBundle) throws RemoteException { return getSkuDetailsV10(apiVersion, packageName, type, skusBundle, new Bundle()); } @Override public Bundle getBuyIntent(int apiVersion, String packageName, String sku, String type, String developerPayload) throws RemoteException { return getBuyIntentV6(apiVersion, packageName, sku, type, developerPayload, new Bundle()); } @Override public Bundle getPurchases(int apiVersion, String packageName, String type, String continuationToken) throws RemoteException { return getPurchasesV6(apiVersion, packageName, type, continuationToken, new Bundle()); } @Override public int consumePurchase(int apiVersion, String packageName, String purchaseToken) throws RemoteException { return consumePurchaseV9(apiVersion, packageName, purchaseToken, new Bundle()).getInt("RESPONSE_CODE", 8); } @Override public Bundle getBuyIntentToReplaceSkus(int apiVersion, String packageName, List oldSkus, String newSku, String type, String developerPayload) throws RemoteException { Log.d(TAG, "getBuyIntentToReplaceSkus(" + apiVersion + ", " + packageName + ", " + newSku + ", " + type + ", " + developerPayload + ")"); Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 4); return data; } @Override public Bundle getBuyIntentV6(int apiVersion, String packageName, String sku, String type, String developerPayload, Bundle extras) throws RemoteException { Log.d(TAG, "getBuyIntent(" + apiVersion + ", " + packageName + ", " + sku + ", " + type + ", " + developerPayload + ")"); Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 4); return data; } @Override public Bundle getPurchasesV6(int apiVersion, String packageName, String type, String continuationToken, Bundle extras) throws RemoteException { return getPurchasesV9(apiVersion, packageName, type, continuationToken, extras); } @Override public int isBillingSupportedV7(int apiVersion, String packageName, String type, Bundle extras) throws RemoteException { Log.d(TAG, "isBillingSupported(" + apiVersion + ", " + packageName + ", " + type + ")"); return 0; } @Override public Bundle getPurchasesV9(int apiVersion, String packageName, String type, String continuationToken, Bundle extras) throws RemoteException { Log.d(TAG, "getPurchases(" + apiVersion + ", " + packageName + ", " + type + ", " + continuationToken + ")"); Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 0); data.putStringArrayList("INAPP_PURCHASE_ITEM_LIST", new ArrayList()); data.putStringArrayList("INAPP_PURCHASE_DATA_LIST", new ArrayList()); data.putStringArrayList("INAPP_DATA_SIGNATURE_LIST", new ArrayList()); return data; } @Override public Bundle consumePurchaseV9(int apiVersion, String packageName, String purchaseToken, Bundle extras) throws RemoteException { Log.d(TAG, "consumePurchase(" + apiVersion + ", " + packageName + ", " + purchaseToken + ")"); Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 8); return data; } @Override public Bundle getPriceChangeConfirmationIntent(int apiVersion, String packageName, String sku, String type, Bundle extras) throws RemoteException { Log.d(TAG, "getPriceChangeConfirmationIntent(" + apiVersion + ", " + packageName + ", " + sku + ", " + type + ")"); Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 4); return data; } @Override public Bundle getSkuDetailsV10(int apiVersion, String packageName, String type, Bundle skuBundle, Bundle extras) throws RemoteException { Log.d(TAG, "getSkuDetails(" + apiVersion + ", " + packageName + ", " + type + ")"); Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 0); data.putStringArrayList("DETAILS_LIST", new ArrayList()); return data; } @Override public Bundle acknowledgePurchase(int apiVersion, String packageName, String purchaseToken, Bundle extras) throws RemoteException { Log.d(TAG, "acknowledgePurchase(" + apiVersion + ", " + packageName + ", " + purchaseToken + ")"); Bundle data = new Bundle(); data.putInt("RESPONSE_CODE", 8); return data; } @Override public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { if (super.onTransact(code, data, reply, flags)) return true; Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags); return false; } }; public IBinder onBind(Intent intent) { return mInAppBillingService; } } ================================================ FILE: fake-store/src/main/java/com/android/vending/licensing/LicensingService.java ================================================ /* * SPDX-FileCopyrightText: 2023 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ package com.android.vending.licensing; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; public class LicensingService extends Service { private static final String TAG = "FakeLicenseService"; private final ILicensingService.Stub mLicenseService = new ILicensingService.Stub() { @Override public void checkLicense(long nonce, String packageName, ILicenseResultListener listener) throws RemoteException { Log.d(TAG, "checkLicense(" + nonce + ", " + packageName + ")"); // We don't return anything yet. Seems to work good for some checkers. } @Override public void checkLicenseV2(String packageName, ILicenseV2ResultListener listener, Bundle extraParams) throws RemoteException { Log.d(TAG, "checkLicenseV2(" + packageName + ", " + extraParams + ")"); // We don't return anything yet. Seems to work good for some checkers. } }; public IBinder onBind(Intent intent) { return mLicenseService; } } ================================================ FILE: fake-store/src/main/java/com/google/android/finsky/externalreferrer/GetInstallReferrerService.java ================================================ /* * SPDX-FileCopyrightText: 2023 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ package com.google.android.finsky.externalreferrer; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; public class GetInstallReferrerService extends Service { private static final String TAG = "FakeReferrerService"; private final IGetInstallReferrerService.Stub service = new IGetInstallReferrerService.Stub() { // https://developer.android.com/google/play/installreferrer/igetinstallreferrerservice @Override public Bundle getInstallReferrer(Bundle request) throws RemoteException { String packageName = request.getString("package_name"); Bundle result = new Bundle(); result.putString("install_referrer", "https://play.google.com/store/apps/details?utm_source=google-play&utm_medium=organic&id="+packageName); result.putLong("referrer_click_timestamp_seconds", 0); result.putLong("referrer_click_timestamp_server_seconds", 0); result.putLong("install_begin_timestamp_seconds", 0); result.putLong("install_begin_timestamp_server_seconds", 0); result.putString("install_version", null); result.putBoolean("google_play_instant", false); return result; } }; @Override public IBinder onBind(Intent intent) { return service.asBinder(); } } ================================================ FILE: fake-store/src/main/java/org/microg/vending/ui/MainActivity.java ================================================ /* * SPDX-FileCopyrightText: 2023 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ package org.microg.vending.ui; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.widget.Toast; import com.android.vending.R; public class MainActivity extends Activity { private static final String TAG = "MainActivity"; private static final String GMS_PACKAGE_NAME = "com.google.android.gms"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { Intent intent = new Intent(Intent.ACTION_MAIN); intent.setPackage(GMS_PACKAGE_NAME); try { startActivity(intent); } catch (Exception e) { Log.w(TAG, "MAIN activity is not DEFAULT. Trying to resolve instead."); intent.setClassName(GMS_PACKAGE_NAME, getPackageManager().resolveActivity(intent, 0).activityInfo.name); startActivity(intent); } Toast.makeText(this, R.string.toast_installed, Toast.LENGTH_LONG).show(); } catch (Exception e) { Log.w(TAG, "Failed launching microG Settings", e); Toast.makeText(this, R.string.toast_not_installed, Toast.LENGTH_LONG).show(); } finish(); } } ================================================ FILE: fake-store/src/main/res/drawable-v26/ic_app_foreground.xml ================================================ ================================================ FILE: fake-store/src/main/res/drawable-v26/ic_app_foreground_mono.xml ================================================ ================================================ FILE: fake-store/src/main/res/mipmap-anydpi-v26/ic_app.xml ================================================ ================================================ FILE: fake-store/src/main/res/mipmap-anydpi-v26/ic_app_round.xml ================================================ ================================================ FILE: fake-store/src/main/res/values/strings.xml ================================================ microG Companion microG Companion cannot be used standalone. Opened microG Services settings instead. microG Companion cannot be used standalone. Please install microG Services to use microG. ================================================ FILE: fake-store/src/main/res/values/styles.xml ================================================ ================================================ FILE: fake-store/src/main/res/values-v11/styles.xml ================================================ ================================================ FILE: fake-store/src/main/res/values-v26/ic_app_background.xml ================================================ #C0CA33 ================================================ FILE: gradle/wrapper/gradle-wrapper.jar.license ================================================ Copyright 2015 the original author or authors. SPDX-License-Identifier: Apache-2.0 ================================================ FILE: gradle/wrapper/gradle-wrapper.properties ================================================ # SPDX-FileCopyrightText: 2015, microG Project Team # SPDX-License-Identifier: CC0-1.0 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists ================================================ FILE: gradlew ================================================ #!/bin/sh # SPDX-License-Identifier: Apache-2.0 # # Copyright © 2015-2021 the original authors. # # 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 # # https://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. # ############################################################################## # # Gradle start up script for POSIX generated by Gradle. # # Important for running: # # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is # noncompliant, but you have some other compliant shell such as ksh or # bash, then to run this script, type that shell name before the whole # command line, like: # # ksh Gradle # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: # * functions; # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», # «${var#prefix}», «${var%suffix}», and «$( cmd )»; # * compound commands having a testable exit status, especially «case»; # * various built-in commands including «command», «set», and «ulimit». # # Important for patching: # # (2) This script targets any POSIX shell, so it avoids extensions provided # by Bash, Ksh, etc; in particular arrays are avoided. # # The "traditional" practice of packing multiple parameters into a # space-separated string is a well documented source of bugs and security # problems, so this is (mostly) avoided, by progressively accumulating # options in "$@", and eventually passing that to Java. # # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; # see the in-line comments for details. # # There are tweaks for specific operating systems such as AIX, CygWin, # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. # ############################################################################## # Attempt to set APP_HOME # Resolve links: $0 may be a link app_path=$0 # Need this for daisy-chained symlinks. while APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path [ -h "$app_path" ] do ls=$( ls -ld "$app_path" ) link=${ls#*' -> '} case $link in #( /*) app_path=$link ;; #( *) app_path=$APP_HOME$link ;; esac done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum warn () { echo "$*" } >&2 die () { echo echo "$*" echo exit 1 } >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false case "$( uname )" in #( CYGWIN* ) cygwin=true ;; #( Darwin* ) darwin=true ;; #( MSYS* | MINGW* ) msys=true ;; #( NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD=$JAVA_HOME/jre/sh/java else JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac fi # Collect all arguments for the java command, stacking in reverse order: # * args from the command line # * the main class name # * -classpath # * -D...appname settings # * --module-path (only if needed) # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) # Now convert the arguments - kludge to limit ourselves to /bin/sh for arg do if case $arg in #( -*) false ;; # don't mess with options #( /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath [ -e "$t" ] ;; #( *) false ;; esac then arg=$( cygpath --path --ignore --mixed "$arg" ) fi # Roll the args list around exactly as many times as the number of # args, so each arg winds up back in the position where it started, but # possibly modified. # # NB: a `for` loop captures its iteration list before it begins, so # changing the positional parameters here affects neither the number of # iterations, nor the values presented in `arg`. shift # remove old arg set -- "$@" "$arg" # push replacement arg done fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in # double quotes to make sure that they get re-expanded; and # * put everything else in single quotes, so that it's not re-expanded. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ org.gradle.wrapper.GradleWrapperMain \ "$@" # Stop when "xargs" is not available. if ! command -v xargs >/dev/null 2>&1 then die "xargs is not available" fi # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. # # In Bash we could simply go: # # readarray ARGS < <( xargs -n1 <<<"$var" ) && # set -- "${ARGS[@]}" "$@" # # but POSIX shell has neither arrays nor command substitution, so instead we # post-process each arg (as a line of input to sed) to backslash-escape any # character that might be a shell metacharacter, then use eval to reverse # that process (while maintaining the separation between arguments), and wrap # the whole thing up as a single "set" statement. # # This will of course break if any of these variables contains a newline or # an unmatched quote. # eval "set -- $( printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | xargs -n1 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | tr '\n' ' ' )" '"$@"' exec "$JAVACMD" "$@" ================================================ FILE: gradlew.bat ================================================ @rem SPDX-License-Identifier: Apache-2.0 @rem @rem Copyright 2015 the original author or authors. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem https://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. @rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Resolve any "." and ".." in APP_HOME to make it shorter. for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! set EXIT_CODE=%ERRORLEVEL% if %EXIT_CODE% equ 0 set EXIT_CODE=1 if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal :omega ================================================ FILE: settings.gradle ================================================ /* * SPDX-FileCopyrightText: 2015 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ include ':fake-store' include ':fake-signature'