LoginSignup
16

More than 5 years have passed since last update.

Android 7.0 Nougatにおいて adb pull でapkを抽出できない問題の解決策

Posted at

apkの抽出方法

Nexus5X (Android7.0)でapkを抽出できない問題に遭遇したので、対応方法のメモです。
ちゃんと調べてないので、OS依存なのか端末依存なのか不明ですが、おそらく6.0の時は抽出できていたような気がします。

1.apkの保存場所を特定

> adb shell pm list packages -f | grep [取得したいapkのパッケージ名]
package:/data/app/com.burton999.notecal.pro.test-1/base.apk=com.burton999.notecal.pro.test

2.PCにダウンロード(失敗)

> adb pull /data/app/com.burton999.notecal.pro.test-1/base.apk
adb: error: remote object '/data/app/com.burton999.notecal.pro.test-1/base.apk' does not exist

解決策

> adb shell cp /data/app/com.burton999.notecal.pro.test-1/base.apk /storage/emulated/0/Download
> adb pull /storage/emulated/0/Download/base.apk

一度、アクセス権のあるディレクトリにコピーすることで、pullすることができました。
おそらく権限の問題ようですが、コピーできるのにpullできないってのはよくわからんですね。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16