yashsingh1/xdaforums huggingface dataset:
[Android Software Development] opssemnik:
hey guys, i have a problem. apktool is working fine BUT i need to merge some things from amazon´s framework into the app im porting, however i reached the limit of indexes to that tag (public.xml, tag "id"), how can i increase the limit of indexes?

apktool output:

C:\APK_MODDING>apktool b com.amazon.kindle.otter.settings

I: Using Apktool 2.0.0-RC2 on com.amazon.kindle.otter.settings

I: Checking whether sources has changed...

I: Checking whether resources has changed...

I: Building resources...

C:\APK_MODDING\com.amazon.kindle.otter.settings\res\values\public.xml:752: error

: Public entry identifier 0x7f0c0083 entry index is larger than available symbol

s (index 131, total symbols 131).

public.xml

http://pastebin.com/yXrQRABB

smali code caling it:

const v0, 0x7f0c0083

invoke-virtual {p0, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

move-result-object v0

iput-object v0, p0, Lamazon/widget/HeaderNavigationBar;->mSecondaryTextView:Landroid/view/View;

PS:

the original id in amazon-res.apk public.xml is

<public type="id" name="header_bar_secondary_text" id="0x10020003" />

if this is ot, please let me know and i remove this post

EDIT:

looked into aapt sources, so i found out how the max symbols were count, then i could fix the problem.
[Android Software Development] Phone_Guru:
Errors attached
[Android Software Development] iBotPeaches:
That error seems it cannot reach maven for dependencies. I purged my artifact cache on both Windows/Linux and re-built Apktool. It worked fine reaching Maven and downloading all dependencies. Its possible that

1) You have no internet

2) You don't have access to Maven

3) Maven was down while you were trying to build Apktool

Try visiting one of the dependencies URLs directly - https://repo1.maven.org/maven2/xmlunit/xmlunit/1.3/ Does that work?

Edit:

Make sure you run `gradlew.bat build fatJar proguard`, that'll ensure the final jar is proguard`d .
[Android Software Development] Phone_Guru:
I built it now with Internet turned on. I never needed to do that before though.

---------- Post added at 02:06 PM ---------- Previous post was at 01:50 PM ----------

Got errors when building proguard. Leaving out the word build in the build command solved problem
[Android Software Development] bovirus:
Area there any special settings to compile latest build of apktool.jar under Windows 7 with Java JDK 1.8.0.25?

I tried it but answer is that is requested Java JDK v. 1.7.

