ReVanced/revanced-manager

bug: could not exec flutter libaapt2.so

Closed this issue · 2 comments

Bug description

error while patching

Version of ReVanced Manager and version & name of app you are patching

ReVanced Manager: 1.20.1
Root permissions: Yes

  • Patch Info
    App: com.google.android.youtube v19.11.43 (Suggested: 19.11.43)
    Patches version: v4.7.0

Installation method

None

ReVanced Manager logs

--------- beginning of crash
04-23 16:54:26.191 24722 24722 E AndroidRuntime: FATAL EXCEPTION: main
04-23 16:54:26.191 24722 24722 E AndroidRuntime: Process: app.revanced.manager.flutter, PID: 24722
04-23 16:54:26.191 24722 24722 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {app.revanced.manager.flutter/app.revanced.manager.flutter.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=212, result=-1, data=null} to activity {app.revanced.manager.flutter/app.revanced.manager.flutter.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.util.Map.put(java.lang.Object, java.lang.Object)' on a null object reference
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4483)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4515)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2105)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:223)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7706)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=212, result=-1, data=null} to activity {app.revanced.manager.flutter/app.revanced.manager.flutter.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.util.Map.put(java.lang.Object, java.lang.Object)' on a null object reference
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.app.ActivityThread.deliverResults(ActivityThread.java:5054)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4470)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	... 11 more
04-23 16:54:26.191 24722 24722 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.util.Map.put(java.lang.Object, java.lang.Object)' on a null object reference
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at com.baseflow.permissionhandler.PermissionManager.onActivityResult(Unknown Source:139)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult(Unknown Source:25)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult(Unknown Source:14)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(Unknown Source:51)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at io.flutter.embedding.android.FlutterActivity.onActivityResult(Unknown Source:10)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.app.Activity.dispatchActivityResult(Activity.java:8310)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	at android.app.ActivityThread.deliverResults(ActivityThread.java:5047)
04-23 16:54:26.191 24722 24722 E AndroidRuntime: 	... 12 more
--------- beginning of main
04-23 22:59:17.672 24869 24869 V PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@882aa7e, this = DecorView@3746a83[MainActivity]
04-23 22:59:17.675 24869 24869 V PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@882aa7e, this = DecorView@3746a83[MainActivity]
04-23 22:59:17.694 24869 25371 I GED     : ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 42, oppidx_max 42, oppidx_min 0
04-23 22:59:17.696 24869 24869 D ViewRootImpl: setSurfaceViewCreated, created:true
04-23 22:59:17.707 24869 24869 D AiuiSurfaceViewExtImpl: onVideoFlagsChange: none ==> SURFACE, , post :[false, surface,1.0621761,(s:1, bs:0, t:0)]
04-23 22:59:17.707 24869 24869 D AiuiSurfaceViewExtImpl: onVideoFlagsChange: SURFACE, ==> SURFACE,BIG_SURFACE, , post :[true, surface,1.0621761,(s:1, bs:1, t:0)]
04-23 22:59:17.807 24869 24869 D AiuiSurfaceViewExtImpl: SURFACE-NOTIFY: hasSurface=true, pkg=app.revanced.manager.flutter
04-23 22:59:17.807 24869 24869 D AiuiSurfaceViewExtImpl: notifyToSystem, pkg=app.revanced.manager.flutter

Patch logs

- Device Info
ReVanced Manager: 1.20.1
Model: WP17
Android version: 11
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Root permissions: Yes

