yashsingh1/xdaforums huggingface dataset:
[Android General] kenzolo:
when I try to install framework I have this error...what is wrong?

using last version ok apktool for 4.4 rom
[Android General] Fujitina:
Application not installed

Hi guys, i was really looking for a tutorial like this, i'm new in decompile/recompile application, so i started from the easier example to learn how to:

1) i coded the classical "Hello World" apk, just added a toast with "Some text here"

2) i followed step by step the guide in the 1st thread

3) i modified the .smali file just changing "Some thext here" in "Some modified text here"

4) i recompiled & zipaligned as described in the 1st post

5) i tried to reinstall the modified apk on the phone ( i run Cyanogenmod 10.2 on a Galaxy S2) , but doesn't work ... it say "application not installed"

Can someone help me to understand where i'm wrong? thank you :D

EDIT:

ok, i forgotten to sign apk, now installation process succeed, but text doesn't change ... it still appear "some text here" instead of the modified "some modified text here" :|
[Android General] shan26:
help

Good day sir..

can help me with this?

every time I tried to recompile that apk, i cant see the dist folder.

please help me.. what should I do?

Hope you help me..

Thanks :)
[Android General] Fujitina:
Damn, my bad ... i was a little bit inattentive ... at point "k - now sign the apk" i used the original .apk file instead of the one inside the /myapk folder created at point "j".

now all works fine, i'm sorry for my distraction!
[Android General] MikiGry:
Q

In request sections there are 3 versions of apktool

I should install all of the versions on one of them ?
[Android General] fieldsweeper:
I have modified the file in the apk that I would like to but, i cannot seem to get it to the device, seems like im getting issues trying to zipalign. or to sign the apk depending

steps:

placed in "place for modding" in apktool

decompiled

modified it

compiled it

signed it

zip aligned

sometimes i get errors trying to sign it and or nothing for zipaligingn it i moved zipalign from sdk toold to the apk tools folder. and it doenst give me errors but moves so fast it does not give any output. but when installing it says it is. and waiting for device then installing...... then error

cannot see the error it goes away to quick. but when i try to move the APK to my phone it is nothing but a file.

how can i get this to be an APK that works, and i can drag and drop to my phone to install (i zipped it using normal comppresion) but it says its installing then says could not install ?????

should i try zipping the apk using store?

All i did was decompile and edit the classes.dex file. (did those ok) but after that i am stuck and frusterated. a very simple step by step would be better.

like were to put the files. since the stuff on here is not a system apk. im not sure where to go?

I think it worked if i did it right, either way it installed i used option 18 instead lmao. didnt think it mattered (just went down the list) why was that an issue??
[Android General] dnesh.sharma:
Thanks for the guide. Will try it....!!!
[Android General] D2Y aka E:
guide center notificasi on statusbar like miui

sir .. i want to make the middle of the statusbar notificasi cm10.1 if you can help me by publishing a tutorial
[Android General] ibanez7:
I'm sorry for late reply... i'm busy with my latest theme/mod...

i think you wrong when editing file, (xml, smali or png.9) so when you recompile it is error... I'm sure if you are correct, then the compiling process will run fine

Just select one

what the name apk that your edit? and what do you change from apk file?

please give me the details.

just post the example (screenshot)
[Android General] D2Y aka E:
The one example that I get in one of the social media forum
[Android General] khusika:
Apktool updated to 2.0.0 beta 9. Can you update your tool [MENTION=4569900]ibanez7[/MENTION] ?

See this link, for more info

http://connortumbleson.com/2014/02/apktool-2-0-0-beta-9-released/
[Android General] Praetoriani:
Hi Guys. I have some questions about decompiling/recompiling apks and hope somebody can help me.

I am using a Galaxy Tab 3 (GT-P5200) running with a rooted 4.2.2

I exported the framework-res.apk from the Tablet, decompiled & modified it.

When I recompile it, I always get following warnings:

