REAndroid / APKEditor

Powerful android apk editor - aapt/aapt2 independent
Apache License 2.0
645 stars 95 forks source link

Proposed feature to auto delete redundant strings #106

Open Zenlua opened 1 month ago

Zenlua commented 1 month ago

Can you add feature flags?

This feature will be useful for someone adding a language pack, and some extra strings will give an error, but if there are too many extra strings, it will take a long time to delete.

It is possible to use loops to automatically delete, but it is quite cumbersome

REAndroid commented 1 month ago

What is the logic to filter "extra strings" that works for all apks ?

Zenlua commented 1 month ago

If the added strings file has a key that does not exist in the original strings, the extra string will be auto deleted, In apktool will add ids, and a warning appears that string does not exist, but this is redundant.

REAndroid commented 3 weeks ago

Try new (beta) update To activate advanced features clone and build with: ./gradlew betaJar

Zenlua commented 3 weeks ago

When I add extra text to the string it still shows an error.

ERROR: Undefined entry name: <string name="testkk"/>Wed</string>

Zenlua commented 3 weeks ago

You can rely on public.xml to filter out redundant text. Any text that has not been added in public.xml will be auto deleted. This can apply to all other items: array, dimen, bool, etc