Skip to content

Instantly share code, notes, and snippets.

@Beej126
Last active November 8, 2021 03:22
Show Gist options
  • Select an option

  • Save Beej126/4aa86ad45b1cb77a9ee922e8d53448fc to your computer and use it in GitHub Desktop.

Select an option

Save Beej126/4aa86ad45b1cb77a9ee922e8d53448fc to your computer and use it in GitHub Desktop.

Revisions

  1. Beej126 revised this gist Nov 6, 2021. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions _Readme.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    # Install Steps
    -1. currently this requires at least Windows 11 insider *beta* channel - [install guide](https://www.windowscentral.com/how-get-started-android-apps-windows-11)
    0. add "adb.exe" to your system path - [install guide](https://nerdschalk.com/windows-11-how-to-sideload-apk-using-windows-subsystem-for-android-and-adb/)
    # Prerequisites
    - currently this requires at least Windows 11 insider *beta* channel - [install guide](https://www.windowscentral.com/how-get-started-android-apps-windows-11)
    - and "adb.exe" must be in your system path - [install guide](https://nerdschalk.com/windows-11-how-to-sideload-apk-using-windows-subsystem-for-android-and-adb/)

    # Install Steps
    1. download these files to a local folder
    2. double click the android_subsys_install_apk_context_menu_setup.cmd

  2. Beej126 revised this gist Nov 6, 2021. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions _Readme.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,7 @@
    # Install Steps
    -1. currently this requires at least Windows 11 insider *beta* channel - [install guide](https://www.windowscentral.com/how-get-started-android-apps-windows-11)
    0. add "adb.exe" to your system path - [install guide](https://nerdschalk.com/windows-11-how-to-sideload-apk-using-windows-subsystem-for-android-and-adb/)

    1. download these files to a local folder
    2. double click the android_subsys_install_apk_context_menu_setup.cmd

  3. Beej126 revised this gist Nov 6, 2021. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions _Readme.md
    Original file line number Diff line number Diff line change
    @@ -2,14 +2,14 @@
    1. download these files to a local folder
    2. double click the android_subsys_install_apk_context_menu_setup.cmd

    that's it, now you have a new context menu:
    ## that's it, now you have a new context menu:

    ![image](https://user-images.githubusercontent.com/6301228/140591805-d82dd2d5-05d9-4605-b0d8-5a8c66297e8c.png)

    what to expect:
    ## what to expect:

    ![image](https://user-images.githubusercontent.com/6301228/140592150-d5e7b248-6fe9-472f-a4c6-6da0dbf645ba.png)

    launch new apps from start menu (pretty slick there msft):
    ## launch new apps from start menu (pretty slick there msft):

    ![image](https://user-images.githubusercontent.com/6301228/140592282-53f7cb71-1485-45c4-bbf1-3d4b7e10bcf0.png)
  4. Beej126 revised this gist Nov 6, 2021. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion _Readme.md
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,8 @@ that's it, now you have a new context menu:

    what to expect:

    ![image](https://user-images.githubusercontent.com/6301228/140592150-d5e7b248-6fe9-472f-a4c6-6da0dbf645ba.png)
    ![image](https://user-images.githubusercontent.com/6301228/140592150-d5e7b248-6fe9-472f-a4c6-6da0dbf645ba.png)

    launch new apps from start menu (pretty slick there msft):

    ![image](https://user-images.githubusercontent.com/6301228/140592282-53f7cb71-1485-45c4-bbf1-3d4b7e10bcf0.png)
  5. Beej126 revised this gist Nov 6, 2021. 2 changed files with 6 additions and 2 deletions.
    6 changes: 5 additions & 1 deletion _Readme.md
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,8 @@

    that's it, now you have a new context menu:

    ![image](https://user-images.githubusercontent.com/6301228/140591805-d82dd2d5-05d9-4605-b0d8-5a8c66297e8c.png)
    ![image](https://user-images.githubusercontent.com/6301228/140591805-d82dd2d5-05d9-4605-b0d8-5a8c66297e8c.png)

    what to expect:

    ![image](https://user-images.githubusercontent.com/6301228/140592150-d5e7b248-6fe9-472f-a4c6-6da0dbf645ba.png)
    2 changes: 1 addition & 1 deletion android_subsys_install_apk_context_menu_setup.cmd
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    reg add "HKEY_CURRENT_USER\Software\Classes\.apk" /f /ve /t REG_SZ /d WSA_APK_Install

    :: progid provides the windows explorer context menu...
    reg add "HKEY_CURRENT_USER\Software\Classes\WSA_APK_Install\shell\Install to Android Subsys on Windows\command" /f /ve /t REG_EXPAND_SZ /d "cmd /c clear & adb connect 127.0.0.1:58526 & adb install \"^%%L\" & timeout /t 5"
    reg add "HKEY_CURRENT_USER\Software\Classes\WSA_APK_Install\shell\Install to Android Subsys on Windows\command" /f /ve /t REG_EXPAND_SZ /d "cmd /c clear & mode 80,15 & title WSA APK Installer & echo, & echo, & adb connect 127.0.0.1:58526 & adb install \"^%%L\" & timeout /t 5"
    :: ...and file icon
    reg add "HKEY_CURRENT_USER\Software\Classes\WSA_APK_Install\DefaultIcon" /f /ve /t REG_EXPAND_SZ /d "%~dp0android.ico,0"

  6. Beej126 revised this gist Nov 6, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions _Readme.md
    Original file line number Diff line number Diff line change
    @@ -3,4 +3,5 @@
    2. double click the android_subsys_install_apk_context_menu_setup.cmd

    that's it, now you have a new context menu:

    ![image](https://user-images.githubusercontent.com/6301228/140591805-d82dd2d5-05d9-4605-b0d8-5a8c66297e8c.png)
  7. Beej126 revised this gist Nov 6, 2021. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions _Readme.md
    Original file line number Diff line number Diff line change
    @@ -1 +1,6 @@
    # Install Steps
    1. download these files to a local folder
    2. double click the android_subsys_install_apk_context_menu_setup.cmd

    that's it, now you have a new context menu:
    ![image](https://user-images.githubusercontent.com/6301228/140591805-d82dd2d5-05d9-4605-b0d8-5a8c66297e8c.png)
  8. Beej126 revised this gist Nov 6, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions _Readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ![image](https://user-images.githubusercontent.com/6301228/140591805-d82dd2d5-05d9-4605-b0d8-5a8c66297e8c.png)
  9. Beej126 revised this gist Nov 6, 2021. 1 changed file with 0 additions and 0 deletions.
    Binary file added android.ico
    Binary file not shown.
  10. Beej126 created this gist Nov 6, 2021.
    9 changes: 9 additions & 0 deletions android_subsys_install_apk_context_menu_setup.cmd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    :: associate apk file extension with ProgId
    reg add "HKEY_CURRENT_USER\Software\Classes\.apk" /f /ve /t REG_SZ /d WSA_APK_Install

    :: progid provides the windows explorer context menu...
    reg add "HKEY_CURRENT_USER\Software\Classes\WSA_APK_Install\shell\Install to Android Subsys on Windows\command" /f /ve /t REG_EXPAND_SZ /d "cmd /c clear & adb connect 127.0.0.1:58526 & adb install \"^%%L\" & timeout /t 5"
    :: ...and file icon
    reg add "HKEY_CURRENT_USER\Software\Classes\WSA_APK_Install\DefaultIcon" /f /ve /t REG_EXPAND_SZ /d "%~dp0android.ico,0"

    @timeout /t 5