W: Could not find sources
I: Building resources...
aapt: warning: string 'default_audio_route_name_hdmi' has no default translation in C:\Android\APK\framework-res\res; found: en_GB es
aapt: warning: string 'default_permission_group' has no default translation in C:\Android\APK\framework-res\res; found: en_GB es
aapt: warning: string 'perms_hide' has no default translation in C:\Android\APK\framework-res\res; found: en_GB es
aapt: warning: string 'perms_show_all' has no default translation in C:\Android\APK\framework-res\res; found: en_GB es
Warning: AndroidManifest.xml already defines minSdkVersion; using existing value in manifest.
Warning: AndroidManifest.xml already defines targetSdkVersion; using existing value in manifest.
I: Building apk file...

Can I either ignore those warnings or do something to fix them?

When I compare the original file with the newly compiled framework-res.apk, I recognize a size difference of nearly 10MB (!!!)

» The size of the recompiled framework-res.apk is smaller than the original one :eek:

I am just wondering about this enormous difference because I just made some small modifications to the framework-res.apk

Hope that anybody can help me

:fingers-crossed:
[Android General] agismaniax:
Afaik, it's only some warning about language translation and your new framework-res.apk is still usable. Before you use new apk, don't forget to copy AndroidManifest.xml and folder META-INF from old apk into the new one and don't sign it. Use 7-zip to do the copy. Cmiiw.

Sent from Polytron W8470 using Tapatalk
[Android General] Praetoriani:
Thanks agismaniax for your answer. So I can use my modified framework-res.apk

(after copying the AndroidManifest.xml and META-INF from the original framework-res.apk to bypass the sign-process)

even if the size of my new APK is nearly 10MB smaller?!

:confused:

And by the way, .... why won't TWRP let me flash the modified framework-res.apk?

I mounted the system-partition in TWRP to make it available to the flashing-process.

Well, I think I'm gonna try the Framework Flasher.
[Android General] agismaniax:
You can try manual copy using file manager in TWRP or Aroma File Manager (I prefer aroma file manager to do that). Don't forget to mount /system, copy your old framework-res.apk into sdcard, copy your new apk into /system/framework and change new apk's permissions into rw-r--r--. If your tablet gets bootloop or force close, go to recovery mode and revert back the copy process.

Sent from Polytron W8470 using Tapatalk
[Android General] Praetoriani:
Big thanks Man

:good:

Your answers made most thinks clear to me

:D

Your recommendation of Aroma File-Manager sounds good.

I think I'll give it a try

:)
[Android General] Praetoriani:
Hi SamsunguserXD.

According to your Username, I guess you are using a Samsung device

;)

But would be helpfull, if you can give us some more details

:good:
[Android General] SamsunguserXD:
Sure bro:) I use a Samsung Galaxy S Advance GT-I9070 with stock android 4.1.2 JellyBean and CoCore E-8.2 Kernel...that's all :) i hope this helps you :)
[Android General] Praetoriani:
Well, I just started learning and trying to understand Android based systems.

Everything I can tell you is, that I got a simmilar error when I tried to recompile the framework-res.apk from my Galaxy Tab3

I could fix the error by setting up the framework not only with framework-res.apk

I don't know which files are in your /system/framework/-Folder.

In mine there was framework-res.apk (which I wanted to edit) and twframework-res.apk

I took both files an set up my environment with apktool by entering:

apktool if framework-res.apk
apktool if twframework-res.apk

After that I was able to recompile my framework-res.apk with apktool by entering (and didn't get any errors):

apktool b -f -d framework-res.apk

Maybe you have a look at this post to learn a bit more about decompiling/recompiling.

Hope that I was able to help you at least a little bit
[Android General] ibanez7:
Its about notification, maybe this thread can help you, visit :

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

Good info my friend, thank.

will update the tool on this thread, I will try it first :)

this is no error, just no translation, but building apk file is finished. so just follow step "J. Drag and drop method, see on first page."
[Android General] Praetoriani:
Thanks for the answer, but I already tested my newly compiled framework-res.apk and it worked. :good:
[Android General] SamsunguserXD:
Thank you very much bro :) :victory:
[Android General] Praetoriani:
Not a big deal. Glad I could help you. Just write again if you have any questions or problems.

