V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
gzxu
V2EX  ›  Android

Target 到 Android 10 的应用不能创建可执行文件了

  •  
  •   gzxu · 2019-09-04 08:08:00 +08:00 via Android · 7556 次点击
    这是一个创建于 1689 天前的主题,其中的信息可能已经有所发展或是发生改变。

    https://developer.android.google.cn/about/versions/10/behavior-changes-all#execute-permission

    大概意思是应用只能从 APK 内部打包好的可执行文件里面创建进程,不能通过下载或者自己编译的方式生成可执行文件,生成了也不给执行

    所以感觉 Termux 要凉啊,好不容易有个 Android 上面能用的包管理器了,而且自己用 Termux 里面的 gcc 或者 go build 编译程序这种方法也要凉了

    10 条回复    2019-09-05 06:38:21 +08:00
    liuxey
        1
    liuxey  
       2019-09-04 08:35:55 +08:00
    Android 10 includes the following security changes.

    Removed execute permission for app home directory

    Untrusted apps that target Android 10 cannot invoke exec() on files within the app's home directory. This execution of files from the writable app home directory is a W^X violation. Apps should load only the binary code that's embedded within an app's APK file.

    In addition, apps that target Android 10 cannot in-memory modify executable code from files which have been opened with dlopen(). This includes any shared object (.so) files with text relocations.

    ==

    看着是有条件的禁止,不是做 android 的,不太清楚具体细节
    gzxu
        2
    gzxu  
    OP
       2019-09-04 08:44:06 +08:00 via Android
    @liuxey #1 嗯呢,大概看了下讲的就是这个意思,只要是第三方针对 API 29 的都无法执行可写的文件
    momocraft
        3
    momocraft  
       2019-09-04 09:36:57 +08:00
    什么叫 Untrusted apps,从 google play 装的算吗
    s82kd92l
        4
    s82kd92l  
       2019-09-04 09:41:45 +08:00 via Android
    Termux 早就有 issue 讨论这个了,以后很可能要采用 proot 或者 qemu user mode 来绕过
    iwtbauh
        5
    iwtbauh  
       2019-09-04 09:42:08 +08:00 via Android
    wtf ? fuck ypu Google!!!
    deorth
        6
    deorth  
       2019-09-04 12:15:01 +08:00
    逐渐 IOS 化
    JIT 怎么办
    Buges
        7
    Buges  
       2019-09-04 12:20:59 +08:00 via Android
    挺好的,一定程度遏制了下热更新。
    至于 termux,拿个 root 处理下就好。
    azh7138m
        8
    azh7138m  
       2019-09-04 14:45:16 +08:00 via Android
    @Buges 唉,现在不 root 也能跑的吗。。。
    weishu
        9
    weishu  
       2019-09-04 16:24:07 +08:00
    Termux 凉不了,这也不是用来遏制热更新的。/data/data/<package>/ 下的文件无法 exec,但是不意味着无法动态加载 dex,也不意味着 /data/app/<package>/lib [param] 无法执行。
    gzxu
        10
    gzxu  
    OP
       2019-09-05 06:38:21 +08:00 via Android
    @Buges #7 iOS 上都能靠 JS 搞出热更新😂感觉更多的是恶心我们这样喜欢折腾的人

    @weishu #9 能写的地方都不能执行,所以 apt-get 那一套是没办法用了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1148 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:46 · PVG 07:46 · LAX 16:46 · JFK 19:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.