Skip to content

Conversation

@xbharani
Copy link

  • Checks for fscryptctl binary presence
  • Creates a random sw encryption key
  • Applies and verifies encryption policy
  • Confirms functionality with a test file

@github-actions
Copy link

This pull request has been marked as stale due to 30 days of inactivity. To prevent automatic closure in 7 days, remove the stale label or add a comment. You can reopen a closed pull request at any time.

@github-actions github-actions bot added the Stale label Sep 12, 2025
@smuppand
Copy link
Contributor

@xbharani Any update on the requested changes?

@github-actions github-actions bot removed the Stale label Sep 13, 2025
@github-actions
Copy link

This pull request has been marked as stale due to 30 days of inactivity. To prevent automatic closure in 7 days, remove the stale label or add a comment. You can reopen a closed pull request at any time.

@xbharani xbharani force-pushed the main branch 2 times, most recently from bd6eccf to 56d715d Compare November 20, 2025 09:52
@xbharani xbharani force-pushed the main branch 2 times, most recently from 686cf9f to 8f29437 Compare December 8, 2025 05:26
Copy link
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the script is close, but a few things will bite in CI / reliability, plus a couple of correctness/safety issues.

- Checks for fscryptctl binary presence
- Creates a random sw encryption key
- Applies and verifies encryption policy
- Confirms functionality with a test file
- Added yaml config

Signed-off-by: Bharani Bhuvanagiri <bbharani@qti.qualcomm.com>
Copy link
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few additional minor changes are required. Other than that, everything appears to be fine.


if [ -z "${__INIT_ENV_LOADED:-}" ]; then
# shellcheck disable=SC1090
. "$INIT_ENV"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

init_evn sourcing isn't idempotent missing __INIT_ENV_LOADED=1


## Notes

- The script uses /data/UserDataEncryption for all operations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script is set to use /mnt as the base directory (with /UDE as a fallback), but it still seems to reference /data here.


Ensure the following components are present on the target device:

- `fscryptctl` binary available in `/data/`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update here, as the data will not be available.



## kernel config check
if [ -r /proc/config.gz ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Step 6: Verify policy
log_info "Verifying encryption policy"

if ! policy_output=$("$FSCRYPTCTL" get_policy "$MOUNT_DIR" 2>/dev/null); then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many commands redirect to /dev/null (eg add_key, key_status, get_policy) When something fails, logs won't explain why. Please capture stderr into a variable and log it on failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants