yashsingh1/xdaforums huggingface dataset:
[Android Software Development] TheDestroyer:
iBotPeaches, raziel23x, thank you, I really appreciate your help.

I'd like to use APK-Multi-Tools, but it allways says "unexpected es" when I try to install any framework.

What I managed to do:

I took apktool.jar file from WIP-2.0 APK-Multi-Tool (experimental) and put it into Apktool folder removing the old one.

The result is:

C:\Android\apktool>apktool if framework\framework-res.apk
I: Framework installed to: C:\Users\Sergey\apktool\framework\1.apk

C:\Android\apktool>apktool if framework\twframework-res.apk
I: Framework installed to: C:\Users\Sergey\apktool\framework\2.apk

C:\Android\apktool>apktool if framework\SystemUI.apk
I: Framework installed to: C:\Users\Sergey\apktool\framework\127.apk

C:\Android\apktool>apktool d input\SecPhone.apk output
Input file (output) was not found or was not readable.

C:\Android\apktool>apktool d input\SecPhone.apk output
Input file (output) was not found or was not readable.

C:\Android\apktool>apktool d input\SecPhone.apk
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Sergey\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying assets and libs...
I: Copying unknown files/dir...
I: Copying original files...

C:\Android\apktool>apktool b SecPhone SecPhone_new.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'callFailed_timeout_408_487' has no default translation in
C:\Android\apktool\SecPhone\res; found: es pt
aapt: warning: string 'reject_cause_location_reg_fail' has no default translatio
n in C:\Android\apktool\SecPhone\res; found: es pt
aapt: warning: string 'reject_cause_location_registering' has no default transla
tion in C:\Android\apktool\SecPhone\res; found: es pt
aapt: warning: string 'reject_cause_skt_registering' has no default translation
in C:\Android\apktool\SecPhone\res; found: es pt
I: Building apk file...

New folder "SecPhone" appeared, but I don't know where to take newly compiled .apk file?

I guess that the compiled .apk is in "SecPhone\build\apk" folder and now I need to take a modified .xml file and put it into original SecPhone.apk.

But I don't understand if I could take Winrar, extract "SecPhone.apk\res\call_card.xml", modify it and then put it back with the help of winrar? Is it right?
[Android Software Development] nobody573:
Many thx man,

whit your multi tool and apktool 2.0 beta 4 is my Problem whit the SecPhone.apk done. The Videocall is going and no errors thx :good:

Samsung Galaxy S3
[Android Software Development] TheDestroyer:
The answer

I managed to compile Secphone.apk avoiding error from my post: http://xdaforums.com/showpost.php?p=44285757&postcount=2017 , thanks, raziel23x!

Also I found percent_repl.js file that prepares all files before compiling to .apk file (see in atachment). Just drag&drop the whole flder on this file in the explorer.

The problem is percent simbol (%) it should be converted to "%%" if the string doesn't contain "d", "s" or any figure.
[Android Software Development] creeve4:
When decompiling the cyanogenmod cLock app, the two strings in res/values/donottranslate.xml are decomplied to res/values/strings.xml.

Editing these two strings and recompiling has no effect.
[Android Software Development] DigitalUnderground:
Can anyone help with why I'm getting this error?

digitalunderground@digitalunderground-355V4C-356V4C-3445VC-3545VC:~/apktool$ apktool if '/home/digitalunderground/apktool/framework-res.apk'
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x01080329 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:105)
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(AndrolibResources.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)

It happens when I try installing the framework with apktool if framework-res.apk and get that error.

I'm using Ubuntu 12.04 LTS and apktool 1.5.2. I have updated SDK, I have java, I think I have everything setup right. I put a copy of framework-res.apk and systemui.apk in the same folder as the apktool file, the apktool.jar, and aapt and that's where I opened the terminal

Any help would be appreciated. Thanks
[Android Software Development] TheDestroyer:
bullonwheels , gave you tried to use percent_repl.js file from this post?
[Android Software Development] bullonwheels:
Thanks, I gave it a try.

I got this response:

### 23:30:45 10.08.2013 ###
Not Found

And on building, same error in the apktool.

