Android如何找到GTALKService的PID

时间:2012-03-24 17:51:41

标签: android google-talk

我正在开发一个阻止GtalkService的应用。我想只使用iptables,但我找不到GtalkSerivce。我试过了:

  1. pstop列出所有进程,但GtalkService不在那里
  2. 从Google Play安装应用,然后使用logcat -v long *:V查看日志,但我也找不到任何内容
  3. 我只是想找到正在运行的GTalkService的PID。有人能帮帮我吗?

2 个答案:

答案 0 :(得分:1)

GTalkService在名为com.google.process.gapps的流程中运行。如果您在模拟器上安装Google Apps,则可以检查此内容。

我想因为系统重启它会很难杀死它。例如,这里是DDMS日志。我已经杀了这个过程,系统重新启动了它:

03-24 19:11:27.239: D/dalvikvm(167): Calling exit(1)
03-24 19:11:27.287: D/Zygote(33): Process 167 exited cleanly (1)
03-24 19:11:27.297: I/ActivityManager(61): Process com.google.process.gapps (pid 167) has died.
03-24 19:11:27.297: W/ActivityManager(61): Scheduling restart of crashed service com.google.android.gsf/.gtalkservice.service.GTalkService in 5000ms
03-24 19:11:32.047: D/dalvikvm(262): GC_EXPLICIT freed 1060K, 57% free 2816K/6535K, external 1625K/2137K, paused 89ms
03-24 19:11:32.327: I/ActivityManager(61): Start proc com.google.process.gapps for service com.google.android.gsf/.gtalkservice.service.GTalkService: pid=419 uid=10004 gids={3003, 1015, 2001, 1007}
03-24 19:11:32.637: I/ActivityThread(419): Pub com.google.settings: com.google.android.gsf.settings.GoogleSettingsProvider
03-24 19:11:32.647: I/ActivityThread(419): Pub com.google.android.gsf.gservices: com.google.android.gsf.gservices.GservicesProvider
03-24 19:11:32.657: I/GservicesProvider(419): Gservices pushing to system: true; secure: true
03-24 19:11:32.657: I/ActivityThread(419): Pub subscribedfeeds: com.google.android.gsf.subscribedfeeds.SubscribedFeedsProvider
03-24 19:11:32.756: I/ActivityThread(419): Pub com.google.android.providers.talk: com.google.android.gsf.talk.TalkProvider
03-24 19:11:33.027: D/GTalkService(419): [RawStanzaProvidersMgr] ##### searchProvidersFromIntent
03-24 19:11:33.038: D/GTalkService(419): [RawStanzaProvidersMgr] no intent receivers found
03-24 19:11:33.117: D/GTalkService(419): ##### Network broadcast (connected=true) type=mobile, state=CONNECTED

答案 1 :(得分:1)

  

我正在开发一个阻止GtalkService的应用

这是一个非常非常糟糕的主意。

gtalk是一种基本的系统服务,如果您尝试杀死它,您将破坏设备上的许多其他应用程序。 gtalk是c2dm推送服务的基础,许多应用程序谷歌和其他依赖。