[FYT Android Head Units] surfer63:
Mods and Tweaks​

==================================================================================

1. disable or (re-)enable the mediaplayer at startup/wakeup.​

FYT mimics the behaviour of many builtin car units that it continues with the player or radio or BT connected phone player, that was active during "switch off". These 2 scripts can disable that behaviour (I want silence when I start my car) or enable it again (default FYT behaviour). This is a shameless copy of @gordgelin scripts with a slight modification where @gordgelin adds the command at the 16th line whereas most standard firmwares have max 8 lines or so. My script simply adds the line to 4th line of config.txt. Works on uis7862 (ums512), sc9863a (uis8581a) and sc9853i (could easily be ported to other FYT units as well).

Note: When you restart the car within 3~4 minutes, so before the "deep-sleep" really has set in, it will still play.

==================================================================================

2. Correct the fytmanufacturer id of your unit/MCU in the fyt.prop​

Do this in case you get a big yellow bar with red letters in the top of screen saying "UI and MCU does not match". It means that the property fytmanufacturer id (ro.build.fytmanufacturer= XY) is incorrect. (See also Q13/A in post 1 and section II. and vI. in post 2.

Option 2a.

Take the config.txt from your firmware. Add the correct ro.build.fytmanufacturer to the config.txt. Only flash this config.txt with a lsec6315update/lsec6316update to your unit.

Option 2b:

If you still know the original id, you can use below linked script to correct that entry again without completely reflashing your unit.

Read the README.txt carefully !!

You can download this script: ChangeFytmanufacturer

==================================================================================

3. Script to correct the screen orientation of your unit.​

Probably you are here because you did not read the Forum well enough (especially "VIII. Flashing a Full firmware, an AllAppUpdate.bin or a new system/kernel/core from another reseller" in post #2 and flashed a firmware to your FYT with a different screen orientation.

What does this script do?

It can set the correct orientation for your screen. This is set by a property called "ro.sf.swrotation=xy", where xy is a value of 0, 90, 180 or 270 . Use the value from YOUR ORIGINAL firmware in the config.txt.

You will find a config.txt with this script that contains the default value for most units being ro.sf.swrotation=90

In case you have no longer your original firmware you simply need to experiment with the above values until you have the right one.

You can download this script: ro.sf.swrotation

==================================================================================

4. Two scripts to flash any FYT AllAppUpdate.bin to your unit.​

EDIT: Some of the new Mekede M6Pro models and comparables from other resellers come with an lcdconfig for their 2000x1200 K screens. My scripts below do not take those files into account. I "think" that when you encounter an lcdconfig on the new downloaded firmware, you have to remove it and stick to the one installed on your unit.

What do these scripts do and how to use them

These scripts are for both the uis7862 (ums512) and for the UIS8581a (sc9863a).

The AllAppUpdate.bin, that contains the FYT application layer, is for both CPUs the same.

The scripts make a copy of your current config and use that to flash your unit using that config of your unit.

Some information to start with

FYT units do have an MCU and based on the type of manufacturer you can have a different MCU firmware. This MCU firmware is totally different from the normal downloadable firmware that you can get for your unit having new functionality, bugfixes, etcetera..

The Android layer is universal on FYTs but works slighly different for different MCUs.

How this Android layer should act on the underlaying MCU is determined by a property called ro.build.fytmanufacturer which can have several values.

A second and third property are the:

sys.fyt.bluetooth_type property which is normally 0 or 1, but on the new M6Pro/M6Plus models anything up to 7

ro.sf.swrotation. This property defines the screen orientation and is in 95% of the cases 90 (degrees), for Joyings often 270 and for Tesla screens (0 or 180).

These properties are in the fyt.prop file and in the config.txt file. These files are copied from your unit onto the usb-stick by the pre-flash script.

Important

BEFORE YOU FLASH ANYTHING TO YOUR UNIT, YOU FIRST NEED TO RUN THE "PRE-FLASH" SCRIPT !!

Steps to perform

Take a clean FAT32 formatted USB-stick (or a (micro-)SD-card in some USB reader/writer).

Copy the contents inside the "pre-flash" folder onto the USB-stick (not the pre-flash folder with contents, but the contents inside the pre-flash folder).

Insert it into your unit, let it reboot and go into recovery mode, and wait until the green message tells you that you can remove it again.

Delete the "lsec_updatesh" folder including contents on your USB-stick !

Make sure to keep the "myconfiguration" folder and check its contents: It must contain a config.txt and a fyt.prop. If correct: copy this myconfiguration also to a save place. You never know when you need a backup. If the folder does not contain those files or one of them, then don't continue but ask in the forum.

Copy the AllAppUpdate.bin that you downloaded somewhere onto the USB-stick.

Also flashing the 6315_1.zip or 6316_1.zip?

UIS7862: If you want to flash the kernel as well, copy the 6315_1.zip onto the USB-stick.

UIS8581a: If you want to flash the kernel as well, copy the 6316_1.zip onto the USB-stick.

Now copy the contents of the "flash" folder onto the USB-stick.

Check your "lsec_updatesh" folder. Do you now also have a "lsec_updatesh (1)" folder, or inside the "lsec_updatesh" folder something like a "7862 (1).sh"? It means that you did not delete the "lsec_updatesh" folder on the USB-stick, or that your file manager does not overwrite on copying. In this case: Redo step 4.

Copy (not move) the config.txt inside the "myconfiguration" folder into the root of the USB-stick.

You can now flash your unit using this USB-stick.

Remarks

If you are thinking of using this in combination with @mariodantas' kernel, you need to know what you do. Mario's kernel comes with its own scripts and fmc app. Of course you can combine this if you know what you do, but do not simply copy everything on top of each other on this USB-stick. Please keep it separate.

You can also combine it with PeaceOS, but also in this case @LLIyT_HuK's version comes with it's own scripts. So know what you do.

The flashing script uses "twipe_data" in its "updatecfg.txt". This will clear your settings and all 3rd party apps which you downloaded from the Play Store or sideloaded from other locations. You can disable that by putting a # in front of the twipe_data line, but that is your own responsibility.

Most newer firmwares nowadays come with an lsec script and a fyt_build.prop. This fyt_build.prop comes with a fake property to set Android to 11 or 12. I refuse to go with that absolutely incorrect and despicable behavior and I will not copy it.

Once you have made your pre-flash copy of your config, you can also use the flash script to copy any modified fyt.prop or config.txt to your unit without using an AllAppUpdate.bin.

You can download both scripts in one zip: flash_any_AllAppUpdate.zip