Help us understand the problem. What is going on with this article?

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

More than 3 years have passed since last update.

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できないってのはよくわからんですね。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした