aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README36
1 files changed, 36 insertions, 0 deletions
diff --git a/README b/README
index 71d3331..e277eec 100644
--- a/README
+++ b/README
@@ -19,3 +19,39 @@ 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> \ No newline at end of file