yashsingh1/xdaforums huggingface dataset:
[Galaxy Ace S5830 General] ag4751:
See post #313 previously about setting Java up.

Also if you set the PATH to your apktool it will make it easier to use so for example create a folder called apktool direct in the C drive (or whatever you PC main drive letter is) so its C:\apktool and put apktool.jar, apktool.bat and the aapt file in it.

Next in your environmental variables set this path as well as the java paths, if you do this you can run apktool from anywhere on your PC by opening a CMD and typing apktool and then what you want it to do.

You can have any number of separate themeing folders and work direct from them without having to have apktool in each one.

So set java in PATH and the new apktool folder and set that in the PATH as well so you would set three up such as the below, make sure each one is separated by a semi colon.

C:\Program Files\Java\jre8\bin;

C:\Program Files\Java\jdk1.8.0_05\bin;

C:\apktool;

In the PATH they would look like this

C:\Program Files\Java\jre8\bin;C:\Program Files\Java\jdk1.8.0_05\bin;C:\apktool;

Once done go to your working folder open a cmd and type java press return you should get a list of menu options then type javac and again a list of menu options will appear and to check the java versions you are running type java -version as shown below (this is version 8)

C:\APK_test>java -version

java version "1.8.0_05"

Java(TM) SE Runtime Environment (build 1.8.0_05-b13)

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

Screen clip attached to show a working folder without apktool in it, you don't need to type CD etc just work from any folder you want
[Galaxy Ace S5830 General] buu1152:
Thanks guys, appreciate the help, I'll get on this as soon as I can.. I'll let you know (:

Latest °Purity & Franco°
[Galaxy Ace S5830 General] alexander7567:
Its weird... When I use this I only get the manifest and the res folder but no actual java code. Any clue why? I'm trying to fins my carriers APN settings because they Dont do it the usual way as most carriers do. They seem to be hardcoded right into the messaging app.
[Galaxy Ace S5830 General] NeriL:
I've created a theme for most Xperia U GB roms and never had an issue like this before:

I installed frameworks (framework-res and sony's framework) and decompiled SemcPhone.apk.. Everything seems OK..

Then I try to compile (no changes made) and it shows a bunch of java errors.... What can I do?
[Galaxy Ace S5830 General] ag4751:
Really need to see the errors
[Galaxy Ace S5830 General] juliusssss:
Can you post the errors?

Or upload the frames and .apk and i see if i can help you.

Greetings.

PD: Sorry for my english
[Galaxy Ace S5830 General] ThePerveeSage:
Does anyone have good examples showing how to work around any kind of obfuscation?

I am reading a lot of articles regarding decompiling or reversing using APKTool, Dex2Jar, JD-GUI, etc. but none of them shows any workarounds done using obfuscation. Can anyone post something which works around any kind of obfuscation?
[Galaxy Ace S5830 General] ag4751:
It may be the aapt or apktool version, if you zip both frameworks and the phone apk's upload then and provide the link to download I will try them with the version I have.

What png / xml files are you changing as well
[Galaxy Ace S5830 General] midhunbhayi:
Decompiling settings.apk error

I want to decompile the 4.3 Settings.apk of the Xperia ZL.

I use the latest apk tool

My Steps :

1. i install the framework-res.apk

2. i decompile the Settings.apk

after decompile comes the Error:

Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info.

What must i do....or what did i have forgotten. plz help
[Galaxy Ace S5830 General] erikalin:
Error should be obvious: Install whatever is your other framework file.

I don't know your device, but ask Google or someone in your device forum what else is a part of your framework. It's not only framework-res, which became "1" or your screen wouldn't be telling you to install your other framework file "2"... ;)

Edit: Just to show you an example (these are NOT correct for your phone, just for mine, so you need to determine what is your own framework) - example for how I install my framework, and then I can successfully do whatever I want:

apktool if framework-res.apk (then hit enter)

apktool if com.htc.resources.apk (then hit enter)

apktool if SystemUI.apk (then hit enter)

G'luck with learning. Lots to read and practice to get started.
[Galaxy Ace S5830 General] kai456789:
thank you very much
[Galaxy Ace S5830 General] Itoshii:
When I try installing the framework I get an error because it is looking for the jvm.cfg in the wrong place it is looking for it in amd64 but I run intel so it is located in another folder named i386. So my questions are where can I edit where it is searching for this file or will renaming the folder mess with the rest of my system?
[Galaxy Ace S5830 General] erikalin:
I don't know that problem, but to ask the obvious question: Did you try moving the file to whatever is its expected location?
[Galaxy Ace S5830 General] Itoshii:
I did try renaming and making a copy of files into the desired location but still did not work found that other developers that use JDK that they usually delete the JRE folder located in the windows folder because it causes issues for some. Resolved my issue but not sure why.
[Galaxy Ace S5830 General] Muhammed Zakhir:
We can decompile an APK file with 7zip or winzip, right? Is there any difference between decompiling/compiling software and 7zip/winzip in the way it works? I couldn't find one. :(

Anyway Nice Work! :good:

Kindly,

MZ
[Galaxy Ace S5830 General] NeriL:
Apktool creates unencrypted xmls, smali files and .9.png pictures

Sent from NeriL.device using NeriL.preferredApp
[Galaxy Ace S5830 General] Muhammed Zakhir:
I found Apktoll creates smali files but are smali files very helpful? Can you give me a short note? Yeah I got encrypted xml files but what do you mean by .png pictures? :confused: I did got pictures in .png format when I extracted it. :)

Kindly,

MZ
[Galaxy Ace S5830 General] NeriL:
Smali files are the app code, but in a low level form (you can edit them with any text editor)

.9.png are "correctly stretchable" pictures.. In example, buttons stretch depending of the button size, but corners maintain its size regardless of the button size

Sent from NeriL.device using NeriL.preferredApp
[Galaxy Ace S5830 General] Muhammed Zakhir:
I don't know why, I can't download from mega.co.nz :confused: . I tried many times downloading many files but still it doesn't come. :crying: So please upload on any other site or give me a solution. :)

Kindly,

MZ
[Galaxy Ace S5830 General] :
Here you go buddy,

android-apktool

Hope I Helped :)
[Galaxy Ace S5830 General] Muhammed Zakhir:
Thanks! :o

