1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
#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
|