:)
[Android General] sfoot13:
Someone can help me please :)

There's no styles.xml on my framework-res.apk, please can you help me to edit my file and get a transparent background, please =)

Thanks in advance (sorry, my english is bad)

my phone: Defy mini xt320

Gingerbread 2.3.6 stock rom
[Android General] Praetoriani:
Are you sure it's in the framework-res.apk and not the SystemUI.apk?
[Android General] sfoot13:
I saw it and there's no styles.xml on SystemUI.apk

what can i do? thanks for your help.
[Android General] Praetoriani:
Why are you looking for a styles.xml? And what do you want to do with it?

:confused:
[Android General] sfoot13:
i want to have a transparent background on android (GB), because some apps have black background (it is awful), in all the threads that i saw, they edit the file styles.xml, and that's how they get it (transparent background or with custom image)...
[Android General] Praetoriani:
Well I think you have following possibilities:

» Download an app which helps you getting a transparent background.

» Keep searching for styles.xml to do it by your own

» Start a new thread and ask for help

because this thread is only for decompiling/recompiling. And I don't think you have a problem with that.

Sorry that I couldn't help you. But good luck for you.
[Android General] maniknarang:
Help please

Hello,

I have edited SystemUI.apk to get transparent status bar, I have copied meta-inf and androidmenifest.apk from original apk to the modded one, but when I flash it by placing it in system>app of the rom, I don't get any ui, just black screen, only with app icons and app drawer icon...However, if I dirty flash it after using a perfect working rom, it works...

I guess I have to sign SystemUI.apk before using it(before clean flashing)...Am I thinking right? I need help...

I am using HTC DESIRE C WITH STOCK CM10...

Thanks a lot:)
[Android General] Praetoriani:
By copying the META-INF folder and androidmanifest.xml you do not sign your APK again. So there are two possible problems with your APK.

1. The APK has the wrong permissions. When you copy it to\system\app\ you need to set the right file permissions (I think it's 755).

2. Maybe you made a mistake by modifying the code, or it simply doesn't work for your device
[Android General] karo222:
Trying to recompile framework-res.apk I got this error

what does this mean?
[Android General] badagila:
Transperancy guide also works on cm 7, nice guide
[Android General] Praetoriani:
Seems like you didn't set up your apktool correctly.

Did you set up framework-res.apk and SystemUI.apk before decompiling/recompiling?
[Android General] karo222:
I dont know what do you mean of setup??

I just want to decompile framework and edit some values and then recompile it
[Android General] Praetoriani:
Before decomoiling/recompiling your APKs, you need to setup akptool

apktool if framework-res.apk
apktool if systemui.apk

After this, you should,be able to decompile/recompile without any errors
[Android General] badagila:
ort maybe some of the codes tha you change are wrong.., every codes inside the apk has a value you need to be careful on editing it..,
[Android General] BIade:
use this apktool.jar. That should work :)
[Android General] karo222:
Thanks but it didn't work.
[Android General] BIade:
Oh sorry to hear.

On the Dos-output, do you see "Apktool 2.0.0-Beta9" ? Because you were using beta7

Next: You need to take the framework-res.apk from YOUR phone/rom and install it with:

apktool if framework-res.apk

.

I can try to help you further, but I need your outputs, screenshot of the folder, and the steps you are doing...
[Android General] Praetoriani:
That's what I told karo222 already. I know this error and I could fix it by setting up

the framework-res.apk and SystemUI.apk (both files from my phone).

I think karo222 needs a step-by-step explanation in how to do that.

1. Donwload and "install" apktool by uzipping the ZIP-Archive

1. (think, you did this already)

2. Now you need to copy two files from your rooted phone.

2. \system\app\SystemUI.apk

2. \system\framework\framework-res.apk

3. Copy these two files in the same directory as apktool

4. Now you open a command promt and change to your apktool directory

5. Type i the following code:

apktool if framework-res.apk
apktool if systemui.apk