Kindly,

MZ
[Galaxy Ace S5830 General] :
Glad to help buddy :)
[Galaxy Ace S5830 General] biggeagle:
Unable to recompile appsgeyser.com's apps!! HELP

I made this app using appsgeyser.com and i made some changes!!

But in this case i just decompiled and was unable to recompile! i dont know why this is happening you can check my progress in the following image! I need serious help :confused:

[IMG="My work"]http://i.imgur.com/ILpiYoW.jpg[/IMG]
[Galaxy Ace S5830 General] enkious:
Please help.. this is what happens when i type this...

E:\1LOCAL\apktool>apktool if framework-res.apk

Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:

spec=0x01080131 drawable/btn_cab_done_default_holo_dark, config=-hdpi

at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)

at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)

at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)

at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165

)

at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)

at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10

5)

at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:39)

at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource

s.java:384)

at brut.androlib.Androlib.installFramework(Androlib.java:365)

at brut.apktool.Main.cmdInstallFramework(Main.java:193)

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

E:\1LOCAL\apktool>

then when i try to recompile..

E:\1LOCAL\apktool>apktool b xxz xxz-new.apk

I: Checking whether sources has changed...

I: Checking whether resources has changed...

I: Building resources...

invalid resource directory name: E:\1LOCAL\apktool\xxz\res/values-sw720dp-land

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce

ption: could not exec command: [aapt, p, -F, C:\Users\erebus\AppData\Local\Temp\

APKTOOL4445789199069224019.tmp, -I, C:\Users\erebus\apktool\framework\1.apk, -S,

E:\1LOCAL\apktool\xxz\res, -M, E:\1LOCAL\apktool\xxz\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav

a:193)

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)

at brut.androlib.Androlib.buildResources(Androlib.java:248)

at brut.androlib.Androlib.build(Androlib.java:171)

at brut.androlib.Androlib.build(Androlib.java:154)

at brut.apktool.Main.cmdBuild(Main.java:182)

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

Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U

sers\erebus\AppData\Local\Temp\APKTOOL4445789199069224019.tmp, -I, C:\Users\ereb

us\apktool\framework\1.apk, -S, E:\1LOCAL\apktool\xxz\res, -M, E:\1LOCAL\apktool