I dropped the de-compiled folder on the java script file, and then compiled. Am I doing it right?
[Android Software Development] TheDestroyer:
"Not found" means that it can't help, unfortunately.
[Android Software Development] bullonwheels:
Oh okay. Any other way you know of, that might work?
[Android Software Development] TheDestroyer:
Have you tried wip-2.0 version? If you are using Windows then you can take apktools.jar from the download section of this post. If you are using Linux, then you can try to compile wip-2.0 version of apktools yourself, more info about it here.
[Android Software Development] bullonwheels:
Same Error... :(
[Android Software Development] iBotPeaches:
While sitting at XDA Dev Con, I took a look at this file between speakers. This file does nothing that isn't already fixed in wip-2.0. It prevents non-positional variable errors and fixes escaping of some variables, both bugs are fixed in 2.0.

If this is wrong, and you have a valid case that proves something is still broken in 2.0, I'd rather you post the broken code, so we can add unit tests and fix this is at the apktool level instead of running around with hacky JS files on top of Apktool :)
[Android Software Development] bullonwheels:
Could you please suggest whats wrong in my case?

http://xdaforums.com/showpost.php?p=44482257&postcount=2024

I tried this JS and WIP-2.0 also, but still getting the same error.
[Android Software Development] iBotPeaches:
There are only 5 errors there (really only one).

Error: No resource found that matches the given name (at 'style' with value '@style/StatusBarPanelSettingsContents').

With all the other one listed. This means one of the below.

This app is using a style that was privately extended, thus not compatible in new aapt

This app uses a style extension that isn't present in incuded framework

aapt updated and no longer has this style

All these missing 6 styles probably all are inherited probably from the same missing theme/style.

Find the style and include it styles.xml, or remove the dependency on that style since nothing knows about it. You are decoding and recompiling an APK. Apktool can't do it all automatically, you'll have to do some manual work with these apks.

Or start experimenting, you can try the @+ hack for those styles and see if it'll extend them at build time.
[Android Software Development] bullonwheels:
Thanks, I'll give it a try!
[Android Software Development] TheDestroyer:
Everything is ok, 2.0 builds SecPhone.apk back normally, but with some warnings:

C:\Android\apktool>apktool d input\SecPhone.apk

I: Loading resource table...

W: Skipping "android" package group

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Users\Sergey\apktool\framework\1.apk

I: Loaded.

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

Cleaning up unclosed ZipFile for archive C:\Users\Sergey\apktool\framework\1.apk

I: Copying assets and libs...

I: Copying unknown files/dir...

I: Copying original files...

C:\Android\apktool>apktool b SecPhone

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

aapt: warning: string 'callFailed_timeout_408_487' has no default translation in

C:\Android\apktool\SecPhone\res; found: es pt

aapt: warning: string 'reject_cause_location_reg_fail' has no default translatio

n in C:\Android\apktool\SecPhone\res; found: es pt

aapt: warning: string 'reject_cause_location_registering' has no default transla

tion in C:\Android\apktool\SecPhone\res; found: es pt

aapt: warning: string 'reject_cause_skt_registering' has no default translation

in C:\Android\apktool\SecPhone\res; found: es pt

I: Building apk file...

This .jar file helped me to compile .apk file with Apktool 1.5.2.
[Android Software Development] bullonwheels:
Sir, could you please provide a link for the @+ hack. google omits special characters, hence having a hard time finding it.
[Android Software Development] Ticklefish:
I think what is meant here is using '@+style/blahblahblah' instead of '@style/blahblahblah' which is what you have now.

..Have you tried Tickle My Android yet?
[Android Software Development] DigitalUnderground:
Sorry I can't help fix ur problem but I can fix your GIANT post... Lol :D
[Android Software Development] fisha21:
Whenever I've seen this sort of error it's when there's a broken 9.png...that will cause apktool to error out on all the subsequent images. All you need to do is identify the broken image and fix that. The top part of the error message (the bit you didn't post) will tell you which image needs fixing
[Android Software Development] Will_Xda:
EDIT: Problem fixed i think (ill let you know later) i was using a version of apktool that wasn't decompiling r.9.pngs properly (leaving them as r.9.png instead of 9.png)

It seemed your the go to guy about this issue (every time i see a question or error relating to this, you seem to be there explaining and helping to solve the issue :laugh: thanks for tha. )
[Android Software Development] iBotPeaches:
As of about 10 minutes ago. I finally finished the merge of Smali2 into Apktool. This includes the entire new branch of dexlib2, with all the changes it required for our DebugInjector, and it all worked!

