yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] johnny quest:
thank you for responding, Ok, I got that part with the select number, but now how do I after modifying my images and xmls put that back into a apk so that I can put it back to my phone. it seems that I'm stuck there. I was able to decompile it but now how do I put the other steps like: compile, sign to apk (steps 11,12 or just do 14) to the file I finished modifying?

here's what I got, its a folder that was decompiled and it looks like a folder with the apk at the end of the folders name. I modded and now want to put it back into that blank looking page icon with the apk at the end. How do I do that, I tried like I said to just transfer the files I modded and use avabox to sign it back and put it back to my phone to install and it says "parse error"
[G1 Android Development] fernando sor:
After you mod the apk you select 11 to recompile. then you have it back in the modded folder with unsigned before the name of the apk
[G1 Android Development] johnny quest:
I was just messing around with it right now, and managed to do all the steps of course it asked me a series of question like "is this a system file" is this good, getting this far?

One more question before I go to sleep and do the whole thing over tomorrow morning, which file is the file that I can take and put it in my phone? because it still looks like a folder but has the apk at the end. Do I take the project one, place apk for modding, place apk for signing?
[G1 Android Development] fernando sor:
when it asks you is it a system app always answr yes. anything can be a system app tech. then you delete what you have modified when you are prompted. after this in the place here for modding folder you will have an unsigned version of what you just modded. it will be an apk file. an app basicaly.

you label it correctly and either put it in a flash or push it via adb
[G1 Android Development] Lento10:
great instruction for linux install

Pg. 81 , post 801
[G1 Android Development] johnny quest:
thank you so much for your help. I can maybe sleep in peace. I literally couldn't sleep. I will try this today and get back to you. thanks again.
[G1 Android Development] fernando sor:
Ok cool. Post how it goes
[G1 Android Development] johnny quest:
I did everything right, but still when I install it on my phone it says "parse error" the only thing I modded was my images(kept it the same size) but changed the names in all the xml's.

Its a analog clock that I modded and changed the images and just put my name on the xml's. didn't change much. The only thing I can think of is probably the "my name.android.com/apk/res/android" string. does this matter? Thats the only thing I can think of.

I'm sorry to keep bugging you, but I'm almost there. thanks again. how do you use the apk manager? I think I'm doing the right steps here are my steps that I used:

1. take an application.apk put it in the modd folder

2. decompile it (a copy goes to the project folder)

3. I take my images and changed xml's in copy them over to the proper

locations to replace the old ones.

4. delete the one thats in the modd folder

5. press the number for compile folder

6. it says unsigned.application.apk in the modded folder

7. press the number to sign apk

(somewhere in between these numbers I put asks if its a system file, I say "yes"

8. I open my sd on my phone and put a copy there and install it, and that's where it says "parse error"
[G1 Android Development] fernando sor:
first you cannot rename xmls or images. you can take an image and insert it over another assigned image but it must have the same dimensions for it to function and look correct. the name stays the same.

after you decompile you make your edits in the project folder. then you recompile. you dont do anything to the original apk that you placed in the place apk here for modding folder.

after you make your edits you choose option 11 to recompile. if you recompile without errors you will answer yes to the first two prompts. then you will be asked to delete anything that you modded. that will be in a "keep folder" delete what you modded and only that. if you modded an xml then you need to delete resourses.arsc also. hit enter. now you will have an unsigned version of your original apk in the place apk here to be modded folder.
[G1 Android Development] johnny quest:
I got it I'll take a look at the strings and make sure there's not spaces and follow these steps. thanks again. I'll let you know.
[G1 Android Development] johnny quest:
ok, everything on the computer was done right and it went pretty good. I got that part down. I installed it to my phone and it installed. I go to the widget and I pick it, but now a shaded area is showing and it reads "error inflating widget" I don't know what this means. I didn't change any image size at all.

This is one and final piece of the process that I need help. I appreciate all you've done to help me through this.

Hey, I GOT IT!!!! yes!!!!! thank you so much for helping me out. It was a string that I changed by mistake.
[G1 Android Development] fernando sor:
Ok cool
[G1 Android Development] johnny quest:
Sorry, One more question I've changed some things in the xml but without messing it up, maybe just changing colors. everything worked out great with all your help and steps. I got to install and on my phone its working great with my images. I wanted to post it on the Market but it still reads the original creator's name. it says "com.creators name.app name" why is it still showing up?
[G1 Android Development] fernando sor:
you can change the name of the app. and sign it
[G1 Android Development] johnny quest:
oh ok, I thought it was something in the:

Meta-inf

cert.rsa

cert.sf

manifest.mf

so it has nothing to do with these files? because I changed the app name before I did the whole process with the apk manager. I can do it again. Leaving work now so I'll post in about 1/2 hr. thanks again.
[G1 Android Development] fernando sor:
no thats the signature
[G1 Android Development] johnny quest:
I tried to change the name of the app but when loading onto the market its says the same thing "the package name of your apk (com.name.apk) is the same as the package name of another developer's app...."

If its the signature is that something I can edit?
[G1 Android Development] fernando sor:
Ive never put an app on the market. Are you putting your app out or someone elses you have modified?
[G1 Android Development] johnny quest:
someone elses that I modified. so this way people can download it from the market instead of me giving them zips or apk files on this site one by one. Is that wrong? if so, I won't do it.

My main objective is to duplicate someone elses files so I can learn from it and see what changes if I change something here and there. I was trying app inventor from google but its hard when I don't have internet access all day until I get home. I can work on my own app and sell it.
[G1 Android Development] wildman:
I am having a issue with using Apk Manager, here is my error log, I already have java installed and adb configured and working pefectly but for some reason I can not get the app to see adb being installed, can anyone instruct me on how to fix this?

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

|Wed 01/26/2011 -- 19:13:30.54|

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

java version "1.6.0_23"

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

Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)

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

