yashsingh1/xdaforums huggingface dataset:
[Android Software Development] djdarkknight96:
Donation sent, You worked hard on this and I needed to show my gratitude...It will make my life a ton easier!!! Thanks again buddy!!!
[Android Software Development] iBotPeaches:
I've already have a few users report a few problems. To be honest. I spend 100% of my time in MIUI. I never tested some of these APKs (Sense, etc). Though, most have been sent to me. I will work through some of these and figure out why some of them aren't fixed.

All the MIUI ROMs work fine though :)
[Android Software Development] rtfpessoa:
My problem is with MIUI i' still making tests but not sucess yet is very strange
[Android Software Development] v5HMeca:
For anyone that cares, I wrote this batch script for executing apktool in Windows.

@echo off
set APKTOOL_ERROR=
if not defined APKTOOLVER set APKTOOLVER=1.4.7
java -Xmx512m -jar "%~dp0android\apktool_%APKTOOLVER%.jar" %*
if errorlevel 1 set APKTOOL_ERROR=%ErrorLevel%
if [%1]==[] call :help
if [%1]==[--help] call :help
if [%1]==[-?] call :help
goto :eof

:help
echo ===============================================================================
echo NOTES
echo ===============================================================================
echo APKTool 1.4.5 and above are unofficial builds.
echo - bin: http://bit.ly/LqXR5P
echo - src: http://bit.ly/Jr6AG7
echo - xda: http://bit.ly/ODjm97
echo.
echo See the following discussion for a simple how-to.
echo - http://xdaforums.com/showthread.php?t=707189
goto :eof

