def sendSysinfo(self, full): self.send(NUM_SYSINFO_REPLY_START) self.send(NUM_SYSINFO_REPLY_LINE, "program_version", VERSION) self.send(NUM_SYSINFO_REPLY_LINE, "battery", sysinfo.battery()) self.send(NUM_SYSINFO_REPLY_LINE, "active_profile", sysinfo.active_profile()) self.send(NUM_SYSINFO_REPLY_LINE, "free_ram", sysinfo.free_ram()) self.send(NUM_SYSINFO_REPLY_LINE, "pys60_version", e32.pys60_version) if sysinfo.active_profile() == u"offline": # Return an error code if the phone is in offline mode self.send(NUM_SYSINFO_REPLY_LINE, "signal_dbm", -1) self.send(NUM_SYSINFO_REPLY_LINE, "signal_bars", -1) else: self.send(NUM_SYSINFO_REPLY_LINE, "signal_dbm", sysinfo.signal_dbm()) self.send(NUM_SYSINFO_REPLY_LINE, "signal_bars", sysinfo.signal_bars()) for drive, free in sysinfo.free_drivespace().iteritems(): self.send(NUM_SYSINFO_REPLY_LINE, "free_drivespace", str(drive) + str(free)) if full: self.send(NUM_SYSINFO_REPLY_LINE, "display", str(sysinfo.display_pixels()[0]) + "x" + str(sysinfo.display_pixels()[1])) self.send(NUM_SYSINFO_REPLY_LINE, "imei", sysinfo.imei()) self.send(NUM_SYSINFO_REPLY_LINE, "model", sysinfo.sw_version()) self.send(NUM_SYSINFO_REPLY_LINE, "s60_version", e32.s60_version_info[0], e32.s60_version_info[1] ) self.send(NUM_SYSINFO_REPLY_LINE, "total_ram", sysinfo.total_ram()) self.send(NUM_SYSINFO_REPLY_LINE, "total_rom", sysinfo.total_rom()) self.send(NUM_SYSINFO_REPLY_END)
def getFW(): import sysinfo sw = sysinfo.sw_version() sw_list = sw.split(' ') if sw[0].isalpha(): firmware_code = sw_list[3] else: firmware_code = sw_list[2] return firmware_code
def Info(): #print 'Device Time: ' + sysinfo.active_profile() print 'Active Profile: '.ljust(24) + sysinfo.active_profile() print 'Software Version: '.ljust(24) + str(sysinfo.sw_version()) print 'OS Version: '.ljust(24) + str(sysinfo.os_version()) print 'Battery: '.ljust(24) + str(sysinfo.battery()) + '%' print 'Display Resolution: '.ljust(24) + str( sysinfo.display_pixels()[0]) + 'x' + str(sysinfo.display_pixels()[1]) print 'IMEI: '.ljust(24) + sysinfo.imei() #print 'RAM Drive Size: ' + str(sysinfo.max_ramdrive_size()) print 'RAM Size(total/free): '.ljust(24) + str(sysinfo.total_ram()) + str( sysinfo.free_ram()) print 'ROM Size: '.ljust(24) + str(sysinfo.total_rom()) print 'Free Drive Space: '.ljust(24) + str(sysinfo.free_drivespace()) print 'Signal Strength:'.ljust(24) + str(sysinfo.signal_bars())
def post_multipart(host, selector, fields, files): """ Post fields and files to an http host as multipart/form-data. fields is a sequence of (name, value) elements for regular form fields. files is a sequence of (name, filename, value) elements for data to be uploaded as files Return the server's response page. """ content_type, body = encode_multipart_formdata(fields, files) h = httplib.HTTPConnection(host) headers = { 'User-Agent': sysinfo.sw_version(), 'Content-Type': content_type } h.request('POST', selector, body, headers) res = h.getresponse() return res.status, res.reason, res.read()
def phoinfo(): k = sysinfo.sw_version() ( pi, pi2, ) = sysinfo.display_pixels() rin = sysinfo.ring_type() pro = sysinfo.active_profile() osama.add( (itq('\n\t...................\nThe Software Ver. of phone is: \n') + k)) osama.add((((itq('\n_____\nThe Display Pixle is: \n') + str(pi)) + u'x') + str(pi2))) osama.add((itq('\n_____\nThe Selected Profile is: \n') + pro)) osama.add(((itq('\n_____\nThe Type of ringtone is: \n') + rin) + itq('\n\t...................\n')))
def sendSysinfo(self, full): self.send(NUM_SYSINFO_REPLY_START) self.send(NUM_SYSINFO_REPLY_LINE, "program_version", VERSION) self.send(NUM_SYSINFO_REPLY_LINE, "battery", sysinfo.battery()) self.send(NUM_SYSINFO_REPLY_LINE, "active_profile", sysinfo.active_profile()) self.send(NUM_SYSINFO_REPLY_LINE, "free_ram", sysinfo.free_ram()) self.send(NUM_SYSINFO_REPLY_LINE, "pys60_version", e32.pys60_version) if sysinfo.active_profile() == "offline": # Return an error code if the phone is in offline mode self.send(NUM_SYSINFO_REPLY_LINE, "signal_dbm", -1) self.send(NUM_SYSINFO_REPLY_LINE, "signal_bars", -1) else: self.send(NUM_SYSINFO_REPLY_LINE, "signal_dbm", sysinfo.signal_dbm()) self.send(NUM_SYSINFO_REPLY_LINE, "signal_bars", sysinfo.signal_bars()) for drive, free in sysinfo.free_drivespace().items(): self.send(NUM_SYSINFO_REPLY_LINE, "free_drivespace", str(drive) + str(free)) if full: self.send( NUM_SYSINFO_REPLY_LINE, "display", str(sysinfo.display_pixels()[0]) + "x" + str(sysinfo.display_pixels()[1]), ) self.send(NUM_SYSINFO_REPLY_LINE, "imei", sysinfo.imei()) self.send(NUM_SYSINFO_REPLY_LINE, "model", sysinfo.sw_version()) self.send( NUM_SYSINFO_REPLY_LINE, "s60_version", e32.s60_version_info[0], e32.s60_version_info[1], ) self.send(NUM_SYSINFO_REPLY_LINE, "total_ram", sysinfo.total_ram()) self.send(NUM_SYSINFO_REPLY_LINE, "total_rom", sysinfo.total_rom()) self.send(NUM_SYSINFO_REPLY_END)
def app(): appuifw.app.exit_key_handler = lock.signal active_profile = sysinfo.active_profile() battery = sysinfo.battery() d1, d2 = sysinfo.display_pixels() free_ram = sysinfo.free_ram() / float(1024 * 1024) total_ram = sysinfo.total_ram() / float(1024 * 1024) imei = sysinfo.imei() sw_version_list = sysinfo.sw_version().split(' ') data_list = [(ru("Active Profile:"), ru(active_profile)), (ru("Battery Percentage:"), ru(battery)), (ru("Free RAM:"), ru(str(free_ram)[:6] + " MB/" + str(total_ram)[:6] + " MB")), (ru("Display:"), ru(str(d1) + " x " + str(d2))), (ru("IMEI:"), imei), (u"Software Version:", sw_version_list[0]), (u"Software Version Date:", sw_version_list[1]), (u"Type", sw_version_list[2])] list = appuifw.Listbox(data_list, lambda: None) appuifw.app.body = list appuifw.app.menu = [(u"Refresh Info", app), (u"About", about)]
def test_sw_version(self): self._test_util("sw_version", sysinfo.sw_version())
#sysinfo是与系统信息有关的模块 def cn(x): return x.decode("utf8") appuifw.app.body = t = appuifw.Text() t.focus = False appuifw.app.screen = "full" t.add(cn("情景模式:") + sysinfo.active_profile()) #查看当前情景模式 t.add(cn("\n电量:") + unicode(sysinfo.battery())) #查看当前电量 t.add(cn("\n屏幕分辨率:") + unicode(sysinfo.display_pixels())) #查看屏幕分辨率 t.add(cn("\n剩余空间:\n")) i = 0 drive = [u"C:", u"D:", u"E:"] while i < len(drive): #循环语句 t.add(drive[i] + unicode(sysinfo.free_drivespace()[drive[i]] / 1024) + u"kb\n") #查看C,D,E盘剩余空间 i += 1 t.add(cn("剩余运存:") + unicode(sysinfo.free_ram() / 1024) + u"kb") #查看剩余运存 t.add(cn("\nIMEI:") + unicode(sysinfo.imei())) #查看手机串号 t.add(cn("\n系统版本:") + unicode(sysinfo.os_version())) #查看系统版本信息 t.add(cn("\n响铃方式:") + unicode(sysinfo.ring_type())) #查看响铃方式 t.add(cn("\n手机版本:") + unicode(sysinfo.sw_version())) #查看手机版本 t.add(cn("\n缓存总大小:") + unicode(sysinfo.total_ram() / 1024) + u"kb") #查看剩余缓存 t.add(cn("\nZ盘总大小:") + unicode(sysinfo.total_rom() / 1024) + u"kb") #查看Z盘总大小 e32.Ao_lock().wait()
## Loop scan for wireless x-driving import wlantools as wl import time as ti import sysinfo as si import location as loc import positioning as pos import audio as aud import os import sys NUMLOOP=5000 imei = si.imei() uagent = si.sw_version().split()[-1] date = ti.strftime('%Y%m%d') log_dir = "e:\\data\\wlan" if not os.path.exists(log_dir): os.makedirs(log_dir) logfile = os.path.join(log_dir, 'fpp_RawData_CMRI_'+date+'.csv') fout = open(logfile, 'a') media = "e:\\videos\\noti.mid" try: snd = aud.Sound.open(media) #print 'Sound ready!' except: print 'Oops! NOT available: %s!' % media
def exit_handle(): s=globalui.global_popup_menu([u'Fake Info \xbb',u'Hide',u'Visit Author\'s FB Page', u'Help \xbb', u'About', u'Exit'],u'Misc',10) if s==0: opt=globalui.global_popup_menu([u'Battery',u'Signal',u'Start Charging',u'Stop Charging'],u'Fake Info',10) if opt==0: try: bar=appuifw2.query(u"No. of bars(0-7)","number",7) indicators.set_battery(bar) if bar==0: globalui.global_note(u'Battery empty.\nRecharge','recharge_battery') if bar==1: globalui.global_note(u'Battery low','battery_low') except: return None elif opt==1: try: bar=appuifw2.query(u"No. of bars(0-7)","number",7) indicators.set_signal(bar) except: return None elif opt==2: globalui.global_note(u'Charging','charging') indicators.start_charging() elif opt==3: indicators.stop_charging() globalui.global_note(u'Unplug charger from power supply to save energy','text') elif s==1: try: appswitch.switch_to_bg(u'Speak') except: return None elif s==2: e32.start_exe('Z:\\sys\\bin\\BrowserNG.exe', (' "4 %s"' % 'http://facebook.com/vishalbiswas')) elif s==3: an = globalui.global_popup_menu([u'General', u'Shortcuts', u'Menu',u'Known Bugs',u'Fake Info'], u'Select Help Conent:') if an==0: msgquery.infopopup(u"Type any text in the textarea and press speak from options to make me say your phrase. You can use any languages which your phone supports. You can download more languages for Text To Speech from Nokia's Official Website.",u'General',msgquery.OKREmpty) if an==1: msgquery.infopopup(u'Middle Selection Key: Speak!\nDial Key: Combine Shortcurts\nRight Soft Key: Miscellaneous tools\nCamera Key: Settings\nVolume Up: Read Text from messages\nVolume Down: Save as txt\nCombination Shortcuts:-\nDial: Screenshot\nClear: Clear all\nUp: Page up\nDown: Page down\nLeft: Start of line\nRight: End of line\nVolume Up:Start of Document\nVolume Down: End of Document\nMiddle Selection: Send text as SMS\n1: Cut\n2: Undo\n3: Text Info\n4: Speak Word\n5: Speak selected\n6: TTS Settings\n7: Reset settings\n8: Find text\n9: Replace text\n0: Exit\n*: Download Languages\n#: Go to line\nCamera: Open file',u'Shortcuts',msgquery.OKREmpty) if an==2: msgquery.infopopup(u'Speak: Speak the text\nEdit: Text related functions like copy, paste, undo, etc\nText: Operations involving the text in the textarea\nGoto: Go to the specific section of the page or navigate through the text\nText Info: Information of the text\nSettings: All the apps\' preferences\nDownload Languages: Download text-to-speech languages from Nokia\'s Official Site',u'Menu',msgquery.OKREmpty) if an==3: msgquery.infopopup(u'1. Applications closes unexpectedly when selecting path of saving or reading files\n2. Changing highlight style resets the font style\n3. The set values in settings are not shown instantly in the settings listbox\n4. Some fonts\' anti-aliasing settings cannot be changed',u'Known Bugs',msgquery.OKREmpty) if an==4: msgquery.infopopup(u'All the changes made by this function are purely fake. They are used to just fool others. I have made it as real as possible.\nBattery: Change the number of bars shown in the battery pane\nSignal: Change the number of bars shown in the signal pane\nStart Charging: Simulates battery charging but in reality doesn\'t charges battery\nStop Charging: Stops the simulation of battery as if battery is full',u'Fake Info',msgquery.OKREmpty) elif s==4: txt=u'Version: '+__version__+'\nMain App: Ensymble\nModded by: vishalbiswas\nE-mail: [email protected]\nUID: '+appuifw2.app.uid().upper()+u'\nPath: '+appuifw2.app.full_name().upper()+u'\nS/W Version: '+sysinfo.sw_version()+u'\nPython Version: '+e32.pys60_version+'\nDetailed Python Version: '+sys.version caps='\nCapabilities Granted: ' if e32.pys60_version_info[0]>=2: for i in e32.get_capabilities(): if i==e32.get_capabilities()[0]: caps+=i else: caps+='+'+i else: caps+=envy.app_capabilities() msgquery.infopopup(txt+caps,u'Speak',msgquery.OKREmpty) elif s==5: quit_ask()
# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import sysinfo print "OS: " print sysinfo.os_version() print "SW: " print sysinfo.sw_version() print "IMEI: " print sysinfo.imei() print "Bat: " print sysinfo.battery() print "Net: " print sysinfo.signal() print "Ram: " print sysinfo.total_ram() print "Rom: " print sysinfo.total_rom() print "MaxRamDrive: " print sysinfo.max_ramdrive_size() print "Twips: " print sysinfo.display_twips() print "Pixels: "
## Loop scan for wireless x-driving import wlantools as wl import time as ti import sysinfo as si import location as loc import positioning as pos import audio as aud import os import sys NUMLOOP = 5000 imei = si.imei() uagent = si.sw_version().split()[-1] date = ti.strftime('%Y%m%d') log_dir = "e:\\data\\wlan" if not os.path.exists(log_dir): os.makedirs(log_dir) logfile = os.path.join(log_dir, 'fpp_RawData_CMRI_' + date + '.csv') fout = open(logfile, 'a') media = "e:\\videos\\noti.mid" try: snd = aud.Sound.open(media) #print 'Sound ready!' except: print 'Oops! NOT available: %s!' % media print
appuifw.note( (((u'Kameramation v' + VERSION) + u'\n') + u'jouni.miettunen.googlepages.com\n\xa92009 Jouni Miettunen')) def cb_quit(): camera.stop_finder() camera.release() app_lock.signal() if (e32.pys60_version_info > (1, 9)): screen = 'full' else: screen = 'large' s = sysinfo.sw_version() if (s.find('RM-505') != -1): pass elif (s.find('RM-506') != -1): pass elif (s.find('RM-507') != -1): pass elif (s.find('RM-356') != -1): pass else: screen = 'full' appuifw.app.screen = screen appuifw.app.orientation = 'landscape' appuifw.app.title = u'Kameramation' appuifw.app.exit_key_handler = cb_quit appuifw.app.menu = [(u'View:', ((u'Primary camera', lambda: set_camera(0)),
import sys import os import time import sysinfo import e32 sys.stdout.write("IMEI: %s\n" % sysinfo.imei()) sys.stdout.write("Battery strength: %s\n" % sysinfo.battery()) sys.stdout.write("Signal strength: %s\n" % sysinfo.signal_bars()) sys.stdout.write("Network signal strength in dBm: %s\n" % sysinfo.signal_dbm()) sys.stdout.write("SW version: %s\n" % sysinfo.sw_version()) sys.stdout.write("Display size:\n") print(sysinfo.display_pixels()) sys.stdout.write("Current profile: %s\n" % sysinfo.active_profile()) sys.stdout.write("Ringing type: %s\n" % sysinfo.ring_type()) sys.stdout.write("OS version:\n") print(sysinfo.os_version()) sys.stdout.write("Free/total RAM (MB): %.2f / %.2f\n" % (sysinfo.free_ram()/1024/1024,sysinfo.total_ram()/1024/1024)) sys.stdout.write("Total ROM (MB): %.2f \n" % (sysinfo.total_rom()/1024/1024)) sys.stdout.write("Free disk space C/E (MB): %.2f / %.2f\n" % (sysinfo.free_drivespace()['C:']/1024/1024,sysinfo.free_drivespace()['E:']/1024/1024))