maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   N900 Backup your application packages (https://talk.maemo.org/showthread.php?t=64648)

sultanmaideen 2010-10-29 10:00

N900 Backup your application packages
 
There are circumstances where you might caught with bricking your device or something happened to it which ultimately leave you with no other choice other than flashing your device and reinstalling all your favorite applications right from the scratch. Or it may be possible that the repository doesn’t host your favorite application any more.

One of the solutions is to keep DEB package of your favorite apps as a backup for future installation.

Tools Needed
• Terminal emulator (X Terminal or SSH)
• VIM editor (Available in Extras http://wiki.maemo.org/Extras)

Create Backup Folder to Download Apps
Openup XTerminal and create the required folders as follws:
$ mkdir -p /home/user/MyDocs/apt-archive-cache/archives/partial

Create Application List
1) Once all required applications are installed, create a new backup in your device.
2) Copy “applications.zip” found in Backup folder from your device into your PC.
3) Extract “packages.backup” file from the created backup “applications.zip”.
4) Open “packages.backup” in notepad. Remove “<backup> ” and “</pkg> ”. Both of these should be removed. Do not remove “<pkg>”. Now save the file as “download.txt”
5) Now replace all text “<pkg>” with “apt-get --force-yes -yy -d install --reinstall -o dir::cache=/home/user/MyDocs/apt-archive-cache ” then save the file.

All the rows should look like this
apt-get --force-yes -yy -d install --reinstall -o dir::cache=/home/user/MyDocs/apt-archive-cache mathjinni

6) Now rename the file “download.txt” into “download.list” then copy back into “MyDocs” folder of your device.
7) Now open this file “download.list” in notepad and save as “install.list”. Remove all “-d ” switch from this file and save it once again. (this step is for installing back all downloaded packages from the scratch)
8) Copy these two files “download.list” & “install.list” into your device MyDocs folder.

Download Apps Packages
Executing download.list script will download all the packages.
“rootsh” package should be installed in your device. If you don’t have, download and install it manually. After that, key in following commands in XTerminal.
$ sudo gainroot
/home/user # cd MyDocs (Changing the directory to MyDocs folder)
/home/user # ls (Make sure that “download.list” is found)
/home/user # sh<download.list

You should now see the downloading process running.

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 213kB of archives.
After this operation, 0B of additional disk space will be used.
Get:1 http://repository.maemo.org fremantle/free 100boxes 0.5.0-4 [213kB]
Fetched 213kB in 0s (538kB/s)
Download complete and in download only mode

Depending on the size of the list, the process could take a while. Once finished, the downloaded packages can be listed using following command:

$ ls /home/user/MyDocs/apt-archive-cache/archives|grep deb

Nokia-N900-42-11:/home/user# ls /home/user/MyDocs/apt-archive-
100boxes_0.5.0-4_armel.deb
accdisplay_1.0_armel.deb
cache/archives|grep deb
ati85_1.4.1-1_armel.deb
bluetooth-dun_1.0-2_armel.deb


Copy the folder “apt-archive-cache” from your device into your PC and secure it. If you want to reinstall these apps from scratch, proceed to “Installing” step.;););)

Installing steps would be updated soon!:D

jedi 2010-10-29 10:13

Re: N900 Backup your application packages
 
...or you could use the build in backup program which backs up a list of apps and can restore them.

kinggo 2010-10-29 10:19

Re: N900 Backup your application packages
 
but this way you don't have to DL them again ;)

ossipena 2010-10-29 10:28

Re: N900 Backup your application packages
 
Quote:

Originally Posted by kinggo (Post 856364)
but this way you don't have to DL them again ;)

unless application(s) is (are) updated....

kinggo 2010-10-29 10:36

Re: N900 Backup your application packages
 
of course. Personally, I won't be doing this but maybe someone find this useful.

sultanmaideen 2010-10-29 12:52

Re: N900 Backup your application packages
 
Quote:

Originally Posted by ossipena (Post 856373)
unless application(s) is (are) updated....

As time passes, updated/upgraded versions of packages currently installed on your device might become available from repositories. To make sure your device is up-to-date:

First you need to update your package index by executing following command in XTerminal

sudo gainroot
apt-get update


Second execute following command to upgrade your apps.

apt-get upgrade
Cheers ;););)

ossipena 2010-10-29 14:40

Re: N900 Backup your application packages
 
Quote:

Originally Posted by sultanmaideen (Post 856542)
apt-get upgrade
Cheers ;););)

this might screw your application manager into a state you need to reflash. there is atleast one reported occurence.

Rob1n 2010-10-29 15:13

Re: N900 Backup your application packages
 
Quote:

Originally Posted by ossipena (Post 856688)
this might screw your application manager into a state you need to reflash. there is atleast one reported occurence.

It shouldn't do - dist-upgrade certainly can, but upgrade should be safe.

homikaushal 2010-10-29 15:22

Re: N900 Backup your application packages
 
i have a question! i restored my applications using app manager when i updated to pr 1.3 but i still get a option to restore applications in app manager! how can i remove this backed-up list of applications???

lucm 2012-05-14 12:59

Re: N900 Backup your application packages
 
Is it possible to retrieve a whole, actual application and store it instead of just retrieving and storing a list?

The reason I ask this is that my friend's N900 has the Panorama application. I want it too, but I can't get it. It is available for FREE on the Nokia site, but:

- there is no direct download
- it requires some Nokia Suite thingy, which I downloaded and it's a Windows program, I use Linux
- there is an option to have the site send me a link over SMS (why??????!!!!!!!!!), which doesn't work either. I get the SMS on my N900, try to open it and the Nokia site tells me my phone is not compatible.

