yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] VinceOB:
Anybody know whats going on here?? Im trying to recompile Launcher2.apk, but I get this....

java version "1.6.0_23"

Java(TM) SE Runtime Environment (build 1.6.0_23-b05)

Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)

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.Parser.getSourceName(Unknown Source)

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

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

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

at org.jf.smali.smaliParser.type_descriptor(Unknown Source)

at org.jf.smali.smaliParser.method_prototype(Unknown Source)

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

The system cannot find the file specified.
[G1 Android Development] ecsnead69:
I am using the newest apk manager that allows you to choose decompile methods. I am working with Dolphin mini and get an error when trying to decompile the resources? Has anyone tried to theme this app or run into another app that errors out on the resources decompile? Sources will decompile just fine..... thanks
[G1 Android Development] thetornado:
I made a change to a smali file and saved it as a project - Since then I flashed my phone with an updated ROM and went to open this project up to push the mod back to my phone but I cant get open the project up.

When I choose 22 Set current project its asking to "Enter It's Number:" - but i saved it as 'android.policy.jar"

How do I open this project?
[G1 Android Development] Johnsondr80:
Enter the # beside your "android policy.jar.

Eg....

1-framewrork-res

2-settings.apk

3-androidpolicyjar

Choose #

Enter
[G1 Android Development] thunderteaser:
I need some help, please assist me! :)

I'm editing a common apk (NOT a framework one, so no *.9.png files!!!) which contains many resources I don't want, so

1. after deleting useless pngs

2. deleting the lines in public.xml that refer to them

3. changing the hex ids accordingly paying attention about not leaving holes

4. editing smali files to reflect the new ids

5. cleaning up the manifest

I'm having an error while recompiling:

I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL5457263987676234202.tmp, -I, /home/user/apktool/framework/1.apk, -S, /home/user/apk_manager_linux_4.7/other/../out/res, -M, /home/user/apk_manager_linux_4.7/other/../out/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, /tmp/APKTOOL5457263987676234202.tmp, -I, /home/user/apktool/framework/1.apk, -S, /home/user/apk_manager_linux_4.7/other/../out/res, -M, /home/user/apk_manager_linux_4.7/other/../out/AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more

While the other times I new if there was something undeclared or else, this time the output doesn't give me any clues. Of course everything is fine if I decompile and recompile without changing anything.

Any clues?!

P.S.: I've already read this topic.
[G1 Android Development] Brut.all:
9png files can be used in any apk file, not only framework ones.

That's weird you didn't get aapt errors. Try to use aapt manually, so:

aapt p -F foo.apk -I /home/user/apktool/framework/1.apk -S /home/user/apk_manager_linux_4.7/other/../out/res -M /home/user/apk_manager_linux_4.7/other/../out/AndroidManifest.xml
[G1 Android Development] thunderteaser:
Thanks Brut.all, I tried giving the aapt command manually but I get a segmentation fault! Do you know what may be causing this?
[G1 Android Development] GoichiHollow:
Java not found.. Sigh..

Anyone know how to fix this? =/
[G1 Android Development] zelendel:
If you would have searched the thread you would have found that you need to add java to your path in enviroment veribles
[G1 Android Development] GoichiHollow:
I did search the thread, I'm not that stupid.

And I found that out aswell, but idk what that means..

I know where it is located, but idk what to add.
[G1 Android Development] zelendel:
It means you need to edit your path to tell your pc where java is located. Do you have a 32 or 64 bit system?
[G1 Android Development] GoichiHollow:
I am using Windows Home Premium 64-bit.

Nvm. Forgot the space between "program files" and "(x86)".
[G1 Android Development] zelendel:
Ok what you want to do is click on start, highlight computer and right click, go to properties, then on the right hand side go to advanced system properties, then on the bottom click on envermental verisbales, you will see 2 boxes. in the bottom box find path and click on it, then click edit, add this to the end of it ;C:\Program Files (x86)\Java\jre6\bin Then reboot. and yes the ; needs to be there to
[G1 Android Development] GoichiHollow:
Found what was wrong, look in previous post, reboot wasn't necessary, but thanks anyway.
[G1 Android Development] zelendel:
Glad you got it working. Yeah A Reboot is needed most of the time but after helping a few with the same, I have come across times when it didnt work till you rebooted. So now I just do it out of habit:D
[G1 Android Development] GoichiHollow:
Okay so, I modified the Arc launcher because I tought the deep blue bottom bar was ugly on dark themes.

