Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
34 changes: 5 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This package contains two programs:

Supported images:

Windows Vista, Windows 7, Window 8.x, Windows 10. All languages and any version (home, pro...) and Windows PE are supported.
Windows Vista, Windows 7, Window 8.x, Windows 10, Windows 11. All languages and any version (home, pro...) and Windows PE are supported.

Supported bootmodes:

Expand All @@ -21,32 +21,6 @@ Supported bootmodes:

This project rewrite of original [WoeUSB](https://github.com/slacka/WoeUSB)

## Installation

### Arch
```shell
yay -S woeusb-ng
```

### For other distributions

### 1. Install WoeUSB-ng's Dependencies
#### Ubuntu

```shell
sudo apt install git p7zip-full python3-pip python3-wxgtk4.0 grub2-common grub-pc-bin parted dosfstools ntfs-3g
```

#### Fedora (tested on: Fedora Workstation 33)
```shell
sudo dnf install git p7zip p7zip-plugins python3-pip python3-wxpython4
```

### 2. Install WoeUSB-ng
```shell
sudo pip3 install WoeUSB-ng
```

## Installation from source code

### 1. Install WoeUSB-ng's Build Dependencies
Expand All @@ -64,14 +38,14 @@ sudo dnf install git p7zip p7zip-plugins python3-pip python3-wxpython4
```
### 2. Install WoeUSB-ng
```shell
git clone https://github.com/WoeUSB/WoeUSB-ng.git
git clone https://github.com/Nguyen12345tt/WoeUSB-ng.git
cd WoeUSB-ng
sudo pip3 install .
```

## Installation from source code locally or in virtual environment
```shell
git clone https://github.com/WoeUSB/WoeUSB-ng.git
git clone https://github.com/Nguyen12345tt/WoeUSB-ng.git
cd WoeUSB-ng
git apply development.patch
sudo pip3 install -e .
Expand All @@ -83,9 +57,11 @@ Please note that this will not create menu shortcut and you may need to run gui
To remove WoeUSB-ng completely run (needed only when using installation from source code):
```shell
sudo pip3 uninstall WoeUSB-ng

sudo rm /usr/share/icons/WoeUSB-ng/icon.ico \
/usr/share/applications/WoeUSB-ng.desktop \
/usr/local/bin/woeusbgui

sudo rmdir /usr/share/icons/WoeUSB-ng/
```

Expand Down
64 changes: 56 additions & 8 deletions WoeUSB/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
application_version = miscellaneous.__version__
DEFAULT_NEW_FS_LABEL = 'Windows USB'

application_site_url = 'https://github.com/slacka/WoeUSB'
application_copyright_declaration = "Copyright © Colin GILLE / congelli501 2013\\nCopyright © slacka et.al. 2017"
application_site_url = 'https://github.com/Nguyen12345tt/WoeUSB'
application_copyright_declaration = "Copyright © Colin GILLE / congelli501 2013\\nCopyright © slacka et.al. 2017\\nCopyright © Nguyen12345tt"
application_copyright_notice = application_name + " is free software licensed under the GNU General Public License version 3(or any later version of your preference) that gives you THE 4 ESSENTIAL FREEDOMS\\nhttps://www.gnu.org/philosophy/"

#: Increase verboseness, provide more information when required
Expand All @@ -40,7 +40,8 @@


def init(from_cli=True, install_mode=None, source_media=None, target_media=None, workaround_bios_boot_flag=False,
target_filesystem_type="FAT", filesystem_label=DEFAULT_NEW_FS_LABEL):
target_filesystem_type="FAT", filesystem_label=DEFAULT_NEW_FS_LABEL,
bypass_hardware_check = False, bypass_ms_account = False, disable_bitlocker=False):
"""
:param from_cli:
:type from_cli: bool
Expand All @@ -50,6 +51,9 @@ def init(from_cli=True, install_mode=None, source_media=None, target_media=None,
:param workaround_bios_boot_flag:
:param target_filesystem_type:
:param filesystem_label:
:param bypass_hardware_check: Bypass TPM/SecureBoot/RAM
:param bypass_ms_account: Bypass Microsoft Account Requirement
:param disable_bitlocker: Disable BitLocker Device Encryption
:return: List
"""
source_fs_mountpoint = "/media/woeusb_source_" + str(
Expand All @@ -66,6 +70,11 @@ def init(from_cli=True, install_mode=None, source_media=None, target_media=None,
debug = False

parser = None

# Initialize default flags
bypass_hardware_check_flag = bypass_hardware_check
bypass_ms_account_flag = bypass_ms_account
Comment thread
Nguyen12345tt marked this conversation as resolved.
disable_bitlocker_flag = disable_bitlocker
Comment thread
Nguyen12345tt marked this conversation as resolved.

Comment thread
Nguyen12345tt marked this conversation as resolved.
if from_cli:
parser = setup_arguments()
Expand Down Expand Up @@ -95,6 +104,11 @@ def init(from_cli=True, install_mode=None, source_media=None, target_media=None,
target_filesystem_type = args.target_filesystem

filesystem_label = args.label

# Capture CLI arguments for Windows 11 tweaks
bypass_hardware_check_flag = args.bypass_hardware_check
bypass_ms_account_flag = args.bypass_ms_account
disable_bitlocker_flag = args.disable_bitlocker

verbose = args.verbose

Expand All @@ -107,14 +121,17 @@ def init(from_cli=True, install_mode=None, source_media=None, target_media=None,
utils.gui = gui

if from_cli:
# Added new flags to the return list
return [source_fs_mountpoint, target_fs_mountpoint, temp_directory, install_mode, source_media, target_media,
workaround_bios_boot_flag, skip_legacy_bootloader, target_filesystem_type, filesystem_label, verbose, debug, parser]
workaround_bios_boot_flag, skip_legacy_bootloader, target_filesystem_type, filesystem_label, verbose, debug, parser,
bypass_hardware_check_flag, bypass_ms_account_flag, disable_bitlocker_flag]
else:
return [source_fs_mountpoint, target_fs_mountpoint, temp_directory, target_media]


def main(source_fs_mountpoint, target_fs_mountpoint, source_media, target_media, install_mode, temp_directory,
target_filesystem_type, workaround_bios_boot_flag, parser=None, skip_legacy_bootloader=False):
target_filesystem_type, workaround_bios_boot_flag, parser=None, skip_legacy_bootloader=False,
bypass_hardware_check_flag=False, bypass_ms_account_flag=False, disable_bitlocker_flag=False):
"""
:param parser:
:param source_fs_mountpoint:
Expand All @@ -125,6 +142,9 @@ def main(source_fs_mountpoint, target_fs_mountpoint, source_media, target_media,
:param temp_directory:
:param target_filesystem_type:
:param workaround_bios_boot_flag:
:param bypass_hardware_check_flag: Hardware bypass
:param bypass_ms_account_flag: MS Account bypass
:param disable_bitlocker_flag: BitLocker disable
:return: 0 - succes; 1 - failure
"""
global debug
Expand Down Expand Up @@ -193,6 +213,20 @@ def main(source_fs_mountpoint, target_fs_mountpoint, source_media, target_media,

copy_filesystem_files(source_fs_mountpoint, target_fs_mountpoint)

# --- START WINDOWS 11 TWEAKS LOGIC ---
if bypass_hardware_check_flag or bypass_ms_account_flag or disable_bitlocker_flag:
utils.print_with_color(_("Applying Windows 11 customizations..."), "green")
if hasattr(utils, 'write_win11_bypass'):
utils.write_win11_bypass(
target_fs_mountpoint,
bypass_hardware=bypass_hardware_check_flag,
bypass_ms_account=bypass_ms_account_flag,
disable_bitlocker=disable_bitlocker_flag
)
else:
utils.print_with_color(_("Error: write_win11_bypass function not found in utils!"), "red")
Comment thread
Nguyen12345tt marked this conversation as resolved.
# --- END WINDOWS 11 TWEAKS LOGIC ---

workaround.support_windows_7_uefi_boot(source_fs_mountpoint, target_fs_mountpoint)
if not skip_legacy_bootloader:
install_legacy_pc_bootloader_grub(target_fs_mountpoint, target_device, command_grubinstall)
Expand Down Expand Up @@ -648,6 +682,16 @@ def setup_arguments():
help="This will skip the legacy grub bootloader creation step.")
parser.add_argument("--target-filesystem", "--tgt-fs", choices=["FAT", "NTFS"], default="FAT", type=str.upper,
help="Specify the filesystem to use as the target partition's filesystem.")

# --- NEW ARGUMENTS ---
parser.add_argument("--bypass_hardware_check", action="store_true",
help="Bypass Windows 11 TPM 2.0 / Secure Boot requirements.")
parser.add_argument("--bypass-ms-account", action="store_true",
help="Bypass Microsoft Account Requirement (allows offline account creation).")
parser.add_argument("--disable-bitlocker", action="store_true",
help="Disable automatic BitLocker device encryption.")
# --------------------

parser.add_argument('--for-gui', action="store_true", help=argparse.SUPPRESS)

return parser
Expand Down Expand Up @@ -709,14 +753,18 @@ def run():
if isinstance(result, list) is False:
return

# Updated unpacking to include new flags
source_fs_mountpoint, target_fs_mountpoint, temp_directory, \
install_mode, source_media, target_media, \
workaround_bios_boot_flag, skip_legacy_bootloader, target_filesystem_type, \
new_file_system_label, verbose, debug, parser = result
new_file_system_label, verbose, debug, parser, \
bypass_hardware_check_flag, bypass_ms_account_flag, disable_bitlocker_flag = result

try:
# Updated main call to include new flags
main(source_fs_mountpoint, target_fs_mountpoint, source_media, target_media, install_mode, temp_directory,
target_filesystem_type, workaround_bios_boot_flag, parser, skip_legacy_bootloader)
target_filesystem_type, workaround_bios_boot_flag, parser, skip_legacy_bootloader,
bypass_hardware_check_flag, bypass_ms_account_flag, disable_bitlocker_flag)
except KeyboardInterrupt:
pass
except Exception as error:
Expand All @@ -728,4 +776,4 @@ def run():


if __name__ == "__main__":
run()
run()
Loading