@@ -120,7 +120,9 @@ private static void cmdDecode(String[] args) throws InvalidArgsError,
120
120
decoder .setKeepBrokenResources (true );
121
121
} else if ("--frame-path" .equals (opt )) {
122
122
i ++;
123
- System .out .println ("Using Framework Directory: " + args [i ]);
123
+ if (i >= args .length ) {
124
+ throw new InvalidArgsError ();
125
+ }
124
126
decoder .setFrameworkDir (args [i ]);
125
127
} else {
126
128
throw new InvalidArgsError ();
@@ -172,6 +174,8 @@ private static void cmdDecode(String[] args) throws InvalidArgsError,
172
174
173
175
private static void cmdBuild (String [] args ) throws BrutException {
174
176
177
+ Androlib instance = new Androlib ();
178
+
175
179
// hold all the fields
176
180
HashMap <String , Boolean > flags = new HashMap <String , Boolean >();
177
181
flags .put ("forceBuildAll" , false );
@@ -199,6 +203,9 @@ private static void cmdBuild(String[] args) throws BrutException {
199
203
} else if ("-a" .equals (opt ) || "--aapt" .equals (opt )) {
200
204
mAaptPath = args [i + 1 ];
201
205
skip = 1 ;
206
+ } else if ("--frame-path" .equals (opt )) {
207
+ i ++;
208
+ instance .setFrameworkFolder (args [i ]);
202
209
} else if ("-o" .equals (opt ) || "--original" .equals (opt )) {
203
210
if (args .length >= 4 ) {
204
211
throw new InvalidArgsError ();
@@ -227,7 +234,7 @@ private static void cmdBuild(String[] args) throws BrutException {
227
234
throw new InvalidArgsError ();
228
235
}
229
236
230
- new Androlib () .build (new File (appDirName ), outFile , flags , mOrigApk ,
237
+ instance .build (new File (appDirName ), outFile , flags , mOrigApk ,
231
238
mAaptPath );
232
239
}
233
240
@@ -331,6 +338,8 @@ private static void usage() {
331
338
+ " Build in debug mode. Check project page for more info.\n "
332
339
+ " -a, --aapt\n "
333
340
+ " Loads aapt from specified location.\n "
341
+ + " --frame-path <dir>\n "
342
+ + " Use the specified directory for framework files\n "
334
343
+ "\n "
335
344
+ " if|install-framework <framework.apk> [<tag>] --frame-path [<location>] \n "
336
345
+ " Install framework file to your system.\n "
0 commit comments