Restoring protected .apk? - G1 Apps and Games

I have a question. Is there a way to restore a protected .apk file that i have pulled off my SD card?
I'm using apps to SD, i can copy my protected apps OFF the device (from my system/sd/protected-apps folder). but if i try to re-install them it says "installation failed". or if i just copy back into the private-apps folder, they just dont show up at all on my phone.
I own the apps I'm trying to restore. I'd just like to have a "hard copy" backup on my PC in case something catastrophic happens to Google.
any help is appreciated.
more info:
using cyanogen's 3.4.6 rom w/ apps2sd ext3 partition.

How are you trying to reinstall?
Try from your command prompt:
PathName> Adb install ____.apk

I was using the package installer through "linda file manager"
is there a way to execute that install from within the terminal emulator?

busybox install name.apk /data/app

dills84 said:
I was using the package installer through "linda file manager"
Click to expand...
Click to collapse
Works fine in ASTRO File Manager.

Related

Edit roms before flash

I want to make my own rom based on the cyanogen rom. I want to add a few apps and remove a few that already exist.
I have tried using the adb but it wont uninstall the ones I dont want.
I would like to mod a rom before I flash it, Is there a how to for this?
Thanks,
Dubstar_04
I dont think there's a how-to, but I can type a quick one in a jiffy;
Tools;
A computer (Windows PC in this example)
7zip (google it)
The rom you wish to modify.
Either JRE or JDK (so you can run java apps) (google it)
JF's testsign.jar (google it)
Method:
Install 7zip in your computer. Also install the Java runtimes so you can run java apps through the console (ahem, command prompt).
Unzip (if it's not already) your testsign.jar and place it somewhere easy on your HDD (C:\, for example, doesn't get easier than that). Also place the rom you wish to modify in the same folder.
Open the update.zip file (or whatever it's called) with 7zip (you can do this by either using the command dialog (right click) and selecting 7-zip > Open Archive, or by going right-click > Open With > Choose Default Program and select "Always open with this program" with 7zip FM (file manager)).
Once it's open, navigate to the folder system/app and remove in there any apks you don't want in there (for example, I always remove VoiceSearch.apk, VoiceDialer.apk, SystemUpdater.apk, Talk.apk, and when available, SpareParts.apk, com.mp3.amazon.apk, and a few others). That is basically the uninstall process. If you have the apks for the apps you wish to install, you can drag them into the 7z windows at this point too (if you have hboot spl, you have a lot of space in system, so dumping them here is safe). If you don't have the apks, but you have them installed in your phone, you can use adb to get them. Just make a folder in your desktop called app (or whatever you wish) and run adb with your working directory in the desktop (C:\users\myname\desktop). The adb command would be: adb pull data/app app. This will place all the contents of downloaded apps (free ones) inside the app folder in your desktop as apks. I don't know that there's anything you can do at this point about paid apps.
Anyway, once you're done deleting and adding apks to your zip. Close the 7zip window (it saves the changes automatically, you should have kept the window open through the whole process).
Open up the command prompt again, and change your working directory to C:\ (usually cd ../..), then, if you placed all like I told you to, you can just run; java testsign updatenamewhateveritis.zip
Ofcourse, replace updatenamewhateveritisi.zip with the name of the update, but I recomend renaming it to update.zip beforehand so you don't have to type a lot.
After it's done signing, the rom is ready to flash.
Good lucks to you
Wow...Good explanation.
I have few questions.
-Do i need the jar sign thing?
-Can I create a flasheable update.zip to "add/remove" apps to a fresh flashed rom? (I mean, flash a custom rom and then apply update.zip which can add and remove apk ), or do you recommend to modify the zipped rom instead of creating a update.zip ?
Many thanks
Depending on your recovery you can just toggle on/off if you need a signed zip or not. This is a very old thread and I imagine it was much harder to push apps into /system back then or to remove /system apps for that matter. With root access there are many apps you can do this with now, or with adb or terminal emulator
What is your purpose for this by the way? I feel there may be easier ways to accomplish what you're after
Sent from my GT-I9100 using xda premium
Thanks for answer
Yeah...it's and old thread, but actually it saved me to post a similar topic thread again :good:
My purpose? Not developing anything nor cooking rom. I just found at http://wiki.cyanogenmod.com/wiki/Barebones that i can safely uninstall apks that i don't use. So i uninstalled some of then, and i was thinking, in case of reinstalling the rom or flashing a new version of it, how to erase the unusefull apks(for me at least) in one step.
I think the easiest way is removing them from the zipped rom before flashing.
What do you think?
yes you can unzip and rome .apks, but then you will have to sign it unless your recovery allows unsigned zipps. why not flash the rom as is, remove all the unwanted, add what you like, then make a nandroid copy of the way you like it. this can then be flashed whenever
Sent from my HTC Vision using xda premium
Oh...the sign thing!
Anyway, there are few useless apks, so i think i can do it manually after flashing rom.
Hey. I'd like to know what nandroid is...
I use CWM recovery to backup/restore data/rom and I use Titanium Backup for the applications. So what the **** is nandroid. I mean, is an apk? Is a boot tool? And what can i do with it?
Thanks a lot dude!
it is the backup you make in your recovery, you will make either a nandroid backup or bart backup. depending how it is done it will be an exact copy of your rom, apps, call log, etc. any thing stored to you phone @ that "recovery" point
it gets its name from nand (the nand flash memory) and android, some recoveries may just call it a backup
Sent from my HTC Vision using xda premium

How to Mass Install Apps with ADB?

So, I want to do a flash and have backed up all the APPs into a folder. So, is there anyway to install all the apps onto the phone that is in inside the backed up folder using ADB after I reinstalled? I know this should be possible since there is a way to do a mass pull using ADB.
shaolinx said:
So, I want to do a flash and have backed up all the APPs into a folder. So, is there anyway to install all the apps onto the phone that is in inside the backed up folder using ADB after I reinstalled? I know this should be possible since there is a way to do a mass pull using ADB.
Click to expand...
Click to collapse
Could write a batch file/shell script to iterate through a folder and adb install the contents of it.
shaolinx said:
So, I want to do a flash and have backed up all the APPs into a folder. So, is there anyway to install all the apps onto the phone that is in inside the backed up folder using ADB after I reinstalled? I know this should be possible since there is a way to do a mass pull using ADB.
Click to expand...
Click to collapse
Sure there is:
If you have app2sd:
adb push folder of apps /system/sd/app
If not:
adb push folder of apps /data/app
Assuming adb is in your path, open a command prompt at the folder containing your APKs and issue:
Code:
for %f in (*.apk) do adb install "%f"
Thanks all, both of your way works.
Thanks
Awesome thank you for the help. Have been trying to figure this out for a while.
AdamPI's answer will only work if you use a virus instead of an operating system. The correct answer is this;
for FILE in *; do /path/to/adb install "$FILE"; done

Looking for the best batch installer/uninstaller app

I'm looking for the best app for batch uninstalls for root or non-root. As for batch installs I'm looking for the best non-root app since I use backup for root.
ADB
10char
How about an app? Also I know you can do 'adb install asdf.apk' but how can I do it batch? Like what specific command is it?
ThR1LL said:
How about an app? Also I know you can do 'adb install asdf.apk' but how can I do it batch? Like what specific command is it?
Click to expand...
Click to collapse
I dont think there is an app right now in the market that can do batch install/uninstall. you have to do it on your pc. I also use backup for root, and i backup all my apps. since i dont use apps2sd on my magic, i have everything internal, so after a wipe/flash i need a fast way to reinstall all my apps. found this on the forum and works great.
create a batch file.
1. open up notepad n copy and paste this code: for %%f in ("LOCATION_OF_APK_DIRECTORY\*.apk") do adb install "%%f"
2. replace with the location to your actual APK folder.
3. save as a a batch file (.bat)
For example, mines is like this:
for %%f in ("F:\Backup\Files\Mobile_Stuff\Android\HTC_MAGIC\01_CupCake\apk\*.apk") do adb install "%%f"
and I saved as apkinstall.bat
So now, whenever you want to install batch apks, just drop the apks into the folder you selected above, and double click the batch file.
Gphonemanager
It does batch uninstall. You just have to select 'ok' one by one until you've uninstalled all the apps that you wanted to.
put all your apps in a folder called
app
app-private
depending on which one it was
open command prompt in the folder containing those two folders and use the commands
Code:
adb remount
adb push app /system/sd/app
adb push app-private /system/sd/app-private
adb shell reboot
Is there any way to relink an .apk (coming from a backup, usually) with its origin on Market ?
I have hundreds of market-installed apps and after each reset I have to reinstall one by one, if would keep the market download update feature...
Thanks

com.androidmegastore.livewallpaper.gogreen.zip

I installed this from the market on my legend rom. I have created a nandroid backup of that rom and I'm now rockin the nonsense rom from team-slide (great rom by the way!). However I'm trying to find this on the market now and it seems like it is nowhere to be found. I've tried a variation of searches with no luck. So I thought, well I'll just restore my legend rom backup and adb pull the file from there. It was located in the /data/app as a .zip file while the other apps were .apk. Anyhow I was able to pull the file and its now on my computer. I then did a restore to my nonsesnse rom but I'm unsure how to get the zip file back on the phone. I can adb push it on there but it doesn't 'install' it per sey. Any ideas on how to get this app back on the nonsense rom?
You can place the apk on the sd card and then on the phone you can use astro to install it. If that doesn't work you can connect to the pc and use the "adb install" command.
Sent from my HTC Mytouch 3G Slide using XDA App
Part of the problem is that I don't see an apk file. The file is actually .zip in the /data/app path. The other files in the /data/app path are .apk files. Am I missing something here or is the apk file in another path? When I unzip the file on my computer there are multiple folders. If I had the actual apk then I might be in business. Any suggenstions on where it might be hiding?
go to app private in the backup that u got the zip from there should b the apk
update - app private had the apk, installed and working fine, thanks for all the help. So is it safe to say if it is a zip file the apk will always appear in app private? Why make this different from the other apks? Is it just developer specific i guess?

How do I install an APK file from my SD card?

Hi.
I have been emailed an APK file for an App and need to install it.
I have transferred to the root directory of the phones SD card, but am stuck from there.
Any ideas?
have you tried just going into your files and selecting it. Usually it will prompt you to install the .apk and thats about it. You might need to allow non market apps, but it again should prompt you to do all this. There is probably another way, but i've never had to do any other extra steps.
scott2ride said:
Hi.
I have been emailed an APK file for an App and need to install it.
I have transferred to the root directory of the phones SD card, but am stuck from there.
Any ideas?
Click to expand...
Click to collapse
Download Easy Installer from the market. It is free and will install from internal or external memory.
Thanks. Mucy appreciated
I usually have defaulted to easy installer but have had an eye opener with system apps because they are not that easy. I guess sys apps you need to push with adb or need a root file explorer co copy and paste the app within a specific directory file

Categories

Resources