6. Now everything is set up and you're ready to go

To decompile your desired APK, you first have to cooy it in the same directory as apktool.

You open a command prompt (again) and change to the apktool-directory

Now you type following code inside the command prompt (if you want to decompile framework-res.apk for example):

apktool d framework-res.apk

When you finished modifying the code, you simply recompile your file by typing following code to the command promp:

apktool b -d -f framework-res

Now apktool recompiles the APK-file.

Hooe this helps you to decompile/recompile your file(s)
[Android General] karo222:
Thanks for your awesome guide.

I will try it and will tell you results.
[Android General] Praetoriani:
No Problem. Just let me know if I can help you again

;)
[Android General] karo222:
trying to decompile and recompile , first installed both framework-res.apk and systemui.apk

but even with installing i get the same error
[Android General] Praetoriani:
Hmmm, that's a bit strange

:eek:

It might help if you start from beginning. I would recommend to extract the ZIP-Archive to a path like:

C:\Android\apktool\

(that's where I placed it on my computer)

And then you just follow again my previous guide.

Unfortunately I am at work and do not have a computer.
[Android General] D2Y aka E:
solved master;)
[Android General] Sagar_Patel:
Decompiling & Re-compiling apks

After drag & drop the classes.dex to Quick-baksmali.cwm, i could not see the classout folder!!!!

Thanks in advance

Best Regards,

