Skip to content

Update resetprop to support --compact - #9758

Open
aviraxp wants to merge 1 commit into
masterfrom
compact
Open

Update resetprop to support --compact#9758
aviraxp wants to merge 1 commit into
masterfrom
compact

Conversation

@aviraxp

@aviraxp aviraxp commented Mar 14, 2026

Copy link
Copy Markdown
Collaborator

This allows compacting property area to remove holes after deleting prop. Usage:

resetprop --compact
resetprop -c
resetprop -c u:object_r:ab_update_gki_prop:s0

@aviraxp
aviraxp requested a review from yujincheng08 March 14, 2026 11:57

@yujincheng08 yujincheng08 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@yujincheng08
yujincheng08 requested a review from Copilot March 14, 2026 12:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds support for compacting the Android system property area via resetprop --compact, wiring a new CLI switch to a new low-level system_properties entry point.

Changes:

  • Bumps the system_properties external subproject to a revision that exposes a compaction API.
  • Adds an FFI binding and SysProp::compact() wrapper for __system_property_compact.
  • Introduces -c/--compact in resetprop CLI and routes execution through the new compaction path.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
native/src/external/system_properties Updates the system_properties subproject revision to pick up the underlying compaction support.
native/src/core/resetprop/mod.rs Adds FFI + wrapper method for calling the property-area compaction routine.
native/src/core/resetprop/cli.rs Adds --compact flag and execution path to trigger compaction from the CLI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread native/src/core/resetprop/mod.rs
Comment thread native/src/core/resetprop/cli.rs
Comment thread native/src/core/resetprop/cli.rs
Comment thread native/src/core/resetprop/cli.rs
Comment thread native/src/core/resetprop/cli.rs
Comment thread native/src/core/resetprop/cli.rs
@aviraxp

aviraxp commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator Author

Test pass on a16

@vvb2060

vvb2060 commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator

It seems to have no overlap with the current code, and I'd prefer to put it in a Magisk module.

@aviraxp

aviraxp commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator Author

Wait, i will rework resetprop -d, current code can still get detected

@DKOX77 DKOX77 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

嗯嗯

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.

5 participants