Giter VIP home page Giter VIP logo

spockadb's People

Contributors

actions-user avatar codacy-badger avatar nstd avatar wahdanz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

spockadb's Issues

If two instances of AS are open, the plugin does not work properly

Test:

Open an instance of AS with an app with package com.example.app.myAppA, then open another instance with an app with package com.example.app.myAppB.

Since there are now two instances running, if we use an option like Clear Data (also happens in other actions) in the second instance of AS, the clear data is performed on com.example.app.myAppA (because it was the first instance created) and not on com.example.app.myAppB.

This behavior is noticed if apps have similar package names.

Not compatible with AS

Hello.

I just want to let you know that the plugin is not compatible with latest canary version.

Thanks.

Android Studio 4.1 Canary 9
Build #AI-201.3803.71.41.6466190, built on May 6, 2020
Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.4
GC: ParNew, ConcurrentMarkSweep
Memory: 2014M
Cores: 4

AdbControllerImp leaks via ADB device listener

We've seen the following leak in diagnostic reports from Android Studio users:

 1.19G        1 ROOT: Static field: com.android.ddmlib.AndroidDebugBridge.sDeviceListeners
 1.19G        1 (root): java.util.concurrent.CopyOnWriteArraySet
 1.19G        1 al: java.util.concurrent.CopyOnWriteArrayList
 1.19G        1 array: java.lang.Object[]
 1.19G        6 []: spock.adb.AdbControllerImp
 472M        5 project: com.intellij.openapi.project.impl.ProjectImpl (disposed)

It looks like AdbControllerImp adds itself as a device change listener and never unregisters itself (except for refresh(), where it immediately re-registers itself). This references stale projects and other large data structures, keeping them in memory indefinitely.

Many options are broken starting from Android Studio Chipmunk

open current activity, open current fragment and open current app back stack are broken in Android Studio Chipmunk and all subsequent versions.

here is the stack trace I'm getting

java.lang.IncompatibleClassChangeError: Method 'com.android.tools.idea.gradle.project.model.AndroidModuleModel com.android.tools.idea.gradle.project.model.AndroidModuleModel.get(org.jetbrains.android.facet.AndroidFacet)' must be InterfaceMethodref constant
	at spock.adb.command.GetApplicationIDCommand.execute(GetApplicationIDCommand.kt:13)
	at spock.adb.AdbControllerImp.getApplicationID(AdbControllerImp.kt:32)
	at spock.adb.AdbControllerImp.access$getApplicationID(AdbControllerImp.kt:20)
	at spock.adb.AdbControllerImp$currentFragment$1.invoke(AdbControllerImp.kt:127)
	at spock.adb.AdbControllerImp$currentFragment$1.invoke(AdbControllerImp.kt:126)
	at spock.adb.AdbControllerImp.execute(AdbControllerImp.kt:368)
	at spock.adb.AdbControllerImp.currentFragment(AdbControllerImp.kt:126)
	at spock.adb.SpockAdbViewer.initPlugin$lambda-14(SpockAdbViewer.kt:178)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:270)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6654)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
	at java.desktop/java.awt.Component.processEvent(Component.java:6419)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2790)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:820)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:757)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Can't scroll

I love big fonts. And Spock ADB window just doesn't fully fit on my screen. Would be great if you wrap the window into IntelliJ's equivalent of a vertical ScrollView.

IDE error after installing plugin

Hi,

I use Android Studio and Kotlin. When I install the plugin, it gives me an IDE error. The most significant error message is:

com.intellij.diagnostic.PluginException: ID "org.intellij.sdk.action.GroupedActions" is already taken by action "Mark All (null)". Action "null (null)" (Plugin: Spock ADB) cannot use the same ID [Plugin: com.wahdan.com.wahdan.spockAdb]

I hope you can fix it somehow .

Request: Clear App Cache

Please consider adding dedicated button to clear the app cache only. It might be helpful is cases where one needs to test different caching mechanisms (images cache in my case).

Request: Add button to change fragment list presentation mode.

Current fragment presentation mode is All Fragments and subFragments. But it's a little confused to find the visibile one. So, hope there's a button to change the presentation mode which can only show the visibile fragment list.

eg:

  subA2       subB2
  subA1       subB1      subC1
fragmentA   fragmentB  fragmentC
                 ↑
          Current Visible


hope there's a mode to show as follow:

fragmentB
  subB1
  subB2

Show backstack fragments/child fragments

Suggestion:

Show fragment backstack and child fragment.
Currently, if FragmentA has nested fragments, Open Current Fragment, shows FragmentA not the current "visible" fragment.

