[Question] How to pull .apk's to use with different ROMs - Nexus One Q&A, Help & Troubleshooting

I've been switching back and forth in recovery between Modaco's desire rom and CM. Recently I downloaded a couple beta's on the desire rom, which are all now closed, that I'm trying to get back on my CM rom. Is there a way to pull the .apk out of the Desire rom so I can use it with my CM? (Or with froyo or the new desire builds when they come out).
Thanks

Use Titanium Backup. Available for free in the market

Or you could use adb and pull the apks for /system/app or /data/app depending on where it was installed... even if you have app2sd, pull from /data/app will work since it is symlinked...
Code:
adb pull /system/app .
adb pull /data/app .

Most desire apks are not compatible with CM or any other non-sense ui roms.
Search a little and you'll know what i mean

PhantomRampage said:
Most desire apks are not compatible with CM or any other non-sense ui roms.
Search a little and you'll know what i mean
Click to expand...
Click to collapse
If you read the first post, OP wasn't talking about desire app apk, but rather some 3rd party beta apps apks...

Slighty OT.
When I download & install an app from the market, where does its apk get stored on my Nexus running OS2.1? I went looking but could only find the inbuilt apps in the /system/app folder. I have a couple of apps that I would like to copy to my SD card with ASTRO prior for backup purposes. Thanks.

logger said:
Slighty OT.
When I download & install an app from the market, where does its apk get stored on my Nexus running OS2.1? I went looking but could only find the inbuilt apps in the /system/app folder. I have a couple of apps that I would like to copy to my SD card with ASTRO prior for backup purposes. Thanks.
Click to expand...
Click to collapse
Depending on the install type specified... the app would either install as a normatl app or a protected app...
Normal apps are stored in /data/app, protected in /data/app-private

craigacgomez said:
Depending on the install type specified... the app would either install as a normatl app or a protected app...
Normal apps are stored in /data/app, protected in /data/app-private
Click to expand...
Click to collapse
The thing is, my /data folder appears as empty and I have 80 apps installed!! I am using ASTRO file manager.

Winzip/winrar

logger said:
The thing is, my /data folder appears as empty and I have 80 apps installed!! I am using ASTRO file manager.
Click to expand...
Click to collapse
Maybe astro can't view the list of files there... I can't list the files there in the terminal application without getting su privileges... use adb pull to get the files...

Related

backup paid games/apps.

