HowTo Section
Install to emmc card (only!):
Be sure which device is your emmc card!
Code: Select all
#dd if=Android13-20230129-odroidc4.img of=/dev/sdX bs=1M
#sync
Or use other flashing tool.
Install Magisk:
https://github.com/topjohnwu/Magisk/rel ... -v24.3.apk
Code: Select all
adb shell
#su
#dd if=/dev/block/by-name/boot of=boot.img
//In Magisk Manager use patch file method...
#dd if=magisk_patched-24300_xxxx.img of=/dev/block/by-name/boot
#reboot
Devicetree overlays:
For now only 7 devicetree overlays are ready to use:
spi0 pwm_ab pwm_cd pwm_ef i2c0 i2c1 gt911
To enable or disable an overlay, command
fw_setenv
is used, and
fw_printenv
to read.
Code: Select all
odroidc4:/ $ su
odroidc4:/ # fw_printenv overlays
overlays=spi0 pwm_cd
odroidc4:/ # fw_setenv overlays "spi0 pwm_ab"
After setting this, odroid c4 needs a reboot, so that u-boot applies the overlays during boot.
Don't try other than this 7 overlays, it can result in a boot loop. If so, only at interrupted u-boot command line the env variable
overlays
can be restored.
Gnss:
The driver is based on Gnss V2.1 GnssTemplate source code, but is developed further to have it bug free, to have GnssSvInfo and to have support for GPS, GLONASS, GALILEO and BEIDOU. But only tested from my side is GPS and multimode with GPS and GLONASS.
So far it can in single satellite mode only GPS with messages GPRMC, GPGGA, etc, and in multi satellite mode with messages GNRMC, GNGGA, etc. two satellite systems. My ublox m8 mouse can do that.
As serial port is configured /dev/ttyACM. The driver scans ttyACM0 ...9 to find a ublox GPS mouse.
If someone needs to define another serial port the prop
debug.location.fixedlocation.devname
must be set. The driver takes this port now and does not anymore scan for an ublox device.
Code: Select all
//enable ttyUSB0
$ adb shell setprop debug.location.fixedlocation.devname /dev/ttyUSB0
//disable
adb shell setprop debug.location.fixedlocation.devname \"\"
The default port is set in prop
vendor.ser.gnss-uart
Code: Select all
adb shell getprop vendor.ser.gnss-uart
/dev/ttyACM
If there are problems with the driver, a lot of debug messages can be enabled with setting
log.tag.android.hardware.gnss@2.1-service.usbserial
Code: Select all
//debug messages
adb shell setprop log.tag.android.hardware.gnss@2.1-service.usbserial VERBOSE
//no debug messages
adb shell setprop log.tag.android.hardware.gnss@2.1-service.usbserial WARN
Gapps:
Here can be downloaded working Gapps for Android 13, flash-able with Magisk.
https://sourceforge.net/projects/magisk ... A/24.2.23/
Copy to C4 and select Module in Magisk and install from memory...
About a hour after registering, account can be added! Registering at:
https://www.google.com/android/uncertified/
Use core version, other versions are too big.
Backlight:
-Set pwm_cd in overlays. Backlight pwm will be at pin 11 of 40p header.
-To enable the lights driver, set at adb shell
fw_printenv extrabootargs "backlight_pwm=yes"
. Must be root, do
adb root
before
adb shell
.
4G Modem:
-On ext partition is a config file for switching modem with usb_modeswitch:
/ext/etc/usb_modeswitch.conf
Code: Select all
#Huawei
DefaultVendor= 0x12d1
DefaultProduct= 0x1f01
TargetVendor=0x12d1
TargetProductList="14db,14dc"
HuaweiNewMode=1
MessageEndPoint = "0x01"
MessageContent="55534243000000000000000000000011060000000000000000000000000000"
NoDriverLoading=1
-Ext partition is free to use and rw. Will not be updated by ota update.
Wifi dongles:
-edit init.ext.rc on ext partition with nano as su:
Code: Select all
#add init rules here
#on boot
on early-boot
exec -- /system/bin/insmod /vendor/lib/modules/rtl8xxxu.ko
# exec -- /system/bin/insmod /vendor/lib/modules/8821cu.ko
# exec -- /system/bin/insmod /vendor/lib/modules/8821au.ko
# exec -- /system/bin/insmod /vendor/lib/modules/8188eu.ko
These modules are not in the modules.load list, so the system doesn't load them automatically. I made it this way, because with automatically loading, the module cfg80211 loads to early and blocks all loop devices for >60 seconds.
Mount smb share to accessible directory
-edit init.ext.rc on ext partition with nano as su:
Code: Select all
#add init rules here
# on boot
on property:sys.boot_completed=1
wait /storage/emulated/0/Android 20
setprop storage_done 1
on property:storage_done=1
mkdir /storage/emulated/0/my_folder 0770 media_rw media_rw
start mount_folder
service mount_folder /system/bin/mount -t smb3 -o username=my_user,password=my_passw,gid=1023,uid=1023,file_mode=0777,dir_mode=0777,iocharset=utf8 //my_ip/my_share /storage/emulated/0/my_folder
class main
disabled
oneshot