Sunday, November 27, 2011

IM+ messenger accounts migration in Android

I have got a nice HTC-Desire smartphone recently. After 6 months playing with it, I desided to change the firmware, i used the famous ruHD-rom, with ext-partition on SD card useing the "unrevoked" toolset. Next, i used "Revolutionary" to S-OFF, and now i can do whatever i want with my phone.

CAUTION: use "rooting" and "S-OFF" only if you know what you DO !!!

Now, a small example, where having a "rooted" phone helps:

Recently, i used IM+ lite multiprotocol messenger, which proved to be the best of its kind. (maybe U-talk can compare...) I liked it, so i decided to by the "advanced" IM+ pro -- it's worth it's money.

The only dissapointment was that IM+ lite and IM+ pro are two different applications, so non of the contacts from IM+ lite got imported into IM+ pro. I was too lazy to manually re-enter all accounts from all IMs, so i looked for a option to "migrate", and here it is (tried on IM+ version 5.0.2):

Task: How to import account settings from IM+ lite (aka implusfree) into IM+ pro (aka implusfull).

Prerequisites: rooted device, your favorite file manager in "root mode" (like ES File Explorer), IM+ lite and IM+ pro installed.

Actions:

  • Close IM+ and IM+ pro. Make sure they are not running (use your favorite task manager)
  • Make have you file explorer into "root" mode. Navigate to /data/data/de.shapeservices.implusfree/databases.
  • Copy file IMPLUS_DB into /data/data/de.shapeservices.implusfull/databases
  • Now, start Im+ pro, and make sure you accounts are in place. (facebook may need to re-authorise). After that remove IM+lite


Enjoy!

PS: I think that IM+ accounts setting export between devices works the same way.

Wednesday, January 27, 2010

intel 5150 wifi in OpenSuSE linux 11.2 in WPA mode

I have a nice netbook Lenovo S10-2 with Intel Wifi/Mimax 5150 builtin adapter. When i started playing with it, I installed OpenSuSE 11.2 (among others, including even MacOS X!). The result was: ALMOST everything working out of the box, even KDE4 was nice! Except for the mentioned Intel 5150 card. Actually, wifi worked, but only unsecure version.

The following steps helped me to fix it:
1) in YaST (Start->Computer->Yast) start "Software Repositories", then "Add", "by URL", enter URL:
http://download.opensuse.org/repositories/driver%3a/wireless/11.2-update/
and some name for the repository. then "OK"

2) in YaST start "Software Manager" and look for "iwl-5150-ucode" package, and mark it for installation, Also, do all the software update by selecting menu "Package -> All Packages -> Update if newer version available", make sure that you have "kernel-firmware", "compat-wireless-experimental-kmp-...", "iflugd" and all "NetworkManager" packages selected, then click "Accept" to install .

3) reboot

4) make sure that your network settings are managed by "Network manager" and in KDE you have "Network Manager" started (usually, it should be like that by default).

5) In network manager applet menu (should be in system tray), select "enable wireless" menu. Soon, a list of available Wifi hotpots should appear right in the network-manager applet menu. Simply click on one, and enter WPA password when asked to. If not, go to "Connect to other network",and select a network from list, or click "New ad-hoc network" and search for appropriate SSID in there.

Good night and good luck.

Tuesday, February 3, 2009

Anaconda vs YaST -- install on mdadm RAID volumes

Recently i had a possibility to compare both.
One of my clients depends on RHEL, so I installed CentOS 5.2 for them. There were usual 2xquad-core-Xeon servers, with a cheap SATA controller, so the only option for me was creating mdadm RAID volumes. Another of my clients had similar server, but they had no preferences, so i installed OpenSuSE 11.1 there.

both installers (i mean, both YaST and Anaconda) could not present me GUI to allow me to do things that i wanted to. But, frankly speaking, YaST allows more fine tuning of RAID volumes being created. For example, in YaST i could manually specify size of chunk. However, YaST did not allow me to create RAID10 volume. I did the following: I rebooted from OpenSuSE 11.1 install disk in rescue mode, and made myself a needed configuration with sfdisk and mdadm commands. Then i rebooted into installer, YaST found all volumes that i created, and pointed which filesystems to create there, and was successfull. In Anaconda, i could not do such a trick. For some reason, it did not allow me to use existing RAID volumes. I always resulted in "/dev/sdd4 device or resource busy" error. The only option that helped was:
deleting whole partition table with parted mklabel command, and then re-create them in installer.

Another feature that made me a complete YaST zealot is possibility to create YaST modules myself. Once upon a time i used it to fix user management routines on LDAP+KOLAB+SAMBA PDC machine. I cant imagine a good way to do it for Anaconda.

as a result: Anaconda sucks!

Thursday, August 7, 2008

.local domain name tweaks