Ok, so I just bought my first game from the market and my concern is that I will lose the game because of the amount of times i flash and wipe my phone with new firmwares.
I want to ensure I can back it up properly and would like confirmation if I am doing it right.
Since I can't do a adb pull in the app-private folder, I went into the terminal of my phone and copied the apk from the app-private to the app folder.
I then did a adb pull /data/app/filename.apk file.
So if I wipe and flash my phone and all that jazz, can I merely do a adb push /data/app/filename.apk and then copy it from the terminal in the app-private folder?
or is it more complexe than that?
You do realize that no matter how many times you wipe you can just go back into the market and download again for free?
There are methods of copying and moving files around, but I'm sure most of the developers that make these apps really don't want to talk about it.
flixxx said:
Ok, so I just bought my first game from the market and my concern is that I will lose the game because of the amount of times i flash and wipe my phone with new firmwares.
I want to ensure I can back it up properly and would like confirmation if I am doing it right.
Since I can't do a adb pull in the app-private folder, I went into the terminal of my phone and copied the apk from the app-private to the app folder.
I then did a adb pull /data/app/filename.apk file.
So if I wipe and flash my phone and all that jazz, can I merely do a adb push /data/app/filename.apk and then copy it from the terminal in the app-private folder?
or is it more complexe than that?
Click to expand...
Click to collapse
You can wipe as many times as you want. You wont lose your paid apps. They stay in the market as purchased forever and ever. This isnt some crap like EA and their BS DRM limit to 5 installs per owner.
Edit: Even if the dev pulls the app from the market that you have purchased. It will still be available to download for you at anytime. Only time it will vanish is if the dev refunds you at his request.
beautiful
so many new roms to try.
ok so i did my flashing and all and as you all said I was able to redownload robo defense.... but all my saved content is GONE!
So to prevent this in the future, where do the profiles get saved? is there a folder or file? I have managed to backup that zip file that comes with robo defense but it didn't do the trick.
flixxx said:
ok so i did my flashing and all and as you all said I was able to redownload robo defense.... but all my saved content is GONE!
So to prevent this in the future, where do the profiles get saved? is there a folder or file? I have managed to backup that zip file that comes with robo defense but it didn't do the trick.
Click to expand...
Click to collapse
Application Data is stored in /data/data/{packagename}/
jashsu said:
Application Data is stored in /data/data/{packagename}/
Click to expand...
Click to collapse
Beautiful! thanks a lot.
flixxx said:
ok, so i just bought my first game from the market and my concern is that i will lose the game because of the amount of times i flash and wipe my phone with new firmwares.
I want to ensure i can back it up properly and would like confirmation if i am doing it right.
Since i can't do a adb pull in the app-private folder, i went into the terminal of my phone and copied the apk from the app-private to the app folder.
I then did a adb pull /data/app/filename.apk file.
So if i wipe and flash my phone and all that jazz, can i merely do a adb push /data/app/filename.apk and then copy it from the terminal in the app-private folder?
Or is it more complexe than that?
Click to expand...
Click to collapse
i dont know how i did it but one of my paid apps i do have back-up on my sdcard...the one i have is the snes.apk..in i paid $2.99 for it
Terminal
su
cp /data/app-private /sdcard/ -rf
done.
lbcoder said:
Terminal
su
cp /data/app-private /sdcard/ -rf
done.
Click to expand...
Click to collapse
so what i have to do in terminal cause it tell me not found...more details plz
Do you have apps2sd ?
issue
wel i am having a big issue. i recently flashed my phone. once i installed the cyanogen apk. my market data was one. luckily i downloaded backup for root users. now the problem i am having is when i get to the apps that have backed up as a zip file, how do i install them. extracting leaves me with folders that i cant use. and changing the file extension to .apk doesnt cut it either as it comes back and says installation failed. any clues guys?
To back up private apps
Use Adb pull system/sd/app-private/filename <directory on desktop>
*this is if you have apps to sd
[email protected] said:
Use Adb pull system/sd/app-private/filename <directory on desktop>
*this is if you have apps to sd
Click to expand...
Click to collapse
speaking of apps2sd, how does it work exactly?
does it create a link from /data/ to /system/sd or are they seperate folders entirely?
I ask because when i go delete a file from /data/app, it gets deleted from /system/sd/app so i figured there is a link to the SD card, but then when i do a ls -F in /data folder, the app does not seem to be a symbolic link.

Where are .apk's from Market downloads stored

