[Vibrant Themes and Apps] camalot:
It seems that when I am repackaging the apk back with the modified files, the signature is not valid.

Is there a way to repackage the apk without losing the system signature?

When I run the verify with jarsigner i get the following:

# "%java_home%\bin\jarsigner" -verify -verbose -certs CalendarProvider.apk

s = signature was verified
m = entry is listed in manifest
k = at least one certificate was found in keystore
i = at least one certificate was found in identity scope

no manifest.
jar is unsigned. (signatures missing or not parsable)

but if i run it on the "unmodified" i get this:

# "%java_home%\bin\jarsigner" -verify -verbose -certs CalendarProvider.apk

sm 7620 Wed Jun 10 02:00:14 CDT 2009 AndroidManifest.xml

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

821492 Fri Jan 21 11:15:58 CST 2011 classes.dex
1772 Wed Jun 10 02:00:14 CDT 2009 META-INF/CERT.RSA
1234 Wed Jun 10 02:00:14 CDT 2009 META-INF/CERT.SF
1192 Wed Jun 10 02:00:14 CDT 2009 META-INF/MANIFEST.MF
sm 7096 Wed Jun 10 02:00:14 CDT 2009 resources.arsc

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

sm 2886 Wed Jun 10 02:00:14 CDT 2009 res/drawable-hdpi/appwidget_bg.9.png

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

sm 3118 Wed Jun 10 02:00:14 CDT 2009 res/drawable-hdpi/appwidget_bg_focus.9.png

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

sm 3103 Wed Jun 10 02:00:14 CDT 2009 res/drawable-hdpi/appwidget_bg_press.9.png

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

sm 2600 Wed Jun 10 02:00:14 CDT 2009 res/drawable-hdpi/appwidget_calendar_bgtop_blue.9.png

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

sm 5702 Wed Jun 10 02:00:14 CDT 2009 res/drawable-hdpi/app_icon.png

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

sm 147 Wed Jun 10 02:00:14 CDT 2009 res/drawable-hdpi/white_list_rule_cal.
9.png

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

sm 852 Wed Jun 10 02:00:14 CDT 2009 res/drawable/appwidget_background.xml

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

sm 3432 Wed Jun 10 02:00:14 CDT 2009 res/layout-land/agenda_appwidget.xml

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

sm 3408 Wed Jun 10 02:00:14 CDT 2009 res/layout/agenda_appwidget.xml

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

sm 420 Wed Jun 10 02:00:14 CDT 2009 res/xml/appwidget_info.xml

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

sm 376 Wed Jun 10 02:00:14 CDT 2009 res/xml/syncadapter.xml

X.509, EMAILADDRESS=android.os@samsung.com, CN=Samsung Cert, OU=DMC, O=Samsung Corporation, L=Suwon City, ST=South Korea, C=KR
[certificate is valid from 6/9/09 11:00 AM to 10/25/36 11:00 AM]

s = signature was verified
m = entry is listed in manifest
k = at least one certificate was found in keystore
i = at least one certificate was found in identity scope

jar verified.

Warning:
This jar contains unsigned entries which have not been integrity-checked.