V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
JinTianYi456
V2EX  ›  Android

pm install: install a single legacy package. 那新的技术是啥?

  •  
  •   JinTianYi456 · Jul 1, 2021 · 12447 views
    This topic created in 1761 days ago, the information mentioned may be changed or developed.
    12 replies    2021-07-02 18:23:23 +08:00
    AoEiuV020
        1
    AoEiuV020  
       Jul 1, 2021
    我咋没看到 legacy,说起新包,难道 pm 支持安装 aab ?
    JinTianYi456
        2
    JinTianYi456  
    OP
       Jul 1, 2021
    @AoEiuV020 我是说它 usage 里用到了 legacy 这个词
    AoEiuV020
        3
    AoEiuV020  
       Jul 1, 2021
    @JinTianYi456 还是没有找到,你手机是什么版本的?
    mxT52CRuqR6o5
        4
    mxT52CRuqR6o5  
       Jul 1, 2021 via Android
    可能是指 app bundle ?
    also24
        5
    also24  
       Jul 1, 2021
    @AoEiuV020 #1
    同,我在那个页面也没找到 legacy 这个单词
    Jirajine
        6
    Jirajine  
       Jul 1, 2021 via Android
    also24
        7
    also24  
       Jul 1, 2021
    @AoEiuV020 #3
    补充,在手机上 pm help 也没找到
    AoEiuV020
        8
    AoEiuV020  
       Jul 1, 2021 via Android   ❤️ 1
    @also24 找到了,旧版本安卓命令行调用 pm 时打印的 usage 里有这行,
    因为几年前就有这句话所以应该不是指 aab 和 apk 的新旧,
    also24
        10
    also24  
       Jul 1, 2021   ❤️ 1
    顺藤摸瓜,找了一下这段代码的提交记录:

    看一下 commit 就知道了:
    Extend pm to support sessions and split APKs.


    可见,确实是在加入 split APKs 支持时,将 apk 称为了 legacy package

    https://android.googlesource.com/platform/frameworks/base/+/ec55ef0934b8e0d1bb705434947de817f7be57f1%5E%21/cmds/pm/src/com/android/commands/pm/Pm.java
    Xusually
        11
    Xusually  
       Jul 1, 2021
    迎接 AAB 吧。

    TL;DR
    Starting in August 2021, Google will require all new Android APKs to land on the Play Store as App Bundles instead.
    This will invariably result in smaller file sizes and other boons for the end-user.
    However, it will also require app developers to push out APK versions of their apps to other non-Play Store channels, as they won’t support App Bundles.

    https://www.androidauthority.com/android-apks-sunset-1636829/
    JinTianYi456
        12
    JinTianYi456  
    OP
       Jul 2, 2021
    @also24 #9 新的 pm 已经转到`cmd package`了,看起来是在 https://android.googlesource.com/platform/frameworks/native/+/refs/heads/master/cmds/cmd/
    但我怎么看不到代码里的 cmd package 的 usage 在哪?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5652 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 06:50 · PVG 14:50 · LAX 23:50 · JFK 02:50
    ♥ Do have faith in what you're doing.