I've done searches, but, cannot find this. I have found several .apk's in /system/app but, those appear just to be what they would seem, system apps.
I'm looking to backup my items such as lightening Bug, iHeartRadio, Jorte, WiFi Analyzer, Beautiful Widgets etc. that I have downloaded from the Market to a folder on my hard drive, just because, 1, I have the space, and 2, if something happens and those things disappear from the Market, I want to be able to install them again should I ever have to wipe my phone or decide to pay with different ROM's which I may very well do. I have ES File explorer, but, I still cannot find where these files are.
Thanks!
Use titanium backup to back them up and access easily. As for originally I have no idea.
Sent from my HERO200 using XDA App
They are in data/app
Sent with the xda app using CM6
Vandelay007 said:
They are in data/app
Sent with the xda app using CM6
Click to expand...
Click to collapse
I'm using ES File Explorer, and at the top, I am in /
down in the list I see
dev
etc
mnt
proc
to name a few, I also see data, but, when I choose data, it says Empty Folder.
From the Market, these files are downloaded to the device, right, not the SD card. I am using Titanium Backup, but, I also would like to have a backup of the backup, to be safe. One backup is never enough.
Thanks.
I use root explorer and when I open it up there is a data folder that has a sub folder called app and they are all in there....
Sent with the xda app using CM6
They are downloaded to /cache on 2.1 or below, then installed to /data/app. Es won't see it, you need root explorer or do commands as root in adb or terminal. If using a2sd, you still go to /data/app but the folder is symlinked to your ext partition on sdcard.
Froyo is a little different. It downloads to /sdcard/download, and is installed to /data/app if internal or, if external, /mnt/asec which points to a .android-secure folder on your sdcard fat partition.
Sent from my HERO200 using XDA App
data/app or
data/protected-app
danaff37 said:
Es won't see it, you need root explorer or do commands as root in adb or terminal.
Click to expand...
Click to collapse
ES will do it if you are on CM. In ES, you need to go to Settings. Then at the very bottom of settings you should see root options. Enable those and tell it you are using CM. Now you will be able to see the /data contents.
Thanks. This did work too, but now I already have Root Explorer too. But I'm sure it will come I'm handy. Thanks again.
Sent from my HERO200 using XDA App

Honeycomb Music Player - Working on ZIO.

Works 100% on the ZIO with a touch of work.
Since you need about 8Mb of space on your system partition, you'll need to move some apps from /system/app onto /data/app in order to fit the lib and apk.
Use root explorer to copy /system/app/Maps.apk to the root of your SDcard, then use root uninstaller to uninstall Maps.
**make sure you enable r/w access in root explorer.
Run "Maps.apk" from root of your sdcard and instal it like normal. This will install it in /data/app and free up about 5Mb of space on /system.
Remember, this is a beta test. More information can be found HERE.
Directions:
1) Download HC-Music to the root of your SDcard
2) Open with winzip/rar/7z and extract a copy of "/lib/libjumper.so" to the root of your SDcard.
3) Use root explorer to back up "Music.apk" in /system/app
3) open shell on your phone from PC (via adb)
Code:
adb shell
su
cat /sdcard/libjumper.so > /system/lib/libjumper.so
cat /sdcard/HC-Music.apk > /system/app/Music.apk
exit
exit
adb reboot
After you reboot, just open up "Music".
Things you'll notice:
You'll notice "Jumper Test" icon in your drawer. Pretend its not there. Its some debug console for the streaming capabilities of the player (to connect to cloud, itunes, etc...), but the service is not working, and cricket isnt in the list of compatible carriers.
You'll notice "Sync Music" in your sync settings (under menu->settings->accounts n sync). Leave that unchecked.
I'm gonna try this same process for 2.3 mms
Sent from my Zio using XDA Premium App
Let me know how that goes for ya. interested in a new mms, but I dont want Handcent and I like the way 2.3 mms looks
Tried it with the above method. It took but didn't move the MMS. Put it in the /system/app but didn't move the app itself, just made a folder. So I tried installing it straight from the SD card and it works like a charm! Zio a go go with Gingerbread MMS!!!
sinisin said:
Let me know how that goes for ya. interested in a new mms, but I dont want Handcent and I like the way 2.3 mms looks
Tried it with the above method. It took but didn't move the MMS. Put it in the /system/app but didn't move the app itself, just made a folder. So I tried installing it straight from the SD card and it works like a charm! Zio a go go with Gingerbread MMS!!!
Click to expand...
Click to collapse
Can you please provide the link to the mms.apk file you used to install? I found one on the forums but it won't install straight from the SD card.
We'll start new threads with directions for all new findings
Sent from my Zio using XDA App

[Q] Integrating updates of system apps (and/or downloaded apps) into ROM

