Writing a file into system partition

59 views
Skip to first unread message

Anirudh Kashyap

unread,
Jun 12, 2012, 1:17:05 AM6/12/12
to android-...@googlegroups.com
Hello guys,

I have a requirement to write a file into the system partition so that I can maintain a value in the file, which will remain over factory reset. 

Any inputs on how this can be done?. Or is there any other way to retain a value over a factory reset.?.

Regards,
Anirudh

Dianne Hackborn

unread,
Jun 12, 2012, 2:54:52 AM6/12/12
to android-...@googlegroups.com
You can't, the system partition is read-only during normal execution.  It is only modified when running the recovery system to install a system update.

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/znwYL9QBXtEJ.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.



--
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.

huseyin

unread,
Jun 12, 2012, 3:17:24 AM6/12/12
to Anirudh Kashyap, android-...@googlegroups.com

Hi,

I don't know your device and its android version and BSP that you are
working on it.

if you can built android and fully flash the device. You can do this by
defining private partition over disk config. You can securely manage the
partition such as read, write whenever you want

Anirudh Kashyap

unread,
Jun 12, 2012, 3:27:12 AM6/12/12
to android-...@googlegroups.com, Anirudh Kashyap
Hi Huseyin,

Thanks a lot for that. 

Yes I can build android and flash the whole device. I am working on ICS. 

Can you guide me as where I have look into to achieve what you have suggested?.


On Tuesday, 12 June 2012 12:47:24 UTC+5:30, huseyin.bashan wrote:

Hi,

I don't know your device and its android version and BSP  that you are
working on it.

if you can built android and fully flash the device. You can do this by
defining private partition over disk config. You can securely manage the
partition such as  read, write   whenever you want

On 06/12/2012 08:17 AM, Anirudh Kashyap wrote:
> Hello guys,
>
> I have a requirement to write a file into the system partition so that
> I can maintain a value in the file, which will remain over factory reset.
>
> Any inputs on how this can be done?. Or is there any other way to
> retain a value over a factory reset.?.
>
> Regards,
> Anirudh
> --
> You received this message because you are subscribed to the Google
> Groups "android-platform" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-platform/-/znwYL9QBXtEJ.
> To post to this group, send email to android-platform@googlegroups.com.
> To unsubscribe from this group, send email to
> For more options, visit this group at
> http://groups.google.com/group/android-platform?hl=en.


On Tuesday, 12 June 2012 12:47:24 UTC+5:30, huseyin.bashan wrote:

Hi,

I don't know your device and its android version and BSP  that you are
working on it.

if you can built android and fully flash the device. You can do this by
defining private partition over disk config. You can securely manage the
partition such as  read, write   whenever you want

On 06/12/2012 08:17 AM, Anirudh Kashyap wrote:
> Hello guys,
>
> I have a requirement to write a file into the system partition so that
> I can maintain a value in the file, which will remain over factory reset.
>
> Any inputs on how this can be done?. Or is there any other way to
> retain a value over a factory reset.?.
>
> Regards,
> Anirudh
> --
> You received this message because you are subscribed to the Google
> Groups "android-platform" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-platform/-/znwYL9QBXtEJ.
> To post to this group, send email to android-platform@googlegroups.com.
> To unsubscribe from this group, send email to
> android-platform+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/android-platform?hl=en.


On Tuesday, 12 June 2012 12:47:24 UTC+5:30, huseyin.bashan wrote:

Hi,

I don't know your device and its android version and BSP  that you are
working on it.

if you can built android and fully flash the device. You can do this by
defining private partition over disk config. You can securely manage the
partition such as  read, write   whenever you want

On 06/12/2012 08:17 AM, Anirudh Kashyap wrote:
> Hello guys,
>
> I have a requirement to write a file into the system partition so that
> I can maintain a value in the file, which will remain over factory reset.
>
> Any inputs on how this can be done?. Or is there any other way to
> retain a value over a factory reset.?.
>
> Regards,
> Anirudh
> --
> You received this message because you are subscribed to the Google
> Groups "android-platform" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-platform/-/znwYL9QBXtEJ.
> To post to this group, send email to android-platform@googlegroups.com.
> To unsubscribe from this group, send email to
> android-platform+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/android-platform?hl=en.


On Tuesday, 12 June 2012 12:47:24 UTC+5:30, huseyin.bashan wrote:

Hi,

I don't know your device and its android version and BSP  that you are
working on it.

if you can built android and fully flash the device. You can do this by
defining private partition over disk config. You can securely manage the
partition such as  read, write   whenever you want

On 06/12/2012 08:17 AM, Anirudh Kashyap wrote:
> Hello guys,
>
> I have a requirement to write a file into the system partition so that
> I can maintain a value in the file, which will remain over factory reset.
>
> Any inputs on how this can be done?. Or is there any other way to
> retain a value over a factory reset.?.
>
> Regards,
> Anirudh
> --
> You received this message because you are subscribed to the Google
> Groups "android-platform" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-platform/-/znwYL9QBXtEJ.
> To post to this group, send email to android-platform@googlegroups.com.
> To unsubscribe from this group, send email to
> android-platform+unsubscribe@googlegroups.com.

huseyin

unread,
Jun 12, 2012, 3:49:29 AM6/12/12
to android-...@googlegroups.com, Anirudh Kashyap
Hi,

Firstly,

 You need to know ,if your devices is already deployed to a field as a product  and being controlled  their update over OTA . you cannot  add a new partition over OTA using regular android stack.

1. Search disk config table in your BSP and in your boot loader. You supplies the config to your flasher or loader. You need to find them

2. Add your partition as ext4 same as another partition in to the config. Free partition will be created when you flash the device with this config.

3. Write you own code and service etc  that can mount the partition into  the data partition  and unmount  in the run time. Also, you can use the android encryption api for the partition security    
To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/aLvj8AuFQpYJ.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages