Decompile/Compile in Eclipse - Epic 4G Q&A, Help & Troubleshooting

So how can i decompile framework-res in to eclipse to edit it. i tried importing and it didnt show values folder or anything like that.

Eclipse is for coding or editing an open source project... decompile with apk multi-tool them edit files with notepad++
Sent from my SPH-D700 using Tapatalk

ok now i do that. and i recompile with absolutely no errros. i just get two warnings can this be the problem? i get a warning that says cannot find resources. under it says checking if resources has changed.
aapt:warning: string 'permdesc_accessUsb' has no default translation in C:\Program Files (x86)\RandomROM Development\RandomKing's Kitchen\Apk Manager 5.0.2\projects\framework-res.apk\res ; found: es_US
what does this mean?

Use apk multi-tool and not the kitchen. You can try ignoring the error and see if it works.
Sent from my SPH-D700 using Tapatalk

marcusant said:
Use apk multi-tool and not the kitchen. You can try ignoring the error and see if it works.
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Holy ****e I am behind...Now I have to learn the multi-tool.

i use the tool and not the kitchen and now i get a jave:83 error

Related

[Q] How do i edit XML files in framework-res.apk?

i could decompile them but always get errors when i tried to compile them,
could i just push them into the phone without compiling them?
Aren't XML files in plain text? U just edit them in notepad or whatever. Or am I crazy?
Sent from my HTC Desire using XDA App
they are encoded when i pull them out from the apk
I have a same question too...
Sent from my HTC Desire using XDA App
I used apk tool to decomplie them, this concerts the binary xml into English. Make your changes then re compile it but undyead of using the complied apk I just swap the new xml with the origindl from the original apk using winzip and resign the apk. Worked fine for me to edit an apk.
What error messages are you getting?
I have the same error as bradputt. I attach log file form decompiling and compiling without any edit.
When you recompile do apktool b -f foldername newapk.apk then like mentioned take recompiled xml from new apk and add to existing working apk.

Error When Re-compiling Framework-res

I tried SO HARD changing the black background like in the Settings and all but no joy.
I followed this for decompiling :
http://androidforums.com/esteem-all-things-root/520917-guide-how-properly-decompile-recompile-apks-apktool.html
I followed this for changing for changing the desired background :
http://forum.xda-developers.com/showthread.php?t=1343484
All turned out well till I wanted to re-compile back, i got errors as in the attachment below.
have you set the framework file? "apktool if framework-res.apk" before recompiling?
if it doesnt work, try
pull twframework.apk from your phone, and use it as above.
Hope it works, again, I'm nowhere near my laptop
Sent from my GT-I8150 using XDA
you must add a picture into drawable-hdpi and name it as 'mybackground' just like the name what you set in styles.xml
reidzeibel said:
have you set the framework file? "apktool if framework-res.apk" before recompiling?
if it doesnt work, try
pull twframework.apk from your phone, and use it as above.
Hope it works, again, I'm nowhere near my laptop
Sent from my GT-I8150 using XDA
Click to expand...
Click to collapse
Yes I did, already! You mean I should now use twframework.apk instead of framework-res.apk?? :ekk:
Sent from my GT-I8150 using xda premium
skys415 said:
you must add a picture into drawable-hdpi and name it as 'mybackground' just like the name what you set in styles.xml
Click to expand...
Click to collapse
I already added the picture named "mybackground.png". I followed exactly as the tutorial but yet failed. Hmmm..
Sent from my GT-I8150 using xda premium
Guys, I'm confused on the replacing part of "resource.arcs" and "modified files".
1. I already replaced "resources.arcs" in the original framework-res.apk with the " resources.arcs" from the build > apk.
2. As for the "styles.xml" that I modified, I have no idea where to put it.
Sent from my GT-I8150 using xda premium
SyzwnFrzRdz said:
Guys, I'm confused on the replacing part of "resource.arcs" and "modified files".
1. I already replaced "resources.arcs" in the original framework-res.apk with the " resources.arcs" from the build > apk.
2. As for the "styles.xml" that I modified, I have no idea where to put it.
Sent from my GT-I8150 using xda premium
Click to expand...
Click to collapse
You no need to replace "styles.xml", you are never find it inside apk after recompiled.
As he said, just replace "resources.arcs" and the "modified files".

apktool

