Skip to content
Overwrite or Duplicate

Overwrite or Duplicate

Almost all Frida methods that modify a file can either overwrite the input (in-place) or duplicate it.

There is no speed difference between the two modes — it is purely a workspace management question.

Default policy

Every command has a suitable built-in default:

  • Irreversible operations duplicate by default (to protect the original).
  • Easily reversed operations overwrite by default.

Forcing in-place operation

Append ! to any command to force overwriting:

2 > oi! y[,,0]

Without !, oi would duplicate file 2. With !, it operates in place.

When to prefer each mode

Situation Recommended
Exploring data, reversibility wanted Duplicate (default)
Very large files, RAM limited Overwrite (!)
Quick iterative cleanup Overwrite (!)
Before a long session where mistakes would be costly Duplicate