The following was obtained with adb shell dumpsys activity top and I've removed all the unnecessary parts:

TASK com.myapp.dev id=417 userId=0
  ACTIVITY com.myapp.dev/com.myapp.dev.dashboard.DashboardActivity ba28f9b pid=25903
    Local Activity ebeffc2 State:
      ....
      Active Fragments in de26b27:
        #0: ReportFragment{d37b1d4 #0 androidx.lifecycle.LifecycleDispatcher.report_fragment_tag}
         ....
          Child FragmentManager{d58e72 in ReportFragment{d37b1d4}}:
            FragmentManager misc state:
              ...
      Added Fragments:
        #0: ReportFragment{d37b1d4 #0 androidx.lifecycle.LifecycleDispatcher.report_fragment_tag}
      FragmentManager misc state:
        ...
    ViewRoot:
      ...
    Choreographer:
      ...
    View Hierarchy:
      ...
    Looper (main, tid 2) {2b95ef9}
      ...
    Local FragmentActivity ebeffc2 State:
      ...
    FragmentA{2930bcc (d7195985-3dc4-4e1f-8f61-522f98edba02) id=0x7f0a01b5}
        ....
        Child FragmentManager{65ca52a in FragmentA{2930bcc}}:
          Active Fragments in 65ca52a:
          FragmentA1{8414f1b (7f513b80-060c-4d3a-af3f-ba908c67689e) id=0x7f0a01f0}
              ...
              Child FragmentManager{3cb18b8 in FragmentA1{8414f1b}}:
                FragmentManager misc state:
                  ...
          FragmentA3{2741b2 (71323e44-91f1-45f6-b417-65f7535be0d3) id=0x7f0a01f0}
              ...
              Child FragmentManager{8676503 in FragmentA3{2741b2}}:
                FragmentManager misc state:
                  ...
          FragmentA2{aee52b9 (609133ff-7757-419e-a365-56bc64b0d591) id=0x7f0a01f0}
              ...
              Child FragmentManager{8714e5f in FragmentA2{aee52b9}}:
                FragmentManager misc state:
                  ...
          Added Fragments:
            #0: FragmentA3{2741b2 (71323e44-91f1-45f6-b417-65f7535be0d3) id=0x7f0a01f0}
          Back Stack:
            ...
          Back Stack Indices:
            #0: BackStackEntry{377e9f6 #0 com.myapp.dev.menulist.FragmentA1}
            #1: BackStackEntry{9986175 #1 com.myapp.dev.menulist.FragmentA2}
            #2: BackStackEntry{911550a #2 com.myapp.dev.dashboard.FragmentA3}
          FragmentManager misc state:
            ...
    Added Fragments:
      #0: FragmentA{2930bcc (d7195985-3dc4-4e1f-8f61-522f98edba02) id=0x7f0a01b5}
    Fragments Created Menus:
      #0: FragmentA{2930bcc (d7195985-3dc4-4e1f-8f61-522f98edba02) id=0x7f0a01b5}
    FragmentManager misc state:
      ...

My app flow was FragmentA is instantiated and it launches the FragmentA1 nested fragment.
FragmentA1 is replaced by FragmentA2 and this one is replaced by FragmentA3.
FragmentA3 is the current "visible" fragment.

What I would like to see would be something like when we press the Open Backstack Activities. In this case:

    FragmentA3 (Visible)
    FragmentA1
    FragmentA2
FragmentA

Since the backstack order can be difficult, an alternative could be:

    FragmentA3 (Visible)
FragmentA

Request: add button to open the legacy "monitor.bat" tool

I sometimes use this tool instead of the new layout-inspector, as it's sometimes more reliable.

Also, it can get information of all apps and all that's on the screen, as opposed to the new layout-inspector which can handle only debuggable apps.

Can't see devices

Awesome plugin, I use it a lot, specially the "clear app data".

Sometimes the list of devices is empty and the only way to see devices again is to restart android studio.

Open Current App BackStack does not open selected activity

When I press the "Open Current App BackStack " command it shows me this:

image

Those are in fact my app activities, but after I click in the activity, the activity file does not open.
This is due to the activity package isn't correctly obtained.
In the example, getCurrentRunningActivities(shellOutputReceiver.toString()) returns:

image

As you can see, the activity is incorrect since it shows activity=com.android.example.livedatacom.android.example.livedatabuilder.LiveDataActivity where it should be activity=com.android.example.livedatabuilder.LiveDataActivity

The following patch solves this issue. I didn't create a PR since I don't know how the fragment handling is supposed to show on the screen.
open activity.log (rename to patch)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.