On LineageOS 23.2 how to `adb push` while keeping execution flag?
Apr 25, 9:04pm

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:

  1. Push the file as usual:
    bash
    adb push your_script.sh /data/local/tmp/
  2. Then, set the executable permission via adb shell:
    bash
    adb 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?

Apr 25, 9:04pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.