Build and flash Android 4.3_r2.3 to Nexus 7 (flop) but cannot uninstall apps (keymaster firmware)

1,024 views
Skip to first unread message

Xin Zhang

unread,
Nov 20, 2013, 4:14:22 PM11/20/13
to android-...@googlegroups.com
Hi guys,

I'm pretty new to build android sources.

Recently I'm trying to build android by myself and flash it to my Nexus 7 2013 wifi model(flop). According to the instructions on the website, I checked out the source files of Android 4.3_r2.3 and get the drivers for JSS15R. The sources are compiled with the option "aosp_flo-userdebug".

I built and flash the images to the devices successfully. However, I noticed several issues:

1. After installing an app using adb, I cannot uninstall the app. Moreover, if I try to uninstall, the device will reboot.

2. The "setting" app stops when I try to connect to wifi.

Below is a part of the log I got using "adb logcat". It looks like  /vendor/firmware/keymaster/keymaster.mdt is not there. Actually the whole folder  /vendor/firmware/keymaster does not exist on the device. I'm wondering if I did something wrong, or it is just that "aosp" build lacks the firmware.

D/QSEECOMAPI: ( 4128): QSEECom_start_app sb_length = 0x2000
D/QSEECOMAPI: ( 4128): App is not loaded in QSEE
E/QSEECOMAPI: ( 4128): Error::Cannot open the file /vendor/firmware/keymaster/keymaster.mdt
E/QSEECOMAPI: ( 4128): Error::Loading image failed with ret = -1
E/QCOMKeyMaster( 4128): Loading keymaster app failied
E/keystore( 4128): could not open keymaster device in keystore (Operation not permitted)
E/keystore( 4128): keystore keymaster could not be initialized; exiting
I/ActivityManager( 2973): START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from pid 4102
D/audio_hw_primary( 2747): start_output_stream: enter: usecase(1: low-latency-playback) devices(0x2)
D/audio_hw_primary( 2747): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 2747): enable_snd_device: sending audio calibration for snd_device(2) acdb_id(14)
D/ACDB-LOADER( 2747): ACDB -> send_afe_cal
D/audio_hw_primary( 2747): enable_snd_device: snd_device(2: speaker)
D/audio_hw_primary( 2747): enable_audio_route: apply mixer path: low-latency-playback
D/audio_hw_primary( 2747): start_output_stream: exit
D/dalvikvm( 2973): GC_FOR_ALLOC freed 1403K, 25% free 13756K/18304K, paused 54ms, total 54ms
D/dalvikvm( 4102): GC_FOR_ALLOC freed 109K, 2% free 9959K/10104K, paused 21ms, total 21ms
I/ActivityManager( 2973): Displayed com.android.settings/.SubSettings: +306ms
W/ResourceType( 4102): getEntry failing because entryIndex 129 is beyond type entryCount 3
D/dalvikvm( 4102): GC_FOR_ALLOC freed 352K, 4% free 10120K/10508K, paused 22ms, total 22ms
D/AndroidRuntime( 4102): Shutting down VM
W/dalvikvm( 4102): threadid=1: thread exiting with uncaught exception (group=0x418d9700)
E/AndroidRuntime( 4102): FATAL EXCEPTION: main
E/AndroidRuntime( 4102): java.lang.NullPointerException
E/AndroidRuntime( 4102): at android.security.KeyStore.saw(KeyStore.java:134)
E/AndroidRuntime( 4102): at com.android.settings.wifi.WifiConfigController.loadCertificates(WifiConfigController.java:822)
E/AndroidRuntime( 4102): at com.android.settings.wifi.WifiConfigController.showSecurityFields(WifiConfigController.java:588)
E/AndroidRuntime( 4102): at com.android.settings.wifi.WifiConfigController.<init>(WifiConfigController.java:247)
E/AndroidRuntime( 4102): at com.android.settings.wifi.WifiDialog.onCreate(WifiDialog.java:57)
E/AndroidRuntime( 4102): at android.app.Dialog.dispatchOnCreate(Dialog.java:355)
E/AndroidRuntime( 4102): at android.app.Dialog.show(Dialog.java:260)
E/AndroidRuntime( 4102): at android.app.DialogFragment.onStart(DialogFragment.java:490)
E/AndroidRuntime( 4102): at com.android.settings.SettingsPreferenceFragment$SettingsDialogFragment.onStart(SettingsPreferenceFragment.java:228)
E/AndroidRuntime( 4102): at android.app.Fragment.performStart(Fragment.java:1719)
E/AndroidRuntime( 4102): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:913)
E/AndroidRuntime( 4102): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1057)
E/AndroidRuntime( 4102): at android.app.BackStackRecord.run(BackStackRecord.java:682)
E/AndroidRuntime( 4102): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1435)
E/AndroidRuntime( 4102): at android.app.FragmentManagerImpl$1.run(FragmentManager.java:441)
E/AndroidRuntime( 4102): at android.os.Handler.handleCallback(Handler.java:730)
E/AndroidRuntime( 4102): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 4102): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 4102): at android.app.ActivityThread.main(ActivityThread.java:5103)
E/AndroidRuntime( 4102): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4102): at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime( 4102): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E/AndroidRuntime( 4102): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 4102): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 2973):   Force finishing activity com.android.settings/.SubSettings

Thanks,
Xin

Xin Zhang

unread,
Nov 20, 2013, 8:35:07 PM11/20/13
to android-...@googlegroups.com
OK. I solved the problem by myself.

Basically firmware keymaster is not included in the drivers. I extracted the that firmware from the factory image and packed it into my image. Then all the problems went away.

I'm wondering if it is that firmware is not included originally.
Reply all
Reply to author
Forward
0 new messages