Android data partition encryption.

Showing 1-4 of 4 messages
Android data partition encryption. mit...@codeaurora.org 4/30/12 4:34 PM
Hi,

We are trying to port Google's encryption feature on our devices. But
I
have few questions regarding that.

Right now with encryption Google added concept of 3 different classes
of
services- Core, main and late-start. With encryption feature, when
user
starts encryption then Android vold service kills all the services
which
are in main and late-start and re-starts all the services in main
class.

But this kill is a hard kill, i.e. it doesn't indicate phone or
running
processes that they are about to get killed (unlike the Shutdown case
when
framework indicates all service its intent to shutdown).

Due to this some of the services can go in really bad state as they
can
get killed when they are doing some important work(like some
transaction
to IO device).

These services may not be important enough to be running as core, or
they
can't be part of core services(as they may be using data partition
when
they are running).

So my question is do we have any mechanism in Android to indicate all
services that, device is about to start encryption and these services
are
about to get killed? If not, does Google has any plan to add such
mechanism before starting encryption in upcoming Android releases?

Thanks!
--Shashank

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum.
Re: Android data partition encryption. Paul 5/2/12 12:05 AM

Due to this some of the services can go in really bad state as they
can
get killed when they are doing some important work(like some
transaction
to IO device).

What's a concrete example?  What writeable, persistent IO devices do you have prior to decryption?
 
Re: Android data partition encryption. mit...@codeaurora.org 5/10/12 1:50 PM
Why we have clean shutdown way when user press power key? why can't we just un-mount all rw partition and just kill all service? why do we have mechanism to broadcast system wide that device is shutting down? For same reason i feel there should be a mechanism to inform services that devices is going to kill all main and late start services.

An example is like most of the current implementations modem is running on different core. To reset apps services on that are interacting with modem, its would be better and cleaner to inform modem about any such reset. So that if there is any pending transaction then modem/apps can finish cleanly.
Re: Android data partition encryption. Dianne Hackborn 5/11/12 12:15 AM
On Thu, May 10, 2012 at 1:50 PM, mit...@codeaurora.org <mit...@codeaurora.org> wrote:
Why we have clean shutdown way when user press power key? why can't we just un-mount all rw partition and just kill all service? why do we have mechanism to broadcast system wide that device is shutting down? For same reason i feel there should be a mechanism to inform services that devices is going to kill all main and late start services.

Because there are the full host of application processes and system services running, often doing things like keeping state in RAM that the only flush occasionally to avoid excessive battery use (such as the network stats and battery stats itself).

--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.