yashsingh1/xdaforums huggingface dataset:
[Android Software Development] mukulsoni:
Could you please provide newest apktool2 link. I am getting this error too
[Android Software Development] devilmaycry2020:
here apktool v2.0.0b7

http://code.google.com/p/android-apktool/
[Android Software Development] ANKIT RAWAT:
getting error on using aktool and advanceapktool by bd freek
[Android Software Development] getvaisakh:
Download these framework-res.apk and SemcGenericUxpRes.apkfiles, keep it where your apktool.bat/jar (recommend the latest version of apktool found here ) is and run these commands:

Apktool if framework-res.apk [Press Enter and wait a bit]

Apktool if SemcGenericUxpRes.apk [Press Enter]

Files grabbed from Sony's 5.1.1 LP

Then try decompiling.
[Android Software Development] icke:
Are U trying to disable rotation completly or just 180° rotation?
[Android Software Development] theDroidfanatic:
A small bump?
[Android Software Development] Generation_Next-2000:
Can i use this method for framework-res.apk from other Roms made for other phones, like for samsung or Huawei ??
[Android Software Development] theDroidfanatic:
Yes you can! :D This guide is for Android, not specific to A single brand :)
[Android Software Development] lcsboy:
I can compile/decompile my framework-res.apk.

But I got some error message if type the command : apktool if com.htc.resources.apk

It still can compile/decompile even I have the error message for com.htc.resources.apk

But I can not complete to decompile Rosie.apk

My phone is HTC J
[Android Software Development] theDroidfanatic:
Which command are you using for Tue decompiling?
[Android Software Development] shaharsta:
what do you mean use signapk to sign? is that a command?app?
[Android Software Development] theDroidfanatic:
I believe its a script or something, Google is your friend ;) http://lmgtfy.com/?q=SignAPK
[Android Software Development] SXUsr:
Don't forget to zipalign your apks when done modding. :)
[Android Software Development] theDroidfanatic:
Cheers :D
[Android Software Development] UtCollector@gmail.com:
Im not able to put the framework-res.apk back to gether. I did this. (With the original framework-res.apk to test)

frank@frank-Aspire-5755G:~/0Decompiling$ java -jar apktool.jar d framework-res1.apk framework-res

I: Loading resource table...

I: Loaded.

I: Decoding file-resources...