i have a jelly bean rom and im trying to theme my mms app but when i recompile i always get this error (attached)
i used the standard apk tool files on google code im not sure what im doing wrong? if someone could just point me in the right direction that would be very helpful thank you
Need to have your framework resources. Did you run
Code:
apktool if framework-res.apk
of course you need to have that apk in the same directory.
Sent From My Toro+ via SkyBlue Tapatalk
prkchop said:
i have a jelly bean rom and im trying to theme my mms app but when i recompile i always get this error (attached)
i used the standard apk tool files on google code im not sure what im doing wrong? if someone could just point me in the right direction that would be very helpful thank you
Click to expand...
Click to collapse
ÜBER™ said:
Need to have your framework resources. Did you run
Code:
apktool if framework-res.apk
of course you need to have that apk in the same directory.
Sent From My Toro+ via SkyBlue Tapatalk
Click to expand...
Click to collapse
Wonky stuff with APK tool and ICS/Jelly.
http://rootzwiki.com/topic/18456-re...reen-flashable-port-instructions/#entry481337
I've used this one with success.
apktool.jar.1.4.2 = decompile
apktool.jar.1.4.3 = recompile
Rename the respective .jar to the correct extension before continuing.
Kinda' a pain.
But it's worked for me on ICS and Jelly.
Not completely sure, but is it using the Jelly Bean aapt.exe.
I'm not sure this is your problem, but it gave me issues a while back.
Sent from my Galaxy Nexus using Tapatalk 2
Jubakuba said:
Wonky stuff with APK tool and ICS/Jelly.
http://rootzwiki.com/topic/18456-re...reen-flashable-port-instructions/#entry481337
I've used this one with success.
apktool.jar.1.4.2 = decompile
apktool.jar.1.4.3 = recompile
Rename the respective .jar to the correct extension before continuing.
Kinda' a pain.
But it's worked for me on ICS and Jelly.
Click to expand...
Click to collapse
That's a lot of work for nothing... mine decompiles and recompiles perfect...
Sent From My Toro+ via SkyBlue Tapatalk

[Share Latest Apktool 4.2.2/Guide/Tutorial/] How to Decompile/Compile/Sign Apk/Jar

