• Android mtk 系统应用改为可卸载,恢复出厂可恢复


    system/app或者priv-app目录下的系统应用需要可卸载

    vendor/mediatek/proprietary/frameworks/base/data/etc/pms_sysapp_removable_system_list.txt
    在文件中添加需要可卸载应用的包名

     com.android.quicksearchbox
     com.android.calendar
     com.android.dreams.basic
     com.android.musicfx
     com.android.calculator2
     com.android.email
     com.android.exchange
    +com.android.fmradio
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    将systemapp改为可卸载后打开报错,如:

    01-02 03:58:32.208: E/AndroidRuntime(12271): FATAL EXCEPTION: main
    01-02 03:58:32.208: E/AndroidRuntime(12271): Process: com.android.fmradio, PID: 12271
    01-02 03:58:32.208: E/AndroidRuntime(12271): java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/priv-app/FMRadio/lib/arm/libfmjni.so" needed or dlopened by "/system/lib/libnativeloader.so" is not accessible for the namespace "classloader-namespace"
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at java.lang.System.loadLibrary(System.java:1657)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at com.android.fmradio.FmNative.<clinit>(FmNative.java:24)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at com.android.fmradio.FmNative.openDev(Native Method)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at com.android.fmradio.FmService.openDevice(FmService.java:667)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at com.android.fmradio.FmService.onCreate(FmService.java:1485)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at android.app.ActivityThread.handleCreateService(ActivityThread.java:3380)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at android.app.ActivityThread.-wrap4(Unknown Source:0)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1711)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at android.os.Handler.dispatchMessage(Handler.java:106)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at android.os.Looper.loop(Looper.java:164)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at android.app.ActivityThread.main(ActivityThread.java:6548)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at java.lang.reflect.Method.invoke(Native Method)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    01-02 03:58:32.208: E/AndroidRuntime(12271): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18

    将需要引用的so库添加到system/core/rootdir/etc/public.libraries.android.txt 文件中

     libandroid.so
     libaaudio.so
     libc.so
     libcamera2ndk.so
     libdl.so
     libEGL.so
     libGLESv1_CM.so
     libGLESv2.so
     libGLESv3.so
     libicui18n.so
     libicuuc.so
     libjnigraphics.so
     liblog.so
     libmediandk.so
     libm.so
     libnativewindow.so
     libneuralnetworks.so
     libOpenMAXAL.so
     libOpenSLES.so
     libRS.so
     libstdc++.so
     libsync.so
     libvulkan.so
     libwebviewchromium_plat_support.so
     libz.so
    +libfmjni.so
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
  • 相关阅读:
    js基础API初学
    新鲜出炉|基于深度学习的运维日志领域新进展
    scrm系统源码该如何选择?快鲸scrm系统源码优势明显
    ubuntu18.04安装pangolin库,图文详解
    不标年份的葡萄酒质量好吗?
    Random Forest,AdaBoost(adaptive boosting),GB (Gradient Boost), LightGBM
    Mysql学习笔记
    【Hugging Face】管理 huggingface_hub 缓存系统
    6.1 使用scikit-learn构建模型
    基于Splinter演示如何使用Chrome WebDriver
  • 原文地址:https://blog.csdn.net/yesdehua/article/details/134400112