GithubHelp home page GithubHelp logo

Comments (8)

jknoxville avatar jknoxville commented on April 20, 2024 2

That's right, there was a recent change that went from a hardcoded sdk location to using your $ANDROID_HOME. So if you don't have it set, you won't see any plugins.

I think the right way to deal with this is detecting when it's unset and telling the user this. In my opinion it would also be worth adding a fallback location or search path, so it "just works" in most cases anyway.

from flipper.

shechetinind avatar shechetinind commented on April 20, 2024 1

Hey @jknoxville thank you for helping!
I have tested sonar on emulator Nexus 5 with API 23, but the button label is 'no device running'.
I try coomands:

adb shell
run-as com.your.app.package
ls -la files/sonar
Output is:
-rw------- u0_a62 u0_a62 1013 2018-06-18 13:04 app.csr
-rw------- u0_a62 u0_a62 1181 2018-06-19 04:46 device.crt
-rw------- u0_a62 u0_a62 1679 2018-06-18 13:04 privateKey.pem
-rw------- u0_a62 u0_a62 1144 2018-06-19 04:46 sonarCA.crt

Also when i start prebuild desktop app it shows 2 available plugins - network and inspector. Because i have added its to client in android app, like this

client.addPlugin(new InspectorSonarPlugin(getApplicationContext(), descriptorMapping));
client.addPlugin(new NetworkSonarPlugin());

BUT if i build desktop app from source, i have see 'no available plugins' . How i can fix this

from flipper.

shechetinind avatar shechetinind commented on April 20, 2024 1

@jknoxville @EngleVV Just fixed 'no device running'. Just added $ANDROID_HOME variable to
~/.bash_profile like this

export ANDROID_HOME=~/Library/Android/sdk

because method which used for fetching devices and emulators uses this command (example)

child_process.exec('$ANDROID_HOME/tools/emulator -list-avds'...)
BUT...on the prebuild app this is not working))) Only for app from src

from flipper.

danielbuechele avatar danielbuechele commented on April 20, 2024

@jknoxville

from flipper.

jknoxville avatar jknoxville commented on April 20, 2024

Hey @wqycsu , Sonar works by using adb to write two files ( sonarCA.crt and device.crt ) to your app's internal data partition after your app connects and requests them. In your case the connection is being made, so I don't think the permissions mentioned above related to the problem.

It looks like what is failing here is writing those 2 files. I know of 2 reasons this might happen:

  1. Your app is not marked debuggable in the manifest - sonar should tell you if this is the case.
  2. I've recently seen this issue on a samsung device where adb shell's run-as command doesn't work. ( https://stackoverflow.com/questions/37413667/run-as-could-not-set-capabilities-operation-not-permitted ).

Could you run these commands in a terminal and copy the output here?
(Replace com.your.app.package with the package name for your app (whatever you've replaced with xxxx in the original comment)

adb shell
run-as com.your.app.package
ls -la files/sonar

If that is failing for you, it would also be helpful to know what device you're using and what android version it is running.

Thanks!

from flipper.

EngleVV avatar EngleVV commented on April 20, 2024

same problem

from flipper.

passy avatar passy commented on April 20, 2024

Closing this here as part of issue cleanup.

from flipper.

jknoxville avatar jknoxville commented on April 20, 2024

Just closing the loop here for future reference, in the latest release, we've added a settings panel, where you can configure your android SDK location, in a similar way to how android studio works.

Use that to point flipper to your ANDROID_HOME, and that should take care of it.

from flipper.

Related Issues (20)

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.