- Patch Info
App: com.google.android.youtube v19.11.43 (Suggested: 19.11.43)
Patches version: v4.7.0
Patches added: Default
Patches removed: Copy video URL, Remove viewer discretion dialog, Downloads, Disable precise seeking gesture, Seekbar tapping, Swipe controls, Disable auto captions, Hide video action buttons, Hide autoplay button, Hide captions button, Hide cast button, Navigation buttons, Hide player buttons, Hide album cards, Comments, Hide crowdfunding box, Hide endscreen cards, Hide filter bar, Hide floating microphone button, Disable fullscreen ambient mode, Hide layout components, Hide info cards, Player flyout menu, Disable rolling number animations, Hide seekbar, Hide Shorts components, Disable suggested video end screen, Hide timestamp, Disable player popup panels, Custom player overlay opacity, Return YouTube Dislike, Wide searchbar, Restore old seekbar thumbnails, SponsorBlock, Spoof app version, Change start page, Disable resuming Shorts on startup, Enable tablet layout, Tablet mini player, Theme, Alternative thumbnails, Announcements, Always repeat, Enable debugging, Spoof device dimensions, Bypass URL redirects, Minimized playback, Remove tracking query parameter, Disable zoom haptics, Remember video quality, Playback speed, Restore old video quality menu, Client spoof, GmsCore support, Open links externally
Default patch options changed: None

- Settings
Allow changing patch selection: true
Version compatibility check: true
Show universal patches: false
Patches source: revanced/revanced-patches
Integration source: revanced/revanced-integrations

- Logs
Reading APK
Decoding app manifest
Loading patches
Merging integrations
Deleting existing temporary files directory
Decoding resources
Executing patches
Applied 2 patches
Compiling patched dex files
Compiled 8 dex files
Compiling modified resources
An error occurred:
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/data/app/~~zpo5zXSBvi3XAvvvOptGyw==/app.revanced.manager.flutter-JcHeJfL1O2Dop2JeLgirEQ==/lib/arm64/libaapt2.so, link, -o, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-SCAHVX/revanced-temporary-files/patched/resources/resources.apk, --package-id, 127, --min-sdk-version, 26, --target-sdk-version, 34, --version-code, 1545084352, --version-name, 19.11.43, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, --warn-manifest-validation, -e, /data/user/0/app.revanced.manager.flutter/cache/APKTOOL9127251663065027647.tmp, -0, arsc, -I, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-SCAHVX/revanced-temporary-files/1.apk, --manifest, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-SCAHVX/revanced-temporary-files/apk/AndroidManifest.xml, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-SCAHVX/revanced-temporary-files/apk/build/resources.zip]
	at brut.androlib.AaptInvoker.invokeAapt2(Unknown Source:563)
	at brut.androlib.AaptInvoker.invokeAapt(Unknown Source:104)
	at app.revanced.patcher.data.ResourceContext.get(SourceFile:0)
	at app.revanced.patcher.Patcher.get(SourceFile:0)
	at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$34(Unknown Source:495)
	at app.revanced.manager.flutter.MainActivity.$r8$lambda$hTJfH-rv2j-9Y91G5H_L5jFDN6U(SourceFile:0)
	at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda5.run(SourceFile:0)
	at java.lang.Thread.run(Thread.java:923)
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/data/app/~~zpo5zXSBvi3XAvvvOptGyw==/app.revanced.manager.flutter-JcHeJfL1O2Dop2JeLgirEQ==/lib/arm64/libaapt2.so, link, -o, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-SCAHVX/revanced-temporary-files/patched/resources/resources.apk, --package-id, 127, --min-sdk-version, 26, --target-sdk-version, 34, --version-code, 1545084352, --version-name, 19.11.43, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, --warn-manifest-validation, -e, /data/user/0/app.revanced.manager.flutter/cache/APKTOOL9127251663065027647.tmp, -0, arsc, -I, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-SCAHVX/revanced-temporary-files/1.apk, --manifest, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-SCAHVX/revanced-temporary-files/apk/AndroidManifest.xml, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-SCAHVX/revanced-temporary-files/apk/build/resources.zip]
	at brut.util.OS.exec(Unknown Source:75)
	at brut.androlib.AaptInvoker.invokeAapt2(Unknown Source:542)
	... 7 more

Acknowledgements

  • This issue is not a duplicate of an existing bug report.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • The bug is only related to ReVanced Manager

Patch a full APK not a split

For support, move to one of our links at https://revanced.app.

Thank you for the reply!

I got the error when I selected the youtube app from the list of installed apps offered by the Revanced Manager. (Which has worked in the past on this device on previous versions.) Sorry for not including it in the original post, reporting bugs from mobile is painful and I got distracted afterwards. Anyway, patching an apk from storage worked, sorry for the trouble.