1. extracted and then edited the bottom bar by sliding saturation to -100

2.optimized pictures

3.zipped it as system app

skipped 4.

5.zipaligned it

8.adb pushed it

I noticed later I wrote /systam/app/home.apk instead of /system/app/Home.apk

And I have deleted the original one, so now I'm stuck at boot..

In xrec v0.3 atm, but apk manager only says waiting for device, even when mounted systam and usb storage..

Anyway to fix this? Didn't make any recent backup before doing this..

But I hqve it backed up on Titanium if that matters.

Help plz! >.<

Fixed it, adb installed another launcher while stuck at boot.

Can anyone post a How-to, because this was a total fail.
[G1 Android Development] Brut.all:
This may mean two things:

bug in aapt

you did something wrong and aapt does not handle such situation propery, so it segfaults instead of throwing some error

Try to add your changes one after another to find what's wrong.
[G1 Android Development] fernando sor:
1.4.1 is awesome. i use it everyday man. thanks
[G1 Android Development] CdTDroiD:
I get this code:

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

operable program or batch file.

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

operable program or batch file.

Could Not Find C:\Users\CdTDroiD.CdTDroiD-LaPTop\Desktop\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedADWLauncher.apk

Could Not Find C:\Users\CdTDroiD.CdTDroiD-LaPTop\Desktop\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedADWLauncher.apk

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

operable program or batch file.

Its really annoying, everything worked fine before i had to reinstall windows but im sure everything is setup correctly... anyone know what im doing wrong?
[G1 Android Development] thunderteaser:
Thank you very much, I just need some patience. :rolleyes:
[G1 Android Development] tsachi:
manager 5 beta

I see the poll regarding a beta, and I heard people mention they use apk manager 5 but I can't find a download link for that. I tried searching the thread, but didn't find it, is the download available somewhere?

Edit: nevermind - finally went far enough to find the link
[G1 Android Development] CdTDroiD:
Never mind lol, I miss typed my path
[G1 Android Development] sku11man-69k:
"cant find framework resources for package of id: 2. You must install proper framework files. see project website for more info."

what this?..

App: DialerTabActivity.apk
[G1 Android Development] Libbard:
I have a Windows 7 64 bit

and both of Java 64 and 32 bit

when I try to Decompile apk or any things the script just exit...

the log file sead

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)

Task was unexpected at this time.

What is the solution for this problem?!!
[G1 Android Development] Johnsondr80:
For a captivate;

This tells me you need to apktool install "twframework-res.apk" into your frameworks folder.

Just install the same way you installed your framework-res to apktool.

That outta fix ya up.
[G1 Android Development] lockieio:
can someone please help me...so i want to reduce image size in plants vs zombies for X8 users...because it uses lot of RAM and then force closes...

i find this program but i dont know how to do it...my friend discovered that images are stored in pvz.dz file...so if someone can help me how to open it :) tnx alot :)
[G1 Android Development] inline6power:
no matter what i do, no matter where i set my directory. i get this when i try to decompile

http://pastebin.com/Sw94Qyhw
[G1 Android Development] Brut.all:
What framework did you installed as 2.apk? Do you use frameworks pulled from a device with that apk running on it?
[G1 Android Development] inline6power:
yes. pulled the frameworks from the phone and pulled rosie from the phone. only pulled and put the original frameworks apk there but it always says framworks 2 as well.
[G1 Android Development] Motlaq:
i want to arabize an app, so i decompiled it, made changes and saved it. then, i tried to compile it but it keep saying that an Error occured.

what is the solution, please?!
[G1 Android Development] dreamsforgotten:
You n need to post the error. The error tells you exactly what went wrong
[G1 Android Development] Ghisy:
I am used to extracting apk files with apk manager for theming for my HTC Desire. I'm now running LeeDroid 3.0.7 (Gingerbread with Sense).

Now I'm facing a few problems when trying to decompile system apks (Sense):

