yashsingh1/xdaforums huggingface dataset:
[Android Software Development] UzUmAKI_NaRuTo1:
I dont know why it sounded rude to you ...!! :rolleyes: maybe........ you are rude !!! anyways am sorry if i sounded rude !!

And if you read it again i have said that correct me if i am wrong , or if i am missing something !!!!

Am not blaming new version !! facing some issue and reporting it , is it a blame ??? even if it wasn't a issue , in that case i have asked help at the end if you didnt read it ! btw device is on jellybean ! and sorry again..just if uyou fet i was wrng

I said smalis were correct because , there are no changes to be done in those smalis , they are just to be added ! so am wondering why it occurs ?
[Android Software Development] Morningstar:
It doesn't matter whether or not you have to make any changes yourself, you're still adding new classes to an app that weren't present originally, and if there's anything even slightly off....if it was made for a different os version, or a different hardware variant, or whatever, it probably won't work as-is.

Post a link to the smali files and the guide you're trying to use, and I'll take a look at it...
[Android Software Development] monx®:
sorry if this was mentioned earlier. smali/baksmali v2.06 are avail.
[Android Software Development] bovirus:
[MENTION=3924617]iBotPeaches[/MENTION]

Are available baksmali/smali 2.0.6. Could be inetersted about it to include in your source?
[Android Software Development] Ticklefish:
I could go into some detail about why you're getting this errror but, simply put, smali files generated by apktool 1.5.2. are not compatible with apktool 2.

If you want to use old smali files on an APK/JAR decompiled by apktool 2, you'll need those files to be updated. I normally keep some old APK files that can be decompiled and recompiled with apktool 1.5.2. on my hard drive. I add the old smali files to the decompiled file, recompile it, then decompile it with apktool 2. Then I've got smali files what work with apktool 2.

It takes a few minutes but it works!
[Android Software Development] iBotPeaches:
No worries. Rest assured I knew about 2.0.6. Since we had a bug solved with a newer smali - https://github.com/iBotPeaches/Apktool/issues/920#issuecomment-98059475

I asked JesusFreke to make a public 2.0.6 release. He found time and did, and I merged it in after some tweaks (https://github.com/iBotPeaches/Apktool/commit/1fb87e3e4c1fc7b503ada47ca5607dfbef21eeca).
[Android Software Development] UzUmAKI_NaRuTo1:
i solved the issue by using advanced apktool RC3 ..1! but i will try your method if in future required ... i have one guide which needs it ! thanks alot :)

Thanks for asking.. but i tried advanced apktool based on 2.0.0 RC3 and that worked !! :) but still there's another guide... , which is not gettng compiled ! if you wish to help i can give you that guide ! that guide is in the zip.... and not on any link ..and thanks :)
[Android Software Development] Ticklefish:
Hmm...I'm guessing that tool uses the original smali and baksmali (the ones used in apktool 1.5.2.) to decompile the classes.dex file separately. Not a bad idea, although you won't get the advantages of the latest jar files. But, if it works and you're happy, that's all that matters!

If you can create smali files that are compatible with apktool 2, it's worth sharing them in the thread of the mod you're doing. That way, other people can benefit from it. :highfive:
[Android Software Development] UzUmAKI_NaRuTo1:
ya i understand :) and i tried yor trick... i had old apks to decompile with 1.5.2 and it worked as expected!! Thanks man !! :p And i know where i have read Ticklefish :silly:
[Android Software Development] jgfernog:
Hello!

I have a problem here and I need your help!

I decompiled an apk on my apktool(android version) because I have a bug on s6 gallery ported to Note 4. I found the lines and I made all changes I need, but when I tried to recompile the folder, it fails.

May I do something later change some smali lines?

Enviado do meu SM-N910C.
[Android Software Development] Thebear j koss:
Does it recompile before changes? Would need to see a log of what is causing error.

Thebe@r'$ G@L@XY

Support TBO and the continuation of inverted and transparent apps and look as cool as your phone with a TBO t shirt- http://teespring.com/teamblackout
[Android Software Development] Morningstar:
What version of apktool are you using?
[Android Software Development] bovirus:
[MENTION=3924617]iBotPeaches[/MENTION]

