yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Rolando.Ramiro:
i found out a way to get passed the whole error.

took alot of trouble shooting BUT.....

1. grab the .apk you want to edit. (lets say we want to mod SystemUI.apk)

so you put that into 'place-apk-here-for-modding'

2. grab the 'framework-res.apk' and also put it into 'place-apk-here-for-modding'

3. open up script and type in ('22') and it should show this...

4. once you hit enter, you should be back to the main screen that shows all the options.

5. press ('9') and it should decompile the .apk with no issues.

(if this helps please press thanks!)

but if not....

wellll then idk. lmao
[G1 Android Development] mattmanwrx:
Picture not showing matey...
[G1 Android Development] gil80:
Mates, thanks for your help so far. However, I'm still encountering issues when recompiling APK.

http://xdaforums.com/showpost.php?p=16837938&postcount=2186 <-- Logs
[G1 Android Development] mattmanwrx:
delete public from res/values to get rid of all the public errors.

other errors include .9.png patches... recompile without public there to show the real errors!

ERROR: Failure processing PNG image C:\APK manager\other\..\projects\framework-res.apk\res\drawable-hdpi\bottom_bar.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\APK manager\other\..\projects\framework-res.apk\res\drawable-hdpi\editbox_background_focus_yellow.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\APK manager\other\..\projects\framework-res.apk\res\drawable-hdpi\editbox_background_normal.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\APK manager\other\..\projects\framework-res.apk\res\drawable-hdpi\list_selector_background_focus.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\APK manager\other\..\projects\framework-res.apk\res\drawable-hdpi\list_selector_background_longpress.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\APK manager\other\..\projects\framework-res.apk\res\drawable-hdpi\list_selector_background_pressed.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\APK manager\other\..\projects\framework-res.apk\res\drawable-hdpi\tab_focus.9.png
[G1 Android Development] Rolando.Ramiro:
sorry, i forgot to add the http:// part.

lemme know how it goes.
[G1 Android Development] lanternslight456:
I'm new to this thread and also curious about this. The download link says 4.3 but the download file says 4.7 but I see that there is a 4.9 out.

Just my observation. I'm excited to start using this tool and to get into app building.

Thank you for a cool looking tool!
[G1 Android Development] mattmanwrx:
Well, I have just stumbled upon this...

http://xdaforums.com/showthread.php?t=1227179

which they are saying is an updated version and called it Apk Manager 5.0...

The OP was 5 days ago... :)
[G1 Android Development] gil80:
Ok, I've done as you asked.

Here is the new log with the errors of recompiling.

Thanks :)
[G1 Android Development] moahrs:
I noob in this app...

I need to remove the display panel that in the top of xperia arc home, XperaArcMod.apk (I downloaded in another post), because in x10 mini pro this launcher in very good, but this indicator panel stay in midle of the top of screen.

I extract, decompile, then I founded the display.xml, changed, and now i dont know how i can do. I Compile only ? Zip again ? With signature (i dont kno if is system app), but i try many options, and all options dont install... The more funcional, is compile (dont zip), but same, the apk dont instal, in the final screen of install show "APP not installed."

Ty for help

Moacir Jr.
[G1 Android Development] gil80:
ok I read the link you provided.

Just a quick question.

If I decomplie and recomplie stock framework-res.apk - then I have no errors.

If I do the same with non-stock framework-res.apk - I do have errors.

Is it possible to decomplie STOCK framework-res.apk, alter /res/values/bools.xml file, recomplie the STOCK framework-res.apk back and then, open ALTERED-STOCK-FRAMEWORK-RES.APK with 7zip and open the NON-STOCK-FRAMEWORK-RES.APK file with 7zip and copy over all the files in the non-stock to the altered-stock?

If that will do, then it's no problem. The main issue is will the altered XML file in values folder will remain since it's not visible with 7zip and therefore I'm not over-writing that folder.

I hope you understood me :)

Thanks ;)
[G1 Android Development] mattmanwrx:
I have not really taken a look in bools so don't know what is there or what you are editing but yes, if it compiles with the edited bools you could then just swap the images, however, they may not all work as there were a few .9 errors...
[G1 Android Development] yahya.hamid:
I am stuck.

I am trying to mod a market apk and its not system. All i want is to to switch off notification preview in that app from within the strings.

