Skip to content

Instantly share code, notes, and snippets.

~ $adb shell pm list packages | grep samsung
package:com.zinio.samsung.android
package:com.samsung.android.livewallpaper.microbesgl
package:com.samsung.android.app.divx
package:com.samsung.SMT
package:com.samsung.InputEventApp
package:com.kobobooks.samsung.android
package:com.samsung.bt.avrcp
package:com.samsung.swift.app.kiesair
package:com.samsung.music
void filter(list_item *item, int (*passes)(list_item *item))
{
pthread_mutex_lock(&list_lock);
while (item != NULL)
{
if (!passes(item))
_remove_internal(item);
item = item->next;
}
pthread_mutex_unlock(&list_lock);
11:57:55.683499 IP (tos 0x0, ttl 64, id 60076, offset 0, flags [DF], proto TCP (6), length 64, bad cksum 0 (->5209)!)
localhost.59563 > localhost.5037: Flags [S], cksum 0xfe34 (incorrect -> 0x66cf), seq 2954897313, win 65535, options [mss 16344,nop,wscale 3,nop,nop,TS val 492283543 ecr 0,sackOK,eol], length 0
E..@..@.@................ '..........4....?........
.W..........
11:57:55.683571 IP (tos 0x0, ttl 64, id 3070, offset 0, flags [DF], proto TCP (6), length 52, bad cksum 0 (->30c4)!)
localhost.59563 > localhost.5037: Flags [.], cksum 0xfe28 (incorrect -> 0x8d70), ack 1233995204, win 65535, options [nop,nop,TS val 492283543 ecr 492283543], length 0
E..4..@.@................ '.I.E......(.....
.W...W..
11:57:55.683685 IP (tos 0x0, ttl 64, id 9369, offset 0, flags [DF], proto TCP (6), length 52, bad cksum 0 (->1829)!)
localhost.59563 > localhost.5037: Flags [F.], cksum 0xfe28 (incorrect -> 0x8d6f), seq 0, ack 1, win 65535, options [nop,nop,TS val 492283543 ecr 492283543], length 0
@tophyr
tophyr / gist:3772812
Created September 23, 2012 19:51
tcpdump output
12:41:44.347135 IP (tos 0x0, ttl 64, id 43177, offset 0, flags [DF], proto TCP (6), length 64, bad cksum 0 (->940c)!)
localhost.60791 > localhost.5037: Flags [S], cksum 0xfe34 (incorrect -> 0xed52), seq 797130492, win 65535, options [mss 16344,nop,wscale 3,nop,nop,TS val 494896226 ecr 0,sackOK,eol], length 0
E..@..@.@............w../.>..........4....?........
...b........
12:41:44.347197 IP (tos 0x0, ttl 64, id 61597, offset 0, flags [DF], proto TCP (6), length 64, bad cksum 0 (->4c18)!)
localhost.5037 > localhost.60791: Flags [S.], cksum 0xfe34 (incorrect -> 0xffbb), seq 1156646579, ack 797130493, win 65535, options [mss 16344,nop,wscale 3,nop,nop,TS val 494896226 ecr 494896226,sackOK,eol], length 0
E..@..@.@..............wD.../.>......4....?........
...b...b....
12:41:44.347205 IP (tos 0x0, ttl 64, id 1465, offset 0, flags [DF], proto TCP (6), length 52, bad cksum 0 (->3709)!)
localhost.60791 > localhost.5037: Flags [.], cksum 0xfe28 (incorrect -> 0x79ad), ack 1, win 65535, options [nop,nop,TS v
!SESSION 2012-10-11 13:56:24.939 -----------------------------------------------
eclipse.buildId=I20120608-1400
java.version=1.6.0_35
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product -keyring /Volumes/chris.sarbora/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -keyring /Volumes/chris.sarbora/.eclipse_keyring -showlocation
!ENTRY org.eclipse.core.resources 2 10035 2012-10-11 13:56:26.397
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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
@Override
protected void writeMessage(OutputStream os) throws IOException {
OutputStreamWriter osw = new OutputStreamWriter(os);
String json = getGson().toJson(m_Envelope);
osw.write("\n\n--"); osw.write(MULTIPART_BOUNDARY); osw.write("\n");
osw.write("Content-Type: application/json\n");
osw.write("Content-Disposition: form-data\n\n");
osw.write(json);
osw.flush();
@tophyr
tophyr / RESTBase.java
Created November 7, 2012 01:41
hack to get around HttpURLConnection deficiency
OutputStream os = null;
if (call.getRequestType() == Call.RequestType.DELETE) {
try {
Object httpImpl = conn;
Class<?> httpImplClass = httpImpl.getClass();
if (conn instanceof HttpsURLConnection) {
Field delegateField = conn.getClass().getDeclaredField("delegate");
delegateField.setAccessible(true);
httpImpl = delegateField.get(conn);
httpImplClass = httpImpl.getClass().getSuperclass();
<<<<<<< HEAD
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.CAMERA" />
=======
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.READ_PROFILE" />
import com.tophyr.ManageAccountFragment.IPurchaseEnvelopesContainer;
public class PurchaseEnvelopesFragment extends DialogFragment implements OnClickListener {
public interface IPurchaseCredits extends IPurchaseEnvelopesContainer {
public void creditsPurchased(Parcelable lPunk);
}