With that done. Here is our final roadmap to 2.0. (Maybe a release candidate, or a promised 2.0.1 shortly after release)

Rebuild aapt (linux,mac,win) for API 18

Fix build error on Windows (FileSystems NIO bug)

Write documentation for Eclipse / Netbeans Debugger

Update wiki pages, especially the MigrationInstructions doc

Merge final Smali (whenever that comes)

As smali accounts for a good part of Apktool. I will not release an official Apktool2, until Ben (JesusFreke) has released Smali2 officially. It would be a very rude move to release his product in Apktool, without it being official yet.
[Android Software Development] hardrockcaffe:
Error When decompile/compile

I have this error when i try to decompile

Same happens when i try to compile. error caused by "brut.directory.PathNotExist: apktool.yml"

I read maybe if i install the Jave SE SDK 6, will fix the problem (i was using the 7 SDK), but i have the same problem (using now Java SE 6 SDK).

How to fix it?
[Android Software Development] iBotPeaches:
1) Phone / Rom please.

2) You can't compile unless decode was successful. In this case, it wasn't.

3) The JAVA version has nothing to do with it. (Though on 2.0, 7 will be required. So keep that one installed)

There are some ROMs using this "inverted" parameter which causes similar decoding errors. #1 will answer this.
[Android Software Development] fisha21:
No problem. Since it's not technically an apktool problem, more an HTC one, feel free to pm me if you need further help, rather than posting here :)
[Android Software Development] hardrockcaffe:
Isnt a system app, i just an apk (launcher), iam trying to decompile, even with jdk 7 cant decompile.
[Android Software Development] raziel23x:
Still given me issues on my windows box when compiling 2.0WIP

Here is the report of the error
[Android Software Development] iBotPeaches:
Did you even read the post you just quoted? One of the things listed on that list is "Fix build error on Windows (FileSystems NIO bug)". Not to mention you replied this exact post to the bug section of Apktool 6 hours ago (from the time of this post, which I even replied to 3 hours ago :o).

You know, when I fix bugs. I close that bug report. Please wait until your bug report is fixed before harassing every avenue of apktool with this problem.
[Android Software Development] RealPetChicken:
So i made a theme with apktool and decided to upload it to the play store. The theme compiled fine in my phone, and everything. When i download the version i uploaded to the play store, it crashes on me. No idea why?
[Android Software Development] Darkman:
Hi!

I needed help with decompilie the SecLauncher3.apk from S4 Active (4.2.2)

I decombile the APK without error messages.

In the publix.xml i found this:

<public type="integer" name="menuAppsGrid_cellCountX" id="0x7f0a001f" />
<public type="integer" name="menuAppsGrid_cellCountY" id="0x7f0a0020" />
<public type="integer" name="menu_pageIndicatorMaxVisible" id="0x7f0a0021" />
<public type="integer" name="menuAppsGrid_clingFocusedX" id="0x7f0a0022" />
<public type="integer" name="menuAppsGrid_clingFocusedY" id="0x7f0a0023" />
<public type="integer" name="menuWidgets_cellCountX" id="0x7f0a0024" />
<public type="integer" name="menuWidgets_cellCountY" id="0x7f0a0025" />

but if i look in the integers.xml

i found this menuAppsGrid_cellCountY and menuAppsGrid_cellCountX not?!?! :confused:

<resources>
<integer name="config_screenOrientation">5</integer>
<integer name="config_dragAppsCustomizeIconFadeInDuration">150</integer>
<integer name="config_dragAppsCustomizeIconFadeOutDuration">200</integer>
<integer name="config_dragAppsCustomizeIconFadeAlpha">100</integer>
<integer name="config_workspaceUnshrinkTime">300</integer>
<integer name="config_workspaceEditModeShrinkPercentage">70</integer>
<integer name="config_appsCustomizeWorkspaceAnimationStagger">40</integer>
<integer name="config_appsCustomizeDragSlopeThreshold">150</integer>
<integer name="config_workspaceDefaultScreenCount">5</integer>
<integer name="config_workspaceDefaultScreenCount_simple">5</integer>
<integer name="config_workspaceMaxScreenCount">7</integer>
<integer name="config_workspaceDefaultHomeScreenIndex">2</integer>
<integer name="config_workspaceDefaultHomeScreenIndex_simple">2</integer>
<integer name="config_crosshairsFadeInTime">600</integer>
<integer name="config_dragOutlineFadeTime">900</integer>
<integer name="config_dragOutlineMaxAlpha">191</integer>
<integer name="config_folderAnimDuration">300</integer>
<integer name="config_scrollZoneScrollDelay">500</integer>
<integer name="config_contextualPageHotseatCount">4</integer>
<integer name="config_menuappsgridEditModeShrinkPercentage">90</integer>
<integer name="config_pagePreviewSnapDelay">400</integer>
<integer name="widget_quickview_menu_left_padding">0</integer>
<integer name="workspaceEditMode_buttonParent_paddingRight">0</integer>
<integer name="workspaceEditMode_buttonParent_paddingTop">0</integer>
<integer name="homeIcon_leftPaddingThreshold">0</integer>
<item type="integer" name="APKTOOL_DUMMY_002b">false</item>
<item type="integer" name="APKTOOL_DUMMY_002c">false</item>
<item type="integer" name="APKTOOL_DUMMY_002d">false</item>
</resources>

here is the framework, seclauncher and all files to decompilie it.... https://www.dropbox.com/s/9ftd295lqp9ft6z/Darkman-I9295.zip

Any one a Idea?
[Android Software Development] iBotPeaches:
If you try using aapt on that application like so.

aapt d resources name_of_apk.apk | grep 'INVALID TYPE'

If those resource ids are present with an INVALID TYPE, that means its actually a feature of Apktool. Since it cannot retrieve the resources for one reason or another, it inserts a dummy resource of that value.
[Android Software Development] Darkman:
sorry for the stupid question

aapt d SecLauncher3.apk | grep interger

Is this right? Because this is not work by me...

Windows or Linux? I have cygwin install....
[Android Software Development] iBotPeaches:
This apk has non-standard folders. Called "drawable-hdpi-opta92-optb156" etc. This is extra data, thus what Apktool is erroring at. This won't be supported. Apktool cannot support all these different modified apk types.

Feel free to create a build of your own, modifying the ARSCDecoder to match this strange family of apks.
[Android Software Development] reyncla:
Ok, Thank you!
[Android Software Development] espaciosalter20:
Any update for version 2.0?

Enviado desde mi Nexus 7 usando Tapatalk 4
[Android Software Development] iBotPeaches:
One windows bug: https://code.google.com/p/android-apktool/issues/detail?id=496

Waiting on smali2 to go final.

and thats it.
[Android Software Development] m4570d0n:
edit: Never mind. Question answered.
[Android Software Development] Shaftamle:
Please Help!

Hey guys, Im using apk multi-tool. Its up to date and it has worked on everything else. I cant get the Google Keyboard to recompile no matter what I do. In my searches for an answer I have come across some other people who say the same. I never had a problem with the Android Keyboard (nexus version I guess.), but ever since it became a play store app I've had no luck. I attached the link to the Error log. If anyone could point me in the right direction I would really appreciate it!

Thanks!

PS- All I did here was load newest google keyboard(stock), press option 9 to decompile and then 12 to recompile non system apps. I did not change anything. Even when I do change things I get the same error. I am using API17, would that matter?

https://docs.google.com/file/d/0B3zGTjOA9PXkMThsN1J0VEJiNEE/edit?usp=sharing
[Android Software Development] Shaftamle:
Anybody??

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

http://mycolorscreen.com/Shaftamle/
[Android Software Development] :
i've problems with LatinImeGoogle.apk when recompile back...

i had lot of errors...

i'm trying to see if it was due to api level...

I'd changed the tools to API level 18 and see what happens...

To other members: any hints???
[Android Software Development] iBotPeaches:
There is no API level setting in Apktool. Therefore that is a problem with whatever tool your using. If you come to this thread, please use stock apktool via java -jar apktool.jar and install the highest available framework, which would be API 18 framework, and then decode then rebuild the apk.

If it fails then, we can take a look. Until then, you have no log, and are reporting a bug for a tool that simply uses apktool.
[Android Software Development] :
i mean replacing aapt.exe... wait..here is the log