Decompilation goes fine. Simple text editing via notepad and then saving and compiling gives error.

Next i tried to decompile the original app and then recompile WITOUT any change. same error.

Logs are reproduced below. If i get the same error whether i change it or not that means there is somehting not wrong with the change itself but my method of decompiling or compiling and i maybe doing something wrong.

Path for java and adb is correct.

Java(TM) SE Runtime Environment (build 1.6.0_27-b07)

Java HotSpot(TM) Client VM (build 20.2-b06, 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.jf.smali.smaliFlexLexer.getErrorHeader(Unknown Source)

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

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

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

at org.jf.smali.smaliParser.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)

Any help?
[G1 Android Development] faiyyaz:
Help!!

i am a noob.. can someone help me with proper steps for editing an apk.. i tried few things.. after editin in project how do i make it working in my ROM..coz it shows "application not installed".. any help will be appreciated. :)
[G1 Android Development] mattmanwrx:
What is the apk? Is it a system apk? Did you keep the signature? I'm new to this myself though, so may not be able to help...
[G1 Android Development] KOala888:
I have problem with signing apk, its an icon pack for lpp

java.io.FileNotFoundException: ..\place-apk-here-for-modding\unsignedS.apk (Nie można odnaleźć określonego pliku)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at com.android.signapk.SignApk.main(SignApk.java:437)
[G1 Android Development] mattmanwrx:
It can't find the file "unsignedS"... you compiled then signed yes?
[G1 Android Development] KOala888:
exacly

decompiled,added a few icons,compiled and tried to sign
[G1 Android Development] mattmanwrx:
Very strange... it is saying that it cannot find the unsignedS.apk... maybe try option 22 to choose that app and then sign?
[G1 Android Development] myn:
I get the same error too.

Tried it with Apktool 1.3.1, 1.4.2 and 1.4.1.

http://pastebin.com/K97AbYFN
[G1 Android Development] ATZ-007:
Trying to decompile SystemUI.apk from sense 3.0 rom. Tried this method but no luck.
[G1 Android Development] KOala888:
I have tried it too, failed.
[G1 Android Development] creeve4:
deleted...
[G1 Android Development] mattmanwrx:
Could you not just zipalign the apk manually... cmd and CD to adb/tools and type zipalign -v 4 appname.apk appname-1.apk

What I do for my app all the time :)

All taken from here http://developer.android.com/guide/publishing/app-signing.html
[G1 Android Development] toebee76:
Is there something special that must be done for CM7 theme chooser app's? Every time I build and sign an apk it wont show up in the theme chooser app. I have even tried decompiling the templatebread.apk then compiling, and signing with no changes and it still won't work. Any help would be appreciated.
[G1 Android Development] mattmanwrx:
I followed a brilliant guide found here... http://xdaforums.com/showthread.php?t=964391
[G1 Android Development] toebee76:
Thanks for the link. Unfortunately that's the link that led me to this thread. I can't figure out what is changing. If I install the templatebread.apk directly it will work fine. However if I decompile, compile, and sign the templatebread.apk it will install but it wont show up in the theme chooser app. I have the same result even if I don't make any changes.
[G1 Android Development] mattmanwrx:
Ok, but if you could check again, compile, sign and install and then go back to theme Chooser and check again... see if it is the very first one without a preview (so seems like it isn't there) and will have the name /@string_name (I think)... if so it is because in android manifest you do need to remove the "/" for apkmanager to read it....

Hope this helps you...
[G1 Android Development] toebee76:
Ahhh ok I think I understand now. I am away from my computer at the moment to double check. I will check asap. Thanks for the help :D
[G1 Android Development] mattmanwrx:
No problem. Do you have the app in the phone to check to see if it there as I mentioned?
[G1 Android Development] toebee76:
Yeah that was exactly it. I just tested everything out and its all working now. Thanks again!
[G1 Android Development] :
I do recommend only using this handy dandy tool to edit xml files or to even smali and baksmali. You're getting the .9 drawpatch error because either:

A. You editied some .9pngs wrong

or

B. You tried to decompile a framework-res.apk that wasn't complete or as close to possible stock.

Solutions:

Try using APK Manager for just the xml edits then using a file archiver like 7zip or something of that nature to do all the pngs you are editing. I use it like this and everything goes really smoothly. Also a tip if you do not know this already. But when compiling a system app you do not sign it. If you sign it you have to then sign all the system apps.

Hopefully this method will work for you.

Regards,

Tom
[G1 Android Development] xXG4Xx:
hey hello, someone help me, this is my error:

--------------------------------------------------------------------------
|Sat 09/03/2011 -- 4:25:09.27|
--------------------------------------------------------------------------
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) Client VM (build 20.2-b06, mixed mode, sharing)
Could Not Find C:\Users\xXG4Xx\Desktop\Apk Manager OFICIAL 4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk
Could Not Find C:\Users\xXG4Xx\Desktop\Apk Manager OFICIAL 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\xXG4Xx\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)

