Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*jadclipse*/// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
- // Jad home page: http://www.geocities.com/kpdus/jad.html
- // Decompiler options: packimports(3) radix(10) lradix(10)
- package com.android.hiddenmenu;
- import android.app.Activity;
- import android.content.Context;
- import android.os.*;
- import android.util.Log;
- import android.view.View;
- import android.widget.Button;
- import android.widget.Toast;
- import com.android.internal.telephony.Phone;
- import com.android.internal.telephony.PhoneFactory;
- import java.io.*;
- import java.nio.ByteBuffer;
- public class Prl_Write extends Activity
- {
- public Prl_Write()
- {
- PRL_File = null;
- phone = null;
- prl_length = 0;
- fileSize = 0;
- prlbytedata = null;
- dstbyteArray = null;
- mHandler = new Handler() {
- public void handleMessage(Message message)
- {
- super.handleMessage(message);
- message.what;
- JVM INSTR tableswitch 9999980 9999980: default 28
- // 9999980 29;
- goto _L1 _L2
- _L1:
- return;
- _L2:
- AsyncResult asyncresult;
- Log.i("Prl_Write", (new StringBuilder()).append("OMADM PRL IPC response received : ").append(message).toString());
- asyncresult = (AsyncResult)message.obj;
- if(asyncresult != null) goto _L4; else goto _L3
- _L3:
- Log.i("Prl_Write", "No AsyncResult for PRL IPC");
- _L5:
- Log.i("Prl_Write", (new StringBuilder()).append("bytesWritten : ").append(bytesWritten).toString());
- if(bytesWritten < prl_length)
- {
- int i = prl_length - bytesWritten;
- int j;
- byte abyte0[];
- ByteArrayOutputStream bytearrayoutputstream;
- DataOutputStream dataoutputstream;
- if(i > 200)
- {
- i = 200;
- j = 1;
- } else
- {
- j = 0;
- }
- abyte0 = new byte[i];
- prlbytedata.get(abyte0, 0, abyte0.length);
- bytearrayoutputstream = new ByteArrayOutputStream();
- dataoutputstream = new DataOutputStream(bytearrayoutputstream);
- try
- {
- fileSize = 8 + abyte0.length;
- Log.i("Prl_Write", (new StringBuilder()).append("bytesWritten : ").append(bytesWritten).append(" / dstArray.length : ").append(abyte0.length).append(" / more : ").append(j).append(" /filesize : ").append(fileSize).toString());
- dataoutputstream.writeByte(10);
- dataoutputstream.writeByte(28);
- dataoutputstream.writeShort(fileSize);
- dataoutputstream.writeShort(prl_length);
- dataoutputstream.writeByte(abyte0.length);
- dataoutputstream.writeByte(j);
- dataoutputstream.write(abyte0);
- phone.invokeOemRilRequestRaw(bytearrayoutputstream.toByteArray(), mHandler.obtainMessage(9999980));
- Prl_Write prl_write = Prl_Write.this;
- prl_write.bytesWritten = prl_write.bytesWritten + abyte0.length;
- }
- catch(FileNotFoundException filenotfoundexception)
- {
- filenotfoundexception.printStackTrace();
- Toast.makeText(getBaseContext(), "Fail to send TEST PRL file", 0).show();
- }
- catch(IOException ioexception)
- {
- ioexception.printStackTrace();
- }
- } else
- {
- rebootDevice();
- }
- if(true) goto _L1; else goto _L4
- _L4:
- if(asyncresult.exception != null)
- Log.i("Prl_Write", (new StringBuilder()).append("AsyncResult Exception for PRL IPC : ").append(asyncresult.exception).toString());
- if(asyncresult.result == null)
- Log.i("Prl_Write", (new StringBuilder()).append("No answer for PRL IPC").append(asyncresult).toString());
- goto _L5
- }
- final Prl_Write this$0;
- {
- this$0 = Prl_Write.this;
- super();
- }
- };
- }
- private void rebootDevice()
- {
- Log.i("Prl_Write", " - reboot Device");
- ((PowerManager)getSystemService("power")).reboot(null);
- }
- public void check_prlfile_insdcard()
- {
- PRL_File = new File("/sdcard/TEST.prl");
- prl_length = (int)PRL_File.length();
- if(PRL_File.exists())
- copyPRLFile();
- else
- Toast.makeText(getBaseContext(), "There is no TEST PRL file in SDcard", 0).show();
- finish();
- }
- public void copyPRLFile()
- {
- in = new FileInputStream("/sdcard/TEST.prl");
- prlbytedata = ByteBuffer.allocate(16384);
- dstbyteArray = prlbytedata.array();
- prl_length = in.read(dstbyteArray);
- if(prllength < 0)
- throw new IOException();
- goto _L1
- FileNotFoundException filenotfoundexception;
- filenotfoundexception;
- filenotfoundexception.printStackTrace();
- Toast.makeText(getBaseContext(), "Fail to send TEST PRL file", 0).show();
- _L2:
- return;
- _L1:
- int i;
- byte abyte0[];
- Log.i("Prl_Write", (new StringBuilder()).append("prl_length:").append(prl_length).toString());
- bytesWritten = 0;
- i = 1;
- if(prl_length > 200)
- break MISSING_BLOCK_LABEL_352;
- abyte0 = new byte[prl_length];
- i = 0;
- _L3:
- prlbytedata.get(abyte0, 0, abyte0.length);
- ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
- DataOutputStream dataoutputstream = new DataOutputStream(bytearrayoutputstream);
- fileSize = 8 + abyte0.length;
- Log.i("Prl_Write", (new StringBuilder()).append("bytesWritten : ").append(bytesWritten).append(" / dstArray.length : ").append(abyte0.length).append(" / more : ").append(i).append(" /filesize : ").append(fileSize).toString());
- dataoutputstream.writeByte(10);
- dataoutputstream.writeByte(28);
- dataoutputstream.writeShort(fileSize);
- dataoutputstream.writeShort(prl_length);
- dataoutputstream.writeByte(abyte0.length);
- dataoutputstream.writeByte(i);
- dataoutputstream.write(abyte0);
- phone.invokeOemRilRequestRaw(bytearrayoutputstream.toByteArray(), mHandler.obtainMessage(9999980));
- bytesWritten = bytesWritten + abyte0.length;
- in.close();
- goto _L2
- IOException ioexception;
- ioexception;
- ioexception.printStackTrace();
- goto _L2
- abyte0 = new byte[200];
- goto _L3
- }
- public void onCreate(Bundle bundle)
- {
- super.onCreate(bundle);
- setContentView(2130903059);
- Button button = (Button)findViewById(2131165240);
- phone = PhoneFactory.getDefaultPhone();
- if(button == null)
- finish();
- else
- button.setOnClickListener(new android.view.View.OnClickListener() {
- public void onClick(View view)
- {
- check_prlfile_insdcard();
- }
- final Prl_Write this$0;
- {
- this$0 = Prl_Write.this;
- super();
- }
- });
- }
- private static final int MAX_PRL_SIZE = 16384;
- static final int OEM_FUNCTION_ID_OMADM = 10;
- static final int OEM_OMADM_WRITE_PRL = 28;
- private static final int OMADM_PRL_RESP = 9999980;
- private static final String PRL_FILE_PATH = "/sdcard/TEST.prl";
- private static final String TAG = "Prl_Write";
- private static Context mContext = null;
- private File PRL_File;
- int bytesWritten;
- byte dstbyteArray[];
- int fileSize;
- private FileInputStream in;
- private Handler mHandler;
- private Phone phone;
- private int prl_length;
- ByteBuffer prlbytedata;
- int prllength;
- }
- /*
- DECOMPILATION REPORT
- Decompiled from: /home/bigrushdog/dex2jar_apks/HiddenMenu-dex2jar.jar
- Total time: 6 ms
- Jad reported messages/errors:
- The class file version is 50.0 (only 45.3, 46.0 and 47.0 are supported)
- The class file version is 50.0 (only 45.3, 46.0 and 47.0 are supported)
- The class file version is 50.0 (only 45.3, 46.0 and 47.0 are supported)
- Couldn't fully decompile method handleMessage
- Couldn't fully decompile method copyPRLFile
- Couldn't resolve all exception handlers in method copyPRLFile
- Exit status: 0
- Caught exceptions:
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement