feat: make Pakkit a standalone Wear OS APK installer

- Replace companion app transport with local Wi-Fi receiving sessions
- Add branded web upload UI, private links, QR codes, and live progress
- Preserve explicit watch review and system installation consent
- Add bounded uploads, session expiry, authentication, and cleanup
- Validate Watch 7 installation and document release requirements
This commit is contained in:
Meghdad committed 2026-10-15 17:47:15 +03:30
1 parent 6ce4f924b7
commit 4d5d0b4165
48 files changed
+748 -1125

No files matched your search

+21 -22
View File
@@ -1,36 +1,35 @@
# Architecture and operating boundaries
# Standalone architecture and security
## Protocol v1
## Components and flow
Google Play services enforces matching app ID and certificate. The watch advertises `pakkit_watch_v1`. A reachable node is queried using `/pakkit/probe` with a random nonce. The watch publishes `/pakkit/cap/{node}` with that nonce, API, ABIs, available bytes and installation controls. The phone accepts only the selected node's fresh response. Capabilities expire for send purposes after two minutes.
WatchActivity → explicit Start receiving → ReceiveService → Wi-Fi network request → private IPv4 listener → private URL/QR → browser HTML/CSS/JS from watch → authenticated raw APK POST → bounded private file → Android archive inspection → ready state → watch Install → PackageInstaller → system consent → result receiver → browser status.
A selected document is copied from its content URI into app-private storage. The temporary filename is a generated UUID; URI-supplied paths and display names never determine a filesystem path. SHA-256 is computed while enforcing the size cap. The original document is not modified. Persisted URI permission and broad storage access are unnecessary.
`shared` contains protocol/inspection/storage/design code. `wear` owns the server and installer. The phone module, Play Services Data Layer and WorkManager have been removed. No Google services runtime, backend, account, mDNS or WebView is required. ZXing Core encodes the QR locally.
`SendWorker` publishes `/pakkit/offer/{UUID}`, containing target node, creation time, APK metadata, digest and an Asset. This publication means queued for sync, not delivered. Google Play services owns transport and retransmission; it can route through Google infrastructure. There is no percentage or speed estimate. There is no automatic installation.
## Session ownership
`LinkService` schedules unique `ReceiveWorker` work. The worker checks target, identifier and age; rejects a busy watch; bounds the received bytes; verifies digest and parsed package information; and renames the complete private file. Readiness is sent only after verification. The watch keeps a small recent-ID replay guard. Terminal and ready states are idempotent for a given active transfer. Assets are deleted after verification or a permanent failure, rather than retained as storage.
The user starts a connectedDevice foreground service while WatchActivity is visible. Wi-Fi is requested for up to 25 seconds; absent connectivity yields a recoverable message. A socket binds exclusively to the chosen Wi-Fi private IPv4 address and ephemeral port. The service is never exported, restarted automatically or started at boot. The ten-minute deadline starts at user initiation; a timed CPU wake lock covers the session without keeping the screen on. Losing that network ends the session. Stop closes accepted sockets, shuts down the bounded worker pool, unregisters the network callback, removes the URL and releases power resources.
The watch publishes `/pakkit/status/{UUID}` with target phone and an explicit state. The phone only accepts the current transfer ID from its selected destination node and monotonically increasing status revisions. A status publication worker retries temporary API errors. Phone and watch hold one current job each, plus phone-local history capped at 20 entries. SharedPreferences commits are used for the small durable records; files are not placed in preferences or WorkManager input. WorkManager persists bounded jobs and handles process restart.
The browser may continue watching installation results while the session remains active. Ending the network session does not cancel an already committed Android installation or delete a pending user review. A completed upload remains eligible for review for 24 hours; expired packages are removed when the app next opens. This is lazy cleanup, not a guaranteed background deletion deadline. Partial and rejected uploads are deleted immediately. Reboot/process death requires a new receiving session. No resume tokens are persisted for transfer recovery.
## Installation boundary
## HTTP boundary
Only a foreground button in the watch app creates a PackageInstaller session. The file's age, digest, metadata and hardware compatibility are checked again. The session requests `USER_ACTION_REQUIRED`. The status receiver is not exported. Its explicit mutable PendingIntent is scoped to the session and transfer ID; mutable extras are required for Android's installer result.
- Independent 192-bit SecureRandom URL-safe key per session, in the URL fragment so the initial HTTP request does not include it. JS removes the fragment from visible history after loading, keeps it only in memory and sends an Authorization bearer header for APIs. Reload without the key requires re-entering it or rescanning.
- All content is local. Strict self-only script/style/connect CSP, no framing, no referrer, no cache, no MIME sniffing, no CORS or external fonts/trackers.
- Exact Host check protects against DNS rebinding. Upload requires the watch page’s exact Origin and bearer token. No browser install/cancel-install endpoint exists.
- Parser limits headers to 8 KiB and lines to 4 KiB, rejects duplicate headers, invalid framing, transfer encoding, expectations and unsupported methods. Each socket serves one request then closes. Only fixed public asset routes are served; there is no user-controlled filesystem lookup.
- Raw octet-stream POST with positive Content-Length <=50 MiB. No multipart buffering, user filenames or extraction into filesystem paths. UUID private filename. One upload at a time; another review must be dismissed/completed first. Free-space preflight, streamed SHA-256, 64 KiB buffer, ZIP expansion/entry limits, full-package/split and self-update rejection, SDK/ABI/storage checks.
- Two workers, four queued connections, 15-second read inactivity deadline and hard session lifetime. CPU/memory/storage are bounded. Early rejected large requests may be observed by a browser as a connection error because the server intentionally does not consume an unauthorized body.
- Progress is bytes actually read on the watch and bytes sent by browser XHR. 100% sent changes to verification wording and never implies installation. Installation success appears only after STATUS_SUCCESS.
Pending approval is presented inside Pakkit, with an optional notification containing the system confirmation Intent. No background activity launch is attempted by the receiver. Notification permission is optional and requested only from an explanatory watch button. If approval state is interrupted and cannot be recovered in memory or from its notification, the user can explicitly retry, abandoning the previous session first. A transfer can only be reported as installed after `STATUS_SUCCESS`.
## Trust model
The system owns final package validation, update signatures, policy checks, verification and approval UI. No install result is inferred from a file transfer, countdown or launch attempt. Installation failures are mapped to understandable messages without logging APK contents or private paths.
Local HTTP is unencrypted. Link secrecy, Host/Origin checks and SHA-256 do not stop an active LAN attacker, protect against passive capture, or authenticate the server with a certificate. Use a trusted private Wi-Fi and keep the private URL secret. Anyone holding the link can submit a package, but only an explicit watch action can request its installation and Android requires consent. The app does not claim malware scanning or universal app compatibility. Source approval and system restrictions remain authoritative.
## Storage and battery
ReceiveService has INTERNET, ACCESS_NETWORK_STATE, CHANGE_NETWORK_STATE, WAKE_LOCK and foreground-service permissions; these support the explicit Wi-Fi session. REQUEST_INSTALL_PACKAGES is limited to the watch. Optional notification permission enables visible receiving/approval alerts; denying it does not authorize hidden background starts or bypass the in-app consent flow. The system may still expose the running foreground service in its task UI.
- 50 MiB maximum package, 64 KiB buffers, no entire APK byte arrays, no ZIP extraction.
- Approximate watch space budget: three APK sizes plus 20 MiB. This is a preflight, not a reservation; the system may still report insufficient storage.
- TTL: 24 hours from file selection. Workers remove retained offers/files when scheduled; background scheduling can be deferred by the OS. Stale files are additionally cleaned on app startup and after receive.
- One outstanding offer per phone, one reviewable file per watch; no parallel sync queue. Keep the watch app open for the most predictable receiving experience.
- No always-on service, app-managed wake lock, polling scan loop, custom networking, analytics or account system.
- The parcel artwork uses a short finite entrance, respects system animation and battery saver settings, and stops when its window is hidden or detached. Decorative watch artwork remains static. See the semantic palettes and components in Design.kt and the brand guide in design/README.md.
## Installation state
## Known engineering limits before production
`LocalInstall.status` writes watch-local ready/installing/confirm/installed/failed state. Store persists the current package/review across activity recreation. Session callbacks validate job and session IDs in a non-exported receiver. The pending system intent is kept in process or carried by the app’s immutable notification PendingIntent; interrupted approval can be retried. Installation re-hashes the private file and rechecks compatibility before writing a PackageInstaller session. Dismiss deletes the staged package. Success deletes it and cancels the consent notification.
Native Android views keep the runtime and dependencies small. Touch controls and text remain semantic views; the parcel art is decorative. The first locale is English; RTL mirroring uses platform layouts but localized copy and real RTL QA remain release work. Ordinary refreshes preserve scroll position. The watch returns to the heading when its transfer stage changes so the next decision is visible.
Single-file inspection does not fully classify all unusual/vendor split manifests, malicious parser edge cases or expanded installed size. Android remains the security authority. Asset transfer latency, cloud behavior, retry timing, UI interruption and consent recovery require paired-device testing. The initial implementation intentionally excludes automatic recovery that might open an installer without another user action. Cross-device cancellation of an already queued offer is deferred; current jobs can be dismissed on the watch after receipt or expire.
No appops mutation, permission grant shell command, ADB client, root, hidden installer component, device-owner privilege, automatic installation, browser-driven installation or Pakkit self-update exists in the product.
+33 -21
View File
@@ -1,37 +1,49 @@
# Feasibility decision
# Standalone feasibility decision
Research date: October 15, 2026. Reference hardware: Samsung Galaxy Watch 7; no physical hardware has been verified in this workspace.
Research and implementation: October 15, 2026. Pakkit 0.2 replaces the companion architecture.
## Decision
## Decision and evidence boundary
Build a **capability-gated companion**, rather than promise a universal installer. Official APIs support file transfer and user-initiated package installation. Their presence in Android does not prove that a particular Wear OS firmware provides usable unknown-source settings and installation confirmation. Pakkit never changes security settings itself.
Use a user-started local HTTP receiving session hosted by the watch, followed by explicit on-watch review and a public PackageInstaller session requiring user action. Receiving a file does not install it. Support is conditional on firmware exposing source approval and a functioning system installer.
The desired no-debugging path is conditional: paired Android phone and watch → install Pakkit through Play on both → approve Pakkit as an install source on supported watch firmware → choose a complete compatible APK → send → review on watch → explicitly request installation → approve the system screen. Source approval is an unavoidable extra setup step where Android requires it.
Android’s [Wear network guidance](https://developer.android.com/training/wearables/data/network-communication) explicitly supports HTTP/TCP/UDP and independent network access. This supports implementing a server using ordinary Android sockets; the documentation does not certify inbound reachability on every network. A Bluetooth-proxied internet route is not an inbound Wi-Fi listener, so Pakkit requests a Wi-Fi network and binds only its private IPv4 address. Guest-network isolation and firewalls remain outside application control.
## Confirmed platform capabilities
The [standalone app definition](https://developer.android.com/training/wearables/apps/standalone-apps) permits QR/browser alternatives without a companion phone app. The manifest now declares standalone=true. “Any device” means a supported modern browser on a reachable local network, not independence from the watch’s original OEM onboarding requirements. A Galaxy Watch 7’s initial setup requirements are separate from Pakkit’s browser support.
1. The [Wearable Data Layer overview](https://developer.android.com/training/wearables/data/overview) documents app-private phone/watch communication and requires matching package names and signing certificates. The transport can use Bluetooth or encrypted cloud routing. Pakkit uses it without its own network backend, direct sockets, Bluetooth discovery permissions or accounts. [Asset synchronization](https://developer.android.com/training/wearables/data/sync) allows queued transfer when disconnected; it is not an application database. Pakkit keeps its own state and private files. Asset APIs do not provide Pakkit with an accurate network byte-progress signal.
## Installation is a separate capability
2. [PackageInstaller](https://developer.android.com/reference/android/content/pm/PackageInstaller) supports sessions and reports success, failure or pending user action. Pakkit explicitly requires user action and handles the returned confirmation intent. This general Android capability is not proof of a usable Wear installation UI on every OEM firmware.
[PackageInstaller](https://developer.android.com/reference/android/content/pm/PackageInstaller) permits ordinary apps to create sessions with REQUEST_INSTALL_PACKAGES. Pakkit uses MODE_FULL_INSTALL and USER_ACTION_REQUIRED, handles STATUS_PENDING_USER_ACTION and starts only the returned system confirmation intent following a watch action. Android decides the final outcome. Readable signing metadata, hashes, SDK, ABI and space checks are preflight, not malware scanning or proof that an app will work on a round display.
3. [PackageManager.canRequestPackageInstalls](https://developer.android.com/reference/android/content/pm/PackageManager#canRequestPackageInstalls()) reports whether the caller is trusted as an installation source. Pakkit checks this on the watch. If allowed-source settings are unavailable and source approval is absent, Pakkit blocks sending. Resolver availability is a conservative preflight, not a compatibility certification.
[canRequestPackageInstalls](https://developer.android.com/reference/android/content/pm/PackageManager#canRequestPackageInstalls()) reports source trust. [ACTION_MANAGE_UNKNOWN_APP_SOURCES](https://developer.android.com/reference/android/provider/Settings#ACTION_MANAGE_UNKNOWN_APP_SOURCES) is the public settings route. A resolving activity alone does not prove a usable permission UI. Pakkit checks actual trust and gates session start; if approval is unavailable it explains the limit and offers Google Play. No appops changes, hidden components, privileged APIs or debugging client exist in application code.
## Google Play eligibility is conditional
### Galaxy Watch 7 evidence
[Play's sensitive permissions policy](https://support.google.com/googleplay/android-developer/answer/16558241?hl=en) includes phone-to-wearable companion synchronization among permitted REQUEST_INSTALL_PACKAGES purposes. This makes the proposed purpose potentially eligible; it does **not** guarantee permission approval or listing acceptance. Core functionality must be accurately described, declared and reviewed. Pakkit requests this permission only on the watch, offers no self-update mechanism, bundles no third-party APK and never starts an installation just because a transfer arrived. A reviewer must assess the final implementation and listing.
Reference hardware observed: SM-L310, Android 16, fingerprint `samsung/fresh7blue/fresh7bl:16/BP2A.250325.020/L310XXS2BZF4:user/release-keys`.
[Wear app packaging guidance](https://developer.android.com/training/wearables/packaging) requires a separate watch artifact, watch feature declaration and form-factor versioning. Pakkit's watch app declares itself non-standalone because selecting and sending requires the phone. Both artifacts must use the same production signing identity for the Data Layer.
The user reports that the previous Pakkit build completed installation normally without ADB, including with ADB debugging disabled. The development inspection found REQUEST_INSTALL_PACKAGES already allowed; no shell permission grant or security-setting modification was made. This is useful hardware evidence but does not independently reproduce a fresh Play-installed permission setup. See VALIDATION.md for the separately observed browser/upload/installer results. Do not generalize this result to every Samsung firmware, region or security configuration.
[Current target API policy](https://support.google.com/googleplay/android-developer/answer/11926878) requires API 36 for new phone apps and API 35 for Wear OS as of August 31, 2026. Both modules target 36. Recheck Play Console requirements at submission time.
## Lifecycle and power
## Developer verification changes the promise
A [connectedDevice foreground service](https://developer.android.com/develop/background-work/services/fgs/service-types#connected-device) fits an explicit local transfer with an external browser device. CHANGE_NETWORK_STATE is used to request Wi-Fi and meets this service type’s declared prerequisite. The foreground notification has a stop action. A timed partial wake lock keeps the CPU available without holding the display on. Wi-Fi requests and CPU lock are released at session stop, network loss, service destruction or ten-minute expiry. Nothing starts at boot; START_NOT_STICKY prevents automatic session resurrection. Process death invalidates the session and the user starts another.
[Android's developer-verification guidance](https://developer.android.com/developer-verification/guides) describes regional enforcement beginning September 30, 2026. Its [FAQ](https://developer.android.com/developer-verification/guides/faq) explains an advanced flow for unverified developers that includes developer mode and a protective delay. Pakkit does not implement or recommend this flow: it conflicts with the requested no-developer-options experience. Applicability to a particular Wear firmware must be tested; do not infer a verified exemption or rollout from the generic Android guidance. Respect any system block and direct users to a supported distribution of the app.
No continuous decorative watch animation, discovery broadcasts, cloud relay or analytics runs. Browser polling pauses while hidden. Watch byte updates are throttled to four per second. This bounds resource use but is not a battery consumption measurement; screen-off longevity, thermal and energy measurements remain release tests.
## Limits and assumptions
[Local network protections](https://developer.android.com/privacy-and-security/local-network-permission) cover incoming TCP too. At the current target SDK 36, INTERNET provides implicit local access. Before targeting 37, implement and test ACCESS_LOCAL_NETWORK runtime permission; official guidance says not to request it on lower targets. Browsers can independently require local-network permission.
- **Unverified:** Galaxy Watch 7 firmware versions, region-specific security settings, actual approval activity behavior and developer-verifier enforcement. Run the physical-device matrix before advertising support.
- **Supported intentionally:** complete single APKs up to 50 MiB. No APKM/XAPK/APKS/AAB or split installation support.
- **Preflight only:** SDK minimum, native-library ABI, approximate space, readable signing information and integrity. These do not prove safety, runtime usability, feature availability, signature validity under all platform rules, successful update or a wearable layout. The OS makes the final install decision.
- **No bypass:** if watch installation is unavailable, Google Play on that watch is the fallback. Pakkit does not silently enable debugging, root, hidden services or elevated privileges.
- **Release gate:** if physical tests show the reference device cannot complete the public consent path, do not publish the installer listing as broadly compatible. Narrow support to tested firmware or reconsider the product's scope.
## Google Play
The [REQUEST_INSTALL_PACKAGES policy](https://support.google.com/googleplay/android-developer/answer/12085295?hl=en) permits file sharing/transfer/management when package receipt and user-initiated installation are core functionality. Pakkit appears aligned with that category; this is an eligibility assessment, not approval. Accurately declare the final standalone purpose in Play Console and show source approval, transfer, watch review, system consent and denial handling. Do not reuse a companion-sync justification.
Declare the [foreground service use](https://support.google.com/googleplay/android-developer/answer/13392821) and provide the required demonstration. Publish only the watch artifact, with the required watch feature and standalone metadata, following [Wear packaging guidance](https://developer.android.com/training/wearables/packaging).
[Android developer verification](https://developer.android.com/developer-verification/guides) can add system restrictions to external apps. Some unverified-developer flows require developer settings and a delay. Those flows conflict with the product’s setup goal; Pakkit does not bypass them. Describe the supported compatible/verified package path rather than guaranteeing installation of every APK.
## Alternatives and limits
- **Google Play installation:** the compliant fallback when source trust, security policy, verification or firmware blocks external installation. Pakkit cannot silently elevate itself.
- **Trusted HTTPS relay:** could avoid LAN reachability and certificate setup, but requires a backend, retention policy, hosting cost, internet connectivity and additional privacy work. It would not fix a blocked PackageInstaller. Not implemented.
- **Local HTTPS:** a self-signed watch certificate produces browser trust warnings; ordinary public trust cannot be issued to an arbitrary private IP without additional infrastructure. Current local HTTP avoids certificate setup, openly limits use to trusted networks and does not claim encryption.
- **ADB/root/device-owner hacks:** excluded; they defeat the product goal or require privileges consumers do not have.
- **Cloud APK catalog/self-updater:** excluded; no third-party catalog, bundled consumer APK or Pakkit self-update path.
Current scope: private IPv4 Wi-Fi, one complete APK up to 50 MiB, one pending review, no split/APKS/APKM/XAPK/AAB support, no resumable upload. The OS performs final signature/update/verification checks. A failed firmware matrix or rejected permission declaration blocks production publication; a working upload alone does not change that decision.
+7 -7
View File
@@ -1,13 +1,13 @@
# Pakkit privacy text — draft for developer review
# Pakkit privacy disclosure draft
Pakkit helps you transfer an APK you select on your Android phone to your paired Wear OS watch and request its installation. You decide which file to send and approve installation on the watch.
Pakkit transfers an APK that you select in a browser directly to your Wear OS watch over your local Wi-Fi. It does not require an account, companion app, cloud relay, analytics or advertising. The HTML, styles, JavaScript, icons and QR generation are bundled with the watch app; no external font or asset service is contacted.
Pakkit stores the selected APK, package details, file-integrity digest and transfer state in its private app storage. The phone keeps the latest state of up to 20 transfers. You can clear this activity within Pakkit. Temporary package files are removed after completion or expiry (24 hours from selection); cleanup may be delayed by Android background scheduling. Removing Pakkit removes its local app data.
A short receiving session exposes a private URL and key. Keep that link private and use trusted Wi-Fi. Local HTTP is not encrypted; people able to observe or alter your network traffic may access it. Your browser/operating system may maintain its own local browsing history. Pakkit does not log uploaded filenames, IP addresses, keys or APK contents to a remote service.
Transfers use the Wearable Data Layer provided by Google Play services. Depending on device connectivity, data may travel over Bluetooth or encrypted cloud transport through Google infrastructure. Pakkit does not operate its own APK server, require an account, contain advertising or include analytics SDKs.
The APK is stored in the app’s private watch storage. Pakkit reads package metadata and signing information, checks size/compatibility and computes a hash. This does not certify that a package is safe. Nothing installs until you explicitly request it on the watch and complete Android’s system approval. Android may independently verify the app under its own policies.
The watch requests permission to ask Android to install a package. It does not silently install applications. Optional watch notifications help you return to a pending system approval screen. You can decline notifications and continue in the app.
Rejected/partial uploads are deleted. Successful installations and dismissed reviews delete the staged APK. Pending packages expire for installation after 24 hours and are cleaned up on the next app launch; they may remain in private storage until then. Local status history holds up to 20 entries of package label, state and timestamp. App backups/device transfer are disabled. Uninstalling Pakkit removes its private data; installed third-party apps are separate.
Only send software from a source you trust. Pakkit's file checks are not a malware scan or a guarantee of safety or watch compatibility. Android and the watch's security policy control whether installation can proceed.
Sessions end automatically within ten minutes, on Wi-Fi loss or when you stop them. Ending a session closes network access; it does not cancel an already committed system installation.
Before publication, the developer must add its legal identity, effective date, support contact and any required jurisdiction-specific terms to a publicly accessible policy. This repository draft is not itself a published policy or completed Play Data safety declaration.
Before publication, add the legal developer identity, support contact and hosted privacy policy URL. Reconcile the final binary, Android system behavior and Google Play Data safety answers; this draft is not a completed Play declaration.
+13 -29
View File
@@ -1,32 +1,16 @@
# Google Play release preparation
This is a release checklist, not an assertion that the app is already approved or ready for a public production rollout.
Pakkit is implemented as a standalone Wear OS app. This checklist does not assert Google Play approval.
## Technical artifacts
- Phone and watch use application ID `meghdad.pakkit`; namespaces differ by module.
- Phone version code: 100001; watch: 100002. Increment monotonically and keep codes unique across form factors.
- Compile SDK 36.1; min SDK 31; target SDK 36. Confirm supported-device filtering in Play Console.
- Separate watch artifact declares required `android.hardware.type.watch` and `standalone=false`.
- Release minification and resource-safe platform UI. Worker constructors are kept for background reconstruction.
- Use the **same app-signing certificate** across phone and watch. Different debug/release certificates cannot communicate through the Data Layer. Play App Signing key upgrades must be evaluated on both devices.
- Optional release signing environment: `PAKKIT_KEYSTORE`, `PAKKIT_KEYSTORE_PASSWORD`, `PAKKIT_KEY_ALIAS`, `PAKKIT_KEY_PASSWORD`. Keep the keystore outside the repository. No secret defaults or debug signing for release. Without a complete set of variables, output is unsigned and must be signed through the release pipeline.
- Build with `./gradlew :app:bundleRelease :wear:bundleRelease`, inspect merged manifests and upload each artifact to the proper form factor/test track. Check version code handling in Play Console before promoting.
## Permission declaration
`REQUEST_INSTALL_PACKAGES` exists only in the watch app. Justification for review: the core function transfers a user-selected APK from the paired phone to the user's watch and requests installation after the user explicitly reviews it on that watch. Submit the permissions declaration and an accurate screencast showing selection, transfer, source approval, app review, system approval, cancellation and unsupported-device handling.
Explain in the listing that firmware and package restrictions apply. Do not advertise one-tap installation, compatibility with all Wear OS devices, malware certification, silent installation or guaranteed approval. No packaged third-party APK, in-app self-update, package catalog or download service is included.
`POST_NOTIFICATIONS` is optional and watch-only, used for pending installer consent. Declining it leaves in-app consent usable. WorkManager contributes its standard boot-rescheduling/network-state/wake permissions through manifest merging; its unused foreground service and permission are explicitly removed. Review the final manifest rather than just source manifests. No broad storage, package visibility, location or Bluetooth runtime permissions are requested.
## Listing and disclosures
1. Finalize legal developer identity, support email and public privacy-policy URL. No invented identity or placeholder contact should be published.
2. Publish privacy text based on [PRIVACY.md](PRIVACY.md); confirm SDK behavior and the final Data safety answers. Google Play services may route encrypted APK data through Google's infrastructure. “No Pakkit server” does not mean all transport is local.
3. Upload genuine phone and round-watch screenshots, adaptive launcher assets and required store artwork. The same premium identity should appear in both listings.
4. State Wear OS support and the companion requirement clearly. Reference-device claims require recorded results for the specific model and firmware.
5. Complete content rating, target audience, ads declaration (none), Data safety, external-package permission declaration and Wear OS quality review.
6. Run internal/closed testing, pre-launch reports and physical-device compatibility matrix. Check current target API and developer-verification requirements again.
7. Promote only after every blocker in VALIDATION.md is resolved and the permission declaration is accepted. Google Play approval cannot be guaranteed.
- Publish only `wear`: application ID `meghdad.pakkit`, version 0.2.0/code100003, standalone=true, required watch feature, min31/target36/compile36.1. The phone module is removed. Increment codes for subsequent uploads.
- Build `./gradlew :wear:bundleRelease`. R8/resource shrinking enabled. Debug fixtures remain only in the test APK.
- Production signing inputs: PAKKIT_KEYSTORE, PAKKIT_KEYSTORE_PASSWORD, PAKKIT_KEY_ALIAS, PAKKIT_KEY_PASSWORD. No secret/default production key is included. Without the full set the release AAB is unsigned and must be signed by the release pipeline.
- Declare REQUEST_INSTALL_PACKAGES accurately as core, user-selected local package transfer with user-initiated installation. Submit the final standalone flow, source approval, transfer, watch review, system approval, cancellation and unsupported-state screencast. Do not claim prior companion permission eligibility automatically applies.
- Declare connectedDevice foreground-service use for a user-started bounded local device transfer, with notification/stop controls and required evidence. Review final merged permissions. No storage, broad package visibility, Bluetooth, location or boot permissions are requested.
- INTERNET/ACCESS_NETWORK_STATE/CHANGE_NETWORK_STATE support the requested Wi-Fi network and socket. WAKE_LOCK supports the bounded session. POST_NOTIFICATIONS is optional for receiving and approval alerts. Foreground service and connected-device foreground permissions are declared explicitly.
- Confirm the [install-package permission policy](https://support.google.com/googleplay/android-developer/answer/12085295) and [foreground service declaration requirements](https://support.google.com/googleplay/android-developer/answer/13392821) with the actual listing. Approval is not guaranteed.
- Add real developer/support identity and hosted privacy policy. Reconcile Data safety with PRIVACY.md and the final binary. No backend/analytics is used, but system installation verification is controlled by Android.
- Use genuine current standalone web and round-watch screenshots. Explain trusted same-Wi-Fi requirement, unencrypted local HTTP, source approval, complete APK limit, device/firmware restrictions and final Android consent. Avoid universal “all APKs” or encrypted/private-network security guarantees.
- Test fresh Play-delivered source approval on Watch7 firmware/regions, screen-off receiving, blocked sources, browser local-network permission, guest/client-isolated networks, user stop, session expiry, interrupted upload, process death, battery and accessibility. Record browser/device versions. Full Safari/iOS/Firefox/Windows/Linux coverage remains required.
- Recheck target SDK, Wear quality and developer verification requirements at submission. Target37 needs runtime ACCESS_LOCAL_NETWORK implementation/testing before adoption; current target36 follows Android’s implicit local network access rules.
- Run internal/closed testing and Play pre-launch/review. Do not promote until VALIDATION.md gates are met and restricted-permission/foreground-service declarations are accepted.
+26 -54
View File
@@ -1,65 +1,37 @@
# Validation record
# Standalone validation — October 15, 2026
Date: October 15, 2026. This record separates what ran from what still needs paired physical devices and Play review.
Version 0.2.0 / 100003. The consumer app is standalone; old companion test results in `validation/brand` and older screenshots are historical evidence only.
## Brand integration update — October 15, 2026
## Automated coverage
The official Pakkit identity is now implemented in both consumer apps. See [the brand guide](../design/README.md) and [current previews](screenshots/brand/). Earlier screenshots outside that subfolder document the previous visual direction. Brand test results are saved in [validation/brand](validation/brand/).
- 13 shared JVM tests: six bounded-stream/expiry/ABI rules, three semantic contrast checks, four HTTP parsing/authentication/size tests. Results: `shared/build/test-results/testDebugUnitTest`.
- Two watch instrumentation tests on the Wear OS API37 round emulator: actual Wi-Fi socket GET/status/raw APK POST; missing-token and cross-origin rejection; invalid APK deletion; duplicate upload refusal; verified fixture metadata; no automatic PackageInstaller session; listener closes and private URL clears at explicit stop. The separate round-review test verifies 48dp actions are reachable and receipt does not create an installation session.
- The emulator needed its virtual Wi-Fi enabled and associated with AndroidWifi. Initial failures while Wi-Fi was disabled were environmental. A repeated run exposed an HTTP test-client bug: reading until EOF could observe a reset after an intentionally early rejected request; the test now reads the response’s exact Content-Length. Final results are saved in `validation/standalone/watch-tests.txt`.
- Debug APK, instrumentation APK, optimized release AAB, shared unit tests and Android lint build successfully. Lint has zero errors; remaining warnings concern SDK/library update suggestions and optional KTX/style changes. Release bundle is unsigned unless production signing inputs are supplied.
- Custom open-parcel mark, adaptive/monochrome launcher assets, unified midnight splash and branded approval notification.
- Lavender light and midnight dark phone themes with a native custom appearance dialog, persisted selection and actual chooser/recreation testing.
- New phone navigation, connection illustration, file review, truthful transfer stages, history, empty states and guide.
- Midnight watch home, review, receiving, consent, success and error components, with proportional round-screen margins, a bezel scroll indicator and native clock.
- 9 shared JVM tests pass, including 3 new contrast checks; 5 phone instrumentation tests and 1 strengthened watch review/target-size test pass. The watch test also passed at an emulated 192-DP round size with 1.3× text, checking that install/dismiss actions remain fully reachable and at least 48 DP tall. This is an additional tested configuration, not physical-device certification.
- Both debug builds and optimized unsigned release bundles build; Android lint reports zero errors. Existing informational dependency/SDK/style warnings remain.
- A local signed QA fixture was updated through the redesigned watch review, genuine system confirmation and success screen.
- Android’s real document picker was used to select the signed local QA APK and verify the phone review screen.
- Package transfer, source approval, explicit install/session consent and policy boundaries are preserved. No capability or fake progress state was added from the creative reference.
## Physical Galaxy Watch 7
## Completed
SM-L310, Android16 firmware `L310XXS2BZF4`, full fingerprint in FEASIBILITY.md. Development ADB installed Pakkit and observed/clicked visible UI for QA. No `pm grant`, `appops set`, hidden installer, root or ADB package installation was used to install the QA fixture. Consumer code contains no ADB/debugging path.
| Check | Result |
| --- | --- |
| Phone debug APK | Built successfully |
| Wear OS debug APK | Built successfully |
| Optimized phone release bundle | Built successfully; unsigned without production signing variables |
| Optimized watch release bundle | Built successfully; unsigned without production signing variables |
| Android lint, phone | 0 errors; informational SDK/dependency/style warnings remain |
| Android lint, watch | 0 errors; informational SDK/style warnings remain |
| Bounded copy, known SHA-256, empty/oversize rejection, identifier safety, expiry, ABI matching | 6 JVM tests passed |
| Phone device tests: navigation and recreation, signed complete APK inspection, self-update rejection, invalid archive/path rejection | 4 passed on Pixel 10 Pro emulator, API 37 |
| Watch review test: signed fixture can be reviewed without creating any install session | 1 passed on round Wear OS 7 emulator, API 37, 454×454 |
| Visual inspection | Phone home and round watch review/controls inspected; explicit illustration height corrected |
| System source approval | Opened via public settings intent; normal system warning and approval completed on watch emulator |
| Watch PackageInstaller path | Explicit Install → pending-user-action callback → Continue → genuine system confirmation → system Install → STATUS_SUCCESS and Pakkit “Installed on your watch” → Open app launched the fixture |
| Installed-file cleanup | Confirmed the successful transfer’s private APK was deleted after installation |
| Merged release manifests | Installation and notification permissions watch-only; no broad storage/visibility/Bluetooth/location permission; unused foreground service and its permission removed |
| Release contents | QA APK absent from consumer bundles; no production signature created in this workspace |
| Git whitespace check | Passed |
1. Existing Pakkit source approval was already allowed. User reports normal prior source approval/installation without ADB, including with ADB debugging disabled. The agent did not reproduce a fresh Play-installed permission setup.
2. Started Pakkit’s explicit receiving session on real Wi-Fi. Watch issued a private IPv4 URL and locally generated QR.
3. Headless Chromium opened **the real watch-hosted site**, authenticated and rendered desktop1440x1100 and mobile390x844 layouts in light/dark modes. Zero JavaScript errors; no mobile horizontal overflow. Screenshots are actual product renders in `screenshots/standalone`.
4. Browser selected our signed `qaFixture-debug.apk` (2,473,486 bytes), uploaded it through XHR to the watch’s socket and received ready. Watch persisted package `meghdad.pakkit.fixture`, correct SHA-256 and source `local-browser`. Receiving stopped at review without an installation session.
5. Watch Install and Continue actions reached the pending system-consent flow. Subsequent InstallReceiver history recorded **installed** for that exact upload UUID, and Android’s package list confirmed the fixture. The user was interacting with the watch during this test. A separate screenshot of the system installer was not captured; the image initially taken after consent had already returned to Pakkit is not presented as system UI evidence.
6. Repeated live HTTP checks: public page200; status without token403; wrong token403; authenticated status200; foreign-Origin upload403; invalid APK400. Recorded in `validation/standalone/live-http.json`. These checks also passed with the physical display explicitly asleep. This is a short screen-off accessibility check, not a long-duration power/Doze certification.
7. Final QR layout centers its square in the circular safe area and sizes with screen width. ZXing decoded the actual physical screenshot after masking all pixels outside the display circle (`validation/standalone/qr-check.txt`); the watch remains scrollable for the URL, disclosure and End session action.
The manual install used `qaFixture`, a small signed local test application. Instrumentation staged it into the watch's private review state to isolate the installation boundary. **This was not a test of Data Layer delivery.** The fixture is packaged only into Android test assets, never consumer APKs or bundles. The UI uses the exact same file revalidation, PackageInstaller session and result receiver as the consumer install flow. Developer tooling deployed Pakkit's debug builds; the fixture itself was installed through ordinary watch UI and system consent, without an ADB package install, app-op grant, root or hidden API.
The temporary QA fixture was removed after verification.
Raw device test summaries: [phone](validation/phone-tests.txt), [watch](validation/watch-tests.txt). Screenshots are in [screenshots](screenshots/): phone home, watch launch/home/controls, real system approval and successful installation. Test fixture screens are labelled accordingly and are not store marketing screenshots.
No release claim is inferred solely from a successful file upload. The observed fixture installation is separate, stronger evidence for this device’s public installation route with trust already granted.
## Not yet verified — release blockers
## Remaining release gates
1. **Paired Data Layer integration:** the available phone/watch emulators were not configured as a paired Wear network, and discovery on the phone returned an availability/connection failure. Capability nonce exchange, real asset delivery, background receive, acknowledgement routing, delayed retries and cloud routing are implemented but remain unverified end-to-end.
2. **Galaxy Watch 7:** test exact One UI Watch / Wear OS / Android build and region. Confirm source settings, resolver behavior, consent UI, blocked cases, normal launch and developer-verification enforcement. No compatibility claim should be made before this.
3. **Interruptions and limits:** Bluetooth off/on, phone process killed, watch process killed, reboot during sync, missed status acknowledgement, system approval dismissed, user denied source/notification permission, second phone or second watch, no space, low battery and 50 MiB boundary. Test expiry while a job or install session is active. Background workers are OS-scheduled and may run later than their target time.
4. **Package coverage:** real compatible standalone APK, wrong ABI, newer minimum SDK, wrong update signature, downgrade, invalid certificate, isolated/config split, base requiring splits, corrupt resource table and restricted packages. Preflight is intentionally not a full certification or malware scan.
5. **Accessibility and layout:** TalkBack, large fonts, touch exploration, reduced animation, rotary input on hardware, 192/208/227 dp round displays and an actual tablet/phone rotation. Semantic controls and scrolling are implemented; full accessibility certification has not been performed.
6. **Performance:** battery and transfer latency on real Bluetooth/cloud links, background job timing and memory on low-RAM watches. The 50 MiB cap, bounded buffers and lack of continuous watch animation are implementation constraints, not measured performance claims.
7. **Release identity and policy:** production signing identity shared across form factors, verified dependency provenance, public privacy URL/support contact, listing assets, completed permission/Data safety declarations, internal/closed testing and Wear OS review. Google Play approval is not guaranteed.
- Fresh Play-delivered installation and source-approval flow without preexisting Pakkit trust, across supported Samsung firmware/regions and security settings. Record denial/revocation/cancellation and developer-verification behavior.
- Google Play restricted-permission and foreground-service declaration acceptance, listing/quality review, developer identity/signing and hosted privacy policy.
- Safari on real iOS/macOS, Firefox, Edge/Windows, Android browser and Linux coverage. The current browser run was Chromium on macOS, with mobile viewport emulation; it is not proof of all browser/platform combinations.
- Full ten-minute expiry on hardware, repeated sessions, long screen-off/Doze, network/IP change, client isolation, local-network permissions, interrupted large upload, low storage and process death. Explicit-stop cleanup is automated; expiry is implemented but not yet a completed elapsed-time hardware test.
- Full TalkBack/rotary/large-text/contrast review of the new receiving screen and web flow; small round physical displays. The prior review screen was tested at192dp/1.3x text, but this does not certify every new state.
- Measured battery/thermal/memory behavior under maximum50MiB transfers and adversarial bounded connections. Locks, buffers, threads and deadlines are bounded by implementation, not a measured battery guarantee.
## Intentional v1 boundaries
Single complete APK, 50 MiB maximum, one in-flight job per phone and one reviewable APK per watch, expiry 24 hours from selection, no percentage estimate, no direct third-party downloads or catalog. Waiting transfers do not currently offer a cross-device cancel action; dismiss on the watch when delivered, or let the job expire. English is the first locale. Background transfers and approval recovery require device validation before public rollout.
## Reproduce
```sh
./gradlew :app:assembleDebug :wear:assembleDebug :shared:testDebugUnitTest :app:lintDebug :wear:lintDebug :app:bundleRelease :wear:bundleRelease
./gradlew :app:assembleDebugAndroidTest :wear:assembleDebugAndroidTest
```
In environments where Google Maven returns HTTP 404, append `-PpakkitGoogleMavenMirror=https://maven.aliyun.com/repository/google` after reviewing the mirror's suitability. Run each instrumentation APK against its matching phone/watch app, rather than deploying both variants to the same device: they intentionally share an application ID. Standard Android Studio device-test tooling can run the tests. The watch test leaves its fixture ready for manual consent checks.
Do not advertise universal firmware/APK compatibility, encrypted transport, unconditional no-setup installation, or Google Play approval.
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

@@ -0,0 +1,27 @@
{
"unitSuites": [
{
"name": "meghdad.pakkit.core.TransferRulesTest",
"tests": "6",
"failures": "0",
"errors": "0"
},
{
"name": "meghdad.pakkit.core.HttpProtocolTest",
"tests": "4",
"failures": "0",
"errors": "0"
},
{
"name": "meghdad.pakkit.core.BrandPaletteTest",
"tests": "3",
"failures": "0",
"errors": "0"
}
],
"lintErrors": 0,
"lintWarnings": 17,
"version": "0.2.0",
"versionCode": 100003,
"releaseBundleSigned": false
}
@@ -0,0 +1,8 @@
{
"publicPage": 200,
"noToken": 403,
"wrongToken": 403,
"status": 200,
"wrongOrigin": 403,
"invalidApk": 400
}
+1
View File
@@ -0,0 +1 @@
Physical Watch 7 screenshot: QR decodes successfully with circular display mask.
@@ -0,0 +1,9 @@
meghdad.pakkit.wear.LocalReceiveTest:.
meghdad.pakkit.wear.WatchReviewTest:.
Time: 1.492
OK (2 tests)