Can't Encrypt x86 device installed on vmware

884 views
Skip to first unread message

Alexis Lorca

unread,
Jan 15, 2020, 9:42:04 AM1/15/20
to Android-x86
Hi there,

I have just setup an Android 9 virtual device on vmware workstation. Everything looks good but I can't encrypt the device due to a battery issue.

Aparently it has 0% of charge and the encryption process demands a full charged device.

I have tried with demo mode activated, so the device shows as 100% charged, and the results are the same.

Please, I need a way to force the process on this virtual environment.

I think that between the options I could test are the following:
 1- Manually change the battery parameters to show it as a full one.
 2- Skip the battery validation. May be a command line to force it or changing the validation routine.
 3- A vmware tools that shows the current battery values from the hardware.
 4- Change the hypervisor for one that supports the battery virtualization.

Does any one here has a hint for a path to follow?

Thanks a lot for your help.

Alexis

Mauro Rossi

unread,
Jan 15, 2020, 1:10:07 PM1/15/20
to Android-x86
Hello,
I don't know if the encryption process is a VMware feature that checks on the actual virtual battery level, so it may not work here,

 
adb connect [IP address]:5555
adb root
adb connect
[IP address]:5555
adb shell dumpsys battery
set level 100

Alexis Lorca

unread,
Jan 15, 2020, 1:40:11 PM1/15/20
to Android-x86
Thanks a lot Mauro! It works great, I just start the encryption process.

Really appreciate your help.

Alexis

Alexis Lorca

unread,
Jan 15, 2020, 1:51:06 PM1/15/20
to Android-x86
Well... it didn't work. It just starts the encryption process which reset something on the vm at the beginning so the level resets to 0% and the process aborts...

Any idea?

Chih-Wei Huang

unread,
Jan 15, 2020, 9:02:43 PM1/15/20
to Android-x86
Alexis Lorca <alo...@thinkchile.com> 於 2020年1月16日 週四 上午2:51寫道:
>
> Well... it didn't work. It just starts the encryption process which reset something on the vm at the beginning so the level resets to 0% and the process aborts...

I don't think the current disk layout could support encryption.
You may need to put /data to a separate ext4 partition.
Maybe there are more preconditions.
You need to check the log.

Povilas Staniulis

unread,
Jan 16, 2020, 1:02:10 PM1/16/20
to andro...@googlegroups.com
At the very least, you need to move /data to it's own partition.

Mounting of /data is handled by the init script, I'm not sure if it will
work with an encrypted partition.

Alexis Lorca

unread,
Jan 20, 2020, 10:11:31 AM1/20/20
to Android-x86
I have review the logs and didn't find anything interesting, so actually no hint to choose where to dig.

On the other side, I find a power option on vmware to report the battery information to the guest and it works pretty well to the battery precondition to encrypt. I got the second screen and can start the process. There is a warm reboot and no the process crash without any log. No hint at all.

May be just have to wait to Android 10 and try file level encryption.

Alexis.

Michael Goffioul

unread,
Jan 20, 2020, 10:21:59 AM1/20/20
to Android-x86
In order to enable encryption, you need to let Android manage the data partition. But this is not how android-x86 works by default (the data partition is managed and mounted by the init script). To have an Android-managed data partition, the main steps are:
- modify android-x86 init script to not mount any data partition
- have a separate partition to host /data
- have your data partition defined in fstab and marked as encryptable

I don't use encryption, but I'm using an Android-managed data partition (to prevent filesystem errors on reboot) and I posted the way I'm doing it here:

Michael.


--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/7255098d-19e8-457f-a4f7-1b8c4b36257c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages