[Q] Help With Smali/Baksmali - HTC EVO 3D

!NOOB ALERT!NOOB ALERT!
The post you are about to read is from a noob. Be aware that he does not know **** about anything other than making themes and smoking pot. YOU HAVE BEEN WARNED.​
so im trying to edit an apk, but i never really learned how to modify/edit smali files.
do you or does anyone know how to edit smali files?
i looked on the google page and i don't understand at all whats going on..
can someone dumb it down for me?

first you need apktool:
http://code.google.com/p/android-apktool/
then a good text editor, I prefer notepad++:
http://notepad-plus-plus.org/
open a cmd prompt where u extracted apktool:
ie... c:\apktool
decompile the file u want to edit:
ie... apktool d settings.apk
make your edits
compile the apk:
ie.... apktool b settings

O.M.J said:
first you need apktool:
http://code.google.com/p/android-apktool/
then a good text editor, I prefer notepad++:
http://notepad-plus-plus.org/
open a cmd prompt where u extracted apktool:
ie... c:\apktool
decompile the file u want to edit:
ie... apktool d settings.apk
make your edits
compile the apk:
ie.... apktool b settings
Click to expand...
Click to collapse
so notepad++ can edit .smali files? :O

Rolando.Ramiro said:
so notepad++ can edit .smali files? :O
Click to expand...
Click to collapse
yes, you're just editing text

ahgahd damn it. :l
i've been looking for something or a thread or a post about editing .smali files since 6am....
and you come here and tell me that you can edit it with a good text editing tool...
WOOOOWWWW
by any chance, would i still be able to remove a license verification on an .apk

but i get error pls help me
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Balaji>cd c:\bala\apk
c:\Bala\apk>apktool d settings.apk
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Balaji\apktool\framework\1.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x02070015
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textColor, value=0x02050000
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textColorHint, value=0x02050001
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textAppearance, value=0x0207000e
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textAppearance, value=0x0207000f
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textAppearance, value=0x0207000f
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textColor, value=0x02050002
I: Decoding values*/* XMLs...
I: Done.
Can't find framework resources for package of id: 2. You must install proper fra
mework files, see project website for more info.
c:\Bala\apk>apktool b settings
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\Bala\apk>apktool b settings
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\Bala\apk>apktool b settings
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\Bala\apk>

this might fix it.
idk if this is even right, but this is what i did.
go into your phone
go to;
/system/framework/
and copy
com.htc.resources.apk
and
framework-res.apk
now take both of those files and put them in the
C:\Users\Balaji\apktool\framework\ <--- folder.
remove the 1.apk and put it somewhere safe (just incase this **** dont work)
then, since com.htc.resources.apk and framework-res.apk are both in there, rename 'com.htc.resources.apk' to '1.apk'
then go to 'framework-res.apk' and rename it to '2.apk'
remember that 1 is always 'com.htc.resources.apk'
remember that 2 is always 'framework-res.apk'
(just for future reference lol)
now try to decompile and build.
let me know what happens

bala242 said:
but i get error pls help me
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Balaji>cd c:\bala\apk
c:\Bala\apk>apktool d settings.apk
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Balaji\apktool\framework\1.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x02070015
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textColor, value=0x02050000
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textColorHint, value=0x02050001
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textAppearance, value=0x0207000e
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textAppearance, value=0x0207000f
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textAppearance, value=0x0207000f
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textColor, value=0x02050002
I: Decoding values*/* XMLs...
I: Done.
Can't find framework resources for package of id: 2. You must install proper fra
mework files, see project website for more info.
c:\Bala\apk>apktool b settings
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\Bala\apk>apktool b settings
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\Bala\apk>apktool b settings
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\Bala\apk>
Click to expand...
Click to collapse
run this from the command line
java -jar apktool.jar if <PATH_TO_YOUR>/framework-res.apk

@t3project
thx but...
c:\Bala\apk>java -jar apktool.jar if framework-res.apk
I: Framework installed to: C:\Users\Balaji\apktool\framework\1.apk
c:\Bala\apk>apktool b settings
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\Bala\apk>

bala242 said:
@t3project
thx but...
c:\Bala\apk>java -jar apktool.jar if framework-res.apk
I: Framework installed to: C:\Users\Balaji\apktool\framework\1.apk
c:\Bala\apk>apktool b settings
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\Bala\apk>
Click to expand...
Click to collapse
let me know if my method helped out.

