yashsingh1/xdaforums huggingface dataset:
[Android Auto General] BostonDan:
My Android auto was working great, but today I went for a ride and when I plugged in my phone the navigation bar was flashing (it would be there, then disappear, then come back, continuously).

I cleared AA and reboot, but the issue persisted even after a fresh connection.

Just wondering if anybody else has seen this, and if anybody knows how to fix this.

Edit: figured it out. It was from Extras for AA. Even when I removed/uninstalled modules, they remained on the phone. I had to go in with a file explorer and remove them manually.

All is good now.

Cheers,

B.D.
[Android Head-Units] iscle:
Good evening everyone!

I recently bought a Junsun V1 head unit for my Golf 7. I specifically chose it because of the AC8227L SOC, which is a renamed MT8127. It includes a few more peripherals that are useful in car infotainment systems, but the core is identical.

I'm in the process of creating a new firmware from scratch, to replace the chinglish, buggy stock one. However, I have not succeeded yet.

What I have done so far is create a TWRP image for it, completely from source, using the prebuilt kernel. It's available here (any mirrors will be appreciated and linked in this post):

https://mega.nz/file/1Gp2gJ5S#gAxcP1WK8nwXivYTpAlyEsWNoWwNZBZ8VTs3fm57gEc

I have also dumped the firmware from the 2GB + 32GB version: https://mega.nz/file/hXhEjTab#AowvrX36nn9rXIkeu_zgnGmLyDxtiSUSWswwmXcN46k

To install install TWRP simply put it on the "RECOVERY" section in SP Flash Tool using the scatter and preloader provided in the firmware dump. Uncheck everything else and press flash.

You'll need a type-a to type-a USB cable connected to the 4-pin USB connector (not the 6-pin), and then give power to the unit.

Any other information about the device, serial communication between android and the MCU, decompiled apps, modified apps, etc are also welcome!

I hope this is useful for somebody.

UPDATE 07-01-2021:

I've been reverse engineering the MainUI apk for a week now. I've extracted the MCU communication protocol, now I'm trying to extract the DSP protocol, and CAN will be next.

The touch buttons on the left side of the unit is managed by this .apk as well, and that has already been reverse engineered, only the implementation has to be done with the available API I wrote.

All help is welcome. You can find the source code in github. The important work is being done in native libraries, the java stuff is useless right now. https://github.com/Iscle/MainUI
[Android Head-Units] maxou2:
root

hi, i think i have a HU similar to yours ( se e attached pucture ). Btw did you manage to root the original fw? what about your development, it sounds interesting...
[Android Head-Units] maxou2:
root

......see attachment
[Android Head-Units] ExtremeMOD:
If you can install TWRP then you will be able to root.
[Android Head-Units] maxou2:
magisk?
[Android Head-Units] ExtremeMOD:
Anything you want but I would really recommend SuperSU as Magisk doesn't work as intended on these units. Also make sure you run SuperSU v2.79 and no higher. As for TWRP, only version 3.0.2 is stable in my experience.
[Android Head-Units] maxou2:
I'm stuck unlocking the bootloader, the command "fastboot oem unlock" works and the unit ask to confirm by pressing vol+, unfortunately the touch on the panel does not work... tried to put a wireless keyboard dongle on the other USb but it doesn't work....[IMG="unlock"]https://ibb.co/61D4VWy[/IMG]
[Android Head-Units] iscle:
Magisk works just fine, I actually recommend it over SuperSU, as SuperSU is practically obsolete nowadays.

Also, no need to unlock the bootloader, just flash the recovery image as I explained on the first post.
[Android Head-Units] jabatillo_2001:
I have v1 1ram 16rom with ac8227l, but when I tried to update my radio I was only able to with an update-ty.zip with a manual process like this:

What I can do????
[Android Head-Units] jabatillo_2001:
this is the last firmware that junsun send to me https://drive.google.com/file/d/1OjZcB0yqVQsu8O63l58VrMneZBmr25p5/view?usp=sharing
[Android Head-Units] maxou2:
Your update process is very different from mine, probably you should tick every checkbox ( the most dangerous could be the MCU IMHO ) and start the update process. You should check first with the vendor, but it seems the correct procedure if the files he sent you match your Head Unit.

BTW take some picture of the MCu version, FW revision etc... of your unit.
[Android Head-Units] maxou2:
Actually the compressed file they sent you contains BOOT, SYSTEM, TEE AND VENDOR updated partitions, and .bin update file ( usually the mcu update are .bin file but in my experience are really smaller then the one contained in the zip so it's diffucult to know what is for ).

So probably you should tick the "Sistema - > update_ty.zip" ONLY and start the update process....
[Android Head-Units] jabatillo_2001:
The update only works with this name of file update-ty.zip, others don't work. My problem is bluetooth, It Connects and disconnects all the time. I'm crazy with this, I think the problem is bttool.apk or MTK but I'm not sure.I'm not allow to call or answer calls, either I can't dial by numbers.

I need to try some other firmware to resolve the problem.

Perhaps you can give me one idea or some trick to help me.

Thanks a lot.

My Android mobile XDA app don't work properly, after I'll attach you photos of my radio characteristics.
[Android Head-Units] maxou2:
Need to be sure that the firmware in this thread match your unit first, take pictures of your system infos. BTW your unit is only 1 GB RAM right?

Can you post the link where you bought it? ( Probably aliexpress... )
[Android Head-Units] maxou2:
Keep in mind that generally on these chinese HU the BT is not managed by the android system as with cellphones, it's the MCU and dedicated apk that usually do that ( you do not have any BT option in the android system settings ).

So:

1) Did you try with a system reset?

2) Can you reach an advanced system option menu ( a little bit tricky in my unit ) where you can interact deeply ( BE VERY CAREFUL ) with several options, here you can set some BT systemwide parameters.

3) Maybe an MCU update could also help
[Android Head-Units] jabatillo_2001:
1) yes

2)Wells, only development options of Android, the firmware not contains BT options. If you turn off BT, It turns off automatically. BT music only works if you play by mobile, neither by radio.

3) Perhaps, but it's the same problem, to update MCU I need a file named m51_update. You can see in image.

I have a A2 Lite of Xiaomi, but I try in a note 6 pro and the same problem.

What can I do?

I don't know what I can modify native MCU, but I like to probe another compatible ROM.

All my test, without rooting, are around Android 8.1 BT problems..

Bttool.apk don't work properly, disconnects for example, when I try to syncronize the contacts.

I'm afraid to brick It installing by flashing.
[Android Head-Units] iscle:
The firmware I posted on the first post was also extracted with SP Flash Tools + WwR tools. I sent it to a friend who uploaded a dump made with dumpyara here: https://git.rip/dumps/ffkj/ff-5000

This way we can navigate the filesystem easily, and grab anything we need.

I'm in the process of creating a kernel source for this SoC, I don't know if it will work, but if it does, the first thing I'll do is overclock it haha
[Android Head-Units] maxou2:
You should check your HU Hardware parameters, so you can figure is this thread is for you.

System "About device" - see picture.. Take a picture of the values on the screen.

View attachment 5163967

After that touch the Gear icon on the top right of the screen a popup menu will appear, digit 8888 and ok.

An advanced system setting menu will appear, choose "others", scroll down and you'll see some BT options ( see picture ), try to change them.

Save and reboot.

If your system doesn't have such as menus I strongly recommend you to check elsewhere because probably your HU is different from mine.
[Android Head-Units] maxou2:
Wow, overclock this CPU should be challenging, it's not really fast but i think it's HW locked...

BTW did you experience an additional boot lag after magisk installation?

And what was your FW version?

My last one is :
[Android Head-Units] maxou2:
I forgot to mention that from the advanced system menu if you digit 1111 instead of 8888 a process showing % cpu and SOC temperature will popup and stay resident on the top of the screen, cool if you want see how the CPU is struggling sometimes....
[Android Head-Units] maxou2:
Ok, by looking at your dump we have the same version apparently...
[Android Head-Units] iscle:
It looks like I'm running a version slighly older than yours. I got an update, I'm going to flash it now.

It would be nice to know how the two file update works, so that we can unpack them directly without flashing them...

So far, I've only found some offsets, but those might change in different files.
[Android Head-Units] maxou2:
Yep kernel version seems to be slightly different, dunno this makes a big difference.

Anyway the OTA I posted probably works only with the stock recovery, , don't think TWRP can manage the process andI can't test 'cause I put my unit on the car so it's quite difficult to test.