operable program or batch file.
[G1 Android Development] Daneshm90:
Is your android sdk located in a path with symbols or spaces ?

Frankly if you can do

Start -> run -> cmd and type "adb" or "java -jar"

and get output instead of "command not found"

I wouldnt worry about it.
[G1 Android Development] wildman:
I am not sure what you mean exactly, I can not edit any apks with the app because it says I am missing abd when it is installed so it makes if a little something I would need to worry about if I want this to work... Here is a image shot after running command, not sure if this helps... ABD is installed in C:/AndroidStuff
[G1 Android Development] johnny quest:
I had the same issues. I'm not an ounce of a dev but have you tried checking your "environment variables"?

making sure the paths are correct.
[G1 Android Development] wildman:
Here is a new error I am having...

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

|Wed 01/26/2011 -- 20:58:35.71|

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

java version "1.6.0_23"

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

Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)

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

operable program or batch file.

java.io.FileNotFoundException: ..\place-apk-here-for-modding\unsignedFolderOrganizer3.2.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.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:\Android\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedFolderOrganizer3.2.1.apk

UPDATE: Still couldn't see abd but figured out how to edit files correctly... Thanks for help
[G1 Android Development] :
What is the version of the apktool is apkmanager 4.9 using? Is is 1.3.2. Is there a windows version of apkmanager using apktool 1.3.1?
[G1 Android Development] mike1986.:
Nobody can fix apktool 1.3.2? Now the source code is out since many days...

http://code.google.com/p/android-apktool/wiki/BuildApktool
[G1 Android Development] fernando sor:
Just download apktool 1.3.1 and drop it in apkmanager
[G1 Android Development] :
That ain't working for me. It compiles ok, but then stuck at boot. I have never had this problem earlier.
[G1 Android Development] fernando sor:
you recompile with no errors and you are unable to boot? is that with one particular project or all projects?
[G1 Android Development] manup456:
Just wondering I sure people have asked what would it take to get this working on a mac?
[G1 Android Development] :
Yes. It compiles fine without any errors but stuck in bootanimation. This happens only when i modify xml's files in framework-res. If i make only png changes, it works fine. The moment i make even a small change to any xml file, it is stuck. I read somewhere there it was a problem with resources.arsc compression. So i tried compiling with compression set to 0, still no luck. Hence, i am not able to theme.

I am attaching the framework-res.apk that is creating the problem. It is only for this ROM that it is creating problems. I have no issues with other ROMS.
[G1 Android Development] Daneshm90:
A log would be useful. Im referring to adb log while booting as to see why android won't boot.

Also can you explain the steps the ur taking when modifying this framework. Thnx.
[G1 Android Development] wildman:
I appear to be running into a issue I cant identify, I have customized almost all my installed apps themes to have a unique unified look without issues but now I am trying to change a icon image on a flashlight app apk, the images is being created in exact size and resolution and replaced without issues but when I install the app the app FC when it is attempted to be run... Is the icon is changed when I go into launcher but I cant figure what I am doing wrong because I am only replacing the icon and no more other changes, is there something different I have to do to replace the icon?

Anyone has any suggestions..
[G1 Android Development] Daneshm90:
Adb log would be extremenly helpful in this case.

Also try lowering the compression in apk manager. Some apps don't like to be slimmed down ;)
[G1 Android Development] wildman:
The file doesn't read any errors for files but it just wont run, I thought about changing resolution but usually the files require a curtain resolution.

Heres log...

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

|Fri 01/28/2011 -- 13:42:57.38|

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