Lately i suffered from a incompatible DNS zone name condition in my openSuSE 11.
I set up a small network, with "lab.local" internal DNS zone. nslookup,dig,host and other DNS utilities resolved names in it fine, but ping,gethostip and other gethostname()-derived apps didnot.
The reason was the feature of the current resolver algorithm in linux.
in order to fix it I had to add "mdns off" line into /etc/host.conf.
"man host.conf" !

Thursday, July 10, 2008

C++ common errors

Collection of my favorite C++ errors.

1) incorrect typecast:
double p = 0.3333;
int N = 50000, m=30000
int dn = (int)p*M-m;
2) signed - unsigned integer improper use:
unsigned int X=45;
double x = -Х*0.5;
x == ???
3) template misuse:
class Base {}
class Derived : public Base {}

std::vector<Base> v;
Derived d;
v.push_back(d);
and the last one, my favorite:
double p = 2/3; Happy coding!

Wednesday, January 30, 2008

Visual C++ 2005 project using QT and qmake

Recently, one may find lots of rumours about future acvisition of Trolltech by Nokia.
I would'nt worry much about it. QT is GPL, and that means, we will always have it around.

Recently, i started some QT development, and previously i was doing it in my favorite OpenSuSE environment, using KDevelop 3.5. Untill I started to do some really hardcore programming, utilizilng lost of BOOST and Computational Geometry (CGAL). I found out, that Visual C++ 2005 has more comfortable Debugger, so i decided to switch my development back to Windows XP (thanx to MSDN AA) and VC++ 2005.

As you might already know, the "official"OpenSource version of QT/Windows supports only MinGW GCC, which sucks. Previously, one had to use some magick patches (here is an instruction: how to patch QT to work with Visual C++ 2005) . Last time i tried to use them, i had non-working binaries in "Release" configuration. But the salvation came unexpectedly from KDE project, with their release of KDE for Windows.

The KDE for Windows itself is not much usefull -- there is no Desktop Environment yet, only some Applications available. Its biggest value is ... the Libraries!!!! and, of cource.. QT! wich supports VC2005 natively, witouht further patching. Here is small 1-2-3 how to start developing QT OpenSource apps in windows:

1) use Kde Windows Installer to install QT, and other libs that you might need (Boost? image handling libs? eigen? libz ? whatever...)
2) Get VC++ 2005 Express Edition (Kde installer may also help)

say, you have installed everything to D:\KDE, then i recommend to save it as Windows Environment variable (say, QTHOME) -- may be handy for team development, and stuff.
Now you are ready to create a "Hello world" app.

1) Open VisualStudio, create a new "Makefile" project. (Figure 1)


2) it will prompt for "build" "rebuild" and "clean" commands for Debug and Release configurations. For these i create 6 different custom .bat files, and specify them on prompt.



Your solution dir now has "helloworld" subdir. There we'll have to create several files:

main.cpp: (add it to the VS project as "source file")
#include
#include
#include

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.resize(100, 30);
hello.show();
return app.exec();
}


helloworld.pro
-- the QMake project file
SOURCES += main.cpp
TEMPLATE = app
CONFIG += warn_on thread qt stl
TARGET = helloworld
FORMS +=
HEADERS +=
INCLUDEPATH +=


build_debug.bat
qmake
nmake Debug

rebuild_debug.bat
clean_debug.bat build_debug.bat
clean_debug.bat
qmake nmake clean

now copy the last three into build_release.bat, rebuild_release.bat and clean_release.bat accoordingly, replacing "Debug" into "Release". you may add them into the VC project, for example, into another project subfolder, for later convininent modifications.



now you may press the "Build Solution" button, and see what happens.
the last two things remain:
1) Debugger. You need to specify the executable.


2) Intellisense. You need to specify the includepaths for QT and other libs.


Now, you may check at the QPushButton hello object how it works.


The last step: i used kde-installer 0.8.5 which installed QT 4.3.3. For some reason, the makefiles, created with QMAKE did not create the moc_- files.
i had lots of errors like:
moc_mainwindow.cpp
c1xx : fatal error C1083: Cannot open source file: 'debug\moc_mainwindow.cpp': N
o such file or directory
moc_mainview.cpp
c1xx : fatal error C1083: Cannot open source file: 'debug\moc_mainview.cpp': No
such file or directory



To fix this, i had to manually rewrite my qt.conf, which resides in the bin directory of KDE installation.
for example, if you have installed KDE into D:\KDE, then you'd have to create/edit the file
D:\KDE\bin\qt.conf:
[Paths]
Prefix=D:\\KDE\\
Documentation=D:\\KDE\\doc
Headers=D:\\KDE\\include
Libraries=D:\\KDE\\lib
Binaries=D:\\KDE\\bin
Plugins=D:\\KDE\\plugins
Data=D:\\KDE\\
Translations=D:\\KDE\\translations
Settings=D:\\KDE\\etc
Examples=D:\\KDE\\examples
Demos=D:\\KDE\\demos





that's all, folks! Happy Hacking!