Nov 14, 10:05pm

There's a catch: res/values-fr/strings.xml doesn't exist as a file inside the APK. Resources are compiled into the binary resources.arsc, so unzip alone can't get it. Two quick options:

1. apkanalyzer (already in your Android SDK, no full decode)

Print values directly for the French config:

bash
apkanalyzer resources value --config fr --type string --name app_name app.apk

To reconstruct the whole file, loop over the names:

bash
apk=app.apk
echo '<?xml version="1.0" encoding="utf-8"?>'; echo '<resources>'
for n in $(apkanalyzer resources names --config fr --type string $apk); do
  v=$(apkanalyzer resources value --config fr --type string --name "$n" $apk)
  echo "  <string name=\"$n\">$v</string>"
done
echo '</resources>'

Fast and dependency-free, but each call pays a JVM startup (~1s), so it's best for a few strings or small apps. (apkanalyzer docs)

2. apktool (proper XML output, decodes everything)

bash
apktool d -f app.apk -o out
cat out/res/values-fr/strings.xml

Slower on large APKs (it decodes all resources + smali), but you get the real XML file with escapes and plurals handled, and you can delete out/ afterwards. Add -s to skip sources if you only want resources.

For a one-off single string, use option 1; if you need the actual faithful strings.xml (plurals, arrays, escaped entities), option 2 is the reliable route.

Nov 14, 10:05pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more