修改开机关机动画制作rle文件 打zip包

利用Linux的convert命令将11.jpg转化为11.raw:
convert -depth 8 11.jpg rgb:11.raw

将11.raw文件转换为initlogo.rle。在raw图片文件所在目录下执行:/home/libin/workspace/android-2.2r1.1/out/host/linux-x86/bin/rgb2565 -rle <11.raw> initlogo.rle

zip -r -0 bootanimation.zip .

如何编译frame
[url]http://topic.csdn.net/u/20100417/13/17f70544-6674-42e2-9314-5c822ce838e3.html[/url]


定制Android关机界面:
[url]http://yueguc.iteye.com/blog/762273[/url]

/policies/base/phone/com/android/internal/policy/impl/GlobalActions.java


关机代码:
位置:frameworks/base/awt/org/apache/harmony/awt/wtk/ShutdownThread.java/ShutdownActivity.java
private static void beginShutdownSequence(Context context) {
synchronized (sIsStartedGuard) {
sIsStarted = true;
}

// throw up an indeterminate system dialog to indicate radio is
// shutting down.
ProgressDialog pd = new ProgressDialog(context);
pd.setTitle(context.getText(com.android.internal.R.string.power_off));
pd.setMessage(context.getText(com.android.internal.R.string.shutdown_progress));
pd.setIndeterminate(true);
pd.setCancelable(false);
pd.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
if (!context.getResources().getBoolean(
com.android.internal.R.bool.config_sf_slowBlur)) {
pd.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
}

pd.show();

// start the thread that initiates shutdown
sInstance.mContext = context;
sInstance.mPowerManager = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
sInstance.mWakeLock = null;
if (sInstance.mPowerManager.isScreenOn()) {
try {
sInstance.mWakeLock = sInstance.mPowerManager.newWakeLock(
PowerManager.FULL_WAKE_LOCK, "Shutdown");
sInstance.mWakeLock.acquire();
} catch (SecurityException e) {
Log.w(TAG, "No permission to acquire wake lock", e);
sInstance.mWakeLock = null;
}
}
sInstance.mHandler = new Handler() {
};
sInstance.start();
}


编译framework:
1、修改代码
2、make framework(后来发现出问题了,编译没效果)后改用这个:
mm frameworks/base/core/res/res; make android.policy; make framework; make snod; cp out/target/product/generic/system.img ../../program/android/android-sdk-linux_x86/platforms/android-8/images/
或者:libin@libin-desktop:~/workspace/android-2.2r1.1/frameworks/policies/base/phone$ mm
3、make snod
4、将out/target/product/generic/system.img这个文件复制到SDK中的platforms/android-8/images/这个目录下:
cp out/target/product/generic/system.img /home/libin/program/android/android-sdk-linux_x86/platforms/android-8/images/


附:
有时候按上述步骤操作后,会出现模拟器不能启动的现象。即一直重复播放开机动画(没有开机动画的就是一直显示闪烁的android字符)。
解决:一般重新make即可。

从svn上检出代码后,代码所在文件夹上有一个小锁,那是因为检代码时的权限不对(??),用sudo chmod 777 -R nvdroid命令即可更改文件夹权限为所有用户。


make 出错后排查:
删掉android/out/target/common/obj/JAVA_LIBRARIES/frameworkintermediates

你可能感兴趣的:(MyWork)