WSAGAScript icon indicating copy to clipboard operation
WSAGAScript copied to clipboard

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

Open khanhtranngoccva opened this issue 4 years ago • 16 comments

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 avatar Oct 31 '21 08:10 khanhtranngoccva

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 avatar Oct 31 '21 11:10 khanhtranngoccva

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)

khanhtranngoccva avatar Oct 31 '21 12:10 khanhtranngoccva

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

kristibektashi avatar Oct 31 '21 15:10 kristibektashi

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)

ADeltaX avatar Oct 31 '21 15:10 ADeltaX

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 avatar Nov 01 '21 00:11 khanhtranngoccva

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 avatar Nov 01 '21 02:11 khanhtranngoccva

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 avatar Nov 01 '21 09:11 khanhtranngoccva

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

khanhtranngoccva avatar Nov 02 '21 01:11 khanhtranngoccva

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.

Smart123s avatar Jan 23 '22 09:01 Smart123s

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

mateuszdrab avatar Apr 04 '22 23:04 mateuszdrab

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

It has a ps1 script that can install everything.

Smart123s avatar Apr 05 '22 06:04 Smart123s

Thanks, will check it out.

mateuszdrab avatar Apr 05 '22 08:04 mateuszdrab

,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 avatar Sep 03 '22 00:09 stevebovy

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

stevebovy avatar Sep 03 '22 01:09 stevebovy

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

stevebovy avatar Sep 03 '22 01:09 stevebovy