read more on this @ the apktool wiki:
http://code.google.com/p/android-apktool/wiki/FrameworkFiles
Overview
As you probably know, Android apps use some code and resources that are built into the Android system on your device. Apktool needs these framework files to decode and build apks.
Standard framework is embedded into apktool, so you don't need to do anything for most apk files. But some manufacturers, for example HTC, add their own framework files and use them in system apps. To use apktool against such apps, you must pull framework from a device and install/register it to apktool.
Click to expand...
Click to collapse
so both framework-res.apk & com.htc.resources.apk need to be registered w/ apktool
copy both to your apktool folder then run these cmds:
apktool if com.htc.resources.apk
apktool if framework-res.apk
output will look like this:
Framework installed to: /home/brutall/apktool/framework/2.apk

Search for apk manager here on xda. It will compile and decompile plus many other things. Also will give error log andvwhere to find error and so forth. Its a great tool.
free the dirk

Papa Smurf151 said:
Search for apk manager here on xda. It will compile and decompile plus many other things. Also will give error log andvwhere to find error and so forth. Its a great tool.
free the dirk
Click to expand...
Click to collapse
apkmanager have problems deompiling system apk's...often/always with the xml's in res/values*

j4n87 said:
apkmanager have problems deompiling system apk's...often/always with the xml's in res/values*
Click to expand...
Click to collapse
That's cause the latest version doesn't work so well. I'm using 4.7 and it works great
free the dirk

Related

[Q] How to decompile SystemUI.apk?

Hi there,
With the arrival of my new SGS II I was very interested in making some of those nifty themes myself. Ofcourse I have to know a lot more about Android before I can do anything nice, but we all have to start somewhere
I was looking around on the web and found references to APK Manager and the nice stuff one can do with it. I say one, because I haven't been able to do anything with it yet.
Sure, it pulls the requested apk's, but when I try to decompile say, SystemUI.apk, it gives me an error and nothing else.
The error I get is:
Code:
"An Error Occured, Please Check The Log (option 21)"
Press any key to continue . . .
Then, when I check the log it says:
Code:
--------------------------------------------------------------------------
|di 17-05-2011 -- 18:40:41,89|
--------------------------------------------------------------------------
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
Could Not Find D:\Samsung\SII\APK Manager\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk
Could Not Find D:\Samsung\SII\APK Manager\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\dateq\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a6
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010300a6
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)
Anyone know what to make of this?
Same error for me.
I do not know the cause!!!
You have to install framework resources pulled from a device. But I don't know how to do that using Apk Manager.
If you rename it to a .zip you can extract files from it. for example replacing the battery icons, Just remove the old battery icons and drop the new ones in, in like winrar or something
Sent from my GT-I9100 using XDA Premium App
In my case i use apktool and i have install the framework!!!
Thanks for the replies all, especially apktool, that was a real help.
However, I am now running into a new problem...
Whenever I pull SystemUI.apk, decode it with apk tool and then build it again without doing anything, I notice a reduction in size.
Some people on the net say it needs to be signed, some say that shouldnt be done at all with system apk's.
Anyone have a thought about that?
it needs to be signed!!!use signapk.jar
java -jar signapk.jar testkey.x509.pem testkey.pk8 SystemUI.apk SystemUISigned.apk
I'm running into the same problem myself (sorry for the bump - I just started getting into the modding).
I just get
"An Error Occured, Please Check The Log (option 21)"
Press any key to continue . . .
And in my log
Code:
--------------------------------------------------------------------------
|Tue 19/07/2011 -- 21:24:39.70|
--------------------------------------------------------------------------
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
Could Not Find C:\Program Files (x86)\Android\android-sdk\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk
Could Not Find C:\Program Files (x86)\Android\android-sdk\apk_manager_4.9\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\parker\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)
Click to expand...
Click to collapse
Try option 10 and drag over framework-res.apk and SystemUI.apk into the window of apktool. Worked for me to decompile SystemUI.apk.
Hi
Dont know if you found this thread yet, its over 200 pages
lots of info
http://forum.xda-developers.com/showthread.php?t=695701

[Need Help] Exception in thread "main" brut.androlib.AndrolibException:

