HASSO-PLATTNER–INSTITUT
f ü r S o f t w a r e s y s t e m t e c h n i k
Java for Small Devices Java 2 Microedition & Blackberry - - PowerPoint PPT Presentation
Java for Small Devices Java 2 Microedition & Blackberry HASSO-PLATTNERINSTITUT f r S o f t w a r e s y s t e m t e c h n i k Agenda Introduction, Motivation, Overview The Mobile World Problems implied by Mobile Devices
f ü r S o f t w a r e s y s t e m t e c h n i k
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 2 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 3 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 4 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 5 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 6 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 7 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 8 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 9 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 10 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 11 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 12 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 13 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 14 Einar Lück, Konrad Hübner, Robert Mitschke
Mobile Information Device Native System Software (MID OS) Configuration OEM specific classes Profile
Native Apps
OEM Specific Applications Profile based Applications
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 15 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 16 Einar Lück, Konrad Hübner, Robert Mitschke
Native Apps
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 17 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 18 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 19 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 20 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 21 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 22 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 23 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 24 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 25 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 26 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 27 Einar Lück, Konrad Hübner, Robert Mitschke
Stackmap attribute
Exploit using fake pre verification should not work
Simple linear scan 10kbyte of x86 Code and 100bytes of RAM required on device
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 28 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 29 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 30 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 31 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 32 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 33 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 34 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 35 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 36 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 37 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 38 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 39 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 40 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 41 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 42 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 43 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 44 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 45 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 46 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 47 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 48 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 49 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 50 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 51 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 52 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 53 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 54 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 55 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 56 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 57 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 58 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 59 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 60 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 61 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 62 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 63 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 64 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 65 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 66 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 67 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 68 Einar Lück, Konrad Hübner, Robert Mitschke
public void alertMe() { Alert.startVibrate(1000); short[] p = {5000, 500}; // 5 kHz for 500 ms Alert.startAudio(p, 50); // play tune p at 50% volume }
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 69 Einar Lück, Konrad Hübner, Robert Mitschke
public void storeUser() { final long appID = 0x6af0b5eb44dc5164L; // i.e. App Hash PersistentObject store = PersistentStore.getPersistentObject( appID ); String username = "Hans Meier"; String password = "hmpwd"; String[] userinfo = {username, password}; synchronized (store) { store.setContents(userinfo); store.commit(); } }
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 70 Einar Lück, Konrad Hübner, Robert Mitschke
static final long appID = 0x60ac754bc0867248L; public void shareObject() { String msg = "Some shared text"; RuntimeStore store = RuntimeStore.getRuntimeStore(); store.put( appID, msg ); // share object String newmsg = "Some other shared text"; Object obj = store.replace( appID, newmsg); // replace shared object Object storedObj = store.get(appID); // receive shared object } public void waitForSharedObject() { RuntimeStore store = RuntimeStore.getRuntimeStore(); try { Object obj = store.waitFor(appID); // wait for object to be shared } catch(ControlledAccessException e) { /* insufficient permissions /* } catch(RuntimeException e) { /* time out /* } }
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 71 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 72 Einar Lück, Konrad Hübner, Robert Mitschke
public void getRadioInfo() { int type = RadioInfo.getNetworkType(); // like CDMA, GPRS int service = RadioInfo.getNetworkService(); // like home zone, city int signal = RadioInfo.getSignalLevel(); // signal in dBm }
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 73 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 74 Einar Lück, Konrad Hübner, Robert Mitschke
public void sendEmail() { Store store = Session.getDefaultInstance().getStore(); Folder[] folders = store.list(Folder.SENT); Folder sentfolder = folders[0]; Message msg = new Message(sentfolder); try { Address toList[] = new Address[1]; toList[0]= new Address("hans.m@email.de", "Hans Meier"); Address from = new Address("helga.m@email.de", "Helga Meier"); msg.addRecipients(Message.RecipientType.TO, toList); msg.setFrom(from); msg.setSubject("Test Message"); msg.setContent("This is a test message."); Transport.send(msg); } catch(AddressException e) { /* invalid email-address detected */ } catch(MessagingException e) { /* sending or setting content failed */ } }
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 75 Einar Lück, Konrad Hübner, Robert Mitschke
public void addContact() { ContactList contactList = null; try { contactList = (ContactList)PIM.getInstance().openPIMList( PIM.CONTACT_LIST, PIM.READ_WRITE); Contact contact = contactList.createContact(); String[] name = new String[7]; name[Contact.NAME_FAMILY] = "Hans"; name[Contact.NAME_GIVEN] = "Meier"; name[Contact.FORMATTED_NAME] = "Hans Meier"; contact.addStringArray(Contact.NAME, Contact.ATTR_NONE, name); contact.addString(Contact.TEL, Contact.ATTR_HOME, "030-1234567"); contact.addString(Contact.EMAIL, Contact.ATTR_WORK, "hans.m@email.de"); if(contact.isModified()) { contact.commit(); } } catch (PIMException e) { return; } } DEMO: PIM Demo
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 76 Einar Lück, Konrad Hübner, Robert Mitschke
public void getCellInfo() { GPRSCellInfo info = GPRSInfo.getCellInfo(); int baseStationId = info.getBSIC(); int cellId = info.getCellId(); }
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 77 Einar Lück, Konrad Hübner, Robert Mitschke
Point Circle (+ Radius)
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 78 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 79 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 80 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 81 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 82 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 83 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 84 Einar Lück, Konrad Hübner, Robert Mitschke
HPI, SS2004: Components Programming & Middleware, Mobile Devices/ 85 Einar Lück, Konrad Hübner, Robert Mitschke