To preserve the execution flag when using adb push on LineageOS 23.2, you need to explicitly set the permissions after pushing the file. By default, adb push does not preserve file permissions, including the executable flag.
Here’s how you can do it:
bashadb push your_script.sh /data/local/tmp/
adb shell:
bashadb shell chmod 755 /data/local/tmp/your_script.sh
This ensures the file retains its executable status after being pushed to the device. If you are pushing to a system partition, you may need root access (adb root first, if available on your build).
If you are working in a recovery environment or with a custom script, you can also use adb shell to set the permissions right after the push, as shown in the LineageOS documentation and community discussions.
Would you like help automating this process with a script?