yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] timvdhoorn:
when i decompile an systemUI.apk i get this error :

Kan C:\Users\Naam\Desktop\APKmultitool\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk niet vinden
Kan C:\Users\Naam\Desktop\APKmultitool\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk niet vinden
Decompiling Apk
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Naam\apktool\framework\1.apk
I: Loaded.
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
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010300a3
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:59)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:43)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:40)
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:46)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:100)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:114)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
"An Error Occured, Please Check The Log (option 24)"
Druk op een toets om door te gaan. . .

and when i choose 24 to check log it says that he can't find the file or something.. but i got no problems decompiling an framework-res.apk please HELP@!
[G1 Android Development] AliensDroid:
help me I get the error when decompile setting.apk

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)
I: Framework installed to: C:\Users\aditya\apktool\framework\1.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Loading resource table from file: C:\Users\aditya\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=background, value=0x010803ac
W: Could not decode attr value, using undecoded value instead: ns=android, name=background, value=0x010803ac
I: Decoding values*/* XMLs...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 17
at java.lang.String.charAt(Unknown Source)
at brut.androlib.res.xml.ResXmlEncoders.findNonPositionalSubstitutions(ResXmlEncoders.java:165)
at brut.androlib.res.xml.ResXmlEncoders.enumerateNonPositionalSubstitutions(ResXmlEncoders.java:142)
at brut.androlib.res.data.value.ResStringValue.encodeAsResXmlValue(ResStringValue.java:45)
at brut.androlib.res.data.value.ResArrayValue.serializeToResValuesXml(ResArrayValue.java:55)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
[G1 Android Development] morg01:
Edit: wrong thread
[G1 Android Development] Okaham:
HELP! I GET THIS ERROR TOOO????? :confused:
[G1 Android Development] mattmanwrx:
Try with an updated aapt.exe... might be the problem...
[G1 Android Development] :
aapt version shows "Android Asset Packaging Tool, v0.2"

exists a more modern version?

thx
[G1 Android Development] mattmanwrx:
I'm not sure what one that is, or the one you need...

The easiest way to get it (is to search Google, I found it the other day... can't find it on phone browser...) is to update your sdk to the latest one (API 14) and copy the aapt.exe to the apk manager "other" folder (I think it is other folder...

In fact, after writing API 14 I think I searched API 14 aapt.exe
[G1 Android Development] :
ok, this is my sdk version, and is the aapt i'm using, and google music is no decompiling.

thx
[G1 Android Development] Ajthescot:
You have to install a framework from ics also.
[G1 Android Development] :
good.

it works

but i love MusicPlayer to use with GB, not with ICS

it's compatible now, but was compatible when recompile?

thx
[G1 Android Development] Ajthescot:
No probs mate. I have to use ics framework To decompile Google plus
[G1 Android Development] Zivonche:
HELP i get an error when try to compile - dont no way

i put a framework-res from KANGY8 rom for ICS nexus-s

decompile went well i change an XML file in the project folder

than hit 11 to compile and get an error right away after saying "building apk"

this is the log

--------------------------------------------------------------------------
|27 Jan -- 23:09:22.83|
--------------------------------------------------------------------------
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
'adb' is not recognized as an internal or external command,
operable program or batch file.
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\apk_manager_4.9\other\..\projects\framework-res.apk\res/animator
invalid resource directory name: C:\apk_manager_4.9\other\..\projects\framework-res.apk\res/interpolator
invalid resource directory name: C:\apk_manager_4.9\other\..\projects\framework-res.apk\res/mipmap-320dpi
invalid resource directory name: C:\apk_manager_4.9\other\..\projects\framework-res.apk\res/mipmap-hdpi
invalid resource directory name: C:\apk_manager_4.9\other\..\projects\framework-res.apk\res/mipmap-ldpi
invalid resource directory name: C:\apk_manager_4.9\other\..\projects\framework-res.apk\res/mipmap-mdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Zivo\AppData\Local\Temp\APKTOOL711804930242514868.tmp, -x, -S, C:\apk_manager_4.9\other\..\projects\framework-res.apk\res, -M, C:\apk_manager_4.9\other\..\projects\framework-res.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:\Users\Zivo\AppData\Local\Temp\APKTOOL711804930242514868.tmp, -x, -S, C:\apk_manager_4.9\other\..\projects\framework-res.apk\res, -M, C:\apk_manager_4.9\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more

the folder i extract the manager to is C:\apk_manager_4.9 i cant see any reason for it not to find the files

please tell me what i am doing wrong

Thanks
[G1 Android Development] Ajthescot:
assuming you have the latest sdk installed copy the aapt.exe from platform tools to your other folder in apk manager .

copy the framework-res.apk to your other folder also and open a cmd prompt to it .

vista or win 7 hold shift ,right click other folder open cmd prompt here.

and enter java -jar apktool.jar if framework-res.apk

if that dont work i suggest you check out the apktool support

http://code.google.com/p/android-apktool/

maybe others have issues.

i am not on ics my self so cant confirm mate

edit:

i just downloaded this rom to try it for you http://xdaforums.com/showthread.php?t=1432408

i used the framework-res.apk

2012-01-27 21:50:18 (874 KB/s) - `apkver.txt' saved [31/31]

A subdirectory or file projects already exists.
A subdirectory or file place-apk-here-for-modding already exists.
A subdirectory or file place-ogg-here already exists.
A subdirectory or file place-apk-here-to-batch-optimize already exists.
A subdirectory or file place-apk-here-for-signing already exists.
A subdirectory or file projects already exists.
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
Could Not Find C:\Users\Aj\Desktop\ApkManager\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
Could Not Find C:\Users\Aj\Desktop\ApkManager\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedframework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
The system cannot find the file specified.

everything went well doing what i mentioned above
[G1 Android Development] Ajthescot:
you get that error every time you have a clean folder

doesnt mean nothing

just modified that framework again changed colors here and there

deleted resources.arsc and the files i modded

heres the log .

every thing is fine .

same log for every file i have in my themes.

2012-01-28 12:37:08 (1.92 MB/s) - `apkver.txt' saved [31/31]

A subdirectory or file projects already exists.
A subdirectory or file place-apk-here-for-modding already exists.
A subdirectory or file place-ogg-here already exists.
A subdirectory or file place-apk-here-to-batch-optimize already exists.
A subdirectory or file place-apk-here-for-signing already exists.
A subdirectory or file projects already exists.
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
The system cannot find the file specified.
Could Not Find C:\Users\Aj\Desktop\ApkManager\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
The system cannot find the file specified.

something isnt right at your end mate because its decompiling /recompiling fine here.
[G1 Android Development] anupamdas21:
i am modifying a custom theme. i decompled the theme then made changes to drawable-hdpi and xml in layout. everything is okay till now. bt every time i compiled the themes its not getting done.. please tell me the standard compiling procedure to compile custom theme?
[G1 Android Development] heart_crafter:
make sure your xml is formatted correctly...

use an online xml checker...

last line in the xml file can not be left blank...

have fun modifying...

Sent from doubleshot.
[G1 Android Development] chils41:
hi Zivonche

look like you can do two things to get rid of the errors you getting.

1. "Could Not Find C:\Users\Aj\Desktop\ApkManager\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk"

FOR THIS USE OPTION : 12 SIGN APK AFTER YOU DECOMPILE -> EDIT -> COMPILE

AND THEN OPTION : 13 TO INSTALL (IF NOT SYSTEM APK)

IF ITS SYSTEM APK YOU ARE MESSING WITH

> AFTER YOU DECOMPILE -> EDIT -> COMPILE " DO NOT SIGN SYSTEM APK"

> TO INSTALL THEM USE OPTION : 8 "ADB PUSH"

2. Now for all other errors i believe you gonna need new apktool.jar (attached)

and aapt.exe from latest SDK(attached)(Ajthescot also mentioned that).

DOWNLOAD ATTACHED FILES, EXTRACT IT INSIDE YOUR APK MANAGER'S "OTHER" FOLDER. YES OVERWRITE THEM (TAKE BACKUP OF ORIGINAL IF YOU WANT !)

THEN BEFORE YOU PULL/DECOMPILE/EDIT/COMPILE DO THIS FIRST.

1. PULL framework-res.apk (it will in folder "place-apk-here-for-modding")

2. Move framework-res.apk from "place-apk-here-for-modding" to "other"

3. SHIFT + RIGHT CLICK on "OTHER" folder, and open command window (thnx Ajthescot)

4. RUN THIS COMMAND : java -jar apktool.jar if framework-res.apk

(if this returns no error that means YOU ALL SAFE TO PROCEED)

5. Now start pulling any apk you want to mess with.

* IF YOU ONLY WANT TO EDIT PNGs USE OPTIONS : 1-8 (DO NOT SIGN SYSTEM APK)

IF YOU MESSING WITH XML DO NOT EXTRACT BUT DECOMPILE OPTION : 9

AND DELETE resources.arsc BEFORE YOU COMPILE AND THEN PUSH THEM.

i hope this helps

thnx.

---------------------------UPDATE-2-1-12-----------------------------

So today i ran into same error as you.

But only when i use OPTION : 1 to EXTRACT APK

The reason is APKMANAGER used 7z (ie 7za.exe in OTHER folder) to decompress files. Some apks in the same ROM has diff type of compression method i believe.

In my case i am working on DJ_STEVE Ginger STreak (for dell streak 5) ROM and "AccountAndSyncSettings.apk" gives me ERRORS SAME AS YOU DO but not "Phone.apk"

So its the 7za.exe that is unable to extract some apks and giving errors.

let me know what you come accross.

thnx.
[G1 Android Development] dudemaaan:
Hi having trouble using this. I've tried placing my apk file in a few of the different folders and running the script. As example place swype.apk into the "place-apk-here-for-modding" folder then type

#Decompile apk

The cmd window closes and nothing happens

Also tried

#Decompile swype.apk and a few other variations including a path to the file.
[G1 Android Development] Ajthescot:
You should place the Apk in the modding folder run the script file and type 10 and hit enter.

make sure theres no spaces in the file name also.

If your having difficulty running the script. i would have a read through this thread there's more to this application that unzipping it and running.
[G1 Android Development] yoseir2:
Hey guys, I'm using a mac port of this, and trying to recompile espier launcher after themeing it.

I decompile it after putting in the folder, 'place-here-for-modding', theme the file by replacing the folder drawable-hdpi, and replacing/editing the arrays.xml file, and then I compile, and all of this works successfully. Then i try to sign the application, and it tells me that it can't find the unsigned-original.apk, and tells me I need to zip or compile first. This is basically and endless loop and always ends up in this situation where everything works until the signing part, where it cannot find the unsigned apk. Can someone please tell me what I am doing wrong here?

Thanks.
[G1 Android Development] Ajthescot:
When you compile the Apk there should be 2 files in the modded folder. Original. Apk and unsignedoriginal.apk don't move any files just hit option 12 to sign. The unsignedoriginal.apk will change to signedoriginal.apk

Hopefully that helps
[G1 Android Development] AndroidStyle:
This tool is Amazing, im gettin better with it everyday, but i sometimes get stuck with this problems

I decompile apk ex: SystemUI.apk, edited it

But when i try to compile it back i get errors saying that there is one or more images are not defined, Even happens if i dont edit images in folder SystemUI.apk at all.

So what i did is i deleted the images that are "not defined" and it works! :)

By the way, if someone wants the newest Apktool.jar, ill attach it, its 3.00MB

Here is anothe problem and solution for it:

When u install framework-res.apk you sometimes STILL get error that framework is not installed

So besure to install bot framework-res.apk and com.htc.resources.

Trust it me, thats the way works for me...LoL :)
[G1 Android Development] Sneakyghost:
Hello, i am new to this thread, usually i live over at Dansta34's TBD thread in the HD2 section...

I wanted to use this wonderful tool the first time and encountered the Java was not found and Adbwinapi (adb.exe error) error so i did a quick search on the thread and i am very thankful for the above post. After learning how to add custom pathes to the PATH variable i would like to add this aditional solution information here in case it hasn't been done as it appears to be vital for Windows 7 x64 users that have alternate pathes.

Also, i wish to express towards the author of this script that it might be a good idea to somehow make the script run in these environments or at least check on the x64 pathes itself as this manual adjusting is a bit too much for us dumb users... ;)

Basically, i only repeat what the above user already posted, i added the adb path and i wanted to clarify what the exact java and adb pathes are on windows 7 x64.

To have the Java Path correctly added to the Path-Variable, do this:

Right-Click on "Computer", Choose "Properties", Choose "Advanced System Settings", goto "System Variables", there find: "path", choose: "Edit".

Now scroll to the end of the line and add a ; then add:

C:\Program Files (x86)\Java\jre6\bin

And for ADB, add another ; and add this line at the end:

C:\Program Files (x86)\Android\android-sdk\platform-tools

An installed Android-SDK and Java are prerequisites for doing this. If you don't have these installed, do so before adding the pathes!

If this has been covered on the thread i apologize as i have only searched far enough to find the first appropriate answer.

My thought for this post is: better give something back when taking something. Also, having information redundancy is usually good as with different expressions of different users the chances to find something with search functions rise equally.
[G1 Android Development] :
I am having the same issue with bartito. Could you please expound on what you mean by install a framework? Thanks.
[G1 Android Development] Ajthescot:
It's explained in detail 4 or 5post up mate. And in the following posts more detail.
[G1 Android Development] crni6:
Hi...I have this problem,maybe someone can halp me?

I just wont to edit some battery app to remove % on notification icon and I do

1. extract

((edit png files in photoshop(just delete numbers and save))

3.zip ( I use 0 compresaon and its 0,2 mb bigger,couse when I use 1-compr. its 0,7 mb and original is 0,9mb)

4. sing apk

and try to install but its sad "Application not installed"

Where Iam doing wrong I tryyyy 100 times??? :confused:
[G1 Android Development] AndroidStyle:
After you signed apk

Dont try to install it, its system apk you need to Adb push it

Luke this.

Shift+rightclick on folder where you signed apk located at

Open comman promt from there, now type in

Adb remount

Adb shell stop

Adb push

yourapp.apk /system/app/yourapp.apk

adb shell start

Adb reboot

sent using one of Chuck Norris pigeons
[G1 Android Development] crni6:
Its regular app,just wont to edit some pngs and install it again..is thare easy whay?

I repack it and pack again and nothing modify and same stuuf again...I try every thing but cant do it???:confused:
[G1 Android Development] Ajthescot:
post the first part of the error . the first few lines are the important part .

the rest is just followed by the error.

wrap code tags around it though

like this

so it doesnt create a massive post.

im guessing your decompiling an themed framework with bad .9s .

what does the log show after decompiling .

it doesnt show error on screen when there is bad .9s it just creates an extra file in the projects .what gives you the error when compiling .

the log should show you that .
[G1 Android Development] Ajthescot:
as i guessed .

these images are broken

drawable-xhdpi/ab_stacked_solid_dark_holo.9.png".

drawable-xhdpi/ab_bottom_solid_dark_holo.9.png

drawable-xhdpi/ab_solid_dark_holo.9.png"

drawable-xhdpi/ab_stacked_solid_inverse_holo.9.png"

drawable-xhdpi/ab_bottom_solid_inverse_holo.9.png"

drawable-xhdpi/settings_header_raw.9.png"

drawable-xhdpi/editbox_dropdown_background_dark.9.png"

you have 2 options .

1>delete the blank .9 files next to the renamed files .png

and it will give you bad looking images on the phone

or redraw the .9 patch back to the img.

with draw9patch.bat in the sdk

or in photoshop or whatever you use.

one other option

extract an original framework apk "unthemed"

and drag the files you need into the apk you want to decompile with 7zip .

then decompile that .
[G1 Android Development] santacruzdz:
thanks again for your help...i found the problem :)

I never added the ressources.arsc to the decompiled framework-res.apk before compiling ! now it compiles normally but havent tried yet it editing something will let it work..but thats already a BIG STEP for me ;) so let me know please, is that correct right? that i added the ressources(original one) to the decompiled apk before compiling it again ?
[G1 Android Development] Ajthescot:
if you edit anything in xmls in values etc they will be replaced doing that .

you shouldnt have to replace anything in the apks .

not on any of the files i have themed so far anyway.

only files i ever have to replace is the raw folder in com.htc.resources to stop weather fc'ing.

as your running a different phone than i things could be different.

sorry i cant be of anymore assistance on that mate.
[G1 Android Development] santacruzdz:
Just a last question, when i "recompile" should i put the ressources of the original apk in the "projects" Folder ?? because without that ressources, i keep getting errors when recompiling, is that the normal step to follow ? please let me know as im getting confused ...thanks in advance .
[G1 Android Development] Ajthescot:
No that's not normal. Your still going to have broken images..

Look through the folder xhdpi and you will see the files that are broken. Fix them and you will be ok..

<The files from your error log>

They will be blank..9png files.