I've run out of ways of obtaining the software, now I want to extract it from my friend's N900 and transplant it to mine. It must be possible, it's Linux! But I don't know how to do that.

Mohammed Muid 2012-05-14 14:45

Re: N900 Backup your application packages
 
can in be implemented via a GUI like android's titanium backup. u can backup seperate apps and also the whole phone like backupmenu does.

lucm 2012-05-14 19:23

Re: N900 Backup your application packages
 
Thank you, but I wouldn't be able to do that.

Can you? Do you know what commands I can run on the command line to backup an entire application and restore it on another phone?

I know this is borderline piracy, but Nokia isn't giving me any choice.

sifo 2012-05-14 19:47

Re: N900 Backup your application packages
 
@lucm
hmmm...this post since 2010 and now we are 2012 and we have backupmenu it is better than this it will back up all the applications not the name list and you can restore them as long you got backupmenu application

./sifo

zimon 2012-05-14 20:02

Re: N900 Backup your application packages
 
Quote:

Originally Posted by lucm (Post 1206700)
Do you know what commands I can run on the command line to backup an entire application and restore it on another phone?

backup:
Code:

dpkg -L panorama | xargs tar czf panorama.tgz
restore:
Code:

cd /;tar xzf panorama.tgz

Estel 2012-05-14 20:02

Re: N900 Backup your application packages
 
backupmenu. It's the answer. Search for it. even more importantly, it won't only allow You to backup/restore some useless "app", but will also save Your a** many times, without need to reflash device, in case something gone wrong.

/Estel

magick777 2012-05-14 20:35

Re: N900 Backup your application packages
 
No promises, but, if your friend downloaded a conventional .deb installer file then there's every chance it'll be cached in /var/cache/apt/archives on his/her phone.

If it is, then copying the deb file and installing it with dpkg -i <filename> should do the trick.

magick777 2012-05-14 20:44

Re: N900 Backup your application packages
 
Ho-hum. A little bit of digging reveals that the file is available on the Nokia Ovi repository.


maemo:~# cat /etc/apt/sources.list.d/hildon-application-manager.list
deb https://downloads.maemo.nokia.com/fremantle/ssu/apps/ ./
deb https://downloads.maemo.nokia.com/fremantle/ssu/203 ./
deb https://downloads.maemo.nokia.com/fremantle1.2/ovi/ ./
deb http://repository.maemo.org/extras/ fremantle-1.3 free non-free
deb http://repository.maemo.org/extras-devel fremantle free non-free
deb http://repository.maemo.org/community/ fremantle free non-free
deb http://repository.maemo.org/community-testing/ fremantle free non-free

maemo:~# apt-cache search panorama
panorama - Capture panoramic images on the go
morphoquickpanorama - Morpho QuickPanorama Free Trial
milkyway-wallpaper - The Milky Way panorama
hemsedal2008-wallpaper - Panorama from Hemsedal skicenter
rmz-helsinki-wallpaper - A panorama of Helsinki
rmz-senaatintori-wallpaper - A panorama of the Senaatintori, Helsinki
vj-wallpaper - A view on a tiny lake in spring time

maemo:~# apt-get install panorama
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
panorama
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 458kB of archives.
After this operation, 1102kB of additional disk space will be used.
Get:1 https://downloads.maemo.nokia.com ./ panorama 2.0.5 [458kB]
Fetched 458kB in 1s (253kB/s)
Selecting previously deselected package panorama.
(Reading database ... 33295 files and directories currently installed.)
Unpacking panorama (from .../panorama_2.0.5_armel.deb) ...
Setting up panorama (2.0.5) ...
maemo:~#


Configure the relevant repository and you should be all good to go...

lucm 2012-05-15 20:42

Re: N900 Backup your application packages
 
Quote:

Originally Posted by magick777 (Post 1206735)
Ho-hum. A little bit of digging reveals that the file is available on the Nokia Ovi repository.
(...)

Yes! Your method works. I have Panorama now. Yay. :) Mark as SOLVED.

However, for the sake of information...

Quote:

Originally Posted by magick777 (Post 1206730)
No promises, but, if your friend downloaded a conventional .deb installer file then there's every chance it'll be cached in /var/cache/apt/archives on his/her phone. If it is, then copying the deb file and installing it with dpkg -i <filename> should do the trick.

No, we couldn't find it on my friend's phone, not in /var/cache/apt/archives. But I found it on MY phone, and I copied it to a safe place. Yay! :D


Quote:

Originally Posted by Estel (Post 1206718)
backupmenu. It's the answer. Search for it. even more importantly, it won't only allow You to backup/restore some useless "app", but will also save Your a** many times, without need to reflash device, in case something gone wrong.

I know backupmenu, I already have it, but it backs up EVERYTHING, doesn't it? That would turn my phone an exact replica of my friend's phone. Not what I want.

Quote:

Originally Posted by zimon (Post 1206717)
backup:
Code:

dpkg -L panorama | xargs tar czf panorama.tgz
restore:
Code:

cd /;tar xzf panorama.tgz

Interesting method, pretty much what I expected it would be like, but it doesn't work. The tarball just keeps growing, and growing, and growing... until it runs out of space. It created an 80-something MB tarball here. So I repeated the process piping the result to 'more' and there doesn't seem to be much there. Panorama was definitely not there. I have no idea what happened. :confused:


All times are GMT. The time now is 08:09.

vBulletin® Version 3.8.8