yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] RealHolyJoe:
Trying to decompile a framework-res.apk and keep getting the same error.

java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
Could Not Find C:\*\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
Could Not Find C:\*\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedframework-res.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010402d7 string/web_user_agent_target_content, config=[DEFAULT]
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readType(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readTable(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(Unknown Source)
at brut.androlib.res.AndrolibResources.loadMainPkg(Unknown Source)
at brut.androlib.res.AndrolibResources.getResTable(Unknown Source)
at brut.androlib.Androlib.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
[G1 Android Development] stepph:
fine... i lost the dowload link... can you help me in find it ?
[G1 Android Development] mattmanwrx:
Do u mean u can't see the bit that says Download in the first post that you quoted on?

Windows Download - http://www.multiupload.com/GXW01G6URJ

Linux download - http://www.multiupload.com/7XEQYT3FUH
[G1 Android Development] dman3285:
I am also having an issue...after I go thru the steps and make my changes zip...sign...extra...try to installment...I get " error paring the package" what am I doing wrong?
[G1 Android Development] 4D3:
Hi,

i just tried to decompile the framework res and i get a message saying that "java is not installed" I have installed the latest java from the website and it still happens..

what java am i supposed to install? im using windows 7

thanks
[G1 Android Development] Habarug:
APK manager is really putting up a fight today. I'm trying to modify some xmls in the framework_res.apk. Decompiling and editing goes without problems. But when I compile: If I select to copy over the files i didn't edit, delete the resources thingy (sry, don't remember the name, u'll understand :) ) and the files i edited from the keep folder first, the files i edited don't show up in the framework_res.apk. They're just disappeared. If i choose NOT to copy over the files i didn't edit, the whole res folder dissapears... Anyone know why? Thanks in advance =)

Edit: oh, and o use widows 7:-)
[G1 Android Development] axel eff:
Anyone have an idea why widgetlocker wants to open to the market after editing the apk? Before the last update I was able to change the notification icon, it wanted me to open to market when opening widgetlocker but I could just back out, then I'd be in widgetlocker able to customize my lock screen and whatnot. Now after the update I can't get it open at all, just keeps going to the widgetlocker market page, where I have the options to open or uninstall, the latter being the only one that does anything. I feel like I've tried everything in APKmanager, signed, zipaligned, not zipaligned, optimized etc. Ninjamorph isn't working either. Any ideas? :confused:
[G1 Android Development] s0niqu3:
This sounds like Widgetlocker is doing some kind of signature/hash/crc/etc., check now, and if it fails, refuses to actually launch the app.

Many other programs have done similar things, almost always as an anti-piracy check.

I'm not sure what to tell you, maybe try copying over the old signature, and pushing the app to /system/app instead of installing like a normal apk. If it works, then you know its just checking the signature, if it doesn't, then you need to dig into the smali code and "crack" the checking routine. And no, I won't help with that, sorry. Well, or just give up on modifying the app.

I know it sucks, but not much else to try.

Cheers, :)
[G1 Android Development] blueluck77:
I can not edit this damn foursquare app. I am just trying to change the widget to transparent. Its not making a log file so that I can find out exactly what is erroring. If i just edit the pngs, itll work, or if I just edit the styles.xml file itll work correctly, BUT if I change them both then thats when it creates an error. Anyone have any ideas? This is absolutely driving me crazy. Thanks in advance.

