yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Brotuck:
Guys i keep getting a bootloop when i try to compile framework-res.apk

I have used the option 11 to re-compile everything and said yes to the question is this a system-apk ?

After that i deleted the resources.arsc file in the keep folder, because i am told to :D (only modified themes.xml in project folder)

What should my step be next ?

I tried

-signed

-unsigned

-copy resources.arsc to another zip

-a lot of other stuff i do not recall right now

Any help please ?
[G1 Android Development] Brotuck:
Fixed it works now.
[G1 Android Development] tommytomatoe:
Hey there, upon recommendation fo myn, I decided to try out your Apk Manager. After I got it set up and learned the steps, I was able to change up my Rosie posted here

Today, I tried to make a few changes using a stock Rosie.apk from the rom and iot would not decompile. I am not sure what the error in the log means. Could you please examine and explain it? Like I said, I was successful in using Apk Manager last night but today I am having troubles. I hate to keep bothering myn ;)

I am using Apk Manager 4.9 on a windows 7 64 bit. I have everything set up, as far as I am aware (i.e. Java JDK, Java SRE, and adb). I have everything set up in my environment variables.

(%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Teleca Shared;C:\SDK\platform-tools;C:\SDK\tools;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\Java\jdk1.6.0_23\bin)

Attached is my log.txt. Thank you for all your help. You're welcome to pm me or post here. thank you so much. I should note that the script does create a res, smali, and AndroidManifest.xml in the projects folder under Rosie.apk. Should I ignore the error message then? Thank you very much.

T
[G1 Android Development] STX21:
I'm having trouble getting the script to recognize my java... What version should I install and how can I set it up to be recognized?

Thanks in advanced,

STX21

Never mind, fixed it. Thanks for the awesome program.
[G1 Android Development] luhu:
:eek: it was space's (" ") fault in apk...
[G1 Android Development] ecsnead69:
Gingerbread Compatible?

I am having some issues with some system apps in gingerbread, namely SystemUI.apk. Apk Manager will not decompile the app, it gives a background error. Is this compatible with gingerbread or will apktool need to be updated? thanks!
[G1 Android Development] powder007:
Any ideas at all??
[G1 Android Development] Brotuck:
Thw not declared issues have to do with missing png files.
[G1 Android Development] alonsou:
Folks,

I would love to go thru all 125 pages of good info but if someone can help me out figuring out what I'm doing wrong it will be much faster than reading all those pages.

I have a paid app from the market that I want to mod, I opened it out with APK went to res-folder changed the PNG's that I wanted, then went back to the scrip hit 3 to zip it and then 2 followed by 4 to sign the APK.

It will install ok but right after that I get nothing but FC's?

Anyone can help this noob_themer..lol!

Thanks
[G1 Android Development] tommytomatoe:
Someone correct me if I am wrong. Please. Once a signed market app has been modified you mess up the verification keys that originally came with the app. I also don't think it is legal to do so. The sign option that comes with apk manager will assign a different key. This will cause the app to not work. An alternative to resigning would be to adb push your modified app to system/app/ via this line without numvers:

1.Adb remount

2.Adb push /pathtomod/nameofapp.apk /system/app/nameofapp.apk

Try this.

Sent with Supersonic style.
[G1 Android Development] powder007:
But the png files are there and seemingly properly called out.
[G1 Android Development] Daneshm90:
It is completely legal as far as i know as long as you don't distribute the modified apk.

Only disadvantage of modifying market apps is that you won't be able to update from market. U'll have to uninstall, download update, extract update, modify it, uninstall original, install modified.
[G1 Android Development] Daneshm90:
Let me introduce you to your new best friend : adb logcat

He will tell you exactly why he isn't happy ;)

Edit : Were the png's .9 pngs ?
[G1 Android Development] alonsou:
I'm not really talented at playing with ADB, is there anything else that I can do or this is the only way to go?, if that's the case then I will need to find that talent somewhere lol!
[G1 Android Development] Daneshm90:
If you are referring to why you're app fc's. Then you have two options :

1. Retrace your steps. Are u modifying .9.png's or .png's ?

2. type "adb logcat". Then try and run the app on your phone. Look at what the log says.
[G1 Android Development] tommytomatoe:
Thank you for the information.

A quick question actually. I resize a couple sense widgets (clock and weather) and they build just fine. I push them back and they disappear from the widget add list. I know there us an easy fix but just don't know it. If you can help that would awesome! By the way you've been credited on my themes thread.

Sent with Supersonic style.
[G1 Android Development] Daneshm90:
Hey,

Not sure of this fix. When you push them, have you checked the log to see what it complains about ?

When it doesn't show up in the widgetpicker, its either :