java version "1.6.0_22"

Java(TM) SE Runtime Environment (build 1.6.0_22-b04)

Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

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

operable program or batch file.
[G1 Android Development] Daneshm90:
Oh no i meant adb log.

So we can find out why your app is crashing.
[G1 Android Development] feefeeboomboom:
im trying to recompile the samsung epic framework-res.apk.

it is failing with both the apktool 1.3.1 and apkmanager 4.9.

it is reporting the either the xml is undefined or the .9.png is not alpha...

i cant force build it either using apktool..

anyone lol, im going to be going back and doing some reading but all i want is a THEME.... grr
[G1 Android Development] Daneshm90:
Did you use the dependancy apk?

Is it a themed franework?
[G1 Android Development] feefeeboomboom:
Idk what the dependency apk is and no it was the stock framework that I modded. Idk why it wont recompile..
[G1 Android Development] Daneshm90:
Ok can u decompile / recompile a stock framework apk w/o issues ?

Or even that you can't ?

To be safe try choosing the "dependency" option when decompiling and drag/drop twframework-res into the window.
[G1 Android Development] feefeeboomboom:
I can decompile and recompile just fine, I tried using twframework as an dependency and it still wouldn't recompile... that's why I said I don't get it

Sent from my SPH-D700 using XlDA App
[G1 Android Development] Daneshm90:
Ok so then ur changes are causing it not to compile correctly ?

Disregard the dependency then.

Re-evaluate ur modifications and try again.
[G1 Android Development] Masterbugs:
Thanks very much :)
[G1 Android Development] sn33ky:
i got a problem.

It keeps saying i dont have Java and now i cannot sign my .apk.

I alreddy reinstalled JAVA but witout succes. it keeps saying i have not installed JAVA.

can you help me?

log:

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

|za 29/01/2011 -- 14:47:19,94|

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

java wordt niet herkend als een interne

of externe opdracht, programma of batchbestand.

EDIT: Got it working on other PC
[G1 Android Development] wildman:
I couldn't get abd to work with apk manager, says it couldn't find it but it works fine when I open it.... there is some confusion, the software on pc isn't reading any errors. The issue I have with the edited flashlight apk, it installs without any issue and all looks fine but when I click icon the flashlight app crashes and won't open, the only thing I have changed was the icon in Photoshop CSS. I made sure to match resolution and bit rate but everytime I try to open it after editing the icon it crashes..
[G1 Android Development] Daneshm90:
Re: Apk Manager 4.4 - Makes Modifying Ur Apk A Breeze (Windows/Linux)

I think paint doesnt remove 9 png info, not too sure though.
[G1 Android Development] Brut.all:
Negative, it does. At least Paint from WinXP.

EDIT:

Yep, this is why we need that 9patch decoding :-)
[G1 Android Development] Daneshm90:
Re: Apk Manager 4.4 - Makes Modifying Ur Apk A Breeze (Windows/Linux)

Hmmmm k. How drastic of a change are u applying to the .9 png? can u upload ur simple app ? wanna give it a shot as well.
[G1 Android Development] Brut.all:
Just open it and save. This is enough for most image editors to rewrite a file.

You could create one in ~5 minutes :-) I'm attaching sources and built apk.
[G1 Android Development] Daneshm90:
Hmm i just unpackaged, changed color of the box to red and resaved and repackaged. Besides transparency which paint does not do, the .9 png seems to satisfy its attributes. Here check it out.

Edit: I opened the .9 png in photoshop n edited and saved and repackaged. That seems to work as well :confused:

Im using paint on windows 7, so perhaps they changed how it handles pngs perhaps.
[G1 Android Development] Brut.all:
Yeah, seems Paint from Win7 and Photoshop are these smart applications I was talking about earlier (they copy unknown chunks to resulting file). Gimp isn't ;-)

So it's not so bad as I thought.
[G1 Android Development] Daneshm90:
Just a quick question, is apktool meant to complain if a .9png's properties are changed ? such as the black lines/dots telling it where to expand ?. Cuz i can only compile if i just change the image not its boundaries or wht not.
[G1 Android Development] Brut.all:
You should treat decoded 9.png files as you would have original app sources - you could do anything with decoded 9.png files.

Hmm? Could you give me more info?
[G1 Android Development] Daneshm90:
Lol nvm. I was doing something stupid, i had 2 marked regions :o
[G1 Android Development] okolowicz:
I apologize in advance for such a noob question. :)

What I'm trying to do:

I'd like to modify/edit some Market Widgets so that they match the HTC Settings widgets. I've got an running the Fresh ROM and really like the HTC widgets. However, HTC does not have a matching Brightness widget (and a few others that I use) so I've got a hodgepodge of different widgets that drives me nuts.