1/ I need to mod the browser.apk in order to have unlimited tabs. It requires me to edit xml files ("com\android\browser\htc\ui\ImageSlider.smali" and "com\android\browser\TabControl.smali") but I don't know where they are. I tried to decompile the apk but it gives me an error: "Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info". I can't find the mentioned info :(

2/ the ROM has CRT TV off animation built-in but it's now gone after flasing the UOT mod! Which files do I need to edit to have it back? And what should I edit?

3/ has anyone here made a theme for a Gingerbread Sense ROM? Because the previous UOT flashable file worked fine but if I try to add a modded com.htc.resources.apk to the flashable zip, I end up getting a neverending FC on Sense (process.com.htc.launcher). I'm used to make themes for Froyo but not for GB. What am I missing here?

I hope someone can help. Thank you!
[G1 Android Development] fernando sor:
I'm not on gingerbread y yet but i think you need dependencies. Framework-res
[G1 Android Development] Ghisy:
Nevermind, I found how to do it using the SMALI tool. But my other questions are still unanswered so far. Thanks anyway.
[G1 Android Development] DroidXcon:
Ok so i have been working on trying to get this to work for like 6 hours now , you would think i would ask for help at some point.

So im trying to modify Default_Workspace in launcher pro but it never allows me to compile after the changes have been made.

Here is the log output

|Mon 06/13/2011 -- 6:02:03.39|

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

java version "1.6.0_24"

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

Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

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

operable program or batch file.

I: Checking whether sources has changed...

I: Checking whether resources has changed...

I: Building resources...

C:\apk_manager_4.91\other\..\projects\com.fede.launcher-1.apk\res\xml\default_workspace.xml:5: error: No resource identifier found for attribute 'spanX' in package 'com.fede.launcher'

C:\apk_manager_4.91\other\..\projects\com.fede.launcher-1.apk\res\xml\default_workspace.xml:5: error: No resource identifier found for attribute 'spanY' in package 'com.fede.launcher'

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\CYBERT~1\AppData\Local\Temp\APKTOOL5521696425323615571.tmp, -I, C:\Users\Cybertron\apktool\framework\1.apk, -S, C:\apk_manager_4.91\other\..\projects\com.fede.launcher-1.apk\res, -M, C:\apk_manager_4.91\other\..\projects\com.fede.launcher-1.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\CYBERT~1\AppData\Local\Temp\APKTOOL5521696425323615571.tmp, -I, C:\Users\Cybertron\apktool\framework\1.apk, -S, C:\apk_manager_4.91\other\..\projects\com.fede.launcher-1.apk\res, -M, C:\apk_manager_4.91\other\..\projects\com.fede.launcher-1.apk\AndroidManifest.xml]

at brut.util.OS.exec(Unknown Source)

... 7 more
[G1 Android Development] SynisterWolf:
ok so i wondering if someone could help me. i cant get apkmanager it install on my ubuntu system.

i downloaded the files

extracted them to the desktop

changed to root premission with chmod 755 'files'

i also did it with the script.

then i click on the script and run in terminal but nothing happens. it looks like terminal opens then closes really quick. could someone tell me what im doing wrong please?
[G1 Android Development] manuvaidya:
can i add an handler UI for opera/uc browser usin gthis apkmanager ???

i am badly in need of this tweek.... kindly help me regarding the steps on how i do it pls...
[G1 Android Development] pr0x2:
I can't install any apk's I compile :( even when I decompile and compile the apk without editing anything it does not work. I don't get any errors >_>
[G1 Android Development] klquicksall:
You need to update your tools. Search apk manager 5.0. Ill post a link soon.

Also make sure youre decompiling with the correct frame work for system apks.

For exampile in htc devices rosie.apk needs com.htc.resources.apk to decompile correctly.

Sent from my DHD / Inspire 4G
[G1 Android Development] Libbard:
Hi,

I have problem with this program "WhatsApp" It's have a code or something?!

Anyone know how to compile apk successfully!!

I try that and about 5 of my friends but ether of us had something else!! all of us had the same error!!
[G1 Android Development] reekotubbs:
Having a issue that when every I attempt to decompile using option #10 (#9 works with no problems) I get a prompt asking me for dependee and suggest that if I wanted to decompile Rosie.apk, drag com.htc.resources.apk to the screen. When I do this with either com.htc.resources.apk or com.framework-res.apk I get an error stating "Sorry thats not the dependee apk, try again".

I don't understand, following the example states this should work.

Please give better examples with different apk so that we all get this.

Thank you.
[G1 Android Development] mac4rfree:
Ok,, this is the first time i am using this tool. I am trying to decompile a rar file. Once i set up the compression ratio. It is giving me this option.

Choose your app to be set as Current project? Enter It's number :

I have already kept the rar file in the place-apk-here-for-modding folder.

If i give some number, it is saying current project : None.

So, Can somebody help me out here. And sorry for my noob question.

Cheers!!!
[G1 Android Development] dully79:
As far As im aware you cannot decompile rar files, unless someone has developed a tool that can?? This works with apks.

Hope this helps. :)
[G1 Android Development] klquicksall:
Well ive found that you will need the latest apktool 1.4. 1 to decompile sense 3. You will also need to install com. Resouces and framework. The go into the layout folder then quicksettings. Xml and move them around. Dont delete anything.
[G1 Android Development] klquicksall:
Just search apk tool it comes up. Brutt. All apktool
[G1 Android Development] anko184:
I did that and now it completes the compiling without any error, BUT the quicksettings.xml is "compressed" inside the unsignedSystemUI.apk.