is there some specail trick to compile apktool under Windows 7 / Windows 8 64bit with JDK 1.7.x/1.8.x?
[Android Software Development] claude96:
[MENTION=293887]Morningstar[/MENTION] did you have any luck recompiling twframework-res.apk successfully ? with any apktool version !, anyone !, sorry for the OT everyone.
[Android Software Development] iBotPeaches:
Not possible currently. https://github.com/iBotPeaches/Apktool/issues/933. Works for me actually. Couldn't duplicate.
[Android Software Development] claude96:
[MENTION=3924617]iBotPeaches[/MENTION] weird !, but I've just did build apktool over windows 7/ with jdk 7.

Sorry, I just saw you edited your post ( I was busy doing something, and just clicked to post )
[Android Software Development] Phone_Guru:
I can build the jar successfully using the latest source but proguard doesn't work
[Android Software Development] Morningstar:
I have with earlier RC releases of apktool; I haven't tried since v2 was released. When I get home in an hour or so, I'll give it a go with the latest apktool and see what happens.
[Android Software Development] adomol:
Trying this out for the first time and I think I've followed the required steps. So as a test I pulled the framework-res.apk from the rom I'm using and used it to execute apktool if framework-res.apk. I then decompiled said apk successfully and tried to recompile it multiple times, with and without making any changes, but I get the same error:

ozric@ErpTech1 ~/apktool $ apktool b framework-res -o new.apk
I: Using Apktool 2.0.0
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_7496891252893545631.tmp, p, --forced-package-id, 1, --min-sdk-version, 22, --target-sdk-version, 22, --version-code, 22, --version-name, 5.1.1-eng.iceandfire.20150429.000206, -F, /tmp/APKTOOL8812493451394907961.tmp, -x, -0, arsc, -S, /home/ozric/apktool/framework-res/res, -M, /home/ozric/apktool/framework-res/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:458)
at brut.androlib.Androlib.buildResources(Androlib.java:396)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_7496891252893545631.tmp, p, --forced-package-id, 1, --min-sdk-version, 22, --target-sdk-version, 22, --version-code, 22, --version-name, 5.1.1-eng.iceandfire.20150429.000206, -F, /tmp/APKTOOL8812493451394907961.tmp, -x, -0, arsc, -S, /home/ozric/apktool/framework-res/res, -M, /home/ozric/apktool/framework-res/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:444)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_7496891252893545631.tmp, p, --forced-package-id, 1, --min-sdk-version, 22, --target-sdk-version, 22, --version-code, 22, --version-name, 5.1.1-eng.iceandfire.20150429.000206, -F, /tmp/APKTOOL8812493451394907961.tmp, -x, -0, arsc, -S, /home/ozric/apktool/framework-res/res, -M, /home/ozric/apktool/framework-res/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
... 6 more

I'm using the latest apktool2.0 on linux 32bit mint. The apk is from a 5.1.1 rom for nexus 7 grouper.

