Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

Commit 1a532a3

Browse files
committed
Add a script to diff between AOSP config.xml and device decompiled framework-res
1 parent 800e5f7 commit 1a532a3

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

overlay/differ.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
configXml="$1"
4+
xmlFiles="$(ls *.xml |grep -vF public.xml)"
5+
for key in $(xmlstarlet sel -t -m '//*[@name]' -v ./@name -n "$configXml" );do
6+
xmlstarlet sel -t -m '//*[@name="'$key'"]' -c . -n "$configXml" | \
7+
sed -e 's/xmlns:xliff="[^"]*"//g' |\
8+
sed -e 's/translatable="false"//g' |\
9+
sed -e 's/string-array/array/g' | \
10+
xmlstarlet c14n > AOSP
11+
xmlstarlet sel -t -m '//*[@name="'$key'"]' -c . -n $xmlFiles| \
12+
sed -e 's/string-array/array/g' | \
13+
xmlstarlet c14n > ROM
14+
echo >> AOSP
15+
echo >> ROM
16+
if [ "$(md5sum < AOSP)" != "$(md5sum < ROM)" ];then
17+
echo "Got key = $key"
18+
diff -B AOSP ROM
19+
fi
20+
done

0 commit comments

Comments
 (0)