HappyZ / dpt-tools

dpt systems study and enhancement
MIT License
565 stars 130 forks source link

DPT-RP1 keeps restarting until battery die #188

Closed stliu closed 2 years ago

stliu commented 2 years ago

seeing something strange from the /proc/kmsg, any clue would be appreciated

<12>[  130.205118] c1 1650 (servicemanager) android(04-06 21:29:28): service 'nfc' died
<6>[  130.386408] c3 2595 (pps.applauncher) binder: 2595:2595 transaction failed 29189, size 56-0
<6>[  130.404287] c0 3313 (AsyncTask #1) cxd224x-i2c 1-0029: open 10,60 users=1
<6>[  130.704487] c0 3313 (AsyncTask #1) cxd224x-i2c 1-0029: cxd224x_dev_unlocked_ioctl, rst arg=0
<6>[  130.704581] c0 863 (kworker/0:2) cxd224x-i2c 1-0029: cxd224x_workqueue, xrst assert
<6>[  130.724138] c0 863 (kworker/0:2) cxd224x-i2c 1-0029: cxd224x_workqueue, xrst deassert
<3>[  133.774514] c2 3315 (AsyncTask #1) i2c: <pxa_i2c-i2c> slave_0x29 error: exhausted retries
<7>[  133.774538] c2 3315 (AsyncTask #1) i2c: msg_num: 1 msg_idx: 0 msg_ptr: 0
<7>[  133.774549] c2 3315 (AsyncTask #1) i2c: IBMR: 00000003 IDBR: 00000053 ICR: 000087e0 ISR: 00000800
<7>[  133.774555] c2 3315 (AsyncTask #1) i2c: log:
<3>[  134.785446] c0 3313 (AsyncTask #1) i2c: <pxa_i2c-i2c> slave_0x29 error: exhausted retries

and logcat shows

D/NfcNciHal(13411): HaiHalCallback: HAL_NFC_OPEN_CPLT_EVT; status=0x3
I/BrcmNfcNfa(13411): nfc_main_hal_cback event: HAL_NFC_OPEN_CPLT_EVT(0x0), status=3
I/BrcmNfcNfa(13411): nfa_dm_nfc_response_cback () NFC_ENABLE_REVT(0x5000)
E/BrcmNfcJni(13411): nfaCrashNfcService: killing the NFC process
I/NfcService(13440): Starting NFC service
I/BrcmNfcJni(13440): NFC Service: loading nci JNI
I/NfceeAccess(13440): read 1 signature(s) for NFCEE access
D/NfcService(13440): NFC is on. Doing normal stuff
I/NfcService(13440): Enabling NFC
E/NFC     ( 2595): NFC service dead - attempting to recover
E/NFC     ( 2595): android.os.DeadObjectException
E/NFC     ( 2595):  at android.os.BinderProxy.transactNative(Native Method)
E/NFC     ( 2595):  at android.os.BinderProxy.transact(Binder.java:496)
E/NFC     ( 2595):  at android.nfc.INfcAdapter$Stub$Proxy.getState(INfcAdapter.java:340)
E/NFC     ( 2595):  at android.nfc.NfcAdapter.isEnabled(NfcAdapter.java:621)
E/NFC     ( 2595):  at com.sony.apps.applauncher.presentation.receiver.NfcReceiver.updateNfcStateView(NfcReceiver.java:34)
E/NFC     ( 2595):  at com.sony.apps.applauncher.presentation.receiver.NfcReceiver.onReceive(NfcReceiver.java:22)
E/NFC     ( 2595):  at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:866)
E/NFC     ( 2595):  at android.os.Handler.handleCallback(Handler.java:739)
E/NFC     ( 2595):  at android.os.Handler.dispatchMessage(Handler.java:95)
E/NFC     ( 2595):  at android.os.Looper.loop(Looper.java:135)
E/NFC     ( 2595):  at android.app.ActivityThread.main(ActivityThread.java:5254)
E/NFC     ( 2595):  at java.lang.reflect.Method.invoke(Native Method)
E/NFC     ( 2595):  at java.lang.reflect.Method.invoke(Method.java:372)
E/NFC     ( 2595):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/NFC     ( 2595):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
D/BrcmNfcJni(13440): nfcManager_doInitialize: enter; ver=NFCDROID-AOSP_L_00.01 nfa=NFA_PI_1.03.66+ NCI_VERSION=0x10
E/NfcAdaptation(13440): NfcAdaptation::Initialize: ver=NFCDROID-AOSP_L_00.01 nfa=NFA_PI_1.03.66+
D/NfcAdaptation(13440): NfcAdaptation::NFCA_TASK: enter
I/BrcmNfcNfa(13440): NFC_TASK started.
D/NfcNciHal(13440): HaiInitializeLibrary: ver=NFCDROID-AOSP_L_00.01 nfa=NFA_PI_1.03.66+
D/NfcNciHal(13440): const CNfcParam* CNfcConfig::find(const char*) const found NFCC_ENABLE_TIMEOUT=(0x3E8)
I/NfcNciHal(13440): HAL_NfcInitialize (): NFC_HAL_TASK id=0
I/NfcNciHal(13440): NFC_HAL_TASK started
I/BrcmNfcNfa(13440): NFC_SetTraceLevel () new_level = 5
I/BrcmNfcNfa(13440): NFC_Enable ()
I/NfcNciHal(13440): NFC_HAL_TASK got NFC_HAL_TASK_EVT_INITIALIZE signal. Opening NFC transport...
D/NfcNciHal(13440): const CNfcParam* CNfcConfig::find(const char*) const found NFC_WAKE_DELAY=(0x14)
D/NfcNciHal(13440): const CNfcParam* CNfcConfig::find(const char*) const found NFC_WRITE_DELAY=(0x14)
I/NfcNciHal(13440): init state: 0->3(W4_NFCC_ENABLE)
HappyZ commented 2 years ago

It says service 'nfc' died so there must be some issue with NFC HAL. I think you could try to use adb shell am startservice and adb shell am stopservice to debug. But I have limited knowledge on HAL so I'm not sure if it will do anything.

HappyZ commented 2 years ago

Worst case is you can flash a new system image or reset to see if things get back to normal.