• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Can‘t find framework resources for package of id: 18. You must install proper framework files

武飞扬头像
uiop_uiop_uiop
帮助1

小米13.0.5的系统应用:相册。

报错id18。

下面这个log是id=16的一个样例,实际报错情况类似,但是不完全一样

  1.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x100d0051
  2.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x100d0051
  3.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x100d0051
  4.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x100d0051
  5.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x100d0074
  6.  
    I: Regular manifest package...
  7.  
    I: Decoding file-resources...
  8.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x10070001
  9.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0057
  10.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0072
  11.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0058
  12.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0057
  13.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0058
  14.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0072
  15.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0072
  16.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0057
  17.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0072
  18.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0058
  19.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0057
  20.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0072
  21.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0058
  22.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0072
  23.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0057
  24.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0058
  25.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0057
  26.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0072
  27.  
    W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x100d0072
  28.  
    I: Decoding values */* XMLs...
  29.  
    Can't find framework resources for package of id: 16. You must install proper framework files, see project website for more info.
学新通

首先需要明确一点的是,我们需要三个小米的框架文件,名字分别是:framework-res.apk,framework-ext-res.apk,miui.apk。其中,framework-res.apk框架文件位于系统目录:/system/framework/,framework-ext-res.apk框架文件位于系统目录:/system/framework/framework-ext-res/,miui.apk框架文件位于系统目录:/system/app/miui/。

但是以上的方案我实测之后,并不能解决id18的问题。

所以我用个了笨方法,直接写代码adb把所有包含miui,xiaomi的apk给拉出来,挨个试!

  1.  
    import os
  2.  
     
  3.  
    p = os.popen('adb shell pm list package|findstr miui')
  4.  
    l = p.read().strip().replace('package:','').split('\n')
  5.  
    print(l)
  6.  
    for app in l:
  7.  
    p = os.popen('adb shell pm path ' app)
  8.  
    path = p.read().strip().replace('package:','')
  9.  
    print(path)
  10.  
    p = os.popen('adb pull ' path ' C:\\Users\\0x16FAAB6C\\Desktop\\Android\\xiaomi\\xiaomi_sys_apk\\' app '.apk')
  11.  
    print(p.read().strip().split('\n')[-1])
  12.  
    print("===done===")

 然后直接批量安装到apktool的framework里面,我看他的id号

  1.  
    import os
  2.  
    import glob
  3.  
     
  4.  
    files = glob.glob("C:\\Users\\administrator\\Desktop\\Android\\xiaomi\\xiaomi_sys_apk\\*")
  5.  
     
  6.  
    for file in files:
  7.  
    p = os.popen('java -jar "D:\\APKDB\\apktool\\apktool250.jar" if ' file)
  8.  
    print(p.read().strip())
  9.  
    print("===done===")

终于,看到了这个:

学新通

这样就知道,还需要第四个文件. com.miui.system

这样就可以正常反编译无报错和warning了! 

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgfacfi
系列文章
更多 icon
同类精品
更多 icon
继续加载