updating JesusFreke's smali/baksmali. Fixed SmaliMod to handle removal of smaliLexer.

This commit is contained in:
Connor Tumbleson
2012-10-08 18:50:34 -05:00
parent 008e1004c2
commit 689e0e59a6
35 changed files with 2446 additions and 3079 deletions

View File

@ -465,6 +465,7 @@ public class Androlib {
// add res folder
editOrig.addFolder(new File(appDir, APK_DIRNAME + "/res").getAbsolutePath(), parameters);
System.out.println("file: " + new File(appDir, APK_DIRNAME + "/res").getAbsolutePath());
// add assets, if there
if (assetDir != null) {

View File

@ -38,26 +38,17 @@ public class SmaliMod {
boolean lexerErrors = false;
LexerErrorInterface lexer;
if (oldLexer) {
ANTLRInputStream input = new ANTLRInputStream(smaliStream, "UTF-8");
input.name = name;
InputStreamReader reader = new InputStreamReader(smaliStream, "UTF-8");
lexer = new smaliLexer(input);
tokens = new CommonTokenStream((TokenSource)lexer);
} else {
InputStreamReader reader =
new InputStreamReader(smaliStream, "UTF-8");
lexer = new smaliFlexLexer(reader);
tokens = new CommonTokenStream((TokenSource)lexer);
}
lexer = new smaliFlexLexer(reader);
tokens = new CommonTokenStream((TokenSource)lexer);
if (printTokens) {
tokens.getTokens();
for (int i=0; i<tokens.size(); i++) {
Token token = tokens.get(i);
if (token.getChannel() == smaliLexer.HIDDEN) {
if (token.getChannel() == smaliParser.HIDDEN) {
continue;
}