Giter Site home page Giter Site logo

Comments (29)

knutlegrand avatar knutlegrand commented on June 12, 2024 2

You

@shailantani I'm not a Mac user, but I think you just remove the .zip extension and drag it to your applications folder.

@shailantani No, You have to unzip it, then you get "Contents" folder. Within this folder, navigate to folder MacOS.
There, you'll find PixelFlasher file.

In terminal, enter following commands:

  • cd path_to_unzipped_Contents_folder/MacOS
  • chmod +x PixelFlasher (making it executable)
  • mv PixelFlasher file to [path_to_PixelFlasher.app]/Contents/MacOS folder file (PixelFlasher.app is normally located in Applications folder)

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024 1

Could you enable debug logging and try again so the events are captured in the log, and then provide support.zip?
Hoping I could spot something in there.
@knutlegrand does scrcpy work for you?
Trying to see if this is a common MacOS issue or an isolated issue.

Thanks

from pixelflasher.

knutlegrand avatar knutlegrand commented on June 12, 2024 1

Please try setting to:

/usr/local/Cellar/scrcpy/2.4_1/bin/scrcpy

--> Done, scrcpy option works now

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024 1

@shailantani
Please give this version a try.
https://github.com/badabing2005/PixelFlasher/releases/tag/v6.9.2.0

from pixelflasher.

knutlegrand avatar knutlegrand commented on June 12, 2024 1

Both options are working on the same PF version ! Good job

from pixelflasher.

shailantani avatar shailantani commented on June 12, 2024 1

Please try this version. I reverted the way ADB Shell is launched. https://github.com/badabing2005/PixelFlasher/actions/runs/8692363043

@badabing2005
Finally this version seems to be working with both adb and scrcpy 😄
Amazing job!!

@knutlegrand Thanks a lot for all the help btw!

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024

Can you Open ADB Shell with PixelFlasher? and does that work?
See details in ticket #185, you might have the same issue not allowing PixelFlasher access to Terminal.

from pixelflasher.

shailantani avatar shailantani commented on June 12, 2024

Yeah, so when I click on the adb shell, terminal opens up and i think its working too. (Added screenshot)
And I confirmed that I had given Terminal access to PixelFlasher too. Anything else I could do perhaps?


Screenshot 2024-04-10 at 9 34 22 PM

from pixelflasher.

knutlegrand avatar knutlegrand commented on June 12, 2024

Not working (same as first post of this thread). ADB option is still working well
Here is the support file (debug activated).
Hope this helps.
support_2024-04-11_10-00-37.zip

from pixelflasher.

shailantani avatar shailantani commented on June 12, 2024

Here's mine:
support_2024-04-11_13-41-47.zip

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024

Not working (same as first post of this thread). ADB option is still working well Here is the support file (debug activated). Hope this helps. support_2024-04-11_10-00-37.zip

Thanks, I see that you set the path to:

Setting scrcpy path path to: /usr/local/Cellar/scrcpy/2.4_1/bin

PF attempted to run

Launching scrcpy for device: REDACTED ...
debug: "/usr/local/Cellar/scrcpy/2.4_1/bin" -s REDACTED

Which would not work as that is not the full path to scrcpy, it needs to include the scrcpy executable.

Please try setting to:

/usr/local/Cellar/scrcpy/2.4_1/bin/scrcpy

And test again
If it still fails, can you try this command from terminal?

/usr/local/Cellar/scrcpy/2.4_1/bin/scrcpy" -s REDACTED

Replace REDACTED with your device id.

@shailantani
Yours is setup correctly.
PixelFlasher tried to launch

"/opt/homebrew/Cellar/scrcpy/2.4/bin/scrcpy" -s 10.10.30.54:5555

Can you please try that from terminal and see if it works?

Sorry, not having a Mac impedes my ability to provide quicker resolution and have to rely on your feedback.
Hackintosh has its limitations.

Thanks

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024

Thanks @knutlegrand

@shailantani I'll wait for your feedback, we know the feature works, something must be different on yours.

from pixelflasher.

shailantani avatar shailantani commented on June 12, 2024

