Last active
August 29, 2015 14:05
-
-
Save walac/a2f6ef466d422c5dbcdb to your computer and use it in GitHub Desktop.
Dump the breakpad symbols for fxos phones shared objects under /system/lib and check if they match to the generated by the buildsymbols command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN { | |
CRASHSYMBOLS = "~/work/B2G/objdir-debug/dist/crashreporter-symbols/" | |
} | |
{ | |
if (system("test -d "CRASHSYMBOLS $2) == 0) { | |
if (system("test -d "CRASHSYMBOLS $2"/"$1) == 0) { | |
print $2" ok" | |
} else { | |
"ls " CRASHSYMBOLS $2"/" | getline id | |
print "The ids for "$2" don't match: "$1 " "id | |
} | |
} | |
} | |
~ | |
~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
dump_ids() { | |
for i in $(adb shell ls "$1" | sed 's/\r$//'); do | |
if [ $(adb shell "test -d \"$1\"/\"$i\"; echo \$?" | sed 's/\r$//') == "0" ]; then | |
dump_ids "$1"/"$i" | |
elif echo $i | grep '.*\.so' > /dev/null; then | |
adb pull "$1"/"$i" /tmp/"$i" > /dev/null 2>&1 | |
id=$(dump_syms /tmp/"$i" 2> /dev/null | grep MODULE | awk '{print $4}') | |
rm -f /tmp/"$i" | |
echo $id $i | |
fi | |
done | |
} | |
dump_ids /system/lib |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment