Android编程之ActivityManager: Segmentation fault

解决Android应用无法更新的问题
在遇到Android应用因浏览器开启而导致无法更新的情况时,通过关闭浏览器解决了问题。文章深入探讨了这一现象的原因,并提供了解决方案。

今天运行代码时,出现了一个不能运行的故障问题:ActivityManager: Segmentation fault

 

是的,这个原因网上有诸多解释:包名不能是中文或者非法字符,或者重启新的avd来解决,或者删了重新装一下。

 

最后一个删了重新装确实能解决问题,但它并非原因所在。

 

 

真正的原因是,我开启了它所引用的浏览器,所以导致其无法更新。关了浏览器就可以正常运行安装了。

 

 

这里猜测一下:应该是当前应用程序的引用传递给了其他程序,而其他程序不释放的情况下,就无法删除当前应用程序。那么解决办法上面提到了,就不啰嗦了。

01-01 13:29:22.158573 4222 5312 D SystemUi--Aod: AodSensorManager-->system BrightnessLevel= 3171 01-01 13:29:22.158813 4222 4388 D SystemUi--QuickSettings: CentralSurfaces.BrightnessController-->mUpdateSliderRunnable multi bits setBrightness: 3165 01-01 13:29:22.161928 24923 24923 W dumpsys : Thread Pool max thread count is 0. Cannot cache binder as linkToDeath cannot be implemented. serviceName: meminfo 01-01 13:29:22.163794 1923 4484 D ActivityManager: freezer override set to true 01-01 13:29:22.164037 1923 4484 D ActivityManager: Cancel freezing 16967 com.coloros.alarmclock 01-01 13:29:22.164124 1923 4484 D ActivityManager: pid 16967 com.coloros.alarmclock received async transactions while frozen 01-01 13:29:22.164756 1923 4484 D ActivityManager: sync unfroze 16967 com.coloros.alarmclock for 19 01-01 13:29:22.164849 1923 4484 D ActivityManager: Cancel freezing 23305 com.google.android.gms.unstable 01-01 13:29:22.164895 1923 4484 D ActivityManager: pid 23305 com.google.android.gms.unstable received async transactions while frozen 01-01 13:29:22.165170 1923 4484 D ActivityManager: sync unfroze 23305 com.google.android.gms.unstable for 19 01-01 13:29:22.165215 1923 4484 D ActivityManager: Cancel freezing 22770 com.google.android.cellbroadcastreceiver 01-01 13:29:22.165331 1923 4484 D ActivityManager: pid 22770 com.google.android.cellbroadcastreceiver received async transactions while frozen 01-01 13:29:22.165547 1923 4484 D ActivityManager: sync unfroze 22770 com.google.android.cellbroadcastreceiver for 19 01-01 13:29:22.165604 1923 4484 D ActivityManager: Cancel freezing 23657 com.android.externalstorage 01-01 13:29:22.165648 1923 4484 D ActivityManager: pid 23657 com.android.externalstorage received async transactions while frozen 01-01 13:29:22.165832 1923 4484 D ActivityManager: sync unfroze 23657 com.android.externalstorage for 19 01-01 13:29:22.165874 1923 4484 D ActivityManager: Cancel freezing 23761 com.android.providers.downloads 01-01 13:29:22.165906 1923 4484 D ActivityManager: pid 23761 com.android.providers.downloads received async transactions while frozen 01-01 13:29:22.166086 1923 4484 D ActivityManager: sync unfroze 23761 com.android.providers.downloads for 19 01-01 13:29:22.166121 1923 4484 D ActivityManager: Cancel freezing 22638 com.heytap.mcs.appservice 01-01 13:29:22.166153 1923 4484 D ActivityManager: pid 22638 com.heytap.mcs.appservice received async transactions while frozen 01-01 13:29:22.166300 1923 4484 D ActivityManager: sync unfroze 22638 com.heytap.mcs.appservice for 19 01-01 13:29:22.166328 1923 4484 D ActivityManager: Cancel freezing 23892 com.android.vending:instant_app_installer 01-01 13:29:22.166357 1923 4484 D ActivityManager: pid 23892 com.android.vending:instant_app_installer received async transactions while frozen 01-01 13:29:22.166568 1923 4484 D ActivityManager: sync unfroze 23892 com.android.vending:instant_app_installer for 19 01-01 13:29:22.166594 1923 4484 D ActivityManager: Cancel freezing 23976 com.daemon.shelper 01-01 13:29:22.166629 1923 4484 D ActivityManager: pid 23976 com.daemon.shelper received async transactions while frozen 01-01 13:29:22.166930 1923 4484 D ActivityManager: sync unfroze 23976 com.daemon.shelper for 19 01-01 13:29:22.166961 1923 4484 D ActivityManager: Cancel freezing 17812 com.google.android.apps.wellbeing 01-01 13:29:22.167005 1923 4484 D ActivityManager: pid 17812 com.google.android.apps.wellbeing received async transactions while frozen 01-01 13:29:22.167294 1923 4484 D ActivityManager: sync unfroze 17812 com.google.android.apps.wellbeing for 19 01-01 13:29:22.167326 1923 4484 D ActivityManager: Cancel freezing 22692 com.heytap.cloud 01-01 13:29:22.167360 1923 4484 D ActivityManager: pid 22692 com.heytap.cloud received async transactions while frozen 01-01 13:29:22.167631 1923 4484 D ActivityManager: sync unfroze 22692 com.heytap.cloud for 19 01-01 13:29:22.167671 1923 4484 D ActivityManager: Cancel freezing 24290 com.coloros.lockassistant 01-01 13:29:22.167714 1923 4484 D ActivityManager: pid 24290 com.coloros.lockassistant received async transactions while frozen 01-01 13:29:22.167969 1923 4484 D ActivityManager: sync unfroze 24290 com.coloros.lockassistant for 19 01-01 13:29:22.168000 1923 4484 D ActivityManager: Cancel freezing 24302 com.oplus.engineermode 01-01 13:29:22.168033 1923 4484 D ActivityManager: pid 24302 com.oplus.engineermode received async transactions while frozen 01-01 13:29:22.168212 1923 4484 D ActivityManager: sync unfroze 24302 com.oplus.engineermode for 19 01-01 13:29:22.168242 1923 4484 D ActivityManager: Cancel freezing 24237 com.android.incallui 01-01 13:29:22.168277 1923 4484 D ActivityManager: pid 24237 com.android.incallui received async transactions while frozen 01-01 13:29:22.168484 1923 4484 D ActivityManager: sync unfroze 24237 com.android.incallui for 19 01-01 13:29:22.168623 1923 4484 D ActivityManager: freezer override callers: 24923/0 com.android.server.am.ActivityManagerService$MemBinder.dump:2360 android.os.Binder.doDump:1085 android.os.Binder.dump:1075 android.os.Binder.onTransact:945 android.os.Binder.execTransactInternal:1444 01-01 13:29:22.170682 24237 24245 W LOG_FLOWCTRL: ==LOGS OVER PROC QUOTA(10000), rows(10) bytes(679) com.android.incallui u(1000) l(300) t(150000) c(0) DROPPED== 01-01 13:29:22.170682 24237 24245 W OPLUS_LOG_LOAD: ==LOGS PROG INFO, prog(com.android.incallui) == 01-01 13:29:22.170682 24237 24245 I Channel.Client[1000028].incallui.ChannelClientLogUtil: (binder:24237_1)onChange: debuggable = true 01-01 13:29:22.173642 1161 1297 I light_iface: get_brightness ret = 1, data = 1428 01-01 13:29:22.174096 1923 2279 D ActivityManager: reportOneUidFrozenStateChanged uid 10322 frozen = false 这段日志打印能看出什么
最新发布
11-06
行 5410: 10-28 01:07:28.174171 1671 1759 I ActivityManager: Start proc 8429:com.oplus.persist.multimedia/1000 for restart com.oplus.persist.multimedia 行 5411: 10-28 01:07:28.174845 1671 1759 W ActivityManager: Slow operation: 7451ms so far, now at startProcess: starting to update pids map 行 5412: 10-28 01:07:28.184176 1671 1759 W ActivityManager: Slow operation: 7460ms so far, now at startProcess: done updating pids map 行 5488: 10-28 01:07:33.816895 1671 3310 W ActivityManager: Slow operation: 861ms so far, now at attachApplicationLocked: before bindApplication 行 5489: 10-28 01:07:33.957125 1671 3310 W ActivityManager: Slow operation: 1002ms so far, now at attachApplicationLocked: immediately before bindApplication 行 5492: 10-28 01:07:34.222531 1671 3310 W ActivityManager: Slow operation: 1268ms so far, now at attachApplicationLocked: immediately after bindApplication 行 5493: 10-28 01:07:34.267864 1671 3310 W ActivityManager: Slow operation: 1315ms so far, now at attachApplicationLocked: after updateLruProcessLocked 行 5498: 10-28 01:07:34.639124 1671 3310 W ActivityManager: Slow operation: 1684ms so far, now at attachApplicationLocked: after updateOomAdjLocked 行 5499: 10-28 01:07:34.727192 1671 1782 W ActivityManager: pid 1671 system sent binder code 1013 with flags 0 to frozen apps and got error -2 行 5503: 10-28 01:07:35.218549 1671 3310 W ActivityManager: Slow operation: 525ms so far, now at finishAttachApplicationInner: after dispatching broadcasts 行 5509: 10-28 01:07:35.925950 1671 3321 W ActivityManager: Slow operation: 149ms so far, now at attachApplicationLocked: before bindApplication 行 5510: 10-28 01:07:36.083007 1671 3321 W ActivityManager: Slow operation: 308ms so far, now at attachApplicationLocked: immediately before bindApplication 行 5518: 10-28 01:07:36.906760 1671 3321 W ActivityManager: Slow operation: 1132ms so far, now at attachApplicationLocked: immediately after bindApplication 行 5519: 10-28 01:07:36.933257 1671 3321 W ActivityManager: Slow operation: 1153ms so far, now at attachApplicationLocked: after updateLruProcessLocked 行 5520: 10-28 01:07:37.063301 1671 3321 W ActivityManager: Slow operation: 1289ms so far, now at attachApplicationLocked: after updateOomAdjLocked 行 5521: 10-28 01:07:37.151290 1671 3321 W ActivityManager: Slow operation: 65ms so far, now at finishAttachApplicationInner: after updateOomAdjLocked 行 5649: 10-28 01:07:52.430314 1671 1671 V ActivityManager: Has totaly same connectionRecord, just reuse it! 行 5665: 10-28 01:07:53.816368 1671 3310 I ActivityManager: Flag disabled. Ignoring finishAttachApplication from uid: 1000. pid: 8429 行 5668: 10-28 01:07:54.278782 1671 1671 V ActivityManager: Has totaly same connectionRecord, just reuse it! 行 5674: 10-28 01:07:55.753697 1671 1671 V ActivityManager: Has totaly same connectionRecord, just reuse it! 行 5677: 10-28 01:07:59.068096 1671 1687 V ActivityManager: Has totaly same connectionRecord, just reuse it! 行 5691: 10-28 01:08:01.676895 1671 5628 V ActivityManager: Has totaly same connectionRecord, just reuse it! 行 5743: 10-28 01:08:12.099764 1671 1758 W ActivityManager: Timeout executing service: ServiceRecord{66f48fb u0 com.oplus.audio.effectcenter/.service.AudioxService c:com.oplus.audio.effectcenter} 行 5747: 10-28 01:08:13.097544 1671 8596 D ActivityManager: created ANR temporary file:/data/anr/temp_anr_7707674626263381505.txt 行 5748: 10-28 01:08:13.101164 1671 8596 I ActivityManager: Collecting stacks for pid 8429 into temporary file temp_anr_7707674626263381505.txt 行 5754: 10-28 01:08:13.843308 1671 8597 I ActivityManager: dumpStackTraces pids=null 行 5755: 10-28 01:08:14.187037 1671 8597 I ActivityManager: Dumping to /data/anr/anr_8429_2025-10-28-01-08-13-847 行 5780: 10-28 01:08:23.775358 1671 8596 E ActivityManager: Aborted stack trace dump (current primary pid=8429); deadline exceeded. 行 5806: 10-28 01:08:26.194795 1671 8597 I ActivityManager: dumpStackTraces nativepids=null 行 5810: 10-28 01:08:26.210992 1671 8597 I ActivityManager: dumpStackTraces extraPids=null 行 5811: 10-28 01:08:26.232882 1671 8597 I ActivityManager: Done dumping 行 5817: 10-28 01:08:28.550083 1671 1753 W ActivityManager: SLOW OOM ADJ: 1116ms for pid 2457 = 500 行 5880: 10-28 01:08:45.342368 1671 8597 E ActivityManager: ANR in com.oplus.persist.multimedia 这个anr分析一下
11-06
01-01 08:01:49.416 1555 1753 W ProcessCpuTracker: Failed to stat(/proc/3533): android.system.ErrnoException: stat failed: ENOENT (No such file or directory) 01-01 08:01:49.416 1555 1753 W ProcessCpuTracker: Skipping unknown process pid 3533 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 857 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 426 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 3105 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 902 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 3529 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 397 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 1555 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 309 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 1055 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 1081 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 60 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 82 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 304 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 314 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 514 01-01 08:01:49.649 1555 1753 I ActivityManager: Skipping next CPU consuming process, not a java proc: 1104 01-01 08:01:49.650 155
10-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值