How to Decompile, Recompile & Sign apk
This Guide/Tutorial for Windows user
Requirement :
1. Android SDK, you can download from here (this including Java)
2. Download Latest Apktool 4.2.2 (Including Sign & baksmali) from here (this Support All apk from GB/ICS/JB 4.1.2/4.2.2)
3. Notepad++ for your tool editing xml/smali you can download from here
If you already download/Installed Android sdk/java & Notepadd++ you just download Latest Apktool 4.2.2
Download Latest Apktool, extract to :
Windows XP : C:\Document and setting\folder your computer name
Windows 7 : C:\user\folder your computer name
copy your apk & framework-res.apk/SemcGenericUxpRes.apk/framework 2 to same folder with apktool
Now you can start Editing apk
Example Editing Walkman
Open Command Prompt (CMD)
to decompile :
Code:
apktool if framework-res.apk
apktool d semcmusic.apk ( can be whatever name you give to your apk )
Some Original system apps need installed framework 2 like on stock ROM (SemcGenericUxpRes.apk)
Example
Code:
apktool if framework-res.apk
apktool if semcgenericuxpres.apk
apktool d semcmusic.apk ( can be whatever name you give to your apk )
You can start editing as you want
to recompile :
Code:
apktool b -f -d semcmusic.apk ( can be whatever name you give to your apk )
If done, you can exit CMD
open original SemcMusic.apk using Winrar or 7zip go to folder semcmusic>dist, open semcmusic.apk using Winrar or 7zip
Drag & drop folder META-INF & Lib in original apk to Modified apk, set compression to store and click ok
to sign :
Move apk modified from folder semcmusic>dist to same folder with apktool
Open Command Prompt (CMD)
Example
Code:
java -jar SignApk.jar testkey.x509.pem testkey.pk8 semcmusic.apk semcmusic_signed.apk ( can be whatever name you give to your apk )
NOTE : Sign apk only for apps 3rd Party but you can use for system>app but not all apps
to zipalign :
Open Command Prompt (CMD)
Example
Code:
zipalign -fv 4 semcmusic_signed.apk semcmusic_signed_zipaligned.apk
How to Decompile/Recompile Jar/Editing classes.dex
Copy Jar file to same folder Apktool
Example
framework.jar
to decompile :
Open framework.jar using Winrar or 7zip and extract classes.dex
Drag & drop classes.dex to Quick-Baksmali (CMD)
if done, you can find folder classes-out
now you can start editing smali file using Notepad++
to recompile :
Drag & drop folder classes-out to Quick-Smali (CMD)
if done, you can find New file "new-classes.dex"
rename file to classes.dex
Open framework.jar using Winrar or 7zip
Drag & drop file classes.dex modified to framework.jar using Winrar or 7zip set compression to normal
Credits :
Thanks to Brut.all for apktool
Thanks to Yorzua for Sign apk tool/file
Thanks to Team Reject for Quick baksmali/smali file
NOTE : If you get error when compiling, don't blame me lolz it's your mistake when editing apk
Great Guide Rizal. I am sure many were asking for it.
great tut but can you add some screens/screenshots
auni said:
Great Guide Rizal. I am sure many were asking for it.
Click to expand...
Click to collapse
Thanks, yeah some user confusing editing apk, so i share latest apktool with easy guide
Mtakween said:
great tut but can you add some screens/screenshots
Click to expand...
Click to collapse
Later i will add screenshot for this tutorial
thx nice guide
Sent from my LT26i using xda app-developers app
No doubt.. Its a great guide for some one like me.... Will sit today night and going to learn.... Thanks a lot..
From My Xperia S With XTX7 ROM
now bookmark it!! thanks dude!! :good:
thanks
Thanks for the credits, buddy
nice share there
Great guide Rizal. Decent English too. Lol. Proud to be Sundanese..
In my opinion, there are other more simplified tools that utilized apktool better (I use apkmultitools and vts (virtuous ten studios)) but people needs to know the basic right..
And I think, you need to put the java\bin directory in Path in windows system variables (or Java_home in win8). And it's better (I think) to put sdk directory (adb, fastboot), apktool and the smali jars files in the Path too, so that users can access from any folders/directory.
Sent from my LT26i using Tapatalk 2
WahyuAndri said:
now bookmark it!! thanks dude!! :good:
Click to expand...
Click to collapse
:thumbup:
Yorzua said:
Thanks for the credits, buddy
nice share there
Click to expand...
Click to collapse
Thanks for your support my friend
m1st3r1 said:
Great guide Rizal. Decent English too. Lol. Proud to be Sundanese..
In my opinion, there are other more simplified tools that utilized apktool better (I use apkmultitools and vts (virtuous ten studios)) but people needs to know the basic right..
And I think, you need to put the java\bin directory in Path in windows system variables (or Java_home in win8). And it's better (I think) to put sdk directory (adb, fastboot), apktool and the smali jars files in the Path too, so that users can access from any folders/directory.
Sent from my LT26i using Tapatalk 2
Click to expand...
Click to collapse
Yeah I know, but some user will confusing lolz, this apktool is latest version so will work for apk 4.2.2, old version doesn't work
:thumbup:
Sent from my Xperia V using Tapatalk 2
I've seen other guides say that resources.arsc should be copied from the old apk and stored in the new one.... is that necessary?
thanks =)
THANKS:good::laugh:
Why So Serious? said:
I've seen other guides say that resources.arsc should be copied from the old apk and stored in the new one.... is that necessary?
Click to expand...
Click to collapse
Can anybody shed any light on this?
Hey rizal, following your decmpile/recompile method, the apk wont install, signature problem.
zhuhang said:
Hey rizal, following your decmpile/recompile method, the apk wont install, signature problem.
Click to expand...
Click to collapse
There are some problems when signing the apk. The workaround for this: use some tools (ticklemyandroid does good jobs) to completely signing the apk (I've done this when modifying systemui.apk), you can also learn from it (learn some of its codes). Or just move files that u've modified from the modified (recompiled) apk to original apk (7zip is your friend)
Why So Serious? said:
I've seen other guides say that resources.arsc should be copied from the old apk and stored in the new one.... is that necessary?
Click to expand...
Click to collapse
I don't think it's necessary. But keep in my mind my post above. So it's like u keep the old resource but put the modified (and compiled) files to the original.
Sent from my LT26i using Tapatalk 2
m1st3r1 said:
There are some problems when signing the apk. The workaround for this: use some tools (ticklemyandroid does good jobs) to completely signing the apk (I've done this when modifying systemui.apk), you can also learn from it (learn some of its codes). Or just move files that u've modified from the modified (recompiled) apk to original apk (7zip is your friend)
Click to expand...
Click to collapse
Just moving with normal compression?
zhuhang said:
Just moving with normal compression?
Click to expand...
Click to collapse
Yes. Just move it to one 7zip window to another one...
Sent from my LT26i using Tapatalk 2

[Q] Able to de and re compile framework-res.apk?

I was just wondering if anyone with the UAMDL software has been able to decompile and recompile the framework on here yet.
I have tried with the APK multi tool and the decompile works fine but when I try to recompile it errors our right away.
Anyone have any luck with this?
If so what tool did you use?
Yes I have.
Sent from my SGH-M919 using Tapatalk 2
I'd like to know this as well, and how people have been successful. I haven't had any luck installing framework-res.apk or recompiling a modified app. From my understanding, it's an issue with apktool and aapt that needs to be updated.
TheArtiszan said:
I was just wondering if anyone with the UAMDL software has been able to decompile and recompile the framework on here yet.
I have tried with the APK multi tool and the decompile works fine but when I try to recompile it errors our right away.
Anyone have any luck with this?
If so what tool did you use?
Click to expand...
Click to collapse
That and SystemUI.apk are both missing files needed for them to decompile and recompile right
evil..............out
elesbb said:
Yes I have.
Sent from my SGH-M919 using Tapatalk 2
Click to expand...
Click to collapse
Can you elaborate on what tools you used and how to set it up please?
I have been stuck trying to get this to work for over a week now.
Sent using xda premium.
evil1art said:
That and SystemUI.apk are both missing files needed for them to decompile and recompile right
evil..............out
Click to expand...
Click to collapse
There are ways for making it work though
TheArtiszan said:
Can you elaborate on what tools you used and how to set it up please?
I have been stuck trying to get this to work for over a week now.
Sent using xda premium.
Click to expand...
Click to collapse
I used the tool in my signature and you have to remove some layout paramaters in the xml files then recompile and copy the originals over to the newly compiled apk.
elesbb said:
There are ways for making it work though
I used the tool in my signature and you have to remove some layout paramaters in the xml files then recompile and copy the originals over to the newly compiled apk.
Click to expand...
Click to collapse
Im the one who figured out the missing style for the systemui
evil..............out
evil1art said:
Im the one who figured out the missing style for the systemui
evil..............out
Click to expand...
Click to collapse
Yeah so did I lol. Ive ran into that issue before and thats all you have to do to get around it.
elesbb said:
There are ways for making it work though
I used the tool in my signature and you have to remove some layout paramaters in the xml files then recompile and copy the originals over to the newly compiled apk.
Click to expand...
Click to collapse
We have our own modified apk manger works good
evil..............out
evil1art said:
We have our own modified apk manger works good
evil..............out
Click to expand...
Click to collapse
Ahhh. That makes life a lot easier lol. How did you modify it? Build it from source or edit the jar file?
elesbb said:
Ahhh. That makes life a lot easier lol. How did you modify it? Build it from source or edit the jar file?
Click to expand...
Click to collapse
Modified the original files and changed memory heap etc
evil..............out
Oh okay that makes sense.
I am editing the framework res apk
Making changes only to the arrays.xml file in the values folder.
Which styles should I be commenting out and then which file should I copy to the original?
I tried putting a + in front of a few lines based on the errors I was getting but that seemed to make it worse.
Sent using xda premium.
I think the arrays and other values xml get compiled into the resources file no?
Sent using xda premium.
TheArtiszan said:
I think the arrays and other values xml get compiled into the resources file no?
Sent using xda premium.
Click to expand...
Click to collapse
Everything in the values directory is found in your resources.arsc file in the apk.
Sent from my SGH-M919 using Tapatalk 2
Ah that makes sense.
The changes made for layouts, does that go into the same area though?
Just wondering if that might cause a problem since that is what I would want to move over.
Sent from my HTC VLE_U using xda premium
That is odd.
I can get this to decompile in apk multi tool but not Elesbb's GUI
I get the following error:
Tue 06/25/2013
0:46:56.39
Decompiling.. "C:\Users\Bill\APK GUI\framework-res.apk"
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010802f4 drawable/ic_ab_back_holo_dark, config=-hdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:197)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:166)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:131)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:106)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:390)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:56)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:48)
at brut.androlib.Androlib.getResTable(Androlib.java:48)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:166)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:99)
at brut.apktool.Main.cmdDecode(Main.java:131)
at brut.apktool.Main.main(Main.java:68)
-----------------------------------------------------------------
Did I miss something.
Made some progress and decompiling ok now on a different computer.
If I add the + before the layouts would that cause operation issues?
I would like to know too.
Still having trouble.
What did you do too decompile?
Okay I can now get it to recompile adding the +layout to the xml files that were erroring in the compile log and only other change was made was to the arrays.xml file to enable bluetooth tethering like on the GS3 did.
however when I push it to the phone and chmod and try it I get a boot loop.
Did I do something wrong?
Am I supposed to copy out the resource.asrc from the file I compiled like a zip then add it to the original that I pulled using 7zip or something?
Any input would be greatly appreciated.
TheArtiszan said:
Okay I can now get it to recompile adding the +layout to the xml files that were erroring in the compile log and only other change was made was to the arrays.xml file to enable bluetooth tethering like on the GS3 did.
however when I push it to the phone and chmod and try it I get a boot loop.
Did I do something wrong?
Am I supposed to copy out the resource.asrc from the file I compiled like a zip then add it to the original that I pulled using 7zip or something?
Any input would be greatly appreciated.
Click to expand...
Click to collapse
Move the AndroidManifest.xml and Meta-INF folder from the original apk to the modified one.
Sent from my SGH-M919 using xda premium

Categories

Resources