RMMSecurity / dex2jar

Automatically exported from code.google.com/p/dex2jar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not decode /system/framework/framework.jar

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. ./d2j-dex2jar.sh framework.jar 

What is the expected output? What do you see instead?
dex2jar framework.jar -> framework-dex2jar.jar
Error:Landroid/net/VpnService;.protect(I)Z->null
Detail Error Information in File framework-error.zip
Please report this file to http://code.google.com/p/dex2jar/issues/entry if 
possible.


What version of the product are you using? On what operating system?
dex2jar-0.0.9.12-a

Please upload the file which cause the issue if possible.
sorry, I can't upload the framwork.jar,for business secret including.

Please provide any additional information below.

contents of summary.txt:
version: reader-1.13, translator-0.0.9.12, ir-1.10
there are 1 error methods
options: 

contents of t0.txt:
java.lang.NullPointerException
    at com.googlecode.dex2jar.ir.ts.BaseLiveAnalyze.use(BaseLiveAnalyze.java:115)
    at com.googlecode.dex2jar.ir.ts.BaseLiveAnalyze$1.exec(BaseLiveAnalyze.java:168)
    at com.googlecode.dex2jar.ir.ts.BaseLiveAnalyze$1.exec(BaseLiveAnalyze.java:154)
    at com.googlecode.dex2jar.ir.ts.Cfg.Forward(Cfg.java:271)
    at com.googlecode.dex2jar.ir.ts.BaseLiveAnalyze.analyze0(BaseLiveAnalyze.java:154)
    at com.googlecode.dex2jar.ir.ts.BaseLiveAnalyze.analyze(BaseLiveAnalyze.java:74)
    at com.googlecode.dex2jar.ir.ts.ZeroTransformer.transform(ZeroTransformer.java:157)
    at com.googlecode.dex2jar.v3.V3MethodAdapter.visitEnd(V3MethodAdapter.java:220)
    at com.googlecode.dex2jar.v3.V3ClassAdapter$2.visitEnd(V3ClassAdapter.java:317)
    at com.googlecode.dex2jar.reader.DexFileReader.acceptMethod(DexFileReader.java:696)
    at com.googlecode.dex2jar.reader.DexFileReader.acceptClass(DexFileReader.java:446)
    at com.googlecode.dex2jar.reader.DexFileReader.accept(DexFileReader.java:328)
    at com.googlecode.dex2jar.v3.Dex2jar.doTranslate(Dex2jar.java:84)
    at com.googlecode.dex2jar.v3.Dex2jar.to(Dex2jar.java:239)
    at com.googlecode.dex2jar.v3.Dex2jar.to(Dex2jar.java:230)
    at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:107)
    at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:168)
    at com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:34)

DexMethodVisitor mv=cv.visitMethod(ACC_PUBLIC, new 
Method("Landroid/net/VpnService;","protect",new String[]{ "I"},"Z"));
DexCodeVisitor code = mv.visitCode();
code.visitArguments(6,new int[]{ 4,5});
DexLabel L0=new DexLabel();
DexLabel L1=new DexLabel();
DexLabel L2=new DexLabel();
code.visitTryCatch(L0,L1,L2,"Ljava/lang/Exception;");
DexLabel L3=new DexLabel();
code.visitTryCatch(L0,L1,L3,null);
DexLabel L4=new DexLabel();
DexLabel L5=new DexLabel();
DexLabel L6=new DexLabel();
code.visitTryCatch(L4,L5,L6,"Ljava/lang/Exception;");
DexLabel L7=new DexLabel();
DexLabel L8=new DexLabel();
DexLabel L9=new DexLabel();
code.visitTryCatch(L7,L8,L9,"Ljava/lang/Exception;");
code.visitConstStmt(OP_CONST,0, Integer.valueOf(0),TYPE_SINGLE); // int: 
0x00000000  float:0.000000
code.visitLabel(L0);
code.visitMethodStmt(OP_INVOKE_STATIC,new int[]{ 5},new 
Method("Landroid/os/ParcelFileDescriptor;","fromFd",new String[]{ 
"I"},"Landroid/os/ParcelFileDescriptor;"));
code.visitMoveStmt(OP_MOVE_RESULT,0,TYPE_OBJECT);
code.visitMethodStmt(OP_INVOKE_STATIC,new int[]{ },new 
Method("Landroid/net/VpnService;","getService",new String[]{ 
},"Landroid/net/IConnectivityManager;"));
code.visitMoveStmt(OP_MOVE_RESULT,2,TYPE_OBJECT);
code.visitMethodStmt(OP_INVOKE_INTERFACE,new int[]{ 2,0},new 
Method("Landroid/net/IConnectivityManager;","protectVpn",new String[]{ 
"Landroid/os/ParcelFileDescriptor;"},"Z"));
code.visitLabel(L1);
code.visitMoveStmt(OP_MOVE_RESULT,2,TYPE_SINGLE);
code.visitLabel(L4);
code.visitMethodStmt(OP_INVOKE_VIRTUAL,new int[]{ 0},new 
Method("Landroid/os/ParcelFileDescriptor;","close",new String[]{ },"V"));
DexLabel L10=new DexLabel();
code.visitLabel(L10);
code.visitReturnStmt(OP_RETURN,2,TYPE_SINGLE);
code.visitLabel(L2);
code.visitMoveStmt(OP_MOVE_EXCEPTION,1,TYPE_OBJECT);
code.visitConstStmt(OP_CONST,2, Integer.valueOf(0),TYPE_SINGLE); // int: 
0x00000000  float:0.000000
code.visitMethodStmt(OP_INVOKE_VIRTUAL,new int[]{ 0},new 
Method("Landroid/os/ParcelFileDescriptor;","close",new String[]{ },"V"));
code.visitLabel(L5);
code.visitJumpStmt(OP_GOTO,L10);
code.visitLabel(L6);
code.visitMoveStmt(OP_MOVE_EXCEPTION,3,TYPE_OBJECT);
code.visitJumpStmt(OP_GOTO,L10);
code.visitLabel(L3);
code.visitMoveStmt(OP_MOVE_EXCEPTION,2,TYPE_OBJECT);
code.visitLabel(L7);
code.visitMethodStmt(OP_INVOKE_VIRTUAL,new int[]{ 0},new 
Method("Landroid/os/ParcelFileDescriptor;","close",new String[]{ },"V"));
code.visitLabel(L8);
code.visitReturnStmt(OP_THROW,2,TYPE_OBJECT);
code.visitLabel(L9);
code.visitMoveStmt(OP_MOVE_EXCEPTION,3,TYPE_OBJECT);
code.visitJumpStmt(OP_GOTO,L8);
code.visitEnd();
mv.visitEnd();

Original issue reported on code.google.com by lux...@gmail.com on 21 Dec 2012 at 7:57

My issue is identical to this, the version of the app is the same and the 
contents of my t0.txt is exactly the same (checked in winmerge)

What I have done is get framework.odex from my 4.2.1 Jellybean Phone.

Use baksmali to convert from odex to smali
Use smali to convert from smali to dex
Use d2j-dex2jar to convert from dex to jar.

No intermidiarty edits just from one to the next.

dex2jar-0.0.9.12-a
Windows 7 (64 bit)
Java SE 1.7.0_07-b10
baksmali 1.4.1
smali 1.4.1

Original comment by john.g...@appogee.co.uk on 4 Jan 2013 at 11:08

My issue is identical too.

With previous versions of Android work, but with 4.2.1 Jellybean API 17 it's 
imposible.

Original comment by costap...@gmail.com on 15 Jan 2013 at 4:57