aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: e277eecc25f2275a1fddc675ed87ba8ef28fb7be (plain)
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
libsamsung-ipc
==============

libsamsung-ipc is a free software implementation of the Samsung IPC modem protocol,
found in many Samsung devices.

Compilation and installation
============================

In orderto compile the source code you need the following software packages
- GCC compiler
- GNC C library
- OpenSSL >= 1.0.0e

To configure run
    ./configure --prefix=/usr

Configure automatically searches for all required components and packages.

To compile and install run:
    make && make install

Running quick tests on Replicant 6.0 with Guix
==============================================
For testing libsamsung-ipc tools on a device, you can use Guix to
build fully static version of tools on an existing Android or
GNU/Linux distribution.

Here's an example for Replicant 6.0. It assumes that you already have
adb and root through adb setup.

First you need to stop the RIL daemon because ipc-modem currently
doesn't support running in parallel of the RIL or other programs that
talk to the modem:
$ sudo adb root
$ sudo adb shell stop ril-daemon

Then we can tell Guix to build everything for us.
$ echo '(list libsamsung-ipc-static)' >> scripts/guix.scm
$ guix build --target=arm-linux-gnueabihf --file=scripts/guix.scm

Note that adding '(list libsamsung-ipc-static)' scripts/guix.scm is
not only used to shorten the build time, but it is also necessary
because the Android packages in that file don't cross compile due to
some limitations in Guix.

If the build succeeds, it will print the path where you can find the
result of the build, it will look like that:
/gnu/store/<some hash>-libsamsung-ipc-static-0.0-HEAD.<some hash>

You can then copy the binary on the phone and test libsamsung-ipc:
$ sudo adb push \
  /gnu/store/<hash>-libsamsung-ipc-static-0.0-HEAD.<hash>/bin/ipc-modem \
  /storage/

And run it:
$ sudo adb shell /storage/ipc-modem start --debug --call=<local number to call>