Name it apktool.cmd (or something else if you're a weirdo) and stick it somewhere in your path.

Error codes will be stored as APKTOOL_ERROR

If you want to use a different version, simply define the version number with APKTOOLVER.

One caveat is that I keep apktool_*.jar in a subfolder of this batch script called "android," i.e.,

.\apktool.cmd

.\android\apktool_1.4.3.jar

.\android\apktool_1.4.5.jar

.\android\apktool_1.4.7.jar

If that rubs you the wrong way, then simply remove or replace "android" in the part of the script that says %~dp0android\. (note: %~dp0 resolves to the fully qualified path name of the batch script.)
[Android Software Development] iBotPeaches:
This makes no sense. Please structure your post, even linking back to previous posts you made in this thread. I'm following random emails, tons of posts in this thread and github. I get lost in who is trying which APKs, you always have to refresh me on what your doing.
[Android Software Development] tpboy:
1.4.8/1.4.9 bug?
[Android Software Development] sn0b0ard:
You should also post what aapt you are using, Java version, OS, which APK (SystemUI.apk) it looks like and from which ROM it came from. You also may want to post your APK as an attachment.
[Android Software Development] iBotPeaches:
I don't know that. A standard hex color code is 6 chars, the additional 2 chars might be opacity level. I did merge some changes from xxy relating to colours so that may be the cause.

Did it cause any problems? I believe this new method is correct.

Sent from my SGS3 AT&T Variant
[Android Software Development] raziel23x:
I know in modeling the extra in the hex color deals with alpha colors do I am not sure if this apply in the Android world but from modeling for morrowind oblivion and skyrim that is what is used
[Android Software Development] sn0b0ard:
Check this out for information on color in Android:

http://developer.android.com/reference/android/graphics/Color.html
[Android Software Development] raziel23x:
Same standards as regular color elements used for textures
[Android Software Development] schmeggy929:
Which version of Apktool do you recommend and do I place the 1.4.9.jar file and aapt patch inside Apktools?

Currently running windows 7 x64. Java jdk1.7.0_05, jre7
[Android Software Development] iBotPeaches:
I don't know how all these "multi" apktools work. You can ask the creators of it how to add the binary in. I of course recommend the newest version v1.4.9. I use it daily without error. You can read upwards to find what other problem people are encountering.

I haven't made the jump to Java 7 yet, so no opinion on that. AAPT goes where APPT goes. Its different for every situation and every OS. I drop my AAPT in /usr/local/bin/ since I have my $PATH pulling binaries from there.

Just figure out where the Windows Android SDK is storing the current AAPT and go from there.

On Windows it could be something different. I don't know. These questions can be answered via Google. I'd like to help people with bugs in this topic, not "how do I setup apktool"
[Android Software Development] schmeggy929:
That's quite alright, doesnt hurt to ask, thanks for the hard work!
[Android Software Development] sn0b0ard:
Put aapt inside the same folder that the apktool.jar file is in. Then chmod a+x aapt, apktool and wrapper scripts. You can also just install Android-SDK and then add the platform-tools folder to your $PATH so it reads aapt from there.
[Android Software Development] reosm:
windows 7 64 bit

framework-miui-res.apk decompile ok

framework-miui-res.apk recompile error
[Android Software Development] creeve4:
xml formatting is pretty messed up after decompiling

What it should look like

What I am getting with v1.4.9 and the aapt.exe in the OP or the newest from the SDK

This happens on all xml files.
[Android Software Development] Epic.:
is there a command which would decompile all apks in one folder?
[Android Software Development] sn0b0ard:
Windows Command Prompt Instructions

I recommend not using Windows Command Prompt and instead use Windows Powershell. If your Windows is not compatible with Powershell, then use these instructions.

Put apktool.jar and apktool.bat (wrapper) into the folder where the APK files are at.

Put the following code in a .bat file and run it in that same folder.

Decompile all APKs in a folder

for %%i in (*.apk) do (apktool.bat d %%i)

Edit:

I had a syntax error (-d) in my batch script! --corrected now thanks Fallen for letting me know.

Build all decompiled APKs in a folder

for /F %%f in ('dir /b /ad "*"') do (apktool.bat b %%f)

Windows Powershell Instructions

Preferred method

If you need Powershell 3, download and install it using this URL:

http://www.microsoft.com/en-us/download/details.aspx?id=29939

Copy apktool.bat and apktool.jar to APK folder. Open Windows Powershell on your Windows computer (Start > All Programs > Accessories > Windows Powershell). cd into the APK directory in Powershell and paste the following into the PS prompt:

Decompile all APKs in a folder

Get-ChildItem *.apk | Foreach-Object { .\apktool.bat d $_ }

Build all decompiled APKs in a folder

Get-ChildItem -Directory | Foreach-Object { .\apktool.bat b $_ }

I just tested this on my Windows 7 SP1 machine (With Powershell 3.0 RC1 installed) and it works fine.
[Android Software Development] iBotPeaches:
The formatting may look bad, but it does fix a lot of manifest issues.

I'll try and look into it, but I don't wanna fix formatting to break functionality. I agree it's bad, and hopefully it's just a bad output code.

Sent from my SGS3 AT&T Variant
[Android Software Development] creeve4:
Its not just the looks, it makes it more difficult to read/follow the code and make changes.
[Android Software Development] Epic.:
So i would install framework files normally then use this command
[Android Software Development] TMFGO45:
So these updates are for the command line apktool correct? And with the newest version, are we updated to get to work with Jelly Bean stuff? And anything that worked on the older version still works right? In other words, nothing new/updated broke something old that was working?

Sent from my Galaxy Nexus! (CNA 3.0 , Leankernel 4.2.0 exp2, TWRP 2.2)
[Android Software Development] sn0b0ard:
Yes, that is correct. You may want to also adapt the script for installing frameworks from /system/framework since you want to decompile a batch of apks. Add to the end of the command '> error.txt' without quotes, so it outputs all warnings and errors to a text file.
[Android Software Development] zelendel:
Depending on the app it won't work. Some apps are making it so it breaks if any changes are done to it. I know hand cent is like this. Can't even 7zip the icons without it breaking.

Wayne Tech Nexus
[Android Software Development] J0KER!:
and is there any way to fix this? i try to mod viber messenger apk..
[Android Software Development] zelendel:
If they are using the same set up as hand cent or something like it then no there is nothing you can do.

Wayne Tech Nexus
[Android Software Development] J0KER!:
Is there a way to know for sure if viber is such an app?

my hope is i did something different wrong.

or to test my "skillz", what an app i should be able to modify? because I tried to mod lg led notification.apk and that did not worked too.

Rom P.A.C-Man 20.1.0 | Jellybean 4.2.2 Kernel Kowalski Kernel Theme Hue + Add-on[/B
[Android Software Development] zelendel:
You could try gmail. That is an app I mod regularly. More and more apps are using encryption to prevent modding. Going forward I think we will be seeing less and less apps that we will be able to work with.

Also make sure you have all the proper frameworks installed.

Wayne Tech Nexus
[Android Software Development] m4570d0n:
Or NinjaMorph or MetaMorph

On an unrelated note, Has anyone tried to compile the new Play Music v5.0.1053J and run into this error?:

C:\Users\m4570d0n\Downloads\Android\APK-Multi-Tool\other\..\projects\Play_Music_5.0.1053.apk\res\values-v16\styles.xml:8:
error: [B][COLOR="Red"]Error: String types not allowed (at 'android:textAppearanceAutoCorrectionSuggestion' with value 'sans-serif-light')[/COLOR][/B].

I'm not sure what the issue is with that as the textAppearanceAutoCorrectionSuggestion reference isn't exactly all that new, and my SDK tools/API's are all up to date (v22.0.1 and 17rev.3, respectively).

If I simply just removed all the items in the /values-v16/styles.xml file then I get the same error for that item wherever it appears in /values//styles.xml as well. I did notice though that in the 5.0.1052J version of the Play Music apk, all of those lines had the same values but instead of looking like this:

<item name="android:textAppearanceAutoCorrectionSuggestion">sans-serif-light</item>

it looked like this:

<item name="android:fontFamily">sans-serif-light</item>

I decided to try using android:fontFamily for 5.0.1053J, and I was able to compile/install it successfully without any errors. Why is android:textAppearanceAutoCorrectionSuggestion throwing an error though?

---------- Post added at 01:05 PM ---------- Previous post was at 12:48 PM ----------

I'm sure I'm just being redundant here, but did you try clearing the cache/data for the app and then uninstalling it before trying to install your modded version? Also, when doing that, did you try putting the modded apk on your sdcard and then opening it from a file explorer to install it (rather than manually placing it in /data/app directly or installing via ADB).

And just for clarification, are you compiling the apk and retaining the original signature, or are you compiling an unsigned apk and then signing it yourself?
[Android Software Development] J0KER!:
oh nooo. i hope somebody will find a way to crack that! ok. i'll try gmail. thanks

i already tried ninjamorph. no success. and no, i saved it as png ^^

no, i didnt clean the cache before uninstalling. i will try that too.

i already pushed it via adb and i tried to install via adb too.. what to say...no success..

how to keep the original signature while compiling? in all threads they say just put pack metaInf, manifest and maybe lib folder.

with apk tool i compile with apktool command <apktool b appname.apk>
[Android Software Development] zelendel:
There won't be any way to edit them if people start using google's own encryption for the apps. There is alot of info on on it if you check Googles development page.

Wayne Tech Nexus
[Android Software Development] iBotPeaches:
Google has internal libraries, they probably have newer aapt and frameworks. You can run those newer applications on older phones due to Android's fallback mechanism, but re-building those apks with the same framework causes those errors.

I'm chasing two ideas.

1) There is a new Android version coming w/ support for all those new attributes and what not, so they will resolve themselves in time.

2) The embedded second package present in most application might contain references to these attributes EX( We have the "android" package and the "whatever.the.package.name.is" package) . Currently we skip the first package which is always the "android" / "com.htc" package and only worry about the real one. I just tried with that 5.0.1053J Music version I had, except examining the first package ("android") and seeing what it was.

