APatch icon indicating copy to clipboard operation
APatch copied to clipboard

Revanced apps become unpatched after a phone reboot

Open eblis opened this issue 4 months ago • 6 comments

Please check before submitting an issue | 在提交 Issue 前请检查

  • [x] I searched the issues and didn't found anything relevant | 我已经搜索了 Issues 列表,没有发现于本问题相关内容
  • [x] If the patch fails or the image cannot be booted after flashing the new boot.img, visit KernelPatch to clarify your doubts | 修复失败或刷入修补后镜像不能启动,请前往 KernelPatch 提问
  • [x] I will upload the bug report file in APatch Manager > Settings > Send logs | 我会上传 Bug Report 文件从 APatch 管理器 > 设置 > 发送日志
  • [x] I know how to reproduce the issue, which might not be specific to my device | 我知道如何重新复现这个问题

Version requirements | 版本要求

  • [x] I'm using the latest CI version of APatch Manager | 我正在使用最新 CI 版本

Bug description | 描述 Bug

I'm not sure if this is by design, but feels like a problem to me.

Every time I restart my phone all the Revanced patched apps stop working, I need to unpatch the apps and patch them again and install via mount (root).

But on next reboot they're broken again.

I tested with YouTube, YouTube music and Reddit Sync.

Reproduce method | 复现方法

  1. Patch YouTube music with Revanced
  2. Install via mount (root)
  3. Restart phone
  4. YouTube music says it's patched, but it's not.
  5. Need to unpatch the app and start from 1. again

Expected behavior | 预期行为

Phone restart should not break revanced apps

Actual behavior | 实际行为

Phone restart breaks revanced apps

Screenshots | 截图

No response

Logs | 日志

No response

Device name | 设备名称

Realme GT neo

OS version | 系统版本

Android 14

APatch version | APatch 版本

11107

Kernel version | 内核版本

4.19.321

KernelPatch version | KernelPatch 版本

0.12.0

Other information | 其他信息

Nothing

eblis avatar Jul 29 '25 06:07 eblis

This issue was marked as closed in August as "fixed", but still occurs in the latest nightly (11119).

This is a pretty major problem with how APatch operates, as it means there's a gap between initial boot and activation of the user space where APatch isn't active and cannot accept or deny SU requests and likely stays in a state vulnerable to malicious action.

RevontuletCXVII avatar Sep 13 '25 17:09 RevontuletCXVII

This issue was marked as closed in August as "fixed", but still occurs in the latest nightly (11119).

This is a pretty major problem with how APatch operates, as it means there's a gap between initial boot and activation of the user space where APatch isn't active and cannot accept or deny SU requests and likely stays in a state vulnerable to malicious action.

It seems to be less that, and more of an issue of how the android shell is able to mount with APatch

For example: if YouTube is unmounted using magisk or ksu, you can run the service.d script in userspace and remount the app successfully. On APatch, the app will not mount via the script, no matter how I've ran it

306bobby-android avatar Sep 25 '25 00:09 306bobby-android

I'm also experiencing this issue on APatch 11107. Is it possible to remount a patched application (i.e. YouTube), without repatching it? Maybe I could run a script to remount until this gets fixed?

gamerkonks avatar Oct 19 '25 06:10 gamerkonks

I use tasker to kill YouTube after boot.

Open in browser to import project.

taskerproject://H4sIAAAAAAAA/31TTW/cIBA97/4Ky+rZgL1r1hKLlDaRWvUSqcmhR9YmDgk2ls1a2n/fGXAtS1FyYYb5YN57gHhS07se75VXyTSe0zRpZnNOWZr4+ZyW2TFjLJX7nXgc3YuxOhQN4OdpMutzmmNyJ+pGeS0ZPxaHsqoqfihOgsQgpvWSLmnFcs5zRqkgek2/WNVOEjqigyHTyFwQWHHTmYbKQpBgMfAw694HKLXr6RYJQHGNlgfGYD56ITaMRsJENNhOQj+yIgutheGbrv1/hm/0C4bl4ZjzLcNedVp+d84nz4MgYYfhoZa/jbWJGobEu2TUnbsCcoBSx7xpJiQaLAY8OkDVx0AAiKjQx6sK6Dw4xQdYnFJ24iz/VPiKMsrLrfCgb7Gq3APmAPavuz5dLxpoLCzuam9cH0ar2i+68K3e7LSV+w7YhuKxpbFqJ0CBH1ZNk6xdl7XOtVZnqm9GZ5rs5q4eBmZQk726Xt+g5pL9edXWfvvpOo3zZ+NvgqynrIc+vrdfHBk6sCTWW3XRVq784jZAJoA5er+WlwXg4RfMyuJvIPHdRCHCveBlyH208f/I/T/vo20BTQMAAA==
    Project: Boot Up
    Comments: Kill app to remount 
    
    Profiles
        Profile: Anon
        	Event: Device Boot
        
        Enter Task: Kill YouTube
        
        A1: Kill App [
             App: YouTube
             Use Root: On ]

    Tasks
        Task: Kill YouTube
        
        A1: Kill App [
             App: YouTube
             Use Root: On ]

juliazero avatar Oct 19 '25 22:10 juliazero

Can confirm I'm also affected by the issue. Xiaomi Redmi Note 12 Pro running Hyperos EU 2.0.5.0. Tried killing the app without tasker by doing /system/bin/am com.google.android.youtube as su on termux to no avail.

nxgensoftware avatar Nov 11 '25 23:11 nxgensoftware

This workaround fixed it for me. The file is /data/adb/service.d/com.google.android,youtube.sh https://github.com/ReVanced/revanced-manager/issues/2168#issuecomment-2445610792

gamerkonks avatar Nov 13 '25 07:11 gamerkonks