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

Installer script that automatically installs WSA with Google Play and root as well as all prerequisites #98

Open
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

khanhtranngoccva
Copy link

This installer:
Downloads and installs WSL framework, WSL2 kernel, and Debian.
Downloads and prepares the setup files and images from the internet.
Applies changes to system images and copies the rooted Android kernel.
Modifies the package to be able to install on Windows 10. (MAY NOT WORK)
Enables developer mode and installs the modified package.

Requirements:
+Admin permission.
+Make sure the ./main/TEMP folder does not have any data.
+Do NOT execute the script from the command line! (to prevent accidental data deletion, although in the installer I changed the working directory to os.path.dirname(file) (the app folder) already)

@khanhtranngoccva
Copy link
Author

There's still a problem though. I still need a way to really install the app folder, instead of just registering the XML file and creating a shortcut to the .exe file in the temporary folder. Without that, there's no chance of WSA being updatable

@khanhtranngoccva
Copy link
Author

khanhtranngoccva commented Oct 31, 2021

Hi @ADeltaX can you help me a bit? How can I create and sign an install package from the modified folder with your chosen pfx certificate and use it instead of having to manually copy to a directory and manually overwrite the folder to update the apps? (which can cause a ton of problems, for example, when the app is running in the background and the directory can't be written)

@kristibektashi
Copy link

Maybe instead of Debian you could use Ubuntu since it is the default distro of WSL Also this script has been tested with Ubuntu

@ADeltaX
Copy link
Collaborator

ADeltaX commented Oct 31, 2021

Hi @ADeltaX can you help me a bit? How can I create and sign an install package from the modified folder with your chosen pfx certificate and use it instead of having to manually copy to a directory and manually overwrite the folder to update the apps? (which can cause a ton of problems, for example, when the app is running in the background and the directory can't be written)

You can rebuild the msix but you'll still not receive an update (conflicting cert) and you'll lose android apps in start menu (because it's a custom capability with sccd, which attests the use only with that package family). The only way to preserve that is the registration of "unpackaged" appx in a folder (registration doesn't mean the content will be copied, but it will use that folder AS an installation path, so you can't move or delete it while in use)

@khanhtranngoccva
Copy link
Author

khanhtranngoccva commented Nov 1, 2021

I think you can still sign it with a custom certificate (and put it in your repo) and I'll sign the app with yours. Otherwise, overwriting an installation and manually rolling back is a pain.

@khanhtranngoccva
Copy link
Author

khanhtranngoccva commented Nov 1, 2021

Maybe instead of Debian you could use Ubuntu since it is the default distro of WSL Also this script has been tested with Ubuntu

I prefer Debian for being more lightweight though. However, I'll try to tweak it so that it detects other debian-based distros as well.

@khanhtranngoccva
Copy link
Author

khanhtranngoccva commented Nov 1, 2021

ok it works perfectly now. my approach was to create the directory C:\Program Files\WSA_Advanced, then the app files will be put inside a folder with the version as the name. Each time the installer updates, the old folder will be deleted after registering the new manifest file. I also implemented a check-for-update system and a rollback (which deletes the new folder).

image

you can now merge the code and create the precompiled .exe file by running the command "pyinstaller main.py"

@khanhtranngoccva
Copy link
Author

khanhtranngoccva commented Nov 2, 2021

@ADeltaX can you try the release binary some time and (maybe) add them to the release section? It's located in the fork.

@Smart123s
Copy link

Issues are disabled on your fork, so I'm writing here.

Maybe you could add a requirements.txt. For me, only the packaging package was missing. It'd be easier to install dependencies that way, if you want don't want to use the python bundled in the repo.

@mateuszdrab
Copy link

Any updates on this? Looks really promising to automate all the steps. 😀

@Smart123s
Copy link

You could check out https://github.com/LSPosed/MagiskOnWSA

It has a ps1 script that can install everything.

@mateuszdrab
Copy link

Thanks, will check it out.

@stevebovy
Copy link

stevebovy commented Sep 3, 2022

,is your update procedure distinctly and uniquely separate and different from windows update, or integrated and compatible with windows update? after I use your install will windows update be able to successfully update and install a newly upgraded wsa?

@stevebovy
Copy link

if wsl is already installed please use the already installed default distribution.

@stevebovy
Copy link

stevebovy commented Sep 3, 2022

if I use your new procedure, can I keep my previously installed wsa, in other words I do not need to deinstall wsa

exit()


def ps_check_feature(feature):

Choose a reason for hiding this comment

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

Should support WSL from Store as well, the component is no longer needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants