remove DexFileBuilder, due to dexlib2

This commit is contained in:
Connor Tumbleson 2013-08-13 08:42:27 -05:00
parent a4ac131479
commit 3acff3ef34

View File

@ -1,73 +0,0 @@
/**
* Copyright 2011 Ryszard Wiśniewski <brut.alll@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package brut.androlib.src;
/**
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
*/
public class DexFileBuilder {
// public void addSmaliFile(File smaliFile, DexBuilder dexBuilder) throws AndrolibException {
// try {
// addSmaliFile(new FileInputStream(smaliFile), smaliFile, smaliFile.getAbsolutePath(), dexBuilder);
// } catch (FileNotFoundException ex) {
// throw new AndrolibException(ex);
// }
// }
//
// public void addSmaliFile(InputStream smaliStream,File smaliFile, String name, DexBuilder dexBuilder)
// throws AndrolibException {
// try {
// if (!SmaliMod.assembleSmaliFile(smaliStream, smaliFile, name, dexBuilder, false, false)) {
// throw new AndrolibException("Could not smali file: " + name);
// }
// } catch (IOException ex) {
// throw new AndrolibException(ex);
// } catch (RecognitionException ex) {
// throw new AndrolibException(ex);
// }
// }
//
// public void writeTo(File dexFile) throws AndrolibException {
// try {
// OutputStream out = new FileOutputStream(dexFile);
// out.write(getAsByteArray());
// out.close();
// } catch (IOException ex) {
// throw new AndrolibException("Could not write dex to file: "
// + dexFile, ex);
// }
// }
//
// public byte[] getAsByteArray() {
// mDexFile.place();
// for (CodeItem codeItem : mDexFile.CodeItemsSection.getItems()) {
// codeItem.fixInstructions(true, true);
// }
//
// mDexFile.place();
//
// ByteArrayAnnotatedOutput out = new ByteArrayAnnotatedOutput();
// mDexFile.writeTo(out);
// byte[] bytes = out.toByteArray();
//
// DexFile.calcSignature(bytes);
// DexFile.calcChecksum(bytes);
//
// return bytes;
// }
}