Sunday, January 20, 2019

adb - Pulling an apk of paid app from the device


I was pulling the .apk files from the device using the following command:


./adb pull /data/app/com.example.tracker-1.apk


When I tried using the same command for the encrypted app as below:


./adb pull /mnt/asec/net.stfj.spelltower-1/pkg.apk 

I get the following message


failed to copy '/mnt/asec/net.stfj.spelltower-1/pkg.apk' to './pkg.apk': Permission denied

The device is not rooted and the app is a paid app. The intention of pulling is not piracy but to understand the library and architecture of a set of apps. Is there a way I can retrieve that .apk file?



Answer



You wont be able to pull a "protected app" without root, sorry.



This has nothing to do with the app being payed, except that usually only payed apps are "protected" (theoretically, free apps could be "protected" as well); think of it rather as a kind of "DRM".


Once your device is rooted, you can use "root powers" to pull those .apk files. This can be done either using a specialized app (such as AppMonster), or via adb pull if the ADB daemon runs in root-mode (it usually doesn't, but that can be achieved using adbd Insecure). adb root usually doesn't work on "production devices", so you have to use this different approach.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...