Fsck-up ;)

If you have to move /tmp to a different partition, and use the following sequence

mv /tmp /tmp_old

mkdir /tmp

mount /dev/blah /tmp

Then please don’t forget to do

chmod 1777 /tmp

or nobody but root can write to it 😛

Getting ADB working on OSX with the BQ Aquaris 4.5 Ubuntu Edition

For me, OSX is just as usefull as a tool as Linux or any other *nix based OS. As my partner user my laptop in OSX mostly and i’m too lazy to reboot every time 😉 i’d like to use ADB in terminal on OSX to get my shell and push/pull action going.

However, since some devices are relatively new or the ppl devving the thing expect you to be tech-savvy, ADB does not recognise them so we’ll have to lend a hand…

First off, find the device in the OSX Device manager as shown here:

devices

Note the VENDOR_ID (In this case that’s 0x2a47) and fire up a terminal. In terminal, type:

mkdir .android
echo  >> adb_usb.ini 

Now, ADB should work!

terminal_adb2

Syncing a VCARD file with SyncEvolution in Mac OSX

On OSX, you can sync an address book by exporting a vcard database. However, if the vcards within the vcard-file are not newline separated, syncevolution has trouble importing them. So a normal *nix approach would be to use

cat bad_format_file.vcard|sed "s/VCARD:END/VCARD:END\n/g" > good_format_file

But the sed version in OSX does not understand that type of escape code… So we’ll just let bash do the sequence:

cat bad_format_file.vcard|sed $’s/VCARD:END/VCARD:END\\\n/g’ > good_format_file

Place this file on the phone somehow (Android File Browser is a nice tool, or use adb push) and then run

syncevolution --import /path/to/good_format_file.vcard backend=evolution-contacts database=Personal

Et viola: Imported a contacts file

Configuring Caldav on the Ubuntu phone

To get caldav running on a generic caldav server (I used my Kerio account) these steps can be taken:

First, check which databases are provided by the caldav server:

syncevulution --print-databases SSLVerifyServer=0 SSLVerifyHost=0 backend=caldav username=<your username> "password=<your password>" syncURL=<your caldav url>

This will print something similar to this:

[INFO] start database search at https://<your caldav url>, from sync config '@default', syncURL=<your caldav url>

caldav:
Calendar (<your caldav url>:443/full-calendars/<domain name>/<user name>/Calendar/) <default>

As you can see, my server only has a calendar to share via caldav so let’s make a config to use that calendar:

syncevolution --configure --template webdav --keyring=no SSLVerifyServer=0 SSLVerifyHost=0 syncURL=<your caldav url> username=<your user name> "password=<your password>" target-config@<your config name>

This sets up a client connection config, which we can then use to set up a local connection to it:

syncevolution --configure --template "SyncEvolution Client" syncURL=local://@mx1 consumerReady=1 username= password= Calendar calendar

The last part? Syncing it!

syncevolution --sync slow Calendar calendar

[WARNING] calendar: ignoring username , it is not needed[INFO] @default/addressbook: inactive
[INFO] @default/memo: inactive
[INFO] @default/todo: inactive
[WARNING] calendar: ignoring username , it is not needed
[INFO @mx1] target side of local sync ready
[INFO @mx1] @mx1/addressbook: inactive
[INFO @mx1] @mx1/memo: inactive
[INFO @mx1] @mx1/todo: inactive
[INFO @mx1] @mx1/calendar: starting first time sync, two-way (peer is server)
[INFO @mx1] using configured database=<your caldav url/full-calendars/<your domain>/<your username>/Calendar/
[INFO @mx1] @mx1/calendar: sent 201/364
[INFO] @default/calendar: starting slow sync, two-way (peer is client)
[INFO] creating complete data backup of datastore calendar before sync (enabled with dumpData and needed for printChanges)
@default data changes to be applied during synchronization:
*** @default/calendar ***
no changes

[INFO] @default/calendar: started
[INFO] @default/calendar: updating "xxxx"
[INFO] @default/calendar: updating "xxxxx"
[INFO] @default/calendar: updating "xxxxxxx"
[INFO] @default/calendar: updating "xxxxxxxxxxxx xx xxxx xx"
[INFO] @default/calendar: received 200
[INFO @mx1] @mx1/calendar: sent 364/364
[INFO] @default/calendar: received 364/364
[INFO] @default/calendar: sent 2
[INFO @mx1] @mx1/calendar: started
[INFO @mx1] adding "Roos van Duin jarig"
[INFO @mx1] updating "Verwarming uitzetten"
[ERROR @mx1] error code from SyncEvolution no error (remote, status 200): unexpected status for update: <status 1.1, code 200, class 2, OK>
[INFO @mx1] @mx1/calendar: received 2/2
[INFO] @default/calendar: slow sync done successfully
[INFO @mx1] @mx1/calendar: first time sync done successfully

Synchronization successful.

Changes applied during synchronization (@mx1):
+---------------|-----------------------|-----------------------|-CON-+
| | @mx1 | @default | FLI |
| Source | NEW | MOD | DEL | ERR | NEW | MOD | DEL | ERR | CTS |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| calendar | 1 | 1 | 0 | 0 | 364 | 0 | 0 | 0 | 0 |
| slow, 254 KB sent by client, 1 KB received |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| start Fri Apr 3 12:23:45 2015, duration 0:23min |
| synchronization completed successfully |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
First ERROR encountered: error code from SyncEvolution no error (remote, status 200): unexpected status for update: <status 1.1, code 200, class 2, OK>
[INFO] creating complete data backup after sync (enabled with dumpData and needed for printChanges)

Synchronization successful.

Changes applied during synchronization:
+---------------|-----------------------|-----------------------|-CON-+
| | @default | @mx1 | FLI |
| Source | NEW | MOD | DEL | ERR | NEW | MOD | DEL | ERR | CTS |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| calendar | 0 | 4 | 0 | 0 | 1 | 1 | 0 | 0 | 0 |
| slow, 1 KB sent by client, 254 KB received |
| 364 item(s) matched |
| item(s) in database backup: 365 before sync, 365 after it |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| start Fri Apr 3 12:23:44 2015, duration 0:29min |
| synchronization completed successfully |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
First ERROR encountered: error code from SyncEvolution no error (remote, status 200): unexpected status for update: <status 1.1, code 200, class 2, OK>

Data modified @default during synchronization:
*** @default/calendar ***
no changes

Done!