hell i just decompiled (#9) an app (usaa) and i didnt change anything it just errored out and again didnt provide me with an error log at all. Why wont this work? If i just

extract (#1) the apk I can change it and everything works fine, but I dont have any access to the xml files.
[G1 Android Development] ssconceptz:
I need help. Trying to decompile mms.apk from Galaxy S II and asks for dependant file and I can't drag and drop. What's the correct format for path?
[G1 Android Development] dully79:
If you've got apktool just install the twframework, put it on c drive, open a cmd terminal and type apktool if C:\twframework

Hope this helps.:)
[G1 Android Development] grotesque02:
I have brut.androlit etc error in compile, this happend with new java update I think :-(
[G1 Android Development] blueluck77:
Use Java 1.6
[G1 Android Development] grotesque02:
I found a installer called jre-6u15-windows-i586-s, it's ok?
[G1 Android Development] blueluck77:
Sounds right to me.
[G1 Android Development] grotesque02:
This is the log with my error, how can I fix? Thanks!

--------------------------------------------------------------------------
|04/11/2011 -- 16:59:21,21|
--------------------------------------------------------------------------
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode, sharing)
"adb" non è riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
Impossibile trovare C:\ApkManager4.9\place-apk-here-for-modding\../place-apk-her
e-for-modding/signedRL.apk
Impossibile trovare C:\ApkManager4.9\place-apk-here-for-modding\../place-apk-her
e-for-modding/unsignedRL.apk
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\XXX\apktool\framework\1.apk
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\ApkManager4.9\other\..\projects\RL.apk\AndroidManifest.xml:5: error: No resou
rce identifier found for attribute 'xlargeScreens' in package 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\XXX\AppData\Local\Temp\A
PKTOOL209680233292018699.tmp, -I, C:\Users\XXX\apktool\framework\1.apk, -S, C:
\ApkManager4.9\other\..\projects\RL.apk\res, -M, C:\ApkManager4.9\other\..\proje
cts\RL.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\XXX\AppData\Local\Temp\APKTOOL209680233292018699.tmp, -I, C:\Users\XXX\
apktool\framework\1.apk, -S, C:\ApkManager4.9\other\..\projects\RL.apk\res, -M,
C:\ApkManager4.9\other\..\projects\RL.apk\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
Premere un tasto per continuare . . .
[G1 Android Development] blueluck77:
use SDK Manager to check your google add on packages.
[G1 Android Development] Aitrus:
this in my error. i dont now why im getting it. ive been decompiling the same apk for the past three days with no problem and this just came out of the blue.

edit. i just reinstalled apk manager 4.9 again and im getting the same error. but i found i dont get this error with all my system apks. this is weird.

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
Could Not Find C:\android-sdk-windows\tools\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk
Could Not Find C:\android-sdk-windows\tools\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\Emmett\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010300a3
at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown Source)
at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(Unknown Source)
at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unknown Source)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown Source)
at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.decode(Unknown Source)
at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
[G1 Android Development] TheNewGuy:
Hello,

I have been reading all over the web and learning a lot! This thread has been a big help! I am posting this question here as it seems that there are a number of experianced devs who post here. I have 2 quesstions...

1) I have been modding some of my apps to be themed with the built in "Wallpaper" theme included in CM7 framework. This requires me to edit the AndroidManifest.xml.

However anytime I do it makes the app disapear, because it it not signed correctly. I got around this by making the edit in the source and compiling the whole rom at once instead of using apk_manager. BUT there must be a way to take the sign key from my source and use it to sign apk individualy and still have them match..... is this possible? How would I do this?

2) This one is my big pet project.... I would like to use a random number in some of my animations... so I have read that there is a random number function included in java... but it means I need to edit/create a "method"? I can't simply edit the .xml's? Is this correct? If so..(or not) how do I go ablout doing this? Can someone give me some sample code or a point in the right direction?

Thank you very much for your time
[G1 Android Development] Jacky444:
Probably one of most stupid questiosn ever but here it goes.

I do not understand coding of application im trying to edit at all...

I do have basic understanding of C++, C# but this is just rediculuse, makes no sense to me.

Please can u tell me if there is an editor or way to convert coding to more understandable or this is just the way android coding is supposed to be.

Example:

.field public static final MAGIC_FRAME_TIME:I = 0x50

.field public static final MANA_PER_STONE:I = 0x32

.field public static final METEOR_SPEED:I = 0x3e8

.field public static final MISSILE_SPEED:I = 0x1f4

.field public static final MORE_BUTTON:I = 0x0

What i dont understand is these 0x1f4 or 0x0 ?

and fourther more "const/4 v6, 0x3" ?

Please help !

---------- Post added at 12:37 AM ---------- Previous post was at 12:09 AM ----------

P.S.: Sory to bother you, I've gooogled and found out the output source is random, so i got source using this tutorial: http://droiddudes.com/2011/05/08/howto-extract-apk-into-readable-java-source-code-and-xml-files/.

Hopefully this solves problem to some one else !

HF !
[G1 Android Development] yken:
My log and i cant find the reason that i cant compile.

I can decompile without error but when i try compiling i get this error

--------------------------------------------------------------------------

|16.11.2011 -- 18:05:37,10|

--------------------------------------------------------------------------

java version "1.7.0_01"

Java(TM) SE Runtime Environment (build 1.7.0_01-b08)

Java HotSpot(TM) Client VM (build 21.1-b02, mixed mode, sharing)

I: Checking whether sources has changed...

I: Smaling...

Exception in thread "main" java.lang.NullPointerException

at org.jf.util.PathUtil.getRelativeFile(Unknown Source)

at org.jf.smali.smaliFlexLexer.getSourceName(Unknown Source)