I hoped I would find this "missing" attribute in that package which we ignore, but there was only one res spec present in it, and it was some menu. So that was a dead end. Which only reinforces point #1 or the slight slight chance that I made a mistake and point #2 is still valid.
[Android Software Development] m4570d0n:
Looking back at the error again it looks like the target sdk version is API 18. The next line after the part of the error I posted in my previous post is this:

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 8, [B]--target-sdk-version, 18[/B], -F,

Perhaps it has something to do with this (basically, point #1 in your post)?
[Android Software Development] min0rity:
Getting error when trying to re-compile framework-res.apk heres my log

|Sat 07/13/2013 -- 16:56:40.54|

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

java version "1.7.0_25"

Java(TM) SE Runtime Environment (build 1.7.0_25-b17)

Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Could this be an issue with java 1.7.0_25 on win 8?

also tried it with jdk 1.6.x.x

Quote:

Originally Posted by bovirus View Post

[MENTION=1436418]min0rity[/MENTION]

Plase try with JDK 1.6.xx

|Sun 07/14/2013 -- 23:26:52.64|

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

java version "1.6.0_45"

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

Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

still no luck for me, any ideas on win 8?
[Android Software Development] m4570d0n:
I'm not sure what that's supposed to be a log of, as that really doesn't give any information at all other than your Java version.

I'm running JDK 1.7.25 on Win 8 (and Linux Mint 15) and I have no issues recompiling framework-res.apk or any other apk (except for the latest Goggle Music, but that's a separate issue). I doubt that's the issue.
[Android Software Development] min0rity:
that's the only thing that shows after recompiling fails and it tells me to check my log.
[Android Software Development] iBotPeaches:
No its not. That is a version output of two different java versions, both of which for that matter work on Apktool. None of what you posted have any apktool portion in it. Which means you never ran Apktool from our perspective.

