六、 手机down bin档前没有format data image
七、[debug手段]:
总结打trace的方式,这样可以定位出当前这个提示是哪个地方的原因(适用于L1版本)。
首先,@PackageManagerService.java:
1.打开DEBUG_DEXOPT的开关
2.performBootDexOpt()添加trace(“//mtk”标记
public void performBootDexOpt() {
enforceSystemOrRoot("Only the system can request dexopt be performed");
// Before everything else, see whether we need to fstrim.
try {
IMountService ms = PackageHelper.getMountService();
if (ms != null) {
final boolean isUpgrade = isUpgrade();
Slog.d(TAG + "_Debug","isUpgrade = " + isUpgrade);//mtk
boolean doTrim = isUpgrade;
......
if (doTrim) {
if (!isFirstBoot()) {
try {
Slog.d(TAG + "_Debug","showBootMessage called1...");//mtk
ActivityManagerNative.getDefault().showBootMessage(
mContext.getResources().getString(
R.string.android_upgrading_fstrim), true);
} catch (RemoteException e) {
}
}
ms.runMaintenance();
}
} else {
Slog.e(TAG, "Mount service unavailable!");
}
} catch (RemoteException e) {
// Can't happen; MountService is local
}
final ArraySetpkgs;
3. performBootDexOpt(PackageParser.Package pkg, int curr, int total) 添加trace(“//mtk”标记
private void performBootDexOpt(PackageParser.Package pkg, int curr, int total) {
if (DEBUG_DEXOPT) {
Log.i(TAG, "Optimizing app " + curr + " of " + total + ": " + pkg.packageName);
}
if (!isFirstBoot()) {
try {
Slog.d(TAG + "_Debug","showBootMessage called2...");//mtk
ActivityManagerNative.getDefault().showBootMessage(
mContext.getResources().getString(R.string.android_upgrading_apk,
curr, total), true);
} catch (RemoteException e) {
}
}
其次,SystemServer.java中startOtherServices()添加如下trace(“//mtk”标记
try {
mPackageManagerService.performBootDexOpt();
} catch (Throwable e) {
reportWtf("performing boot dexopt", e);
}
try {
Slog.d("PackageManager" + "_Debug","showBootMessage called3...");//mtk
ActivityManagerNative.getDefault().showBootMessage(
context.getResources().getText(
com.android.internal.R.string.android_upgrading_starting_apps),
false);
} catch (RemoteException e) {
}
再次,WindowManagerService.java中打开
DEBUG_BOOT debug 开关
以上,总共是6个地方的改动。