๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’š ๊ฐœ๋ฐœ/์•ˆ๋“œ๋กœ์ด๋“œ

[์•ˆ๋“œ๋กœ์ด๋“œ] ์• ๋ฎฌ๋ ˆ์ดํ„ฐ์˜ ํŒŒ์ผ์„ ๋กœ์ปฌ๋กœ ๋‚ด๋ณด๋‚ด๋Š” ๋ฐฉ๋ฒ• (adb pull)

by devshin.kr 2021. 7. 12.
728x90

 

[์• ๋ฎฌ๋ ˆ์ดํ„ฐ์˜ ํŒŒ์ผ์„ ๋กœ์ปฌ PC๋กœ ๋นผ๋Š” ๋ฐฉ๋ฒ•]

 

0. /sdcard/testDir/testFile.txt ๋ฅผ ๋กœ์ปฌ PC (์œ„์น˜: C:\Temp) ๋กœ pull ํ•ด๋ณด๊ฒ ๋‹ค.

์—ฌ๊ธฐ์„œ์˜ testDir ํด๋”์™€, testFile.txt ํŒŒ์ผ์€ ๋‚ด๊ฐ€ ์ž„์˜๋กœ ๋งŒ๋“ค์–ด ์ฃผ์—ˆ๋‹ค.

ํŒŒ์ผ์˜ ๋‚ด์šฉ์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