Okay. I don't have a lot of knowledge on developing/tinkering on Android, but I think I've figured out how to integrate apps into the ROM (updates of system apps and/or downloaded apps). I used:
A stock cricKet 2.2.1 ROM, rooted (of course) w/Universal Androot
Root Explorer, and
ROM Manager (more on this later)
First thing is first, I did a TI backup; don't want to lose anything
I then opened Root Explorer
Mounted R/W, and
did a search for .apk.
Notice that the only directories the actual .apk files for INSTALLED apps should appear in (outside the SD card) are:
/cache
/data/app
/data/app-private (possibly)
/data/FLEX/app
/system/app
Ignore the following:
/cache
/data/FLEX/app
Now, you may already know this, but the system apps you're looking for are located in the /system/app directory, and downloaded apps (for the updated system apps) are located the /data/app directories that aren't being currently ignored (if you're following my instructions). Based on icon, filename, and common sense, I found which .apk files were the updates of already existing system apps (IE Market, Google Maps, Voice Search, etc.) in the /data/app directory, and the corresponding system app they updated in the /system/app directory. I then:
Copied the filename of the system app I was going to replace (rename copy all)
Moved over to the /data/app directory
Located the corresponding updated app
Renamed it what its corresponding system app was renamed (rename, delete existing name, paste)
Hit the 'move' option
Navigated to the /system/app directory
Deleted original system app (you may want to backup this file beforehand)
Pasted the updated system app
Within 30 seconds or so, you should get a (blah.blah.blah has unexpectedly shut down force close/report) popup. Just hit force close and you should be fine (Google Maps seemed to be a recurring FC). If you try to open the app before rebooting, it will force close on you. When you're finished, open ROM Manager. I know you're thinking 'This app is no good on the ZIO'; so stop. Hit 'Fix Permissions'. The reason for this is that it fixes a few rare force close issues. I don't know the mechanics of it, but it works, so I don't question it. Listen to the notification you'll see and reboot your phone after it finishes fixing the permissions. Now go into settings and manage applications, and you'll see that you can no longer uninstall whatever apps you moved to the /system/app directory.
FYI Renaming .apk files doesn't seem to make a bit of difference either way.
(Forgive my horrible perspective descriptions: I/you)
I haven't tested it yet, but I believe unrooting the device should make any apps moved to the /system/app directory that require root access would become non-functional (right?). The reason this thread is a question is that I'm wondering if i did this correctly, and if so, I want to find out if unrooting and factory resetting my phone would somehow delete the apps in the /system/app directory that weren't included in the stock ROM. (I'm not really willing to do that yet; I still have to download the SDK to my new computer so I can do a NANDROID backup.) Any help answering these from a more experienced developer would be great.
If you want to incorporate apps into a rom, the apps have to be free or you must get consent from the developer to include in your rom
Sent from my Zio using XDA Premium App
Only if it is a Public rom. Even free app developers should be credited in a public rom
Mattix724 said:
If you want to incorporate apps into a rom, the apps have to be free or you must get consent from the developer to include in your rom
Sent from my Zio using XDA Premium App
Click to expand...
Click to collapse
I'm operating under the assumption that you're using Google developed updates of system apps. I suppose I should have said something to that extent up top.
[UPDATE]
Okay, so I did a NAND and then factory reset my phone. Killed everything not in the /system/app directory. I'm sure you knew that would happen, but I guess I'm posting for the noobs. Easier to find, I guess.
Hi,
I've tried to integrate some apps using Titanium Backup but it stuch at 0% for more than 5mins so I cancelled the process. Is it normal that it was that slow? Does Titanium generate odex files too?
I've tried integrating updates for GoogleMaps, StreetView and Youtube using a recovery mode and ADB on my linux machine.
After the backup system data I've deleted original apk and odex files from /system/app/ and moved newer versions from /data/app/ to /system/app/.
I renamed the files from com.google.android.blah.blah.apk to old names (ie. Maps.apk, etc). I haven't generated the odex files.
Rebooted the phone (HTC Desire, 2.2, Orange UK) and these apps were not available. I couldn't run either GoogleMaps or Youtube. They weren't on the "All apps" list, but still were in the system app manager/uninstaller, but couldn't uninstall them as they were in system obviously.
Tried to clear Dalvik cache but no difference.
Then I've copied them with my user backed apk files (it went to /data/app and installed the newest versions) and all is fine - could launch them as usual.
Now using "adb push" method I copied my old system versions of these apps in the /system/app/ and all if fine. I could updated them to newer versions, but this obviously went to /data/app/, so didn't free the phone memory.
Any idea why integrated apps were not visible in the system?
Perhaps I shall just delete the old system apps and copy the ones from /data/app/ without renaming...
Much appreciate it.
Greg
edit:
All went fine now. Just deleted old files in the /system/app and moved newer version without renaming to from /data/app
use titanium backup and choose integrate updates into rom for the app
I don't want to pay for TB premium. I'm poor.
Sent from my Zio using XDA App
TB integrating not working on some phone (including mine) anyway.