I started out by downloading several Brightness widgets, changing the pngs to ones I made in Photoshop but this only partially worked because although the images changed invariably there were other issues such as the placement of the widget relative to others, font size of the label, and/or resized pngs that prevented them from matching the stock Sense ones.

And so the question:

I presume I need to do some xml editing to fix whatever issue I occurs (e.g. the widget placement). Is there a particular xml I should be looking for in the apk that manages ththese types of things? And if so, what are the parameters I should be looking to tweak the placement and/or alignment?

As this is a learning experience for me I don't mind screwing around, reinstalling the app and seeing what happens but, I would be very grateful if someone could better direct my efforts.
[G1 Android Development] Daneshm90:
Im not 100% sure, but look inside the layout folder. The xml filename should give away as to what it does most of the times ;)

Play around with its android:layout_width and android:layout_height parameters. Gud luck.
[G1 Android Development] oMszKikiIzWavyo:
I Don't Think I Can Use Your Program Because Its Still Saying Java Is Not Installed And I Installed It Last Week
[G1 Android Development] Daneshm90:
Go start -> Run -> cmd

Type java

Do u see command not found ?
[G1 Android Development] idroid84:
How do you edit the xml files successfully? I deleted 1 line from the res/xml/default_workspace.xml recompiled and pushed it to the phone. All it done was cause it to black screen until I pushed the original launcher.apk. It is a system file. Tryed no sign-age/sign-age to fail.
[G1 Android Development] Daneshm90:
Lol it depends on wht u deleted. Plus considering apktool removes the signature u gotta resign it and then push it to the phone.

To stay safe try completely removing launcher.apk from ur system.

so remove it from dalvik-cache and system/app. Then do adb uninstall com.android.launcher

Then install the one u modified.
[G1 Android Development] idroid84:
Right let me get this in my head :p

Objective - To delete the search widget from home screen on boot of fresh ROM

1.Pull Launcher.apk

2.Use APK Manager to decompile Launcher.apk

3.Edit res/xml/default_workspace.xml (Remove Search Widget Line)

4.Compile Launcher.apk (Signed or not signed?)

5.Delete system@app@Launcher.apk@classes.dex from /cache/dalvik-cache/

6.Delete /system/app/Launcher.apk

7.Then adb uninstall com.android.launcher > Successful

8. Install edited (Signed or not signed?) Launcher.apk

9. Reboot? (Fails Boot When I Do This)

Someone shed some light please?
[G1 Android Development] Daneshm90:
K so up to step 3 ur right. Step 4 sign it. 5,6,7 is fine. 8 install signed. No reboot necessary it should work right there, if it doesnt then theres something wrong.

Quick note, i thought launcher.db inside data/data folder of ur launcher stores location/info of homescreen widgets.
[G1 Android Development] thatguythatdid:
question about that. So I tried that a couple days ago with rosie.apk and it's better half on /data/data but I got cannot filesystem read only? But I tried it with the com.android.launcher and it works no problem. seems like htc apps don't wanna go.

I'm tired:D great tool
[G1 Android Development] thatguythatdid:
you need to add java to your system path. On windows 7 push the startmenu then right click the computer then choose properties then select advanced system settings then choose environment variables then in the second box scroll to path clickedit and paste this in there

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

You just added java to your system path
[G1 Android Development] Daneshm90:
Im considering you're referring to when u try to adb uninstall rosie ? it might b cuz u didnt remove the apk and the dex file. Try tht, not too sure about rosie, not too familiar with it.

Heres my next project im workin on, let me know wht u guys think.

[YOUTUBE]<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/EAtIfW081Jc&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/EAtIfW081Jc&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>[/YOUTUBE]
[G1 Android Development] Daneshm90:
Now why are you decompiling/recompiling if you are editing icons ?

If you aren't, and are just using the first set of options, then may i suggest lowering the compression ratio.
[G1 Android Development] wildman:
Thank you for the answer, I needed to use the decompliling and compiling option, I was using the simple option since I was only changing icon I thought I was using the right option, but I was wrong... I got it to work now.

Thanks Again for your help...
[G1 Android Development] Lento10:
I have a question for the linux users,

All my folders created by the script seem to need root access, is this normal or did I mess up something?

thanks
[G1 Android Development] elijahblake:
sorry if this has been asked,

I'm trying to edit a theme that has been created via theme porter. I just want to edit the /res/values/style.xml but when i recompile it gives errors and never will recompile correctly.

The theme has v4 files i'm assuming because it was creating using theme porter. Someone mentioned that you can't use apk_manager on files after you've used theme porter, is this true?

If so, anyone have any suggestions rather than starting over from scratch?