I: Decoding values*/* XMLs...

I: Done.

I: Copying assets and libs...

frank@frank-Aspire-5755G:~/0Decompiling$ apktool b framework-res framework-res.apk

apktool: command not found

What is going wrong?
[Android Software Development] theDroidfanatic:
I'd help, but I don't know how :/
[Android Software Development] PhaseCoder:
I get the following error? why

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Barbra> cd C:\Users\Barbra\Desktop\apk

C:\Users\Barbra\Desktop\apk>java -jar apktool.jar d SystemUI.apk SystemUI
Destination directory (C:\Users\Barbra\Desktop\apk\SystemUI) already exists. Use
-f switch if you want to overwrite it.

C:\Users\Barbra\Desktop\apk>java -jar apktool.jar d SystemUI.apk SystemUI
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Barbra\apktool\framework\1.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x010300a9
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x010300a9
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x010300a9
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x010300a9
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x010300a9
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x010300a9
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferen
ceValue.java:59)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResRefe
renceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResSca
larValue.java:43)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:4
0)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
sourceParser.java:315)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
cXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:46)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
ecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
00)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:114
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
[Android Software Development] theDroidfanatic:
I made this thread, but in reality am a n00b with it :P try asking someone professional?
[Android Software Development] alkhafaf:
Is it important to sign a system file, like framework-res.apk ? And y?
[Android Software Development] theDroidfanatic:
I believe so, so the phone accepts it :)
[Android Software Development] SXUsr:
Have you installed the correct resources and using the latest Apktool?

Depends on the ROM, I never have to sign system apks but have seen some have to.
[Android Software Development] ->DronZer<-:
Getting this error .. Sort it out please!
[Android Software Development] theDroidfanatic:
Re: [HOW TO] Decompile, Recompile and Sign framework-res.apk (Or any other APK)

Are you sure you have your apktool file in the decompiling folder? Seems to be missing

Sent from my One X running Blade v4.6.0. At a mere 240 MB, with tons of AROMA Mods and tweaks, this, is what you want.
[Android Software Development] ->DronZer<-:
You can see the window is open ... or tell me step by step what to do? Anyway i can decompile it successfully!!:confused::confused:
[Android Software Development] theDroidfanatic:
Re: [HOW TO] Decompile, Recompile and Sign framework-res.apk (Or any other APK)

This could be the issue

https://www.youtube.com/watch?v=geong9J5fDc&feature=youtube_gdata_player

Are you sure decompiling still works? Can you try again? Just compiling doesn't work?that's kinda impossible :S

Sent from my One X running Blade v4.6.0. At a mere 240 MB, with tons of AROMA Mods and tweaks, this, is what you want.
[Android Software Development] ->DronZer<-:
Let me try again :D

it works..

Can you write the recompiling correct command? :o

Please :)

Recompiling still dont work!
[Android Software Development] theDroidfanatic:
Re: [HOW TO] Decompile, Recompile and Sign framework-res.apk (Or any other APK)
[Android Software Development] ->DronZer<-:
Re: [HOW TO] Decompile, Recompile and Sign framework-res.apk (Or any other APK)

Where is the mist folder bro?:confused:
[Android Software Development] theDroidfanatic:
Re: [HOW TO] Decompile, Recompile and Sign framework-res.apk (Or any other APK)

If you extracted framework-res.apk, it will be extracted to a folder called 'framework-res'

So when you do apktool b framework-res it will creat the apk, in the dist folder.

The dist folder will be in the framework res folder (where you originally extracted apk) :)

Sent from my One X running Blade v4.6.0. At a mere 240 MB, with tons of AROMA Mods and tweaks, this, is what you want.
[Android Software Development] ->DronZer<-:
Re: [HOW TO] Decompile, Recompile and Sign framework-res.apk (Or any other APK)

But it shows the error as the first picture i posted... Apkool isn't a recognizable command!!!:confused::thumbup::what::what::what:
[Android Software Development] theDroidfanatic:
Re: [HOW TO] Decompile, Recompile and Sign framework-res.apk (Or any other APK)

[QUOTE=->DronZer

Wait, you said you were able to decompile? Try decompiling again, does it work?

Sent from my One X running Blade v4.6.0. At a mere 240 MB, with tons of AROMA Mods and tweaks, this, is what you want.
[Android Software Development] PsyJoe:
Did u open cmd in the same folder where apktool exists?

If u didn't u have to put apktool in C:

So u can run apktool where ever u startend the com and line.
[Android Software Development] ->DronZer<-:
Re: [HOW TO] Decompile, Recompile and Sign framework-res.apk (Or any other APK)

How?... Please give me proper instructions!!?

---------- Post added at 10:46 AM ---------- Previous post was at 10:45 AM ----------
[Android Software Development] theDroidfanatic:
Re: [HOW TO] Decompile, Recompile and Sign framework-res.apk (Or any other APK)

[QUOTE=->DronZer

Then this is very confusing :S It recognizes APKTool when you decompile, but not when you recompile? Maybe theres somehting wrong with your apktool version? Download latest, Google it

Sent from my One X running Blade v4.6.0. At a mere 240 MB, with tons of AROMA Mods and tweaks, this, is what you want.
[Android Software Development] PsyJoe:
Try to open the cmd in the same folder you extracted apktool. To do so, just navigate your filebrowser to the direction, hold shift and then rightclick somewhere inside the folder. Then select something like "open command here" (i don't know what its called exactly, I use a german OS)

then the command promt should be able to work with apktool and the commands should work.
[Android Software Development] M4ST3R-V:
Yes even I am having the same problem

As it is mentioned, Even I am having the same problem, 'apktool' is not recognizrd as an internal or external command, operable program or batch file I tried adding path to the apktool and downloaded the latest version and replaced it too. But I am able to decompile it, while recompiling its giving me this error.:confused:

EDITED :

The problem solved as i restarted the system, I think the system registries would have mixed up, (and after decompiling when i was editing with the files my explorer.exe crashed )
[Android Software Development] theDroidfanatic:
Re: [HOW TO] Decompile, Recompile and Sign framework-res.apk (Or any other APK)

Glad it worked out :D Soon I'm going to completely revamp this guide, cheers!

Sent from my HTC One X
[Android Software Development] Georg23:
Hello, I did it all well but i was not able to install the new apk file...

---------- Post added at 10:03 AM ---------- Previous post was at 09:26 AM ----------

when i try to compile the file back to an apk - the file will get smaller than the original file an i am not abel to install the file.

I was trying to make a multiview file...
[Android Software Development] theDroidfanatic:
Re: [HOW TO] Decompile, Recompile and Sign framework-res.apk (Or any other APK)

The APK is smaller, because it loses the less compression done by the OEM to improve speed :)

If it's a system app, you must sign it, use the DSIXDA kitchen for that :)

And move it to system/app, and set permissions to 644 (rw-,r--,r--)

If it's a normal app, I think signing will do the trick :)

Or you can send me the APK, and I can sign it for you

Cheers

Sent from my HTC One X
[Android Software Development] theDroidfanatic:
Hey

Completely Revamped the OP,

Added full instructions, with full details :)

Enjoy
[Android Software Development] theDroidfanatic:
Re: [HOW-TO] [21/MAR] How to Decompile, Recomile, Sign, and Zipalign APKs [FULL][UPDA

Anyone tried this?

Sent from my HTC One X
[Android Software Development] theDroidfanatic:
Re: [HOW-TO] [21/MAR] How to Decompile, Recomile, Sign, and Zipalign APKs [FULL][UPDA

Updated instructions :)

If this post was helpful to you, or you're just feeling generous, please hit thanks ;)
[Android Software Development] gypsy214:
I did the first step and it created a folder but the folder is empty! this is what terminal gave me

C:\android\apk>Apktool d 1.apk

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN

otExist: AndroidManifest.xml

at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecode

r.java:128)

at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:216

)

at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:99)

at brut.apktool.Main.cmdDecode(Main.java:141)

at brut.apktool.Main.main(Main.java:72)

Caused by: brut.directory.PathNotExist: AndroidManifest.xml

at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:

103)

at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecode

r.java:124)

... 5 more

C:\android\apk>
[Android Software Development] theDroidfanatic:
Re: [HOW-TO][29/MAR] How to setup APKTool & Decompile, Recomile, Sign, and Zipalign A

Did you install the framework first? :) and setup java? And you have an APK called 1.apk?

If this post was helpful to you, or you're just feeling generous, please hit thanks ;)
[Android Software Development] gypsy214:
I have java set up with the right path. I did each step and it installed the framework and I got 1.apk and a folder but your guide and others guide says to do my edits in that folder but the folder is empty.
[Android Software Development] theDroidfanatic:
Re: [HOW-TO][29/MAR] How to setup APKTool & Decompile, Recomile, Sign, and Zipalign A

Send me the 1.apk, ill see and help you :)

If this post was helpful to you, or you're just feeling generous, please hit thanks ;)
[Android Software Development] gypsy214:
Wait you said if I installed the framework first? I see that in several post. I didnt see the framework in your guide or in the download list, What I did made this folders and extract your download to it C:\Android\APK then I moved the framework-res.apk from the rom im working on and pasted there. with terminal I made this command Apktool if framework-res.apk. that made a folder apktool with 1.apk inside in C:\user I moved that 1.apk to C:\Android\APK and with terminal i did this. Apktool d 1.apk. it made a folder (1) in C:\Android\APK but its empty!!

I was wonder what I did wrong.. Here is the 1.pak it created. http://bit.ly/13H33BL

A dev posted a guide to bypass tmobiles tethering on the galaxy s3 thats what im trying to do. but its with decompile framework-res.apk
[Android Software Development] gypsy214:
I got it going... this time i did on terminal apktool d framework-res.apk while i had the framework in the folder still. another folder named framework-res pop up with all the files i needed to edit..... thanks for your guide
[Android Software Development] sandyworsnop:
Nice guids ;)
[Android Software Development] theDroidfanatic:
Re: [HOW-TO][29/MAR] How to setup APKTool & Decompile, Recomile, Sign, and Zipalign A

Thanks, glad it worked :D

And my OP does say about installing framework, quote from my OP:

Install the Framework:

Cheers :)

Thank you! :)

If this post was helpful to you, or you're just feeling generous, please hit thanks ;)
[Android Software Development] theDroidfanatic:
About the installation of the framework, the errors should be ignored, as long as it says that framework is installed, it means it is :)

You also have to install the framework-res.apk

apktool if framework-res.apk

Install the framework res first, then the com.HTC.resources.apk, and then delete both the APKs from the folder.

And then, copy your framework-res.apk to your APKtool folder, and use this command to decompile:

apktool d framework-res.apk

This should work :)

Cheers

If this post was helpful to you, or you're just feeling generous, please hit the thanks button ;)
[Android Software Development] theDroidfanatic:
235 downloads of my bundled decompiling files, and hardly any feedback? :P

Id just like to know if its working for you all :)

If this post was helpful to you, or you're just feeling generous, please hit the thanks button ;)
[Android Software Development] CodexLink:
Hi there guys

Can someone help me sign and zipalign this settings.apk? The link: http://db.tt/5GnZEcVi

My settings.apk didnt showing in my appdrawer whenever i flash and push it

Please help
[Android Software Development] tdunham:
Did you modify your androidmanifest.xml?

That would be the only reason to resign would be if you altered the signature.

The preferred method to make modifications to a system apk is to recompile the apk, open the newly compiled apk with a zip tool like 7zip or winrar, extract ONLY your changed files. Ie. resources.arsc, png & xml files that have been changed.

Then, insert the changed files back into the stock apk and you should be good to go without having to worry about compatibility issues.

Edit: Don't forget about classes also if you made changes to smali.
[Android Software Development] tdunham:
Very good. Then used my proposed method and let us know if that takes care of your problem.

Also, check your file permissions when you flash the modified apk. That is another reason it won't show. For our JB, I need to manually set permissions via the installer script because it won't set properly without it. It is pretty annoying when you're flashing a lot of files and have to add a line item just to set permissions too. ;)

---------- Post added at 02:34 PM ---------- Previous post was at 02:32 PM ----------

There are apps available for signing, search entire XDA to find one.

However, using proposed method will prevent necessity of signing to begin with.
[Android Software Development] CodexLink:
I have been set the permission properly like this

O----O----X

O----X----X

O----X----X

---------- Post added at 03:42 PM ---------- Previous post was at 03:40 PM ----------

Um what do you mean stock apk?

Means will place my change file to the compiled apk?
[Android Software Development] tdunham:
Use the stock SecSettings.apk file from the stock deodexed rom you are working from.

Insert files extracted from your changed SecSettings.apk into an unchanged one taken from stock rom so you do not alter signature.
[Android Software Development] CodexLink:
Um bro my phone is in 2.3.6

Settings.apk only in my rom and working from
[Android Software Development] tdunham:
Ok that is right for your version of Android then.
[Android Software Development] CodexLink:
Uh can you clearer the instructions?

I didnt understand it.
[Android Software Development] tdunham:
Ok, I will help you a little later. I am working right now. ;)
[Android Software Development] CodexLink:
Ok i will check this thread soon
[Android Software Development] theDroidfanatic:
Nice to see people helping each other :D

Also, if the method doesn't work out, send me the APK, ill sign and zipalign it for you :)

If this post was helpful to you, or you're just feeling generous, please hit the thanks button ;)
[Android Software Development] tdunham:
Ok, tell me exactly what files you are changing in Settings.apk so I can better help you with a more exact answer.
[Android Software Development] CodexLink:
I only changing with the xml folder, values folder and drawable hdpi and mdpi folder,and also xml files
[Android Software Development] CodexLink:
Hi there i all ready post the link to my apk
[Android Software Development] tdunham:
Ok.

1. Open your changed recompiled settings.apk with zip application (Winrar or 7zip).

2. Extract only what you have changed.

- resources.arsc

- xml files

- png files in hdpi/mdpi folders

3. Open stock settings.apk from original stock version of rom with zip application. Only open apk, do not unzip.

4. Add changed files back into stock settings.apk. Make sure changed files go in correct folders.

- You can drag and drop or right click and add files
[Android Software Development] CodexLink:
Ok i will try soon thanks
[Android Software Development] CodexLink:
Hi there

It means i will replace any files inside the stock and i place my modified files?
[Android Software Development] tdunham:
Yes, replace with your files.
[Android Software Development] CodexLink:
Thanks for helping

I will post soon if the method works.
[Android Software Development] CodexLink:
Hi There it works but

Force close anyways i will create again

I edit them i a lot

While my status bar didnt showing but the apk was there seen by root explorer

Is status bar not showing because of the lidroid i didnt place it or other issues please help

This post that i write the problem

That was my last problem in my rom
[Android Software Development] tdunham:
Status bar is SystemUI.apk.

Yes, if you used extended toggles with lidroid-res.apk maybe you make a mistake when you try to install.

Is that the only force close you get is systemui?
[Android Software Development] CodexLink:
No force close bro i ddnt showing

I dont think its on lidroid i didnt change it to the new one

But my settings.apk is force close but its ok i will create again

I mess up that apk
[Android Software Development] CodexLink:
I think its only that i ddnt put the lidroid-res.apk??
[Android Software Development] theDroidfanatic:
So, it all worked out? :)

If this post was helpful to you, or you're just feeling generous, please hit the thanks button ;)
[Android Software Development] CodexLink:
In my SystenUi.apk

It works

But settings.apk got fc

Can someone hell build a ics style settings.apk

That my one problem
[Android Software Development] theDroidfanatic:
What do you want to edit I'm the settings.apk? :)

If this post was helpful to you, or you're just feeling generous, please hit the thanks button ;)
[Android Software Development] CodexLink:
Hi

I want to edit only device_info_settings.xml

To give Rom information

And others

Heres i link for my settings.apk

http://db.tt/5GnZEcVi

Also cant see this settings.apk on app drawer
[Android Software Development] CodexLink:
I want only edit device_info_settings.xml located at res/xml

See my device_info_settings.xml here:https://www.dropbox.com/s/5eyw5c9egvc502w/device_info_settings.xml

U will see the picture below:you can only copy the xml codes on that link

Well thanks for your help :DDD
[Android Software Development] tdunham:
I believe your syntax is incorrect. You need to use res/values/strings.xml to make the changes.

Here is what I did only showing changes:

strings.xml new lines:

<string name="rom_dev">ROM Developer</string>
<string name="rom_name">ROM Name</string>
<string name="contact_this">Contact This:</string>
<string name="what_is_source">Whats Sources?</string>
<string name="dev_summary">janreytuazon15</string>
<string name="name_summary">Pocketmized v1.0</string>
<string name="contact_summary">janreytuazon15 @ XDA or janjan.licas@gmail.com</string>
<string name="source_summary">Anywhere...</string>

device_info_settings.xml

Before:

<Preference android:title="ROM Developer" android:summary="janreytuazon15" style="?android:preferenceInformationStyle" />
<Preference android:title="ROM Name" android:summary="Pocketmized v1.0" style="?android:preferenceInformationStyle" />
<Preference android:title="Contact This:" android:summary="janreytuazon15 @ XDA or janjan.licas@gmail.com" style="?android:preferenceInformationStyle" />
<Preference android:title="Whats Sources?" android:summary="Anywhere..." style="?android:preferenceInformationStyle" />

After:

<Preference android:title="@string/rom_dev" android:summary="@string/dev_summary" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_name" android:summary="@string/name_summary" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/contact_this" android:summary="@string/contact_summary" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/what_is_source" android:summary="@string/source_summary" style="?android:preferenceInformationStyle" />

Attached is settings.apk with changes already applied.