Hi sorry for the delay, so running the command on terminal works
"/opt/homebrew/Cellar/scrcpy/2.4/bin/scrcpy" -s 10.10.30.54:5555
But again, through pixel flasher it doesnt for some reason.
Anything I can do to help you further debug it?

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024

PixelFlasher first dynamically creats a script in system temp directory with the following content.
let's call it temp.sh for this exacmple

"/opt/homebrew/Cellar/scrcpy/2.4/bin/scrcpy" -s 10.10.30.54:5555

This is based on the defined path of scrcpy and the connected / selected device.

Then it launches the following command:
For this example, I'm assuming that you create the temp.sh in your home directory

osascript -e tell application "Terminal" to do script "~temp.sh"

Can you create the temp.sh and launch and type the osascript command in terminal and see if it works for you please?

Thanks

from pixelflasher.

shailantani avatar shailantani commented on June 12, 2024

Hi so I added a temp.sh file and ran the code. Heres the errors:
Screenshot 2024-04-12 at 10 22 33 AM
Above is the temp.sh file

And then heres what I had inputted in the terminal:
Screenshot 2024-04-12 at 10 21 50 AM

So the first command was connecting the adb device and it was connected.
Second command was the one that you had asked me to input, which popped up an error.
In the third command, I tried specifying the location of the temp.sh too, but that too popped up an error.

Am I doing something wrong?
Thanks!

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024

try

chmod 755 ~/temp.sh

see if this works

~/.temp.sh

and then this

osascript -e tell application "Terminal" to do script "~temp.sh"

from pixelflasher.

shailantani avatar shailantani commented on June 12, 2024

Okay so, I did the chmod 755 ~/temp.sh and it woked.
Then I tried the ~/.temp.sh and the scrcpy worked, the the phone screen was shown.
But upon trying osascript -e tell application "Terminal" to do script "~temp.sh" an error popped up. Heres the screenshot:
What can I do now?


Screenshot 2024-04-13 at 10 35 36 AM

Thanks!

from pixelflasher.

shailantani avatar shailantani commented on June 12, 2024

OHHHH Interesting, So I searched a bit more about the error and there has to be a change in the code:

It should be:

osascript -e 'tell application "Terminal" to do script "/Users/shailantani/temp.sh "'
instead of:

osascript -e tell application "Terminal" to do script "~temp.sh"

So there were 2 changes I made:

  1. Adding quotes before 'tell' and after 'temp.sh'
  2. Properly specifying the location of temp.sh ie "/Users/shailantani/temp.sh " instead of ~temp.sh

Please do check it out once, Thanks. And let me know if further information is required!
@badabing2005

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024

OHHHH Interesting, So I searched a bit more about the error and there has to be a change in the code:

It should be:

osascript -e 'tell application "Terminal" to do script "/Users/shailantani/temp.sh "' instead of:

osascript -e tell application "Terminal" to do script "~temp.sh"

So there were 2 changes I made:

1. Adding quotes before 'tell' and after 'temp.sh'

2. Properly specifying the location of temp.sh ie `"/Users/shailantani/temp.sh "` instead of `~temp.sh`

Please do check it out once, Thanks. And let me know if further information is required! @badabing2005

Thanks for the investigation.
I'll make the necessary changes, although it is surprising that it doesn't work for scrcpy but works for adb shell and for @knutlegrand it works as is for both.

By the way point 2 is non-issue as PF always specifies full path.

from pixelflasher.

shailantani avatar shailantani commented on June 12, 2024

@shailantani Please give this version a try. https://github.com/badabing2005/PixelFlasher/releases/tag/v6.9.2.0

Hi, so I just tried that version. The scrcpy works, but "adb" stopped working now 😭
This is the error:



Screenshot 2024-04-15 at 2 07 42 PM

Heres the support file:
support_2024-04-15_14-08-32.zip

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024

I'm fed up with Apple shenanigans.
See here and here

Identical code, one to launch the adb shell the other to launch scrcpy.
And now adb shell doesn't want to work with single quotes around tell?

I'm not touching this until I hear from @knutlegrand or others if this is common issue for all.
I might revert to the previous way if the older version works for all others but not you.
I'm sorry but I'd like to keep things consistent and determininstic.

from pixelflasher.

knutlegrand avatar knutlegrand commented on June 12, 2024

