Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] error: attribute android:isAccessibilityTool not found. #3425

Closed
pierluigicdc opened this issue Nov 14, 2023 · 3 comments
Closed

[BUG] error: attribute android:isAccessibilityTool not found. #3425

pierluigicdc opened this issue Nov 14, 2023 · 3 comments
Milestone

Comments

@pierluigicdc
Copy link

Information

  1. 2.9.0 -
  2. Linux -
  3. Example app developed to demonstrate the issue. -
  4. openjdk version "11.0.10" 2021-01-19 -

Stacktrace/Logcat

user1@backend:/app# ./apktool -f b -advance -o /app/repository/monitor/example_accessibility.apk /app/repository/monitor/decoded_example_accessibility
I: Using Apktool 2.9.0
I: Smaling smali folder into classes.dex...
I: Smaling smali_classes2 folder into classes2.dex...
I: Smaling smali_classes10 folder into classes10.dex...
I: Smaling smali_classes9 folder into classes9.dex...
I: Smaling smali_classes11 folder into classes11.dex...
I: Smaling smali_classes7 folder into classes7.dex...
I: Smaling smali_classes4 folder into classes4.dex...
I: Smaling smali_classes6 folder into classes6.dex...
I: Smaling smali_classes13 folder into classes13.dex...
I: Smaling smali_classes12 folder into classes12.dex...
I: Smaling smali_classes8 folder into classes8.dex...
I: Smaling smali_classes5 folder into classes5.dex...
I: Smaling smali_classes3 folder into classes3.dex...
I: Building resources...
W: /app/repository/monitor/decoded_example_accessibility/AndroidManifest.xml:46: error: attribute android:isAccessibilityTool not found.
W: error: failed processing manifest.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_17760038738471837638954201762268147645.tmp, link, -o, /tmp/APKTOOL6342143951027139491.tmp, --package-id, 127, --min-sdk-version, 26, --target-sdk-version, 31, --version-code, 1, --version-name, 2023.9.0, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, --no-compile-sdk-metadata, -e, /tmp/APKTOOL7895941948870507952.tmp, -0, arsc, -I, /user1/.local/share/apktool/framework/1.apk, --manifest, /app/repository/monitor/decoded_example_accessibility/AndroidManifest.xml, /app/repository/monitor/decoded_example_accessibility/build/resources.

Steps to Reproduce

  1. use an example apk with accessibility service implementation and isAccessibilityTool properties declared https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo#isAccessibilityTool()
  2. build the example apk with android studio or use an apk with the implementation defined in step 1
  3. decode the apk with apktool
  4. try to build the apk with apktool

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? YES
  2. If you are trying to install a modified apk, did you resign it? YES
  3. Are you using the latest apktool version? YES
@iBotPeaches
Copy link
Owner

I couldn't replicate - made a change to our test case in the PR above to confirm. Closing if CI passes.

@pierluigicdc
Copy link
Author

The option "isAccessibilityTool" must be placed here:

  1. Inside the manifest file:
    <application android:label="AccessibilityDemo" android:isAccessibilityTool="true">

  2. inside accessibility service resource file:

        <service
            <meta-data
                android:resource="@xml/resource_file" />
        </service>

resource_file content:

<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
     ...
    android:isAccessibilityTool="true"
    ... />

Thanks.

@iBotPeaches
Copy link
Owner

Closing as I could not replicate, but adjusted test suite here - bf1041e

iBotPeaches added a commit that referenced this issue Nov 16, 2023
@iBotPeaches iBotPeaches added this to the v2.9.1 milestone Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants