New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
sidvizioso
Old
#1  
Senior Member - OP
Thanks Meter 2
Posts: 160
Join Date: Oct 2008
Location: Rome
Question Get Apk file from Market

When i download and install an App from the Android Market where the Apk installation file is temporary placed? Which path?

tnx in advance
 
mopodo
Old
#2  
Senior Member
Thanks Meter 50
Posts: 131
Join Date: Aug 2009
the apk's are stored at /data/app and /data/app-private after you installed the app and will be removed if you uninstall it.
HTC Hero - CM7
LG Optimus 2X - CM7
 
sidvizioso
Old
#3  
Senior Member - OP
Thanks Meter 2
Posts: 160
Join Date: Oct 2008
Location: Rome
Tnx for the answer mopodo, but if i hard reset the device, can i will use theese files to reinstall them?

i'm sorry for my bad english...
 
Pinesal
Old
#4  
Senior Member
Thanks Meter 18
Posts: 502
Join Date: Jan 2009
Quote:
Originally Posted by sidvizioso View Post
Tnx for the answer mopodo, but if i hard reset the device, can i will use theese files to reinstall them?

i'm sorry for my bad english...
No, you can make a backup to your SD card with apps like MyBackup or Backup For Root Users.
 
sidvizioso
Old
#5  
Senior Member - OP
Thanks Meter 2
Posts: 160
Join Date: Oct 2008
Location: Rome
So which is the temp path of the downloaded apk from market?
i want to grab them...
 
mopodo
Old
#6  
Senior Member
Thanks Meter 50
Posts: 131
Join Date: Aug 2009
Quote:
Originally Posted by Pinesal View Post
No, you can make a backup to your SD card with apps like MyBackup or Backup For Root Users.
of course you can.
you just have to copy them to your sdcard or pc an install them again, with «adb install something.apk» or «Astro File Manager» (or a similar file managerapp)

a hard reset will delete everything on «/data»
HTC Hero - CM7
LG Optimus 2X - CM7
AdrianK Old
#7  
Guest
Thanks Meter
Posts: n/a
If you have root copy the contents of both folders to your SD card.

mkdir /sdcard/apps
cp /data/app/* /sdcard/apps
cp /data/app-private/* /sdcard/apps

Then after you wipe (I've never heard anyone call it a 'hard reset' before) you can use an app like Astore or ApkInstaller to reinstall them.

If you don't have root then not only will you not be able to read app-private, but your ROM wont have busybox so you wont be able to bash in those commands. In that case use an app like Astro or AppManager to copy non-private apks to the sdcard, but for private apps you'll have to redownload them (without being charged of course.)


Quote:
Originally Posted by Pinesal View Post
No, you can make a backup to your SD card with apps like MyBackup or Backup For Root Users.
Only if they're non-private (reside in /app, private being /app-private).
 
ajones7279
Old
#8  
Senior Member
Thanks Meter 18
Posts: 648
Join Date: Nov 2007
Location: Somewhere
He's probably coming from WinMo. We called a factory reset/wipe a hard reset.
rEVOlutionized!
 
shata
Old
#9  
shata's Avatar
Senior Member
Thanks Meter 2
Posts: 169
Join Date: Jun 2009
Location: Virginia Beach, VA
Quote:
Originally Posted by mopodo View Post
the apk's are stored at /data/app and /data/app-private after you installed the app and will be removed if you uninstall it.
Slightly off topic lol But i see you said Private does that mean you could manually back up Private apps you buy off market by just copying them /w root access?
T▪ ▪ ▪Mobile myTouch 3G - Black
::Radio: 2.22.19.26I
::Recovery: CM Recovery
::ROM:CyanogenMOD 4.2.x.x
::Theme:Enoch1.4.x.x
 
askwhy
Old
(Last edited by askwhy; 31st December 2009 at 10:21 AM.)
#10  
askwhy's Avatar
Senior Member
Thanks Meter 0
Posts: 217
Join Date: Jun 2009
When I run the following from an adb shell, with or without SU root:

cp /data/app/* <my location on sd>

I always get:

cp: permission denied

In fact, no matter how or where I cp from or to, and no matter what I am trying to copy, even if I leave all arguments blank, I still get "cp: permission denied" -- I have busybox installed in /system/xbin from /data/local and as far as I can tell it installed ok. Phone is a rooted Sprint hero 1.56.651.2 running stock ROM.

I have also tried to 'adb pull /data/app' and it always find 0 files. None of this is a big deal for me, however, as I am just trying to backup a bunch of apks for free apps in case versions change too much. Mostly just curious...

Any ideas?

EDIT: Both Astro and AppManager handled the (non-private) apk backups fine -- so I have no real need for the cp method to work, but I am still wondering why it will not -- is it the adb shell? must I use a terminal emulator from on the phone instead? something else? Anyways, if I really want to pursue it, perhaps I should take it to a busybox thread at this point...

EDIT2: It appears as if the 'cp' command as I was running it wasn't getting passed through busybox (not sure why). From what I can piece together reading other threads, it seems that if you have installed busybox on top of a ROM that doesn't already have it (like stock, after rooting and recovery setup) than you must prefix commands with 'busybox' when entered, as in 'busybox cp /data/app/* <my location>' and it does work for me that way. Still cannot seem to copy /data/app-private which I thought having root access would allow -- I guess I just don't understand nearly enough about busybox implementation, linux permissions, and, well, linux in general.


XDA PORTAL POSTS

Responses From Ubuntu Pouring Into Ubuntu Touch Q&A Thread

Ubuntu has become the most successful *nix distribution for a number of reasons, … more

Heimdall Suite 1.4.0 Released

The release version of Heimdall Suite 1.4.0 is now available after an epic wait. You may remember hearing about … more

A Guide to Paid Work on XDA-Developers

For the longest time, XDA has been a bastion, a pillar in the world of development. This is … more