android boot animation path

http://androidxref.com/7.1.1_r6/xref/frameworks/base/cmds/bootanimation/BootAnimation.cpp#SYSTEM_ENCRYPTED_BOOTANIMATION_FILE

65static const char OEM_BOOTANIMATION_FILE[] = "/oem/media/bootanimation.zip";
66static const char SYSTEM_BOOTANIMATION_FILE[] = "/system/media/bootanimation.zip";
67static const char SYSTEM_ENCRYPTED_BOOTANIMATION_FILE[] = "/system/media/bootanimation-encrypted.zip";

 

309    if (encryptedAnimation && (access(SYSTEM_ENCRYPTED_BOOTANIMATION_FILE, R_OK) == 0)) {
310        mZipFileName = SYSTEM_ENCRYPTED_BOOTANIMATION_FILE;
311    }
312    else if (access(OEM_BOOTANIMATION_FILE, R_OK) == 0) {
313        mZipFileName = OEM_BOOTANIMATION_FILE;
314    }
315    else if (access(SYSTEM_BOOTANIMATION_FILE, R_OK) == 0) {
316        mZipFileName = SYSTEM_BOOTANIMATION_FILE;
317    }

android frp path

remove ro.frp.pst in /system/build.prop is the easiest method

ro.frp.pst=/dev/block/bootdevice/by-name/config

 

/dev/block/bootdevice/by-name/config

dd this path can remove FRP

dd if=/dev/null of=/dev/block/bootdevice/by-name/config

dd if=/dev/null of=/dev/block/mmcblk0p43

 

if share system uid and not signed with platform key

then you will get log below

03-20 11:04:47.263  1318  1406 W PackageManager: Package com.tinklabs.activateapp shared user changed from <nothing> to android.uid.system; replacing with new
03-20 11:04:47.269  1318  1406 W PackageManager: Failed to parse /system/priv-app/com.tinklabs.activateapp: Signature mismatch for shared user : SharedUserSetting{8c8c35d android.uid.system/1000}
03-20 11:04:48.759  1318  1318 W PackageManager: System package com.tinklabs.activateapp no longer exists; wiping its data
03-20 11:04:48.790  1318  1318 W PackageManager: Removing dangling permission: com.tinklabs.activateapp.permission.C2D_MESSAGE from package com.tinklabs.activateapp
03-20 11:04:50.734  1318  1318 I BackupManagerService: Package com.tinklabs.activateapp not installed; dropping from full backup
03-20 11:04:50.849  1318  1318 I AppOps  : Pruning old package com.tinklabs.activateapp/com.android.server.AppOpsService$UidState@529f3f0: new uid=-1

 

http://androidxref.com/7.1.1_r6/xref/frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java#8330

8325                    if (pkgSetting.sharedUser != null) {
8326                        if (compareSignatures(pkgSetting.sharedUser.signatures.mSignatures,
8327                                              pkg.mSignatures) != PackageManager.SIGNATURE_MATCH) {
8328                            throw new PackageManagerException(
8329                                    INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES,
8330                                            "Signature mismatch for shared user: "
8331                                            + pkgSetting.sharedUser);
8332                        }
8333                    }

 

the mSignatures seems differ from time to time
http://androidxref.com/7.1.1_r6/xref/frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java#8326

the param never the same for the same device from every boot

Xposed : PackageManagerService.compareSignatures('[Landroid.content.pm.Signature;@33ce954','[Landroid.content.pm.Signature;@78bed59') before

How com.android.phone run in radio UID

http://androidxref.com/7.0.0_r1/xref/frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java#2236

If your phone app signed with the same key as /system/framework/framework-res.apk and setting share uid in AndroidManifest.xml, then your phone app will run at radio uid

mSettings.addSharedUserLPw("android.uid.system", Process.SYSTEM_UID,
ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED);

 

 

AndroidManifest.xml as below

&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.providers.telephony"
coreApp="true"
android:sharedUserId="android.uid.phone"&gt;

Android change input method

below list how to change input method

adb shell, no root

# list ime
$ ime list -a -s
com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService
com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
com.google.android.apps.inputmethod.cantonese/.CantoneseInputMethodService
com.google.android.apps.inputmethod.zhuyin/.ZhuyinInputMethodService
com.google.android.inputmethod.pinyin/.PinyinIME

# change by settings
$ settings put secure default_input_method com.google.android.apps.inputmethod.zhuyin/.ZhuyinInputMethodService

# change by ime
$ ime enable com.google.android.apps.inputmethod.zhuyin/.ZhuyinInputMethodService
$ ime set com.google.android.apps.inputmethod.zhuyin/.ZhuyinInputMethodService

http://stackoverflow.com/a/37958797/1117177

Android API https://developer.android.com/reference/android/provider/Settings.Secure.html

Settings.Secure.putString(resolver, Settings.Secure.ENABLED_INPUT_METHODS, "com.package.to.keyboard/.full.path");
Settings.Secure.putString(resolver, Settings.Secure.DEFAULT_INPUT_METHOD, "com.package.to.keyboard/.full.path");