Java JDK 1.7 it's quite old.
[Android Software Development] iBotPeaches:
I can assure you JDK 1.7 isn't going anywhere soon. 1.6 is still dominating and it's EOL`d and very old. Some libraries are still even 1.5 compatible. I'd imagine 1.7 to be here for another 3-5 years before 1.8 takes over as default.

I've never tried a build of apktool with 1.8 which is probably the problem. You could submit a pr fixing whatever problems 1.8 has and I'll look into it. We can then add 1.8 to the versions travis ci runs to prevent regression.

The check in grade I thought checked greater than or equal to 1.7 JDK. Might have messed that up, I'm mobile right now so I'll check later today.
[Android Software Development] bovirus:
Hi.

Please take care that version 1.8 of JDK is the standard for Windows7/windows 8 PC (for security reason/fixes).

And when you install version 1.8.xx it automatically remove version 1.7.xx./1.6.xx.

Please improve your program to use JDK 1.8..xx.

If I can help in any way please don't hesitate to use my configuration as test.

Thanks.
[Android Software Development] PerfectSlayer:
It never happened to me. I use several Oracle SDK versions (1.6, 1.7 and 1.8) and they are still installed… (Windows 7 and 10).
[Android Software Development] bovirus:
I installed teh latest bbuild of JRE 1.8 (1.8.0.25) and it will inform about previous version instaleld and asked to remove it.

I will re-install JRE/JDK 1.7.x.
[Android Software Development] PerfectSlayer:
Use the following download pages:

Download JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Download JRE: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

Not this one: https://www.java.com/en/download/ with bloatware or uninstallation proposal ;)
[Android Software Development] bovirus:
This is already my official page for JDK (for v. 1.8).
[Android Software Development] bovirus:
Decompiling/recompiling (without changes) this apk

https://play.google.com/store/apps/details?id=jp.co.canon.bsd.ad.pixmaprint&hl=en

I obtained two errors (one during decompilation but probably was an error in original apk, and one during compilation)

##################### De-compiling

I: Using Apktool 2.0.0-d4fc7f-SNAPSHOT on Canon-PIXMA-MAXIFY-Printing-Solutions-1.3.1.apk

I: Loading resource table...

I: Loading resource table...

I: Decoding AndroidManifest.xml with resources...

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

I: Regular manifest package...

I: Decoding file-resources...

W: Cant find 9patch chunk in file: "drawable/topmenu_btn_f_1.9.png". Renaming it to *.png.

I: Decoding values */* XMLs...

I: Baksmaling classes.dex...

I: Copying assets and libs...

I: Copying unknown files...

I: Copying original files...

##################### Compiling

I: Using Apktool 2.0.0-d4fc7f-SNAPSHOT on Canon-PIXMA-MAXIFY-Printing-Solutions-1.3.1

I: Checking whether sources has changed...

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

I: Checking whether resources has changed...

I: Building resources...

libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

I: Copying libs...

I: Building apk file...
[Android Software Development] 93Akkord:
Has a version of apktool been released that can decompile the newer versions of Google apps like Google Play Music?
[Android Software Development] djdarkknight96:
Yep, you just need the lollipop framework, we even themed it as a signed install.

Sent from my BlakKat CM11 powered Nexus 5
[Android Software Development] 93Akkord:
Where would I get the lollipop framework?

Yeah I know, I'm behind all the changes :(
[Android Software Development] djdarkknight96:
I got it here somewhere, Nexus 5 preview.

Sent from my BlakKat CM11 powered Nexus 5
[Android Software Development] iBotPeaches:
This merge requests adds JDK8 compile support (w/ warnings) and produces a jar now. The only caveats are that a proguard build is not allowed. I'm not quite sure when a JDK8 is being used how to reference the library jars of JDK7 to produce a compatible proguarded jar. If I assume its there and try and find the file. It may fail, so JDK8 builds cannot be proguard`d.

Also just merged a change to the how the options are stored internally. No longer do we pass around a bulky Hashmap between functions. One class ApkOptions is initialized on creation and all classes reference that directly. Had quite a few line numbers changed, but thats because all functions were losing the parameters that were for that previously used Hashmap. While fixing that, I discovered an edge case where the resource table would be loaded twice. Depending on the size of the APK this would of nearly doubled the time to decode / build an APK. This has been fixed.
[Android Software Development] bovirus:
Thanks for your update.

Sorry but I didn't understand the main differences between fatjar and proguard compilation option and the two .jar produced by build (the size is about 9MB and 13 MB).

Could you explain it the difference and relative use of .jar file?
[Android Software Development] iBotPeaches:
Proguard takes the dependencies that are built into the APK and removes any portion of those dependencies that we don't use. IE If a dependency has functions A, B and C and Apktool only uses function A, Proguard will include that dependency stripping everything but function A. Think "shrink". The regular fatJar is all the dependencies packed into the JAR.

Not sure what you mean by "what is the use of the .jar file". Its the application lol. Without it, you have no Apktool. The application can be even smaller without dependencies but then you have to leverage the dependencies required via classpath and thats just too difficult for the general population, hence why dependency packed (fatJar) binaries exists.
[Android Software Development] adrian.aitken:
Newbie question - go easy on me please :o

I've just installed apktool and downloaded Java 1.7 on my Windows 7 box.

