././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1721322019.9848788 sdkmanager-0.6.8/0000755000175000017500000000000014646245044012356 5ustar00hanshans././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1624010953.0 sdkmanager-0.6.8/LICENSE0000644000175000017500000010333014063070311013345 0ustar00hanshans GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1721322019.9848788 sdkmanager-0.6.8/PKG-INFO0000644000175000017500000000360214646245044013454 0ustar00hanshansMetadata-Version: 2.1 Name: sdkmanager Version: 0.6.8 Summary: Android SDK Manager Home-page: https://gitlab.com/fdroid/sdkmanager Author: The F-Droid Project Author-email: team@f-droid.org License: AGPL-3.0 Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Information Technology Classifier: Intended Audience :: System Administrators Classifier: Intended Audience :: Telecommunications Industry Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+) Classifier: Operating System :: MacOS :: MacOS X Classifier: Operating System :: POSIX Classifier: Operating System :: POSIX :: Linux Classifier: Operating System :: Unix Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Topic :: Software Development Classifier: Topic :: Utilities Requires-Python: >=3.5 Description-Content-Type: text/markdown Provides-Extra: test License-File: LICENSE A drop-in replacement for `sdkmanager` from the Android SDK written in Python. It implements the exact API of the [`sdkmanager`](https://developer.android.com/studio/command-line/sdkmanager) command line. It only deviates from that API if it can be done while being 100% compatible. The project also attempts to maintain the same terminal output so it can be compatible with things that scrape `sdkmanager` output. ## Code Format This project uses Black to automatically format all the Python code. It uses the version of Black that is in Debian/stable. To format the code, run: ```bash black --skip-string-normalization *.py ``` ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1624010953.0 sdkmanager-0.6.8/README.md0000644000175000017500000000117714063070311013625 0ustar00hanshans A drop-in replacement for `sdkmanager` from the Android SDK written in Python. It implements the exact API of the [`sdkmanager`](https://developer.android.com/studio/command-line/sdkmanager) command line. It only deviates from that API if it can be done while being 100% compatible. The project also attempts to maintain the same terminal output so it can be compatible with things that scrape `sdkmanager` output. ## Code Format This project uses Black to automatically format all the Python code. It uses the version of Black that is in Debian/stable. To format the code, run: ```bash black --skip-string-normalization *.py ``` ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721307072.0 sdkmanager-0.6.8/pyproject.toml0000644000175000017500000000013314646207700015264 0ustar00hanshans[tool.black] skip-string-normalization = true [tool.ruff.format] quote-style = "preserve" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1721322019.9848788 sdkmanager-0.6.8/sdkmanager.egg-info/0000755000175000017500000000000014646245044016164 5ustar00hanshans././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721322019.0 sdkmanager-0.6.8/sdkmanager.egg-info/PKG-INFO0000644000175000017500000000360214646245043017261 0ustar00hanshansMetadata-Version: 2.1 Name: sdkmanager Version: 0.6.8 Summary: Android SDK Manager Home-page: https://gitlab.com/fdroid/sdkmanager Author: The F-Droid Project Author-email: team@f-droid.org License: AGPL-3.0 Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Information Technology Classifier: Intended Audience :: System Administrators Classifier: Intended Audience :: Telecommunications Industry Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+) Classifier: Operating System :: MacOS :: MacOS X Classifier: Operating System :: POSIX Classifier: Operating System :: POSIX :: Linux Classifier: Operating System :: Unix Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Topic :: Software Development Classifier: Topic :: Utilities Requires-Python: >=3.5 Description-Content-Type: text/markdown Provides-Extra: test License-File: LICENSE A drop-in replacement for `sdkmanager` from the Android SDK written in Python. It implements the exact API of the [`sdkmanager`](https://developer.android.com/studio/command-line/sdkmanager) command line. It only deviates from that API if it can be done while being 100% compatible. The project also attempts to maintain the same terminal output so it can be compatible with things that scrape `sdkmanager` output. ## Code Format This project uses Black to automatically format all the Python code. It uses the version of Black that is in Debian/stable. To format the code, run: ```bash black --skip-string-normalization *.py ``` ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721322019.0 sdkmanager-0.6.8/sdkmanager.egg-info/SOURCES.txt0000644000175000017500000000041714646245043020051 0ustar00hanshansLICENSE README.md pyproject.toml sdkmanager.py setup.cfg setup.py sdkmanager.egg-info/PKG-INFO sdkmanager.egg-info/SOURCES.txt sdkmanager.egg-info/dependency_links.txt sdkmanager.egg-info/entry_points.txt sdkmanager.egg-info/requires.txt sdkmanager.egg-info/top_level.txt././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721322019.0 sdkmanager-0.6.8/sdkmanager.egg-info/dependency_links.txt0000644000175000017500000000000114646245043022231 0ustar00hanshans ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721322019.0 sdkmanager-0.6.8/sdkmanager.egg-info/entry_points.txt0000644000175000017500000000005714646245043021463 0ustar00hanshans[console_scripts] sdkmanager = sdkmanager:main ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721322019.0 sdkmanager-0.6.8/sdkmanager.egg-info/requires.txt0000644000175000017500000000017314646245043020564 0ustar00hanshansargcomplete requests!=2.18.0,>2.12.2 urllib3<2 [:python_version >= "3.12"] looseversion [test] defusedxml requests-cache ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721322019.0 sdkmanager-0.6.8/sdkmanager.egg-info/top_level.txt0000644000175000017500000000001314646245043020707 0ustar00hanshanssdkmanager ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721321684.0 sdkmanager-0.6.8/sdkmanager.py0000755000175000017500000020330614646244324015053 0ustar00hanshans#!/usr/bin/env python3 # PYTHON_ARGCOMPLETE_OK # # sdkmanager.py - part of the F-Droid tools # # Copyright (C) 2021, Hans-Christoph Steiner # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . import argparse import base64 import configparser import difflib import gzip import io import json import os import random import re import shutil import stat import subprocess import sys import tempfile import textwrap import zipfile from pathlib import Path from urllib.parse import urlparse import requests try: from looseversion import LooseVersion except ImportError: # distutils.version was removed in Python 3.12 import warnings from distutils.version import LooseVersion warnings.filterwarnings("ignore", category=DeprecationWarning) COMPATIBLE_VERSION = '26.1.1' # gitlab.com is disabled because it has Cloudflare blocking enabled and is therefore unreliable CHECKSUMS_URLS = ( 'https://f-droid.github.io/android-sdk-transparency-log/signed/checksums.json', 'https://fdroid.gitlab.io/android-sdk-transparency-log/checksums.json', # 'https://gitlab.com/fdroid/android-sdk-transparency-log/-/raw/master/signed/checksums.json', 'https://raw.githubusercontent.com/f-droid/android-sdk-transparency-log/master/signed/checksums.json', ) HTTP_HEADERS = {'User-Agent': 'F-Droid'} BUILD_REGEX = re.compile(r'[1-9][0-9]{6}') NDK_RELEASE_REGEX = re.compile(r'r[1-9][0-9]?[a-z]?(?:-(?:rc|beta)[0-9]+)?') M2REPOSITORY_REVISION_REGEX = re.compile(r'android_m2repository_r([0-9]+)\.zip') # The sub-directory to install a given package into, assumes ANDROID_SDK_ROOT as root # https://developer.android.com/studio/command-line/ INSTALL_DIRS = { 'build-tools': 'build-tools/{revision}', 'cmake': 'cmake/{revision}', 'cmdline-tools': 'cmdline-tools/{revision}', 'emulator': 'emulator', 'ndk': 'ndk/{revision}', 'ndk-bundle': 'ndk-bundle', 'platforms': 'platforms/{revision}', 'platform-tools': 'platform-tools', 'skiaparser': 'skiaparser/{revision}', 'tools': 'tools', 'extras;android;m2repository': 'extras/android/m2repository', } # NDK releases are like r25b, revisions are like 25.1.8937393. Dir names use revisions. NDK_REVISIONS = {} # xsi:type="ns3:genericDetailsType GENERIC_PACKAGE_XML_TEMPLATE = textwrap.dedent( """ {license} {revision} PLACEHOLDER """ ).strip() USAGE = """ Usage: sdkmanager [--uninstall] [] [--package_file=] [...] sdkmanager --update [] sdkmanager --list [] sdkmanager --licenses [] sdkmanager --version With --install (optional), installs or updates packages. By default, the listed packages are installed or (if already installed) updated to the latest version. With --uninstall, uninstall the listed packages. is a sdk-style path (e.g. "build-tools;23.0.0" or "platforms;android-23"). is a text file where each line is a sdk-style path of a package to install or uninstall. Multiple --package_file arguments may be specified in combination with explicit paths. With --update, all installed packages are updated to the latest version. With --list, all installed and available packages are printed out. With --licenses, show and offer the option to accept licenses for all available packages that have not already been accepted. With --version, prints the current version of sdkmanager. Common Arguments: --sdk_root=: Use the specified SDK root instead of the SDK containing this tool --channel=: Include packages in channels up to . Common channels are: 0 (Stable), 1 (Beta), 2 (Dev), and 3 (Canary). --include_obsolete: With --list, show obsolete packages in the package listing. With --update, update obsolete packages as well as non-obsolete. --no_https: Force all connections to use http rather than https. --proxy=: Connect via a proxy of the given type. --proxy_host=: IP or DNS address of the proxy to use. --proxy_port=: Proxy port to connect to. --verbose: Enable verbose output. * If the env var REPO_OS_OVERRIDE is set to "windows", "macosx", or "linux", packages will be downloaded for that OS. """ ANDROID_SDK_LICENSE = """Terms and Conditions This is the Android Software Development Kit License Agreement 1. Introduction 1.1 The Android Software Development Kit (referred to in the License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK. 1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time. 1.3 A "compatible implementation" means any Android device that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS). 1.4 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. 2. Accepting the License Agreement 2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement. 2.2 By clicking to accept, you hereby agree to the terms of the License Agreement. 2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries, including the country in which you are resident or from which you use the SDK. 2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity. 3. SDK License from Google 3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android. 3.2 You may not use this SDK to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this SDK is not used for that purpose. 3.3 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you. 3.4 You may not use the SDK for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK. 3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. 3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you. 3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features. 3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK. 4. Use of the SDK by You 4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications. 4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). 4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so. 4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier. 4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so. 4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach. 5. Your Developer Credentials 5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials. 6. Privacy and Information 6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected. 6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy. 7. Third Party Applications 7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources. 7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners. 7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, the License Agreement does not affect your legal relationship with these third parties. 8. Using Android APIs 8.1 Google Data APIs 8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service. 8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so. If you use the Android Recognition Service API, documented at the following URL: https://developer.android.com/reference/android/speech/RecognitionService, as updated from time to time, you acknowledge that the use of the API is subject to the Data Processing Addendum for Products where Google is a Data Processor, which is located at the following URL: https://privacy.google.com/businesses/gdprprocessorterms/, as updated from time to time. By clicking to accept, you hereby agree to the terms of the Data Processing Addendum for Products where Google is a Data Processor. 9. Terminating the License Agreement 9.1 The License Agreement will continue to apply until terminated by either you or Google as set out below. 9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials. 9.3 Google may at any time, terminate the License Agreement with you if: (A) you have breached any provision of the License Agreement; or (B) Google is required to do so by law; or (C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or (D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable. 9.4 When the License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely. 10. DISCLAIMER OF WARRANTIES 10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE. 10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. 10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 11. LIMITATION OF LIABILITY 11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING. 12. Indemnification 12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with the License Agreement. 13. Changes to the License Agreement 13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available. 14. General Legal Terms 14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK. 14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google. 14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable. 14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement. 14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE. 14.6 The rights granted in the License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under the License Agreement without the prior written approval of the other party. 14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction. January 16, 2019""" # This is generated by doing: # gpg --export-options export-minimal,export-clean \ # --export 37D2C98789D8311948394E3E41E7044E1DBA2E89 EE6620C7136B0D2C456C0A4DE9E28DEA00AA5556 \ # | gzip -9 \ # | base64 --wrap=88 \ # > keyring.gpg.gz.base64 KEYRING_GPG_GZ_BASE64 = """ H4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DqrNQTzSv+0EItZQhH6 LmDQwjXe5Ohm3IwpK1SOR3f+VVlF4aluzbl/fn9Uu+tqSQ9+04bmQoHYG/DH+HGVkZwEF/ZqVLl7j4UEikkHPzzy xcXntHAbRGdISw9qtIPVtNeFk94jSgm6gou32u2vUgu4cVnIrPquGkCuWakIXYdpqaLx6OgCzpMgenpw6F8PO3MJ VSxT+0coIOQhnTQzqHO1sc1dnLx8GCc9E2eCb1tiBb2usMmfkFB2Et8ilvhTtJ0VAMr1qeIVh32fuRS4AhLfQJsb aQxogkfeFpbQX2slNVJ6axUVFMMFIkPreLxa2ZNmFMZJcFfOsdP5sx7oyyJtXB07TpDaZtHQKEYXYKTxOazWN3BR yYf8qgG5ObNV6QlZWo0gnWxOKp51KeXXujlEarbKjHU64q9WGWlVwvjZOiYlTz9hIKUUMJo3MDDDoFTxBhOvuK+b BJ0kd2ZSYONjjld0WBhYNvRMFsZeIdg8BhaSa1HuP1/mEKlGSS5WlmkuaLHinynHEVdP4OzdjiSslGSS1EGPEZ0E zilSOEKfTKQYOzKmBeWlFAntb2HKf/Cxm7TFgYATMQ818K03KTueueNJXvicsyA7efjozGR5LKyDr2KRB3V/r2sd UeoNaY215eCZI12lp5pySjqSVt2rcJb1dzXp39Wk/1pN+nfJ098lT/+vlzz9XT36d/Xo/wfVo38X5v9dmP//W2H+ 36tff69+/b369b+y+vXfAHPyA9GQRwAA """ packages = {} revisions = {} platform_versions = {} def get_android_home(): """Get the pathlib.Path that is the base dir of the Android SDK home This first tries the canonical ANDROID_HOME, then tries the deprecated ANDROID_SDK_ROOT, then falls back to a sensible, hard-coded default. https://developer.android.com/studio/command-line/variables#envar """ path = os.getenv('ANDROID_HOME', os.getenv('ANDROID_SDK_ROOT', '/opt/android-sdk')) if not path: print('ERROR: ANDROID_HOME is set to blank!') sys.exit(1) android_home = Path(path) if not android_home.parent.exists(): raise FileNotFoundError('ANDROID_HOME "%s" does not exist!' % android_home) android_home.mkdir(exist_ok=True) return android_home def get_cachedir(): cachedir = Path.home() / '.cache/sdkmanager' cachedir.mkdir(mode=0o0700, parents=True, exist_ok=True) return cachedir def verify(filename): cachedir = get_cachedir() keyring = cachedir / 'keyring.gpg' with io.BytesIO(base64.b64decode(KEYRING_GPG_GZ_BASE64)) as infp: with gzip.GzipFile(fileobj=infp) as gzipfp: with keyring.open('wb') as fp: fp.write(gzipfp.read()) if isinstance(filename, str): f = filename else: f = str(filename.resolve()) p = subprocess.run( ['gpgv', '--keyring', str(keyring.resolve()), f + '.asc', f], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=False, ) if p.returncode == 0: return print(p.stdout.decode()) os.remove(f) os.remove(f + '.asc') raise RuntimeError(f + " failed to verify!") def download_file(url, local_filename=None): """download a file with some extra tricks for reliability The stream=True parameter keeps memory usage low. GitLab Pages will return 304 if a request is made too frequently. """ filename = os.path.basename(urlparse(url).path) if local_filename is None: local_filename = get_cachedir() / filename print('Downloading', url, 'into', local_filename) r = requests.get(url, stream=True, allow_redirects=True, headers=HTTP_HEADERS) r.raise_for_status() if r.status_code == 304: raise RuntimeError('304 Not Modified: ' + url) with local_filename.open('wb') as f: for chunk in r.iter_content(chunk_size=io.DEFAULT_BUFFER_SIZE): if chunk: # filter out keep-alive new chunks f.write(chunk) f.flush() return local_filename def get_properties_dict(string): config = configparser.ConfigParser(delimiters=('=')) config.read_string('[DEFAULT]\n' + string) return dict(config.items('DEFAULT')) def _add_to_revisions(url, source_properties): pkg_revision = source_properties.get('pkg.revision') if pkg_revision: revisions[url] = tuple(LooseVersion(pkg_revision).version) def parse_build_tools(url, d): if 'source.properties' in d: source_properties = get_properties_dict(d['source.properties']) _add_to_revisions(url, source_properties) revision = source_properties['pkg.revision'].replace(' ', '-') key = ('build-tools', revision) if key not in packages: packages[key] = url def parse_cmake(url, d): if 'source.properties' in d: source_properties = get_properties_dict(d['source.properties']) _add_to_revisions(url, source_properties) key = tuple(source_properties['pkg.path'].split(';')) if key not in packages: packages[key] = url def parse_cmdline_tools(url, d): """Set up cmdline-tools with versioned and 'latest' package name""" if 'source.properties' in d: source_properties = get_properties_dict(d['source.properties']) _add_to_revisions(url, source_properties) key = tuple(source_properties['pkg.path'].split(';')) if key not in packages: packages[key] = url v = re.compile(r'^[0-9.]+$') highest = None for key, url in packages.items(): if key[0] != 'cmdline-tools' or len(key) < 2: continue version = key[-1] if version == 'latest': continue if highest is None: highest = version elif v.match(version) and LooseVersion(version) > LooseVersion(highest): highest = version # TODO choose version for 'latest' based on --channel # https://developer.android.com/studio/releases/cmdline-tools packages[('cmdline-tools', 'latest')] = packages[('cmdline-tools', highest)] def parse_emulator(url, d): if 'source.properties' in d: source_properties = get_properties_dict(d['source.properties']) _add_to_revisions(url, source_properties) key = tuple(source_properties['pkg.path'].split(';')) if key not in packages: packages[key] = url versioned = (key[0], source_properties['pkg.revision']) if versioned in packages: packages[versioned] = sorted([url, packages[key]])[-1] else: packages[versioned] = url def parse_m2repository(url, d): if 'source.properties' in d: source_properties = get_properties_dict(d['source.properties']) _add_to_revisions(url, source_properties) # source.properties does not reliably contain Pkg.Revision or the path info m = M2REPOSITORY_REVISION_REGEX.search(url) if m: revision = m.group(1) key = ('extras', 'android', 'm2repository') packages[key] = url versioned = key + tuple([revision]) if versioned not in packages: packages[versioned] = url noleading0 = key + tuple([revision.lstrip('0')]) if noleading0 not in packages: packages[noleading0] = url def parse_ndk(url, d): revision = None if 'source.properties' in d: source_properties = get_properties_dict(d['source.properties']) _add_to_revisions(url, source_properties) revision = source_properties['pkg.revision'] for k in ('ndk', 'ndk-bundle'): key = (k, revision) if key not in packages: packages[key] = url m = NDK_RELEASE_REGEX.search(url) if m: release = m.group() if revision: NDK_REVISIONS[release] = revision packages[('ndk', release)] = url packages[('ndk-bundle', release)] = url # add fake revision for NDKs without source.properties if url not in revisions: revisions[url] = (1,) vstring = re.search(r"android-ndk-r(\d*)([a-z])-linux", url) if vstring: revisions[url] = ( int(vstring.group(1)), ord(vstring.group(2)) - ord("a"), ) def parse_platforms(url, d): """Parse platforms and choose the URL with the highest release number These packages are installed by API version, e.g. platforms;android-29, but there are multiple releases available, e.g. platform-29_r05.zip, platform-29_r04.zip, etc. The build property ro.build.version.codename with the value of REL means a full release, rather than preview/beta/etc. That value was not always present, but those releases oly hve a single package. platform24_r01.zip was released twice, the first being a mistake with a platform.version of 'N' in source.properties. """ if 'source.properties' in d: source_properties = get_properties_dict(d['source.properties']) _add_to_revisions(url, source_properties) apilevel = source_properties['androidversion.apilevel'] # TODO this should make all versions/revisions available, not only most recent key = ('platforms', 'android-%s' % apilevel) vstring = '%s.%s' % ( source_properties.get('platform.version'), source_properties.get('pkg.revision'), ) if re.match(r'^[1-9].*', vstring): if key not in platform_versions: platform_versions[key] = [] platform_version = LooseVersion(vstring) platform_versions[key].append(platform_version) if key in packages: if platform_version == sorted(platform_versions[key])[-1]: packages[key] = url else: packages[key] = url def parse_platform_tools(url, d): """Find all platform-tools packages and set highest version as 'platform-tools'""" if 'source.properties' in d: source_properties = get_properties_dict(d['source.properties']) _add_to_revisions(url, source_properties) key = ('platform-tools', source_properties.get('pkg.revision')) if key not in packages: packages[key] = url highest = '0' for key, url in packages.items(): if key[0] != 'platform-tools' or len(key) < 2: continue version = key[-1] if LooseVersion(version) > LooseVersion(highest): highest = version packages[('platform-tools',)] = packages[('platform-tools', highest)] def parse_tools(url, d): """Find all tools packages and set highest version as 'tools'""" if 'source.properties' in d: source_properties = get_properties_dict(d['source.properties']) _add_to_revisions(url, source_properties) path = source_properties.get('pkg.path') if not path: path = 'tools' key = (path, source_properties.get('pkg.revision')) if key not in packages: packages[key] = url highest = '0' for key, url in packages.items(): if key[0] != 'tools' or len(key) < 2: continue version = key[-1] if LooseVersion(version) > LooseVersion(highest): highest = version packages[('tools',)] = packages[('tools', highest)] def parse_skiaparser(url, d): """Set up skiaparser with versioned and unversioned package name""" if 'source.properties' in d: source_properties = get_properties_dict(d['source.properties']) _add_to_revisions(url, source_properties) key = tuple(source_properties['pkg.path'].split(';')) if key in packages: packages[key] = sorted([url, packages[key]])[-1] else: packages[key] = url def parse_repositories_cfg(f): """parse the supplied repositories.cfg and return a list of URLs""" with Path(f).open() as fp: data = get_properties_dict(fp.read()) disabled = set() for k, v in data.items(): if k.startswith('@disabled@'): if v == 'disabled': url = k.split('@')[2] disabled.add(url) count = int(data.get('count', '0')) i = 0 repositories = [] while i < count: d = {} for k in ('disp', 'dist', 'enabled', 'src'): key_i = '%s%02d' % (k, i) if data.get(key_i): d[k] = data[key_i] if d[k] not in disabled: repositories.append(d) i += 1 enabled_repositories = [] for d in repositories: v = d.get('enabled', 'true') if v == 'true': url = d.get('src', '').replace('\\', '') if url and url not in enabled_repositories: enabled_repositories.append(url) return enabled_repositories # TODO allow : and - as separator, e.g. ndk-22.1.7171670 # only use android-sdk-transparency-log as source def build_package_list(use_net=False): cachedir = get_cachedir() cached_checksums = cachedir / 'checksums.json' cached_checksums_signature = cachedir / (cached_checksums.name + '.asc') if cached_checksums.exists() and cached_checksums_signature.exists(): verify(cached_checksums) with cached_checksums.open() as fp: _process_checksums(json.load(fp)) else: use_net = True # need to fetch checksums.json, no cached version etag_file = cached_checksums.parent / (cached_checksums.name + '.etag') if etag_file.exists(): etag = etag_file.read_text() HTTP_HEADERS['If-None-Match'] = etag else: etag = None if use_net: checksums_url = CHECKSUMS_URLS[random.randint(0, len(CHECKSUMS_URLS) - 1)] download_file(checksums_url + '.asc') try: r = requests.get(checksums_url, allow_redirects=True, headers=HTTP_HEADERS) except ValueError as e: if etag_file.exists(): etag_file.unlink() print('ERROR:', e) sys.exit(1) r.raise_for_status() if etag is None or etag != r.headers.get('etag'): print('Downloading', checksums_url, 'into', str(cached_checksums)) cached_checksums.write_bytes(r.content) verify(cached_checksums) etag_file.write_text(r.headers['etag']) _process_checksums(r.json()) def _process_checksums(checksums): for url in checksums.keys(): if not url.endswith('.zip'): continue basename = os.path.basename(url) if basename.startswith('build-tools'): for entry in checksums[url]: parse_build_tools(url, entry) elif basename.startswith('cmake'): for entry in checksums[url]: parse_cmake(url, entry) elif basename.startswith('cmdline-tools') or basename.startswith( 'commandlinetools' ): for entry in checksums[url]: parse_cmdline_tools(url, entry) elif basename.startswith('emulator'): for entry in checksums[url]: parse_emulator(url, entry) elif basename.startswith('android_m2repository_r'): for entry in checksums[url]: parse_m2repository(url, entry) elif 'ndk-' in url: parse_ndk(url, checksums[url][0]) elif basename.startswith('platform-tools'): for entry in checksums[url]: parse_platform_tools(url, entry) elif basename.startswith('android-') or basename.startswith('platform-'): for entry in checksums[url]: parse_platforms(url, entry) elif basename.startswith('skiaparser'): for entry in checksums[url]: parse_skiaparser(url, entry) elif basename.startswith('tools') or basename.startswith('sdk-tools-'): for entry in checksums[url]: parse_tools(url, entry) def licenses(): """prompt the user to accept the various licenses TODO actually implement it, this largely fakes it. https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:sdklib/src/main/java/com/android/sdklib/tool/sdkmanager/LicensesAction.java https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:repository/src/main/java/com/android/repository/api/License.java """ known_licenses = { 'android-sdk-license': '\n8933bad161af4178b1185d1a37fbf41ea5269c55\n\nd56f5187479451eabf01fb78af6dfcb131a6481e\n24333f8a63b6825ea9c5514f83c2829b004d1fee', 'android-sdk-preview-license': '\n84831b9409646a918e30573bab4c9c91346d8abd\n', 'android-sdk-preview-license-old': '79120722343a6f314e0719f863036c702b0e6b2a\n\n84831b9409646a918e30573bab4c9c91346d8abd', 'intel-android-extra-license': '\nd975f751698a77b662f1254ddbeed3901e976f5a\n', } known_license_hashes = set() for license_value in known_licenses.values(): for license in license_value.strip().split('\n'): if license: known_license_hashes.add(license) found_license_hashes = set() licenses_dir = get_android_home() / 'licenses' for f in licenses_dir.glob('*'): with f.open() as fp: for license in fp.read().strip().split('\n'): if license: found_license_hashes.add(license) total = len(known_license_hashes) license_count = total - len(found_license_hashes) if license_count == 0: print('All SDK package licenses accepted.') return if license_count == 1: fl = ('1', '1', '', 's') else: fl = (license_count, total, 's', 've') msg = ( "{0} of {1} SDK package license{2} not accepted.\n" "Review license{2} that ha{3} not been accepted (y/N)? " ).format(*fl) s = input(msg) print() if s.lower() in ('y', 'yes'): licenses_dir.mkdir(exist_ok=True) for h in known_license_hashes: if h not in found_license_hashes: for license_file, known in known_licenses.items(): if h in known: with (licenses_dir / license_file).open('w') as fp: fp.write(known) def install(to_install, android_home=None): """Install specified packages, including downloading them as needed Certain packages are installed into versioned sub-directories while others are always installed into the same location. These installed packages will at least always have 'source.properties'. Parameters ---------- to_install A single package or list of packages to install. android_home Optionally provide the ANDROID_HOME path as the install location. """ global packages if android_home is None: android_home = get_android_home() if isinstance(android_home, str): android_home = Path(android_home) if isinstance(to_install, str): to_install = [to_install] for package in to_install: key = tuple(package.split(';')) if key not in packages: print("""Warning: Failed to find package '%s'""" % package) package_names = [';'.join(n) for n in packages] m = difflib.get_close_matches(package, package_names, 1) if m: print("""Did you mean '%s'?""" % m[0]) sys.exit(1) url = packages[key] if key[0] == 'extras' and len(key) in (3, 4): name = ';'.join(key[:3]) else: name = key[0] if len(key) > 1: if key[0] == 'ndk': revision = NDK_REVISIONS.get(key[-1], key[-1]) else: revision = key[-1] install_dir = android_home / INSTALL_DIRS[name].format(revision=revision) else: install_dir = android_home / INSTALL_DIRS[name] if install_dir.exists(): continue zipball = get_cachedir() / os.path.basename(url) if not zipball.exists(): download_file(url, zipball) install_dir.parent.mkdir(parents=True, exist_ok=True) _install_zipball_from_cache(zipball, install_dir) _generate_package_xml(install_dir, package, url) def _install_zipball_from_cache(zipball, install_dir): unzip_dir = Path(tempfile.mkdtemp(prefix='.sdkmanager-')) print('Unzipping to %s' % unzip_dir) toplevels = set() try: with zipfile.ZipFile(str(zipball)) as zipfp: for info in zipfp.infolist(): permbits = info.external_attr >> 16 writefile = str(unzip_dir / info.filename) if stat.S_ISLNK(permbits): link = unzip_dir / info.filename link.parent.mkdir(0o755, parents=True, exist_ok=True) link_target = zipfp.read(info).decode() os.symlink(link_target, str(link)) try: link.resolve().relative_to(unzip_dir) except (FileNotFoundError, ValueError): link.unlink() trim_at = len(str(unzip_dir)) + 1 print( 'ERROR: Unexpected symlink target: {link} -> {target}'.format( link=str(link)[trim_at:], target=link_target ) ) elif stat.S_ISDIR(permbits) or stat.S_IXUSR & permbits: zipfp.extract(info.filename, path=str(unzip_dir)) os.chmod(writefile, 0o755) # nosec bandit B103 else: zipfp.extract(info.filename, path=str(unzip_dir)) os.chmod(writefile, 0o644) # nosec bandit B103 toplevels.update([p.split('/')[0] for p in zipfp.namelist()]) except zipfile.BadZipFile as e: print('ERROR:', e) if zipball.exists(): zipball.unlink() return print('Installing into', install_dir) if len(toplevels) == 1: extracted = [d for d in unzip_dir.iterdir()][0] shutil.move(str(extracted), str(install_dir)) else: install_dir.mkdir(parents=True) for extracted in unzip_dir.iterdir(): shutil.move(str(extracted), str(install_dir)) if zipball.exists(): zipball.unlink() def _generate_package_xml(install_dir, package, url): """Generate package.xml for an installed package TODO: This does not yet work for all package types. Gradle Android Plugin work better with no package.xml than wrong one. """ package_base = package.split(';')[0] if package_base in ('extras', 'platforms', 'sources', 'system-images'): return # These packages should never have the version in the path. if package_base in ('emulator', 'ndk-bundle', 'tools'): package = package_base revision = revisions[url] if package_base == 'ndk': package = "ndk;{0}.{1}.{2}".format(*revision) template = ('{0}', '{1}', '{2}') r = min(3, len(revision)) d = { 'license': ANDROID_SDK_LICENSE, 'license_id': 'android-sdk-license', 'path': package, 'revision': ''.join(template[:r]).format(*revision), } with (install_dir / 'package.xml').open('w') as fp: fp.write(GENERIC_PACKAGE_XML_TEMPLATE.format(**d)) def list(): global packages path_width = 0 names = [] for package in packages: name = ';'.join(package) if len(name) > path_width: path_width = len(name) names.append(name) print('Installed Packages:') print(' ' + 'Path'.ljust(path_width) + ' | Version | Description | Location') print( ' ' + '-------'.ljust(path_width) + ' | ------- | ------- | -------' ) print() print('Available Packages:') print(' ' + 'Path'.ljust(path_width) + ' | Version | Description') print(' ' + '-------'.ljust(path_width) + ' | ------- | -------') for name in sorted(names): print(' %s | | ' % name.ljust(path_width)) def main(): parser = argparse.ArgumentParser() # commands parser.add_argument("--install", action="store_true") parser.add_argument("--licenses", action="store_true") parser.add_argument("--list", action="store_true") parser.add_argument("--uninstall", action="store_true") parser.add_argument("--update", action="store_true") parser.add_argument("--version", action="store_true") # "common arguments" parser.add_argument("--channel") parser.add_argument("--include_obsolete") parser.add_argument("--no_https") parser.add_argument("--proxy") parser.add_argument("--proxy_host") parser.add_argument("--proxy_port") parser.add_argument("--sdk_root") parser.add_argument( "--verbose", action="store_true", help="increase output verbosity" ) parser.add_argument('packages', nargs='*') # do not require argcomplete to keep the install profile light try: import argcomplete argcomplete.autocomplete(parser) except ImportError: pass args = parser.parse_args() command = None for k in ('install', 'licenses', 'list', 'uninstall', 'update', 'version'): if args.__dict__[k]: if command is not None: print( 'Error: Only one of --uninstall, --install, --licenses, ' '--update, --list, --version can be specified.' ) print(USAGE) sys.exit(1) command = k if command is None: command = 'install' elif command == 'version': print('25.2.0') sys.exit() method = globals().get(command) if not method: raise NotImplementedError('Command "--%s" not implemented' % command) if command in ('install', 'uninstall'): build_package_list(use_net=False) method(args.packages) else: build_package_list(use_net=True) method() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1721322019.9848788 sdkmanager-0.6.8/setup.cfg0000644000175000017500000000016114646245044014175 0ustar00hanshans[metadata] license_file = LICENSE [aliases] release = versioncheck sdist [egg_info] tag_build = tag_date = 0 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1721321955.0 sdkmanager-0.6.8/setup.py0000755000175000017500000000525514646244743014107 0ustar00hanshans#!/usr/bin/env python3 from setuptools import Command, setup import subprocess import sys class VersionCheckCommand(Command): """Make sure git tag and version match before uploading""" user_options = [] def initialize_options(self): """Abstract method that is required to be overwritten""" def finalize_options(self): """Abstract method that is required to be overwritten""" def run(self): version = self.distribution.get_version() version_git = ( subprocess.check_output(['git', 'describe', '--tags', '--always']) .rstrip() .decode('utf-8') ) if version != version_git: print( 'ERROR: Release version mismatch! setup.py (%s) does not match git (%s)' % (version, version_git) ) sys.exit(1) print('Upload using: twine upload --sign dist/sdkmanager-%s.tar.gz' % version) with open("README.md", "r") as fh: long_description = fh.read() setup( name='sdkmanager', version='0.6.8', description='Android SDK Manager', long_description=long_description, long_description_content_type='text/markdown', author='The F-Droid Project', author_email='team@f-droid.org', url='https://gitlab.com/fdroid/sdkmanager', license='AGPL-3.0', py_modules=['sdkmanager'], entry_points={'console_scripts': ['sdkmanager=sdkmanager:main']}, python_requires='>=3.5', cmdclass={'versioncheck': VersionCheckCommand}, install_requires=[ "argcomplete", "requests > 2.12.2, != 2.18.0", "urllib3<2", 'looseversion; python_version>="3.12"', ], extras_require={'test': ['defusedxml', 'requests-cache']}, classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'Intended Audience :: Telecommunications Industry', 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX', 'Operating System :: POSIX :: Linux', 'Operating System :: Unix', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Software Development', 'Topic :: Utilities', ], )