As per the OP.

How do you expect us to help you? Its like if I called a car shop and said my car doesn't work, and then when they asked what was wrong, I sent them the manual of my car. This is how you are handling things right now.
[Android Software Development] v5HMeca:
I think you should continue with the switch to 1.7.

Java.com only has v1.7 available, and Oracle.com buries 1.6 in its archive, preferring instead to direct everyone to 1.7.
[Android Software Development] iBotPeaches:
Well, it seems API 18 has dropped.

2.0 is not yet ready. This smali2 merge is taking me awhile to perfect, due to the big changes to dexlib and my distraction on other projects. I will merge any changes that 4.3 requires (API 18) into the current Apktool 1.5.2, and release a little 1.5.3 update. Hopefully, it'll be just an aapt and internal framework update as I don't see any resource qualifier changes. This will happen shortly after I get an AOSP drop of 4.3.

I don't want to "pick" any of the bug fixes from 2.0 into 1.5.3 due to the risk of introducing bugs, and since 2.0 requires JRE7, I don't want to risk bringing that requirement into a 1.5.x release, or diminishing the "boom" of 2.0 by bringing its changes into a smaller release.
[Android Software Development] danger_beast:
So why this error ???

I was trying to hv fun with apktool BUT THIS STOPPED ME!!!

E:\Danger\Soft\Custom Rom\APKTool\APKTool>apktool d systemui.apk

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)
[Android Software Development] cowsquad:
You should write at least a sentence if you expect any help. Don't be lazy
[Android Software Development] cowsquad:
Deleted
[Android Software Development] tommypacker:
I'm getting this when I try to decompile/recompile framework-res.apk. Can anyone help me out? I can't even recompile when I don't make any changes.

http://pastebin.com/6XqCtW4h
[Android Software Development] cowsquad:
What ROM is this framework coming from?
[Android Software Development] tommypacker:
Pacman

Sent from my Infuse 4G with Carbon Rom
[Android Software Development] starbucks2010:
Hello,

I try to decompile the SecSettings.apk from FoxHound ROM v1.3 (XXUBMG7) and I get many error lines like this:

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

|31/07/2013 -- 9:35:34,79|

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

java version "1.7.0_25"

Java(TM) SE Runtime Environment (build 1.7.0_25-b17)

Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)

