diff options
Diffstat (limited to '.cheat/luna')
| -rwxr-xr-x | .cheat/luna | 236 |
1 files changed, 236 insertions, 0 deletions
diff --git a/.cheat/luna b/.cheat/luna new file mode 100755 index 0000000..9980219 --- /dev/null +++ b/.cheat/luna @@ -0,0 +1,236 @@ +#Connect to any (known) WAP in range (or simply turn on WiFi): + +luna-send -n 1 palm://com.palm.wifi/setstate '{"state":"enabled"}' +luna-send -n 1 palm://com.palm.wifi/findnetworks '{""}' + + +#Disconnect from WiFi: + +luna-send -n 1 palm://com.palm.wifi/setstate '{"state":"disabled"}' + +#Turn Bluetooth ON: + +luna-send -n 1 palm://com.palm.btmonitor/monitor/radioon '{"visible":true, "connectable":true}' + +#Turn Bluetooth OFF: + +luna-send -n 1 palm://com.palm.btmonitor/monitor/radiooff {} + +#Using luna-send to refresh the Launcher panel. + +luna-send -n 1 palm://com.palm.applicationManager/rescan {} + + +#Get a list of all installed apps: + +luna-send -n 1 "palm://com.palm.applicationManager/listLaunchPoints" "{}" + + +#Using luna-send to launch an application: + +luna-send -n 1 palm://com.palm.applicationManager/launch {\"id\":\"com.palm.app.browser\"} +luna-send -n 1 palm://com.palm.applicationManager/launch {\"id\":\"com.palm.app.browser\",\"params\":{\"scene\":\"page\",\"target\":\"http://www.google.com\"}} + + +#Using luna-send to download a file to /media/internal/downloads/: + +luna-send -n 1 palm://com.palm.downloadmanager/download {\"target\":\"http://www.google.com/index.html\"} + + +#Using luna-send to first import and then set the wallpaper image: + +luna-send -n 1 palm://com.palm.systemservice/wallpaper/importWallpaper {"target": "/media/internal/wallpapers/your_file.jpg" } +luna-send -n 1 palm://com.palm.systemservice/setPreferences {"wallpaper": {"wallpaperName": "your_file.jpg", "wallpaperFile": "/media/internal/wallpapers/your_file.jpg"}} + + + +#Using luna-send to control the palm progress animation (The pulsing "palm" logo seen at boot): + +luna-send -n 1 palm://com.palm.systemmanager/runProgressAnimation {\"state\":\"start\"} +luna-send -n 1 palm://com.palm.systemmanager/runProgressAnimation {\"state\":\"stop\"} + +#TODO: These should probably be plugged into the Tracker app. + + +luna-send -n 1 palm://com.palm.location/setUseGps {\"useGps\":\"true\"} +luna-send -n 1 palm://com.palm.location/setAutoLocate {\"autoLocate\":\"true\"} +luna-send -n 1 palm://com.palm.location/getCurrentPosition {} + + +#List all of the processes which are running: + +sudo luna-send -n 1 palm://com.palm.applicationManager/running {} +** Message: serviceResponse Handling: 2, { "running": [ { "id": "com.palm.launcher", "processid": "1006" }, { "id": "com.palm.systemui", "processid": "1007" }, { "id": "com.palm.app.email", "processid": "1000" }, { "id": "com.palm.app.phone", "processid": "1001" }, { "id": "com.palm.app.contacts", "processid": "1002" }, { "id": "com.palm.app.camera", "processid": "1003" }, { "id": "com.palm.app.messaging", "processid": "1004" }, { "id": "com.palm.app.calendar", "processid": "1005" }, { "id": "com.palm.app.phone", "processid": "1008" }, { "id": "com.palm.app.camera", "processid": "1014" } ] } + + +#Close a process: + +luna-send -n 1 "palm://com.palm.applicationManager/close" "{\"processId\":\"1058\"}" + + +#Activate the vibrator: + +luna-send -n 1 palm://com.palm.vibrate/vibrate {\"period\":1,\"duration\":1000\} + +#The duration value is in milliseconds and can be adjusted as desired. + + +#Photos Info - list album and image from mediadb.db3: + +luna-send -n 1 luna://com.palm.mediadb/image/listalbums {} + +luna-send -n 1 luna://com.palm.mediadb/image/listimages {} + + +#Set system volume - "volume" range is 0-100 + +luna-send -n 1 palm://com.palm.audio/system/setVolume '{"volume":80}' + + +#Set media volume - "volume" range is 0-100 + +luna-send -n 1 palm://com.palm.audio/media/setVolume '{"volume":80}' + + +#Set ringtone volume - "volume" range is 0-100 + +luna-send -n 1 palm://com.palm.audio/ringtone/setVolume '{"volume":100}' + + +#Dial a number - this actually calls the number, not just setup + +luna-send -n 1 palm://com.palm.telephony/dial '{"number":"8001234567"}' + + + +#Hang up a phone call :-) There are ways to end specific types of calls but I think this is good enough for now. Let me know if you want the other methods. + +luna-send -n 1 palm://com.palm.telephony/hangupAll {} + + +#Send a text message - only need to change phone "value" and "messageText" + +luna-send -n 1 palm://com.palm.messaging/sendMessageFromCompose '{"recipientJSONArray": [{"lastName": "", "pictureLoc": "", "contactCount": 1, "displayText": "", "firstName": "", "pictureLocBig": "", "imAvailability": 6, "pictureLocSquare": "", "contactDisplay": "", "Person_id": "", "personId": "", "type": "phone", "value": "8165551234", "alreadyValidated": true, "prefix": "to$A", "identifier": ""}], "messageText": "Content of message here"}' + + +#set phone to no roam (home network only) + +luna-send -n 1 palm://com.palm.telephony//roamModeSet '{"mode":"homeonly"}' + + +#set phone to auto roam + +luna-send -n 1 palm://com.palm.telephony//roamModeSet '{"mode":"any"}' + + +#set phone to roam only + +luna-send -n 1 palm://com.palm.telephony//roamModeSet '{"mode":"roamonly"}' + + +#Applications + +#Notes (view notes): + +luna-send -n 1 palm://com.palm.notes/getNotes {} + + +#Storage + +#Enter usb storage mode: + +luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\"user-confirmed\":true,\"enterIMasq\":false} + + +#Exit usb storage mode (toggle): + +luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\"user-confirmed\":true,\"enterIMasq\":false} + +#Airplane Mode + +#Enable Airplane Mode: + +luna-send -n 1 palm://com.palm.systemservice/setPreferences '{"airplaneMode":true}' + + +#Disable Airplane Mode: + +luna-send -n 1 palm://com.palm.systemservice/setPreferences '{"airplaneMode":false}' + +# Fix messaging thread problem (from Grabber5.0 +# http://forums.webosnation.com/palm-pre-2/272900-sms-issue-messages-can-no-longer-displayed-conversation.html) + +"The hardest part is tracking down the person id if you have a lot of contacts. + +You have to get the id of the chat thread and the person, using Impostah. +The easiest thing to do is save the object to a file while viewing it in Impostah +(you will prob have to change the filename, as the display name for the chat thread +and person id are likely the same, and that is what is used for the default filename. +I prefixed the chat thread filename with "chatthread"). Finding the person id can take +a while if you have a lot of contacts. + +Then run this command, filling in the chat thread id and person id. +The phone# is probably not required, but I supplied it anyway, just copying the value from the chat thread." + + +#Person object and chatthread object saved from Impostah so we can grab the chatthread id +#and person id for the merge command. +# +##Update chat thread person id and locked flag. Reply address prob not necessary (it is not changing) + +luna-send -n 1 -a com.palm.app.messaging luna://com.palm.db/merge ' +{"objects":[{"_id":"XXXXXXXX","personId":"XXXXXXX","flags":{"locked":false},"replyAddress":"(999) 555-1212"}]}' + +# +#Get chatthread to confirm changes. +# + +luna-send -n 1 -a com.palm.app.messaging luna://com.palm.db/get '{"ids":["XXXXXXXX"]}' + + +# Use palm-install to install ipk +Usage: palm-install [OPTION...] [PACKAGE | APP_ID] +Install or remove applications from a HP webOS device. + +Options: +-d, --device=DEVICE Specify DEVICE to use + --device-list List the available devices +-l, --list List the installed applications +-r, --remove Remove applications instead of installing +--version Display version info and exit +--help Display this help and exit + +PACKAGE is the file path of the package to install, +e.g. ~/projects/packages/com.example.app_1.0_all.ipk. + +APP_ID is the id of the application to remove. + +DEVICE is a unique identifier which matches a device name, type, or id +(as returned by the device-list option). e.g. Use "usb" for a usb-connected +device, or "tcp" for an emulator (note: emulator must be running). If not +specified, the first device found is used. + +# Install package +palm-install ~/projects/packages/com.example.app_1.0_all.ipk + +# Remove application +palm-install -r com.example.app + +# List applications on default device +palm-install -l + +# List applications on usb device +palm-install -d usb -l + +# List applications on emulator +palm-install -d tcp -l + +# Make apps fit the whole screen Pre3 +# transfer metadata.json to the folder of each application not working correctly +# +# /media/cryptofs/apps/usr/palm/applications/(whatever app) +# +# metadata.json can be found at /MacOSX-Data1/Computing/Palm/webos/Archive/games patch/metadata.json + +# Place Pre3 in recovery mode. +Reboot with letter R pressed, and the pre3 will reboot into recovery mode. Can then connect to USB to doctor. |