at org.antlr.runtime.CommonTokenStream.getSourceName(Unknown Source)

at org.antlr.runtime.tree.CommonTreeNodeStream.getSourceName(Unknown Source)

at org.antlr.runtime.tree.TreeParser.getSourceName(Unknown Source)

at org.jf.smali.smaliTreeWalker.getErrorHeader(Unknown Source)

at org.antlr.runtime.BaseRecognizer.displayRecognitionError(Unknown Source)

at org.antlr.runtime.BaseRecognizer.reportError(Unknown Source)

at org.jf.smali.smaliTreeWalker.smali_file(Unknown Source)

at brut.androlib.mod.SmaliMod.assembleSmaliFile(Unknown Source)

at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)

at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)

at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)

at brut.androlib.src.SmaliBuilder.build(Unknown Source)

at brut.androlib.src.SmaliBuilder.build(Unknown Source)

at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)

at brut.androlib.Androlib.buildSources(Unknown Source)

at brut.androlib.Androlib.build(Unknown Source)

at brut.androlib.Androlib.build(Unknown Source)

at brut.apktool.Main.cmdBuild(Unknown Source)

at brut.apktool.Main.main(Unknown Source)
[G1 Android Development] :
howto modify system applications

hi,

i'm using apkManager since a time ago without any problems.

i'm modifing data apps or system apps to update images or xml files and it work fine,

but i having problems when i update smali code on system apps.

in this case, the apps are not working, even if i copy the META-INF folder to the APK using winrar.

please, howto make functional modifications of smali source in system apps (like settings, mms, phone, etc) using apkManager

THX!
[G1 Android Development] abhisheak.bansal:
APK manager is really putting up a fight today. I'm trying to modify some xmls in the framework_res.apk. Decompiling and editing goes without problems. But when I compile: If I select to copy over the files i didn't edit, delete the resources thingy (sry, don't remember the name, u'll understand ) and the files i edited from the keep folder first, the files i edited don't show up in the framework_res.apk. They're just disappeared. If i choose NOT to copy over the files i didn't edit, the whole res folder dissapears... Anyone know why? Thanks in advance =)
[G1 Android Development] jonatasmz:
someone have the 4.8 version please? i´m having problems decompiling and compiling apks with 4.9 (app force closes, worked fine on 4.8).

can´t find the link..

thanks...
[G1 Android Development] Noed:
I've read a lot in this thread but didn't find an answer:

- How can I decompile and recompile a single XML file, instead of the whole APK

- Better yet, decompile a resources.arsc, decompile the colors.xml from it, edit, then pack again, just the resources.arsc

Thanks.

I've been there... I know how to decompile an APK, edit the XMLs, compile it again... I know which XMLs modify resources.arsc... just want to make it easier, I don't need to recompile everything in an APK, just a few XMLs.
[G1 Android Development] Johnsondr80:
If I remember correctly....apkmanager 5.0.1 has a option to choose to decompole just sources or just resources.

I've gone straight apktool

Sorry but can't be much more help on that
[G1 Android Development] boystuff:
has this been updated for decompiling/recompiling ICS.apk's? would really like to start editing my launcher.
[G1 Android Development] :
I've got a problem, if someone would like to help me?

Maybe a Mac user has some more info?
[G1 Android Development] maddoggin:
can someone please tell me how to add framework dependencies thru commanprompt?? ive been seraching for days and cant find. i need to know the proper commands to put in command prompt to set dependincies like "if framework-res.apk" something like that. do i cd to other folder? or how ?
[G1 Android Development] ssconceptz:
you just drag the apk to window
[G1 Android Development] ssconceptz:
I have an issue, no matter what I do I get "An Error has occurred" during building apk in the compile process. This is even with a stock apk and not changing any files and trying to compile as soon as the decompile finished. I even kept all files.

Help? Do I need to put apk manager in my abd folder?
[G1 Android Development] mattmanwrx:
U need to install java jdk (and it to path in Windows, not sure on mac)...
[G1 Android Development] tommytomatoe:
Mac OS X comes with java.

No need to run a vm to use apktool based tools. Run it natively on mac. Apkmanager is an awesome windows ttool but for unix and unix like systems check our android-utility. Its for mac and linux. In my signature. You wont have to run vm now which is slow.

And inside the vm your error was that you didn't have java....

all you need is a lovely signature.
[G1 Android Development] :
I had already a windows vm for other purposes and had installed java on that.

But thanks anyway!
[G1 Android Development] metriod:
I try to modify the apn.xml in framework-res.apk but didn't work for me.