BTW the vendor sent me a video ( I deleted it :mad: ) showing the upgrade proces ; actually you have to put the .upd and .bin files on a USB key attached to the powered off unit ( maybe 4 wire USB I don't remember well ), put your 5 fingers on the screen and powerup the unit keeping moving the fingers on the screen, the update process should start. To be honest I did not check if somewhere in the options menu there was a way to start this process with the powered up HU ...
[Android Head-Units] maxou2:
...and I did not find a way to convert them in something like .img or something understandable...
[Android Head-Units] iscle:
I deleted some crappy .apk files from /vendor and now the volume controls do not work, and red lettering saying "Activation code does not match" has appeared on the screen.

Will see if I can remove this the right way (editing .apk files)...The code responsible for this is most likely in SystemUI.apk or frameworks.jar
[Android Head-Units] jabatillo_2001:
I don´t have this menu.

I find this solution this morning at web and tried.

this is the link

https://es.aliexpress.com/item/4000273715773.html?spm=a2g0s.12269583.0.0.186d6c11pWW1dK

the seller was junsun-factory
[Android Head-Units] MGSOU:
Hola, encuentro poca información sobre mi mcu TS907. Creo que la unidad es diferente pero la misma mcu.

¿Podrías decirme si servirían para rootear tus archivos? Gracias

ver archivos adjuntos
[Android Head-Units] iscle:
Si la resolución de pantalla es 1024x600, entonces muy seguramente sí. De todas maneras, haz una copia antes de todo el sistema, o, como mínimo, del recovery.img por si el TWRP falla.
[Android Head-Units] MGSOU:
[QUOTE = "iscle, post: 84147661, member: 5827968"]

Si la resolución de pantalla es 1024x600, entonces muy seguramente sí. De todas maneras, haz una copia antes de todo el sistema, o, como mínimo, del recovery.img por si el TWRP falla.

[/CITAR]

Si es esa resolución, tengo el proveedor de envío del archivo bin 10.0UI8227. ¿Entonces no necesito una copia?

¿El tuyo es más antiguo o más nuevo? Disculpe pero la primera vez quiero rootear
[Android Head-Units] iscle:
Found the issue! I removed the "XfApp" which looks like gets checked by MainUI.apk. I just created a fake package with that name to solve it :P
[Android Head-Units] maxou2:
cool... i remember xfapss su notifications popped up often after the root, if you manage to bypass this maybe tou can improve system responsiveness..

Your model has some differences regarding the DSP and probably the RDS radio management.

AFAIK my unit has a big apk - namely MainUI.apk - that manage Radio, DSP and other system's functionalaity so it's difficult to say exactly if this could fit your unit.

First of all you should make a DUMP of your current firmware to be reasonably safe before flashing/upgrading your system, see the previous posts. After that you could try to update the system with the OTA I published, if it was not suitable the upgrade program should ( with chinese developer this could be far to be assured ) stop with a warning about the wrong target unit if it was the case.

Alternatevly you could flash with SP Flash tool one of the recovery we posted, boot in recovery (TWRP ) mode, make a full backup of every partition, and after that you could flash ( via TWRP ) the files ( or system.img at least ) that iscle has mentioned in the OP.

As a safer rule of thumb keep in mind to not flash the preload partition.....

Good Luck
[Android Head-Units] iscle:
Yep! I removed it because of that. I also removed other apps which were requesting root, like the DVD apps, since my unit does not have a reader...
[Android Head-Units] maxou2:
Pictures of the unit "guts" :

The Power amplifier chip :

It uses a chinese chip ( http://www.autochips.com/en/Amplifier/ ) claiming to ba an AB Mosfet low noise/distortion amplifier.

Seems to have 4 x 26 W / 4 @ 14.4 V, 1 kHz, 10 % THD.

Million dollar question : does it worth to replace with something like TDA7851?

Note the electrolitic capacitor, seems to be quite undersized, i solder another capacitor in parallel to raise the total capacity at about 6000uF, maybe low basses will improve.

In my unit i found a flaw about the heat dissipation, don't know if it's only my unit or if it's a design one.

This unit uses a passive thermal method so the whole back chassis is a heat radiator: the board hottest point are the SOC ( that is the AC8227L) and the Power amplifier.

The PU chip is in contact with the back chassis ( no screws, only back chassis contact with a lot of dissipating thermal paste ). This shouldn't be a big issue as a Mosfet chip of that power does not generate an immense amount of heat...

The flaw about the SOC heat dissipation: this is the back of the unit, you can see the slot where the PU chip goes and the square "leg" that should touch the CPU; actually that leg doesn't touch the SOC case, so the heat disspation is far to be optimal in this case...

So i decided to put a thin conductive adhesive film ontop of the SOC case:

I tested the system by loading the cpu at 100% ( with a thread load generator apk ) for few hours: without the mod the temperature raised to 75° whereas the mod lowered the max temp to 65°.

Having spares 12V fans I went for a paranoiac modification :

due to the fans noise i used a DC step down controller to drive the fans at about 8V so the noise was inaudible.

The same "cooking" test above reported a max temp of about 55°.

Pratical results? The DAB+ app sometime had issues; it muted sound for a short time, it seemed to me that with this mod it works better... ( or it was the choice of Christmas wines to make me think so... )

So in the end I suggest to check if in your unit the SOC case has a good contact with the chassis "leg".
[Android Head-Units] iscle:
Okay, I've been digging through the firmware to see where the f*** the programmers set most apps to fullscreen mode, and finally found it. In case any of you, like me, does not want to force fullscreen for all apps, you have to set this setting in /vendor/build.prop or /system/build.prop:

forfan.force_fullscreen=0

It took me a few hours to find, so hopefully nobody else has to go through the pain again :P
[Android Head-Units] maxou2:
Good job, will give a try ASAP, take a rest and relax for a while....
[Android Head-Units] jabatillo_2001:
[QUOTE = "maxou2, publicación: 84148223, miembro: 4643209"]

genial ... recuerdo que las notificaciones de xfapss su aparecían a menudo después de la raíz, si logras omitir esto, tal vez puedas mejorar la capacidad de respuesta del sistema ...

Su modelo tiene algunas diferencias con respecto al DSP y probablemente a la gestión de radio RDS.

AFAIK, mi unidad tiene una gran apk, a saber, MainUI.apk, que administra la función de radio, DSP y otros sistemas, por lo que es difícil decir exactamente si esto podría ajustarse a su unidad.

En primer lugar, debe hacer un DUMP de su firmware actual para estar razonablemente seguro antes de actualizar / actualizar su sistema, vea las publicaciones anteriores. Después de eso, podría intentar actualizar el sistema con la OTA que publiqué, si no fuera adecuado, el programa de actualización debería (con el desarrollador chino, esto podría estar lejos de ser seguro) detenerse con una advertencia sobre la unidad de destino incorrecta si fuera el caso .

Alternativamente, puede flashear con la herramienta SP Flash una de las recuperaciones que publicamos, arrancar en modo de recuperación (TWRP), hacer una copia de seguridad completa de cada partición, y luego puede flashear (a través de TWRP) los archivos (o system.img al menos ) que iscle ha mencionado en el OP.

Como regla general más segura, tenga en cuenta no actualizar la partición de precarga ...

Buena suerte

[/CITAR]

Gracias aunque lo veo un poco complicado, si fuera un móvil... pero esto me da un poco más de miedo. Nunca lo hice.

Crees que sustituyendo el MCU podría ser suficiente?. Solo quiero que funcione el bluetooth, el resto me funciona muy bien...
[Android Head-Units] MGSOU:
[QUOTE = "iscle, post: 84149261, member: 5827968"]

De acuerdo, he estado investigando el firmware para ver dónde diablos los programadores configuraron la mayoría de las aplicaciones en modo de pantalla completa, y finalmente lo encontré. En caso de que alguno de ustedes, como yo, no quiera forzar la pantalla completa para todas las aplicaciones, debe establecer esta configuración en /vendor/build.prop o /system/build.prop:

forfan.force_fullscreen = 0

Me tomó unas horas encontrarlo, así que espero que nadie más tenga que pasar por el dolor nuevamente. :pags

[/ CITAR]

Big breakthrough, I would like to put my tsplayer video app would always start in full screen
[Android Head-Units] jabatillo_2001:
Nadie tiene un firmware o mcu actualizado de la junsun v1 1g 16g de los que se actualizan con ficheros update-ty.zip y ms51_update.bin?????
[Android Head-Units] maxou2:
hey guys please speak english.....
[Android Head-Units] jabatillo_2001:
Ok
[Android Head-Units] maxou2:
Ask your vendor or try in some other place.... I think you can find forums where varios MCU type are identified ad discussed somewehere...

BTW did you check the BT antenna? Keep in mind that is just a short wire, check for short circuit or ground contact...
[Android Head-Units] jabatillo_2001:
[QUOTE = "maxou2, publicación: 84151783, miembro: 4643209"]

Pregúntele a su proveedor o pruebe en algún otro lugar ... Creo que puede encontrar foros donde se identifican varios tipos de MCU y se discuten en algún lugar ...

Por cierto, ¿revisaste la antena BT? Tenga en cuenta que es solo un cable corto, verifique si hay cortocircuito o contacto a tierra ...

View attachment 5164787

[/CITAR]

Es una buena idea, pero no sé si podré identificarlo. Gracias
[Android Head-Units] maxou2:
Did not work for me... First try: i modified the /system/build.prop,;after a reboot nothing changed.. Next try was to modify ALSO the /vendor/build.prop , after a reboot the system had a weird behaivior, some apps crashed, the keyboard did not respond properly and so on... In the end i put back the original build.prop in both dirs and the system was ok again. I've noticed in the /system and the /vendor dir the presence of a file named "build.prop~" but i did not have enough time to check its content, only its size was slightly different from the build.prop one.
[Android Head-Units] iscle:
I've been reverse engineering the native library which controls the MCU, DSP and gets CAN messages. MCU is on /dev/ttyMT2, DSP is on /dev/ttyMT3.

Both serial ports use 38400 baudrate.

The Android -> MCU packet format is:

0x23 (1 byte)

Command (1 byte)

Data length (1 byte)

Data ("Data length" bytes)

Checksum (1 byte, XOR of all previous bytes except first byte)

The MCU -> Android format should be the same, but I'm still not 100% sure.

My goal is to write a completely new MainUI apk, since the current one uses a lot of system resources. I'll only focus on making it work on my Junsun V1 2GB + 32GB.
[Android Head-Units] maxou2:
Good Job, I'm not an Andoird programmer neither an app architecture expert but anyway this MainUi.apk seems to be a big mess...

Your reverse engineering is really interesting, unfortunately my unit is in the car otherwise i'd really liked play with it to check all this and discover more... Pls let us know about your future achievements if yuo don't mind.
[Android Head-Units] iscle:
Well I've got some updates.

I've posted my current progress to GitHub. Currently it basically does nothing by itself, but the code to communicate with the touchscreen works perfectly. Also, the code for the MCU seems to be partially working, but I could not get it to do anything, even something as simple as turning off the backlight.

In case any of you want to dig into the code, here it is:

MainUI/app/src/main/jni/mcu.c at new · iscle/MainUI

Base project for MainUI used in Junsun V1 (AC8227L) units. Includes native libraries with corresponding Java classes. - iscle/MainUI

github.com

It's quite messy right now, and some parts are directly copy-paste from ghidra. However, nothing crashes, which is good to see too.

Feel free to make suggestions and even pull requests if you feel like doing so. To be able to run the .apk, it has to be signed with system certificates and installed as a normal .apk as an update, or replacing the apk into /system/priv-app/MainUI.

I chose to sign it with system certificates directly so that I can just click "play" on Android Studio.
[Android Head-Units] iscle:
Good news!

I got MCU communication working! Actually, the communitacion was always working, what failed was the initialization sequence, which is quite weird.

Anyway, it now works and at least I can adjust the screen brightness :D

All the code is in github, as always.
[Android Head-Units] maxou2:
I'm quite busy at the moment and i also can't user the unit as lab test, anyway i really appreciate your work and i really hope to have spare time and knowledge so i can help you ASAP... BTW the worst about our unit is about the responsiveness, sometimes it really sucks... On my other car i have a YT9217 unit ( that has the same SOC but with only 1 GB RAM ) and it really beats our in almost everything ( except radio and DSP ), it's really a pleasure to use it... unfortunately the fw is not compatible ( i suppose ) but it seems to be optimized for the HW.
[Android Head-Units] iscle:
Wow really? I thought the bad performance was mostly because of the SOC... This is the only AC8227L radio I own, I have three more but those are running MT6852, Allwinner T3 and MStar Cedric. The snappiest one is the MT6582, then 8227L, then T3, and then MStar.

I will look into it now that you have mentioned it. It's true that the firmware in the Junsun is crap, log is full of debug output which only speeds thing down more. My goal is to speed it up even if it's just a bit more.

Regarding my work, I'm now working on the DSP, and some functions will be hard to reverse engineer like reverb, fad/bal, mixer/channel selection (bluetooth, radio or android, or a mix of the three).

As always, the code is on github :)
[Android Head-Units] arcadilius:
Gents, you are doing impressive work here however I have different question. Maybe it's wrong place to ask but you look like you know your stuff, not to mention I've tried elsewhere without success. During playing with different softwares and making my own changes I've managed to brick my V1 2/32 and I can't re-flash it back without knowing where the "TEST POINT" is in the board. Maybe you could shed some light. Any clue would be appreciated. Pics of my board attached. Thank you!
[Android Head-Units] iscle:
It's not getting detected by the computer at all?
[Android Head-Units] arcadilius:
No, I have no response at all. No physical buttons as well. As described in some flashing posts, I need to press (short) Volume Button before the board is plugged to computer. Below pic is just an example found for different board...