\xxz\AndroidManifest.xml]

at brut.util.OS.exec(OS.java:83)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav

a:191)

... 6 more

Sorry if this bothers anyone, im pretty newb.

Ive got latest version of jre and jdk and framework... im just so lost, and fed up atm.. ;\

Im actually trying to convert the app from chineese to english.. but localization helpper or what ever, Will not auto translate, and no answer has been found. so im doing it manually threw google translate, copy n paste..
[Galaxy Ace S5830 General] hello00:
[MENTION=4425071]PulseDroid[/MENTION] do you know how to decompile LG apps? im having trouble doing it. can you shed some light on this? thanks
[Galaxy Ace S5830 General] PulseDroid:
Nope sorry. I myself own an Huawei and they've corrupted the Public.xml so I can't compile their system apps either. If a manufacture doesn't want you to decompile you are going to have a tough time.

Use the newest experimental Apktool then see if you can atleast decompile parts of the app then you can edit those, then build it. You can then go into the build folder and copy the edited file into the apk and give it a go.

Good luck buddy! :cowboy:
[Galaxy Ace S5830 General] freekizito:
what if I want to decompile an ordinary apk(not a system file) example "Facebook.apk" do I still need the framework-Res.apk since it's not going to be installed specifically on my phone but on multiple phones?

I've also seen somewhere that we shouldn't edit PNG files after decompiling, is that correct?
[Galaxy Ace S5830 General] dotzip.:
you would need a generic res at least.. and you can edit any. png but be careful with .9 pngs best to leave them till you know what your doing but even they can be edited once decompressed
[Galaxy Ace S5830 General] freekizito:
thanks for the quick reply and please from where do I get the generic framework-Res?
[Galaxy Ace S5830 General] dotzip.:
you could try using the resources embedded in apk tool thire pretty generic
[Galaxy Ace S5830 General] freekizito:
thanks a lot
[Galaxy Ace S5830 General] JoHnNYBlaZE716:
Excuse my ignorance or noobness but I can't seem to get apktool to work on my laptop for some reason. I have java se and java dk installed along with SDK but still can't figure it out for some reason. Can someone please help me out?

http://i1370.photobucket.com/albums/ag261/Droid716/IMG_20140615_114712_zpsf390205f.jpg
[Galaxy Ace S5830 General] NeriL:
You're on Windows, aren't you? Maybe java doesn't have its environment variable.. I'm not on my pc, so I can't help you right now.. Maybe you can Google it

Sent from NeriL.device using NeriL.preferredApp
[Galaxy Ace S5830 General] :
I agree with [MENTION=5135704]NeriL[/MENTION]. Make sure you have set your Java path correctly in your Environment Variable. Do post the result. Hope I Helped :)
[Galaxy Ace S5830 General] androidfr33k:
Sorry I think I posted to the wrong place so I posted it here instead sorry.

http://xdaforums.com/showpost.php?p=54973492&postcount=2406
[Galaxy Ace S5830 General] ANKIT RAWAT:
Getting this error while recompiling FRAMEWORK.APK

Regards
[Galaxy Ace S5830 General] Ezzam_Itachi:
Hello .. Is this thread still alive ?? I wanna ask something:D .. I already did everything you wrote .. Several times .. The SystemUI I recompiled works !! But ... The changes that I made is not applied ?? :confused: how can I fix this ?? :banghead:

Sent from my Rice cooker using My magical thumbs
[Galaxy Ace S5830 General] Guiver2:
Hello,

Did you wipe cache or dalvick after you pushed the apk ?
[Galaxy Ace S5830 General] Ezzam_Itachi:
Noo .. I didnt do that .. :3 Will try .. But I think ... They wont be any different ..

Edit : tried both but to no avail .. Still the changes I made was not applied ..
[Galaxy Ace S5830 General] SpEcHiDe:
Automatic tool for decompiling APK
[Galaxy Ace S5830 General] paroulis:
I have a question, follow the instructions and all the applications that created works perfectly !! But what I notice is that the longer see the list of applications on my blind side, ie not recognize them the play store.What could be wrong?
[Galaxy Ace S5830 General] SpEcHiDe:
I did not understand your POST

From what I understood (if you are a developer) then you can read this link (http://stackoverflow.com/questions/10721263/different-application-signature-issue-android)
[Galaxy Ace S5830 General] bboyjunio:
What is wrong here?

I followed the exact steps to "How to add Dolby In Roms?"
[Galaxy Ace S5830 General] Bob Squire99:
Decompiling a specific app

I used virtuous ten studio to decompile eleven music player apk. I get the assets folder but it only shows fonts. In res I see a long list of folders. I am confused which parts to change and which parts to finally add to the actual theme. Can anyone help me. I attached the apk for eleven music so you can see what i mean when you decompile it with vts.
[Galaxy Ace S5830 General] shegeloaf:
this for windows or mac?
[Galaxy Ace S5830 General] Jeembooy:
somebody help please?

c:\Users\abainza\apktool>apktool if SystemUI.apk

Exception in thread "main" brut.androlib.AndrolibException: Arsc file contains z

ero or multiple packages

at brut.androlib.res.decoder.ARSCDecoder$ARSCData.getOnePackage(ARSCDeco

der.java:431)

at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource

s.java:566)

at brut.androlib.Androlib.installFramework(Androlib.java:473)

at brut.apktool.Main.cmdInstallFramework(Main.java:250)

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

c:\Users\abainza\apktool>

this is what i always get..
[Galaxy Ace S5830 General] Elvis_Marmaduke:
Awesome post! Thanks a lot, I think I've already referenced it like 10 times hahaha
[Galaxy Ace S5830 General] Vivek_Neel:
Install the framework . apktool if framework-res.apk
[Galaxy Ace S5830 General] Jeembooy:
already did sir, i install first the frame work then the systemui, the problem occurs also in the systemui it also appears when "apktool if systemUI.apk" what to do sir?
[Galaxy Ace S5830 General] Cloud Strife 48:
Cannot Decompile

Can you please help me fix this?
[Galaxy Ace S5830 General] chocochipsz:
hello u need help about decompile and recompile

My phone samsung a500h and i try too mod my system and i try to decompile my system framework and success. But if i want to recompile im have problem eror and have this notivication

W: Could not find sources

I: Building resources...

CANNOT LINK EXECUTABLE: cannot locate symbol "_ZN7android12AssetManager12addAssetPathERKNS_7String8EPi" referenced by "/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt5.0"...

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt5.0, p, --min-sdk-version, 21, --target-sdk-version, 21, -F, /data/data/per.pqy.apktool/APKTOOL4988366208346002069.tmp, -x, -0, arsc, -S, /sdcard/apktool/framework-res_src/res, -M, /sdcard/apktool/framework-res_src/AndroidManifest.xml]

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)

at brut.androlib.Androlib.buildResources(Androlib.java:283)

at brut.androlib.Androlib.build(Androlib.java:206)

at brut.androlib.Androlib.build(Androlib.java:176)

at brut.apktool.Main.cmdBuild(Main.java:228)

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

Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt5.0, p, --min-sdk-version, 21, --target-sdk-version, 21, -F, /data/data/per.pqy.apktool/APKTOOL4988366208346002069.tmp, -x, -0, arsc, -S, /sdcard/apktool/framework-res_src/res, -M, /sdcard/apktool/framework-res_src/AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)

... 5 more

Caused by: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt5.0, p, --min-sdk-version, 21, --target-sdk-version, 21, -F, /data/data/per.pqy.apktool/APKTOOL4988366208346002069.tmp, -x, -0, arsc, -S, /sdcard/apktool/framework-res_src/res, -M, /sdcard/apktool/framework-res_src/AndroidManifest.xml]

at brut.util.OS.exec(OS.java:89)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)

... 6 more

So how can i fix that problem? Hope u can teply and can help me to fix this problem thanks

And sorry about my english:D
[Galaxy Ace S5830 General] OftenAfraid:
Can't recompile?

I am unable to recompile. I think I have not properly installed or missing some instruction. I have samsung GT-s7582. So I installed framework-res.apk. But it's not helping and I can only decompile. Do I also need to install framework.jar ?
[Galaxy Ace S5830 General] drsaidalavi:
Rwquest for a new tutorial

Hello, I am watching your APK tool tutorial.It is a great help for new bees like me

