cyanogenmod 12と12.1 「暗号化電話」の設定は壊れていて、かなりの間に行われています。他の方法で電話を暗号化する方法はありますか?暗号化/データディレクトリを使用してCMを電話機にサイドロードできますか?データを安全に保つための他の方法はありますか?私が取り組んでいる装置は、Verizon LG G3です。
cyanogenmod 12と12.1 「暗号化電話」の設定は壊れていて、かなりの間に行われています。他の方法で電話を暗号化する方法はありますか?暗号化/データディレクトリを使用してCMを電話機にサイドロードできますか?データを安全に保つための他の方法はありますか?私が取り組んでいる装置は、Verizon LG G3です。
CyanogenMod 12 and 12.1 'Encrypt phone' setting is broken, and has been for quite a while. Is there any way to encrypt the phone in some other fashion? Can CM be sideloaded onto a phone with an encrypted /data directory? Are there any other ways to keep your data safe and sound? The device I'm working on is a Verizon LG G3.
ユーザーデータパーティションを暗号化するためにシェルで使用できる低い(ER)レベルのコマンドがあります。免責事項/警告:次の手順データを拭き取り、必要に応じてバックアップをするようにします。
次の手順に従うと、がデータパーティションを拭くことができ、その後はそれを暗号化することができます(工場出荷時のリセットと同様):
99887766544330
の 9988766554331 。 99887766544332
を別のシェルで呼び出すことで、ログを監視します。このコマンドを入力し、パスワードを入力してEnterキーを押します。これにより、実際にパスワードが設定されます。このコマンドは1行の入力を読み取ります(<コード> 998877666666544333 )、末尾の改行をEnter( 99887766654334
)にストリップし、それを16進表現に変換します(<コード> 9988776664335 )。怖がっている場合、またはこのコマンドが何があるかわからない場合は、下記を参照してください。
上記 command( "ボリュームデーモンクライアント")
99887766544338
(ボリュームデーモン)に通信された 99887766654339
の暗号化はいくつかのサブコマンドを持ちます。 998877665443310
サブコマンドには、 99887665443311
(clear 99887665443312
完全)と<コード>をコピーしながら暗号化を適用したものです。コンテナ内の
その後、Android 5.0以降の4つのオプションが利用可能です。そのうちの1つは、 998877665443315
で、キーとして単一の16進シーケンスを受け入れます。したがって、パスワードが 9988776666643316
の場合、16進表現は<コード> 9988776665443317 (<コード>の<コード>の<コード>の<コード>、<コード>の<コード>です。 > 998877655443320 <コード>は<コード> 998876654443321 、 http://www.asciabilitaibita.co.jp/a>)を参照してください。これに対するコマンドは次のとおりです。
これは、メタデータを格納するための別のパーティションを持つNexus 5(コード名Hammerhead、CM-12.1-20150814)でテストされました。 重要 USERDATAパーティションには、 9988776666633323
フラグ・セットの後にはパーティションへのパスまたは特殊文字列 9988766544433324
が続きます。 My 998877665443325
/dev/block / platform/msm_sdcc.1/by-name/userdata / data ext4 ...、チェック、暗号化可能 = / dev /ブロック/プラットフォーム/ MSM_SDCC.1 /名詞/メタデータ
特殊文字列<コード> 99887666554433326 (<コード> 998877665433327 )が存在する場合は、データパーティションの最後に16kibを使用して暗号化メタデータを格納します。
さらに読んで、参照:
付録:Logcat excerpt excerpt excerpt excerptは、終了して再起動するまで暗号化コマンドを実行しました(最後に無関係なグラフィックメッセージを省略します)。このNexus 5はハードウェア加速された暗号(QSeecom)を持っています。
<事前> <コード> adb logcat8There are low(er)-level commands that can be used in a shell to encrypt your user data partition. Disclaimer/Warning: the following instructions will wipe your data, ensure that you make a backup if needed.
Following these steps, you should be able to wipe your data partition and have it encrypted afterwards (similar to a factory reset):
adb root
followed by adb shell
.adb logcat
in another shell.Enter this command, type your password and press Enter. This will actually set your password. This command reads one line of input (head -1
), strips the trailing newline from Enter (tr -d '\n'
) and converts it to a hexadecimal representation (hexdump ...
). If it looks scary or if you are not sure what this command does, see below.
vdc cryptfs enablecrypto wipe password $(head -1 | tr -d '\n' | hexdump -ve '1/1 "%.2x"')
The above vdc
command ("Volume Daemon Client") communicated with vold
(Volume Daemon) has some subcommands like cryptfs
for encryption. The enablecrypto
subcommand has two modes: wipe
(clear /data
completely) and inplace
(supposedly applying encryption while copying your original /data
inside the container).
Then, four options are available starting with Android 5.0, one of them is password
which accepts a single hexadecimal sequence as key. Thus if your password is foo
, then the hexadecimal representation is 666f6f
(f
is 66
in hex, o
is 6f
, see http://www.asciitable.com/). The command for this is:
vdc cryptfs enablecrypto wipe password 666f6f
This was tested on a Nexus 5 (code name hammerhead, running cm-12.1-20150814) which has a separate partition for storing metadata. It is important that the userdata partition has the encryptable
flag set followed by either the path to a partition or the special string footer
. An (abbreviated) line from my /fstab.hammerhead
file:
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 ...,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/metadata
When the special string footer
(encryptable=footer
) is present, then 16 KiB at the end of the data partition is used to store encryption metadata.
For further reading, see:
Appendix: logcat excerpt from the moment I executed the encryption command until it finishes and reboots (omitting unrelated graphics messages at the end). Note that this Nexus 5 has hardware-accelerated crypto (QSEECom).
--------- beginning of main 08-16 12:57:15.459 W/DrmManagerClientImpl(Native)( 2108): DrmManager server died! 08-16 12:57:15.459 I/ServiceManager( 184): service 'drm.drmManager' died 08-16 12:57:15.467 D/Cryptfs ( 186): Just asked init to shut down class main 08-16 12:57:15.470 D/Cryptfs ( 186): unmounting /mnt/shell/emulated succeeded 08-16 12:57:15.599 I/ServiceManager( 184): service 'media.audio_flinger' died 08-16 12:57:15.599 I/ServiceManager( 184): service 'media.player' died 08-16 12:57:15.599 I/ServiceManager( 184): service 'media.camera' died ... 08-16 12:57:16.695 D/Cryptfs ( 186): unmounting /data succeeded 08-16 12:57:16.695 D/QSEECOMAPI: ( 186): QSEECom_get_handle sb_length = 0x2000 08-16 12:57:16.696 D/QSEECOMAPI: ( 186): App is already loaded QSEE and app id = 2 08-16 12:57:16.697 I/Cryptfs ( 186): keymaster version is 3 08-16 12:57:16.697 D/QSEECOMAPI: ( 186): QSEECom_dealloc_memory 08-16 12:57:16.697 D/QSEECOMAPI: ( 186): QSEECom_shutdown_app, app_id = 2 08-16 12:57:16.697 D/QSEECOMAPI: ( 186): QSEECom_get_handle sb_length = 0x2000 08-16 12:57:16.697 D/QSEECOMAPI: ( 186): App is already loaded QSEE and app id = 2 08-16 12:57:18.058 D/QSEECOMAPI: ( 186): QSEECom_dealloc_memory 08-16 12:57:18.058 D/QSEECOMAPI: ( 186): QSEECom_shutdown_app, app_id = 2 08-16 12:57:18.058 I/Cryptfs ( 186): Using scrypt with keymaster for cryptfs KDF 08-16 12:57:18.208 D/BootAnimation( 2683): Use save memory method, maybe small fps in actual. 08-16 12:57:18.208 E/QCOM PowerHAL( 2683): Failed to acquire lock. 08-16 12:57:18.691 D/QSEECOMAPI: ( 186): QSEECom_get_handle sb_length = 0x2000 08-16 12:57:18.691 D/QSEECOMAPI: ( 186): App is already loaded QSEE and app id = 2 08-16 12:57:18.692 I/Cryptfs ( 186): Signing safely-padded object 08-16 12:57:18.797 D/QSEECOMAPI: ( 186): QSEECom_dealloc_memory 08-16 12:57:18.797 D/QSEECOMAPI: ( 186): QSEECom_shutdown_app, app_id = 2 08-16 12:57:20.056 I/Cryptfs ( 186): Using scrypt with keymaster for cryptfs KDF 08-16 12:57:20.690 D/QSEECOMAPI: ( 186): QSEECom_get_handle sb_length = 0x2000 08-16 12:57:20.691 D/QSEECOMAPI: ( 186): App is already loaded QSEE and app id = 2 08-16 12:57:20.691 I/Cryptfs ( 186): Signing safely-padded object 08-16 12:57:20.796 D/QSEECOMAPI: ( 186): QSEECom_dealloc_memory 08-16 12:57:20.796 D/QSEECOMAPI: ( 186): QSEECom_shutdown_app, app_id = 2 08-16 12:57:21.429 I/Cryptfs ( 186): Enabling support for allow_discards in dmcrypt. 08-16 12:57:21.429 I/Cryptfs ( 186): load_crypto_mapping_table: target_type = crypt 08-16 12:57:21.429 I/Cryptfs ( 186): load_crypto_mapping_table: real_blk_name = /dev/block/platform/msm_sdcc.1/by-name/userdata, extra_params = 1 allow_discards 08-16 12:57:21.431 I/Cryptfs ( 186): Making empty filesystem with command /system/bin/make_ext4fs -a /data -l 13725837312 /dev/block/dm-0 08-16 12:57:21.447 I/make_ext4fs( 186): SELinux: Loaded file_contexts from /file_contexts 08-16 12:57:21.447 I/make_ext4fs( 186): Creating filesystem with parameters: 08-16 12:57:21.447 I/make_ext4fs( 186): Size: 13725835264 08-16 12:57:21.448 I/make_ext4fs( 186): Block size: 4096 08-16 12:57:21.448 I/make_ext4fs( 186): Blocks per group: 32768 08-16 12:57:21.448 I/make_ext4fs( 186): Inodes per group: 8144 08-16 12:57:21.448 I/make_ext4fs( 186): Inode size: 256 08-16 12:57:21.448 I/make_ext4fs( 186): Journal blocks: 32768 08-16 12:57:21.449 I/make_ext4fs( 186): Label: 08-16 12:57:21.449 I/make_ext4fs( 186): Transparent compression: none 08-16 12:57:21.449 I/make_ext4fs( 186): Blocks: 3351034 08-16 12:57:21.449 I/make_ext4fs( 186): Block groups: 103 08-16 12:57:21.459 I/make_ext4fs( 186): Reserved block group size: 823 08-16 12:57:21.465 I/make_ext4fs( 186): Created filesystem with 11/838832 inodes and 93654/3351034 blocks 08-16 12:57:21.465 I/make_ext4fs( 186): Total files: 0 08-16 12:57:21.465 I/make_ext4fs( 186): Total bytes: 0 08-16 12:57:42.926 D/Cryptfs ( 186): Successfully created filesystem on /dev/block/dm-0
、オリジナルアンサーが期待どおりに機能しませんでした。それは正常に暗号化されているように見えましたが、UIは非常に早く戻ってきて、「暗号化」設定ではデバイスが暗号化されていることが示されていませんでした。その後、 update に与えられたコマンドを適用しましたが、まだ機能しませんでした。私はデータパーティションのサイズを削減とそれは正常に暗号化されました。すなわち。
<コード> mount | grep data データパーティションの実際のブロックデバイスを見つける。 <コード> /dev/block/mmcblk0p26
であると仮定しましょう。<コード> umount /data 作業するext-toolsの場合は
<コード> e2fsck -f -p /dev/block/mmcblk0p26333333333333333333333333333333333333.
ブロック数を取得するための <コード> e2fsck -f -p /dev/block/mmcblk0p264 。 998877665544355
です。
<コード> 99887766655443336 、すなわち、元のブロック数から20のような十分な量の量を部分的にします。
<コード> e2fsck -f -p /dev/block/mmcblk0p26 は、私に間違った配置されたiノードを見つけました。
99887766666544339
を把握するために、<コード> 998877666544338 パーティションをマウントする必要がありました。私のシステムでは、そのバイナリはlibcの64bit版に対してリンクされていましたが、TWRP Iがそれを提供していませんでした。だから私は 9988776665443310
でコマンドを接頭辞める必要がありました。 For me, the original answer did not work as expected. It looked like it encrypted successfully, but the UI came back very quickly and the "Encryption" setting did not show that the devices was encrypted. I then applied the commands given in the update, but it still didn't work. I then reduced the size of the data partition and it encrypted successfully. I.e.
mount | grep data
to find the actual block device of the data partition. Let's assume it is /dev/block/mmcblk0p26
.
umount /data
for the ext-tools to work.
e2fsck -f -p /dev/block/mmcblk0p26
to not run into trouble for the upcoming resizing.
tune2fs -l /dev/block/mmcblk0p26
to obtain the Block count. Let's assume it is 3057395
.
resize2fs /dev/block/mmcblk0p26 3057375
, i.e. substract a sufficient amount like 20 from the original block count.
e2fsck -f -p /dev/block/mmcblk0p26
found a wrongly placed inode for me.
I also needed to mount the /system
partition in order to get hold of resize2fs
. On my system, that binary was linked against a 64bit version of libc, but the TWRP I was used did not seem to provide that. So I needed to prefix the commands with env LD_LIBRARY_PATH=/system/lib64
.
明らかにファイルシステムを作成するために必要な mkfs.f2fs は、<コード> 99887766665443311 から<コード>
に移動しました。もSELinuxと競合しなければなりません。これは、いくつかの追加のステップを実行する必要があることを意味します。
ADBルート
ADBシェル
SetEnforce 0
マウント-OREMOUNT、RW / SYSTEM
ln -s /sbin/mkfs.f2fs / system/bin/mkfs.f2fsd (/pre>
VDC CRYPTFS ENABLECRYPTOワイプパスワード666F6F
As of CM12.1 2015-10-15 the answer by Lekensteyn no longer works.
Apparently the mkfs.f2fs which is needed to create the file system, has been moved from /system/bin/
to /sbin/
Also we have to contend with SELINUX. This means that we need to do several additional steps:
adb root
adb shell
setenforce 0
mount -oremount,rw /system
ln -s /sbin/mkfs.f2fs /system/bin/mkfs.f2fs
vdc cryptfs enablecrypto wipe password 666f6f
もう一つの更新 - CM13 2016年1月9日、Nubia Z7 MAX、NX505J電話
このコマンド(<コード> /dev/block/mmcblk0p263 )は、ファイルがここに再びライブをとるにつれて不要です。シンボリックリンクを作成する必要はありません。
このコマンドはヘクスにある必要はなく、あなたがあなたのPWを入力した場合あなたのPWはヘクスになります。
<コード> e2fsck -f -p /dev/block/mmcblk0p2614 これは文字通り /dev/block/mmcblk0p265
not 998876655443316
メタデータに必要な追加ブロックを通過したので、私はまだこの問題を調査しています。 1つのブートサイクルを通してのみ実行可能な暗号化の両方の結果を暗号化するためのGUIとマニュアルコマンドの事実を通過する必要があります。暗号化が成功したら、返金します。
今私は暗号化してうまく機能し、初めて起動し、電話が暗号化されていると言っています。 TWRPを使用することができます/ dataが暗号化できますが、TWRPで試してみるHEXとASCIパスワードは両方とも機能しません。次回の再起動Android OSは完全にCM13を起動できません。正しい暗号化パスワードがあることを確認し、1つの暗号化ブートのみを取得します。最初の成功した暗号化起動後、それはその後起動サイクルのアニメーション段階をロックします。 セキュリティのベストプラクティスは、AES256の電話暗号化をお勧めします。
Another update- CM13 Jan 9, 2016 build, using Nubia Z7 Max, NX505J phone
This command (ln -s /sbin/mkfs.f2fs /system/bin/mkfs.f2fs
) is no longer needed as the file lives here again. There is no need to create a symbolic link.
This command no longer needs to be in HEX and if you enter hex your PW will be hex.
cryptfs enablecrypto wipe password 666f6f
- This literally created a password for me of 666f6f
not foo
I am still researching this issue because I got past the extra blocks needed for the meta data. I now need to get past the fact the GUI and the manual commands to encrypt both result in encryption that is viable only through one boot cycle. I will report back when I have a successful encryption.
Right now I encrypt and it works fine and I boot the first time and it says the phone is encrypted. Using TWRP I can confirm /data is encrypted but the HEX and ASCI passwords I try in TWRP both do not work. On the next reboot the Android OS cannot fully boot CM13. It confirms I have the correct encryption password and then I only get 1 encrypted boot. After the first successful encrypted startup it locks on the animation stage of boot cycle thereafter. Security best practices now recommends AES256 phone encryption.
CyanogenModを実行しているMOTO X 2013を持つ12.1私はまた暗号化できなかった。最後に、私はこれらのステップで成功しました:
e2fsck -f -p /dev/block/mmcblk0p2617
を入力し、root access e2fsck -f -p /dev/block/mmcblk0p2618
art's ong http:// forumを組み合わせてこのソリューションにやって来ました。 cyanogenmod.org/topic/114181-device-encryption-fails-on-cm-121/ "rel =" nofollow noreferrer ">このフォーラムスレッド。
Having a Moto X 2013 running Cyanogenmod 12.1 I also was not able to get it encrypted. Finally, I succeeded with these steps:
su
, and confirm root accesssetenforce 0
I came to this solution by combining Art's answer and this forum thread.
FirelordとLekenSteynの解決策を問題に使用しましたが、私はコマンドから1行を忘れることを管理しました。
これは私がそれをした方法です:
私は開発者オプションの androidデバッグと root access をオンにしました。 。
<コード> 99887766544330 および 9988776554331
コマンドを使用しました。その後別のADBコマンドプロンプトを開き、 998877666544332
コマンドを使用しました。
最初のADBシェルで、 99887766544333
とその 99887766654333
の後に転送しました。
重要な注意: passwordコマンドは、Androidバージョンによって使用しているものによって異なる場合があります。 Android 5.x を使用している場合は、 16進数 システム(chr lineでは、パスワードのシンボルが16進値がHx行にあります)。 Android 6.x を使用している場合は、パスワードはそこに入力したものになります。
気付いたときに 99887766554335
コマンドを使用するのを忘れました。その後、私は黒くなります。私が見たとき、ログが停止して終了したADBシェルは、電話を再起動しました。しかし、みんなに関しては、問題は、Cyanogenmodが負荷がかかりません。そして私はそれを非常に簡単に修正することに成功しました:
そこに行き、それはうまくいくべきです。最初は、電話が設定されたときに、それを1分間させてください。セットアップウィザードには少しクラッシュがある可能性がありますが、それを急ぎすぎると、クラッシュしたときに自動的に再起動します。
CyanogenModとAndroidの暗号化がどのように機能するかについての私の非常に小さい知識では、私はそれがいくつかの重要なCyanogenまたはAndroidファイルを削除する形式の間に、起動から停止します。
After 6 hours of mental pain and sweat I might have stumbled on a solution what worked for me. And it was an accident too. I did this for the Samsung S4 Mini with CyanogenMod 13.0 and Android 6.0.1. Important key factor here is, that I started it off from a clean phone (fresh firmware and unrooted), because when the phone was previously rooted, then the phone didn't want to work at all.
I used the Firelord's and Lekensteyn's solution to the problem, but I managed to to forget one line from the commands.
Here is how I did it:
I turned on the Android debugging and Root access to ADB only in the Developer Options.
In the ADB Command Prompt I used the adb root
and adb shell
command. After that I opened another ADB Command Prompt and used the adb logcat
command.
In the first ADB shell, I went forward with setenforce 0
and after that vdc cryptfs enablecrypto wipe password YOUR-PASSWORD
.
IMPORTANT NOTICE: The password command might vary from the Android version what you are using. If you are using Android 5.X, you must use the hexadecimal system (In the Chr line is the symbol in your password the hexadecimal value is on the Hx line). If you are using Android 6.X, then the YOUR-PASSWORD will be the password what you entered there.
As you notice then I forgot to use the mount -oremount,rw /system
command. After that I the screen will go black. When I saw, that the ADB shell with the log stopped and finished, then I rebooted the phone. But as for everyone, the problem is, that CyanogenMod wont load. And I managed to fix it quite easily:
There you go, it should work. At first, when the phone set up comes up, then let it be for a minute. There might be a little crash for the Setup Wizard if you rush it too quickly, but it will automatically restart when it crashes.
In my very small knowledge of how the CyanogenMod and the Android Encryption works, I think during the format it deletes some important Cyanogen or Android files, what stop it from booting.
暗号化は私の電話では機能しませんでした(SGS5; CM13、TWRP 3.0.2-2) - 常に黒い画面がありました。
シェルコマンドを使用したくなかったので、別の方法を見つけました。
スーパーがインストールされていました、私はそれをアプリでアンインストールしてから SU REMOVER 。
その後、メニューから暗号化を使用することができました。
警告:
Encrypting didn't work on my phone (SGS5; CM13, TWRP 3.0.2-2) - I always got a black screen.
I didn't want to use shell commands, so I found another way :
I had SuperSU installed, I uninstalled it in the App and then flashed the SU-Remover.
After that, I was able to use the encryption from the menu.
Warning:
© 2022 cndgn.com All Rights Reserved. Q&Aハウス 全著作権所有