USER_BOOTANIMATION_FILE is "/data/local/bootanimation.zip" but user can't write there?

304 views
Skip to first unread message

Android Newbie

unread,
Mar 10, 2014, 3:29:58 PM3/10/14
to android...@googlegroups.com
I want my used to be able to override the default boot animation.
based on the code in BootAnimation.cpp: (Android 4.1.2 if it matters)

#define USER_BOOTANIMATION_FILE "/data/local/bootanimation.zip"
#define SYSTEM_BOOTANIMATION_FILE "/system/media/bootanimation.zip"


I would expect the user to place their file in /data/local but it doesn't appear to be reachable/writable by a regular user. (I checked on a Galaxy Nexus running 4.1.2 also and it behaves the same)
Am I misunderstand the meaning of "USER" in the #define name?

What is the "proper" way to make this accessible to my end users? redefine it to something like:
#define USER_BOOTANIMATION_FILE "/data/media/BootAnimation/bootanimation.zip"

is there a "standard" place where the boot animation should be?

Andrei

unread,
Mar 24, 2014, 6:21:48 PM3/24/14
to android...@googlegroups.com
You've probably found the answer already, but this post seems to do what you're asking about:

shridutt kothari

unread,
Apr 2, 2014, 5:35:50 AM4/2/14
to android...@googlegroups.com
HI Android Newbie,

At run-time end user i.e third party applications can't access /data/local/ without root access, so logically end users cant change the boot-animation.

And in BootAnimation.cpp, 
                 #define USER_BOOTANIMATION_FILE "/data/local/bootanimation.zip" is useful if any system app wants to change bootanimation as System app can have right to access /data/local/.
                 #define SYSTEM_BOOTANIMATION_FILE "/system/media/bootanimation.zip" is useful if you want booanimation to be used as default, as at run-time in nobody can change content of system partition.

To understand the concept behind this, You should understand which partitions are available to whom (user, system...) and in which mode (read, write...) and when(Android runtime, recovery..).
 
I hope it helps you.

Thanks,
Shridutt Kothari,
Impetus Infotech India Ltd
Reply all
Reply to author
Forward
0 new messages