The app I'm trying to edit is called com.gatherer.contactslaunch.apk which puts an icon called ~People in the apps drawer. I thought it would be simple to edit it to show as 'Contacts' so I edited (with Notepad++) the res/values/strings.xml and replaced the 3 occurrences of ~People with Contacts and saved it. It recompiled OK but was 2k smaller then the original and won't install. No errors are shown decompiling or recompiling it on my Windows box and on my tablet just says 'X App not installed'.

Any ideas as to what I'm doing wrong?

I've attached the .apk if anyone would like to help me out.

Many thanks

Adrian

P.S. Tried to do a straight decompile/recompile without me changing anything and the same thing happens.

C:\Users\adrian\Downloads\apk>apktool d com.gatherer.contactslaunch.apk
I: Using Apktool 2.0.0-RC2 on com.gatherer.contactslaunch.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\adrian\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

C:\Users\adrian\Downloads\apk>apktool b com.gatherer.contactslaunch
I: Using Apktool 2.0.0-RC2 on com.gatherer.contactslaunch
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
[Android Software Development] Phone_Guru:
Can someone please explain how to fix the authorities?
[Android Software Development] djdarkknight96:
Gmail is a bust, will fc with Google play services the min you touch anything in values.

In manifest you'll see authorities and one that's [MENTION=1040114]StRiNgS[/MENTION] go to strings and copy the definition and replace the @ value with the actual string.

Sent from my BlakKat CM11 powered Nexus 5
[Android Software Development] :
If you mod the APK yes I assume Bryan . Via TC no issues with F/Cs for me.
[Android Software Development] plegdroid:
Does it need signing?

ⓐⓝⓓⓡⓞⓒⓛⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] adrian.aitken:
Yes - pmf (palm, meet forehead !!!!)

I take it that's because it was from the Play store as opposed to the simple test apps I've written by myself.

Many thanks

Adrian
[Android Software Development] bovirus:
Latest update (yesterday). Problem during compilation

:brut.apktool:apktool-lib:test

brut.androlib.AaptTest > isAaptInstalledTest FAILED

java.lang.AssertionError: expected:<true> but was:<false>

at org.junit.Assert.fail(Assert.java:93)

at org.junit.Assert.failNotEquals(Assert.java:647)

at org.junit.Assert.assertEquals(Assert.java:128)

at org.junit.Assert.assertEquals(Assert.java:147)

at brut.androlib.AaptTest.isAaptInstalledTest(AaptTest.java:38)

> Building 8

35 tests completed, 1 failed

:brut.apktool:apktool-lib:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':brut.apktool:apktool-lib:test'.

> There were failing tests. See the report at: file:///D:/Download/Android/Apktool-iBotpeaches/brut.apktool/apktool-lib/build/report

s/tests/index.html

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

tested with Java JDK 1.7 and 1.8 on Windows 7.

This problem is about master/java8 branch files.
[Android Software Development] iBotPeaches:
This is your problem this time. You need to have aapt in your path to build, since Apktool cannot use its embedded aapt until the JAR is built. So testing must be done with the system aapt.
[Android Software Development] bovirus:
Sorry but I didn't find this requisite written in any place.

I compiled with same configuration/folder name before without problem and without aapt in path.

