[GH-ISSUE #137] you can keep it simple #459

Closed
opened 2026-03-12 15:46:58 +03:00 by kerem · 0 comments
Owner

Originally created by @capullo on GitHub (Nov 24, 2023).
Original GitHub issue: https://github.com/007revad/Synology_enable_M2_volume/issues/137

here an example oneliner how to patch the lib, just with xxd and sed:
cd /usr/lib && xxd -p -u -c 0 libhwcontrol.so.1 > /tmp/libhwcontrol.so.1.tmp && grep -v "803E00B8010000009090488B" /tmp/libhwcontrol.so.1.tmp >/dev/null && grep -e "803E00B801000000752.488B" /tmp/libhwcontrol.so.1.tmp >/dev/null && cp libhwcontrol.so.1 libhwcontrol.so.1.bak && sed 's/803E00B801000000752.488B/803E00B8010000009090488B/' /tmp/libhwcontrol.so.1.tmp | xxd -r -p > libhwcontrol.so.1

xxd -p -u -c 0 to read
xxd -r -p to write

maybe this helps to simplify your script

Originally created by @capullo on GitHub (Nov 24, 2023). Original GitHub issue: https://github.com/007revad/Synology_enable_M2_volume/issues/137 here an example oneliner how to patch the lib, just with xxd and sed: `cd /usr/lib && xxd -p -u -c 0 libhwcontrol.so.1 > /tmp/libhwcontrol.so.1.tmp && grep -v "803E00B8010000009090488B" /tmp/libhwcontrol.so.1.tmp >/dev/null && grep -e "803E00B801000000752.488B" /tmp/libhwcontrol.so.1.tmp >/dev/null && cp libhwcontrol.so.1 libhwcontrol.so.1.bak && sed 's/803E00B801000000752.488B/803E00B8010000009090488B/' /tmp/libhwcontrol.so.1.tmp | xxd -r -p > libhwcontrol.so.1` `xxd -p -u -c 0` to read `xxd -r -p` to write maybe this helps to simplify your script
kerem 2026-03-12 15:46:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Synology_enable_M2_volume#459
No description provided.