H618 Android 12.0 is an official TV system compatible with TV-version apps. Installing tablet or phone apps may cause compatibility issues.
TV Launcher
Enable the corresponding PRODUCT_PACKAGES
for the TV launcher:
Copy --- a/vendor/aw/homlet/homlet.mk
+++ b/vendor/aw/homlet/homlet.mk
@@ -16,12 +16,12 @@ PRODUCT_PACKAGES += \
DragonSN \
GalleryTV
-#PRODUCT_PACKAGES += \
+PRODUCT_PACKAGES += \
TvLauncher \
TvSettings
-PRODUCT_PACKAGES += \
+PRODUCT_PACKAGES += \
Launcher3 \
+#PRODUCT_PACKAGES += \
Launcher3 \
Settings \
SystemUI
APK Path :
Copy vendor/aw/homlet/package/TVLauncher
Tablet Launcher
Enable the corresponding PRODUCT_PACKAGES
for the tablet launcher:
Copy --- a/vendor/aw/homlet/homlet.mk
+++ b/vendor/aw/homlet/homlet.mk
@@ -16,12 +16,12 @@ PRODUCT_PACKAGES += \
DragonSN \
GalleryTV
-PRODUCT_PACKAGES += \
+#PRODUCT_PACKAGES += \
TvLauncher \
TvSettings
-#PRODUCT_PACKAGES += \
- Launcher3 \
+PRODUCT_PACKAGES += \
+ Launcher3 \
Settings \
SystemUI
APK Path :
Copy packages/apps/Launcher3/
APP/File Compilation Issues
Android uses lazy compilation. Directly replacing files may not trigger recompilation. Solutions:
Delete specific files:
Copy rm out/target/product/apollo-p2/xxx/xxx
Modify compilation conditions (e.g., filenames or APK names).
Default Screen Orientation
Modify the default display orientation by editing:
Copy android/device/softwinner/ceres-c3/ceres_c3.mk
Change:
Copy # Set primary display orientation to 270
PRODUCT_PROPERTY_OVERRIDES += \
ro.surface_flinger.primary_display_orientation=ORIENTATION_0
# Modify to:
# ro.surface_flinger.primary_display_orientation=ORIENTATION_90
# ro.surface_flinger.primary_display_orientation=ORIENTATION_270
Boot Logo
Logo Replacement Path :
Copy longan/device/config/chips/h618/boot-resource/boot-resource/bootlogo.bmp
Boot Animation
Supported formats: bootanimation.mp4
(higher priority) or bootanimation.zip
.
Modification Path :
Copy device/softwinner/apollo/common/media/config.mk
Example Configuration :
For bootanimation.zip
:
Copy PRODUCT_COPY_FILES += \
$(BOOTANIMATION_CONFIG_PATH)/bootanimation.zip:system/media/bootanimation.zip
For bootanimation.mp4
:
Copy PRODUCT_COPY_FILES += \
$(BOOTANIMATION_CONFIG_PATH)/bootanimation.mp4:system/media/bootanimation.mp4
Note: The first boot after flashing will show the default Android animation. Reboot to apply the custom animation.
Default Language
Method 1 : Modify persist.sys.locale
in:
Copy device/softwinner/apollo/apollo_p2.mk
Example:
Copy PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.locale=zh-CN
Method 2 : Adjust persist.sys.country
and persist.sys.language
:
Copy --- a/device/softwinner/apollo/apollo_p2.mk
+++ b/device/softwinner/apollo/apollo_p2.mk
@@ -32,8 +32,8 @@ PRODUCT_PACKAGES += FT618
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
persist.sys.timezone=Asia/Shanghai \
- persist.sys.country=US \
- persist.sys.language=en
+ persist.sys.country=CN \
+ persist.sys.language=zh
Method 3 : Set PRODUCT_LOCALES
in:
Copy build/target/product/full_base.mk
Options:
Pre-installing Third-party Apps
Steps :
Place your APK and Android.bp
/Android.mk
in:
Copy h618-android12.0/vendor/aw/public/prebuild/apk
Example Android.mk
:
Copy LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_MODULE := test
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
include $(BUILD_PREBUILT)
Example Android.bp
:
Copy android_app_import {
name: "test",
apk: "test.apk",
certificate: "platform",
dex_preopt: { enabled: true },
privileged: true,
enforce_uses_libs: false,
}
Add the app to vendor/aw/homlet/homlet.mk
:
Copy PRODUCT_PACKAGES += \
test
Auto-start APP on Boot
Launcher Method
Add the following to AndroidManifest.xml
:
Copy <activity android:name=".MainActivity">
<intent-filter>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
Override existing launchers using:
Android.bp :
Copy overrides: ["Launcher2", "Launcher3", ...]
Android.mk :
Copy LOCAL_OVERRIDES_PACKAGES := Launcher2 Launcher3 ...
Background Broadcast Method
Add permissions and a broadcast receiver to AndroidManifest.xml
:
Copy <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<receiver
android:name=".MyReceiver"
android:enabled="true"
android:exported="true">
<intent-filter android:priority="1000">
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
Implement the receiver:
Copy public class MyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals("android.intent.action.BOOT_COMPLETED")) {
Intent i = new Intent(context, MainActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}
}
APK Push to priv-app
Copy adb root
adb remount
adb push <APK_PATH> /system/priv-app/
adb reboot
APP Signature Files
Signature Paths :
Copy build/target/product/security/platform.pk8
build/target/product/security/platform.x509.pem
out/host/linux-x86/framework/signapk.jar
Special Permission Issues
If privileged permissions are missing, modify:
Copy frameworks/base/data/etc/privapp-permissions-platform.xml
Example fix:
Copy --- a/frameworks/base/data/etc/privapp-permissions-platform.xml
+++ b/frameworks/base/data/etc/privapp-permissions-platform.xml
@@ -550,4 +550,8 @@ applications that come with the platform
<privapp-permissions package="com.android.calllogbackup">
<permission name="com.android.voicemail.permission.READ_VOICEMAIL"/>
</privapp-permissions>
+
+ <privapp-permissions package="com.example.myapplication3">
+ <permission name="android.permission.INSTALL_PACKAGES"/>
+ </privapp-permissions>
Full Rebuild Not Effective
Clean before rebuilding:
Copy source build/envsetup.sh
lunch apollo_p2-userdebug
make installclean -j32
./build.sh
HDMI Fixed Resolution
HDMI TX Attributes :
Copy /sys/class/hdmi/hdmi/attr
ADB Functions
USB ADB Connection
Connect the device via USB.
Install drivers if unrecognized (see screenshots below).
Run adb shell
to connect.
Network ADB
Enable TCP/IP mode:
Copy adb tcpip 5555
adb connect <DEVICE_IP>
Auto-start TCP/IP on boot:
Copy adb root
adb remount
adb pull /system/build.prop
# Add: service.adb.tcp.port=5555
adb push build.prop /system/build.prop
adb reboot
ADB Screen Casting
Use tools from:
Copy h618_data\5-DevelopmentTools\ADB Screen Cast
Screen Rotation
Use ADB commands:
Copy # 0°
adb shell settings put system user_rotation 0
# 90°
adb shell settings put system user_rotation 1
# 180°
adb shell settings put system user_rotation 2
# 270°
adb shell settings put system user_rotation 3