View Single Post
Old 04-18-2008, 12:01 PM   #1 (permalink)
BlackBerry Extraordinaire
rivviepop's Avatar
Join Date: Dec 2006
Location: san francisco
Model: 8320
PIN: n/a
Carrier: t-mobile
Posts: 2,166
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Script: Download OTA app to install from SD card

Please Login to Remove!

A utilitarian script to download a large OTA app and all it's COD/JAR/JAD files - such as the Mobipocket Reader - to your workstation so you can install it on your device using your SD card instead; handy if the app is really large, have problems with your device data connection, or pay a lot for the data usage on your device. Usage is simple and easy:

Download Usage

1) save the below code as ''
2) edit to put in the proper URL and JAD file (Mobipocket eReader used as an example)
3) comment/uncomment the use of wget or curl as needed (depends on what you have installed, I like curl)
4) make a new directory and run the script in that directory

cd ~
vi (edit/save/exit)
mkdir mpocket
cd mpocket
sh ../

Install Usage

1) copy the folder "mpocket" to your SD card, it should contain all the random COD, JAD and JAR files
2) from your device launch the Media applet
3) Menu key -> Explore -> Media Card -> mpocket folder
4) click on the JAD file to start the install (i.e. mobireader.jad)
# retrieve an OTA app locally, copy to SD card and install
# from there instead (for large OTA apps)


# curl or wget may be used, comment/uncomment as needed
#CMD="wget --quiet"
CMD="curl -s -O"

echo "Retrieving: ${URL}${JAD}"
${CMD} "${URL}${JAD}"

echo "Converting ${JAD}"
dos2unix "${JAD}"

CODS=`cat ${JAD} | grep -i url | cut -f2 -d ' '`
for ii in ${CODS}; do
  echo "Retrieving: ${URL}${ii}"
  ${CMD} "${URL}${ii}"

exit 0

# rivviepop at
# licensed under the GPLv2 download OTA app to install from SD card rivviepop phantom :: knowledge in passing
[ Linux & BlackBerry ]

Last edited by rivviepop : 09-03-2008 at 05:50 PM. Reason: add blog link (go me!)
Offline   Reply With Quote