:confused:
[G1 Android Development] koyote_0942:
me talking about this edition of the only drawable folder or another folder more? I just want to change the color of those that are designed botons could you tell me through my folder and file to xml I have to directed,the botons is popup_full_bright.9g,toast_frame.9 etc...

EDIT: solved my problem
[G1 Android Development] Indirect:
-------------------------------------------------------------------------------

Please make your decision:9

Could Not Find C:\Documents and Settings\****\Desktop\Android Dev\place-apk-her

e-for-modding\../place-apk-here-for-modding/signedNetflix.apk

Could Not Find C:\Documents and Settings\****\Desktop\Android Dev\place-apk-her

e-for-modding\../place-apk-here-for-modding/unsignedNetflix.apk

Decompiling Apk

I: Baksmaling...

I: Loading resource table...

Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: s

pec=0x7f030003 layout/playout_splash, 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 Sour

ce)

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)

"An Error Occured, Please Check The Log (option 21)"

Press any key to continue . . .
[G1 Android Development] fezzy102:
just need a little help.
[G1 Android Development] dewasha:
thanks!!!!
[G1 Android Development] sn0b0ard:
Try downloading the latest apktool jar from http://code.google.com/p/android-apktool/ and replace the one that comes with apk manager in the other folder. I got this error when trying to decompile an APK and found that the problem was that there are multiple screen resolutions in the apk that are causing apktool to error out (I'm still learning this here, so sorry if my terminology is off or if im being vague). A commit was released to the apktool source that fixed this a while ago, but since the apktool jar in apkmanager is an older version, it doesn't have this fix. I replaced it and viola! It now decompiles :) Hope this works for you.
[G1 Android Development] elscene:
Thanks so much for sharing your talent. It works great!
[G1 Android Development] tcibo:
adb was not found what to do?
[G1 Android Development] chriscx:
I have adb.exe but I dont know what to do, where to put it ?

edit: i have a folder c:\android-sdk-tools, I did the path but apk manager dont find adb

EDIT 2: i will use flashtool as apk installer

edit 3: i have so many errors, i have a signed_filename.apk but im not sure if it's signed or not

edit 4: it doesnt read the file log

im bored
[G1 Android Development] Gvdn:
i am a total noob but i think u need to put adb folder in your path of windows

look here http://xdaforums.com/showthread.php?t=1241935
[G1 Android Development] ImSherlocked:
Guys I need help. I have been trying to modify my SystemUI.apk for adding notification bar power widget.

First problem is I am getting following error while decompiling and compiling:

The above error is not a show stopper as the file get decompiled anyway.

Then I add the image file files to "res/drwabale-hdpi" folder. Then I edit the .xml and .smali files as needed.

The big problem I face is when I try to recompile the apk.

Here's the steps I follow to recompile the apk...

Am I selection the right choices here? After this apk manager prompts me with the following. I never understood how this "KEEP" folder thing works!

It asks me to delete any file that I modified. But, I don't find my images that I added to the "res/drawable-hdpi" in the "keep/res/drawable-hdpi" folder!

Second, it asks me to delete resources.arsc if I have modified the .xml files. In my case I have modified the .xml files. So I delete the resources.arsc.

I have modified the .smali files also, should I delete "classes.dex" file?

Now If I delete resources.arsc and continue with the script, it generates an Unsigned apk.

The first thing I notice is the unsigned apk is smaller in size than the original apk, when it should have been bigger!

When I open the unsigned apk with zip manager (7z), There is no resources.arsc file in there!

What am I doing wrong? How do I go about getting it to work?

Thanks for your help :)
[G1 Android Development] Kasimodo:
Hello,

Well, it's the first time I use Apk Manager. So... sorry in advance.

