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

twrp 的 recovery 能设置个密码吗?

  •  
  •   qceytzn · 2016-07-03 09:25:23 +08:00 · 18062 次点击
    这是一个创建于 2856 天前的主题,其中的信息可能已经有所发展或是发生改变。

    twrp 的 recovery 功能强大就不用我说明了,进了 recovery 之后就可以干掉整个系统,想想太危险,能在 twrp 上加个密码吗?

    20 条回复    2016-07-03 18:08:45 +08:00
    ouqihang
        1
    ouqihang  
       2016-07-03 09:40:09 +08:00 via Android   ❤️ 1
    都解锁了,干掉 recovery 也是分分钟的事。
    Leone27
        2
    Leone27  
       2016-07-03 09:53:51 +08:00
    我也想知道有办法弄这个没?这样 android 的防盗或许还管点用。
    loading
        3
    loading  
       2016-07-03 09:58:19 +08:00 via Android
    这就是为什么要锁 bl 。
    Biggoldfish
        4
    Biggoldfish  
       2016-07-03 09:58:49 +08:00 via Android
    https://twrp.me/faq/securetwrp.html
    提问前麻烦看下官方 FAQ
    “ Why doesn't TWRP have password protection?
    I ’ ve had people ask enough for a protected TWRP that I ’ m creating this page as a response so I don ’ t have to retype. If you ’ re seeing this page, you ’ re probably asking, “ Why doesn ’ t TWRP offer password protection?” You want to lock down your device so that a would-be theif won ’ t be able to wipe your device to get past your lockscreen and/or so they can ’ t wipe away that cool app you bought from the Play Store that will let you track your stolen device via GPS. Well, here ’ s the short answer:

    Nothing trumps physical access to your device. If you ’ ve lost it, there ’ s no way that TWRP can secure it.

    For a longer answer, it ’ s very easy for anyone with just a little bit of knowledge to get around any kind of security that TWRP might have. All they have to do is flash one of the other recoveries that ’ s available that doesn ’ t have password protection to get around it. Most, if not all devices have ways to flash recovery without needing to boot to either Android or recovery (usually via fastboot or download mode / Odin). Quite literally the only way to truly secure your device would be to render the USB port completely unusable which isn ’ t an option for most newer devices that don ’ t have removable batteries. Even then most devices could still be worked with via jtag though it ’ s unlikely that a thief will go to the trouble of paying for a jtag service on a device that has a broken USB port. (Note: I am not recommending that you purposely damage your USB port as it will also likely make it very difficult to recover your device if anything ever goes wrong!)

    I also don ’ t want to offer a lockscreen / password protection because it offers such a superficial level of protection. Users rarely read and would skip over any disclaimers that we have that indicate that any protection that we displayed indicating that their device really isn ’ t secure. If your device has fallen into someone else ’ s hands, your best case scenario should be that you hope that they don ’ t get your personal data. If you don ’ t want someone getting your personal data, use Android ’ s device encryption and a good lockscreen.”
    cchange
        5
    cchange  
       2016-07-03 10:03:02 +08:00
    如楼上所述 没有意义
    honeycomb
        6
    honeycomb  
       2016-07-03 10:26:27 +08:00
    可以的,但这部分与 twrp 无关
    只要在系统里设置启用全盘加密(device encryption),并设置为开机时需要输入密码(很重要), trwp 如果想访问数据也得输入密码才能生成密钥,再完成解密,从而能访问 /data 分区。

    在出厂就是 Android nougat 的设备上,情况可能会因 Direct Boot 机制而有不同,全盘加密变成按文件加密(而不是之前的按分区加密)的形式,加密的区域分成两块:
    1 ,设备加密,这部分在设备启动时便会解密(可能也提供类似开机时需要输入密码的设定)
    2 ,凭据加密,需要用户解锁屏幕后才获得解密
    cst4you
        7
    cst4you  
       2016-07-03 10:35:37 +08:00 via Android
    新的 Nexus 上打开开机需要密码, twrp 每次进去的时候也会要求密码解密磁盘
    qceytzn
        8
    qceytzn  
    OP
       2016-07-03 11:20:07 +08:00
    @honeycomb 感谢您的回答,我正好也有关于全盘加密的疑问: https://www.v2ex.com/t/289908 ,想要加密但是完全进行不了,还没错误提示...
    关于安卓的加密我还有几个问题:
    1 , 6.0 的系统上全盘加密是个什么样的机制?跟 linux 的全盘加密差不多吗? data 分区和 system 分区都加密了?加密后手机刚启动的时候就要输入密码吗?(我的意思是在手机启动时开始读取 system 分区的时候就要密码了?不是指手机都启动好了之后要密码才能进桌面)
    2 ,如果 6.0 的系统全盘加密了,那么启动到 twrp 的 recovery 的时候, data 分区和 system 分区还能随便就被格式化吗?
    pwinner
        9
    pwinner  
       2016-07-03 11:21:47 +08:00 via Android
    按 twrp 来看,解锁不正确就无法 mount 分区,那这么看的话。。
    qceytzn
        10
    qceytzn  
    OP
       2016-07-03 11:25:35 +08:00
    @cst4you 您的 Nexus 设备是哪个型号?启动进 twrp 的时候就要密码?如果设置的是图案密码也有解锁图出来?不给密码 twrp 就不能进行任何操作?双清或者格式化,都无法进行?(我知道全盘加密后刷机是不行的, twrp 本身就有提示说加密的手机必须先解密才能刷机,其它一概不知,我想加密但是我手机上加密过程根本进行不下去)
    qceytzn
        11
    qceytzn  
    OP
       2016-07-03 11:46:10 +08:00   ❤️ 1
    @pwinner 目前我对安卓的全盘加密的工作机制以及 twrp 的工作机制都是模糊的,所以您这一句话“解锁不正确就无法 mount 分区”还不足以让我领会到清楚的意思。我们深入的探讨一下好吗?无论是 twrp 的 recovery 加个密码或者安卓的全盘加密,都是为了数据的安全,不被非法窥探的安全以及不被恶意删除的安全,如果安卓的全盘加密是把 data 和 system 这两个分区分别整盘加密,那么理论上 twrp 还是可以很简单的格式化 data 和 system 分区, data 分区一旦被格式化那么我所有的私人数据全部完了...因为进 recovery 是很简单的事情所以这是相当不安全的。如果安卓的全盘加密是把 recovery 、 data 、 system 这三个分区分别整盘加密的话,那么进 twrp 之前就需要密码了,那么理论上这就安全多了(只要再锁住 BL 的话除非机主完全失去了手机的控制权,否则数据应该不会遭遇“恶意删除”了)。那么现在谁能给我简单又清楚的说明一下安卓的加密机制吗?谢谢了
    mxalbert1996
        12
    mxalbert1996  
       2016-07-03 12:19:09 +08:00 via Android
    @qceytzn 安卓的加密机制据我所知是只加密 data 分区,另外加密是用来保护你的数据不被别人获取的,并不能保护你的数据不被删除,这与其它任何加密都是一样的。
    honeycomb
        13
    honeycomb  
       2016-07-03 12:31:27 +08:00 via Android   ❤️ 1
    @qceytzn 好像是 dm-crypt , system 分区不加密也不用加密(所有同 sku 机器的 system 分区都相同)

    有两种模式,一种是需要启动时就要输密码(系统不知道解密加密数据用的密钥( 1 )的密钥( 2 ),后面一个密钥由锁屏密码经过密钥生成算法计算出来,实际上这些手机的还原出厂步骤一定包括删除( 1 )),还有一种是允许启动到锁屏界面时才输入密码(实际上解密数据的密钥( 1 )在启动之时已经由系统获取到了,它是用某个默认密码加密的密钥( 2 ), Android7 想解决的问题就是它,它把用户数据一分为二,大部分使用前一种方式储存,另一部分用后一种方式储存,使得手机可以自行无需密码启动,但不破坏用户数据安全性)。

    需要启动时输入密码的情况下,/data 分区不能挂载(至少访问不了其中的密文数据,应该是可以做删除之类的破坏操作),不影响使用其它分区
    kokutou
        14
    kokutou  
       2016-07-03 12:37:50 +08:00
    只加密 data 分区。。。
    只是防止被人获取而已。。。
    如果你手机都掉了在别人手上了。。。还要那数据干啥。。。
    qceytzn
        15
    qceytzn  
    OP
       2016-07-03 12:46:40 +08:00
    @honeycomb 谢谢您的解答!非常有用!我还有个疑问:那种启动时就需要输入密码的,进 recovery 前也需要密码吗?我现在是 CM13 , recovery 是 twrp 的,目前正痛苦于手机内个人数据的保密问题
    zxcasdqwe9
        16
    zxcasdqwe9  
       2016-07-03 14:02:18 +08:00
    @qceytzn 需要不过可以跳过,跳过就无法 mount data 分区。加密只是用来保护你的隐私,不是防止系统被破坏的。
    imn1
        17
    imn1  
       2016-07-03 16:33:42 +08:00
    有什么用?会入 rec 的不会用 adb 么?
    honeycomb
        18
    honeycomb  
       2016-07-03 17:46:09 +08:00 via Android
    @qceytzn 如果希望不解密 /data 分区,则可不输入密码, twrp 便不会(且也不能)解密,也无法让你挂载 /data ,但其它功能不受影响
    honeycomb
        19
    honeycomb  
       2016-07-03 17:47:07 +08:00 via Android
    @imn1 可是有 adb 也访问不了数据呀
    cst4you
        20
    cst4you  
       2016-07-03 18:08:45 +08:00
    @qceytzn 格式化不就没了么, 你手机都到别人手里了, 那也没办法了啊, 只能尽量不被别人窥探
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5844 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 06:21 · PVG 14:21 · LAX 23:21 · JFK 02:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.