• Home
Name Date Size #Lines LOC

..--

facades/03-May-2024-1,001757

rapidjson/03-May-2024-30,35322,274

utils/03-May-2024-17576

Android.bpD03-May-2024893 4342

README.mdD03-May-20241.7 KiB5135

base.hD03-May-20241.7 KiB6037

main.cppD03-May-20243.3 KiB11687

README.md

1Scripting Layer For Native
2=============================
3
4### Introduction
5Scripting Layer for Native, SL4N, is an automation toolset for calling Android native Binder
6APIs and accessing the HAL layer in an platform-independent manner. This tool enables remote
7automation of these layers via ADB.
8
9### Build Instructions
10Building SL4N requires a system build.
11
12For the initial build of Android:
13
14    cd <ANDROID_SOURCE_ROOT>
15    source build/envsetup.sh
16    lunch aosp_<TARGET>
17    make [-j15]
18
19*where `<ANDROID_SOURCE_ROOT>` is the root directory of the android tree and `<TARGET>` is the lunch
20target name*
21
22Then Build SL4N:
23
24    cd <ANDROID_SOURCE_ROOT>/packages/apps/Test/connectivity/sl4n
25    mm [-j15]
26
27### Install Instructions
28Run the following command:
29
30    adb push <ANDROID_SOURCE_ROOT>/out/target/product/<TARGET>/system/bin/sl4n /system/bin
31
32Library dependencies required:
33
34    adb push <ANDROID_SOURCE_ROOT>/out/target/product/<TARGET>/system/lib/libbinder.so /system/lib
35    adb push <ANDROID_SOURCE_ROOT>/out/target/product/<TARGET>/system/lib/libchrome.so /system/lib
36    adb push <ANDROID_SOURCE_ROOT>/out/target/product/<TARGET>/system/lib/libevent.so /system/lib
37
38Optional library dependency for running tests that exercise the Bluetoothtbd service:
39
40    cd <ANDROID_SOURCE_ROOT>/system/bt/service
41    mm [-j15]
42    adb push <ANDROID_SOURCE_ROOT>/out/target/product/<TARGET>/system/bin/bluetoothtbd /system/bin
43
44### Run Instructions
45a) SL4N is launched from ADB shell; or
46b) To enable RPC access from the command prompt:
47
48    adb forward tcp:<HOST_PORT_NUM> tcp:<DEVICE_PORT_NUM>
49    adb shell -c "/system/bin/sl4n" &
50*where `<HOST_PORT_NUM>` and `<DEVICE_PORT_NUM>` are the tcp ports on the host computer and device.*
51