Islam Adel
Architect & IT Expert

Select your language

Somehow I damaged the file which contains the installed cydia apps on my iphone
File path: /var/lib/dpkg/status
I tried to recover it on my own way. This steps may take long but anyhow it worked for me!

In the File you will have to enter the packages as this example:

Package: x
Status: install ok installed
Version: x
Pre-Depends: x
Depends: x
Conflicts: y
Replaces: x
Installed-Size: 1

For cydia for example:

Package: cydia
Status: install ok installed
Version: 1.0.3044-65
Installed-Size: 1448
Pre-Depends: dpkg (>= 1.14.25-8)
Depends: apr-lib, apt7-key, apt7-lib, darwintools, pcre, shell-cmds, system-cmds, essential
Conflicts: com.sosiphone.addcydia
Replaces: com.sosiphone.addcydia

The fields mentioned above are the only (till now) required fields, ignore all others like maintainer, description, etc.

To know which packages you already installed browse to /var/lib/dpkg/info and grab all *.list names
for the example mentioned above, you would find a file called cydia.list

get required infos of packages from iphone:

/var/lib/apt/lists/ *Packages

or  from internet:
Here are infos about the fields from some repos:
(found by searching google : "Package: package-name" and don't forget "quotation marks"


Batch Script placed in the folder of status with info foldercontaining *.list is inside
This will restore all to new file status-append
then just copy and paste to status, open cydia and correct version, dependencies, etc.

@echo off
Title Restore Installed Apps
ECho append *.list to status
for /f %%i in ('dir /b info\*.list') DO (
    CALL :schonda %%~ni
ECHO Done!

SET F=status-append
FIND "Package: %1" "status"
    ECHO     [%1]    [Missing!]
    >>%F% ECHO.
    >>%F% ECHO Package: %1
    >>%F% ECHO Status: install ok installed
    >>%F% ECHO Version: 1
    REM >>%F% ECHO Pre-Depends: x
    REM >>%F% ECHO Depends: x
    REM >>%F% ECHO Conflicts: y
    REM >>%F% ECHO Replaces: x
    REM >>%F% ECHO Installed-Size: 1
    ) ELSE (
        ECHO     [%1]    [OK]