[Q] move apps into stock rom odexed

Guy How can I move applications into the system without causing them to crash, I tried it with titanium and terminal emulator but only rootexplorer okay....?
angel.sea said:
Guy How can I move applications into the system without causing them to crash, I tried it with titanium and terminal emulator but only rootexplorer okay....?
Click to expand...
Click to collapse
To move some apps like android terminal emulator you must add lib(from this app) to /system/lib or something else. About titanium backup/pro i preffer to stayin' it in /data
Alucard1989pl said:
To move some apps like android terminal emulator you must add lib(from this app) to /system/lib or something else. About titanium backup/pro i preffer to stayin' it in /data
Click to expand...
Click to collapse
Titanium does not move these lib when moving applications to / system / app?
Link2Sd?
Sent from my GT-S5830i using xda app-developers app
Alucard1989pl said:
To move some apps like android terminal emulator you must add lib(from this app) to /system/lib or something else. About titanium backup/pro i preffer to stayin' it in /data
Click to expand...
Click to collapse
Titanium does not move these lib when moving applications to / system / app?ne Someone told me that if i don't deodex my rom i risk to crash all applications*
try luck with root explorer
I do not know how to pull these libraries, to move I can use the terminal emulator ... someone can tell me where I find them?
angel.sea said:
Titanium does not move these lib when moving applications to / system / app?ne Someone told me that if i don't deodex my rom i risk to crash all applications*
Click to expand...
Click to collapse
I don't never say the Titanum backup can moves libs or something
Alucard1989pl said:
I don't never say the Titanum backup can moves libs or something
Click to expand...
Click to collapse
Sorry for my english but it was a question
angel.sea said:
Sorry for my english but it was a question
Click to expand...
Click to collapse
OK i mean the some app like Root Explorer don't need to move lib(s) (from this app) to /system/lib to working fine without ForceClose(FC) but some apps like Android Terminal Emulator need to move lib(s) (from this app, just open it like package file as rar or zip with 7zip or winrar on PC and copy lib(s) from folder(s)) to /system/lib. But i don't know how Titanum Backup work when you copy this app to /system/app and change permisions(rw-r--r-- / 644) and restart phone. Maybe it'll work good without FC or will FC . I hope you understand what i tell you
Kevo9513 said:
Link2Sd?
Sent from my GT-S5830i using xda app-developers app
Click to expand...
Click to collapse
^^ THIS
make sure you have root, download and install Link2SD then grand access to root permission (if not using to to make more space or its orginal intended use) then skip when it asks for partition info by pressing back.
select app you want to move then select convert to system app for normal apps or intergrade update into system for updates to system apps like playstore etc.
REBOOT phone after doing it all to get rid of forsed closes. Some apps dont like being used like this. You can also try Apps2Rom in playstore I have used but prefer L2SD as I use it for more memory my linking apps to the SD

Categories

Resources