cfig / Android_boot_image_editor

Parsing and re-packing Android boot.img/vbmeta.img/payload.bin, supporting Android 15
Apache License 2.0
1.04k stars 232 forks source link

Issue with 'boot_editor_v14r2' Gradle Wrapper Script on macOS #136

Closed Mzdyl closed 8 months ago

Mzdyl commented 8 months ago

"I am not a native English speaker, so I used ChatGPT to write down this issue. Please forgive any errors."

Problem Statement: When attempting to use #!/usr/bin/bash in the gradlew script of 'boot_editor_v14r2', it is observed that the Bash executable is not located in the specified directory on the latest macOS version.

Context: The 'boot_editor_v14r2' project's Gradle Wrapper script (gradlew) contains the shebang line #!/usr/bin/bash, which points to the Bash executable in a specific directory. However, on newer versions of macOS, it seems that Bash is not present in the expected directory.

Steps to Reproduce: Navigate to the 'boot_editor_v14r2' project directory. Attempt to execute the gradlew script. Expected Behavior: The gradlew script should execute without any issues, utilizing the Bash executable specified in the shebang line.

Actual Behavior: Execution of the gradlew script results in an error, indicating that the Bash executable is not found in /usr/bin.

Environment Details: Operating System: macOS 14.3 'Android_boot_image_editor' version: v14r2 Proposed Solution: Update the shebang line in the gradlew script to correctly point to the Bash executable's location on the latest macOS version. Provide instructions for users on how to resolve the issue or update their local setup.

cfig commented 8 months ago

I forgot that modern MacOS has adopted zsh ... Let me do some tests with zsh/bash. To quickly workaround this issue, please replace the 1st line of the script with this:

#!/usr/bin/env sh