Skip to content

Commit

Permalink
fix the paths for android sdk (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjar7 authored Dec 23, 2024
1 parent 7c5b789 commit 601fb81
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def self.run(params)

def self.setup_emulator(params)
sdk_dir = params[:sdk_dir]
adb = "#{sdk_dir}/platform-tools/adb"
adb = "#{sdk_dir}/android-commandlinetools/platform-tools/adb"

UI.message("Stop all running emulators...")
devices = `#{adb} devices`.split("\n").drop(1)
Expand All @@ -70,11 +70,11 @@ def self.setup_emulator(params)
end

UI.message("Setting up new Android emulator...")
system("#{sdk_dir}/cmdline-tools/latest/bin/avdmanager create avd -n '#{params[:emulator_name]}' -f -k '#{params[:emulator_package]}' -d '#{params[:emulator_device]}'")
system("#{sdk_dir}/android-commandlinetools/cmdline-tools/latest/bin/avdmanager create avd -n '#{params[:emulator_name]}' -f -k '#{params[:emulator_package]}' -d '#{params[:emulator_device]}'")
sleep(5)

UI.message("Starting Android emulator...")
system("#{sdk_dir}/emulator/emulator -avd #{params[:emulator_name]} -port #{params[:emulator_port]} > /dev/null 2>&1 &")
system("#{sdk_dir}/android-commandlinetools/emulator/emulator -avd #{params[:emulator_name]} -port #{params[:emulator_port]} > /dev/null 2>&1 &")
sh("#{adb} -e wait-for-device")

sleep(5) while sh("#{adb} -e shell getprop sys.boot_completed").strip != "1"
Expand Down Expand Up @@ -145,7 +145,7 @@ def self.available_options
key: :emulator_device,
env_name: "MAESTRO_AVD_DEVICE",
description: "Device",
default_value: "pixel_8_pro",
default_value: "pixel_7_pro",
optional: true
),
FastlaneCore::ConfigItem.new(
Expand Down

0 comments on commit 601fb81

Please sign in to comment.