Good info for all. Just copy aapt.exe in the same folder.
[Android Software Development] iBotPeaches:
A unit-test was added for it to prevent build failure from lack of aapt. This prerequisite has been written online for nearly 14 months now (https://code.google.com/p/android-apktool/wiki/BuildApktool). Please read the wiki before building or just wait for an official release.
[Android Software Development] bovirus:
Ok. Unbderstood,.

But please believe me that until before yesterday with the same configuration and appt not in path II didn't find this problem...

I will create and Android tool folder and it to the path, Thanks.
[Android Software Development] Phone_Guru:
I also had this error sometimes. It occurs when you use a certain build command. You need to use gradlew.bat fatJar proguard
[Android Software Development] powerpoint45:
Error

Hi! I am trying to modify com.amazon.kindle.otter.apk for the Fire HD6 I installed the framework-res and some apk that seemed to help called amazon-res.apk but when I try to decompile I get

How do I figure out what the package id of 2 is referring to? I linked a tar.gz of the files I am working with below. Any help would be awesome! Thanks!

https://www.dropbox.com/s/ginbsoidm8r54jk/ap.tar.gz?dl=0
[Android Software Development] zelendel:
There are normally 3 frameworks files on OEM bases roms. The framework-res, the OEM-res and the system UI. Install all 3.
[Android Software Development] powerpoint45:
I tried that. Unfortunately I am getting the same error...
[Android Software Development] zelendel:
Just took a closer look at the error and it seems that the file is full of errors like corrupted .9.png files

Are you sure you installed the systemui right?

Normally framework-res is 1

SystemUI is 2

And the OEM-res is like 127
[Android Software Development] powerpoint45:
Pretty sure. From scratch I do:
[Android Software Development] zelendel:
Odd. One of them is not installing to the proper place. Will have to wait for ibot on this one.
[Android Software Development] Phone_Guru:
Thanks. Is it possible to theme images only?
[Android Software Development] iBotPeaches:
I installed these frameworks and saw (1 - framework-res, 16 - amazon-res & 127 - system-ui) being used. The framework with 2 is just missing. In Huawei and MIUI roms they hide a framework in the /system/app or /system/priv-app folder, instead of the regular system/framework one. Just take another peak at this Amazon ROM and look a bit more. I think the ID framework of 2 is just in one of those locations.
[Android Software Development] powerpoint45:
hmm I have looked their I don't see much.. Does any of this look like the one?
[Android Software Development] Mr Impossible:
[MENTION=3924617]iBotPeaches[/MENTION] I'm still getting .param lines even using the -b flag. Normal or no? 4.4.4 Rom

BTW thanks for picking this project up!
[Android Software Development] powerpoint45:
I am using apktool on a normal app and after doing apktool b app.apk newapp.apk it does not build the apk even though it says it does. The newapp.apk is nowhere to be found. Anyone know why?
[Android Software Development] djdarkknight96:
So you're saying there's no dist folder after you build?

Sent from my BlakKat CM11 powered OnePlus One "BACON"
[Android Software Development] superdild:
try with -o opt

apktool b app.apk -o newapp.apk

saluti, mario
[Android Software Development] powerpoint45:
that works thanks so much
[Android Software Development] dr_w:
Errors...

Can anyone take a look and let me know what i need to do? Thank you.

C:\>cd \apktool\apktool

C:\Apktool\Apktool>apktool d app.apk

Destination directory (C:\Apktool\Apktool\app) already exists. Use -f switch if

you want to overwrite it.

C:\Apktool\Apktool>apktool d app.apk

I: Using Apktool 2.0.0-RC2 on app.apk

I: Loading resource table...

I: Loading resource table...

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Users\David Weidman\apktool\framework\1.

apk

I: Regular manifest package...

I: Decoding file-resources...

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

touchscreenBlocksFocus, value=0xffffffff

I: Decoding values */* XMLs...

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:

0x0101048f

at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)

at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:3

6)

at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe

sourceParser.java:369)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu

e(XmlPullParserDelegate.java:69)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT

ag(StaticXmlSerializerWrapper.java:267)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati

cXmlSerializerWrapper.java:211)

at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamD

ecoder.java:83)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe

coder.java:141)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD

ecoderContainer.java:33)

at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1

07)

at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:9

1)

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

)

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

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

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

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

C:\Apktool\Apktool>
[Android Software Development] joeyhuab:
Can someone link me to this version? I'd love to be able to decompile Lollipop for theming purposes.
[Android Software Development] 93Akkord:
Use the Framework file from here. I've been decompiling the new material design apps just fine. At least the resources that is.
[Android Software Development] :
Hello,

I'm modding APK's for a while but today, I got a problem with an APK. When I'm decompiling and recompiling the APK without making changes then signing, it just closes on Android (No FC error) It worked for months, but since today's update not. So how can I fix this? Is the APK protected? Please help!
[Android Software Development] S3V3N:
[MENTION=3924617]iBotPeaches[/MENTION]

Hello,

There is a chance for the android L apktool

My LG G3 begs for modifications;)

7
[Android Software Development] daemon1666:
hi

I am under bbqlinux.

Decompilation goes smoothly. But recompiling shows me this error:

[g33k@daemong33k apktool]$ apktool b '/home/g33k/apktool/Settings'
I: Checking whether sources has changed...
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: [aapt, p, --min-sdk-version, 21, --target-sdk-version, 21, -F, /tmp/APKTOOL6998732373857630666.tmp, -0, arsc, -I, /home/g33k/apktool/framework/1.apk, -S, /home/g33k/apktool/Settings/res, -M, /home/g33k/apktool/Settings/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: [aapt, p, --min-sdk-version, 21, --target-sdk-version, 21, -F, /tmp/APKTOOL6998732373857630666.tmp, -0, arsc, -I, /home/g33k/apktool/framework/1.apk, -S, /home/g33k/apktool/Settings/res, -M, /home/g33k/apktool/Settings/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: [aapt, p, --min-sdk-version, 21, --target-sdk-version, 21, -F, /tmp/APKTOOL6998732373857630666.tmp, -0, arsc, -I, /home/g33k/apktool/framework/1.apk, -S, /home/g33k/apktool/Settings/res, -M, /home/g33k/apktool/Settings/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": error=2, Aucun fichier ou dossier de ce type
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at java.lang.Runtime.exec(Runtime.java:617)
at java.lang.Runtime.exec(Runtime.java:485)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: error=2, Aucun fichier ou dossier de ce type
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 10 more

Can someone help me?

Thx in advance
[Android Software Development] iBotPeaches:
Sometimes looking at the stack traces tells you exactly what the problem is. You cannot run "aapt". Until you can execute the command "aapt" at command line, Apktool will not work. So go grab aapt and put in your $PATH variable so you can access it globally. You must be using 1.5.2, because this isn't a problem in 2.0. Please search next time. This has been asked about 50 times.
[Android Software Development] daemon1666:
Thank you for the answer.

I'm sorry if I have not seen the answer in previous posts.

Does this is also valid for lollipop?
[Android Software Development] iBotPeaches:
No, the answer provided is part of setting up your environment for using Apktool correctly. It has nothing to do with Lollipop or anything. As was discussed in the previous 2-3 pages of this thread, a Lollipop Apktool build is ongoing and a new version will be released here when completed.
[Android Software Development] daemon1666:
Ok thank you very much for specific answers.

I started and it is not always easy.

And congrats for apktool it is a "Must Have"
[Android Software Development] cbucz24:
ok ive done some searching but didnt find anyone asking about some items.

[MENTION=3924617]iBotPeaches[/MENTION] i know your working on the lollipop version of the apktool is being worked on. And i know that some of these items are included in that new version of android.

But do you know if there will be support for the file formats inside new touchwiz?

i assume you already know about them...the QMG and 9.patch version

also the new astc files and webp....

not trying to rush or put any pressure on about anything. just curious is all. I know the current workarounds to work on these files and the existing apktool....but its so time consuming, making a theme or any modifications seem like soo much extra work for no reason.
[Android Software Development] _alex74_:
well sayed, after first Lollipop release, a suggestion for further version is that apktool will, during decompile decode above formats into png(as few devs has done just for phone an app that utilize lib decoder in system to do so)

No pressure, [MENTION=3924617]iBotPeaches[/MENTION] you have opened Android doors with apktool, with above suggestion u will give to themers and devs a huge suopport:good::good::good:

Thanks for your hard work, thanks foe being here;););)
[Android Software Development] cbucz24:
I know it's all open source, but only being a themer and all my original building knowledge semi forgotten...I wouldn't know where to start to add in the abilities to do that on my own. :(