(๋งŒ๋“œ๋Š” ์ฝ”๋“œ>>

https://devshin93.tistory.com/entry/%EC%95%88%EB%93%9C%EB%A1%9C%EC%9D%B4%EB%93%9C-sdcard%EC%97%90-%EB%94%94%EB%A0%89%ED%86%A0%EB%A6%AC%EC%99%80-%ED%8C%8C%EC%9D%BC-%EC%83%9D%EC%84%B1%ED%95%98%EA%B8%B0?category=912138

 

[์•ˆ๋“œ๋กœ์ด๋“œ] sdcard์— ๋””๋ ‰ํ† ๋ฆฌ์™€ ํŒŒ์ผ ์ƒ์„ฑํ•˜๊ธฐ

โ€ป Android11(Andorid API Level 30) ๋ถ€ํ„ฐ๋Š” ์•ˆ๋“œ๋กœ์ด๋“œ ๋ณด์•ˆ ์ •์ฑ… ์ƒ sdcard์— ์ ‘๊ทผ์ด ์–ด๋ ค์›Œ์กŒ๋‹ค. ๋”ฐ๋ผ์„œ ํ…Œ์ŠคํŠธ ์• ๋ฎฌ๋ ˆ์ดํ„ฐ๋Š” API Level 29 ์ดํ•˜๋กœ ํ•œ๋‹ค. sdcard ์•„๋ž˜์— testDir ์ด๋ฆ„์˜ ํด๋”๊ฐ€ ์—†๋‹ค๋ฉด ํ•ด๋‹น ์ด..

devshin93.tistory.com

 

(์ฐธ๊ณ . ์‰ฝ๊ฒŒ ํ™•์ธํ•  ์ˆ˜ ์žˆ๊ฒŒ sdcard์— ์ €์žฅ์„ ํ–ˆ๋‹ค.

Android11. API Level 30๋ถ€ํ„ฐ๋Š” sdcard์— ์ ‘๊ทผ์ด ๋˜์ง€ ์•Š์œผ๋ฏ€๋กœ, ๋ฐ˜๋“œ์‹œ Android11 ๋ฏธ๋งŒ์˜ ์• ๋ฎฌ๋ ˆ์ดํ„ฐ/๋‹จ๋ง๊ธฐ์—์„œ ํ™•์ธํ•ด์•ผ ํ•œ๋‹ค.)

 

 

 

1. Android Studio

AVD Manager > Create Virtual Device...

 

 

2. PlayStore ๊ฐ€ ์—†๋Š” ๋ฒ„์ „์œผ๋กœ ์„ ํƒ ํ›„, Next

 

 

3. x86 Images > API Level 28, ABI x86_64 ๊ธฐ์ค€์œผ๋กœ ์ž‘์„ฑํ•จ

 

4. AVD Name ์ž…๋ ฅ

: Pixel_XL_API_28 ๋กœ ๋ช…๋ช…ํ–ˆ๋‹ค.

 

5. ์• ๋ฎฌ๋ ˆ์ดํ„ฐ๋ฅผ run ํ•˜์ง€ ์•Š์€ ์ƒํƒœ์—์„œ,

Android Studio ํ•˜๋‹จ์˜ Terminal ํƒญ์„ ํด๋ฆญํ•œ๋‹ค.

(์ฐธ๊ณ : Terminal ์—์„œ ๋“œ๋ผ์ด๋ธŒ๋ฅผ ๋ณ€๊ฒฝํ•˜๋ ค๋ฉด C: ๋˜๋Š” D: ์™€ ๊ฐ™์ด ๋“œ๋ผ์ด๋ธŒ๋ช…: ๋ฅผ ์ž…๋ ฅํ•œ๋‹ค.)

 

 

6. ์•„๋ž˜์˜ ๊ฒฝ๋กœ๋กœ ์ด๋™ํ•ด ๋‹ค์Œ ๋นจ๊ฐ„์ƒ‰์œผ๋กœ ํ‘œ์‹œํ•œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•œ๋‹ค.

์•„๋ž˜์˜ ๊ฒฝ๋กœ๋Š” ๋‚ด PC ๊ธฐ์ค€, adb.exe ๊ฐ€ ์œ„์น˜ํ•œ ๊ฒฝ๋กœ์ด๋‹ค.

cd C:\Users\{์‚ฌ์šฉ์ž๊ณ„์ •}\AppData\Local\Android\Sdk\tools

C:\Users\{์‚ฌ์šฉ์ž๊ณ„์ •}\AppData\Local\Android\Sdk\tools>emulator -avd Pixel_XL_API_28 -writable-system
emulator: WARNING: System image is writable
handleCpuAcceleration: feature check for hvf
ANGLE: D3D11: rx::Renderer11::generateConfigs
emulator: INFO: QtLogger.cpp:68: Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_posture_requested(int) ((null):0, (null))
 
 
emulator: INFO: QtLogger.cpp:68: Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_posture_selection_dialog() ((null):0, (null))
 
 
added library vulkan-1.dll
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
dsound: Could not initialize ADC
dsound: Could not create capture buffer
dsound: Reason: An undetermined error occurred inside the DirectSound subsystem
dsound: Could not initialize ADC
dsound: Could not create capture buffer
dsound: Reason: An undetermined error occurred inside the DirectSound subsystem
audio: Failed to create voice `goldfish_audio_in'
C:\Users\{์‚ฌ์šฉ์ž๊ณ„์ •}\AppData\Local\Android\Sdk\tools\..\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: warning: opening audio input failed
emulator: INFO: GrpcServices.cpp:301: Started GRPC server at 127.0.0.1:8554, security: Local
dsound: Could not initialize ADC
dsound: Could not create capture buffer
dsound: Reason: An undetermined error occurred inside the DirectSound subsystem
dsound: Could not initialize ADC
dsound: Could not create capture buffer
dsound: Reason: An undetermined error occurred inside the DirectSound subsystem
audio: Failed to create voice `adc'
emulator: INFO: QtLogger.cpp:68: Warning: QWindowsWindow::setGeometry: Unable to set geometry 483x864+1150+101 on QWidgetWindow/'EmulatorContainerClassWindow'. Resulting geometry:  604x1080+1150+101 (fram
e: 0, 0, 0, 0, custom margin: 0, 0, 0, 0, minimum size: 200x200, maximum size: 16777215x16777215). ((null):0, (null))
 
 
emulator: INFO: QtLogger.cpp:68: Warning: QWindowsWindow::setGeometry: Unable to set geometry 67x531+1608+101 on QWidgetWindow/'ToolControlsWindow'. Resulting geometry:  84x664+1608+101 (frame: 0, 0, 0, 0
, custom margin: 0, 0, 0, 0, minimum size: 67x531, maximum size: 67x531). ((null):0, (null))
 
 
emulator: INFO: boot completed
emulator: Increasing screen off timeout, logcat buffer size to 2M.
emulator: Revoking microphone permissions for Google App.

์—ฌ๊ธฐ๊นŒ์ง€ ์˜ค๋ฉด ์• ๋ฎฌ๋ ˆ์ดํ„ฐ๊ฐ€ ๋™์ž‘๋œ๋‹ค.

 

 

7. ํ•˜๋‹จ์˜ Terminal ํƒญ์„ ํ•˜๋‚˜ ๋” ์—ฐ๋‹ค.

 

8. adb devices ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ด running ์ค‘์ธ ์• ๋ฎฌ๋ ˆ์ดํ„ฐ๋ฅผ ํ™•์ธํ•œ๋‹ค.

C:\Users\{์‚ฌ์šฉ์ž๊ณ„์ •}\AppData\Local\Android\Sdk\tools>adb devices
List of devices attached
emulator-5554   device
 
 
C:\Users\{์‚ฌ์šฉ์ž๊ณ„์ •}\AppData\Local\Android\Sdk\tools>

 

 

9. ์•„๋ž˜์˜ ์˜ˆ์‹œ๋Œ€๋กœ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•œ๋‹ค.

9.1. adb -s emulator-5554 rootใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€์—๋ฎฌ๋ ˆ์ดํ„ฐ์— root ๊ถŒํ•œ์„ ๋ถ€์—ฌํ•œ๋‹ค.

9.2. asb -s emulator-5554 remountใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€์—๋ฎฌ๋ ˆ์ดํ„ฐ๋ฅผ remount ํ•œ๋‹ค.

9.3. adb -s emulator-5554 pull /sdcard/testDir/testFile.txt C:\Tempใ€€ใ€€ใ€€ใ€€ใ€€์—๋ฎฌ๋ ˆ์ดํ„ฐ์˜ testFile.txt๋ฅผ ๋กœ์ปฌ C:\Temp ๋กœ pull ํ•œ๋‹ค.

 

 

10. ๊ฒฐ๊ณผ

 

 

 

 

 

[๋กœ์ปฌ PC ์˜ ํŒŒ์ผ์„ ์• ๋ฎฌ๋ ˆ์ดํ„ฐ๋กœ ๋„ฃ๋Š” ๋ฐฉ๋ฒ•]

https://devshin93.tistory.com/entry/%EC%95%88%EB%93%9C%EB%A1%9C%EC%9D%B4%EB%93%9C-%EB%A1%9C%EC%BB%AC-PC%EC%9D%98-%ED%8C%8C%EC%9D%BC%EC%9D%84-%EC%95%A0%EB%AE%AC%EB%A0%88%EC%9D%B4%ED%84%B0%EB%A1%9C-%EB%84%A3%EB%8A%94-%EB%B0%A9%EB%B2%95-adb-push

 

[์•ˆ๋“œ๋กœ์ด๋“œ] ๋กœ์ปฌ PC์˜ ํŒŒ์ผ์„ ์• ๋ฎฌ๋ ˆ์ดํ„ฐ๋กœ ๋„ฃ๋Š” ๋ฐฉ๋ฒ• (adb push)

(๋‹ค์Œ์—์„œ ์—ฐ๊ฒฐ... https://devshin93.tistory.com/entry/%EC%95%88%EB%93%9C%EB%A1%9C%EC%9D%B4%EB%93%9C-%EC%95%A0%EB%AE%AC%EB%A0%88%EC%9D%B4%ED%84%B0%EC%9D%98-%ED%8C%8C%EC%9D%BC%EC%9D%84-%EB%A1%9C%EC%BB..

devshin93.tistory.com

 

๋Œ“๊ธ€