Could Not Find C:\ApkManager\place-apk-here-for-modding\../place-apk-here-for-modding/signedSecSettings.apk

Could Not Find C:\ApkManager\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSecSettings.apk

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: D:\Documents and Settings\username\apktool\framework\1.apk

I: Loaded.

I: Regular manifest package...

I: Decoding file-resources...

W: Could not decode attr value, using undecoded value instead: ns=android, name=widgetLayout, value=0x02030015

W: Could not decode attr value, using undecoded value instead: ns=android, name=widgetLayout, value=0x02030015

.

.

W: Could not decode attr value, using undecoded value instead: ns=android, name=widgetLayout, value=0x02030015

I: Decoding values */* XMLs...

I: Done.

Also, when I tried to install framework-res.apk taken from the ROM I get the following errors:

D:\Documents and Settings\username>apktool if c:/framework-res.apk

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

spec=0x010802f5 drawable/ic_ab_back_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)

Can someone tell me what is wrong?

Thank you in advance.
[Android Software Development] bombadier:
Trying to mod google music,have SDK 18 installed,and using a framework from 4.3 JWR66V,app decompiles fine but get a Error retrieving parent for item: No resources found that matches the given name on building.

Decompiling/compiling without resources works so what resources am I missing ?

Thanks in advance
[Android Software Development] m4570d0n:
What is the exact error? To be more specific, what is the actual resource name that was listed in the error message when it said: "No resource found that matches the given name [resource name]"?

If the error happens to be this:

Error: No resource found that matches the given name: attr 'android:textAppearanceAutoCorrectionSuggestion'​

You could go through the styles.xml, and for every item that starts with:

<item name="android:textAppearanceAutoCorrectionSuggestion"> ​

change it to this:

<item name="android:fontFamily">​

(Note: you will probably need to do this for the styles.xml file in a few other values folders as well, such as /res/values-v16/ and res/values-large/)
[Android Software Development] djmatt604:
It seems to be complaining about strings you have placed in strings.xml in a couple of places. What modifications did you make to those XML files? Perhaps pastebin them with a description of what you changed.

Sent from something Infamous....
[Android Software Development] TheDestroyer:
Unfortunately ApkTool gives these errors even without any modifications. Decompile SecPhone.apk and then compile it - errors.
[Android Software Development] zelendel:
It seems to only be pulling from 2 resource files. As this is a TW app did you install all 3 framework files?

Wayne Tech Nexus
[Android Software Development] TheDestroyer:
I've installed only two framework files: twframework-res.apk and framework-res.apk how to find out which is the third?

By the way, what is TW?
[Android Software Development] zelendel:
TW is Touch Wiz. On OEM roms you need all 3. Framework-res, SystemUI (common to all roms) Then the OEM frameworks. TWframeworks, Com.HTC.resources ect.
[Android Software Development] iBotPeaches:
Quoted the wrong post, o well. Your problem roots from a bug in Apktool that has since been fixed in the wip-2.0 branch.

error: Multiple sub
stitutions specified in non-positional format; did you mean to add the formatted
="false" attribute?

https://code.google.com/p/android-apktool/issues/detail?id=260

Feel free to build the wip-2.0 branch yourself, and try it out. I'm not posting binaries yet, because I have a pretty bad bug only in Windows still, so don't want to release that to the wild.
[Android Software Development] iBotPeaches:
Thats the Windows bug I have to fix. You'll have to wait at this point. I don't have a binary w/ windows support yet. My work computers are the only ones running Windows, so I only have changes to debug/fix Windows problem during spurts of work time.

If I can't get it done soon, I'll just spin up a Windows VM at home, but I'd rather not have to do that.
[Android Software Development] raziel23x:
I have compiled the latest github of 2.0 if you wish to test apktool.jar

My computer is a dual boot so I normally build all binaries on Ubuntu 13.04

And copy it to my windows partition

It have the binary in my 2.0 branch of APK Multi-Tools which is highly experimental for my windows version I have yet to do so for my Linux version of APK Multi-Tools.

I do not recommend this as your daily driver though