Gaming Console with Lollipop? Ouya Gets an Android TV Port

Android is a very flexible platform, and it can be used on a large variety of … more

Android App Review: Manage Your Connections Automagically – XDA TV

Material Design is all the buzz in the Android world right now. … more

Official TWRP Recovery Lands on Micromax Canvas Magnus

With the recent release of Android One, Micromax and MediaTek released fully buildable … more

Update Overload: SuperSU Heavily Updated

There are apps and apps out there. Very few can reach the level of popularity required to stay at … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

How to modify/add to Android App Source code?

OP xdarkmario

14th May 2014, 12:10 AM   |  #1  
xdarkmario's Avatar
OP Senior Member
Thanks Meter: 312
 
1,108 posts
Join Date:Joined: Mar 2011
More
ok so im trying to learn to compile android apps from source code and my first project is a forgotten android emulator called n64oid. I Want to add or port the touchpad implementation from Mupen64 AE.why you might ask? Well in n64oid the touchpads work in ICS but not at all in GB.

i find n64oid to be the most stable and fast 64 emulator out there but the touchpads dont work in GB

So i either do One of the following
  • Downport the excising n64oid ICS Touchpad in support to GB
  • Port the mupen64 AE touchpad support to n64oid
  • Add the touchpad support to n64oid GB
6th June 2014, 09:12 AM   |  #2  
xdarkmario's Avatar
OP Senior Member
Thanks Meter: 312
 
1,108 posts
Join Date:Joined: Mar 2011
More
bump.
6th June 2014, 04:42 PM   |  #3  
TheScriptKitty's Avatar
Senior Member
Flag Mexico City
Thanks Meter: 205
 
278 posts
Join Date:Joined: Dec 2013
Donate to Me
More
Info 2 Procedure for decoding .apk files, step-by-step method
Quote:
Originally Posted by xdarkmario

ok so im trying to learn to compile android apps from source code and my first project is a forgotten android emulator called n64oid. I Want to add or port the touchpad implementation from Mupen64 AE.why you might ask? Well in n64oid the touchpads work in ICS but not at all in GB.

i find n64oid to be the most stable and fast 64 emulator out there but the touchpads dont work in GB

So i either do One of the following

  • Downport the excising n64oid ICS Touchpad in support to GB
  • Port the mupen64 AE touchpad support to n64oid
  • Add the touchpad support to n64oid GB



Procedure for decoding .apk files, step-by-step method:

Step 1:

Make a new folder and put .apk file in it (which you want to decode). Now rename the extension of this .apk file to .zip (eg.: rename from filename.apk to filename.zip) and save it. Now you get classes.dex files, etc. At this stage you are able to see drawable but not xml and java files, so continue.

Step 2:

Now extract this zip apk file in the same folder (or NEW FOLDER). Now download dex2jar from this link http://code.google.com/p/dex2jar/ and extract it to the same folder (or NEW FOLDER). Move the classes.dex file into the dex2jar folder. Now open command prompt and change directory to that folder (or NEW FOLDER). Then write dex2jar classes.dex and press enter. Now you get classes.dex.dex2jar file in the same folder. Then download java decompiler from http://jd.benow.ca/ and now double click on jd-gui and click on open file. Then open classes.dex.dex2jar file from that folder. Now you get class files and save all these class files (click on file then click "save all sources" in jd-gui) by src name. At this stage you get java source but the xml files are still unreadable, so continue.

Step 3:

Now open another new folder and put these files
  1. put .apk file which you want to decode
  2. download apktool v1.x AND apktool install window (both can be downloaded at the same location) and put in the same folder
  3. download framework-res.apk file and put in the same folder (Not all apk file need framework-res.apk file)
  4. Open a command window
  5. Navigate to the root directory of APKtool and type the following command: apktool if framework-res.apk
  6. apktool d "fname".apk ("fname" denotes filename which you want to decode)
now you get a file folder in that folder and now you can easily read xml files also.

Step 4:

It's not any step just copy contents of both folder(in this case both new folder)to the single oneand now enjoy with source code...

Google is your friend...

Procedure for decoding .apk files, step-by-step method
Last edited by TheScriptKitty; 6th June 2014 at 04:48 PM.
6th June 2014, 08:38 PM   |  #4  
xdarkmario's Avatar
OP Senior Member
Thanks Meter: 312
 
1,108 posts
Join Date:Joined: Mar 2011
More
Quote:
Originally Posted by TheScriptKitty

Procedure for decoding .apk files, step-by-step method:

Step 1:

Make a new folder and put .apk file in it (which you want to decode). Now rename the extension of this .apk file to .zip (eg.: rename from filename.apk to filename.zip) and save it. Now you get classes.dex files, etc. At this stage you are able to see drawable but not xml and java files, so continue.

Step 2:

Now extract this zip apk file in the same folder (or NEW FOLDER). Now download dex2jar from this link http://code.google.com/p/dex2jar/ and extract it to the same folder (or NEW FOLDER). Move the classes.dex file into the dex2jar folder. Now open command prompt and change directory to that folder (or NEW FOLDER). Then write dex2jar classes.dex and press enter. Now you get classes.dex.dex2jar file in the same folder. Then download java decompiler from http://jd.benow.ca/ and now double click on jd-gui and click on open file. Then open classes.dex.dex2jar file from that folder. Now you get class files and save all these class files (click on file then click "save all sources" in jd-gui) by src name. At this stage you get java source but the xml files are still unreadable, so continue.

Step 3:

Now open another new folder and put these files

  1. put .apk file which you want to decode
  2. download apktool v1.x AND apktool install window (both can be downloaded at the same location) and put in the same folder
  3. download framework-res.apk file and put in the same folder (Not all apk file need framework-res.apk file)
  4. Open a command window
  5. Navigate to the root directory of APKtool and type the following command: apktool if framework-res.apk
  6. apktool d "fname".apk ("fname" denotes filename which you want to decode)
now you get a file folder in that folder and now you can easily read xml files also.

Step 4:

It's not any step just copy contents of both folder(in this case both new folder)to the single oneand now enjoy with source code...

Google is your friend...

Procedure for decoding .apk files, step-by-step method

thats nice and all but i already know how to deconpile/ reconpile. + i have the source codes i need to add touchpad support to n64oid on GB
7th June 2014, 05:54 AM   |  #5  
TheScriptKitty's Avatar
Senior Member
Flag Mexico City
Thanks Meter: 205
 
278 posts
Join Date:Joined: Dec 2013
Donate to Me
More
Info 2 Xperia™ PLAY touch pad tutorial
Quote:
Originally Posted by xdarkmario

thats nice and all but i already know how to deconpile/ reconpile. + i have the source codes i need to add touchpad support to n64oid on GB





Xperia™ PLAY touch pad tutorial


Google is your friend
7th June 2014, 06:08 AM   |  #6  
xdarkmario's Avatar
OP Senior Member
Thanks Meter: 312
 
1,108 posts
Join Date:Joined: Mar 2011
More
oh boy i was trying to avoid that, i can tell this wont be easy at all. well time to study up.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes