![]() |
Download apps to harddrive
Guys,
Can we download apps from a server etc to save on our harddrive. So when we reflash the phone we don't have to chew up extra data downloading them? Stephen |
Re: Download apps to harddrive
I assume N900 user? Additionally I assume Maemo5? This won't work for anything downloaded from ovi store fyi.
Save the .deb packages locally and copy them somewhere. Then you can simply copy them back to the N900 and dpkg -i *.deb As far as the packages you have installed go (provided you have not done a apt-get clean) Something like this to backup to another computer # scp /var/cache/apt/archives/*.deb user@server:/home/user/maemo/ Later # scp user@server:/home/user/maemo/* /home/user/MyDocs/ # dpkg -i /home/user/MyDocs/*.deb If you want to just download packages to install later then you can: # apt-get -d install unzip # dpkg -i /var/cache/apt/archives/unzip_5.52-14-maemo6_armel.deb |
Re: Download apps to harddrive
Quote:
Yes mate, N900 Maemo 5 user. I think the last comments is more what I am looking for though not clear. I wish to download the files and be able to save them on a harddrive so if required later. I can simply copy to a location and then extract rather download all over again. I hope that is clearer? |
Re: Download apps to harddrive
Mate,
what does that last uzip package do? |
Re: Download apps to harddrive
when you download stuff and something gets updated in the servers, you have to make updates (and most packages have some dependencies that has to be downloaded)
trust me, you don't want to do what you are suggesting. I've learned my lesson with debian installing application and a dozen dependent packages manually.... |
Re: Download apps to harddrive
Unzip what just an example of a package. That is all.
By harddrive, do you mean a random harddrive (on a desktop for instance) or are you referring to the eMMC (internal SD card) in the N900? I suppose you could even simply save the files to a microSD card. Yeah so when you install packages they are first downloaded by the package manager and saved to the location /var/cache/apt/archives/ temporarily before they are installed. They aren't deleted from the location usually unless you delete them manually or with autoclean (or similar). Anyway, you can just go ahead and copy them to your sd card (I'm not sure where it's mounted in your case; I'm an N810 user and not too familiar with the N900; my suggestions are generic debian-based instructions) # mkdir /media/mmc1/debz # cp /var/cache/apt/archives/*.deb /media/mmc1/debz/ might work for you but again I'm not sure that's the right mount point. Now if you want to be sure you are getting all the debian packages, you can be sure to # apt-get -d install foo # cp /var/cache/apt/archives/*.deb /media/mmc1/debz/ # apt-get install foo Hope that helps EDIT: For people that just want a list of installed packages (that way you can just go somewhere that has free wifi access and download all the packages in one shot after reflashing) Backup: foo=`dpkg -l | grep ii | awk '{ print $2 }'`; echo $foo > /media/mmc1/copymesomewheresafe Restore: bar=`cat /media/mmc1/copymesomewheresafe`; apt-get install $bar |
Re: Download apps to harddrive
/media/mmc1 is correct so the instructions apply
|
Re: Download apps to harddrive
Quote:
That is perfect mate, much , much appreciated. Both options are perfect! For a guy like me that makes errors and has little idea, lmao. Trying different suggestions, kernels, overclocking, porting OS etc. This has needed me to reflash a few times now, each time downloading approx 50 apps must be killing my data. Hence why I asked, after run the update and anything missed will be updated and current. The update saves the wasted +70% of apps that were current being downloaded. |
Re: Download apps to harddrive
Quote:
I have done a reflash and fresh install so time to use these codes given. First part was easy though after adding 48 apps, only 3 listed in archives. So went to next step (see bold and in red), returns E: Couldn't find package foo. What do I do here? Stephen |
Re: Download apps to harddrive
Quote:
|
Re: Download apps to harddrive
Hmmmm, now I am confused.
I thought he was saying the apps manager downloads the apps to the /var/cache/apt/archives/ folder and then extracts from there. If apt-get clean was not used then the .deb files will remain and hence we are copying them from the /var/cache/apt/archives/ to the debz folder in SD card /media/mmc1/debz/. I wasn't sure what the next line did though sounded as if it made sure you got all the files, thought foo was a command or something. So your comments now really confuse me as to what is actually happening and what I am meant to do. Do I still download via app manager as normal and is this to be run in term afterward? |
Re: Download apps to harddrive
Sorry for confusing you.
The initial commands were diagnostic to see if the apt-get system had any errors it needed to correct (these don't show up in Hildon Application Manager rather it just stops working) Now that you have reflashed and there are no problems you can ignore that step. As far as what you asked - saving your .deb packages for re-installation later. You should be able to use the graphical Application Manager as normal. (If someone wants to package this up as a pretty GUI program, then go for it. I'm not a fan of the syntax related to packaging up GUI programs) Backup Make folder/directory to on SD card Code:
# mkdir /media/mmc1/debzCode:
# cp /var/cache/apt/archives/*.deb /media/mmc1/debz/Make folder/directory in Maemo Code:
# mkdir /root/debz/Code:
# cp /media/mmc1/debz/*.deb /root/debz/Code:
# debzinstall() { cd /root/debz; foo=`ls *.deb`; dpkg -i $foo; } |
Re: Download apps to harddrive
Ok, so I wasn't off the mark with intent, just not fully understanding all the code.
The funny thing is, I did it yesterday and reinstalled 48 apps to be exact and when I went to the folder: /var/cache/apt/archive/ Only 2 deb files resided and they were nano and some other file which I think was associated to nano. So this doesn't seem to be the place it stores the archives? Any other suggestions guys, I'm sorry I haven't a clue and you are doing your best though haven't an n900. I hope I don't sound rude linuxeventually, I am very grateful, you are assisting me perfectly. Stephen |
Re: Download apps to harddrive
My browser ate this post, so let's try again...
/var/cache/apt/archive is not meant as a permanent storage for .deb packages (unfortunately). Every once in awhile a package manager will do some "housecleaning" and delete the contents of that folder. It's really only meant as a temporary storage location while the package manager installs the packages. While it would be trivial to whip up something to copy the .deb files to your SD card always immediately after installing packages from apt-get (or even something like grabdebz() { sudo apt-get -d install $1; cp -n /var/apt/cache/archives/*.deb /media/mmc1/debz/; sudo apt-get install $1; }; grabdebz ) That would only work if your only means of installing packages was through apt-get. But because you use Hildon Application Manager (GUI) and I am not aware of anyway to tell it NOT to delete the contents of /var/cache/apt/archives and furthermore can't inject an option to tell it to first download, then copy to SD, then install packages, I think you are out of luck with that method. And it's not open source, so the option cannot be added. You might be able to convince hqh to include the functionality in Fapman though. So then my only suggestion would be to simply save a list of installed packages and store that list somewhere safe (SD card for instance). Then whenever you end up needing to re-flash, go somewhere that has free wifi and use that list to re-download and install those packages onto your new install. It's not ideal but I don't know what else to suggest. Backup: Code:
foo=`dpkg -l | grep ii | awk '{ print $2 }'`; echo $foo > /media/mmc1/copymesomewheresafeRestore: Code:
bar=`cat /media/mmc1/copymesomewheresafe`; apt-get install $barSomething else that would be nice but that AFAIK doesn't exist and would be a major pain to script would be to figure out how to tell [say for example] your Ubuntu desktop/laptop to download the Fremantle armel packages from your list (including all dependencies) to a SD card to install that way. |
Re: Download apps to harddrive
ok,
so just downloaded all apps again and did apt-get upgrade/ update, install nano, wget, bzip2 & unzip. These are the only deb files listed in the archives cache. This time I downloaded 44 apps via app manager, not one of these are listed in the archives folder and hence none copied across. It is mainly the apps manager debs I am trying to grab. I assume these are either erased immediately or downloaded to another folder? |
Re: Download apps to harddrive
Linuxeventually,
sorry replied and then saw your comments. Understood mate, the later is thinking outside the square and liking that. Please post any suggestions, happy to try and feed back. Thanks for your help so far. Stephen |
Re: Download apps to harddrive
A thought occurs to me.
This is an initially inefficient idea but in the long-run if you reflash often would a.) work b.) in the long run be efficient. Okay so rather than copy the contents of the temporary store folder and rather than download packages before installing them, why not install packages like normal, then occasionally when you want to back them up, re-download them to your SD card. 1.) Install packages like normal 2.) Prep Code:
# mkdir /media/mmc1/debz{,/archives}Code:
Code:
# debzinstall() { alldebz=`cat /media/mmc1/installdebz.txt`; apt-get -o dir::cache=/media/mmc1/debz install $alldebz; } |
Re: Download apps to harddrive
1 Attachment(s)
@Coffee
Okay I put together a script that should work for you. It's fairly "smart" so it shouldn't give you any problems. The script is attached. I also put it in my box.net account: http://www.box.net/shared/z8crpmsrtd (save to /usr/bin/savedebz and chmod +x /usr/bin/savedebz ) The same script follows: Code:
#!/bin/bashBackup/Download files to SD Code:
$ sudo savedebzCode:
$ sudo savedebz install |
Re: Download apps to harddrive
Thanks mate, will download and give a try now.
|
Re: Download apps to harddrive
linuxeventually,
I have tried and failed, I think my fault. I have since partitioned my MicroSD card into 4, as follows: mmcblk1p1 MicroSD 3gb fat32 mmcblk1p2 Swap 500mb 82 mmcblkp3 NITDroid 1.9gb ext3 mmcblkp4 Easy Debian 2.4gb ext2 It errors" mkdir: cannot create directory '/ media/mmc1/debz {, /archives} Does this need to be altered slightly to write specifically mmcblk1p1? Sorry for the hassle, much appreciated though, this will be so good and so close..... |
Re: Download apps to harddrive
1 Attachment(s)
EDIT: FIXED. Current version is 0.7 (Changelog: line 13 had a hardcode for sda2 and line 10 wasn't copying correctly so I split it)
Yeah the first line of the script lets you easily change the location of the SD card. Well the physical location of the partitions is usually very handy but in this case you need the mount point. Something like changing sdhc="/media/mmc1" to sdhc="/media/mmc2" would do the trick. Don't worry finding the mountpoint is easy. Code:
$ partmount() { df -h | grep /dev/$1 | awk '{ print $6}'; }Or you could just use the modified script (defaults to wherever /dev/mmcblk1p1 is mounted but prompts anyway, you can just hit enter): Code:
#!/bin/bash |
[ANNOUNCE] SaveDEBz
Current version is 0.9
* Now available in extras-devel (Fremantle, Diablo, Chinook)! :D The savedebz script has no major bugs that I am aware of. Need to do a real-world test tomorrow. Introducing zsavedebz, utilizing a simple zenity GUI it has the same functionality as savedebz. zsavedebz has a couple minor bugs that I'll fix tomorrow. * Zenity window sizes are too small * Need to grep -v the virtual mountpoints from the dialog TODO LIST: * Better documentation * Better description * Icon and/or .desktop file(s) for zsavedebz * Add check for root to both scripts using UID After that, I'll check things over a few times (and get testers?) then I'll promote to extras. USAGE: Backup/Download Code:
$ sudo savedebzRestore/Install Code:
$ sudo savedebz installBackup/Download Code:
$ sudo zsavedebzRestore/install Code:
$ sudo zsavedebz install |
Re: Download apps to harddrive
Linuxeventually,
I tried it mate and still got an error, something about not being able to create the folder and access the card. That said, I do have items on my card in the location, files I think. Something like newdebz, all debz etc. I ran the mounting code and returned "media/mmc1" Q. Do I run this before I start downloading or after, silly question I am sure and expect after though just checking. Stephen |
Re: Download apps to harddrive
I created the folders myself and then ran it and still didn't work correctly.
Got the whole, installing, reading packages list, building dependency tree, stat info, then.... E: Handler silently failed Finished. I don't know why, in xterm I couldn't mkdir /media/mmc1/debz though in file explorer I could create a folder. Anyway, just my feedback. I will flash it now and then try again. |
Re: Download apps to harddrive
Yeah sorry, hold on. I didn't get to work on it today and I tested it on a clean install and the script is borked. Not sure if it's the lack of BASH or if it's something I changed. Working on it now =\
0.9 is not stable. Sorry. Unforseen bugs |
Re: Download apps to harddrive
Not a problem mate nor a rush, most thank full you are even doing this.
|
Re: Download apps to harddrive
Yeah well it's something that has bothered my for a long time.
I always just figured there was a tool that already exists but the closest that I've seen is apt-cd and every time that I have used it, it didn't restored properly. I was doing the majority of my testing in Scratchbox so I didn't notice some major issues that come up on the device. For instance the big issue right now is that because I have it "installing" (in order to download I have to tell it to reinstall the packages) ALL the packages on the system that includes packages that shipped with the firmware. Attempting to re-download those results in several conflicts and dependencies errors that I am unable to force and results in crashing the script. It seems my best bet in resolving that issue is to find a list of all stock packages and exclude them from the script. More personal things came up last night so I didn't progress far but I definitely want to get this stable soon. |
Re: Download apps to harddrive
Not having any idea at all, can it be done from another angle?
I noticed when I backup after install and setup done, the back up contains a list inside a zip in the location the backups are stored. Whilst it doesn't store a copy of the actual files required, it does a list. However it does it, it reads the list reads the list and then downloads them from repo's. Are we able to use the list, to download them and redirect those saved deb files to a folder and prevent from install. Then just need to know how to install those deb's that we have. I am sure this is pretty much what you are doing though can we use the backups list, does it make things any simpler? |
Re: Download apps to harddrive
If you have a backup list that you'd like to send to me then I could implement that. I don't recall such a feature on the N810 but maybe I just wasn't looking in the right place.
But yeah all the script does right now is: 1. Ask dpkg to generate a list of installed packages and save that list to SD 2. Generate a list of packages stored on the SD (if any) 3. Download the installed package minus the ones already saved to SD (if any) 1. Download packages found on the SD card I need to make it much smarter clearly as it fails pretty easily. But by having a proper list of what to download and what shouldn't be downloaded (installed by default) should eliminate the errors. I came across Rob1n's package sources script which may help. This little endeavour is going to need to grow to get this properly done. TO DO LIST * Fix the depends bug * Implement Rob1n's script as a possible solution or feature * Implement a search for saved .debs anywhere in the home directory * Implement better checking * Implement not reinstalling any packages when restoring. * More redundant checks, less redundant downloads If anyone has any pointers, like for instance the URL of the page that has all the stock packages mirrored (I lost the link) please reply. |
Re: Download apps to harddrive
firefox ->/home/user/MyDocs/.documents
system-> /var/tmp (.install ) /home/user/MyDocs/.apt-archive-cache(.deb) but Automatically cleared after installation so Must download it before,Immediately extracted |
Re: Download apps to harddrive
Linux,
Attached is my last backup mate, inside you will find an applications zip and inside it a list. Hope that helps any? hmmmm, can't attach files, any suggestions, I can email if you like, PM me. I had a look and it has 2 files: catalogues.backup packages.backups Stephen |
Re: Download apps to harddrive
opened in wordpad and list as follows:
catalogues.backup: <catalogues> <catalogue> <file>variant-catalogues</file> <id>nokia-certified</id> </catalogue> <catalogue> <file>variant-catalogues</file> <id>nokia-system</id> </catalogue> <catalogue> <file>variant-catalogues</file> <id>ovi</id> </catalogue> <catalogue> <file>variant-catalogues</file> <id>maemo-extras</id> </catalogue> <catalogue> <uri>http://repository.maemo.org/extras-devel/</uri> <dist>fremantle</dist> <components>free non-free</components> <name>Maemo Extras-Devel</name> </catalogue> <catalogue> <uri>http://moff.mozilla.com/latest/maemo/multi/</uri> <dist>chinook</dist> <components>release</components> <disabled/> <name>Mozilla multi Catalog</name> </catalogue> <catalogue> <uri>http://deb.opera.com/maemo</uri> <components>non-free</components> <disabled/> <name>Opera Catalog</name> </catalogue> <catalogue> <uri>https://downloads.maemo.nokia.com/fremantle/ssu/apps/</uri> <dist>./</dist> <components/> <disabled/> <name>fremantle ssu apps</name> </catalogue> <catalogue> <uri>https://downloads.maemo.nokia.com/fremantle/ssu/mr0/</uri> <dist>./</dist> <components/> <disabled/> <name>fremantle ssu mr0</name> </catalogue> <catalogue> <uri>https://downloads.maemo.nokia.com/fremantle1.2/ovi/</uri> <dist>./</dist> <components/> <disabled/> <name>fremantle1.2 ovi</name> </catalogue> </catalogues> packages.backup: <backup> <pkg>ttf-droid</pkg> <pkg>storageusage</pkg> <pkg>rulerjinni</pkg> <pkg>openssh-server</pkg> <pkg>wifieye</pkg> <pkg>d-theme-night</pkg> <pkg>multiboot</pkg> <pkg>feedservice2</pkg> <pkg>gnumeric</pkg> <pkg>easy-deb-chroot</pkg> <pkg>conky</pkg> <pkg>zip</pkg> <pkg>drnoksnes</pkg> <pkg>feedservice-plugin-fb-common</pkg> <pkg>knots2</pkg> <pkg>account-plugin-haze</pkg> <pkg>ogg-support</pkg> <pkg>nitdroid-kernel-2.6.28-05</pkg> <pkg>foreca-weather-applet</pkg> <pkg>feedservice-plugin-fb</pkg> <pkg>facebook-services</pkg> <pkg>googlelatitude</pkg> <pkg>kernel-power-flasher</pkg> <pkg>vgba</pkg> <pkg>purple-extra-protocols</pkg> <pkg>dtg</pkg> <pkg>python2.5-qt4</pkg> <pkg>fb-migrator</pkg> <pkg>simple-fmtx-widget</pkg> <pkg>openssh-client</pkg> <pkg>sharing-service-facebook</pkg> <pkg>rootsh</pkg> <pkg>multiboot-extras</pkg> <pkg>personal-gprs-mon</pkg> <pkg>opera-mobile</pkg> <pkg>fennec</pkg> <pkg>xournal</pkg> <pkg>healthcheck</pkg> <pkg>personal-ip-address</pkg> <pkg>leafpad</pkg> <pkg>kexec-tools</pkg> <pkg>cuteexplorer</pkg> <pkg>foreca-installer</pkg> <pkg>autodisconnect</pkg> <pkg>sharing-service-photobucket</pkg> <pkg>dtg-installer</pkg> <pkg>lzma</pkg> <pkg>telepathy-msn-pecan</pkg> <pkg>decoders-support</pkg> <pkg>grsync</pkg> <pkg>conversations-inbox-widget</pkg> <pkg>ecoach</pkg> <pkg>custom-operator-name-widget</pkg> <pkg>easy-chroot</pkg> <pkg>facebook-installer</pkg> <pkg>kernel-power-settings</pkg> <pkg>petrovich</pkg> <pkg>headphoned</pkg> <pkg>fm-boost</pkg> <pkg>matrix</pkg> <pkg>d-theme-aero-blue</pkg> </backup> |
Re: Download apps to harddrive
posted by Mohamod AG
Ovi Store paid debs: /var/tmp Other debs: /home/user/MyDocs/.apt-archive-cache debs installed through apt-get: /var/cache/apt/archives Hope that helps |
Re: Download apps to harddrive
Quote:
In the Maemo Downloads there is just the Install option. |
Re: Download apps to harddrive
This thread died quickly, lol
|
| All times are GMT. The time now is 11:56. |
vBulletin® Version 3.8.8