New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
dimitri407
Old
#1  
Senior Member - OP
Thanks Meter 20
Posts: 213
Join Date: Jun 2007
Default Decompiling framework-res.apk?

I am trying to decompile the framework-res.apk file with APK Manager. But it's not working. When I did this with the DX, I had to use a dependee apk file (moto-res.apk) to be able to decompile without error but I can't seem to find the write file to use. Does anyone know if there is a dependee file or should I just be able to decompile it? Don't know if the Apk Manager 4.9 will actually work but I am trying to figure it out. Any help would be great.
 
qubz
Old
(Last edited by qubz; 1st April 2011 at 01:53 PM.)
#2  
qubz's Avatar
Recognized Developer
Thanks Meter 68
Posts: 576
Join Date: Jun 2007
Location: A parallel dimension

 
DONATE TO ME
Couldnt you just rename the .apk extension to .zip unzip it then edit it rezip then sign it to install. Or you could use 7zip if ur on windows to get into the .apk without renaming to .zip and messing around with signing etc.
Nexus 4 | Transformer Prime
R.I.P - SGS2 , Nexus S, Xoom WiFi, HTC Desire, HTC Trinity, Dopod
 
dimitri407
Old
#3  
Senior Member - OP
Thanks Meter 20
Posts: 213
Join Date: Jun 2007
Will this actually work for a framework-res.apk file?
 
dimitri407
Old
#4  
Senior Member - OP
Thanks Meter 20
Posts: 213
Join Date: Jun 2007
Quote:
Originally Posted by qubit76 View Post
Couldnt you just rename the .apk extension to .zip unzip it then edit it rezip then sign it to install. Or you could use 7zip if ur on windows to get into the .apk without renaming to .zip and messing around with signing etc.
This won't work because this way you don't get the Value folders that I need to access. It has to be decompiled to get access to those.
 
bigrushdog
Old
#5  
bigrushdog's Avatar
Recognized Developer
Thanks Meter 4430
Posts: 2,587
Join Date: Apr 2007
Location: Fontana, CA

 
DONATE TO ME
That's the million dollar question. You will not be able to deodex or decompile until hc source is released. Otherwise we'd all have deodexed zip aligned pngopt roms.
The Following User Says Thank You to bigrushdog For This Useful Post: [ Click to Expand ]
 
sangreal06
Old
#6  
Senior Member
Thanks Meter 110
Posts: 273
Join Date: Sep 2010

 
DONATE TO ME
Quote:
Originally Posted by bigrushdog View Post
That's the million dollar question. You will not be able to deodex or decompile until hc source is released. Otherwise we'd all have deodexed zip aligned pngopt roms.
I have done all of these (plus recompiling/odexing). The tools are out there, but they are not 100%. I have had to fix several resources manually before being able to repackage them. I only use apktool/baksmali/smali though so I don't know about the various front-ends like APKManager
 
bigrushdog
Old
#7  
bigrushdog's Avatar
Recognized Developer
Thanks Meter 4430
Posts: 2,587
Join Date: Apr 2007
Location: Fontana, CA

 
DONATE TO ME
Quote:
Originally Posted by sangreal06 View Post
I have done all of these (plus recompiling/odexing). The tools are out there, but they are not 100%. I have had to fix several resources manually before being able to repackage them. I only use apktool/baksmali/smali though so I don't know about the various front-ends like APKManager
Smali/baksmali needs to be updated to support honeycomb
They cannot be updated until hc source is released.
 
sangreal06
Old
(Last edited by sangreal06; 1st April 2011 at 10:06 PM.)
#8  
Senior Member
Thanks Meter 110
Posts: 273
Join Date: Sep 2010

 
DONATE TO ME
Quote:
Originally Posted by bigrushdog View Post
Smali/baksmali needs to be updated to support honeycomb
They cannot be updated until hc source is released.
As I mentioned, these tools have already been fixed (to some degree):

Quote:

C:\anddev>java -jar baksmali.jar -d c:\anddev\xoomdump\framework\ -x Music2.odex -o Music_deodex

C:\anddev>java -jar smali.jar Music_deodex -o Music.dex

C:\anddev>apktool d -f framework-res.apk framework-res-hc-test
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...

C:\anddev>apktool b framework-res-hc-test framework-res-hc-test.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building apk file...

C:\anddev>
They do not work perfectly. What is not shown in the log is several manual fixes to the files. They work quite well though. Here is a screenshot to show the streaming music manager after enabling (broken) streaming in Music2.odex and recompiling + reodexing:



I also have a thread demonstrating framework-res changes: http://forum.xda-developers.com/show....php?t=1015857

I've made a few posts about this but nobody seemed to care too much.

Note: The author of baksmali does not recommend recompiling apps deodexed using this version
 
dimitri407
Old
#9  
Senior Member - OP
Thanks Meter 20
Posts: 213
Join Date: Jun 2007
Quote:
Originally Posted by sangreal06 View Post
As I mentioned, these tools have already been fixed (to some degree):



They do not work perfectly. What is not shown in the log is several manual fixes to the files. They work quite well though. Here is a screenshot to show the streaming music manager after enabling (broken) streaming in Music2.odex and recompiling + reodexing:



I also have a thread demonstrating framework-res changes: http://forum.xda-developers.com/show....php?t=1015857

I've made a few posts about this but nobody seemed to care too much.

Note: The author of baksmali does not recommend recompiling apps deodexed using this version
Yeah I saw your posted from your other thread but I'm not that edumicated to use that tool you mentioned. That is why I was trying to use the APK Manager.
 
sangreal06
Old
#10  
Senior Member
Thanks Meter 110
Posts: 273
Join Date: Sep 2010

 
DONATE TO ME
I don't use APK Manager, so I don't know about that. I believe it is a wrapper around apktool though, so you should be able to just replace apktool.jar in the APK Manager folder


XDA PORTAL POSTS

MicrowaveTimePicker Brings 4.2 TimePicker to 2.1+ Devices

It’s frustrating to see slick new features that you can’t use when … more

What’s Possible with CASUAL & How to Make Your Own CASUAL – XDA Developer TV

XDA Elite Recognized Developer AdamOutler is known … more

Pearl Chen to Talk NFC Development at XDA:DevCon 2013

From HTML to LEDs or Android to Arduino, Hardware Hacking is a pastime of many people … more

Avoid Framework Bootloops on Xperias Running Jelly Bean

If you’re a Sony device owner running a stock Android Jelly Bean firmware and … more