TIA
[Android Software Development] DaOldMan:
I can't even install framework-res.apk as a framework - can't decode arsc :(. Version 5.1.1 BlissPop.
[Android Software Development] iBotPeaches:
There is no real error to go on there. You can try using -v (verbose). Like apktool b -v framework-res -o new.apk. You will need to pipe the output of this command to a text file either using tee or just > file.txt 2>&1. As the output will be huge.
[Android Software Development] xxmrgreenxx:
I loose the v4 and v13 Foldername Extension after decompile Lollipop Apps.

How to fix that?
[Android Software Development] willowmaker420:
When the apktool recompiles it will add them back in,just remember when using a vr theme zip that you remember to add the "v" extentions in or else it wont work correctly
[Android Software Development] adomol:
Here is the output file... it was too big to use pastebin or any other paste util I could find so I'm just providing a link to the file.

Thanks!
[Android Software Development] xxmrgreenxx:
4 me with APK Multi Tools that dont work.

The build Folder didnt contain the v xtension

For now i add the xtension after compile.
[Android Software Development] Morningstar:
I haven't had a chance to build and try the last couple of updates, so if this has already been fixed, please disregard.

Anyway, I was looking into the issues with twframework-res not recompiling, and found that if you decompile it with one of the 2.0 builds, then recompile it with 2.0.0-Beta9, it recompiles and works just fine. You can then delete the recompiled apk and recompile again with the 2.0 releases, as long as resources aren't changed; Any change to resources causes 2.0 not to recompile, so the issue seems to be something with the way the newer builds are compiling the arsc file.

I tried several older builds that I had laying around, and beta9 was the first one that worked; RC2 and above do not work.

Anyway, until when and if a fix is found (assuming one hasn't already been found, beta9 can be used to recompile twframework-res without issue....
[Android Software Development] Ticklefish:
Is there a way to add an option to output to a particular file in the actual command, instead of piping?

I asked this before ages ago but it looks like Windows 8.1. won't allow the piping to happen. The output isn't sent to the screen, or to a file...it just vanishes.

I don't know if this is a deliberate part of Win 8.1. or just a bug. I can see output direction being a potential security issue, possibly, but removing it completely seems a little over the top..

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

Sent From My iPad (Yes, Really)

----------------------------------------------------
[Android Software Development] Morningstar:
I'm pretty sure I've redirected output to a text file using the normal 2> log.txt and 2>&1 log.txt commands in 8.1. If not, you can try using | clip, which will redirect everything to the clipboard, which you can then paste into notepad or whatever.
[Android Software Development] claude96:
[MENTION=293887]Morningstar[/MENTION] thanks a million for taking the time to test the twframework-res.apk issue, I've just tested with beta9 and it recompiles fine ( can't test it though, unfortunately my phone is in repair, but I'll take your word for it for sure ), again thanks a bunch.
[Android Software Development] Morningstar:
Awesome. I'm glad to hear it's working for someone else, and that I wasn't just imagining things. I sort of got confused there, for awhile, switching between 5 or 6 different versions of apktool.

[emoji23]

And yes, it does work when pushed back to your device. I really wasn't expecting it too, but I've been running with my recompiled one since I posted that earlier, and there's no problems.

When I started looking at it, I thought for sure the issue would be something to do with how the newer releases were decoding the resources, because it seemed like half of the drawables (if not more) were replaced with APKTOOL_DUMMY_xxxx, but apparently not, since beta9 recompiles it. I don't know anything about the inner workings of apktool, but whatever the issue is, it seems to be in the re-encoding and re-creation of resources.arsc. I'm sure iBotPeaches will be able to better explain what's actually happening, and work out a fix for it eventually. In the meantime, though, at least we have a workaround.

Also, for anyone who does work with twframework-res, it's kind of confusing, since so many of the drawables are replaced with dummy strings in the xml, but if you need a reference for what's what, nearly all of the affected xml files and associated drawables are exactly the same in Kit-Kat versions of the apk, so you can use that to cross-reference (or copy and paste lol).

I'm attaching beta9 here so people who may need it can find it, but don't use it unless you have a specific need for it, as it's an older release, and remember: It's only for recompiling twframework-res. You have to use one of the newer v2 releases to decompile it.
[Android Software Development] claude96:
[MENTION=293887]Morningstar[/MENTION] again thanks a million, and yes I believe you that it's working, an other thing I've tried when I had my phone, is that if you change the sharedlibrerary from false to true !, all lollipop apktool will recompile with no issues, but of course all apps with sharedlibrary will force close ( contacts, music, extra ) and that is normal I guess, hope this helps more somehow finding the issue !
[Android Software Development] Morningstar:
You mean in the apktool.yml file? Interesting. I've never really messed with any of the values in there before.
[Android Software Development] claude96:
[MENTION=293887]Morningstar[/MENTION] Yes, in the apktool.yml file, I rarely touch that file as well, but I remember a while back that I had too ( can't remember the why know )
[Android Software Development] Crussader:
back in the ICS days... Wanam made a "hack" that allowed you to decompile/compile files using another framework in the yml files:

usesFramework:
ids:
- 1
- 2
- 3

He used 2 dummy framework files for it... dunno why or how this hack was elaborated... didn't had much knowledge about this in that time. So this file sometimes helps a bit.
[Android Software Development] Ticklefish:
The Sony ICS framework-res.apk needed its apktool.yml editing before it could be recompiled.

I'm not sure that'd help in this situation though.

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

Sent From My iPad (Yes, Really)

----------------------------------------------------
[Android Software Development] Azharkanorwala:
Could Someone Tell Me Is this the weird LG bug that has been the problem.

Because if i decompile LGsettings.apk,its ok but when i recompile the orignal one without any modification,the re-compile is successful but when i try to decompile the new Lgsettings it gives the error(in screenshot)

http://xdaforums.com/showpost.php?p=60564719&postcount=3998

Or am i doing something wrong??
[Android Software Development] iBotPeaches:
Sorry all, just got done with classes. Lots of time on my hands now. In my focus now

Tracking a bug with qualifiers. Some applications are decoding without the version qualifier (v7, v13, v21) and since we don't allow implicit addition of them during rebuild, they are never added back.

A new bunch of apks, some with Proguard, some without are seemly crashing very early into the procedure. Haven't dug into this enough to know what really going on yet.

Some apks are losing visual elements during rebuild, yet have no errors. I think its related to #1

Files with no extension are being ignored during rebuild

Working to get these fixed.
[Android Software Development] Morningstar:
Awesome job, man. Not sure if you saw, but I found that an earlier build (2.0.0-beta9) is able to get past the issue people have been having with recompiling twframework-jar. Hopefully that'll help you figure out a fix at some point.

Keep up the excellent work! We'd all be lost without you.
[Android Software Development] JengaMasterG:
So I'm trying to recompile the stock mms.apk app and I keep running into this error without an apk being compiled...is there any further explanation that I can get out of this? I haven't used apktool in a while so I haven't kept up with the newest updates.

I'm using Windows 7 w/ java 7

C:\Users\Giovanni\apktool>apktool b -f c:\users\giovanni\apktool\mms C:\Users\Giovanni\Desktop\mms.apk

I: Using Apktool 2.0.0

I: Smaling smali folder into classes.dex...

I: Building resources...

warning: string 'description_dial_phone_number' has no default translation.

warning: string 'description_send_message' has no default translation.

I: Building apk file...

I: Copying unknown files/dir...
[Android Software Development] Morningstar:
There's no errors in that. You need to post the entire output.
[Android Software Development] JengaMasterG:
That's all the output I get from the command prompt and it ends up not creating the apk file.
[Android Software Development] Morningstar:
That can't be all of it, otherwise it would end with "C:\Users\Giovanni\apktool>", unless you're not letting it finish....

Edit: try building again, without the -f flag, and append "1> log.txt 2>&1" to the command, then if it doesn't build, upload or paste the entire log.txt.
[Android Software Development] JengaMasterG:
Here is what my cmd said:

C:\Users\Giovanni\apktool>apktool b c:\users\giovanni\apktool\mms C:\Users\Giovanni\Desktop\mms.apk 1> log.txt 2>&1

C:\Users\Giovanni\apktool>

I will upload the log.txt. The apk file still isn't building. I'm using a OnePlus One on Exodus Lollipop Framework-res.apk and the mms.apk is from there also.
[Android Software Development] Thebear j koss:
What's the issue? According to your log the apk built fine...

Thebe@r'$ G@L@XY
[Android Software Development] JengaMasterG:
The apk file isn't being created in any folder that I would specify...

EDIT: I've also tried to not specify a place, but the built apk still doesn't show up
[Android Software Development] Thebear j koss:
It's building somewhere, lol. You have no errors on recompile. Not too sure what the issue is, my built apk is always in my apktool folder.

Thebe@r'$ G@L@XY
[Android Software Development] JengaMasterG:
Well I guess I'll start a massive search on my comp and see what I can find lol..
[Android Software Development] Dzepar:
You should have "dist" folder in your decompile folder mms, there where it recompile for me.

Good Luck.

Xperia M2 D2303 on K.K. 4.4.4
[Android Software Development] JengaMasterG:
Sweet, thanks I found it there!
[Android Software Development] Morningstar:
Is anybody else having problems building after the latest update? I've never had any problems before, and nothing has changed on my system, but now every time I try to build, it fails on AccessorTest (with or without proguard). I also tried building to see if it would work (as suggested by iBotPeaches on GitHub), and it too, is failing the AccessorTest.

Java build 1.8.0_31-b13

OS X 10.9.4
[Android Software Development] Crussader:
Have you tried reverting to Java 1.7? I had some strange bugs with 1.8
[Android Software Development] Morningstar:
No, haven't tried that. Hell, I don't even know how long I've been on 1.8; I have Java set to auto-update lol.

I'll give that a try later and see if it works.

[emoji106]
[Android Software Development] sevenkel:
hello there,i decompiled whatsapp using apktool, I wanted to add some more emoji to it and share it with my frnds(dont wanna use WA plus),is it possible?thanks
[Android Software Development] Thebear j koss:
Yes it would be possible, how you would go about doing it is a whole other story. Whatever you add in must be defined within the app, can't just throw in a bunch of stuff and think it will show up in the app.

Thebe@r'$ G@L@XY

Go here- http://xdaforums.com/showthread.php?t=1016053

for amazing SuperSwiftkey themes❕❕❕
[Android Software Development] Morningstar:
Like [MENTION=4916750]Thebear j koss[/MENTION] said, it would be possible, but the emoji would only be visible on your modded app. You couldn't send them to anyone else...
[Android Software Development] gcrutchr:
Thanks. I can do testing if you like. I also develop on the Galaxy S III.
[Android Software Development] SunnyOK:
Yes. I would like to test it by rebuilding Jelly Bean Contacts.apk. Please provide new apktool. Thank you.

---------- Post added at 09:16 PM ---------- Previous post was at 09:09 PM ----------

Just let you know that, in captivate, I never have problem to rebuild JB SystemUI.apk. Only problem with Contacts.apk.
[Android Software Development] NCandiano:
How?? I've been killing myself over %signs for days.

Sent from my Galaxy Nexus using Xparent SkyBlue Tapatalk 2
[Android Software Development] lichti1901:
Its in systemUI smali. policy/statusbar/KeyButtonView.smali open it and scroll to the end, there you'll see the string for duration. :)

Gesendet von meinem GT-I9300 mit Tapatalk 2
[Android Software Development] ubuntunerd:
thanks iBotPeaches for taking the time to continue this project is much appreciated, i had a quick question i was able to use apktool 1.4.3 but i try this one and im getting:

ubuntunerd@ubuntunerd:~$ apktool

apktool: can't find apktool.jar

i google around but i wasnt able to find a fix, im using ubuntu if that makes difference.

any help is much appreciated thanks
[Android Software Development] raziel23x:
Place this file in the same directory as the apktool.jar and try again

Save our as apktool

#!/bin/bash
#
# Copyright (C) 2007 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This script is a wrapper for smali.jar, so you can simply call "smali",
# instead of java -jar smali.jar. It is heavily based on the "dx" script
# from the Android SDK

# Set up prog to be the path of this script, including following symlinks,
# and set up progdir to be the fully-qualified pathname of its directory.
prog="$0"
while [ -h "${prog}" ]; do
newProg=`/bin/ls -ld "${prog}"`
echo ${newProg}

newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
if expr "x${newProg}" : 'x/' >/dev/null; then
prog="${newProg}"
else
progdir=`dirname "${prog}"`
prog="${progdir}/${newProg}"
fi
done
oldwd=`pwd`
progdir=`dirname "${prog}"`
cd "${progdir}"
progdir=`pwd`
prog="${progdir}"/`basename "${prog}"`
cd "${oldwd}"

jarfile=apktool.jar
libdir="$progdir"
if [ ! -r "$libdir/$jarfile" ]
then
echo `basename "$prog"`": can't find $jarfile"
exit 1
fi

javaOpts=""

# If you want DX to have more memory when executing, uncomment the following
# line and adjust the value accordingly. Use "java -X" for a list of options
# you can pass here.
#
javaOpts="-Xmx256M"

# Alternatively, this will extract any parameter "-Jxxx" from the command line
# and pass them to Java (instead of to dx). This makes it possible for you to
# add a command-line parameter such as "-JXmx256M" in your ant scripts, for
# example.
while expr "x$1" : 'x-J' >/dev/null; do
opt=`expr "$1" : '-J\(.*\)'`
javaOpts="${javaOpts} -${opt}"
shift
done

if [ "$OSTYPE" = "cygwin" ] ; then
jarpath=`cygpath -w "$libdir/$jarfile"`
else
jarpath="$libdir/$jarfile"
fi

exec java $javaOpts -jar "$jarpath" "$@"
[Android Software Development] ubuntunerd:
should i deleted the one thats there now?
[Android Software Development] raziel23x:
Open it up in a text editor and compare
[Android Software Development] mstfkaratas:
Rename apktool_1.4.9.jar to apktool.jar
[Android Software Development] ubuntunerd:
thats was it thanks i should have notice that thanks bro now i ma test drive !!!!!

feed back: decompile and compile cm10 framework-res.apk with "NO" errors awesome work on this amazing tool !!!!!!