I decompile apk, modify apn.xml, compile apk, it said error, ask me it is system file, I type yes, and next I click yes again, it tells me to delete the modify file which is the apn.xml in keep folder.

I did that, and recompile. I extract the new unsign compile apk and the apn.xml is missing!

What am I doing wrong?
[G1 Android Development] malwarebyte:
i always get an error while compiling systemUI.apk

should i go "y" or "n"?

http://i.lulzimg.com/ca7e4f71b7.png

full log:

http://pastebin.com/fPT2wJfh
[G1 Android Development] Gogolo2:
Hi

When I try to mod images of Dr Knizias Labyrinth I get following error when trying to sign it (the unsigned file is deleted):

java version "1.7.0_01"

Java(TM) SE Runtime Environment (build 1.7.0_01-b08)

Java HotSpot(TM) Client VM (build 21.1-b02, mixed mode, sharing)

'adb' is not recognized as an internal or external command,

operable program or batch file.

The system cannot find the path specified.

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

at java.util.Arrays.copyOf(Unknown Source)

at java.io.ByteArrayOutputStream.grow(Unknown Source)

at java.io.ByteArrayOutputStream.ensureCapacity(Unknown Source)

at java.io.ByteArrayOutputStream.write(Unknown Source)

at java.util.zip.DeflaterOutputStream.deflate(Unknown Source)

at java.util.zip.DeflaterOutputStream.write(Unknown Source)

at java.util.zip.ZipOutputStream.write(Unknown Source)

at com.android.signapk.SignApk.copyFiles(SignApk.java:405)

at com.android.signapk.SignApk.main(SignApk.java:473)

The system cannot find the path specified.

The path is correct - I havent changed anything. The file is about 40Mb.

Thanks for your help.
[G1 Android Development] Notorious544d:
I'm also getting errors when compiling framework, either themed or unthemed.

My log.
[G1 Android Development] nilsido:
I have now extracted an apk and modified the files etc. How do I make it an apk again?
[G1 Android Development] mattmanwrx:
Compile the apk... around option 11 (been a while since I used apk manager)
[G1 Android Development] nilsido:
thx, but when i do so, it says that an error occured. I try to check the log, but then it asks if it is an system apk or not. I press no and it goes back to start menu. If i press yes it says that I can find a "keep folder", but i cant find it.
[G1 Android Development] mattmanwrx:
The log will tell you what has happened... if it says error, then continue click no for system then look at the log... or post it here in code /code [] tags...
[G1 Android Development] nilsido:
I get this

|22.12.2011 -- 14:16:09,17|
--------------------------------------------------------------------------
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Unknown Source)
... 5 more
[G1 Android Development] mattmanwrx:
It has no apktool.yml so the apk didn't decompile properly.. I think...
[G1 Android Development] Ajthescot:
First line of the error is a png error the rest is just because of that png. Should it be a .9 png instead.

Also sytemui is yes yes
[G1 Android Development] nilsido:
ok, i think ill start all over. First i extracted two different apks. Then i moved xmls drawables and all that stuff from one apk to another. And then I tried to compile the apk I was gonna use. Anything i have done wrong or can't i do it this way?

Ps: it is two cm7 themes
[G1 Android Development] Ajthescot:
Option 20 increase your memory size 512
[G1 Android Development] Ajthescot:
You need to decompile all the files if you are swapping out files.

. I'd recommend using something like winmerge to compare xmls and make the changes your self.
[G1 Android Development] nilsido:
I give up. Too complicated. Could someone merge these apks for me? I want all the files from ICS2.apk to ICS.apk, but not overwriting the files that is allready in ICS.apk.
[G1 Android Development] {davros}:
any ideas why i get this?

[davros@lappy64 apkManager]$ ./Script.sh
which: no sox in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/sbin:/usr/sbin:/sbin:/home/davros/android/sdk/platform-tools:/home/davros/bin:/home/davros/.local/bin:/home/davros/bin:/home/davros/android/sdk/platform-tools:/home/davros/bin:/home/davros/android/sdk/platform-tools:/home/davros/bin:/home/davros/android/apkManager/other)
The program sox is missing or is not in your PATH,
please install it or fix your PATH variable
[G1 Android Development] dully79:
There is your answer in the question!!!!
[G1 Android Development] {davros}:
Ok ya but wtf is program sox
[G1 Android Development] dully79:
Have you tried searching the thread for " install Sox"??
[G1 Android Development] {davros}:
lol whys it always gotta be something so fricking simple that i always over look