a) Not installed

b) The intent has been removed from manifest
[G1 Android Development] tommytomatoe:
Okay, here is what I have. I decompile. I recompile (without making changes).

I use the original Androidmanifest and Meta-Inf and replace the created ones in the apk from the Clock/dist/HtcClockWidget.apk folder using Betterzip. I push the compiled apk back into /system/app/HtcClockWidget.apk.

This time, it shows up, but I get a force close any time I try to add the clock widget. I get this error in the logcat:

I/ActivityManager( 107): Starting activity: Intent { act=OpenSettings cmp=com.htc.widget.clockwidget/.HtcClockSetting (has extras) }
E/ActivityThread( 107): Unable to add skin resdir=/system/app/Slate.apk
D/SurfaceFlinger( 107): Layer::setBuffers(this=0x5a5ab8), pid=107, w=1, h=1
D/SurfaceFlinger( 107): Layer::setBuffers(this=0x5a5ab8), pid=107, w=1, h=1
D/PhoneWindow( 1605): couldn't save which view has focus because the focused view android.widget.RelativeLayout@482977d8 has no id.
D/dalvikvm( 1678): Rosie launcher will have a 48MB heap
I/ActivityManager( 107): Start proc com.htc.widget.clockwidget for activity com.htc.widget.clockwidget/.HtcClockSetting: pid=1678 uid=9999 gids={3003, 3002, 3001, 1015}
I/ActivityManager( 107): No longer want com.svox.pico (pid 1299): hidden #16
W/asset ( 1678): Asset path /system/app/Slate.apk is neither a directory nor file (type=1).
E/ActivityThread( 1678): Unable to add skin resdir=/system/app/Slate.apk
D/AndroidRuntime( 1678): Shutting down VM
W/dalvikvm( 1678): threadid=1: thread exiting with uncaught exception (group=0x40025a00)
E/AndroidRuntime( 1678): FATAL EXCEPTION: main
E/AndroidRuntime( 1678): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.htc.widget.clockwidget/com.htc.widget.clockwidget.HtcClockSetting}:
android.view.InflateException: You must specifiy a valid layout reference. The layout ID @com.htc:layout/title_1 is not valid.

Where do I go from here? I was able to modify Rosie.apk just fine but the widgets are giving me trouble. Thanks fro all the help.
[G1 Android Development] Daneshm90:
Hey

Try replacing only the files you modified. That is, use the keep folder.
[G1 Android Development] Osleg:
Hello there, first of all i have to admitt that you app is awesome! ^_^

And now i have a question:

Im using apk manager for long time already but only to change images.

Novadays i need to change xmls so, i'm decompiling the apk, changing the needed xmls and hiting "Compile" and..... im getting an error...

Tried to fins an info here but failed. So... maybe stupid question but what i have to do with errors like this:

/home/alex/droid/apkmanager/other/../out/res/values/public.xml:86: error: Public symbol drawable/buttException in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL4217364200648500959.tmp, -I, /home/alex/apktool/framework/1.apk, -S, /home/alex/droid/apkmanager/other/../out/res, -M, /home/alex/droid/apkmanager/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/APKTOOL4217364200648500959.tmp, -I, /home/alex/apktool/framework/1.apk, -S, /home/alex/droid/apkmanager/other/../out/res, -M, /home/alex/droid/apkmanager/other/../out/AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
onbar_inactive declared here is not defined.
/home/alex/droid/apkmanager/other/../out/res/values/public.xml:87: error: Public symbol drawable/buttonbar_pressed declared here is not defined.
/home/alex/droid/apkmanager/other/../out/res/values/public.xml:18: error: Public symbol drawable/buttonbarbackground declared here is not defined.

thanks in advance
[G1 Android Development] dreamsforgotten:
/home/alex/droid/apkmanager/other/../out/res/values/public.xml:87: error:

Public symbol drawable/buttonbar_pressed declared here is not defin

Public.xml res/values/Public.xml, line 87 error image isn't in your drawable-hdpi folder

/home/alex/droid/apkmanager/other/../out/res/values/public.xml:18: error: Public symbol drawable/buttonbarbackground declared here is not defined.

Public.xml line 18 same exact problem. Add these images back into your Drawable-hdpi.
[G1 Android Development] dreamsforgotten:
Using version 4.3 on linux how do we decompile a proprietary file? I don't see the option to link the dependent to the parent file. Choice 11 is sign apk unlike the Windows version.

Windows version is amazing, awesome job btw.
[G1 Android Development] Osleg:
I have this images in the folder, this error might be because in modded this images? (changed their color)

