add extract-google-files. move get- version to a different script

This commit is contained in:
Koushik Dutta 2010-06-27 20:10:23 -07:00
parent bfbd406bcd
commit 3a5397de3b
6 changed files with 147 additions and 43 deletions

5
Android.mk Normal file
View File

@ -0,0 +1,5 @@
# We need a way to prevent the stuff Google Apps replaces from being included in the build.
# This is a hacky way to do that.
ifdef CYANOGEN_WITH_GOOGLE
PACKAGES.Email.OVERRIDES := Provision LatinIME QuickSearchBox
endif

View File

@ -1,46 +1,42 @@
#!/usr/bin/env python
import sys, random, urllib2, zipfile, StringIO, os
from optparse import OptionParser
#!/bin/bash
FILENAME="gapps-passion-FRF83-signed.zip"
MIRRORS=["http://www.kanged.net/up/files/1/",]
mkdir -p proprietary
def device():
print "usage: extract-google-files -m [method]"
print "Note: Device method is currently not implemented, please use download"
sys.exit(1)
adb pull /system/app/CarHomeGoogle.apk proprietary
adb pull /system/app/CarHomeLauncher.apk proprietary
adb pull /system/app/com.amazon.mp3.apk proprietary
adb pull /system/app/com.google.android.apps.maps-1.apk proprietary
adb pull /system/app/Facebook.apk proprietary
adb pull /system/app/GenieWidget.apk proprietary
adb pull /system/app/Gmail.apk proprietary
adb pull /system/app/GoogleBackupTransport.apk proprietary
adb pull /system/app/GoogleCalendarSyncAdapter.apk proprietary
adb pull /system/app/GoogleContactsSyncAdapter.apk proprietary
adb pull /system/app/GoogleFeedback.apk proprietary
adb pull /system/app/GoogleGoggles.apk proprietary
adb pull /system/app/GooglePartnerSetup.apk proprietary
adb pull /system/app/GoogleQuickSearchBox.apk proprietary
adb pull /system/app/GoogleServicesFramework.apk proprietary
adb pull /system/app/googlevoice.apk proprietary
adb pull /system/app/kickback.apk proprietary
adb pull /system/app/LatinImeGoogle.apk proprietary
adb pull /system/app/LatinImeTutorial.apk proprietary
adb pull /system/app/MarketUpdater.apk proprietary
adb pull /system/app/MediaUploader.apk proprietary
adb pull /system/app/NetworkLocation.apk proprietary
adb pull /system/app/OneTimeInitializer.apk proprietary
adb pull /system/app/PassionQuickOffice.apk proprietary
adb pull /system/app/SetupWizard.apk proprietary
adb pull /system/app/soundback.apk proprietary
adb pull /system/app/Street.apk proprietary
adb pull /system/app/Talk.apk proprietary
adb pull /system/app/talkback.apk proprietary
adb pull /system/app/Twitter.apk proprietary
adb pull /system/app/Vending.apk proprietary
adb pull /system/app/VoiceSearch.apk proprietary
adb pull /system/app/YouTube.apk proprietary
adb pull /system/etc/permissions/com.google.android.maps.xml proprietary
adb pull /system/framework/com.google.android.maps.jar proprietary
adb pull /system/lib/libinterstitial.so proprietary
adb pull /system/lib/libspeech.so proprietary
def download():
try:
os.makedirs("proprietary")
except:
pass
os.chdir("proprietary")
if len(MIRRORS) > 1:
i = random.randrange(0, len(MIRRORS)-1)
else:
i = 0
url = MIRRORS[i] + FILENAME
print "Fetching from %s" % url
data = urllib2.urlopen(url).read()
zip = zipfile.ZipFile(StringIO.StringIO(data),'r')
for filename in zip.namelist():
if filename.split("/")[0] == "system":
print "Extracting %s" % filename
zip.extract(filename)
def main():
parser = OptionParser(usage="usage: %prog [options]")
parser.add_option("-m", "--method", dest='method', default="device", help="Extraction Method: device, download [default: device]")
(options, args) = parser.parse_args()
if options.method == "device":
return device()
if options.method == "download":
return download()
if __name__ == '__main__':
main()

46
get-google-files Executable file
View File

@ -0,0 +1,46 @@
#!/usr/bin/env python
import sys, random, urllib2, zipfile, StringIO, os
from optparse import OptionParser
FILENAME="gapps-passion-FRF83-signed.zip"
MIRRORS=["http://www.kanged.net/up/files/1/",]
def device():
print "usage: extract-google-files -m [method]"
print "Note: Device method is currently not implemented, please use download"
sys.exit(1)
def download():
try:
os.makedirs("proprietary")
except:
pass
os.chdir("proprietary")
if len(MIRRORS) > 1:
i = random.randrange(0, len(MIRRORS)-1)
else:
i = 0
url = MIRRORS[i] + FILENAME
print "Fetching from %s" % url
data = urllib2.urlopen(url).read()
zip = zipfile.ZipFile(StringIO.StringIO(data),'r')
for filename in zip.namelist():
if filename.split("/")[0] == "system":
print "Extracting %s" % filename
zip.extract(filename)
def main():
parser = OptionParser(usage="usage: %prog [options]")
parser.add_option("-m", "--method", dest='method', default="device", help="Extraction Method: device, download [default: device]")
(options, args) = parser.parse_args()
if options.method == "device":
return device()
if options.method == "download":
return download()
if __name__ == '__main__':
main()

View File

