adb shell "dumpsys window | grep mCurrentFocus"            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2022-04-08 14:15:05
                            
                                2674阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            操作命令adb shell dumpsys window | grep  mCurrentFocus样例结果 mCurrentFocus=Window{b861d68 u0 com.cxyzy.glidedemo/com.cxyzy.glidedemo.MainActivity}            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-10-19 14:41:15
                            
                                547阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            操作命令adb shell dumpsys window | grep  mCurrentFocus样例结果 mCurrentFocus=Window{b861d68 u0 com.cxyzy.glidedemo/com.cxyzy.glidedemo.MainActivity}            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2022-02-27 11:20:38
                            
                                3916阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            android开发中,我们可以使用adb命令来获取当前打开应用的包名,命令如下:adb shell dumpsys window | findstr mCurrentFocus1手机连接上电脑,并且在手机上打开微信,然后再cmd命令行窗口运行以上命令:D:\>adb shell dumpsys window | findstr mCurrentFocus
  mCurrentFocus=Wi            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2023-07-02 19:48:30
                            
                                220阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            adb shell dumpsys window | findstr mCurrentFocus输出 mCurrentFocus=Window{bb3cc2c u0 com.tencent.mm/com.tencent.mm.ui.LauncherUI}调试非常的方便            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2023-03-10 00:31:08
                            
                                260阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            adb shell "dumpsys window | grep mCurrentFocus"            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-07-20 16:24:20
                            
                                1047阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            adb shell "dumpsys window | grep mCurrentFocus"            
                
         
            
            
            
            方法一:adb shell "dumpsys window | grep mCurrentFocus方法二:            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2022-06-07 16:04:49
                            
                                1709阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            查看当前界面Activity的方法:1)运行命令:adb shell dumpsys window | findstr "mCurrentFocus" mCurrentFocus=Window{227cb04 u0 com.oppo.music/com.oppo.music.MainListActivity}       从结果中可知:当前应用包名:com.oppo.music当前界面Activi            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2023-10-22 22:04:41
                            
                                151阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            读取手机验证码,这里利用appium的text识别,读取最新的短信信息,我这个测试机是红米的note71,首先获取当前短信app的Activity等信息:adb -s 89afc4e9 shell dumpsys window | findstr mCurrentFocus2,识别短信apk的信息如下:mCurrentFocus=Window{2291615 u0 com.android.mms/            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2023-06-15 09:54:07
                            
                                272阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            移动端测试获取主包名主类名adb shell “dumpsys window | grep mCurrentFocus”说明:有引号是因为这个命令再Windows的cmd窗口运行,而windo            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2023-08-03 19:17:14
                            
                                215阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            一些使用Python编写获取手机App日志的操作如何获取手机当前打开的App的包名如何获取当前App进程的PID如何查看当前App的日志如何将日志保存到文件如何关闭进程如何不显示命令行窗口1.如何获取手机当前打开的App的包名可以直接在命令行中输入adb shell dumpsys window | findstr mCurrentFocus以手机QQ为例,读取到的mCurrentFocus的信息            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2023-10-01 14:49:44
                            
                                135阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            adb shell dumpsys activity|grep mResume或者 adb shelldumpsys window windows | grep -E 'mCurrentFocus'谈起Android程序开发,就需要了解其四个主要的部件:Activity、Service、ContentProvider、 BroadcastReceiver。而其中Act            
                
         
            
            
            
            查看当前的FocusWindow:adb shell dumpsys window d | grep "mCurrentFocus"查看不同屏幕的FocusWindow:adb shell dumpsys window d | grep mFocusedWindowdump activity相关信息:adb shell dumpsys activity activitiesdump  w            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2024-09-21 22:43:14
                            
                                637阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            1. adb devices 查看设备名称 2. adb shell dumpsys window | findstr mCurrentFocus 查看包名和activity名(Linux把findstr换成grep,window是findstr) 自己理解:adb shell 是控制andorid ...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2021-08-04 18:59:00
                            
                                360阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            查看运行APP当前页面的Activity名称  adb shell "dumpsys window | grep mCurrentFocus"  结果查看栈信息  adb shell dumpsys activity  只看activity  adb shell dumpsys activity activities  app启动时间  adb shell am start -W packagen            
                
         
            
            
            
            常用的adb指令一、 adb资源指令 二、adb操作指令 三、 adb monkey指令一、adb资源指令1、获取包名和activity adb shell dumpsys window | findstr mCurrentFocus 或者 adb logcat|findstr START 或者 adb shell dumpsys activity | find “mFocusedActivity            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2024-01-03 14:22:29
                            
                                53阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            查找appPackage和appActivity(1)adb shell dumpsys window | findstr mCurrentFocus(2)启动app,cmd输入adb logcat > D:/logs.txt(开启日志),输入Ctrl+C(关闭日志),在日志查找appPackage和AppActivity,文件内搜索Displayed找到Package和Activity信息            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2023-12-31 15:35:26
                            
                                271阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            1:adb shell
       logcat -s xxxxxxx
:xxxx是要过滤日志的TAG名称
adb shell dumpsys window|findstr mCurrentFocus:查看当前焦点窗口
adb shell "logcat  -vtime | grep 'Hiannlytics'":查看log中的字段
 
2:adb help
3:mstsc :打开远程桌面连            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2024-10-21 08:06:34
                            
                                130阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            adb shell dumpsys activity|grep mResume或者 adb shelldumpsys window windows | grep -E 'mCurrentFocus'copy 自 使用adb shell dumpsys检测Android的Activity任务栈谈起Android程序开发,就需要了解其四个主要的部件:Activity、Se            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2023-08-25 12:48:52
                            
                                511阅读
                            
                                                                             
                 
                
                                
                    