Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: sdkmanager
3 Version: 0.7.1
4 Summary: Android SDK Manager
5 Home-page: https://gitlab.com/fdroid/sdkmanager
6 Author: The F-Droid Project
7 Author-email: [email protected]
8 License: AGPL-3.0
9 Classifier: Development Status :: 4 - Beta
10 Classifier: Intended Audience :: Developers
11 Classifier: Intended Audience :: Information Technology
12 Classifier: Intended Audience :: System Administrators
13 Classifier: Intended Audience :: Telecommunications Industry
14 Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
15 Classifier: Operating System :: MacOS :: MacOS X
16 Classifier: Operating System :: POSIX
17 Classifier: Operating System :: POSIX :: Linux
18 Classifier: Operating System :: Unix
19 Classifier: Programming Language :: Python :: 3
20 Classifier: Programming Language :: Python :: 3.8
21 Classifier: Programming Language :: Python :: 3.9
22 Classifier: Programming Language :: Python :: 3.10
23 Classifier: Programming Language :: Python :: 3.11
24 Classifier: Programming Language :: Python :: 3.12
25 Classifier: Programming Language :: Python :: 3.13
26 Classifier: Programming Language :: Python :: 3.14
27 Classifier: Programming Language :: Python :: 3.15
28 Classifier: Programming Language :: Python :: Implementation :: CPython
29 Classifier: Topic :: Software Development
30 Classifier: Topic :: Utilities
31 Requires-Python: >=3.8
32 Description-Content-Type: text/markdown
33 License-File: LICENSE
34 Requires-Dist: argcomplete
35 Requires-Dist: requests!=2.18.0,>2.12.2
36 Requires-Dist: looseversion; python_version >= "3.12"
37 Provides-Extra: test
38 Requires-Dist: defusedxml; extra == "test"
39 Requires-Dist: requests-cache; extra == "test"
40 Dynamic: author
41 Dynamic: author-email
42 Dynamic: classifier
43 Dynamic: description
44 Dynamic: description-content-type
45 Dynamic: home-page
46 Dynamic: license
47 Dynamic: license-file
48 Dynamic: provides-extra
49 Dynamic: requires-dist
50 Dynamic: requires-python
51 Dynamic: summary
52
53
54 A drop-in replacement for `sdkmanager` from the Android SDK that gets package metadata from a signed index generated from an [append-only transparency log](https://gitlab.com/fdroid/android-sdk-transparency-log/-/blob/master/README.md). Additionally, it uses SHA-256 checksums to verify packages before installing (Google's `sdkmanager` uses unsigned index and SHA1 checksums).
55
56 It is written in Python with minimal dependencies to make it easy to deploy anywhere and cover many use cases that Google's does not. This makes it really easy to package for distros like Debian or Homebrew, so users can just `apt-get install sdkmanager` and get verified Android SDK package installs based on the root that is already trusted in their system. Also, it is trivial to install a single arbitrary package without having to install the full requirements of Google's sdkmanager (e.g. Java 17, etc). A security researcher can install just `build-tools;36.0.0`. Or a translator can just install `emulator` and `system-images;android-36;default;x86_64`.
57
58 It implements the exact API of the
59 [`sdkmanager`](https://developer.android.com/studio/command-line/sdkmanager)
60 command line. It only deviates from that API if it can be done while being 100%
61 compatible. The project also attempts to maintain the same terminal output so it can be
62 compatible with things that scrape `sdkmanager` output.
63
64 ## Architecture
65
66 This was designed around the idea that each SDK package contains all the relevant metadata in it, e.g. _source.properties_. So the _checksums.json_ index file was designed just to be the index of those package files. This is how F-Droid and Debian indexes work. It looks like Google's `sdkmanager` was designed with that idea, but sadly, the maintainers of Google's `sdkmanager` have not been faithful to it. Some values like "display-name" are only available in the index files, e.g. _repository2-3.xml_. Even worse, the SDK packages contain something similar, `Pkg.Desc`, but it has strange conflicting values.
67
68 Also, since XML is a nightmare and this `sdkmanager` is written in Python, this `sdkmanager` was designed to use JSON as much as possible.
69
70 ## Key sources
71
72 The AOSP source code is hard to navigate for many reasons. Here are a couple of entry points for info relevant to this project:
73
74 * _source.properties_ templates:
75 https://android.googlesource.com/platform/development/+/refs/tags/android-16.0.0_r4/sdk/
76 * _repository2-x.xml_ templates:
77 https://android.googlesource.com/platform/tools/base/+/1fd0588c0b284453faea362de4d22b2c5e5f1a70/sdklib/src/main/resources/xsd/
78 * _sdkmanager_ source code:
79 https://android.googlesource.com/platform/tools/base/+/1fd0588c0b284453faea362de4d22b2c5e5f1a70/sdklib/src/main/java/com/android/sdklib/tool/sdkmanager/
80 * Shared repository code:
81 https://android.googlesource.com/platform/tools/base/+/1fd0588c0b284453faea362de4d22b2c5e5f1a70/repository/src/main/java/com/android/repository/api/
82
83
84 ## Code Format
85
86 This project uses Black to automatically format all the Python code. It uses
87 the version of Black that is in Debian/stable. To format the code, run:
88
89 ```bash
90 black --skip-string-normalization *.py
91 ```