Have checked both versions

  • scrcpy not OK , adb OK in 6.9.1.3
  • scrcpy OK , adb not OK in 6.9.2.1

Why not using these commands ?

  • adb : subprocess.run(['/Users/REDACTED/Library/Android/sdk/platform-tools/adb', '-s', '3B071JEHN10437', 'shell'])
  • scrcpy : subprocess.run(['/usr/local/Cellar/scrcpy/2.4_1/bin/scrcpy', '-s', '3B071JEHN10437' ])

This might avoid the creation/deletion of a temporary script.
Maybe it's worth a try.

Anyway, it's quite easy to launch adb & scrcpy directly from the terminal. I would say that there is definitely no need to waste too much time on this.

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024

That's exactly how it is done, on Linux and Windows,
But Apple being Apple, it has to be different and complicated ;)
That method does not work on Apple, at least didn't when I first added the feature.

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024

Please try this version.
I reverted the way ADB Shell is launched.
https://github.com/badabing2005/PixelFlasher/actions/runs/8692363043

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024

Thank you.

from pixelflasher.

shailantani avatar shailantani commented on June 12, 2024

Please try this version. I reverted the way ADB Shell is launched. https://github.com/badabing2005/PixelFlasher/actions/runs/8692363043

Hi I'm sorry but could you tell me how I can run the app from the actions?
When I download the PixelFlasher.app, it gets downloaded as zip. Do I extract it then and run it?

Sorry for the doubt :")

from pixelflasher.

badabing2005 avatar badabing2005 commented on June 12, 2024

@shailantani
I'm not a Mac user, but I think you just remove the .zip extension and drag it to your applications folder.

from pixelflasher.

shailantani avatar shailantani commented on June 12, 2024

You

@shailantani I'm not a Mac user, but I think you just remove the .zip extension and drag it to your applications folder.

@shailantani No, You have to unzip it, then you get "Contents" folder. Within this folder, navigate to folder MacOS. There, you'll find PixelFlaxer file.

In terminal, enter following commands:

  • cd path_to_unzipped_Contents_folder/MacOS
  • chmod +x PixelFlasher (making it executable)
  • mv PixelFlasher file to [path_to_PixelFlasher.app]/Contents/MacOS folder file (PixelFlasher.app is normally located in Applications folder)

Awesome, will try it out. Thank you so much for the help 👍

from pixelflasher.

roryokane avatar roryokane commented on June 12, 2024

Please try this version. I reverted the way ADB Shell is launched.
https://github.com/badabing2005/PixelFlasher/actions/runs/8692363043

Hi I'm sorry but could you tell me how I can run the app from the actions?
When I download the PixelFlasher.app, it gets downloaded as zip. Do I extract it then and run it?

For future reference, here is my method for testing PixelFlasher.app.zip files downloaded from GitHub Actions on macOS. This method should make testing a little more accurate than @knutlegrand’s method. To help anyone unfamiliar with Terminal, I wrote the steps in more detail, too.

  1. Open “PixelFlasher.app.zip”. This will unarchive it, creating a “Contents” folder as a sibling.
  2. In Finder, navigate inside Contents/MacOS/ so you can see the PixelFlasher file.
  3. Open Terminal (in /Applications/Utilities/). Type chmod +x (with the ending space), then drag and drop the PixelFlasher file onto the Terminal window. Press Return to run the command. (This gives PixelFlasher executable permissions.)
  4. In Finder, navigate back up (for example, hit ⌘↑ twice) until you can see the “Contents” folder next to the zip file. Copy the text “PixelFlasher.app” to make the next step easier.
    • To copy this, I find it convenient to select the “PixelFlasher.app.zip” file in Finder, hit Return to select the basename “PixelFlasher.app”, then Copy (⌘C).
  5. Select the “Contents” folder and use menu item File > New Folder with “Contents” (⌃⌘N) to wrap it in an enclosing folder. When Finder prompts you to rename “New Folder With Items”, paste “PixelFlasher.app” as the name.

This produces a new copy of the PixelFlasher app completely derived from the zip file. While testing, you can run this app where it is – you don’t need to overwrite your existing /Applications/PixelFlasher.app.

from pixelflasher.

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.