I have bought and installed the launcher X in my Elelphone P 8000. It is very nice launcher with lots of options. but the developer quit the project and not responding to our requests. I want to randomize the transition effect in the application drawer and also randomize the screen effects like, 'sunny', ' dandrolene', 'rainy' etc on the home screen.

In simple words, how to add the option 'RANDOM' in the transition effects and home screen effects, so that they change automatically at intervals in a random fashion

Can you kindly give the details how it can be done using APK tool﻿.

Secondaly is it possible to make the background of certain applications like Messaging, Whatsapp etc to transparent by editing the XML.file?.

Kindly help me

Saidalavi
[Galaxy Ace S5830 General] Draybeat:
Hi can some one help mi decompile an apk and all remove or edit root checkers(packages) ie system/xbin/su....then recompile it.im using an old device with kitkat so i cant install magisk.
[Galaxy Ace S5830 General] TheKingOppaiDragon:
why i get this error

C:\Android\apktool>apktool d com.dena.a12026418_1.1.0.apk

I: Baksmaling...

testI: Loading resource table...

Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:55)

at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)

at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)

at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)

at brut.androlib.Androlib.getResTable(Androlib.java:44)

at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)

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

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

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

Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000

at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)

at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:45)

at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:97)

at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)

... 8 more
[Galaxy Ace S5830 General] SystemErrorOne:
I Think some of the pic links are down.... Nice tool though :D
[Galaxy Ace S5830 General] stiknez:
some issuse

hello, I did everything how needed, but there is a one problem. when I put the apk file, my phone gets blocked and something like restarted but nothing, just bootup logo repeating and it doesnt bootup. I can access to download mod, cwm.

I think I wrong in last step, when I need to put edited files into original file. How can I do that? I didnt understood that... can anybody help me?

by the way, I got galaxy s2 international on official leaked jelly bean and I used apktool 1.5.1 with no issues in cmd while doing whole proces

im thanksful if everyone helps to fix my issuse...
[Galaxy Ace S5830 General] SXUsr:
You'll either need to flash your backup or reflash the stock ROM for your device, there should be a sticky in your devices forum to help.
[Galaxy Ace S5830 General] Gandicela:
Good day,

What must I do to fix this error?

C:\android\apktool>apktool b systemui systemui-new.apk

I: Checking whether sources has changed...

I: Smaling...

I: Checking whether resources has changed...

I: Building resources...

invalid resource directory name: C:\android\apktool\systemui\res/drawable-sw360d

p-xhdpi

invalid resource directory name: C:\android\apktool\systemui\res/drawable-sw600d

p

invalid resource directory name: C:\android\apktool\systemui\res/drawable-sw600d

p-xhdpi

Thanks in advance.
[Galaxy Ace S5830 General] SpaceCaker:
You are conpiling ics or jb systemui as i can see

U need to have prope framework-res apk installed

Or try to remove the apktool frameworks folder ;)

You can also try to use

Wanam apkmanager

Its patched for ics and also works on JB

For apktool i used to remove those folders from the systemui ;)
[Galaxy Ace S5830 General] Gandicela:
Cheers, Mate. I'm on JB.

Apparently I think I got it now as the apk I tried to decompile has originally been themed. Per the developer's advise I should user that of the stock systemui.apk. No wonder during install of framework-res I saw a few prompts of missing png files.
[Galaxy Ace S5830 General] K.A.:
Apktool works fine for me across all versions without needing to do anything extra.. :cool:
[Galaxy Ace S5830 General] Gandicela:
Decompiling my SystemUI.apk, i had this error:

C:\android\apktool>apktool d SystemUI.apk SystemUI

I: Baksmaling...

Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78

0a 30 33 36 00

at org.jf.dexlib.DexFile.<init>(DexFile.java:377)

at org.jf.dexlib.DexFile.<init>(DexFile.java:274)

at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)

at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)

at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)

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

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

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

C:\android\apktool>

Prior to this framework-res install went very well.

C:\android\apktool>apktool if framework-res.apk

I: Framework installed to: C:\Users\Papa\apktool\framework\1.apk

Any suggestions, please?
[Galaxy Ace S5830 General] SpaceCaker:
U have probaply old apktool or ur java isnt updated
[Galaxy Ace S5830 General] K.A.:
Well, CM10.1 needs updating Apktool to 1.5.1. works perfect after update. :D