Skip to content

Instantly share code, notes, and snippets.

@sakuramilk
Created July 24, 2012 09:15
Show Gist options
  • Save sakuramilk/3169024 to your computer and use it in GitHub Desktop.
Save sakuramilk/3169024 to your computer and use it in GitHub Desktop.
deodex_system_and_framework.plのパッチ
--- deodex_system_and_framework.pl 2012-07-24 18:14:04.308579718 +0900
+++ deodex_system_and_framework.pl.new 2012-07-24 18:14:01.340579711 +0900
@@ -119,8 +119,10 @@
}
foreach my $files (@deodex_list) {
- baksmali($target_dir, $files->[0], $files->[1]);
- smali($target_dir, $files->[0]) unless ($only_baksmali);
+ my $ret = &baksmali($target_dir, $files->[0], $files->[1]);
+ if ($ret eq 0) {
+ smali($target_dir, $files->[0]) unless ($only_baksmali);
+ }
print "\n\n";
}
@@ -138,7 +140,7 @@
foreach my $ignore_file (@ignore_list) {
if ($ignore_file eq $odex_file) {
print "ignore : $odex_file\n";
- return;
+ return -1;
}
}
@@ -149,13 +151,14 @@
if (-d "$smali_specific_out_dir/$base") {
print "skip : $odex_file\n";
- return;
+ return -1;
}
if (system("baksmali -a 15 -d $system_dir/framework -c $boot_class_path -x $target_dir/$odex_file -o $smali_specific_out_dir/$base")) {
system("rm -rf $smali_specific_out_dir/$base");
die "baksmali failed : $target_dir/$odex_file";
}
+ return 0;
}
sub smali {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment