Skip to content

Commit

Permalink
docs: descritption added
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Svistelnikov <[email protected]>
  • Loading branch information
svistelnikoff committed Aug 1, 2019
1 parent 2fcd7cf commit 0282ac5
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 15 deletions.
60 changes: 58 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,58 @@
# gl-android-training-2019
Android system general course by GlobalLogic Kharkiv, 2019
# GL hikey960 android howto

## Sources locations

Android manifest - [email protected]:svistelnikoff/android_manifest.git ( branch gl-hikey960 )
Hikey960 BSP - [email protected]:svistelnikoff/hikey-linaro-device.git ( branch svistelnikoff@gl-hikey960-base )
Hikey960 kernel - [email protected]:svistelnikoff/hikey-linaro-kernel.git ( branch [email protected] )

Vendor specific sources
Software - [email protected]:svistelnikoff/gl-android-training-2019.git ( branch svistelnikoff@vendor-gl )

.
├── apps vendor-specific applications
│   └── gl-android-training pllcications implemented as submodule ( svistelnikoff@work-03 )
│   └── 03-Service
│   ├── GetSetService service: serves get/set random value requests, interacts with HAL
│   ├── GetterApp getter: reads value of saved random value on button click
│   └── SetterApp setter: sets new random, sends intents to control leds
├── config hal: config
├── interfaces hal: interface
│   └── ledcontrol
│   └── 1.0
│   └── default
└── sepolicy hal: policies

## Build HOWTO

Pull sources:
`$ cd ~/`
`$ mkdir hikey960`
`$ cd hikey960`
`$ repo init -u [email protected]:svistelnikoff/android_manifest.git -b gl-hikey960`
`$ repo sync -j4 -c -f`

Download and extract HDMI proprietary binaries for Hikey960 (from the project home folder):
`$ wget https://dl.google.com/dl/android/aosp/arm-hikey960-OPR-cf4e0c80.tgz`
`$ tar xzf arm-hikey960-OPR-cf4e0c80.tgz`
`$ ./extract-arm-hikey960.sh`

Build
`$ cd hikey960`
`$ . ./build/envsetup.sh`
`$ lunch hikey960-userdebug`
`$ make -j8`

## Flash firmware

Enter fastboot mode. There are two options:
- power off the board, turn ON dipswitch 1 and 3, power on the board.
- connect the board via USB and run from host machine:
`$ adb reboot bootloader`
Check if device has entered bootloader, run from host machine:
`fastboot devices`
Flash device:
`$ cd device/linaro/hikey/installer/hikey960`
`$ ./flash-all.sh`


2 changes: 1 addition & 1 deletion config/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
hidl_package_root {
name: "vendor.gl",
path: "vendor/gl/interfaces"
}
}
2 changes: 1 addition & 1 deletion config/config.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ value: 2901
mode: 0775
user: AID_VENDOR_LEDCONTROL
group: AID_VENDOR_LEDCONTROL
caps: 0
caps: 0
4 changes: 4 additions & 0 deletions gl-vendor.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

PRODUCT_PACKAGES += GetSetService
PRODUCT_PACKAGES += GetterApp
PRODUCT_PACKAGES += SetterApp
2 changes: 1 addition & 1 deletion interfaces/ledcontrol/1.0/ILedControl.hal
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ interface ILedControl {
terminate() generates (int32_t result);


};
};
2 changes: 1 addition & 1 deletion interfaces/ledcontrol/1.0/default/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ cc_binary {
"liblog",
"[email protected]",
],
}
}
2 changes: 1 addition & 1 deletion interfaces/ledcontrol/1.0/default/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ on early-boot
chown vendor_ledcontrol vendor_ledcontrol /sys/class/leds/user_led3/brightness
chown vendor_ledcontrol vendor_ledcontrol /sys/class/leds/user_led3/trigger
chown vendor_ledcontrol vendor_ledcontrol /sys/class/leds/user_led4/brightness
chown vendor_ledcontrol vendor_ledcontrol /sys/class/leds/user_led4/trigger
chown vendor_ledcontrol vendor_ledcontrol /sys/class/leds/user_led4/trigger
2 changes: 1 addition & 1 deletion interfaces/ledcontrol/1.0/types.hal
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ enum Leds : uint8_t {
LED_2,
LED_3,
LED_4,
};
};
2 changes: 1 addition & 1 deletion interfaces/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
<instance>default</instance>
</interface>
</hal>
</manifest>
</manifest>
2 changes: 1 addition & 1 deletion sepolicy/file.te
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#

type hal_ledcontrol_default_exec, exec_type, vendor_file_type, file_type;
type ledcontrol_app_data, file_type;
type ledcontrol_app_data, file_type;
2 changes: 1 addition & 1 deletion sepolicy/hwservice.te
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Copyright
#

type hal_ledcontrol_hwservice, hwservice_manager_type;
type hal_ledcontrol_hwservice, hwservice_manager_type;
2 changes: 1 addition & 1 deletion sepolicy/hwservice_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Copyright
#

vendor.gl.ledcontrol::ILedControl u:object_r:hal_ledcontrol_hwservice:s0
vendor.gl.ledcontrol::ILedControl u:object_r:hal_ledcontrol_hwservice:s0
2 changes: 1 addition & 1 deletion sepolicy/installd.te
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Copyright
#

allow installd ledcontrol_app_data:dir { relabelto rw_dir_perms setattr rmdir };
allow installd ledcontrol_app_data:dir { relabelto rw_dir_perms setattr rmdir };
2 changes: 1 addition & 1 deletion sepolicy/ledcontrol_app.te
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ allow ledcontrol_app ledcontrol_app_data:dir { search getattr write add_name cre
allow ledcontrol_app ledcontrol_app_data:file { getattr write create open read setattr };

allow ledcontrol_app hal_ledcontrol_default:binder { call };
allow ledcontrol_app hal_ledcontrol_hwservice:hwservice_manager { find };
allow ledcontrol_app hal_ledcontrol_hwservice:hwservice_manager { find };
2 changes: 1 addition & 1 deletion sepolicy/seapp_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Copyright
#

user=_app domain=ledcontrol_app seinfo=platform name=com.example.getsetservice type=ledcontrol_app_data
user=_app domain=ledcontrol_app seinfo=platform name=com.example.getsetservice type=ledcontrol_app_data

0 comments on commit 0282ac5

Please sign in to comment.