Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Use fastlane 'adb' action instead of 'sh' command #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nemanjar7
Copy link
Contributor

@nemanjar7 nemanjar7 commented Dec 28, 2024

  • Using adb action instead of sh. However, we still have to pass adb_path.
  • I added reading the sdk_path from the ENV, to first check for ANDROID_HOME or ANDROID_SDK_ROOT, and only then it defaults to ~/Library/Android/sdk. It will save us some trouble if we end up redoing android-command-line-tools installation, but even if we don't go that way it's still helpful for others.

As an example, I am using all my sdk tools with homebrew (setup where all the tools are in ~/Library/Android/sdk/android-commandlinetools, so I just added $ANDROID_HOME path.
path

I am passing ENV['ANDROID_HOME'] here, but I assume we can do it in CI/CD as well, so it doesn't have to be in here.
maestro

@nemanjar7 nemanjar7 marked this pull request as ready for review December 28, 2024 05:02
Copy link
Member

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you looked at this file? What I'm nervous about is seeing all these hard-coded paths that we've quickly realized is a bit of a mixed bag between things.

https://github.com/fastlane/fastlane/blob/master/screengrab/lib/screengrab/android_environment.rb

It seems that worked well to find adb - could we follow a similiar pattern if that exists for avdmanager?

I see there is a adb helper you found also and I like that - https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/helper/adb_helper.rb#L2

Unrelated I wish there was a better nomenclature than "other_action", something like in PHP where you import the class - then call like "adb.adb" or something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants