diff --git a/.github/workflows/build-addons.yml b/.github/workflows/build-addons.yml
index eb43a12d0..8642eb9c6 100644
--- a/.github/workflows/build-addons.yml
+++ b/.github/workflows/build-addons.yml
@@ -29,6 +29,29 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
+ # Every prerequisite is checked here, first, and all failures are reported
+ # together, so a missing secret fails the run in seconds, not after the build.
+ - name: Pre-flight checks
+ env:
+ SERVER_SIGNING_KEYSTORE_BASE64: ${{ secrets.SERVER_SIGNING_KEYSTORE_BASE64 }}
+ SERVER_SIGNING_STORE_PASSWORD: ${{ secrets.SERVER_SIGNING_STORE_PASSWORD }}
+ SERVER_SIGNING_KEY_ALIAS: ${{ secrets.SERVER_SIGNING_KEY_ALIAS }}
+ SERVER_SIGNING_KEY_PASSWORD: ${{ secrets.SERVER_SIGNING_KEY_PASSWORD }}
+ run: |
+ failed=0
+ # Share Your Apps Server's release key (scripts/server-signing-key.sh).
+ for v in SERVER_SIGNING_KEYSTORE_BASE64 SERVER_SIGNING_STORE_PASSWORD SERVER_SIGNING_KEY_ALIAS SERVER_SIGNING_KEY_PASSWORD; do
+ if [ -z "${!v}" ]; then
+ echo "::error::Repository secret $v is missing or empty. See The release signing key in plugins/Share-Your-Apps/docs/share-your-apps-design.md."
+ failed=1
+ fi
+ done
+ if [ "$failed" != 0 ]; then
+ echo "Pre-flight checks failed; see the errors above." >&2
+ exit 1
+ fi
+ echo "Pre-flight checks passed."
+
- name: Checkout plugin-examples
uses: actions/checkout@v4
@@ -47,6 +70,14 @@ jobs:
cache-disabled: true
add-job-summary: 'never'
+ - name: Put Share Your Apps Server's release key in place
+ env:
+ SERVER_SIGNING_KEYSTORE_BASE64: ${{ secrets.SERVER_SIGNING_KEYSTORE_BASE64 }}
+ SERVER_SIGNING_STORE_PASSWORD: ${{ secrets.SERVER_SIGNING_STORE_PASSWORD }}
+ SERVER_SIGNING_KEY_ALIAS: ${{ secrets.SERVER_SIGNING_KEY_ALIAS }}
+ SERVER_SIGNING_KEY_PASSWORD: ${{ secrets.SERVER_SIGNING_KEY_PASSWORD }}
+ run: ./scripts/server-signing-key.sh
+
- name: Refresh libs and build plugins
env:
CODEONTHEGO_REF: ${{ inputs.codeonthego_ref }}
diff --git a/.github/workflows/publish-addons.yml b/.github/workflows/publish-addons.yml
index 184fd6c0c..844e8a603 100644
--- a/.github/workflows/publish-addons.yml
+++ b/.github/workflows/publish-addons.yml
@@ -20,33 +20,51 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
-
- - uses: actions/setup-java@v4
- with:
- distribution: temurin
- java-version: '17'
-
- - uses: gradle/actions/setup-gradle@v4
-
- - uses: astral-sh/setup-uv@v5
-
- - name: Verify the R2 configuration
- # The build below takes a long time. Without this, a renamed variable
- # is only discovered after all of it, inside boto3.
+ # Every prerequisite is checked here, first, and all failures are reported
+ # together, so a missing secret fails the run in seconds, not after the build.
+ - name: Pre-flight checks
env:
R2_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }}
R2_BUCKET: ${{ vars.CLOUDFLARE_R2_BUCKET_NAME }}
+ SERVER_SIGNING_KEYSTORE_BASE64: ${{ secrets.SERVER_SIGNING_KEYSTORE_BASE64 }}
+ SERVER_SIGNING_STORE_PASSWORD: ${{ secrets.SERVER_SIGNING_STORE_PASSWORD }}
+ SERVER_SIGNING_KEY_ALIAS: ${{ secrets.SERVER_SIGNING_KEY_ALIAS }}
+ SERVER_SIGNING_KEY_PASSWORD: ${{ secrets.SERVER_SIGNING_KEY_PASSWORD }}
run: |
+ failed=0
+ # Share Your Apps Server's release key (scripts/server-signing-key.sh).
+ for v in SERVER_SIGNING_KEYSTORE_BASE64 SERVER_SIGNING_STORE_PASSWORD SERVER_SIGNING_KEY_ALIAS SERVER_SIGNING_KEY_PASSWORD; do
+ if [ -z "${!v}" ]; then
+ echo "::error::Repository secret $v is missing or empty. See The release signing key in plugins/Share-Your-Apps/docs/share-your-apps-design.md."
+ failed=1
+ fi
+ done
+ # Cloudflare R2, for the publish at the end. Without this, a renamed
+ # variable is only discovered after the whole build, inside boto3.
for v in R2_ACCOUNT_ID R2_ACCESS_KEY_ID R2_SECRET_ACCESS_KEY R2_BUCKET; do
if [ -z "${!v}" ]; then
- echo "$v is empty. Check the repository secrets and variables." >&2
- exit 1
+ echo "::error::$v is empty. Check the repository secrets and variables."
+ failed=1
fi
done
- echo "Publishing to bucket '$R2_BUCKET'."
+ if [ "$failed" != 0 ]; then
+ echo "Pre-flight checks failed; see the errors above." >&2
+ exit 1
+ fi
+ echo "Pre-flight checks passed. Publishing to bucket '$R2_BUCKET'."
+
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: '17'
+
+ - uses: gradle/actions/setup-gradle@v4
+
+ - uses: astral-sh/setup-uv@v5
- name: Check names and metadata
run: uv run --directory tools/addons addons --root "$GITHUB_WORKSPACE" check
@@ -79,6 +97,14 @@ jobs:
echo "revision=$revision" >> "$GITHUB_OUTPUT"
echo "Building against $COGO_REPO@$revision ($COGO_RELEASE)." >> "$GITHUB_STEP_SUMMARY"
+ - name: Put Share Your Apps Server's release key in place
+ env:
+ SERVER_SIGNING_KEYSTORE_BASE64: ${{ secrets.SERVER_SIGNING_KEYSTORE_BASE64 }}
+ SERVER_SIGNING_STORE_PASSWORD: ${{ secrets.SERVER_SIGNING_STORE_PASSWORD }}
+ SERVER_SIGNING_KEY_ALIAS: ${{ secrets.SERVER_SIGNING_KEY_ALIAS }}
+ SERVER_SIGNING_KEY_PASSWORD: ${{ secrets.SERVER_SIGNING_KEY_PASSWORD }}
+ run: ./scripts/server-signing-key.sh
+
- name: Build, package, and stage
id: stage
env:
diff --git a/.github/workflows/update-libs.yml b/.github/workflows/update-libs.yml
index f86a9eaf9..53a7c2cb3 100644
--- a/.github/workflows/update-libs.yml
+++ b/.github/workflows/update-libs.yml
@@ -11,44 +11,57 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- - name: Checkout plugin-examples
- uses: actions/checkout@v4
- with:
- # PAT from a repo admin so the libs/ push bypasses the main ruleset.
- # A fine-grained PAT must use the organization as its resource owner,
- # not a personal account, or every push returns 403. The next step
- # checks this. GITHUB_TOKEN is only a fallback to keep checkout
- # working; it cannot bypass the ruleset, so the check rejects it.
- token: ${{ secrets.ADMIN_PERSONAL_ACCESS_TOKEN || github.token }}
-
- # The build below takes ~30 minutes. Without this guard, a token that
- # cannot write to this repo throws all of that away at "Commit updated
- # jars". Check the token first so the run fails in seconds instead.
- - name: Verify the push token
+ # Every prerequisite is checked here, first, and all failures are reported
+ # together, so a missing secret fails the run in seconds, not after the build.
+ - name: Pre-flight checks
env:
- ADMIN_PAT: ${{ secrets.ADMIN_PERSONAL_ACCESS_TOKEN }}
- GH_TOKEN: ${{ secrets.ADMIN_PERSONAL_ACCESS_TOKEN || github.token }}
+ GH_TOKEN: ${{ secrets.ADMIN_PERSONAL_ACCESS_TOKEN }}
+ SERVER_SIGNING_KEYSTORE_BASE64: ${{ secrets.SERVER_SIGNING_KEYSTORE_BASE64 }}
+ SERVER_SIGNING_STORE_PASSWORD: ${{ secrets.SERVER_SIGNING_STORE_PASSWORD }}
+ SERVER_SIGNING_KEY_ALIAS: ${{ secrets.SERVER_SIGNING_KEY_ALIAS }}
+ SERVER_SIGNING_KEY_PASSWORD: ${{ secrets.SERVER_SIGNING_KEY_PASSWORD }}
run: |
+ failed=0
+ # Share Your Apps Server's release key (scripts/server-signing-key.sh).
+ for v in SERVER_SIGNING_KEYSTORE_BASE64 SERVER_SIGNING_STORE_PASSWORD SERVER_SIGNING_KEY_ALIAS SERVER_SIGNING_KEY_PASSWORD; do
+ if [ -z "${!v}" ]; then
+ echo "::error::Repository secret $v is missing or empty. See The release signing key in plugins/Share-Your-Apps/docs/share-your-apps-design.md."
+ failed=1
+ fi
+ done
+ # The push token. The build takes ~30 minutes; without this, a token that
+ # cannot write to this repo throws all of that away at "Commit updated jars".
org="${GITHUB_REPOSITORY%%/*}"
-
- if [ -z "$ADMIN_PAT" ]; then
+ if [ -z "$GH_TOKEN" ]; then
echo "::error::ADMIN_PERSONAL_ACCESS_TOKEN is not set. GITHUB_TOKEN cannot bypass the ${org} main ruleset, so the push would fail."
- exit 1
- fi
-
- if ! repo=$(gh api "repos/${GITHUB_REPOSITORY}" 2>/dev/null); then
+ failed=1
+ elif ! repo=$(gh api "repos/${GITHUB_REPOSITORY}" 2>/dev/null); then
echo "::error::The token cannot see ${GITHUB_REPOSITORY}. A fine-grained PAT must use resource owner '${org}' (the organization). A token owned by a personal account cannot reach ${org} repositories."
- exit 1
+ failed=1
+ else
+ who=$(gh api user --jq .login 2>/dev/null || echo '(unknown)')
+ push=$(printf '%s' "$repo" | jq -r '.permissions.push // false')
+ echo "Token identity: ${who}. Push permission: ${push}."
+ if [ "$push" != "true" ]; then
+ echo "::error::The token authenticates as '${who}' but cannot write to ${GITHUB_REPOSITORY}. Grant it 'Contents: Read and write' with resource owner '${org}'."
+ failed=1
+ fi
fi
-
- who=$(gh api user --jq .login 2>/dev/null || echo '(unknown)')
- push=$(printf '%s' "$repo" | jq -r '.permissions.push // false')
- echo "Token identity: ${who}. Push permission: ${push}."
-
- if [ "$push" != "true" ]; then
- echo "::error::The token authenticates as '${who}' but cannot write to ${GITHUB_REPOSITORY}. Grant it 'Contents: Read and write' with resource owner '${org}'."
+ if [ "$failed" != 0 ]; then
+ echo "Pre-flight checks failed; see the errors above." >&2
exit 1
fi
+ echo "Pre-flight checks passed."
+
+ - name: Checkout plugin-examples
+ uses: actions/checkout@v4
+ with:
+ # PAT from a repo admin so the libs/ push bypasses the main ruleset.
+ # A fine-grained PAT must use the organization as its resource owner,
+ # not a personal account, or every push returns 403. Pre-flight
+ # checks this. GITHUB_TOKEN is only a fallback to keep checkout
+ # working; it cannot bypass the ruleset, so the check rejects it.
+ token: ${{ secrets.ADMIN_PERSONAL_ACCESS_TOKEN || github.token }}
- name: Set up JDK 17
uses: actions/setup-java@v4
@@ -71,6 +84,14 @@ jobs:
RUN_NUMBER: ${{ github.run_number }}
run: echo "name=build-$(date -u +%Y-%m-%d)-${RUN_NUMBER}" >> "$GITHUB_OUTPUT"
+ - name: Put Share Your Apps Server's release key in place
+ env:
+ SERVER_SIGNING_KEYSTORE_BASE64: ${{ secrets.SERVER_SIGNING_KEYSTORE_BASE64 }}
+ SERVER_SIGNING_STORE_PASSWORD: ${{ secrets.SERVER_SIGNING_STORE_PASSWORD }}
+ SERVER_SIGNING_KEY_ALIAS: ${{ secrets.SERVER_SIGNING_KEY_ALIAS }}
+ SERVER_SIGNING_KEY_PASSWORD: ${{ secrets.SERVER_SIGNING_KEY_PASSWORD }}
+ run: ./scripts/server-signing-key.sh
+
# Refreshes libs/ from CodeOnTheGo@stage, then proves every plugin still
# compiles against the new jars. Templates use no jars, so none are built.
- name: Refresh libs and build plugins
diff --git a/plugins/Share-Your-Apps/.gitignore b/plugins/Share-Your-Apps/.gitignore
new file mode 100644
index 000000000..ecfb7b0c7
--- /dev/null
+++ b/plugins/Share-Your-Apps/.gitignore
@@ -0,0 +1,35 @@
+# Build output and caches
+build/
+.gradle/
+.kotlin/
+.cxx/
+.externalNativeBuild/
+captures/
+*.hprof
+
+# IDE and editor state (.cg is CodeOnTheGo's)
+.cg/
+.idea/
+*.iml
+.DS_Store
+Thumbs.db
+
+# Machine-specific settings
+local.properties
+
+# Signing: the keystore and its passwords must never be committed
+release.keystore
+release.properties
+keystore.properties
+*.jks
+*.keystore
+*.p12
+*.pfx
+
+# The bundled server APK is a build output, copied in before each release (see README)
+src/main/assets/share-your-apps-server.apk
+
+# Media (demo video, narration recordings) is kept out of git
+*.webm
+*.mp3
+*.mp4
diff --git a/plugins/Share-Your-Apps/LICENSE b/plugins/Share-Your-Apps/LICENSE
new file mode 100644
index 000000000..0c97efd25
--- /dev/null
+++ b/plugins/Share-Your-Apps/LICENSE
@@ -0,0 +1,235 @@
+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 .
diff --git a/plugins/Share-Your-Apps/README.md b/plugins/Share-Your-Apps/README.md
new file mode 100644
index 000000000..315c98d83
--- /dev/null
+++ b/plugins/Share-Your-Apps/README.md
@@ -0,0 +1,89 @@
+# Share Your Apps (Code On The Go plugin)
+
+A plugin for [Code On The Go](https://github.com/appdevforall/CodeOnTheGo) that publishes
+the owner's apps (APK, source, or both) to a small web store that people on the same Wi-Fi
+network or hotspot can open in their phone's browser. The store is served by the companion
+**Share Your Apps Server** app, which this plugin installs and starts.
+
+## What it does
+
+- **Manage Catalog** (the Share Your Apps tab): the store's name, description, header image and
+ optional PIN; products with their project, APK, pictures and description; an optional
+ Pebble template override and extra JSON. Everything is saved as it's edited.
+- **Publish** builds a complete new Store directory beside the current one: it copies the
+ APKs and media (inlining media of 10,240 bytes or less), zips the source without build
+ output, caches, IDE settings or signing files, and renders the page. It then installs the
+ server if needed, starts it on the new directory, checks every file is served correctly,
+ and deletes the old directory. If anything fails, the store keeps serving the previous
+ version.
+- Tooltips on every heading and button (long-press).
+
+The full design is in the Share Your Apps design document (ADFA-6207).
+
+## Building
+
+Open the project in Code On The Go and build the plugin. `plugin.id` is
+`org.appdevforall.shareyourapps`.
+
+The catalog page is rendered with Pebble, declared `compileOnly`: at runtime the plugin uses
+Code On The Go's own copy (4.1.1), so building needs internet access once to fetch it for
+compiling.
+
+## Bundling the server
+
+The plugin carries the server as `src/main/assets/share-your-apps-server.apk`. That file is a
+build output, so it isn't committed. `./gradlew downloadAssets`, run as its own command before
+`assemblePlugin`, builds the server's release from `server/` and copies it there. CI runs it for every
+build and signs the server with its release key, from repository secrets (see *The release signing key*
+in the design document).
+
+## Running the tests
+
+The tests are in `src/test/kotlin`: an end-to-end test that publishes real catalogs, serves them
+with the server's own code and verifies every file, and a test of the HTML checker. Each runs a
+list of named checks and, if any fail, names them. They run on a computer's Java, not on Android:
+
+ ./gradlew testDebugUnitTest
+
+**On the phone,** two things differ from a computer:
+
+- **Start Gradle with `sh`.** Shared storage doesn't keep the executable bit, so `./gradlew` won't
+ run there. Use `sh ./gradlew testDebugUnitTest` instead.
+- **Use CodeOnTheGo's `aapt2`.** Run from a terminal, Gradle downloads the standard `aapt2`, which
+ is built for Linux computers and can't run on a phone. The build then fails at
+ `processDebugResources` with `Syntax error: word unexpected (expecting ")")`. CodeOnTheGo
+ supplies its own `aapt2` to builds it starts, but not to a terminal, so pass it to Gradle:
+
+ sh ./gradlew testDebugUnitTest -Pandroid.aapt2FromMavenOverride=/data/data/com.itsaky.androidide/files/home/android-sdk/build-tools/36.0.0/aapt2
+
+ That's where CodeOnTheGo keeps it, with build tools 36.0.0. If a different version of
+ CodeOnTheGo keeps it elsewhere, find it with
+
+ find /data/data/com.itsaky.androidide/files -name aapt2 -type f 2>/dev/null | grep -v transforms
+
+ and check a copy with ` version`, which should print `Android Asset Packaging Tool (aapt) 2.…`.
+
+ Give it on the command line like this, not in `gradle.properties`: that file goes with the
+ project, and the setting would break the build on every computer.
+
+The end-to-end test needs the server's core, so `src/test/kotlin/org/appdevforall/shareyourapps/server/`
+holds a **copy** of five of Share Your Apps Server's files. They're used only by the tests and never
+ship in the plugin. When the server's copies of those files change, copy them here again.
+
+**Writing tests:** unit tests compile against Android's version of Java's library (from
+`android.jar`), but run on the computer's or phone's full Java. So they may only use Java
+features Android also has. Reach anything newer through reflection, as `PublishTest.kt` does for
+Unix-domain sockets, or the tests won't compile under Gradle.
+
+## Documentation
+
+- [`docs/share-your-apps-design.md`](docs/share-your-apps-design.md) — the design of Share Your Apps, both the plugin and Share Your Apps Server: how everything works, its limitations and open items, developer notes for building, releasing and testing, and the store page templates.
+- [`docs/qa-steps.md`](docs/qa-steps.md) — step-by-step checks for testers.
+- [`docs/tester-guide/`](docs/tester-guide/) — builds the one-page tester guide PDF.
+- [`docs/review-prompt.md`](docs/review-prompt.md) — a prompt for an independent review of the design.
+- [`templates/`](templates/) — alternative store page templates, and an annotated copy of the default.
+- [`demo/`](demo/) — a demo store of twelve apps with placeholder downloads, for testing and demonstrations.
+
+## License
+
+GNU Affero General Public License v3.0 or later. See `LICENSE`.
diff --git a/plugins/Share-Your-Apps/addon.json b/plugins/Share-Your-Apps/addon.json
new file mode 100644
index 000000000..29314e31e
--- /dev/null
+++ b/plugins/Share-Your-Apps/addon.json
@@ -0,0 +1,16 @@
+{
+ "summary": "Publish your apps and their source to a store on your local network.",
+ "description": "Turns the apps you build into a small web store that people on the same Wi-Fi network or hotspot open in their phone's browser, with no internet and no accounts. The companion Share Your Apps Server serves the store, and a store can be copied to another phone by QR code, typed code or sound.",
+ "tags": [
+ "publishing",
+ "store",
+ "network",
+ "offline"
+ ],
+ "origin": "appdevforall",
+ "license": "AGPL-3.0-or-later",
+ "author": {
+ "name": "App Dev For All",
+ "url": "https://www.appdevforall.org"
+ }
+}
diff --git a/plugins/Share-Your-Apps/build.gradle.kts b/plugins/Share-Your-Apps/build.gradle.kts
new file mode 100644
index 000000000..c216e1f11
--- /dev/null
+++ b/plugins/Share-Your-Apps/build.gradle.kts
@@ -0,0 +1,177 @@
+// Imported, since in a Gradle build file, "java" alone means Gradle's java extension, not the package.
+import java.io.File
+import java.util.Properties
+
+plugins {
+ id("com.android.application")
+ id("com.itsaky.androidide.plugins.build")
+}
+
+pluginBuilder {
+ pluginName = "share-your-apps"
+}
+
+// Release signing: the same key and details as Share Your Apps Server's, from release.properties in Code On The Go's
+// private folder, which is never in the project. Without it, a release build still works, but isn't signed.
+val keystorePropsFile = File("/data/data/com.itsaky.androidide/files/home/keys/release.properties")
+val keystoreProps = Properties().apply {
+ if (keystorePropsFile.exists()) keystorePropsFile.inputStream().use { load(it) }
+}
+val hasValidSigningProps = listOf("storeFile", "storePassword", "keyAlias", "keyPassword").all { keystoreProps[it] != null }
+
+android {
+ namespace = "org.appdevforall.shareyourapps"
+ compileSdk = 36
+
+ defaultConfig {
+ applicationId = "org.appdevforall.shareyourapps"
+ minSdk = 28
+ targetSdk = 36
+ versionCode = 4
+ versionName = "1.0.3"
+ // When this build was made, for the Share Your Apps tab's footer. Release builds use
+ // --no-configuration-cache, so theirs is exact; a cached debug build may show an older time.
+ buildConfigField("long", "BUILD_TIME", "${System.currentTimeMillis()}L")
+ }
+
+ signingConfigs {
+ if (hasValidSigningProps) {
+ create("release") {
+ storeFile = rootProject.file(keystoreProps["storeFile"] as String)
+ storePassword = keystoreProps["storePassword"] as String
+ keyAlias = keystoreProps["keyAlias"] as String
+ keyPassword = keystoreProps["keyPassword"] as String
+ }
+ }
+ }
+
+ buildTypes {
+ release {
+ if (hasValidSigningProps) signingConfig = signingConfigs.getByName("release")
+ // No R8. With AndroidX compileOnly (below), all that's left to shrink is ZXing, and R8 kept breaking
+ // what Code On The Go calls in ways it can't see: a NoSuchMethodError, a NullPointerException and an
+ // AbstractMethodError. proguard-rules.pro stays, with what those taught, in case R8 is ever turned back on.
+ isMinifyEnabled = false
+ proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
+ }
+ }
+
+ // BuildConfig.VERSION_NAME gives store pages a "Made with Share Your Apps 1.0.0" line.
+ buildFeatures {
+ buildConfig = true
+ }
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+ }
+
+ packaging {
+ // Compress the compiled code in the .cgp. Android's default stores it uncompressed, so apps can run it in
+ // place, but that made it 4.3 MB of the plugin's 4.5 MB. Code On The Go's class loader handles either.
+ dex { useLegacyPackaging = true }
+ resources {
+ excludes += setOf(
+ "META-INF/versions/9/OSGI-INF/MANIFEST.MF",
+ "META-INF/DEPENDENCIES",
+ "META-INF/LICENSE",
+ "META-INF/LICENSE.txt",
+ "META-INF/NOTICE",
+ "META-INF/NOTICE.txt"
+ )
+ }
+ }
+}
+
+// Every plugin file (.cgp) must carry the server: it's left out of git, so a fresh clone doesn't
+// have it, and without it the plugin can't install or update the server. This guards the tasks
+// that make the .cgp — assemblePluginDebug, and assemblePlugin for a release — so neither kind can be made
+// without it. Compiling and running the tests don't need it.
+tasks.matching { it.name.startsWith("assemblePlugin") }.configureEach {
+ val server = layout.projectDirectory.file("src/main/assets/share-your-apps-server.apk").asFile
+ doFirst {
+ check(server.isFile) {
+ "src/main/assets/share-your-apps-server.apk is missing. Run ./gradlew downloadAssets, or build Share Your " +
+ "Apps Server's release, copy its app/build/outputs/apk/release/app-release.apk there, and build again. " +
+ "See the README's Bundling the server."
+ }
+ }
+}
+
+// Builds Share Your Apps Server's release from server/ and bundles it. scripts/build-plugins.sh runs any task named
+// downloadAssets before assemblePlugin, as its own invocation, so CI makes the APK this way. In CI the server must be
+// signed with its release key, from the SERVER_SIGNING_* variables: an unsigned or differently signed server can't
+// update the one already on owners' phones, so the build stops instead.
+tasks.register("downloadAssets") {
+ val serverDir = layout.projectDirectory.dir("server").asFile
+ val built = layout.projectDirectory.file("server/app/build/outputs/apk/release/app-release.apk").asFile
+ val bundled = layout.projectDirectory.file("src/main/assets/share-your-apps-server.apk").asFile
+ val ci = System.getenv("CI") == "true"
+ val signed = System.getenv("SERVER_SIGNING_STORE_FILE") != null
+ workingDir = serverDir
+ commandLine("sh", "gradlew", "--console=plain", ":app:assembleRelease")
+ doFirst {
+ check(!ci || signed) {
+ "SERVER_SIGNING_STORE_FILE isn't set. In CI the server is signed with its release key, from the " +
+ "SERVER_SIGNING_* repository secrets. See the design document's The release signing key."
+ }
+ }
+ doLast { built.copyTo(bundled, overwrite = true) }
+}
+
+// The Kotlin library comes from Code On The Go at run time. AndroidX brings its own copies (Fragment depends on
+// Kotlin 1.8, and older parts come with it), so they're excluded from what the plugin bundles — except for the
+// unit tests, which run on a desktop and need their own.
+configurations.configureEach {
+ if (name.endsWith("RuntimeClasspath") && !name.contains("UnitTest") && !name.contains("AndroidTest")) {
+ listOf("kotlin-stdlib", "kotlin-stdlib-jdk7", "kotlin-stdlib-jdk8", "kotlin-stdlib-common").forEach {
+ exclude(group = "org.jetbrains.kotlin", module = it)
+ }
+ }
+}
+
+dependencies {
+ compileOnly(files("../../libs/plugin-api.jar"))
+ // Pebble renders the catalog page. compileOnly: at runtime the plugin uses CodeOnTheGo's own
+ // copy (4.1.1, kept intact by its build), found through the plugin's parent class loader.
+ compileOnly("io.pebbletemplates:pebble:4.1.1")
+
+ // QR codes for templates' qr() function (design, Appendix D.2); the same version as the server's.
+ implementation("com.google.zxing:core:3.5.3")
+ // No AppCompat or Material: the plugin uses neither — it draws its own views, in Code On The Go's screen —
+ // and together they made up most of the .cgp's 13.9 MB.
+ // Just Fragment, not fragment-ktx: the plugin uses only Fragment and Activity's result contracts.
+ // compileOnly: Code On The Go loads classes parent-first, so its own AndroidX (fragment 1.8.9, activity 1.10.1)
+ // is what runs, never a bundled copy. It has every class and method the plugin uses: Fragment, ActivityResult,
+ // ActivityResultCallback, ActivityResultLauncher, ActivityResultContract and StartActivityForResult. Check
+ // any new AndroidX use against Code On The Go's APK first: a missing one fails at run time, not in the build.
+ compileOnly("androidx.fragment:fragment:1.8.8")
+ // The Kotlin library comes from Code On The Go, as Pebble and the plugin API do, rather than being bundled.
+ // gradle.properties sets kotlin.stdlib.default.dependency=false, so the Kotlin build doesn't add it itself.
+ compileOnly("org.jetbrains.kotlin:kotlin-stdlib:2.3.21")
+ testImplementation("org.jetbrains.kotlin:kotlin-stdlib:2.3.21")
+
+ // Tests (./gradlew testDebugUnitTest) run on a computer's Java, not on Android. There, Android's
+ // org.json is only an empty stub, and Pebble isn't provided by CodeOnTheGo, so tests bring their own.
+ testImplementation("junit:junit:4.13.2")
+ testImplementation("org.json:json:20240303")
+ testImplementation("io.pebbletemplates:pebble:4.1.1")
+}
+
+tasks.wrapper {
+ gradleVersion = "9.6.1"
+ distributionType = Wrapper.DistributionType.BIN
+}
+
+tasks.matching {
+ it.name.contains("checkDebugAarMetadata") ||
+ it.name.contains("checkReleaseAarMetadata")
+}.configureEach {
+ enabled = false
+}
+
+kotlin {
+ compilerOptions {
+ jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
+ }
+}
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/aurora-store.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/aurora-store.apk
new file mode 100644
index 000000000..50838f775
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/aurora-store.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/code-on-the-go-32-bit.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/code-on-the-go-32-bit.apk
new file mode 100644
index 000000000..3a532ea3b
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/code-on-the-go-32-bit.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/code-on-the-go-64-bit.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/code-on-the-go-64-bit.apk
new file mode 100644
index 000000000..1fac4439f
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/code-on-the-go-64-bit.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/davx5.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/davx5.apk
new file mode 100644
index 000000000..ed1b53659
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/davx5.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/f-droid.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/f-droid.apk
new file mode 100644
index 000000000..6356ead5e
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/f-droid.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/fennec.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/fennec.apk
new file mode 100644
index 000000000..147a31c54
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/fennec.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/knowledge-to-go-32-bit.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/knowledge-to-go-32-bit.apk
new file mode 100644
index 000000000..467583734
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/knowledge-to-go-32-bit.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/knowledge-to-go-64-bit.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/knowledge-to-go-64-bit.apk
new file mode 100644
index 000000000..da3b8589a
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/knowledge-to-go-64-bit.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/knowledge-to-go-universal.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/knowledge-to-go-universal.apk
new file mode 100644
index 000000000..c488baf7b
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/knowledge-to-go-universal.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/librera.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/librera.apk
new file mode 100644
index 000000000..21dba9663
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/librera.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/organic-maps.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/organic-maps.apk
new file mode 100644
index 000000000..e92f666a5
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/organic-maps.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/pipepipe.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/pipepipe.apk
new file mode 100644
index 000000000..294f8315d
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/pipepipe.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/proton-vpn.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/proton-vpn.apk
new file mode 100644
index 000000000..5c5823887
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/proton-vpn.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/termux.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/termux.apk
new file mode 100644
index 000000000..0b4dbdacf
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/termux.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/thunderbird.apk b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/thunderbird.apk
new file mode 100644
index 000000000..caf0ac094
Binary files /dev/null and b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/apks/thunderbird.apk differ
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/aurora-store/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/aurora-store/README.md
new file mode 100644
index 000000000..a235156c7
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/aurora-store/README.md
@@ -0,0 +1,5 @@
+# Aurora Store — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't Aurora Store's source code.
+
+The real app and its source: https://f-droid.org/packages/com.aurora.store/
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/code-on-the-go/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/code-on-the-go/README.md
new file mode 100644
index 000000000..baf9a8f3e
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/code-on-the-go/README.md
@@ -0,0 +1,5 @@
+# Code on the Go — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't Code on the Go's source code.
+
+The real app and its source: https://appdevforall.org/code-on-the-go/
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/davx5/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/davx5/README.md
new file mode 100644
index 000000000..6953c2b89
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/davx5/README.md
@@ -0,0 +1,5 @@
+# DAVx⁵ — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't DAVx⁵'s source code.
+
+The real app and its source: https://f-droid.org/packages/at.bitfire.davdroid/
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/f-droid/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/f-droid/README.md
new file mode 100644
index 000000000..eea3f00d9
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/f-droid/README.md
@@ -0,0 +1,5 @@
+# F-Droid — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't F-Droid's source code.
+
+The real app and its source: https://f-droid.org/packages/org.fdroid.fdroid/
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/fennec/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/fennec/README.md
new file mode 100644
index 000000000..32e8b36a2
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/fennec/README.md
@@ -0,0 +1,5 @@
+# Fennec F-Droid — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't Fennec F-Droid's source code.
+
+The real app and its source: https://f-droid.org/packages/org.mozilla.fennec_fdroid/
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/knowledge-to-go/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/knowledge-to-go/README.md
new file mode 100644
index 000000000..be51bf1a3
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/knowledge-to-go/README.md
@@ -0,0 +1,5 @@
+# Knowledge to Go — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't Knowledge to Go's source code.
+
+The real app and its source: https://appdevforall.org/
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/librera/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/librera/README.md
new file mode 100644
index 000000000..1a5f15fe2
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/librera/README.md
@@ -0,0 +1,5 @@
+# Librera Reader — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't Librera Reader's source code.
+
+The real app and its source: https://f-droid.org/packages/com.foobnix.pro.pdf.reader/
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/organic-maps/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/organic-maps/README.md
new file mode 100644
index 000000000..c6f406003
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/organic-maps/README.md
@@ -0,0 +1,5 @@
+# Organic Maps — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't Organic Maps's source code.
+
+The real app and its source: https://f-droid.org/packages/app.organicmaps/
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/pipepipe/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/pipepipe/README.md
new file mode 100644
index 000000000..494ae9993
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/pipepipe/README.md
@@ -0,0 +1,5 @@
+# PipePipe — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't PipePipe's source code.
+
+The real app and its source: https://f-droid.org/packages/InfinityLoop1309.NewPipeEnhanced/
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/proton-vpn/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/proton-vpn/README.md
new file mode 100644
index 000000000..cf9baa05f
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/proton-vpn/README.md
@@ -0,0 +1,5 @@
+# Proton VPN — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't Proton VPN's source code.
+
+The real app and its source: https://f-droid.org/packages/ch.protonvpn.android/
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/termux/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/termux/README.md
new file mode 100644
index 000000000..a04309872
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/termux/README.md
@@ -0,0 +1,5 @@
+# Termux — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't Termux's source code.
+
+The real app and its source: https://f-droid.org/packages/com.termux/
diff --git a/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/thunderbird/README.md b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/thunderbird/README.md
new file mode 100644
index 000000000..cc73c3a12
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/Documents/ShareYourAppsDemo/source/thunderbird/README.md
@@ -0,0 +1,5 @@
+# Thunderbird — placeholder source
+
+This folder is a placeholder made for a Share Your Apps demo. It isn't Thunderbird's source code.
+
+The real app and its source: https://f-droid.org/packages/net.thunderbird.android/
diff --git a/plugins/Share-Your-Apps/demo/README.md b/plugins/Share-Your-Apps/demo/README.md
new file mode 100644
index 000000000..b214d092a
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/README.md
@@ -0,0 +1,31 @@
+# Demo store
+
+A catalog of the ten most downloaded apps on F-Droid, with App Dev for All's Code on the Go and Knowledge to Go, for testing and demonstrating Share Your Apps. Code on the Go is listed twice, as its 32-bit and 64-bit versions, and Knowledge to Go three times, as its 32-bit, 64-bit and universal versions, each saying which phones it's for. **Every download is a placeholder**, a tiny file that says so, and the store's description says so too.
+
+- `catalog.json` — the catalog: fifteen products, with pictures, descriptions and links.
+- `Documents/ShareYourAppsDemo/` — the placeholder APKs and source folders the catalog points to.
+- `Pictures/ShareYourAppsDemo/code-on-the-go/` — two videos for Code on the Go: a 15-second title clip with sound, made for this demo, and a Sketch to UI tutorial.
+- `get-demo-pictures.sh` — fetches the other pictures onto the phone: each F-Droid app's icon and two screenshots, read fresh from its F-Droid page, and our apps' icons from their repositories. It never downloads an APK or source code.
+
+## Setting it up
+
+In Code On The Go's terminal, from this `demo` folder:
+
+1. Copy the placeholders and videos to the top of shared storage:
+ ```
+ cp -r Documents Pictures /storage/emulated/0/
+ ```
+2. Fetch the pictures. It should end with `All pictures fetched.`:
+ ```
+ sh get-demo-pictures.sh
+ ```
+3. Install the catalog. The plugin reads its catalog when the Share Your Apps tab first opens, and writes it back when you leave the tab after a change, so do this **after a fresh start of Code On The Go, before opening the tab**:
+ ```
+ D=~/.cg/plugins/org.appdevforall.shareyourapps/data
+ cp "$D/catalog.json" /storage/emulated/0/Download/catalog-backup.json
+ cp catalog.json "$D/catalog.json"
+ ```
+ On older installations, `.cg` may be called `.androidide`.
+4. Open the Share Your Apps tab. It should show **Top Android apps**, with fifteen products. Publish.
+
+To go back to your own store, restore `Download/catalog-backup.json` the same way, after a fresh start.
diff --git a/plugins/Share-Your-Apps/demo/catalog.json b/plugins/Share-Your-Apps/demo/catalog.json
new file mode 100644
index 000000000..7a37de9d5
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/catalog.json
@@ -0,0 +1,238 @@
+{
+ "storeDir": null,
+ "pendingDir": null,
+ "storeName": "Top Android apps",
+ "storeDescriptionHtml": "
The ten most downloaded apps on F-Droid, with App Dev for All's Code on the Go and Knowledge to Go.
This is a demo store: every download is a small placeholder, not the real app or its source. Follow each app's link to get the real one.
Turns an Android phone into an offline library for everyone nearby: Wikipedia, books, maps, lessons and more, shared over local Wi-Fi. Built on Internet-in-a-Box.
32-bit version: for phones that run only 32-bit apps, such as many low-cost and Android Go phones. If the 64-bit version won't install, use this one.
Turns an Android phone into an offline library for everyone nearby: Wikipedia, books, maps, lessons and more, shared over local Wi-Fi. Built on Internet-in-a-Box.
64-bit version: for most phones from recent years. If Android says it isn't compatible with your phone, use the 32-bit version.
Turns an Android phone into an offline library for everyone nearby: Wikipedia, books, maps, lessons and more, shared over local Wi-Fi. Built on Internet-in-a-Box.
Universal version: works on any phone, 32-bit or 64-bit, but it's a larger download.
",
+ "dateAdded": "2026-09-24T12:00:00Z",
+ "ordinal": 15
+ }
+ ]
+}
diff --git a/plugins/Share-Your-Apps/demo/get-demo-pictures.sh b/plugins/Share-Your-Apps/demo/get-demo-pictures.sh
new file mode 100644
index 000000000..763cbd3a2
--- /dev/null
+++ b/plugins/Share-Your-Apps/demo/get-demo-pictures.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Fetches the demo catalog's pictures into Pictures/ShareYourAppsDemo: icons and screenshots
+# only, from F-Droid, GitHub and appdevforall.org. It never downloads an APK or source code.
+D=/storage/emulated/0/Pictures/ShareYourAppsDemo
+missing=0
+
+get() { # url, file
+ if curl -fsSL -o "$2" "$1"; then echo " ok $2"; else echo " FAIL $1"; missing=$((missing+1)); fi
+}
+
+fdroid() { # package, folder
+ mkdir -p "$D/$2"; echo "$2"
+ page=$(curl -fsSL "https://f-droid.org/packages/$1/") || { echo " FAIL couldn't read the F-Droid page for $1"; missing=$((missing+3)); return; }
+ icon=$(printf '%s' "$page" | grep -o "repo/$1/en-US/icon_[^\"]*\.png" | head -1)
+ shots=$(printf '%s' "$page" | grep -o "repo/$1/en-US/phoneScreenshots/[^\"]*" | awk '!seen[$0]++' | head -2)
+ if [ -n "$icon" ]; then get "https://f-droid.org/$icon" "$D/$2/icon.png"; else echo " FAIL no icon on the page"; missing=$((missing+1)); fi
+ n=0; for s in $shots; do n=$((n+1)); get "https://f-droid.org/$s" "$D/$2/screenshot-$n.png"; done
+ while [ $n -lt 2 ]; do n=$((n+1)); echo " FAIL no screenshot $n on the page"; missing=$((missing+1)); done
+}
+
+fdroid org.fdroid.fdroid f-droid
+fdroid com.termux termux
+fdroid com.aurora.store aurora-store
+fdroid org.mozilla.fennec_fdroid fennec
+fdroid at.bitfire.davdroid davx5
+fdroid net.thunderbird.android thunderbird
+fdroid ch.protonvpn.android proton-vpn
+fdroid InfinityLoop1309.NewPipeEnhanced pipepipe
+fdroid app.organicmaps organic-maps
+fdroid com.foobnix.pro.pdf.reader librera
+
+mkdir -p "$D/code-on-the-go" "$D/knowledge-to-go"
+echo code-on-the-go
+# The app icons come from each app's own GitHub repository, on its default branch.
+get https://raw.githubusercontent.com/appdevforall/CodeOnTheGo/HEAD/app/src/main/ic_launcher-playstore.png "$D/code-on-the-go/logo.png"
+get https://appdevforall.org/wp-content/uploads/2026/08/SketchToUI.png "$D/code-on-the-go/sketch-to-ui.png"
+get https://appdevforall.org/wp-content/uploads/2026/08/plugin-mgr-light.png "$D/code-on-the-go/plugin-manager.png"
+echo knowledge-to-go
+get https://raw.githubusercontent.com/appdevforall/KnowledgeToGo/HEAD/docs/images/k2go-logo.png "$D/knowledge-to-go/logo.png"
+get https://appdevforall.org/wp-content/uploads/2026/09/KnowledgeToGoPressRelease.png "$D/knowledge-to-go/announcement.png"
+
+if [ $missing -eq 0 ]; then echo "All pictures fetched."; else echo "$missing picture(s) missing: remove them from those products in Manage Catalog, or publishing will stop."; fi
diff --git a/plugins/Share-Your-Apps/docs/qa-steps.md b/plugins/Share-Your-Apps/docs/qa-steps.md
new file mode 100644
index 000000000..9008ccf1a
--- /dev/null
+++ b/plugins/Share-Your-Apps/docs/qa-steps.md
@@ -0,0 +1,334 @@
+# Share Your Apps — QA steps
+
+**You'll need two phones:**
+
+- **Phone A, the owner's:** Android 9 or later, with Code On The Go, and one or two apps you've built, so each has an APK.
+- **Phone B, a buyer's:** any Android phone with a browser and a camera. In section J, it's also a second seller: it gets Share Your Apps Server from Phone A, and needs no Code On The Go.
+
+Install the plugin with the tester guide attached to this ticket. For each step that fails, add a comment with the step number, what happened, a screenshot, and the logs: in Share Your Apps Server, tap **Export logs**.
+
+Some public and guest Wi-Fi networks stop phones reaching each other. If Phone B can't open the store on Wi-Fi, try a home network, or the hotspot tests in section F.
+
+## A. Install
+
+1. **Install the plugin.** In Code On The Go, open the **Addons Manager**. If an earlier Share Your Apps plugin is installed, uninstall it first: this one is a release build, signed with a different key, so it may be refused otherwise. Then install the `.cgp` from this ticket, and activate it.
+ **Expected:** a **Share Your Apps** tab appears.
+2. **Open the tab.**
+ **Expected:** **Manage Catalog**, grouped into **Store**, **Products** and **Advanced**, with a **Publish** bar at the bottom. It's light or dark to match your phone's setting.
+
+## B. The catalog
+
+1. **Fill it in.** Enter a store name. Tap **+ Add product**, then **Choose** a project and its APK.
+ **Expected:** the product's card shows `Source –` and `APK ✓` with the APK's size, in green.
+2. **It's kept.** Leave Code On The Go, then return to the tab. Then close Code On The Go completely and reopen it.
+ **Expected:** the catalog is exactly as you left it both times.
+3. **Rotation and font size.** While typing in a field, rotate the phone. Then change the phone's font size and come back.
+ **Expected:** nothing you typed is lost.
+4. **HTML warnings.** Type `bold` into the store description.
+ **Expected:** a red warning under the field says ` is opened but never closed`. Add `` at the end, and the warning disappears.
+5. **Warnings on closed cards.** Type `oops` into a product's description, then tap the product's name to close its card.
+ **Expected:** the closed card shows a one-line warning about the description's HTML.
+6. **Help.** Long-press a heading, such as **PIN (optional)**, then tap **+ See more**, then the button under the detail.
+ **Expected:** a short tooltip appears — not *n/a* — then more detail, with a button, *The store's PIN*. It opens the plugin's help page at *PIN*, with no internet needed. Long-pressing the PIN field itself still selects its text, as usual.
+
+7. **A product's Extra JSON.** In a product, type `{"whatsNew": "Faster", "license": "MIT", "author": "You", "website": "https://example.org"}` into **Extra JSON**. Then type something invalid, such as `{oops`.
+ **Expected:** while it's invalid, the note under the field says *Not valid yet*, and the last valid value is kept. Long-pressing the heading lists the four keys.
+
+8. **Describing a picture, and captions for a video.** On a product with a picture, tap **Describe** beside it, write what it shows, and **Save**. On one with a video, tap **Describe**, then **Choose captions file**, and pick a `.vtt` file. Publish.
+ **Expected:** the list shows *described* and *captions* beside them. On the store page, a screen reader — or, on a computer, the browser's inspector — gives the picture your description, not *…, picture 1 of 2*. The video offers captions, in its menu or its **CC** button.
+
+## C. Publishing
+
+1. **First publish.** Tap **Publish**. A dialog asks you to confirm, saying how many products the store will have; tap **Cancel**. Then tap **Publish** again, and **Publish** in the dialog. Allow each thing Android asks for: installing apps, **All files access**, and **Nearby devices** if you're not on Wi-Fi.
+ **Expected:** **Cancel** changes nothing, and nothing starts. After confirming, it ends with `Published Store_… — … files verified.`
+2. **A product with nothing to download.** Add a product without choosing an APK, and publish.
+ **Expected:** the message ends with `Left out: has no APK chosen, and Publish the source isn't ticked.`
+3. **Removing a product.** Remove a product, publish, then open the store on Phone B.
+ **Expected:** the product is gone from the store.
+4. **Only one store folder.** In a file manager, open `CodeOnTheGoProjects`.
+ **Expected:** exactly one folder named `Store_` and 8 digits.
+
+5. **The timestamp.** Publish, and read the message under the button. Then turn on **Use 24-hour format** in Android's date and time settings, and publish again.
+ **Expected:** the message starts with the date and time, then a dot, then *Published*, on one line. After the switch, the time is in 24-hour form, such as `16:32:10`.
+
+6. **The accessible version.** Open the store. Tap **Accessible version**, at the top left.
+ **Expected:** a plain, large-text page with every product, and *Standard version* at its top left, leading back.
+
+7. **A publish that updates the server.** Install a newer plugin, as testers do with each build, and publish.
+ **Expected:** Android asks to update Share Your Apps Server, and the store serves again once it's done. The version line at the foot of **Manage server** shows the new version.
+
+8. **An unsigned APK.** Build an app with **assembleRelease** but no signing set up, so it makes `app-release-unsigned.apk`. Choose it for a product.
+ **Expected:** the APK picker marks it *Unsigned: buyers can't install it*. Publishing goes ahead, and its message ends with a note that the APK isn't signed, so buyers can't install it. Choose a signed build again afterwards.
+
+9. **Progress and timing.** Publish a store with at least one product whose source is ticked, and watch the message under the button.
+ **Expected:** while the store is built, it changes every half second, naming what it's doing — such as *zipping Todo App's source* — with files and bytes handled, of their totals. When it's done, the message says *Published … files verified*, as before.
+
+## D. A buyer on the same Wi-Fi
+
+Put both phones on the same Wi-Fi network.
+
+1. **The QR codes.** On Phone A, open **Share Your Apps Server** and tap **Show QR codes for buyers**. Enter the Wi-Fi password, then tap the keyboard's **Done** key.
+ **Expected:** the keyboard closes, the fields shrink to `Joining "…" · Change`, and two codes appear: one to join the network, one to open the store.
+2. **Open the store.** On Phone B, scan the second code.
+ **Expected:** the store opens, with a red-and-cream awning across the top, a teal header, and a card for each product. With no header image set, the octopus in the header moves.
+3. **Download the APK.** Tap **Download APK**, then open the download.
+ **Expected:** it downloads named after the product, such as `great-scott.apk`, not `app-release.apk`. The phone asks to allow the browser to install apps; allow it, and the app installs. Afterwards, turn that setting off again, in **Settings → Apps → Special app access → Install unknown apps**. On some Samsung phones, **Auto Blocker** blocks the install: turn it off, in **Settings → Security and privacy → Auto Blocker**, install, and it turns itself back on. Note in your report if your phone needed this, and its model, since these obstacles vary between phones.
+4. **Download the source.** Tap **Download source**, then open the zip.
+ **Expected:** it opens and holds the project's files, but no `.git` folder, no `build` folders, and no keystore or `release.properties` files.
+5. **Changes show straight away.** On Phone A, rename a product and publish. On Phone B, reload the store.
+ **Expected:** the new name appears on the first reload.
+6. **Lists in descriptions.** Give a product the description `
one
two
`, publish, and look on Phone B.
+ **Expected:** the numbers sit inside the card, not past its edge.
+7. **A stalled download.** Give a product a large source zip, over 50 MB. On Phone B, start **Download source**, then switch Phone B's Wi-Fi off. Straight away, open the store on a third device, or on Phone A's browser.
+ **Expected:** the store opens straight away. About two minutes later, Share Your Apps Server's log shows `closed a connection … that received nothing for 120 s`.
+8. **A paused video.** On Phone B, play one of Code on the Go's videos, and pause it partway. Straight away, open the store on a third device, or on Phone A's browser, and download an APK.
+ **Expected:** the store opens and the download starts straight away, with the video still paused on Phone B.
+
+9. **Skipping in a video.** On Phone B, play one of Code on the Go's videos, and drag its position bar to near the end. Then pause a video for over two minutes, and play it again.
+ **Expected:** the video jumps to the new position, and plays from there. The paused video carries on from where it stopped, not from the beginning.
+
+10. **Leaving Wi-Fi.** While Phone A serves on Wi-Fi, switch its Wi-Fi off.
+ **Expected:** within a few seconds, Share Your Apps Server shows it stopped, because the Wi-Fi network was lost, and says to reconnect or tap Start to use a hotspot.
+11. **A missing page.** On Phone B, add `f/nothing` to the end of the store's address.
+ **Expected:** a page saying **Not found**, with the awning and the octopus.
+
+12. **What buyers learn about each download.** Look under a product's buttons.
+ **Expected:** both buttons show a size. Under them, a line such as *Version 2.1 · Android 9 or later · For 64-bit phones*; an app with no native code says *For all phones*. A product given the Extra JSON from B shows *What's new* under its description, and *By You · License: MIT · Website* under the buttons.
+
+13. **The store's Extra JSON.** On Phone A, set the store's **Extra JSON** to `{"announcement": "New this week", "contact": {"name": "Your name", "email": "you@example.org"}, "accent": "#1E88E5"}`, and publish. Reload the store on Phone B. Then change the accent to `"red"`, and publish again.
+ **Expected:** the announcement appears above the products, the contact details at the foot of the page, with the email as a link, and the APK buttons in blue, with black or white text. `"red"` isn't a hex colour, so it's ignored, and the buttons go back to their usual colour. The accessible version shows the announcement and contact, but keeps its own colours.
+
+## E. PIN
+
+1. **Set a PIN.** On Phone A, enter a PIN such as `1234`, and publish. On Phone B, open the store in a new private tab.
+ **Expected:** a PIN page with the awning, the octopus and the store's name. A wrong PIN shows a red error; the right one opens the store.
+2. **It remembers.** On Phone B, open the store in an ordinary tab — not a private one, which forgets everything when it closes — and enter the PIN. Close the browser, reopen it, and open the store again.
+ **Expected:** no PIN is asked for, for up to 24 hours.
+3. **Changing the PIN.** Change the PIN on Phone A and publish. Reload the store on Phone B.
+ **Expected:** Phone B still gets straight in, without the new PIN.
+
+4. **The PIN field.** Look at the PIN field in Manage Catalog.
+ **Expected:** it's on one line with its label, just wide enough for six digits, with *Up to 6 digits* in the note below.
+
+## F. The hotspot — Phone A not on Wi-Fi
+
+1. **Wi-Fi Direct.** On Phone A, switch Wi-Fi **on**, but disconnect from every network. In Share Your Apps Server, tap **Start**, and allow **Nearby devices** if asked.
+ **Expected:** the status panel shows a network named `DIRECT-LS-…` and its password. The log shows `Wi-Fi Direct group up`.
+2. **Join and shop.** Open **Show QR codes for buyers**. On Phone B, scan the first code, then the second.
+ **Expected:** Phone B joins the network, then the store opens.
+3. **The same network every time.** Tap **Stop**, then **Start**.
+ **Expected:** the same name and password as before, and Phone B reconnects by itself.
+4. **Buyers stay connected during a publish.** With Phone B connected, publish from Phone A.
+ **Expected:** Phone B stays connected, and a reload shows the new store.
+5. **Tap to copy.** On the QR code screen, tap the network name, the password, then the address; then tap the copy icon to the right of the name and password.
+ **Expected:** each one flashes a green **Copied!**. The icon copies the name and password together, on two lines.
+6. **The fallback hotspot.** Tap **Stop**, switch Wi-Fi **off**, and tap **Start**.
+ **Expected:** it starts anyway. The log shows `Wi-Fi Direct group failed`, then `local-only hotspot up`. The name and password differ from the Wi-Fi Direct ones.
+7. **Losing the hotspot.** Tap **Stop**. Switch Wi-Fi **on** without connecting, tap **Start**, then switch Wi-Fi **off**.
+ **Expected:** within a second or two the server stops, saying Wi-Fi was switched off, which stopped the Wi-Fi Direct group.
+8. **Changing the name and password.** In the **Wi-Fi Direct hotspot** panel, type a name after `DIRECT-LS-`, tap **Suggest a password**, then **Save name & password**. Tap **Stop**, then **Start**.
+ **Expected:** the limits update as you type, a name that's too long turns red, and saving explains that buyers must join again. After restarting, the new name and password are in use, and Phone B has to join again.
+
+9. **The phone's own Mobile hotspot.** Tap **Stop**. Switch Phone A's Wi-Fi off, turn on its **Mobile hotspot** in Settings, and join Phone B to it. Tap **Start**.
+ **Expected:** the status panel says *On this phone's Mobile hotspot*. On the QR code screen, enter the Mobile hotspot's name and password; the join code appears, and Phone B opens the store from the address code. Then turn the Mobile hotspot off: within about 10 seconds, the server stops, saying the phone's Mobile hotspot was turned off.
+
+10. **Buyers on mobile data.** With the server on a hotspot, open **Show QR codes for buyers**.
+ **Expected:** under the store's code, a tip says the network has no internet, and, if a buyer's phone can't open the store, to have them turn on airplane mode, then Wi-Fi, and turn airplane mode off afterwards.
+
+11. **Location off, on Android 9 to 12,** if you have such a phone. Turn Location off, turn Wi-Fi off, and tap **Start**.
+ **Expected:** the server doesn't start, and Manage Server says to turn Location on, then tap **Start**. With Location on, it starts.
+
+## G. Share Your Apps Server
+
+1. **The layout.** Open the app.
+ **Expected:** five raised panels: **Status**, **Server**, **When to run**, **Wi-Fi Direct hotspot** and **Logs**.
+2. **Pausing with the screen.** Choose **Pause when the screen turns off**. Turn the screen off, wait a few seconds, then turn it on without unlocking.
+ **Expected:** the notification says the server is paused. Now unlock the phone: within a few seconds it's serving again, and the log shows `[server] resuming: the phone was unlocked`.
+3. **The full log.** Tap **View logs**. Try an older file's chip, search for `gzip`, switch between **Requests** and **Status**, and pinch to zoom.
+ **Expected:** each works; the newest lines are at the top.
+4. **Exporting logs.** Tap **Export logs**, and choose Gmail or Drive.
+ **Expected:** the attachments are named `share-your-apps-server-log….txt`.
+5. **The log pane.** Swipe the small log pane sideways, and wait a few seconds.
+ **Expected:** it stays where you left it.
+6. **Help.** Long-press a panel's heading, such as **Server**, or a button. Tap the underlined **+ See more**, then the button under the detail. Then long-press it again, and tap the faint **ⓘ** in the tooltip's corner.
+ **Expected:** a tooltip on a pale beige, with a faint ⓘ; then its detail, and a button that opens a help page at the right section; the pages, on the same beige, link to each other. **ⓘ** opens *Help data*, listing the database rows behind the tooltip. Long-pressing a text field, such as the port, still selects its text, as usual. **Help**, beside **Start** and **Stop**, opens the table of contents.
+
+7. **Back in help, on Android 13, 14 or 15,** if you have such a phone: open help, follow a link, then press Back.
+ **Expected:** Back goes back a page, rather than closing help.
+
+8. **Dark mode.** Switch the phone to dark mode, and open **Manage server**, **Share this store…**, **Import a store…**, **View logs**, and a tooltip and a help page. Then **Show QR codes for buyers**.
+ **Expected:** every screen dark, with readable text and buttons, and help on a warm dark brown — except the QR codes screen, which stays black on white, for cameras. Switch back to light mode: each screen follows.
+
+9. **The address, and what Start will serve.** While serving, look at the **Status** panel.
+ **Expected:** the address, with a copy icon on its right, which copies it — paste it somewhere to check. Long-pressing the address shows its help. The line under **Show QR codes for buyers** reads *Start will serve…*, with *Start* in a thin box.
+
+10. **The log size limit.** In **Logs**, enter **500**, then **0**, then **100**.
+ **Expected:** 500 gets a red marker and a red note naming the valid range, 0 to 100; 0 and 100 are accepted.
+
+11. **Tooltips near the bottom.** Long-press **Done** on **Show QR codes for buyers**, and **Cancel** on **Share this store…**; in each, tap **+ See more**.
+ **Expected:** each tooltip stays fully on screen — above its button if there's no room below — also after it grows.
+
+12. **Smaller stores.** Publish a store with at least one product whose source is ticked. Wait a minute, then, in a file manager, open `CodeOnTheGoProjects`, the `Store_…` folder, then `products` and that product's folder. Then, on Phone B, open the store, and tap **Download source** for that product.
+ **Expected:** the source zip is there only as `…-source.zip.gz`, with no plain `.zip` beside it. The source downloaded on Phone B is a `.zip` that opens normally, with the project's files inside.
+13. **Start and Stop follow the server.** Open **Share Your Apps Server** with the server stopped. Tap **Start**, wait for the address to appear in the **Status** panel, then tap **Stop**. Then tap **Start** again, leave the app, and open it again.
+ **Expected:** while the server is stopped, **Status** says *Stopped*, **Start** is enabled, green, with white text, and **Stop** is disabled, with the default grey background. While it's serving, **Start** is disabled, with the default grey background, and **Stop** is enabled, red, with white text. After **Stop**, it's back to the stopped look. Reopening the app while it's serving shows **Start** disabled and **Stop** enabled. A known limit: between tapping **Start** and the address appearing, **Start** stays enabled.
+14. **The button colours in both modes, and at a large font.** Look at the **Server** panel in the phone's light mode, then dark mode, with the server stopped and again while it's serving. Then set the phone's font size to its largest, and look again.
+ **Expected:** in both modes, the enabled and disabled buttons are easy to tell apart, and each button's text is readable. At the largest font, **Start**, **Stop** and **Help** aren't cut off, and you can reach all three.
+
+## H. Icons and motion
+
+1. **The launcher icon.** Look at Share Your Apps Server on the home screen.
+ **Expected:** a violet octopus at a market stall, under a red-and-cream awning.
+2. **Themed icons.** Turn on themed icons. On a Samsung: **Settings → Wallpaper and style → Color palette**, then **Apply palette to app icons**.
+ **Expected:** the icon becomes a one-colour silhouette of the octopus, holding up two tiles.
+3. **Reduced motion.** Turn on **Remove animations** in Android's accessibility settings, then reload the store on Phone B.
+ **Expected:** the octopus in the header stands still.
+
+## I. Templates
+
+The four alternative templates are attached to ADFA-6207 as `.peb` files. Save them to Phone A's Download folder.
+
+1. **Choosing a template.** In Manage Catalog, under **Advanced**, tap **Choose a template file**.
+ **Expected:** a browser opens in Download, showing folders and `.peb` files only.
+2. **Each look.** Choose `theme-neon-arcade.peb`, publish, and open the store on Phone B. Do the same with `theme-morning-edition.peb` and `theme-aurora-deck.peb`.
+ **Expected:** three very different looks, each with every product, its pictures, downloads and facts, and an *Accessible version* link at the top left.
+3. **Clear Access.** Choose `theme-clear-access.peb`, and publish.
+ **Expected:** the store itself is the large-text accessible page, with no *Accessible version* link, since it doesn't need one.
+4. **With a screen reader.** On Phone B, turn on **TalkBack** in Android's accessibility settings, and open the accessible version of any store. Swipe through the page, then use TalkBack's heading navigation.
+ **Expected:** TalkBack reads a *Skip to the apps* link first, then each app's name as a heading. Download links say whose they are and how big, such as *Download Termux APK, 265 B*, and pictures are read as *Termux, picture 1 of 3*.
+5. **Reduced motion.** With **Remove animations** on, open Neon Arcade and Aurora Deck.
+ **Expected:** nothing moves.
+6. **Back to the default.** Tap **Load the default template**, and publish.
+ **Expected:** the store's usual look.
+
+7. **Extending the default.** Make a file `mine.peb` in Download containing just these two lines, choose it with **Choose a template file**, and publish:
+ ```
+ {% extends "default" %}
+ {% block announcement %}
Welcome to the new look
{% endblock %}
+ ```
+ **Expected:** the store looks exactly as it does with the default template, apart from the announcement line, which reads *Welcome to the new look*.
+8. **A macro and an include, from the template library.** Make the folder `CodeOnTheGoProjects/ShareYourAppsTemplates`, with a file `macros.peb` containing `{% macro badge(text) %}[{{ text }}]{% endmacro %}`, and a file `note.peb` containing `
Shared nearby
`. Add these lines to `mine.peb`, choose it again, and publish:
+ ```
+ {% import "macros" %}
+ {% block footer %}{{ badge('Hi') }}{% include "note" %}{{ parent() }}{% endblock %}
+ ```
+ **Expected:** the footer starts with **[Hi]** and *Shared nearby*, followed by the usual footer.
+9. **A missing template.** In `mine.peb`, change `"note"` to `"nowhere"`, choose it again, and publish.
+ **Expected:** the publish stops, saying *There's no template "nowhere" in CodeOnTheGoProjects/ShareYourAppsTemplates*, and the store keeps serving its previous version. Afterwards, tap **Load the default template**, and publish.
+
+10. **Built-in functions.** Make `mine.peb` contain just these lines, choose it, and publish:
+ ```
+ {% extends "default" %}
+ {% block announcement %}
{% endblock %}
+ {% block footer %}{{ qr('https://example.org', 'Example') }}{{ parent() }}{% endblock %}
+ ```
+ **Expected:** the announcement shows how many apps the store has, such as *3 apps*, then **Bold** and a working link. The footer starts with a QR code that a phone's camera reads as `https://example.org`. Afterwards, tap **Load the default template**, and publish.
+
+## J. Sharing a store with another seller
+
+Phone A serves its own store; Phone B becomes a second seller, serving a copy. Phone B's own browser, or a third device, is the buyer of the copy.
+
+1. **The share screen.** Right after publishing, on Phone A: **Share Your Apps Server** → **Manage server** → *Copies of this store* → **Share this store…**
+ **Expected:** it may say *Getting the store ready to share…* for a moment, then shows a QR code, a code such as `LS-FM50-ZV7G` with a copy button beside it, *This code works for one phone, for 10 more minutes*, and a smaller QR code, *No Share Your Apps Server on the other phone?* Rotating Phone A keeps the same code. The screen stays on.
+2. **Copying the code.** Tap the copy button, and paste into any text field.
+ **Expected:** the code pastes exactly as shown.
+3. **The app for Phone B.** If Phone B doesn't have Share Your Apps Server, scan the **small** QR code with its camera app, open the link, and install the download. Allow the browser to install apps if asked, and turn that off again afterwards; on some Samsung phones, turn **Auto Blocker** off first.
+ **Expected:** Share Your Apps Server installs. Its version line, at the foot of **Manage server**, matches Phone A's.
+4. **Importing by QR code, then denying.** On Phone B, scan the **large** QR code with the camera, and open the link.
+ **Expected:** Share Your Apps Server's import screen opens with the code filled in, and the phone's own name. Tap **Continue**: Phone B shows four digits, and Phone A shows *Allow a copy?*, with Phone B's name and the **same** four digits. Tap **Deny** on Phone A: Phone B says the owner denied it, and nothing was imported.
+5. **Importing by typed code, and allowing.** On Phone A, tap **Share again**. On Phone B: **Manage server** → **Import a store…**, type the code in lower case, and **Continue**. On Phone A, choose **In a month**, and **Allow**.
+ **Expected:** Phone B shows its progress, receiving the store, then *Imported …*, with its expiry date.
+6. **Leaving mid-transfer.** Share again, with a store large enough to take a while. As Phone B starts receiving, press Home.
+ **Expected:** a notification shows the import's progress, and the import finishes. Opening it again shows *Imported …*.
+7. **Cancel mid-transfer.** Share again. As Phone B starts receiving, tap **Cancel**.
+ **Expected:** nothing is imported, and Phone B's earlier copy, if any, is untouched.
+8. **A transfer that fails, then Try again.** Share again. As Phone B starts receiving, turn its Wi-Fi off for a few seconds, then on.
+ **Expected:** Phone B says the import failed, with **Try again**; Phone A says the copy didn't arrive. **Try again** on Phone B finishes it.
+9. **Code rules.** On a fresh share: type a wrong code on Phone B five times, then the right one.
+ **Expected:** the right one is refused too, and Phone A's screen says the share has ended. Share again, and wait 10 minutes without importing: the code is then refused as expired. And with Phone B importing, a third phone using the same code is refused.
+10. **Over Phone A's hotspot, with mobile data on.** Turn Phone A's Wi-Fi off, so it serves on a hotspot, and share. Join the hotspot on Phone B, with its mobile data **on**, and import.
+ **Expected:** the import works. Its last screen warns that Phone B is on the owner's network.
+11. **Serving the copy.** On Phone B, back on your ordinary Wi-Fi: tap **Serve it now**, or **Manage server** → the store's panel → **Serve this store**, after setting a PIN. Open the store as a buyer, from Phone B's **Show QR codes for buyers**.
+ **Expected:** the store asks for Phone B's PIN — not Phone A's — then shows the same store as Phone A's. Downloads work.
+12. **The panels' captions.** Look at **Manage server**'s sharing panels on each phone.
+ **Expected:** on Phone A, serving: **Share this store…** enabled, and *Import a store* disabled, saying the phone is serving a store. On Phone A, after **Stop**: **Share this store…** disabled, *Start serving your store to share it*. On Phone B, serving its copy: both disabled, with *Copies can't be passed on*, and *This phone is serving a store*. Each changes as soon as the server starts or stops.
+13. **Start on Phone B.** Tap **Stop**, then **Start**.
+ **Expected:** it serves the copy again. The Status panel says *Start will serve the imported copy of …*, with *Start* in a thin box.
+14. **A QR link while serving.** With Phone B serving its copy, scan another share's QR code with its camera.
+ **Expected:** the import screen says *Can't import a store here*, and why.
+15. **A newer copy.** On Phone B, **Stop**. On Phone A, change something in the catalog, publish, and share again. Import it on Phone B.
+ **Expected:** it replaces the old copy without asking, with the change, and its new expiry.
+16. **Removing a copy.** On Phone B, **Remove this store**.
+ **Expected:** it asks first; **Keep it** changes nothing. **Remove** stops the server if it's serving the copy, and the panel disappears.
+17. **Expiry by date.** Import a fresh copy, choosing **In a week**, and serve it. Turn off **Automatic date and time**, and set the date 8 days ahead.
+ **Expected:** within a minute, the server stops, and **Manage server** shows *A store has expired*, with no date. A download under way at that moment finishes first. Turn **Automatic date and time** back on, and tap **OK**.
+18. **The clock.** Import a fresh copy with **In a week**, and another time with **Never**. Each time, turn off **Automatic date and time**, set the time 10 minutes back, then open Share Your Apps Server. The copy is checked when the app opens or while the server is serving it, not while the server is stopped and the app is closed.
+ **Expected:** the **In a week** copy is deleted, with exactly the same *A store has expired* notice as step 17, and nothing mentioning the clock, on screen or in **View logs**. The **Never** copy is kept. Turn **Automatic date and time** back on afterwards.
+19. **Optional, with a third phone that has Code On The Go:** publishing on a phone holding a copy. On Phone A, stop serving, and import a copy from the third phone. Then publish from Code On The Go on Phone A.
+ **Expected:** Phone A serves its own store, not the copy, without asking. The copy's panel stays, offering **Serve this store**.
+
+20. **The share screen, for Phone B.** On Phone A's share screen, read each line, then look under the small QR code.
+ **Expected:** each line makes clear whether it means *this phone* or *the other phone*. Under the small code, *Or open this link in the other phone's browser:*, the whole link — on two lines if it doesn't fit on one — and a copy button that copies it.
+
+## K. Optional: checks that need a terminal
+
+Run these on Phone A, in Code On The Go's terminal, using the address shown in Share Your Apps Server in place of `ADDRESS`.
+
+1. **Compression.** A few seconds after publishing, once the server has compressed the page in the background: `curl -sI -H 'Accept-Encoding: gzip' http://ADDRESS/`
+ **Expected:** the headers include `Content-Encoding: gzip` and `Cache-Control: no-cache`.
+2. **Without compression.** `curl -sI http://ADDRESS/`
+ **Expected:** no `Content-Encoding` header.
+3. **The hotspot address.** While the server runs on a hotspot, `curl -s http://ADDRESS/ | head -c 200`
+ **Expected:** the start of the store's page.
+
+4. **A catalog replaced by hand.** With the Share Your Apps tab open, go to the terminal and copy another catalog over the plugin's — for example, the demo's: `cp demo/catalog.json ~/.cg/plugins/org.appdevforall.shareyourapps/data/catalog.json` from the plugin project. Return to the tab.
+ **Expected:** the tab now shows that catalog, without restarting. If you had unsaved changes in the tab, they're kept instead, with a message saying so. Put your own catalog back the same way afterwards.
+
+
+## L. MCP control
+
+New in Share Your Apps Server 1.0.48. **MCP control** lets apps on the same phone, such as an AI assistant, start and stop the server, share the store and import a store. It's off until you turn it on, only apps on that phone can reach it, and they can't change the store or approve a copy. Steps 1 to 8 need only Phone A. Steps 9 and 10 are optional and need a terminal.
+
+1. **Off by default.** On Phone A, open **Share Your Apps Server**, and look at the **Server** panel, below **Start**, **Stop** and **Help**.
+ **Expected:** a switch, **MCP control**, is off. The line under it says *Off. Turn on to let apps on this phone control the server.* **Copy token** and **New token** aren't shown, and there's no MCP notification.
+2. **Turning it on asks first.** Turn the switch on.
+ **Expected:** a dialog, *Turn on MCP control?*, says that apps will be able to start and stop the server, share this store and import a store; that they can't change the store or approve a copy; that it also lets the app use the microphone, while receiving a handshake; and that each app needs the token. **Cancel** leaves the switch off. Turn it on again, and tap **Turn on**: the switch is on, and the line under it reads *On, at http://127.0.0.1:6176/mcp*. **Copy token** and **New token** appear, and a notification shows, with a **Turn off** button. The first time, Android then asks to allow the microphone.
+3. **The microphone line.** Allow the microphone.
+ **Expected:** the line under the switch shows only the address. Now turn MCP control off, take the microphone permission away in Android's **Settings → Apps → Share Your Apps Server → Permissions**, turn MCP control on again, and tap **Turn on**, then **Don't allow** if asked. **Expected:** MCP control still turns on, and a second line reads *Microphone not allowed: hearing a sharing phone's tones needs a person.* Allow the microphone again afterwards. **Optional:** after you restart the phone, and before you open Share Your Apps Server, then open it, the second line may read *Microphone: works once the app is opened.*
+4. **Copy token.** Tap **Copy token**, and paste into any text field.
+ **Expected:** a long token pastes. The token is never shown on the server screen. On Android 12 and earlier a short *Token copied* message appears; later versions show Android's own copy confirmation.
+5. **New token.** Tap **New token**.
+ **Expected:** a dialog, *Make a new token?*, says apps using the old token will be refused until they're given the new one. **Cancel** changes nothing. Tap **New token** again, then **Copy token** and paste: the token is different from step 4's.
+6. **Help.** Long-press **MCP control**, tap **+ See more**, then the button under the detail. Then long-press **Copy token**.
+ **Expected:** a tooltip, *Lets apps on this phone control the server, through MCP. Off until you turn it on.*; then more detail, and a button that opens the **MCP control** help page, with no internet needed. The **Copy token** tooltip begins *The password apps send to use MCP control.*
+7. **The store's port can't be 6176.** Set **Port** to `6176`, and tap **Start**.
+ **Expected:** the **Status** panel says *Port 6176 is kept for MCP control. Choose another port, such as 6175.* The server doesn't start. Put the port back to 6175 afterwards.
+8. **Turning it off.** Turn it off from the notification's **Turn off** button. Then turn it on again, and turn it off with the switch.
+ **Expected:** each time, the notification goes, the switch is off, the line reads *Off. Turn on to let apps on this phone control the server.*, and **Copy token** and **New token** disappear.
+9. **Optional, in a terminal on Phone A: the token is required.** With MCP control on: `curl -si -X POST http://127.0.0.1:6176/mcp -H 'Content-Type: application/json' -d '{}'`
+ **Expected:** `HTTP/1.1 401 Unauthorized`, a `WWW-Authenticate: Bearer realm="Share Your Apps Server"` header, and a message that begins *Missing or wrong token.* With MCP control off, the same command can't connect.
+10. **Optional, in a terminal on Phone B: other phones can't reach it.** With MCP control on, on Phone A: use Phone A's own network address, the numbers in the store's address before the port, in `curl -m 5 http://PHONE_A_ADDRESS:6176/mcp -H 'Content-Type: application/json' -d '{}'`
+ **Expected:** the connection is refused or times out, with no reply from Share Your Apps Server. Only apps on Phone A itself can reach MCP control.
+
+What apps can do once they have the token, such as sharing a store or importing one, is checked with the scripts in the `mcp` folder of this pack: see `mcp/README.txt`. The same scenarios are in ADFA-6207's Steps to QA.
+
+## M. Sound handshake
+
+New in Share Your Apps Server 1.0.48. Instead of scanning or typing the share code, a phone can hear it: the owner taps **Play sound**, and the other phone taps **Listen**. Sound only carries the handshake; the store itself still goes over Wi-Fi. You'll need both phones close together, with the media volume up and the room fairly quiet.
+
+1. **Play sound.** On Phone A, serving a published store: **Manage server** → **Share this store…**. Tap **Play sound**.
+ **Expected:** a short run of tones plays from Phone A, and the button reads **Stop sound**. The tones repeat, for up to 30 seconds, then stop by themselves. A line under the button, *Playing sound… (N attempts remaining)*, counts down the bursts of the code still to play, to none, as the tones end; it follows what you hear. Tap **Stop sound** during them: they stop at once, and the button reads **Play sound** again. In **View logs**, a `[sound]` line says the tones were played. Long-pressing **Play sound** shows its help. With Phone A's media volume at its minimum, tap **Play sound** again: a message says *The media volume is low: turn it up so the other phone hears the tones.*
+2. **Listen asks for the microphone, and shows what it hears.** On Phone B: **Manage server** → **Import a store…** → **Listen**. If Android asks to allow the microphone, allow it. Stay quiet for a few seconds, then talk or clap near the phone. Then rotate Phone B.
+ **Expected:** the button reads **Stop listening**, and the screen says *Listening… Ask the owner to tap Play sound.* It counts down the seconds left, from 30, and shows a **Microphone level** meter that is empty when it's quiet and rises with any sound. The line above it reads *Nothing heard yet.* when quiet, and *Hearing something faint: hold the phones closer.* for faint sound. Android shows its microphone indicator. Rotating the phone doesn't stop listening.
+3. **Importing by sound.** On Phone A, serving, open **Share this store…**. On Phone B, tap **Listen**, then straight away, on Phone A, tap **Play sound**. Keep the phones close.
+ **Expected:** Phone B says *Hearing the tones.*, then the import starts by itself, with Phone B's name. Phone B shows four digits, and Phone A shows *Allow a copy?* with the same four digits and Phone B's name. Tap **In a month**, then **Allow**: Phone B receives the store, then shows *Imported …*. Phone A's tones stop by themselves once Phone B connects. In **View logs**, Phone A has a `[sound]` line for the tones played, and Phone B has one for a code heard.
+4. **Nothing heard, and stopping.** On Phone B, tap **Listen**, with Phone A silent. After a few seconds, tap **Stop listening**. Then tap **Listen** again, and wait for the 30 seconds to end.
+ **Expected:** **Stop listening** ends it at once, with *Stopped.* If you wait, listening ends by itself, with *Didn't hear the code. Hold the phones closer, ask the owner to turn up the media volume, and try again.* Nothing is imported.
+5. **Microphone refused.** On Phone B, take the microphone permission away in Android's **Settings**, then tap **Listen**, and choose **Don't allow**.
+ **Expected:** the screen says *Without the microphone, the app can't hear the code. Scan the owner's QR code, or type the code, instead.* Typing the code, then **Continue**, still imports a store. Allow the microphone again afterwards.
+6. **Over Phone A's own hotspot, Android 10 or later.** Turn Phone A's Wi-Fi on but don't join a network, so it serves on its own hotspot. Join Phone B to a different network. Tap **Share this store…** on Phone A and **Play sound**, and **Listen** on Phone B. Android asks only the first time Phone B joins a hotspot of that name, so to see the prompt again, first change the name under **Wi-Fi Direct hotspot** on Phone A: tap **Save name & password**, then **Stop** and **Start**.
+ **Expected:** Android asks Phone B whether to connect to Phone A's hotspot. Tap **Connect** within 30 seconds, and the import goes ahead. When it ends, Phone B leaves that hotspot. On Android 9, or if you don't tap **Connect**, Phone B shows the hotspot's name and password: join it in Wi-Fi settings, then tap **Continue**. On ordinary Wi-Fi, the tones carry the network's name and never its password: if Phone B can't find Phone A, join that network, then tap **Continue**.
+7. **The hotspot's password stays out of the log.** After step 6, open **View logs** on both phones.
+ **Expected:** the `[sound]` lines show that a code was played or heard, and never the hotspot's password.
+8. **The one-phone self-test.** On Phone B's import screen, tap **Listen** three times quickly.
+ **Expected:** the screen says *Self-test: playing and listening on this phone…*, plays tones and listens, then says *Self-test passed: this phone heard its own tones*, with a short note in brackets. If the media volume is at its minimum, a message first says *The media volume is low: turn it up for the self-test.*, and the self-test then fails with *Self-test failed: this phone didn't hear its own tones. Turn the media volume up and try again.* A `[sound]` line in **View logs** records the result.
diff --git a/plugins/Share-Your-Apps/docs/review-prompt.md b/plugins/Share-Your-Apps/docs/review-prompt.md
new file mode 100644
index 000000000..ba7d7731c
--- /dev/null
+++ b/plugins/Share-Your-Apps/docs/review-prompt.md
@@ -0,0 +1,45 @@
+Please review the attached design document, `share-your-apps-design.md`, for **Share Your Apps**: a plugin for Code On The Go, an Android IDE that runs on phones, plus a companion Android app, **Share Your Apps Server**. Together they let a phone's owner publish the apps they've built — APKs, source, or both — to a small web store that people nearby open in their phone's browser, over the same Wi-Fi network or the owner's phone's own hotspot.
+
+## Where things stand
+
+Everything in the document is built, except Appendix D, which is only a plan. It has been tested by hand on real phones, including a second phone as a buyer, and both projects have JUnit tests that pass on a phone. The main design is with testers. **Sharing a store with another seller**, Appendix E, is newer: it's built, and tested by hand between two phones, one on Android 16, but not yet with testers. So I'm not asking for a new design. I want to know **what's wrong with this one**: things that will break, mislead someone, or cause support trouble.
+
+The document has the design itself, *Developer notes* near the end, and five appendices. Appendix A is the default page template. Appendix B is wireframes that came before the build; the list at its top says where the build differs. Where a wireframe and the design disagree, the design is right, so don't report those differences. Appendix C holds the other store page templates, D a plan for extending templates, and E sharing a store.
+
+**The cryptography of sharing has its own review,** by someone who reviews cryptographic protocols, using `share-protocol-review.md`. Please don't duplicate it: the key exchange, the check code, key derivation, the encrypted stream and the copy's signature are covered there. Everything else about sharing is in scope here — its screens, its states and failure modes, its Android behaviour, and how it fits the rest of the design.
+
+## Decisions not to re-argue
+
+These were made deliberately. Mention one only if you find a concrete consequence the document doesn't already acknowledge.
+
+- **Simplicity over robustness machinery.** The design was cut down on purpose from an elaborate first draft. Don't propose adding back backups, rollback schemes, sessions, or a reconciliation pass unless you can show a specific failure the current design mishandles.
+- **The scope and background section's non-goals:** no payment, no accounts, no internet, no buyer tracking; buyers need only a browser.
+- **The known limitations:** plain HTTP, so the PIN crosses the network unencrypted; no minimum PIN length; PIN guesses limited per address only (5 free, then a wait from 30 seconds doubling to an hour); published files in shared storage, readable by other apps on the phone; no start after the phone restarts; downloads cut off when a publish switches directories.
+
+- **Sharing's decisions,** in Appendix E: a copy is read-only, and served exactly as published; it can't be passed on through Share Your Apps, which isn't copy protection, and says so; each seller sets their own PIN; a phone serves one store at a time, and holds at most one copy; a phone serving its own store can't import; publishing serves the owner's own store, keeping any copy; the owner keeps no record of copies, and a copy no record of where it came from; copies expire on the owner's date, a month by default; a clock set back more than five minutes expires a copy at once, silently, looking exactly like an ordinary expiry; importing restarts the clock; plain HTTP between the phones, since the copy has its own encryption; a phone without the app can download it from the owner's share screen.
+
+## What to look for
+
+- **Correctness.** Behaviour that's described wrongly, or that can't work as described.
+- **Failure modes.** What happens when a publish is interrupted, storage fills up, Android kills a process, a permission is revoked or never granted, the hotspot disappears, the port is taken, or two things happen at once. Say whether the document handles each case.
+- **Android specifics.** The apps support Android 9 through 16 (API 28–36). Check the design against platform rules that have changed across those versions, such as foreground-service types and background-start limits, storage access, Wi-Fi Direct and local-only hotspot behaviour, package installation, and permission changes. **Where you're not sure what Android actually does, say so, rather than stating it as fact.**
+- **Security, within the stated model.** Anything that lets someone on the same network do more than the design intends. The obvious limits are already accepted; look for ones that aren't. Examples: reading files outside the store, forging authentication, or tampering with what's published.
+- **Contradictions and ambiguity.** Sections that disagree with each other, or leave a question that a developer implementing or changing the design would have to guess at.
+- **Sharing a store.** What happens when a share or an import is interrupted — by rotation, leaving the screen, the process being killed, the network changing, or either phone sleeping — or two things happen at once, such as publishing while a copy is served, or importing while one is. Whether the screens tell a seller what they need, and nothing they can't act on. Whether expiry really deletes a copy in every path, and can't be sidestepped within the app, such as by clearing its data, backing it up, or reinstalling.
+- **Test gaps.** Important behaviour that neither the automated tests nor the acceptance checklist covers.
+- **The developer notes.** Instructions that are wrong, incomplete, or likely to trip someone up.
+
+## How to report
+
+Give at most **15 findings**, most important first. For each:
+
+1. **Severity:** *blocker* (it doesn't work, or it loses data or exposes something), *high*, *medium* or *low*.
+2. **Where:** the section name.
+3. **The problem,** in a sentence or two.
+4. **A concrete scenario** showing it — the steps, or the situation in which it happens.
+5. **The smallest fix,** in keeping with the design's simplicity.
+6. **Confidence:** *certain*, *likely* or *unsure*, especially for claims about Android's behaviour.
+
+After the findings, list any **questions** where the document is ambiguous and you couldn't tell what's intended.
+
+Please don't rewrite the document, summarize it back, or list what looks fine. Plain prose within each finding is best, without nested bullet lists.
diff --git a/plugins/Share-Your-Apps/docs/share-protocol-review.md b/plugins/Share-Your-Apps/docs/share-protocol-review.md
new file mode 100644
index 000000000..861a25f88
--- /dev/null
+++ b/plugins/Share-Your-Apps/docs/share-protocol-review.md
@@ -0,0 +1,158 @@
+# Share Your Apps — sharing a store: a review packet
+
+This is for an independent review of how **Share Your Apps Server** shares a copy of a store with another seller's phone. It's self-contained: the protocol, the threat model, where the code is, what the tests cover, and the questions we most want answered. The wider design, including the reasons behind each decision, is Appendix E of `share-your-apps-design.md`.
+
+## What it's for
+
+An owner runs a small store of Android apps from their phone, served over local Wi-Fi to buyers' browsers. With the owner's permission, a second seller nearby can take a **copy** of that store, and serve it from their own phone. The copy:
+
+- is served **exactly as published**, and can't be changed;
+- **can't be passed on** through Share Your Apps to a third phone;
+- **expires** on a date the owner chose, and is then deleted from the seller's phone.
+
+Both phones run the same app, Share Your Apps Server, signed with the same key. The two phones are near each other, on the same Wi-Fi network or hotspot. The owner approves each copy on their own screen, after comparing a four-digit check code with the seller's screen.
+
+## Threat model
+
+**Defended against:**
+
+- **Someone else on the same network,** who can watch, block, alter, replay and inject traffic between the phones, answer broadcasts, and connect to either phone. They must not be able to obtain a copy, read the copy in transit, alter it undetectably, get a copy accepted as coming from the owner, or extend a copy's expiry.
+- **A phone guessing share codes,** or asking without the owner's approval.
+- **A seller forwarding the copy's files** to another phone: they must be useless there.
+- **A seller editing the copy's expiry,** or moving the clock back to keep a copy.
+- **A copy that's damaged, cut off or malicious,** such as one naming files outside the copy's folder.
+
+**Not defended against, by design:**
+
+- **Copying what a store serves.** Anything a store serves is ordinary web content, which anyone who can open it can copy and serve with other software.
+- **A modified app.** Share Your Apps Server is open source (AGPL), so a modified build can ignore any rule, such as expiry.
+- **A rooted or compromised phone,** at either end.
+- **Moving the clock back gradually,** five minutes at a time, to delay expiry. The rule deters; it can't prevent.
+- **An owner who approves a request without comparing the check code.**
+
+## The protocol
+
+All numbers are big-endian. `||` is concatenation. Public keys are X.509 SubjectPublicKeyInfo DER, as `PublicKey.getEncoded()` returns. Strings are UTF-8. Base32 is RFC 4648, upper case, unpadded.
+
+### Keys
+
+- **The store key:** an ECDSA P-256 key pair, made once on the owner's phone, and stored in the app's private storage as files: `files/share/store-key.p8` (PKCS#8 DER) and `store-key.pub`. Not in Android Keystore. It signs every copy's description, and is the store's identity.
+- **The store identity:** `base32(SHA-256(storePublicKey)[0..10])`, 16 characters.
+- **One-time exchange keys:** ECDH P-256. The owner makes a new pair for each request; the seller makes a new pair for each import.
+
+### Share codes
+
+- **Made:** 8 random bytes from `SecureRandom`, each taken modulo 32 into Crockford's base32 alphabet, `0123456789ABCDEFGHJKMNPQRSTVWXYZ`. 256 is a multiple of 32, so there's no bias: 40 bits. Shown as `LS-XXXX-XXXX`.
+- **Read:** case-insensitive; spaces, dashes and the `LS` prefix ignored; `O` read as `0`, `I` and `L` as `1`.
+- **Limits:** a code lasts 10 minutes, serves one phone, and closes after 5 wrong codes, even to the right one.
+
+### Finding the owner's phone
+
+When the seller types a code, rather than scanning a QR code, their phone broadcasts over UDP to port 6176:
+
+```
+"LSD1 " || hex(SHA-256("shareyourapps-discover v1" || code)[0..16])
+```
+
+where `code` is the 8 normalized characters. Only a phone showing that code answers, with `"LSH1 " || httpPort`, and the seller connects to the sender's address. A QR code holds the address itself: `shareyourapps-share://:/LS-XXXX-XXXX`.
+
+### The exchange
+
+Plain HTTP on the owner's store port, under `/share/`, which exists only while the owner's share screen is open.
+
+1. **Seller → owner:** `POST /share/request`, JSON: `code`; `name`, the seller's phone name, up to 40 characters; and `commitment = SHA-256("shareyourapps-commit v1" || sellerPublic)`, base64.
+ The owner checks the code, then replies with `request`, 15 random bytes in base32, and `ownerKey`, the owner's one-time public key, base64. A second phone using the same code, once one is under way, is refused.
+2. **Seller → owner:** `POST /share/reveal`: `request` and `sellerKey`, the seller's one-time public key. The owner checks it against the commitment; a mismatch closes the share.
+3. **Both** compute the **check code**: the first 4 bytes of `SHA-256("shareyourapps-check v1" || ownerPublic || sellerPublic || code)`, as an unsigned integer, modulo 10000, as four digits. The owner's screen shows it, with the seller's phone name, beside **Allow** and **Deny**; the seller's screen shows it too.
+4. **Both** derive the **session key**: `HKDF-SHA256(ikm = ECDH(own private, their public), salt = code, info = "shareyourapps-share v1" || ownerPublic || sellerPublic, length = 32)`, an AES-256 key.
+5. **Seller:** polls `GET /share/status?request=…` each second, until *allowed*, *denied* or *expired*. Once allowed, the reply also carries the copy's expiry.
+6. **Seller:** `GET /share/copy?request=…`. The owner streams the copy, encrypted as it's written. After one complete download, the share is done, and the code is dead. **A failed download may be retried while the share is allowed,** each attempt with the same session key and a fresh nonce prefix.
+
+The commitment is there so neither side's key can be chosen after seeing the other's: without it, someone in the middle could try keys until the four digits matched.
+
+### The encrypted stream
+
+```
+"LSC1" || prefix (8 random bytes) || chunk*
+chunk = length (4 bytes) || AES-256-GCM(plaintext up to 64 KiB)
+```
+
+- **Nonce:** `prefix || chunkNumber (4 bytes)`, 12 bytes, chunks numbered from 0.
+- **Associated data:** `chunkNumber (4 bytes) || last (1 byte, 1 for the final chunk)`.
+- **Tag:** 128 bits.
+- **The final chunk** is marked *last*, and may be empty. The reader rejects a stream that ends without it, or has data after it. A chunk that fails as an ordinary chunk is tried as the last.
+
+### The copy
+
+Inside the encrypted stream:
+
+```
+descriptionLength (4 bytes, at most 4 MiB) || description (JSON)
+|| signatureLength (4 bytes, at most 256) || signature
+|| every file's bytes, in the description's order
+```
+
+- **The description:** `format` (1), `storeId`, `storeName`, `storeKey` (the store's public key, base64), `created`, `expires` (ISO-8601, or null for never), and `files`, each a `path` and `size`.
+- **The signature:** ECDSA P-256 with SHA-256, DER, over the description's exact bytes, by the store key.
+- **The seller checks:** the format; that `storeId` is the identity of `storeKey`; the signature, with `storeKey`; that every path is relative, with no empty, `.` or `..` parts and no backslashes, and resolves inside the destination; sizes; enough free space; no data beyond the files. It writes to a temporary folder, renamed into place only once the last file is saved.
+- **Replacing a copy:** a copy with the same `storeId` and a later `created` replaces the old one silently; an older one, or a different store's, asks the seller first.
+
+### Expiry
+
+- **The date** is in the signed description. The seller's server deletes the copy on that date, checking once a minute while serving, and whenever the app looks at the copy.
+- **The clock rule:** the server keeps the latest time the phone has shown, in `files/share/latest-time`. A clock more than five minutes behind it expires the copy at once. Importing a copy restarts it at the current time, so a clock once set too far ahead can't condemn fresh copies.
+- **Deliberately silent:** a copy deleted for the clock looks exactly like one that simply expired, on screen and in the log.
+
+### Also on the sharing address
+
+`GET /share/app`, while a share is open, sends the owner's own installed APK, so a phone without the app can install it. Its authenticity rests on Android's signature check at install: a phone that already has the app accepts only an update signed with the same key.
+
+### Transport
+
+Everything is plain HTTP. The app sets `android:usesCleartextTraffic="true"`, since Android 9 and later block an app's plain HTTP otherwise, and the owner's phone has no fixed address to allow by name. So on the network, anyone can read the share code, the seller's phone name, the store's name, both one-time public keys, the request identifier, the status replies, and the copy's size. Only the copy itself is encrypted.
+
+## The questions we most want answered
+
+1. **The exchange as a whole.** Is the commitment, then the reveal, then a four-digit check code compared by eye, a sound short-authentication-string protocol here? Is anything missing, such as binding the seller's phone name, or the request identifier, into the check code?
+2. **Four digits.** With the commitment, is a 1-in-10,000 match enough, given that the share closes after one request, and a code after 5 wrong guesses?
+3. **The key derivation.** Are the HKDF inputs right: the share code as salt, and both public keys in `info`? Is one key for one direction sound?
+4. **Retried downloads.** Several streams may share a session key, told apart by a random 64-bit nonce prefix each. Is that acceptable, or should each attempt derive its own key?
+5. **The stream construction.** Numbered chunks, a *last* flag in the associated data, and trying the last flag on failure: any weakness, such as truncation at a chunk boundary, or a reordering that survives?
+6. **The store's identity.** The description carries its own key, so a first import trusts whatever key arrives over the check-code-authenticated channel. Later copies must match its identity. Is that trust on first use enough? What if a seller imports a copy of a *different* store with the same name?
+7. **The store key at rest,** as plain files in the app's private storage, not Android Keystore. Is that acceptable for this threat model?
+8. **The discovery broadcast** carries a hash of a 40-bit code, which an attacker could brute-force offline — though the code also crosses the network in plain text a moment later. Does discovery weaken anything? What can an attacker do by answering broadcasts?
+9. **Plain HTTP.** Is there anything an eavesdropper learns, or can do, beyond the list above? Is the request identifier's secrecy relied on anywhere it shouldn't be?
+10. **Expiry.** Beyond the gradual clock change we accept, is there an easier way to keep a copy, within an unmodified app? For example, backing up and restoring app data, clearing it, or reinstalling.
+11. **The app download,** `/share/app`: any risk in offering it over plain HTTP, given Android's signature check at install?
+12. **Anything else** that lets someone on the network do more than the design intends.
+
+## Where it is in the code
+
+In Share Your Apps Server's `app/src/main/java/org/appdevforall/shareyourapps/server/`:
+
+| File | What's there |
+|---|---|
+| `ShareCrypto.kt` | Every cryptographic operation: keys, signatures, the store identity, the commitment, the check code, the session key and HKDF, and the encrypted stream (`SealedOutputStream`, `SealedInputStream`). |
+| `SharePackage.kt` | The copy: its description, signing, writing, and checking and importing it all or nothing. |
+| `ShareRules.kt` | Share codes, the expiry clock, the store key file, the QR link, and applying expiry (`CopyExpiry`). |
+| `ShareHost.kt` | The owner's side: one share, its states, and its limits. |
+| `ShareClient.kt` | The seller's side of the exchange, and the download. |
+| `ShareDiscovery.kt` | The broadcast and its answer. |
+| `HttpServer.kt` | The sharing address, `shareRoute` and `shareApp`, and `stopAccepting`. |
+| `ServerService.kt`, `ImportJob.kt`, `HostService.kt`, `MainActivity.kt` | Where the Android app uses all of the above. |
+
+## What the tests cover
+
+The server's JUnit tests, in `app/src/test/java/ShareTest.kt`, include:
+
+- **Cryptography:** signatures, with a wrong key and altered data refused; the store identity; the commitment, and a substitute key failing it; both phones' check codes agreeing, and a different key changing them; both sides deriving the same session key, and a third party not; HKDF against RFC 5869's first test case.
+- **The stream:** round trips from empty to 300 KB, across chunk boundaries; a flipped byte, a cut-off stream — including on a chunk boundary — extra data after the end, swapped chunks, and a wrong key, all failing.
+- **The copy:** arriving identical, replacing an older one; refusing an altered description, another key claiming the store's identity, six kinds of unsafe path even when signed by the store, too little space, and a cut-off copy, each leaving nothing behind.
+- **A whole share between two servers:** through a store with a PIN; downloads before approval refused; a second phone refused; denial; a key not matching its commitment; an expired code; five wrong guesses; discovery, right and wrong; the app download only while a share is open; cancelling before and during a download.
+- **Expiry:** by date, the clock rule, the restart at import, the notice saying nothing about why, and downloads under way finishing while new connections are refused.
+
+They pass on a phone, as well as on a desktop JVM. A whole share has also been tested by hand between two phones, one on Android 16.
+
+## How to report
+
+For each finding: its **severity** (*serious*, *moderate* or *minor*); **where** it is; the **problem**; a concrete **attack or failure**; the **smallest fix**; and your **confidence**. Answers to the questions above are most welcome, even where the answer is *that's fine*.
diff --git a/plugins/Share-Your-Apps/docs/share-your-apps-design.md b/plugins/Share-Your-Apps/docs/share-your-apps-design.md
new file mode 100644
index 000000000..cbacd00f4
--- /dev/null
+++ b/plugins/Share-Your-Apps/docs/share-your-apps-design.md
@@ -0,0 +1,2962 @@
+# Share Your Apps — Design
+
+A CodeOnTheGo plugin that lets an owner publish their apps (APK, source, or both) to a small web store, and a separate Android app that serves that store to other devices on the same Wi-Fi network or hotspot. No internet, no accounts, no payment.
+
+*Developer notes*, at the end, covers building, releasing and testing. Appendix A describes the default store page, Appendix B is the UI wireframes, and Appendix C holds the store page templates: the default, annotated and as shipped, and four alternatives. Appendix D is a plan for letting owners extend templates, and Appendix E sharing a store with another seller, by QR code, typed code or sound. If a wireframe disagrees with the design, the design wins.
+
+## The two pieces
+
+**Plugin (Manage Catalog)** — runs inside CodeOnTheGo. The owner edits the catalog and taps Publish. The plugin writes the store's files to shared storage, installs and launches the server app, then checks the server is serving the right content.
+
+**Share Your Apps Server** — a separate, ordinary Android app. It serves the files the plugin wrote, controls the hotspot, and shows the two QR codes buyers scan.
+
+Two apps are needed because a plugin can't run a long-lived server; the server app reads the plugin's output from shared storage.
+
+## Scope and background
+
+- **Not goals, by decision:** no payment, pricing or licensing; local networks only — Wi-Fi or the phone's own hotspot, never the internet; no accounts, and no tracking of buyers. **Buyers need only a browser.** Features that would need Code On The Go on the buyer's phone are out of scope, not merely deferred.
+- **Deliberate simplifications:** plain HTTP, no minimum PIN length, and a PIN-guess limit per buyer's address only (see *Limitations*).
+- **References:** Code On The Go is at `github.com/appdevforall/CodeOnTheGo` (working branch `stage`); its wiki has the plugin developer guide. Example plugins are at `github.com/appdevforall/plugin-examples`. The Serve screen's design follows the **Share Access** screen in KnowledgeToGo. The ticket is ADFA-6207.
+
+## Files
+
+**The server reads only files inside the Store directory**, and writes nothing there except its compressed copies. Publishing copies into it everything the store needs — APKs, source zips, carousel media, header image — so the owner is free to change or delete the originals afterward. Every path in the store (the page's links and every request) is relative to the Store directory: no absolute paths, no `..`. The launch intent names the Store directory rather than giving a path to it.
+
+Plugin private storage (`getPluginDataDirectory()`):
+
+- `catalog.json` — the whole catalog, saved shortly after every change that alters it (see *Plugin UI*).
+
+Shared storage, the **Store directory**, `CodeOnTheGoProjects/Store_<8 random digits>/`. **Each publish builds a new one** with new random digits, alongside the one being served; once the server has switched to the new directory, the old one is deleted. The digits only keep the name unique and clear of any project named `Store`.
+
+```
+Store_48291736/
+ README.txt what this folder is
+ index.html
+ index.html.gz gzip copy, made by the server in the background
+ accessible.html the accessible version, from Clear Access (Appendix C.6), and its .gz copy
+ header. header image, if over 10 KB
+ products//
+ .apk the APK, named after the product
+ -source.zip source, uncompressed zip — until its copy is made, when it's deleted
+ -source.zip.gz gzip copy, made by the server in the background; afterwards, the only copy
+
+