ReVanced/revanced-manager

bug: Revanced manager fails to build the patched tiktok APK

Closed this issue · 3 comments

Bug description

Revanced manager fails to build the patched tiktok APK with any combination of patches. It always crashes at the end and next attempts crash at the beginning of patching.

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

  • Device Info
    ReVanced Manager: 1.22.0
    Model: SM-G985F
    Android version: 13
    Supported architectures: arm64-v8a, armeabi-v7a, armeabi
    Root permissions: No

  • Patch Info
    App: com.zhiliaoapp.musically v36.5.4 (Suggested: 36.5.4)
    Patches version: v4.17.0
    Patches added: SIM spoof
    Patches removed: Disable login requirement
    Default patch options changed: None

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

Installation method

Regular

ReVanced Manager logs

--------- beginning of system
10-29 11:47:57.641 9859 9859 W PackageParser: Unknown element under : queries at /data/user/0/app.revanced.manager.flutter/cache/com.zhiliaoapp.musically_36.5.4-2023605040_minAPI21(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk Binary XML file line #5
10-29 11:47:57.642 9859 9859 W PackageParser: Unknown element under : meta-data at /data/user/0/app.revanced.manager.flutter/cache/com.zhiliaoapp.musically_36.5.4-2023605040_minAPI21(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk Binary XML file line #250
10-29 11:47:57.642 9859 9859 W PackageParser: Ignoring duplicate uses-permissions/uses-permissions-sdk-m: android.permission.ACCESS_NETWORK_STATE in package: com.zhiliaoapp.musically at: Binary XML file line #278
10-29 11:47:57.647 9859 9859 W PackageParser: Unknown element under : uses-native-library at /data/user/0/app.revanced.manager.flutter/cache/com.zhiliaoapp.musically_36.5.4-2023605040_minAPI21(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk Binary XML file line #1001
10-29 11:47:57.647 9859 9859 W PackageParser: Unknown element under : uses-native-library at /data/user/0/app.revanced.manager.flutter/cache/com.zhiliaoapp.musically_36.5.4-2023605040_minAPI21(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk Binary XML file line #1002
10-29 11:47:57.647 9859 9859 W PackageParser: Unknown element under : uses-native-library at /data/user/0/app.revanced.manager.flutter/cache/com.zhiliaoapp.musically_36.5.4-2023605040_minAPI21(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk Binary XML file line #1003
10-29 11:47:57.647 9859 9859 W PackageParser: Unknown element under : uses-native-library at /data/user/0/app.revanced.manager.flutter/cache/com.zhiliaoapp.musically_36.5.4-2023605040_minAPI21(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk Binary XML file line #1004
10-29 11:47:57.647 9859 9859 W PackageParser: Unknown element under : uses-native-library at /data/user/0/app.revanced.manager.flutter/cache/com.zhiliaoapp.musically_36.5.4-2023605040_minAPI21(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk Binary XML file line #1005
10-29 11:47:57.647 9859 9859 W PackageParser: Unknown element under : uses-native-library at /data/user/0/app.revanced.manager.flutter/cache/com.zhiliaoapp.musically_36.5.4-2023605040_minAPI21(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk Binary XML file line #1006
10-29 11:47:57.649 9859 9859 W PackageParser: Unknown element under : property at /data/user/0/app.revanced.manager.flutter/cache/com.zhiliaoapp.musically_36.5.4-2023605040_minAPI21(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk Binary XML file line #1539
10-29 11:47:57.649 9859 9859 W PackageParser: Unknown element under : enable-feature at /data/user/0/app.revanced.manager.flutter/cache/com.zhiliaoapp.musically_36.5.4-2023605040_minAPI21(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk Binary XML file line #1656

Patch logs

  • Logs
    Reading APK
    Decoding app manifest
    Loading patches
    Merging integrations
    Executing patches
    Applied 8 patches
    Compiling patched dex files
    Compiled 22 dex files
    An error occurred:
    java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 5208608 free bytes and 5086KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
    at java.lang.StringFactory.newStringFromChars(StringFactory.java:124)
    at com.android.tools.smali.util.Utf8Utils.utf8BytesWithUtf16LengthToString(SourceFile:0)
    at com.android.tools.smali.dexlib2.dexbacked.DexReader.readString(Unknown Source:12)
    at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$5.get(SourceFile:0)
    at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$5.get(SourceFile:0)
    at com.android.tools.smali.dexlib2.dexbacked.reference.DexBackedFieldReference.getName(Unknown Source:30)
    at com.android.tools.smali.dexlib2.base.reference.BaseFieldReference.equals(Unknown Source:21)
    at java.util.HashMap.putVal(HashMap.java:653)
    at java.util.HashMap.put(HashMap.java:617)
    at com.android.tools.smali.dexlib2.writer.pool.FieldPool.intern(Unknown Source:7)
    at com.android.tools.smali.dexlib2.writer.pool.ClassPool.internReference(Unknown Source:75)
    at com.android.tools.smali.dexlib2.writer.pool.ClassPool.internCode(Unknown Source:42)
    at com.android.tools.smali.dexlib2.writer.pool.ClassPool.intern(Unknown Source:219)
    at com.android.tools.smali.dexlib2.writer.pool.DexPool.internClass(Unknown Source:4)
    at lanchon.multidexlib2.DexIO.writeMultiDexDirectoryCommon(Unknown Source:27)
    at lanchon.multidexlib2.DexIO.access$000(Unknown Source:0)
    at lanchon.multidexlib2.DexIO$1.call(SourceFile:0)
    at lanchon.multidexlib2.DexIO$1.call(SourceFile:0)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at java.lang.Thread.run(Thread.java:1012)
    Something went wrong:
    PathNotFoundException: Cannot copy file to '/data/user/0/app.revanced.manager.flutter/files/lastPatchedApp.apk', path = '/data/user/0/app.revanced.manager.flutter/files/patcher/tmp-OAJUPI/out.apk' (OS Error: No such file or directory, errno = 2)

Acknowledgements

  • I have checked all open and closed bug reports and this is not a duplicate.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • The bug is only related to ReVanced Manager.

+1. This issue has been present ever since forever.

Tested on both Samsung Galaxy A54 and Samsung Galaxy S24 Ultra. Unable to build patched Tiktok, as it always fails on the last step (same log as OP).

Crazy how maintainers just close issues, without any debugging details whatsoever...

Crazy how this is a duplicate of 50 other issues
Image

Image