Swyped from Cyanogenmod enabled Desire
[G1 Android Development] caleb4992:
Ok, i can decompile the framework-res.apk from this ROM. But, when i change one xml in drawable and one in values, then try to recompile, when it asks to delete the files i've changed in the keep folder, it completely removes ALL of the values folders.
[G1 Android Development] O.a.T.:
Sorry, but search is down and I need an answer as I'm having problems with my phone. Wanted to png optimize, so I got DeskClock.apk from system/app and ran it through. Does this then need to be re-signed, or is it just basically market apps that need to be re-signed? It might help if there is some way to find out if an apk is signed or not, then I could just follow the pattern. Thanks in advance for this probably oft-repeated question, but like I said search is down.
[G1 Android Development] comdei:
When I try to decomile something it says can't find the framework files for the apk.

What am I missing?
[G1 Android Development] tommytomatoe:
What are you trying to decompile? If it is a proprietary app like sense or something you will news to secompile with dependencees with option 10.

Sent from the Z.
[G1 Android Development] dying4004:
guys i am trying to edit ruby.apk. its a theme for sense 2.0. after decompressing it i edited the images with photoshop. then tried to compile apk. it showed this error.

java version "1.6.0_01"

Java(TM) SE Runtime Environment (build 1.6.0_01-b06)

Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

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
[G1 Android Development] tommytomatoe:
It appears that you must have gotten an error while decoding. You should have anyways. You don't have a apktool.yml. dis you load a sense 2.0 framework? It would he com.HTC.resources.apk

Sent from the Z.
[G1 Android Development] mr_sarge:
I have the same issue than dying4004 when trying to decompile HTC_IME.apk from sense 2.0

I have installed the HTC framework from sense 2.0

I got the error when trying to decompile:

I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\SaRgE\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\SaRgE\apktool\framework\2.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=text, value=0x7f09025c
W: Could not decode attr value, using undecoded value instead: ns=android, name=text, value=0x7f09025d
I: Decoding values*/* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x7f09025c
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)
[G1 Android Development] old.ghost:
Thanks for this good tool.
[G1 Android Development] maverickzero:
Hey guys, this is the first time I used apk manager, so I just might have done something wrong... Im trying to edit the new xperia arc launcher to look normal on my galaxy s, so I downloaded and installed apk manager. But when I install the launcher I compiled from apk manager (even unmodified) it just crashes when I try to open it. Did I miss something?
[G1 Android Development] ecsnead69:
I have just started receiving an error when trying to zipalign? This just started yesterday and I cannot zipalign any apps. I get an error in the log.txt that says zipalign is not recognized as an internal or external command? I have verified that zipalign.exe is in the "other" folder.. Anybody else having this issue? fix?
[G1 Android Development] fernando sor:
Yes. I have had that issue

Badseeds custom y'all
[G1 Android Development] ecsnead69:
So how did you fix it?
[G1 Android Development] ecsnead69:
This is the error from the log.txt, If anybody knows a fix, I would appreciate it, thanks!!

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)

Could Not Find C:\Droid\Apk_Manager_4.8\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged.apk

Could Not Find C:\Droid\Apk_Manager_4.8\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged-signed.apk

Could Not Find C:\Droid\Apk_Manager_4.8\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged-unsigned.apk

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

operable program or batch file.

The system cannot find the file specified.

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

operable program or batch file.

Could Not Find C:\Droid\Apk_Manager_4.8\place-apk-here-for-modding\repackaged-unsigned.apk

The system cannot find the file specified.
[G1 Android Development] fernando sor:
I have been using the optimize zipalign selection and that zip aligns

Badseeds custom y'all
[G1 Android Development] ecsnead69:
That works in 4.8 but not in 4.9... in 4.9 that option just deletes the app altogether?
[G1 Android Development] ecsnead69:
4.9 just deletes the app when I try zipalign with the batch opt folder.?? Here is the log.....

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)

The system cannot find the path specified.

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

operable program or batch file.

The system cannot find the file specified.

The system cannot find the path specified.

The system cannot find the path specified.
[G1 Android Development] Mko979:
Problems installing modded apk file on phone

Hello Everyone, my name is Mike and I just recently installed apk manager 4.9 along with java and adb. I have everything up and running but i'm having a problem trying to mod an apk file. Its not a system file but rather com.android.vending-1.apk, the market. I placed it in the place here for modding folder, extracted, switched out two .png files, zipped, signed and tried to install but I keep getting an error. It says:

java version "1.6.0_24"

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

Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

java.io.FileNotFoundException: ..\place-apk-here-for-modding\unsignedcom.android.vending-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:\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedcom.android.vending-1.apk

The system cannot find the path specified.

It seems that the script cannot find the right path. I have adb and java in my path and so I dont know what this means or how to sign and install the modded apk file on my phone correctly. Any hepl will be much appreciated.

Here is my log as well. Thanks
[G1 Android Development] Mko979:
Also, if it helps I ran steps 0-5 without it throwing any errors but when I run step 6 it appears its going to install but than it says failure [update incompatible ].

It appears that the problem is in the signing, I even tried taking the signed apk that was created in the place here for Modding folder and placed it on the root of my SD card and tried to install it from my phone but it still wouldn't install.

I hope this info helps I've been up all night trying to figure this out.
[G1 Android Development] Mko979:
I think this post will help me solve the problem I'm having with installing the com.Android.vending-1.apk it appears this person was just removing the app from the data partition rather than uninstalling it through the phone and therefore he was getting the [update_failed_update_incompatible] error. However in my case I'm trying to mod the market apk located on the data partition and the only thing I can do is uninstall updates, but i'll see if that works.
[G1 Android Development] thunderteaser:
@Daneshm90 I have some problems using your apk manager! :(

I'm using 4.9 and I'm trying to decompile and recompile my Galaxy S Phone.apk to disable the increasing ring. I already set compression to 0 and max memory heap to 512.

When I decompile and make changes to a smali file and then rebuild, if I choose to keep the files I didn't modify it puts in the apk the unmodified smali files...

But if I choose not to keep the files, it builds the apk with my modified smali file and that's good, but it produces a smaller apk and it force closes (but I can hear the constant ringtone).

I already tried compiling with dependencies thinking that might be the problem, but when I drag my twframework-res.apk it says it's not the right dependency and no apk seems to satisfy it.

What am I doing wrong?

I read somewhere I had to use 4.8, but it doesn't put the original META-INF folder inside the apk so I have to use 4.9.

EDIT: Never mind, I've managed to solve this on my own! I've turned back to the good and old 4.3 for linux, used apktool to install tw-framework-res.apk, then added the manifest and the META-INF folder to the rebuilt package. Thanks for this awesome app! :)
[G1 Android Development] Mko979:
Ok, I think I'm making progress. Using an unpaid app from market I pulled it from phone extracted it, zipped it, signed it, uninstalled the app from my phone, installed it from apk manager and it worked.

However, going back to com.Android.vending-1.apk, I pulled it from phone, extracted it, changed the status bar icons, zipped it, signed it, uninstalled updates on phone, tried to install it through apk manager but it now said failure [failed_parsing_inconsistent_certificates]

My question now is is com.Android.vending-1.apk considered a system file even though its located on the data partition? Do I need to resign it or keep the original signature. Thanks
[G1 Android Development] Daneshm90:
Those are considered co-system apks. So their original file exists on /system but their updates exit on /data. Im pretty sure signatures have to match but could be wrong.

Safest way is to uninstall update (like a regular app) (Make backup of it first)

Then modify it and replace one in system with that.
[G1 Android Development] maverickzero:
Does someone have a link to the version 4.8 for windows of apk manager? Version 4.9 don't seem to be working right for me.
[G1 Android Development] tommytomatoe:
What is your issue exactly? I am sure it is not apkmanager but rather your tools. I had the wrong aapt and apktool 1.3.2 gave me problems so I downgraded to 1.3.1.
[G1 Android Development] Daneshm90:
Ok its time i fixed/updated this script lol.

Need a favour. Try n recall ne issues you're having. Be as specific as you can and report it

here

Next update (4.10) will come with latest tools, some new features + fixed features from current.
[G1 Android Development] maverickzero:
I use only apk manager to decompile and compile again an apk. When I install the compiled apk and try to open it, I get force closes.
[G1 Android Development] tommytomatoe:
Well apkmanager uses apktool to do its work. The latest apktool (1.3.2) has given folks trouble, some anyways. I found a download for 1.3.1 and apkmanager has been working smoothly. Just replace the apktool that apkmanager came with. Also you should note which version of aapt you have. Make sure it is from sdk 8. This was another one of my problems. I hope this helps. Feel free to ask questions. Also, are you properly signing your apks if they are market apps? System apps don't require signing though you need the original verification keys.

T
[G1 Android Development] fernando sor:
The only issue I've had with apktool 1.3.1 is it wont smali Gmail. Anyone having this issue?

Badseeds custom y'all
[G1 Android Development] Daneshm90:
Ok need feature requests. Any of u have ne ?

Aside from stability, currently im trying to implement a update feature so theres a way to keep the scripts tools up2date without users coming to this thread's OP. I was considering non apk tool editing, so only smali/baksmali. Im all ears.....
[G1 Android Development] fernando sor:
The advantage being over baksmali.jar and smali.jar an easier script? Or are you just talking about posting?

Badseeds custom y'all