I'm trying to edit 2 values in "bools.xml".

This file can be found in the "res" directory from "framework-res.apk" file.

If I try to "de-7-zip" the file, the value directory is not shown so I can't edit the bools.xml file.

But If i decompile with apk manager, ALL files are here.

But there is a first problem for me: if decompiling seems to work fine, there is some lines in "log" files:

So first, I'm not sure that all work is done?

The second problem is during the build. The script stopped with errors.

All apps are from the last build (apk manager, apktools, ...)

Any idea?

Regards,

Kasimodo
[G1 Android Development] Gvdn:
last build u mean 4.9 or 5.1?
[G1 Android Development] Gvdn:
Try upgrading java to 1.7

Edit: also noticed you are running SE edition. U need developer version. JDK 1.7

Also get the android SDK . Look for a guide how to.run adb on the forums. Its brand new with all links to downloads.

I am totally new to all this but at least doing this won't do any harm if it isn't the solution.

Also some real developer correct me if i post incorrect info so i can remove it.
[G1 Android Development] Kasimodo:
Hmmm... I mean 4.9. You say there is a 5.1 version...?

I'm going to find it.

Thanks

Edit. Ok I found it.... it was 5.01 for Win and 5.0 for Linux. Ok. this time no big issues. Thank you again
[G1 Android Development] Gvdn:
Indeed 5.01 is that one i ment :) Glad it helped
[G1 Android Development] dsmitty166:
thanks I'll try that. Already have the sdk, I'll see if java updates help me at all.
[G1 Android Development] dsmitty166:
Where is this version?
[G1 Android Development] Kasimodo:
You can find it here
[G1 Android Development] dsmitty166:
Still getting this error...

--------------------------------------------------------------------------
|Sun 09/11/2011 -- 12:28:58.44|
--------------------------------------------------------------------------
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)
java.io.FileNotFoundException: ..\place-apk-here-for-modding\unsignedcom.swype.android.inputmethod-1.apk (The system cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at com.android.signapk.SignApk.main(SignApk.java:437)
Could Not Find C:\Users\David\Desktop\APK Manager 5.0.1\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedcom.swype.android.inputmethod-1.apk
java.io.FileNotFoundException: ..\place-apk-here-for-modding\unsignedunsignedcom.swype.android.inputmethod-1.apk (The system cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at com.android.signapk.SignApk.main(SignApk.java:437)
Could Not Find C:\Users\David\Desktop\APK Manager 5.0.1\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedunsignedcom.swype.android.inputmethod-1.apk
[G1 Android Development] Kasimodo:
It seems your script is installed in a Directory with spaces and special caracters.

1. You can rename it and maybe solve your issue...?

2. Have you installed the Android SDK?
[G1 Android Development] dsmitty166:
I have the SDK installed...

I'll try the spaces

EDIT:

Still getting this

|Sun 09/11/2011 -- 16:42:06.18|
--------------------------------------------------------------------------
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)
java.io.FileNotFoundException: ..\place-apk-here-for-modding\unsignedunsignedcom.swype.android.inputmethod-1.apk (The system cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at com.android.signapk.SignApk.main(SignApk.java:437)
[G1 Android Development] Toldo:
I'm trying to decompile and compile framework-res.apk from SGS. I'm taking a stock one, decompiling with dependancy (twframework-res.apk), change graphics in drawable-hdpi. Then I choose compile, and I get an error. New file is generated but it's a couple fo mb's smaller then the input file, and it doesn't work anyway. Here is my log: http://pastebin.com/Jzk1ia8r

Any idea? Maybe it's that I'm using a x64 Win7?
[G1 Android Development] mattmanwrx:
Delete Res /values /public... then try to compile again :)
[G1 Android Development] Toldo:
Yeah, well that gives another error saying that the public.xml is missing.
[G1 Android Development] mattmanwrx:
Strange... cos when ever I compile my theme.apk app I delete public.XML and it gets generated while compiling... show me the error which says the public is mission please?
[G1 Android Development] Toldo:
http://pastebin.com/APuxpT4f
[G1 Android Development] mattmanwrx:
So that is not saying that there is no public... you have no resources for the given XML's....
[G1 Android Development] Toldo:
An that is? As I said, I've just overwritten some png's in drawable-hdpi, didn't touch anything else.