Skip to content

Commit

Permalink
add sdcard property to yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark O'Shea committed Sep 3, 2015
1 parent 103bd3e commit 8720b71
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ devices:
- name: bar
target: android-22
skin: WVGA800
sdcard: 20M
```
#### Configuration
Expand Down
2 changes: 1 addition & 1 deletion lib/mobo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def device_config(device)
"abi" => "x86_64",
"height" => "1200",
"width" => "720",
"sdcard_size" => "20M" }
"sdcard" => "20M" }
device = defaults.merge(device)
end

Expand Down
8 changes: 4 additions & 4 deletions lib/mobo/android.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ def find_open_port
end

def create_sdcard
@device["sdcard"] = "#{@device["name"]}_sdcard.img"
Mobo.cmd("mksdcard -l e #{@device["sdcard_size"]} #{@device["sdcard"]}")
@device["sdcard_img"] = "#{@device["name"]}_sdcard.img"
Mobo.cmd("mksdcard -l e #{@device["sdcard"]} #{@device["sdcard_img"]}")
end

def destroy_sdcard
Mobo.cmd("rm -f #{@device["sdcard"]}")
Mobo.cmd("rm -f #{@device["sdcard_img"]}")
end

def create_cache
Expand All @@ -189,7 +189,7 @@ def start

cmd ="emulator @#{@device["name"]} \
-port #{@device["port"]} \
-sdcard #{@device["sdcard"]} \
-sdcard #{@device["sdcard_img"]} \
-cache #{@device["cache"]}"
pid = Process.fork {
Mobo.cmd(cmd)
Expand Down

0 comments on commit 8720b71

Please sign in to comment.