Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs - Create #1625 - Android app support #3267

Closed
wants to merge 16 commits into from
Closed
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions doc/specs/#1625 - Android app support
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
author: @upintheairsheep
created on: 2023-05-23
last updated: 2023-05-23
issue id: 1625
---

# Spec Title

For [#1625](https://github.com/microsoft/winget-cli/issues/1625)

## Abstract

This feature adds Android application support to winget via Windows Subsystem for Android. The goal is to allow users to install and maintain Android applications just like they would any other type of application on winget, and for more community-driven Android apps to be availble via Windows. As a first step, this would be available as an "experimental" feature to make it available to the community and receive feedback.
upintheairsheep marked this conversation as resolved.
Show resolved Hide resolved

## Inspiration

Android is by far the most used operating system on the planet, excluding a few certain regions, where iOS dominates. Many mobile developers make apps for Android, and only have a sometimes inferior web app for desktop, if they have one at all.

## Solution Design

### System requirements

Windows 11 or newer
Windows Subsystem for Android
ADB (if it ends up being the method of installation)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ADB (if it ends up being the method of installation)
ADB (if it ends up being the method of installation)

The spec should define the method of installation


### Android YAML manifest

The "InstallerType" field in the YAML manifest file specifies the type of the application. A new InstallerType "Android" or "APK" will be added to show that a given application is an Android app.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which is it - Android, or APK? Specs should be unambiguous.

apk makes the most sense to me


Each PWA would have its own manifest YAML file. A sample manifest file would look like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PWA or APK?


```
Id: FDroid.FDroid
Version: 1337.0
Name: F-Droid
Publisher: F-Droid
AppMoniker: fdroid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is AppMoniker?

License: Test
InstallerType: Android
Installers:
- Arch: neutral
Url: https://f-droid.org/F-Droid.apk
InstallerType: Android
MinAndroidPlat: 31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MinAndroidPlat should be called out in the spec as a new key which needs to be added to the manifest. What validation needs to be in place on this key? Does it need to be at the installer level, or can it also be at root level? Where would it fall for APKs distributed in zip files?

ADBFlags:
ManifestVersion: 0.1.0
```

### Package generation

WinGetCreate will download the package and extract metadata from AndroidManifest.xml, automatically filling out all data excluding the short desciption
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wingetcreate information should be a separate specification at the winget-create repository


### Package installation

Either ADB could be used to install the application, or the method that Microsoft Store installs Android apps could be utilized.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be disambiguous

### Flow of the install process

1. Windows Subsystem for Android is installed
2. ADB must be installed on the machine
3. It must connect to the Subsystem, bypassing the developer mode restriction, which I think the uninstallation in control panel already has.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think winget should be bypassing restrictions. If the user has developer mode disabled it could be due to group policy or intune restrictions and sysadmin decisions need to be respected

A nice feature in the manifest would be for adding the adb install [flags](https://adbshell.com/commands/adb-install) for installation of apps that require it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be under the Future Considerations portion of the spec

## UI/UX Design

Installing a PWA will be similar to installing other application types currently supported by winget, using the install command. The -i flag will not be implemented due to it's impracticality.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PWA or APK?


An example of the interactive install would look like this:

```
>winget install fdroid
Found F-Droid [FDroid.FDroid]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Starting Windows Subsystem for Android...
Connecting to Windows Subsystem for Android via adb...
Starting package install...
<Progress bar> (if ADB supports)
Successfully installed!
```

## Capabilities

# A field to determine minumum platform SDK version of Android is required for the app to run on like 27 (Oreo), 30 (Red Velvet Cake), 31 (Snow Cone), 32 (12L), or 33 (Tiramisu)
# A field for ADB flags to be put, like test apps.
### Accessibility

This should have no direct impact on accessibility.

### Security

Android has security concerns.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How exactly would this featue impact security, more specifically than the blanket statement that there are security concerns?

### Reliability

This is not expected to impact reliability.

### Compatibility


### Performance, Power, and Efficiency

Installing some or most Android apps leaves a service running in the background, for stuff such as notifications.
## Potential Issues


## Future considerations

1. Android 14 "Upside Down Cake" will restrict the installation of apps that target any version before 6.0 "Marshmallow" due to security concerns, however --bypass-low-target-sdk-block can bypass this limitation. Similar, certain new Android devices, such as the Pixel 7 and Pixel Tablet, have no support for 32-bit apps and will not be able to run 32 bit code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t understand what the Pixel 7 or Pixel Tablet have to do with running apps on WSA

2. Blocking issues may be present for the package repository, including the lack of Google play service replacements, the lack of support for a certain protocol, or the lack of optional root access.

## Resources