Hi Guys
I do this in commandline (win 7 64bit)
apktool b instantPhilipp.apk
Click to expand...
Click to collapse
and get this:
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:243)
at brut.androlib.Androlib.buildSources(Androlib.java:200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:185)
at brut.apktool.Main.main(Main.java:70)
Click to expand...
Click to collapse
How can I fix that?
zocker1996 said:
Hi Guys
I do this in commandline (win 7 64bit)
and get this:
How can I fix that?
Click to expand...
Click to collapse
What version of android is that app for? Jellybean?
___________________
Bacon in my coffee, please? You don't have any bacon?! Unacceptable!!
---------- Post added at 07:48 PM ---------- Previous post was at 07:47 PM ----------
Try http://forum.xda-developers.com/showthread.php?t=1814441
___________________
Bacon in my coffee, please? You don't have any bacon?! Unacceptable!!
triptosyll said:
What version of android is that app for? Jellybean?
Click to expand...
Click to collapse
No, its for my hero (elinux not sure which version, based on cyanogenMod 7.2, 2.3.7)
and btw: i have no freamwork.apk on my pc, as i understanded the sence of these, i only ned it if i use systemapps.
and i instantphilipp isn't a systemapp.
EDIT
I decompiled it again and found this as eror but the decompiled files are there,too:
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Eric Prokop\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=resizeMode, value=0x00000003
W: Could not decode attr value, using undecoded value instead: ns=android, name=minResizeWidth, value=0x00004801
W: Could not decode attr value, using undecoded value instead: ns=android, name=minResizeHeight, value=0x00004801
I: Decoding values*/* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01010363
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:57)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:53)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:35)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:315)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:48)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:102)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:86)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:170)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:113)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:99)
at brut.apktool.Main.cmdDecode(Main.java:131)
at brut.apktool.Main.main(Main.java:68)
Click to expand...
Click to collapse
Push... (i have added some edits ^^)
PUSH
lesiki said:
PUSH
Click to expand...
Click to collapse
I gave u a link to a thread where everyone is talking about this exact thing. Your more likely to get accurate answers there. And a lot more eyes that will see ur questions.
Sent from my Motorola Electrify using xda app-developers app

[Q] Need themers help with apktool

So to get right to the point, I haven't tried my hand at theming in quite awhile. Whenever i did, I really only did 3rd party apps. I have been trying to theme the flashservicebar.apk. Whenever I try to decompile the apk I get errors. Has anyone seen these before, and can give me some hints as to what i am doing wrong? I have read guide after guide, and i know i am missing a small step, but for the life of me I Can't figure out what I am doing wrong. Any help, or suggestions would be greatly appreciated.
C:\android\platform-tools\apktool>apktool d flashbarserviceclean.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\jeramyeggers\apktool\framework\1.a
pk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
requiresFadingEdge, value=0x00001000
W: Could not decode attr value, using undecoded value instead: ns=android, name=
requiresFadingEdge, value=0x00002000
I: Decoding values */* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x010103a5
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:3
5)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
sourceParser.java:313)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
cXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamD
ecoder.java:80)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:130)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
ecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
07)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:9
1)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:238
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Did you install the two framework files, framework-res.apk and twframework-res.apk, for apktool to use when decompiling?
Yeah, I did that. Like I said, I have read som many guides at this point. I am going to reinstall the 2 framework files again. When I do that, it will overwrite them, right? I will go ahead and try this, but as I have said, I have done it already. I don't want to set everything up again. I have java, and andeoid sdk setup right. So I think it is just apktool I am stuggling with. May go ahead, and trycto set up apktool from scratch. It's funny, because the last time I tried hand at theming, I had no problems. I just suck at graphic design.
Sent from my SCH-I605 using Tapatalk 2

Can't decompiling\compiling SystemUI.apk

Hi guys, i use Cyanogenmod 10.1 with a theme, and i would decompile/edit and compile SystemUI.apk but when i try with apktool show me this error
Code:
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\lucry\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
drawable, value=0x01080666
W: Could not decode attr value, using undecoded value instead: ns=android, name=
drawable, value=0x01080665
W: Could not decode attr value, using undecoded value instead: ns=android, name=
drawable, value=0x01080665
S: Could not decode file, replacing by FALSE value: layout/status_bar.xml
W: Could not decode attr value, using undecoded value instead: ns=android, name=
drawable, value=0x01080666
I: Decoding values */* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x01080666
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferen
ceValue.java:62)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResRefe
renceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResSca
larValue.java:44)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:4
0)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
sourceParser.java:313)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
cXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamD
ecoder.java:80)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:130)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
ecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
07)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:9
1)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:238
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
how can i fix this problem??
bump

Assistance decompiling my own APK?

I'm positive these threads are a dime a dozen but now i'm at a loss. I have been working for a number of days on a new android project. I stored the whole thing on my memory stick on my keys which i kept on me at all times.
It however appears that today they have been stolen as i walked through town and i was stupid enough to not backup the data. I've attempted to use ApkTool with all manner of different versions and framework-res files but every single time i'm presented with this error:
Code:
I: Using Apktool 2.0.0-Beta9 on par.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Jayminor\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=touchscreenBlocksFocus, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=paddingMode, value=0x00000001
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01010462
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:60)
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:54)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:553)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:309)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:116)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:169)
at brut.apktool.Main.main(Main.java:85)
I have no smart-guard or obfuscation of any kind on the project and it is all but vanilla. I've no idea why it's posing so many problems?
I'm hoping someone knowledgeable has it in their heart to help me out here Sorry again.

Categories

Resources