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

关于 Android 的 root 和 ADB

  •  
  •   Explorare · 2016-12-04 10:46:12 +08:00 · 7930 次点击
    这是一个创建于 2699 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近趁黑五半价购入 BlackBerry PRIV ,买的时候没多想,过了几天突然发现这手机太安全了不能 root 。

    那么问题来了,这手机不能 root 得话,开了 USB 调试连电脑的 ADB ,相比可 root 的机型有哪些功能限制么。用 ADB 可以完成对手机系统文件、设定的操作么,比如更改 Android Captive Portal Server ,或者给某个程序提权?比如 SS 的 NAT 模式。

    虽然是 Android 开发,但一直用的虚拟机,主力机是今年刚换上的 lumia 535 ,前主力 NOKIA 2700c 成为备胎。 lumia 535 除了反应慢爱误触应用少别的也没啥。系统挺好看, Windows 10 mobile 。

    31 条回复    2016-12-05 09:58:50 +08:00
    HackerOO7
        1
    HackerOO7  
       2016-12-04 11:03:36 +08:00   ❤️ 1
    不能
    chanssl
        2
    chanssl  
       2016-12-04 11:50:45 +08:00 via Android   ❤️ 1
    Android Captive Portal Server 通过 ADB 操作是不需要 Root 权限的。其他授权和操作就不能。
    chenyiping1995
        3
    chenyiping1995  
       2016-12-04 13:15:41 +08:00 via Android   ❤️ 1
    一个一个回答。
    更改系统文件 不可以,不可以对 /system 和 /data 分区下非本程序目录进行修改
    更改系统设置 看是什么设置
    更改 Captive Portal Server 直接在手机上不可以,因为不提供 adb 操作本机的权限,依靠外部设备 adb 可行。
    程序提权 不可以
    SS 的 NAT 不可以
    Explorare
        4
    Explorare  
    OP
       2016-12-04 13:36:59 +08:00
    @chenyiping1995 那么不能 root 对于一个在大陆使用的原生 Android 还有什么影响使用的问题么?比如治不了阿里全家桶?我手机还没回来不知道 BB PRIV 自带的 DETK 是否有这样的功能。
    helloccav
        5
    helloccav  
       2016-12-04 13:43:20 +08:00
    @Explorare 如果不 root 并且不安装 xposed 框架,确实治不了国内 APP 的后台运行和后台互相唤醒。
    Explorare
        6
    Explorare  
    OP
       2016-12-04 14:09:41 +08:00
    @helloccav 唔。那可真是有点麻烦。 Google Play 上的支付宝和淘宝是否用了 Google Play 的推送呢?还是说也用了自己的后台推送,然后互相唤醒?
    helloccav
        7
    helloccav  
       2016-12-04 14:26:53 +08:00
    @Explorare 支付宝和淘宝是否用了 Google Play 的推送我不知道,据说 play 上的微信启用了 Google Play 的推送。
    billlee
        8
    billlee  
       2016-12-04 15:53:28 +08:00
    @Explorare Google Play 上的阿里系也是互相唤醒的全家桶,我现在 root + xposed 都不装阿里系的 apps 了.
    Explorare
        9
    Explorare  
    OP
       2016-12-04 16:35:10 +08:00
    @billlee 噫,这就有点尴尬了。互相唤醒能耗多少电呢?
    rogerchen
        10
    rogerchen  
       2016-12-04 16:58:07 +08:00
    @Explorare 唤醒不是大问题,主要是醒着不停地拿 wakelock ,很费电,如果后台一堆这种程序,基本上手机时时刻刻都在工作,续航自然如雪崩。
    Explorare
        11
    Explorare  
    OP
       2016-12-04 17:15:54 +08:00
    @rogerchen 拿 wakelock 干什么呢?
    chenyiping1995
        12
    chenyiping1995  
       2016-12-04 19:35:04 +08:00 via Android
    @Explorare 字面含义,锁唤醒状态,用来推送什么的。
    771456556
        13
    771456556  
       2016-12-04 19:37:31 +08:00 via Android   ❤️ 1
    安卓 7.0 以上的可以看看这个 https://github.com/Jiangyiqun/android_background_ignore
    zmz125000
        14
    zmz125000  
       2016-12-04 19:56:00 +08:00 via Android   ❤️ 1
    有个叫 Island 的 APP
    Chrisplus
        15
    Chrisplus  
       2016-12-04 21:00:20 +08:00
    用 adb 的话,试试 dirtycow
    Explorare
        16
    Explorare  
    OP
       2016-12-04 21:11:20 +08:00
    @Chrisplus 可是 PRIV 的整个启动过程都是签名的, root 之后就会启动失败,如果没猜错的话。或者只能做到临时 root ,但是不能对内核进行修改,否则还是会启动失败。
    Explorare
        17
    Explorare  
    OP
       2016-12-04 22:46:12 +08:00
    这里贴一个官方对 PRIV 安全设计的解释
    How and Why the PRIV Protects Against Rooting | Inside BlackBerry
    http://blogs.blackberry.com/2016/02/how-and-why-the-priv-protects-against-rooting/
    qceytzn
        18
    qceytzn  
       2016-12-05 00:42:18 +08:00   ❤️ 1
    楼主,到手后试试 systemless-xposed 和 systemless-root ??
    www.xda-developers.com/unoffical-systemless-xposed-is-now-available-otas-and-pay-unaffected/
    spider82
        19
    spider82  
       2016-12-05 00:54:24 +08:00
    什么系统啊? dirtycow?
    Explorare
        20
    Explorare  
    OP
       2016-12-05 08:05:56 +08:00
    @spider82 Android 6.0
    mortal
        21
    mortal  
       2016-12-05 08:41:42 +08:00 via iPhone
    @qceytzn 这个也是要 root 的啊
    Explorare
        22
    Explorare  
    OP
       2016-12-05 08:57:15 +08:00   ❤️ 1
    @Chrisplus
    >As far as I can tell the Android proof of concept for DirtyCow currently available won't work with SELinux which we know BlackBerry is using. There appears to be a privately-available version that can circumvent SELinux, but that remains to be seen.

    >As for Drammer (the specific Android rowhammer implementation), testing it on my Priv revealed vulnerable flips, but again, the publicly-available app doesn't provide a way to translate that into root access. I'm guessing that it's as much a function of the physical age/structure of the RAM as it is the software-based memory allocator. Still, the November patch should tweak the memory manager to make things like this harder.

    - Android rooting possible with dirty cow and drammer (rowhammer) - BlackBerry Forums at CrackBerry.com
    - http://forums.crackberry.com/blackberry-android-os-f456/android-rooting-possible-dirty-cow-drammer-rowhammer-1089834/
    lslqtz
        23
    lslqtz  
       2016-12-05 09:02:24 +08:00
    DirtyCow 这个漏洞或许可以试试看?。。
    lslqtz
        24
    lslqtz  
       2016-12-05 09:03:35 +08:00
    @Explorare 临时 root 就搞成像 iOS 的盘古的那种半完美越狱? v.v
    Explorare
        25
    Explorare  
    OP
       2016-12-05 09:09:51 +08:00
    @lslqtz DirtyCow 对 PRIV 这种开启了 SELinux 的似乎是无效的,见 #22.

    临时越狱似乎也是做不到的,因为 SELinux 限制了进程的权限,没法拿来执行 su 吧。
    lslqtz
        26
    lslqtz  
       2016-12-05 09:13:37 +08:00
    @Explorare SELinux ,当我没说。。
    Explorare
        27
    Explorare  
    OP
       2016-12-05 09:21:22 +08:00
    @lslqtz 可能是我想错了, SELinux 确实还是会被在一定程度上突破的。但是 BB PRIV 的系统是从硬件层面上特别加固过的,详见:

    How BlackBerry Security Begins At The Endpoints | Inside BlackBerry for Business Blog
    http://bizblog.blackberry.com/2015/02/blackberry-security-starts-at-endpoints/

    这个设计我还是比较欣赏的,但是这个机子竟然不提供关掉的选择,比如放弃保修而刷入纯净固件,这个做不到,让我很不爽。

    所以即便做到了临时 root ,重启的时候就会遇到校验错误,但是似乎并不会拒绝启动?

    >If a potential compromise is detected, administrators can configure alerts, prevent the device from accessing the corporate network, or even remotely wipe the device.

    这个还是得亲自试一试才行。不过砖了就 GG 了,因为 PRIV 没有提供 JTAG ,砖了就没救了(大概)。
    lslqtz
        28
    lslqtz  
       2016-12-05 09:23:08 +08:00
    @Explorare 嗯, Nexus 5 的 5.0 也是 SELinux ,但是已经被突破了。
    就是,风险比较。。
    Explorare
        29
    Explorare  
    OP
       2016-12-05 09:50:47 +08:00
    @lslqtz 唔,那就等手机回来试试咯。可没有 JTAG 还是心虚。
    hais1992
        30
    hais1992  
       2016-12-05 09:53:56 +08:00
    NOKIA 2730c 顶一个
    Explorare
        31
    Explorare  
    OP
       2016-12-05 09:58:50 +08:00
    @hais1992 你的 2730c 用了几年了?我 2700c 是 '08 买的,用到现在依然坚挺。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1005 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:39 · PVG 03:39 · LAX 12:39 · JFK 15:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.