Also when i push this file as SystemUI.apk nothing changes in the phone.

Any help?
[G1 Android Development] klquicksall:
You should post in the apktool thread there are certain commands you will need to use to install framework. Also you need to use the original meta int and android manifest from the apk. The new apk doesn't have it. I can help you tomorrow. Send me a pm if you cant get it and walk you through it.
[G1 Android Development] mac4rfree:
yeah thanks,, once i placed the apk it worked thanks for your info...
[G1 Android Development] famonaco:
hi friend, i have a little problem, i modify the framework res but when i recompile it, nothing out in out folder (or build i don't remember) why???

thx in advance
[G1 Android Development] dully79:
The output apk Is in "place here for Modding" and named unsigned****.apk
[G1 Android Development] famonaco:
i know mate but i haven't this, it's like don't recompile nothing, i have a desire hd gingerbread :confused:

maybe a problem with xml files
[G1 Android Development] Yorzua:
apk tools

You must have "place here for modding " folder in your apkmanager stuff.

if not, dont even try to decompile, as it will never find the apk source to work with.

i already pointed to my tutos but seems like you dont want to read...

I took time to prepare a kit for beginners _ all explained as easy as possible.

You must read carefully to learn "mate ":cool:

Hope it helps you

And say thanks at least for those who answer you...

Thats why i stopped to answer yours pm 's buddy
[G1 Android Development] dully79:
When I was on Linux I didn't have any of the folders that should have been there. I just opened the script with a text editor, discovered what was missing and created them, problem solved. :)
[G1 Android Development] famonaco:
mate, i have done all that you have written ;)

btw don't recompile nothing :(

and always say thx, in your ocean, your tutorial and when you answer me pm ;)

see ya

ps: don't recompile because maybe is an manifest.xml issue because if i don't change nothing works very well :)

it's a very good application
[G1 Android Development] inspired55:
this works great fpr me on any apk that doesn't start with com. Why not com. apk's ? Just trying to change icons. it decompiles it recompiles it signs it and will install just won't run. Seems any apk running in data\app folder i can't change anything. Am i missing a step or what?
[G1 Android Development] klquicksall:
Don't sign system apps. Icons are just pngs. Just open the zip not extract and replace the pngs. Make sure you keep the same name of the icons.
[G1 Android Development] inspired55:
tried that app won't install at all. Now what? any Ideas?
[G1 Android Development] Madala_ZA:
You need Android SDK.. it uses adb and other components..
[G1 Android Development] inspired55:
used sdk to push the file, tried installing from sd card, tried putting file in data/app folder and changed permissions. Nothing seem to work. plz what am I doing wrong. Maybe not using sdk correctly??? Its got to be something i'm doing wrong and its driving me crazy..
[G1 Android Development] Madala_ZA:
What app is it? Did you sign it?
[G1 Android Development] inspired55:
No i did not sign. All i'm trying to do is changing the app icon. Didn't extract file as was instructed in earler post. It doesn't matter what app it is, only happens when apk starts with com. and resides in data/app folder.
[G1 Android Development] silverxbv2:
Any changes made to market apps requires them to be signed. And there is no guarantee that they will work, but most do.

Apps in data= signed

Apps in system= not signed

http://www.dropbox.com/referrals/NTEyOTE1MzA3OQ
[G1 Android Development] Pons:
I'm getting two different, but related, errors. The first is when I decompile /system/app/Phone.apk from a CM7 Nightly:

Please make your decision: 9

I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Decoding resources...
I: Loading resource table from file: /home/ponsasinorem/apktool/framework/1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=id, value=0x01020227
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01020227
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.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)

But it "seems" to work correctly with all decompiled goodness. So, I make my changes and try to recompile, it says:

Please make your decision: 10
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: 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