How to get class file from APK

by Mr RAM » Fri, 20 May 2011 09:42:22 GMT

Sponsored Links
 Is it possible to get class file from APK.??


Re: How to get class file from APK

by Zsolt Vasvari » Fri, 20 May 2011 10:16:07 GMT

 We just had a guy named "Hariram" ask the same thing.  Maybe you
should contact him and see if he solved the problem?


Sponsored Links

Re: How to get class file from APK

by B Lyon » Fri, 20 May 2011 10:51:45 GMT

 pretty sure it's just a zip file, so that should get you going


Re: How to get class file from APK

by Mr RAM » Fri, 20 May 2011 12:31:12 GMT

 Nope still i dint resolve the problem. Do you..???


Re: Re: How to get class file from APK

by Hitendrasinh Gohil » Fri, 20 May 2011 12:45:46 GMT


you have to first convert the .apk file to .jar file(.dex to .class).from
.class file u can get .java files.
just visit this link 

And if u find any other good tool than pls tell me.

Hitendrasinh Gohil


Other Threads

1. What parameters are needed send C2DM messages?

I am writing the third party application server part of the C2DM
messages. I've signed up and have the following:
sender_id =
application_id = mycompany.test

Using the above two pieces of information I can register on the mobile
and can send the registration id to my application sever. Now, to send
a message to the device through google server
I have the data for parameters: registration_id, data, etc.

My question is how do I get the client login auth information
(GoogleLogin auth) that is needed in the header? Should the mobile
application collect user information and get the login auth
information on the phone and send it to the third party server? Or
should the mobile application user send the Google credentials to the
third party server and the server stores it? Or is there any other

Also, what should be in the collapse_key?


2. OpenGL textures fail to load, white image


I've been having an interesting problem with a game I'm developing.

The game is being built using the cocos2d-android-1 library.

All sprites are loaded from ARGB8888 files.  They are of varying size
(not powers of 2).

When I deploy a test build to my Nexus One after making any code
changes (anything that forces the device to redeploy the APK) all the
sprites show up just fine.  Alpha shows up correctly, etc.

If I rerun the application from my N1, it will be missing some or all
of the textures at random.  Occasionally this is my splash screen
sprite.  Sometimes it is sprites of individual items on the screen.
There doesn't seem to be any rhyme or reason as to what sprites are
rendered and which are not.  All the items move and behave correctly,
but the sprites have been rendered with white textures.

If I reboot my phone, the game loads fine for the initial play
through, but subsequent play throughs have the bug again.

Now I've done some research and it looks like some people had issues
using non-power of 2 images for openGL textures.  However this doesn't
explain why my non-power of 2 textures render fine on the first
passthrough, and fail on subsequent passthroughs.

Also I've noticed that this problem seems to occur more often when I
have the application loading images from the sdcard.  If I load the
images from the assets folder and use the AssetManager I don't run
into the issue as much, although I did see it very rarely.

Is there some type of file locking going on here that is preventing
subsequent playthroughs from accessing the image file?  When a bitmap
is loaded, does it prevent other applications from reading the image
file while it's in use?

I'm going to try using sprite sheets and/or switching everything to
use powers of 2, but I'm not sure if that will fix it.  I swear it is
something wrong with how the files are loaded (asset folder vs folder
on sdcard) that is prevent subsequent playthroughs from correctly
loading the texture.

This is the code I'm using to read in the files:

        private static HashMap<String, CCTexture2D> textureMappings = new
HashMap<String, CCTexture2D>();
        public static final CCTexture2D addTexture(String filePath) {
                if(filePath.contains("../")) {
                        return null;
                CCTexture2D rtn = textureMappings.get(filePath);
                if (rtn == null) {
                        String path = Constants.DEFAULT_PATH  + filePath;
                        File f = new File(path);
                        if (f.exists()) {
                                Bitmap bmp = 
BitmapFactory.decodeFile(Constants.DEFAULT_PATH +
                                rtn = new CCTexture2D(bmp);
                                textureMappings.put(filePath, rtn);
                return rtn;

This is the constructor for CCTexture2D:

    public CCTexture2D(Bitmap image) {

        CGSize imageSize = CGSize.make(image.getWidth(),
        CGAffineTransform transform = CGAffineTransform.identity();

        int width = toPow2((int) imageSize.width);
        int height = toPow2((int) imageSize.height);

        while (width > kMaxTextureSize || height > kMaxTextureSize) {
            width /= 2;
            height /= 2;
            transform = transform.getTransformScale(0.5f, 0.5f);
            imageSize.width *= 0.5f;
            imageSize.height *= 0.5f;

        if (imageSize.width != width || imageSize.height != height) {
            Bitmap bitmap = Bitmap.createBitmap(width, height,
                    image.hasAlpha() ? Bitmap.Config.ARGB_8888 :
            Canvas canvas = new Canvas(bitmap);
            canvas.drawBitmap(image, 0, 0, null);
            image = bitmap;

        init(image, imageSize);

This is what happens in init:

    private void init(Bitmap image, CGSize imageSize) {
        mBitmap = image;

        mWidth = image.getWidth();
        mHeight = image.getHeight();
        mContentSize = imageSize;
        // _format = image.getConfig();
        _maxS = mContentSize.width / (float) mWidth;
        _maxT = mContentSize.height / (float) mHeight;
        _texParams = _gTexParams;
        ByteBuffer vfb = ByteBuffer.allocateDirect(4 * 3 * 4);
        mVertices = vfb.asFloatBuffer();

        ByteBuffer tfb = ByteBuffer.allocateDirect(4 * 2 * 4);
        mCoordinates = tfb.asFloatBuffer();

                if(mBitmap.getConfig() == Bitmap.Config.ARGB_8888)
                        premultipliedAlpha = true;


3. test app in a inactive cell phone

4. When to use an IntentService vs. Service

5. Can Main Activity be conditionally shown based on app launch method?

6. [WTHelp] HTC Magic Stuck di logo android

7. AlertDialog error with events