View attachment 2241890
[Android Software Development] Shaftamle:
I've tried it with apk tool also. Didn't know there was a difference between apktool and multitool. When I get home I will use apktool and post the log. Do you have a link for api18?

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

http://mycolorscreen.com/Shaftamle/
[Android Software Development] :
just download sdk and use sdk manager to get latest api.. ;)
[Android Software Development] Shaftamle:
Sorry for the dumb question but where is it. The only thing I could find was the aapt. Could not find the framework-rest api 18. Do you know w what folder?

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

http://mycolorscreen.com/Shaftamle/
[Android Software Development] :
don't worry ;)

that's the first time i get this error using apktool... really don't know why...

i've tried to use apkmultitool... but don't like...

i think i have some problems with sdk manager. so i need to download it again and download api 18 to get new aapt..

try this to get highest framework with apktool as suggested by dev ;)

http://xdaforums.com/showpost.php?p=45383825&postcount=2063
[Android Software Development] Shaftamle:
So am I just looking for the aapt or should the framework file be there as well?

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

http://mycolorscreen.com/Shaftamle/
[Android Software Development] iBotPeaches:
yawn...

https://github.com/iBotPeaches/Apktool/commit/c27d514a1682165654b15a4fefeb2efe1a114f23 -> aapts

https://github.com/iBotPeaches/Apktool/commit/fbf8d8fbdf36c69ebfdf6e7624a3ff4983e9346a -> internal api 18 framework.

Before you go downloading 5.4gb of stuff for two files. I would look at the Apktool repo, project page before doing anything.
[Android Software Development] :
have you seen log? :)

http://xdaforums.com/showpost.php?p=45384009&postcount=2064
[Android Software Development] iBotPeaches:
http://pastebin.com/3Jrj6tf2

Don't have a problem here.
[Android Software Development] Shaftamle:
That is essentially the exact same errors I got.

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

http://mycolorscreen.com/Shaftamle/
[Android Software Development] PhilDX:
by "stock apktool", you mean your v1.5.2 linked in the OP?

and "highest framework" means SDK is installed and updated with API v18?

i have been struggling trying to recompile Google's latest keyboard too :o
[Android Software Development] Shaftamle:
Correct me if im wrong, but wasn't that the Android Keyboard from the Nexus? The latinime I have been successful with. The Google Keyboard is com.google.android.inputmethod.latin-1 or somethink like that.
[Android Software Development] :
Android 4.3 brings same Google Keyboard on devices that received update...

but... i miss this during recompile...

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: /home/ibotpeaches/apktool/framework/1.apk

I: Renamed manifest package found! Fixing...

i've checked androidmanifest and android:name:com.android.inputmethod.latin.LatinIME is wrong... should be com.google...

but apktool miss this I: Renamed manifest package found! Fixing... ... bah
[Android Software Development] Shaftamle:
Were you able to recompile??

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

http://mycolorscreen.com/Shaftamle/
[Android Software Development] :
Yeah :D i've just opened apktool.yml in notepad++ and modified to look like this:

and in android manifest in latinimegoogle folder...

<?xml version="1.0" encoding="utf-8"?>

<manifest android:versionCode="1800" android:versionName="1.0.1800.776638" coreApp="true" package="com.android.inputmethod.latin"

xmlns:android="http://schemas.android.com/apk/res/android">

<original-package android:name="com.android.inputmethod.latin" />

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />

Then i got successful recompile back !!! ;) hope this will help You ;)
[Android Software Development] Shaftamle:
I think I have another issue because mine matches up. :banghead:

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

http://mycolorscreen.com/Shaftamle/
[Android Software Development] :
[MENTION=3924617]iBotPeaches[/MENTION] hope dev will help You..

i was able to recompile back using steps above... thread #2078

but i'm trying using java -jar apktool.jar if framework-res.apk to get highest ...

i'm trying compile back without above modifications...

but... in your log i see this... I: Renamed manifest package found! Fixing...

i don't have this...

why?
[Android Software Development] iBotPeaches:
That was added in Apktool 1.5.2. So you are not running the most up to date Apktool then.
[Android Software Development] :
i've downloaded in OP...

see previous screen... 1.5.2... latest version...