@ -25,3 +25,54 @@ PRODUCT_PACKAGE_OVERLAYS := vendor/cyanogen/overlay
# Always run in insecure mode, enables root on user build variants
#ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0
ifdef CYANOGEN_WITH_GOOGLE
PRODUCT_SPECIFIC_DEFINES += TARGET_OTA_BACKUPTOOL=False
PRODUCT_COPY_FILES += \
vendor/cyanogen/proprietary/CarHomeGoogle.apk:./system/app/CarHomeGoogle.apk \
vendor/cyanogen/proprietary/CarHomeLauncher.apk:./system/app/CarHomeLauncher.apk \
vendor/cyanogen/proprietary/com.amazon.mp3.apk:./system/app/com.amazon.mp3.apk \
vendor/cyanogen/proprietary/com.google.android.apps.maps-1.apk:./system/app/com.google.android.apps.maps-1.apk \
vendor/cyanogen/proprietary/Facebook.apk:./system/app/Facebook.apk \
vendor/cyanogen/proprietary/GenieWidget.apk:./system/app/GenieWidget.apk \
vendor/cyanogen/proprietary/Gmail.apk:./system/app/Gmail.apk \
vendor/cyanogen/proprietary/GoogleBackupTransport.apk:./system/app/GoogleBackupTransport.apk \
vendor/cyanogen/proprietary/GoogleCalendarSyncAdapter.apk:./system/app/GoogleCalendarSyncAdapter.apk \
vendor/cyanogen/proprietary/GoogleContactsSyncAdapter.apk:./system/app/GoogleContactsSyncAdapter.apk \
vendor/cyanogen/proprietary/GoogleFeedback.apk:./system/app/GoogleFeedback.apk \
vendor/cyanogen/proprietary/GoogleGoggles.apk:./system/app/GoogleGoggles.apk \
vendor/cyanogen/proprietary/GooglePartnerSetup.apk:./system/app/GooglePartnerSetup.apk \
vendor/cyanogen/proprietary/GoogleQuickSearchBox.apk:./system/app/GoogleQuickSearchBox.apk \
vendor/cyanogen/proprietary/GoogleServicesFramework.apk:./system/app/GoogleServicesFramework.apk \
vendor/cyanogen/proprietary/googlevoice.apk:./system/app/googlevoice.apk \
vendor/cyanogen/proprietary/HtcCopyright.apk:./system/app/HtcCopyright.apk \
vendor/cyanogen/proprietary/HtcEmailPolicy.apk:./system/app/HtcEmailPolicy.apk \
vendor/cyanogen/proprietary/HtcSettings.apk:./system/app/HtcSettings.apk \
vendor/cyanogen/proprietary/kickback.apk:./system/app/kickback.apk \
vendor/cyanogen/proprietary/LatinImeGoogle.apk:./system/app/LatinImeGoogle.apk \
vendor/cyanogen/proprietary/LatinImeTutorial.apk:./system/app/LatinImeTutorial.apk \
vendor/cyanogen/proprietary/MarketUpdater.apk:./system/app/MarketUpdater.apk \
vendor/cyanogen/proprietary/MediaUploader.apk:./system/app/MediaUploader.apk \
vendor/cyanogen/proprietary/NetworkLocation.apk:./system/app/NetworkLocation.apk \
vendor/cyanogen/proprietary/OneTimeInitializer.apk:./system/app/OneTimeInitializer.apk \
vendor/cyanogen/proprietary/PassionQuickOffice.apk:./system/app/PassionQuickOffice.apk \
vendor/cyanogen/proprietary/SetupWizard.apk:./system/app/SetupWizard.apk \
vendor/cyanogen/proprietary/soundback.apk:./system/app/soundback.apk \
vendor/cyanogen/proprietary/Street.apk:./system/app/Street.apk \
vendor/cyanogen/proprietary/Talk.apk:./system/app/Talk.apk \
vendor/cyanogen/proprietary/talkback.apk:./system/app/talkback.apk \
vendor/cyanogen/proprietary/Twitter.apk:./system/app/Twitter.apk \
vendor/cyanogen/proprietary/Vending.apk:./system/app/Vending.apk \
vendor/cyanogen/proprietary/VoiceSearch.apk:./system/app/VoiceSearch.apk \
vendor/cyanogen/proprietary/YouTube.apk:./system/app/YouTube.apk \
vendor/cyanogen/proprietary/com.google.android.maps.xml:./system/etc/permissions/com.google.android.maps.xml \
vendor/cyanogen/proprietary/com.google.android.maps.jar:./system/framework/com.google.android.maps.jar \
vendor/cyanogen/proprietary/libinterstitial.so:./system/lib/libinterstitial.so \
vendor/cyanogen/proprietary/libspeech.so:./system/lib/libspeech.so
else
PRODUCT_PACKAGES += \
Provision \
GoogleSearch \
LatinIME
endif

View File

@ -23,3 +23,9 @@ else
PRODUCT_PROPERTY_OVERRIDES += \
ro.modversion=CyanogenMod-6.0.0-N1-test0
endif
PRODUCT_BUILD_PROP_OVERRIDES := BUILD_ID=ESE81 BUILD_DISPLAY_ID=ESE81 PRODUCT_NAME=voles TARGET_DEVICE=sholes BUILD_FINGERPRINT=verizon/voles/sholes/sholes:2.1-update1/ESE81/29593:user/release-keys PRODUCT_BRAND=verizon
PRODUCT_COPY_FILES += \
vendor/cyanogen/proprietary/RomManager.apk:system/app/RomManager.apk \
vendor/cyanogen/prebuilt/passion/media/bootanimation.zip:system/media/bootanimation.zip