Sagar
[Android General] adibayer_:
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
color, value=0x02060002
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textColor, value=0x02060002
W: Could not decode attr value, using undecoded value instead: ns=android, name=
color, value=0x02060002
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textColor, value=0x02060002
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textColor, value=0x02060002
W: Could not decode attr value, using undecoded value instead: ns=android, name=
color, value=0x02060002
I: Decoding values */* XMLs...
Can't find framework resources for package of id: 2. You must install proper fra
mework files, see project website for more info.

anyone knows how to fix this problem?
[Android General] Sagar_Patel:
Decompiling & Re-compiling error log

Possibly, some protected or paid apk may not allow you modification, so this kind of error is happened. However, if you just want to rename or change the logo of some apk/app (Must not be protected or paid), you can use the awesome tool i have attached here. Must thanks to the dev Anoniem 100. Please PM me your experience.

Best regards,

Sagar
[Android General] ibanez7:
mare sure your file "classes.dex" is original, or not corrupt, I've tried classes.dex file on various OS version (GB until KitKat).. and is fine

Just read the logcat, you must install the framework 2, as an example :

- Samsung ROM (TouchWiz), the framework 2 is twframework-res.apk

- Sony ROM, the framework 2 is semcgenericuxpres.apk
[Android General] Fujitina:
looking for some parser of .smali file

It exist a parser for the .smali files?

Let me be more explicative:

i need to code a program.

the input of this program is a .smali file.

this program ( thanks to the parser i'm looking for ) should catch every time a global variable is declarated.

next step add some code.

before i start coding a parser for my own,is that possible, or no parser yet exist for a similar task?

Thank you.
[Android General] pcprice76:
Problem with settings.apk

Hi, i use this guide many times without problem. Now i'm facing a really weird issue.

I succesfully decompile my settings.apk but when i try to recompile it i get many errors... looking over internet i discovered that the reason was the resource.arsc file missing, so i put the file directly from the APK inside the folder.

Doing this apktool recompile the directory without errors, only a "W: Sources not found" and creates the APK file but... files inside are not encoded! So, obviously, the apk won't work.

Any idea about this strange problem? Thanks

P.s. i'm trying with an unmodified Apk
[Android General] ibanez7:
Maybe this threads can help you :

- http://xdaforums.com/showthread.php?t=2193735

- http://xdaforums.com/showthread.php?t=2345435

- http://xdaforums.com/showthread.php?t=2592266

what do you edit? smali? ... you are sure it is correct? If you edit the smali file or patch 9.png file, it's very sensitive to results "recompile" . the slightest mistake in catlog shows many errors occur.

[MENTION=5713305]macf4080[/MENTION] just decompile the framework-res.apk and twframework-res.apk (especially in twframework-res.apk) as in gingerbread, I think the same and there may be differences, so edit both (framwork-res.apk and twframework-res.apk)

and the png files that you should edit into a transparent, of course, remains with the extension "9.png" (source png file), just download :
[Android General] pcprice76:
Hi Ibanez, really sorry, i realized that my post was really bad detailed. I get BRUT errors while recompiling even if i do not change anything

I installed the framework from same rom, tried with both apktool and apk multitool

I tried copying that resource file, but after that all files inside apk are not encrypted. I realised that the resources.arsc should be created while recompiling :)

Tried also to update JAVA (was outdated) but with no results :(

Here are the errors

Thanks for your kind help
[Android General] adibayer_:
try to decompile android policy jar.

drag the classes.dex to quick backsmali, there's a quick pop up window, and nothing happened. and there's no classout folder, am i missing something?
[Android General] SXUsr:
Don't extract the classes.dex first, just run the command...

[B]java -jar baksmali.jar -x android.policy.jar -o classout[/B]

...and that will give you your folder.
[Android General] badagila:
Hi anybody knows how to edit windows animation?
[Android General] D2Y aka E:
hi friend .. please help me to change my image with directional arrows point I do not know where the picture and name of the image that should I change ..
[Android General] baciany:
When im trying to install framework i have error"

Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x0108022e drawable/default_wallpaper, config=-sw600dp-nodpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:193)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:162)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:128)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:103)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:675)
at brut.androlib.Androlib.installFramework(Androlib.java:641)
at brut.apktool.Main.cmdInstallFramework(Main.java:252)
at brut.apktool.Main.main(Main.java:91)
[Android General] theflanker:
Now everyone can be a developer. thanks
[Android General] ravike14:
how can i decompile the SystemUI.apk of a HTC rom?? framework-res and framework-htc-res aint working :/ it still needs more resources :/
[Android General] SXUsr:
Try notify_panel_notification_icon_bg in your framework-res

Use the latest apktool, 2.9 beta.

I think you also need to install com.htc.resources.apk
[Android General] baciany:
I cant find it on official pktool website. Anyone have link?
[Android General] baciany:
Could anyone help me? I have apktool 1.5 verssion and cant find newest. Also used Virtuous Ten studio and the same error. Tried on 2nd computer and also the same error... What im doing wrong? Still cant decompile anythink! Tried on Windows 8,1 and Windows 7, both 32bit
[Android General] badagila:
Did you install java first in your pc before using apktool?
[Android General] jtash01:
error recompling SystemUI.apk

When I try recompiling an unmodified SystemUI.apk (from KK) I get these warnings:

apktool b -f -d SystemUI

I: Using Apktool 2.0.0-Beta7 on SystemUI

I: Smaling...

I: Building resources...

aapt: warning: string 'done_button' has no default translation in C:\Users\JTASH\apktool\SystemUI\res; found: mn

aapt: warning: string 'ssl_ca_cert_dialog_title' has no default translation in C:\Users\JTASH\apktool\SystemUI\res; found: mn

aapt: warning: string 'ssl_ca_cert_info_message' has no default translation in C:\Users\JTASH\apktool\SystemUI\res; found: mn

aapt: warning: string 'ssl_ca_cert_settings_button' has no default translation in C:\Users\JTASH\apktool\SystemUI\res; found: mn

aapt: warning: string 'ssl_ca_cert_warning_message' has no default translation in C:\Users\JTASH\apktool\SystemUI\res; found: mn

I: Building apk file...

(I did this as a test before trying to modify some of the png files.)

Is the resulting SystemUI.apk not usable?
[Android General] rodman01:
No that are only warnings, if apk is recompiling fine you can use it without problems.
[Android General] jtash01:
Change default KK homescreen background color?

Is there a way to change the default color or homescreen (not the lock screen) background color or image in KK?
[Android General] XPS_93:
JDK ver.

EDIT: sorry I didn't read the page properly, found it :p
[Android General] manojkumar8552:
thanxs so much