yashsingh1/xdaforums huggingface dataset:
[Google Pixel 6 Pro] fuji97:
Hello,

In all of the steps to install Magisk on a phone, I never liked the step in which you have to flash the patched boot image on the boot partition. I always thought it is pruned to errors, especially if you do that at every update, an oversight maybe when you download the ROM or maybe you use an older version of the patched image and your device is soft-bricked. So, I always wondered if there are other, safer, solutions to do that step. When searching for various guides, I found one that instead of directly patching the boot image, boots it instead and then uses the direct installation option in the Magisk app to extract, patch, and re-flash the boot image. I know that the result is pretty much the same, but if you screw up with the patched boot image, the result is just a temporary bootloop that you can resolve by just restarting your device. But in all the guides I've read, only one suggested this alternative solution, so I was wondering why this solution isn't suggested or, at least, mentioned, for those who are afraid to do the blind flash. There are possible issues with using this method or what?

I already used this method two times for installing Magisk on a Oneplus 9 and a Pixel 6, and now I'm here with a brand new Pixel 6 Pro and I've to decide what method to use.
[Google Pixel 6 Pro] teegraves58:
Because you're essentially doing the same thing. Even if you flash the incorrect boot image, just flash the correct one afterwards and problem resolved. You can do either way, the alternative just takes a step longer.
[Google Pixel 6 Pro] shoey63:
Now that restore images/flash to inactive slot after ota is fixed on Magisk (canary 24306 and later), I would boot the patched image, then do a direct install.

This ensures that Magisk makes a backup of the stock boot image so next update can be taken OTA if desired.

Note: the re-root after OTA method may not work on custom kernels which often make changes to partitions other than boot
[Google Pixel 6 Pro] fuji97:
Thanks for the answer, this is really helpful. So, should I use the canary version for the first installation or can I use the stable and update to the canary when I have to OTA update? This is just to be sure, I don't know how "stable" is the canary since I never used it.

And since I'm, I'll take the opportunity to ask another related question: how bad can I screw up with the boot image? For example, if I flash a boot image of another device (oriole for example), should I still be able to boot into fastboot and flash the original, or this will prevent me to boot in the fastboot mode at all?

Because I'm still not sure if the initial bootloader phase (the one that boots up the fastboot) is included in the boot image or not, since the recovery has been included in the ramdisk of the boot image since the introduction of the A/B devices (or, at least, I think so).
[Google Pixel 6 Pro] shoey63:
@fuji97

You can patch intially with stable and change to canary before next OTA if stable hasn't been updated by then.

Booting or flashing boot images can't affect the bootloader partition, which is seperate.

Fastboot boot the patched image, if it boots up you are good to go with a direct install from within Magisk. If it bootloops you will just boot up to your original setup with stock boot intact. Then you can troubleshoot.

If you directly flash a scewed up boot image, it will probably boot to bootloader, and you can flash a working boot.img.

If it bootloops 3 times, the phone will boot to the opposite slot, and you will have a working system again.
[Google Pixel 6 Pro] fuji97:
Awesome, thank you! You clarified a lot of my concerns.
[Google Pixel 6 Pro] Rescue9:
I do this exact procedure for every OTA. It's just easier for me and I've had numerous problems trying to "keep" root versus just booting to a patched image and reinstalling.
[LG V50 ThinQ Questions & Answers] Vitiok70:
Hi guys, I have an LG V50 Thinq from Sprint. Well, the problem is the following, after several manipulations, I have unlocked the boot, TWRP flashing, I swipe everything absolutely to the two slots. And in the end I have flashed the EvolutionX cooked rom that went great for me, I honestly think it is the best cooked rom of today for our terminal. Well, in the end I decided to crossflash a European stock rom, I wanted to have the original stock system, but not from Sprint, I didn't like it at all. In the end, after a lot of manipulations, I am left with, that it starts only in Bootloader and nothing else, neither recovery, master nor system reset, nothing at all. Yes, I can also start it in EDL mode to use it with QFIL, if for Qfil I have tried different manipulations to recover it, but without result. Any ideas guys? Thank you
[LG V50 ThinQ Questions & Answers] Vitiok70:
The problem is solved. We close the theme.
[LG V50 ThinQ Questions & Answers] hg1218:
Can you write in steps what you did please

in similar situation
[Android Head-Units] TorstenH:
AppSwitcher ​

SWC (Steering Wheel Control) app launcher
​

This thread gets continued here​

Stay focused on the street and don't touch the head units display to switch between apps.

Support the development of this free app via

ko-fi.com/appswitcher​

Please note: This app is developed and tested only on Junsun V1 Pro with MTK825X AND MT8667 CPU. You can test on other devices and let me know if it works...

One user reported usage on Xtrons unit - so give it a try.

User Interface:

View attachment 5873671

View attachment 5839973

Covered features:

- allow to select an app to start without the need to jump from app to app.

- one button press to switch between last used navigation app and last used media app.

- support usage of multiple navigation apps.

- works with pre-installed apps like Radio and apps added by the user.

- start the last used media app automatically.

- long button press to cancel (if dialog is shown) or to jump to home screen.

- reactivate accessibility service of Automate and start initial Automate Flow

- enable/disable DuraSpeed

- change system property to make Android status bar visible (work as on other Android devices)

- automatic screen dimming based on sunset / sunrise information

- allows to start the (Junsun) equalizer app

- Supports Mtk8257 and 8667 devices. Thank you @Jetblack31 for your testing engagement on 8667.

Feedback on the web

Unfortunately the author only picks up one specific aspect of the app.

View attachment 5878149

Testers are welcome! I need YOUR help and your feedback. Don't be a stranger!

Please install both apps because 'AppSwitcher Starter' is just used to start the App Switcher Service. Find installation instruction in 3rd post.

FAQ

https://xdaforums.com/t/appswitcher...sun-and-similar-devices.4435555/post-86825555
[Android Head-Units] TorstenH:
Installation/configuration on Junsun V1 pro:

I know real men don't need to read manuals but have a look before asking stupid questions. ;-)

- Install both! apps ('AppSwitcher' and 'AppSwitcher Starter')

- Enable automatic start of navigation app in factory settings and let your device reboot

View attachment 5600319

- Open app 'AppSwitcher' and select your navigation and multimedia apps'

- Set 'AppSwitcher Starter' as navigation app:

View attachment 5600327

- Configure one button of steering wheel to start navigation app (if not already done)

View attachment 5600351

- Optional, if you're using not the stock launcher: Add 'AppSwitcher Starter' to autorun. This will start AppSwitcher even if the head unit misses to start the navigation app after sleep. This step is optional and shouldn't be required.

--> Basic configuration completed

Further settings

Run media app on service start:

Last used media app will be started as soon as 'AppSwitcher Service' gets started. Exception: Another media app or navigation app is already in foreground.

FAQ

Post in thread 'AppSwitcher - smart SWC launcher (for Junsun and similar devices)' https://xdaforums.com/t/appswitcher...sun-and-similar-devices.4435555/post-86825555
[Android Head-Units] Anton TNT:
Is it for 8227L chipset mtk devices ?
[Android Head-Units] TorstenH:
It is not tied to a specific chipset. The app reads the device log to identify if the steering wheel button was pushed.

So you could check that with a device log reader app like Logcat.

On Junsun devices you can find a entry with TAG 'MainUI' and message 'nDealPkey = = xxx' for each button press in the log.
[Android Head-Units] Anton TNT:
I'm asking that because Junsun has similar boards like mine ALPS device with AC8227L chipset.
[Android Head-Units] TorstenH:
Added video of alpha app version to first post.
[Android Head-Units] TorstenH:
Added APKs (1st post) and installation/configuration instruction (3rd post) .
[Android Head-Units] TorstenH:
New version 1.1 alpha available. Please download from 1st post. Major changes are listed in 2nd post.
[Android Head-Units] Pylotis:
Please excuse my scepticism.

How can we make sure that your application is safe?

1. The application is not on Google Play.

2. The code is not open source.

3. You have no link to a repository.

Other than that, great idea keep up the good work.

A functionality for trying to connect to the latest wifi hotspot, or to try all previous used networks?
[Android Head-Units] TorstenH:
Thank you for your feedback. You're right but I just started with Android app development recently. Github will come, PlayStore maybe never. In meantime feel free to use an (online) decompiler as you would have to do for a lot of apps provided here on Xda. On the other side be sure the Chinese pre-installed enought risky stuff on the head units.

I thought about the possibility to trigger system scan for wifi networks to get the internet connection faster.
[Android Head-Units] ramig:
thanks for sharing. for me it is very useful :)
[Android Head-Units] TorstenH:
Thank you for your great feedback.
[Android Head-Units] TorstenH:
Added version 1.2
[Android Head-Units] TorstenH:
Added version 1.3
[Android Head-Units] TorstenH:
Added version 1.4.

Only minor changes but the UI bug was too painful for my eyes. (-:
[Android Head-Units] Opteronix:
Hi Thorsten,

thanks for this app.

This is exactly what I was looking for. A brilliant and creative idea to use the navi app as a trigger (y)

:cool:👏🍻
[Android Head-Units] TorstenH:
Thank you very much! After ~90 downloads I'm really happy to read such a great feedback.

Wish you good and safe rides with the app.
[Android Head-Units] st3v4nt:
Hi Thorsten, I found your app through your reply in other thread regarding fyt. I test it on teyes cc3, it works as you describe. I assign the 3rd party dvr app to steering switch long press. However I wonder if next version could be expanded to not only replace navi app/button but other button/function as well, or when assigned button press it will cycle to different apps. And one more thing I’m pretty sure I downloaded the latest version of your app but the app info still showing version 1.3 instead version 1.4. Thank you for the app.
[Android Head-Units] TorstenH:
Don't set a filter and search for keywords like key, button, swc,...
[Android Head-Units] Ukiews:
Are you using CANBUS or key1 & key2 wires?
[Android Head-Units] tvladan:
Try SystemUI or look in headunit about settings and provide the MCU version here please for further disscution. On some units it's SystemUI, on others is MTCManager MTKManager HTC Manager and so on ...
[Android Head-Units] Ukiews:
The CC3 is based on the ums512 (aka uis7862) processor.

The MCU: 2022.06.25 10:26:23 TZY_53_L6315_G23P48F64_3G_E60_V:1.0R

After digging around in various settings (factory, developer, etc.) could not find anything. There is a steering wheel programming app, but only for KEY1-KEY2 setup, not CANBUS.
[Android Head-Units] Ukiews:
I can identify the left and right buttons, and up down comes through (on a different filter), but nothing specific for the SOURCE button.
[Android Head-Units] tvladan:
Y

You can find the keycode (source) by using tasker and this plugin https://play.google.com/store/apps/details?id=com.joaomgcd.autoinput

Than search logcat for that keyid and maybe find the process that your need.

This is one way I would do it.
[Android Head-Units] Ukiews:
Are there any particular instructions for how the keycode would be captured.

When running the Autoinput on its own and try to capture the SOURCE button (Tasker is also installed), i get this:

which is obviously not a keycode.
[Android Head-Units] TorstenH:
The second one from the bottom may be relevant. Check if the message always appears if you press the source/mode button and check how it looks when you press another button.

Using Google and searching for fythwonekey I found this which may be relevant:

GitHub - hvdwolf/FytHWOneKey: App to modify the hardware buttons on FYT units (Sofia3GR/PX5/sc9853i/sc9863a/uis7862)

App to modify the hardware buttons on FYT units (Sofia3GR/PX5/sc9853i/sc9863a/uis7862) - hvdwolf/FytHWOneKey

github.com

But if you have questions to this app check if another thread is already present on XDA and continue discussion regarding Fythwonekey there or create a new thread.
[Android Head-Units] Ukiews:
I did have the FytHWOneKey installed at that moment of that capture. It does not work very effectively on the CC3. Was hoping to get AppSwitcher working instead. It's deleted for now, so I can identify the keycode.

Here are a couple more options that show up with AutoInput that might be relevant:

But not sure what would be done with them.

After running Logcat again, and searching for "systemui," I see the "recent_apps" id that is triggered, but nothing in terms of an actual keycode:
[Android Head-Units] TorstenH:
What about entries with tag sysui_multi_action?
[Android Head-Units] Ukiews:
That’s after several clicks of SOURCE.
[Android Head-Units] TorstenH:
I attached new version 2.5alpha to first post:

This version can dim the screen according to sunrise 🌅 and sunset 🌇 information.

Click on the dialog (black area) to show the icon for this:

By clicking multiple times on the icon you can set the current mode:

Sun: no screen dimming

Sun/moon: automatic switch based on sunset/sunrise

Moon: dim screen (allows to check if your setting "Screen brightness at dimming" was a good choice)

Please be aware the app needs location permission to be able to calculate time of sunset/sunrise.

This version is explicitly marked as alpha and your test participation is very welcome.
[Android Head-Units] TorstenH:
In my first tests it worked like a charm. My display was dimmed this morning as expected.

I just deactivated the dimming function of Agama launcher and in the head unit settings.

Looking forward for your feedback...
[Android Head-Units] TorstenH:
Added AppSwitcher 2.5.1alpha

- Dimming gets paused if Google PlayStore is in foreground (see FAQ dimming)

- Added option to start media app twice. This may improve reliability of app autostart after head unit was in sleep mode. Especially DAB-Z sometimes stuck on splash screen so we can give it a second trigger, now. Let's test if it solves that issue...
[Android Head-Units] ramig:
Here it works very well. Thanks for sharing😊
[Android Head-Units] TorstenH:
Unfortunately DAB-Z still freezes on its splash screen. This happens if app gets started directly after sleep mode and even if I start it via Agama.

It's sufficient to switch to home screen and back to DAB-Z to get it running.

I'm the only one having this issue?
[Android Head-Units] DarkTWH:
For me dab-z works fine. I've set it to open dab-z automatically on reboot in the USB device dialogue. However I've found one issue with the dimming. I've set up my unit so that it hides the controls bar / info center on the top of the screen. When I dim the screen the control center permanently appears. Is this fixable through the app or one of the great system bugs of junsun?
[Android Head-Units] TorstenH:
But this means it will always start as soon as the USB adapter gets detected. I just want to start the app if it's the last app I used before leaving the car.

I think you're talking about the Android Status Bar?

Unfortunately Google doesn't allow overlaying the status bar by non-system apps. I think this is one of Googles security features. But it's interesting that an overlay let the status bar appear even if it's set to be hidden. Could you please create a screenshot/photo of the setting where you hided the status bar and let me know which head unit you have in use?
[Android Head-Units] Mati102:
Hi,

I'm using version 2.5.1 with 8259 device + can box. I already used key 10 for short press. Generally app is really great but I have two problems. First auto start of media app doesn't working and sometimes something i happening with the app because is stopping working. In first moment I fot that's the app is crash but dimming working fine and icon was visible on status bar.

Interesting thing is the log cat doesn't see input from buttons, when I restart app everything is working fine.

Did anybody have similar problems?
[Android Head-Units] Renate:
I saw this thread because I'm interested in app switching despite not having a head unit.

I just have a tablet, fixed, with a battery-ectomy and a wired 4V supply.

I love SWC. My ride is 1995 so I had to install my own.

It has no clockspring so I "steal" power off the horn to run a Bluetooth module.

If I read correctly, the screen brightness for this app is controlled using a translucent overlay?

And that this might make problems so?

There's a couple of ways of doing this differently. You can:

$ settings put system screen_brightness 123

System.putInt(cr, System.SCREEN_BRIGHTNESS, bright);

You can also inject BRIGHTNESS_DOWN/BRIGHTNESS_UP KeyEvents although this is more blind and applicable to user controls more than automatic dimming.

I love my app switching. It's like you're switching video, the screens swap instantly (when you disable the animation).
[Android Head-Units] TorstenH:
Happy new year!

Thank you very much for your valuable feedback.

First thing you could check if setting 'Disable navi statt activity' is enabled/disabled and try after change the setting.

Additionally you could search for 'fatal' in Logcat to check if an app crashes.
[Android Head-Units] TorstenH:
Thank you for you feedback. I tried several apps which can control screen brightness on Android - none of them worked on the head unit.

This is due to the fact that Android has just limited control on these Head Units because the hardware gets controlled by a separate board. This allows e.g. to get the picture from the reverse cam before Android boot is completed but has a lot of disadvantages.
[Android Head-Units] TorstenH:
Added version 2.6 to first post.

Changelog:

https://xdaforums.com/t/appswitcher...-devices-incl-autostart.4435555/post-86783203

If installation fails, uninstall AppSwitcher first. Don't forget to write down your settings, especially if you changed 'log listener' settings.

As always, your feedback is greatly appreciated.
[Android Head-Units] DarkTWH:
Good evening,

Sorry for the late reply. Unit is a Junsun V1 Pro (4-64). Ive tought it was a setting, but after having to reset the unit I found out that it seems like it is the default behavior. I'll send you a link to a video of the issue (currently don't have the time to censor all of the location shown in the video).

Best wishes

DarkTWH
[Android Head-Units] TorstenH:
According to my investigation the Junsun device hides the Status Bar if unknown apps (apps not pre-installed by Junsun) are in foreground. I think as soon as the dimming overlay gets displayed the foreground app can't be identified and the system falls back to Android standard (show the status bar).

There are apps available to change the Android standard so you may want to test e.g. such an app:

Immersive — Low-Level Immersiv - Apps on Google Play

No accessibility tricks. No rotation issues. Pure. Low Level. Immersive Mode.

play.google.com

Let me know the test results. If you need help to authorize the app via ADB, let me know.

Please note this disclaimer: I'm not the developer of the linked app and I don't care if you try with another app to change the immersive mode because I don't have any benefits if you use the linked app.
[Android Head-Units] TorstenH:
Issue seems to be fixed with version 2.6 and enabled 'Start media app twice' - since several days no problem with stuck on launch.
[Android Head-Units] TorstenH:
Tested AppSwitcher on latest firmware

8259P_军灿UI02v1280x720-国外_v50_20221226.zip

without problems.

Even no bootloop after enabling status bar by disabling 'forced fullscreen system property' in AppSwitcher settings.
[Android Head-Units] TorstenH:
Please note my post below...
[Android Head-Units] TorstenH:
Added version 2.6.1alpha to first post.

What's new:

- added option to enable dark/night mode (same setting as in developer options). Some system apps may stay white. Requires reboot

- list platform information on bottom of settings screen

- improved performance of switch screen (app icon loading speed)

- improved dimming overlay. Status bar stay hidden if option 'forced fullscreen system property' is not disabled. Status bar will be dimmed, too.

Please note: here you can find the app Reboot.apk for easy reboot:

https://xdaforums.com/t/junsun-v1-start-equalizer-aux-bt-music-from-launcher.4237797/
[Android Head-Units] le_mi:
@TorstenH How i can set a filter in logcat to get only a log of pressed buttons on my steering wheel?
[Android Head-Units] TorstenH:
You could restrict the logs via the filter function inside the ... menu.

After that you can filter on the main screen for keywords come into your mind. E.g. key, button,...

Are you using a can box?
[Android Head-Units] Jetblack31:
Hi Torsten,

I installed 2.6.1 on my V1 pro 8/128 8667.

I has to uninstall the previous version. Installation is Ok, unfortunately, when I press a SWC key, it doesn't work and the HU indicates in a windows : the app AppSwitcher has stopped (my HU speaks French so it's my poor translation ;) )

I will install back the previous version to see if I can have it working and to investigate this issue.
[Android Head-Units] le_mi:
Yes i use a can box and i think that is the problem. I have only one button wich i can use but this will set my radio to mute. So every time i press the button to switch between the apps it mute, unmute, mute, unmute an so far. There is no possibility to set up the button with another action.
[Android Head-Units] TorstenH:
Hi Jetblack,

Unfortunately I can't test the app on a 8667 unit. You could install Logcat reader from PlayStore and search for 'fatal'. Maybe there is something related to com.thf.AppSwitcher

Which version you used before? There should be that massive difference between 2.6 and 2.6.1alpha.
[Android Head-Units] Jetblack31:
Hi Torsten,

before I was with version 2.1.

Ok, so I'll log the "fatal" messages and keep you informed.

Thank you very much,

Bernard
[Android Head-Units] TorstenH:
Okay, that's bad. Maybe using long press is an alternative. But I don't know if the can interface can differentiate between long and short press.

Another approach could be to change the wiring if your car exposes the SWC button as resistance between a key wire and ground.
[Android Head-Units] TorstenH:
Bernard,

I think you had to grant permissions manually because you're not using an Mtk8257 unit....

Please don't forget to give AppSwitcher the permission to read the logs (via ADB) and to get displayed above other apps.

If you uninstall an app, Android doesn't keep the settings.

Unfortunately I had to change the development environment and apk signing changed which requires the deinstallation of previous app version. I'm sorry for that.
[Android Head-Units] Gaga92i:
Hello thanks for the apk I will try on my Junsun 8259
[Android Head-Units] le_mi:
As I say. I have only this button as option and there is always the same output in logcat no matter if I press short or long.

Changing the wiring is no option for me.

The radio now works as it should and that's enough for me. :)

What I just don´t understand is. With the PX3, 5, 6 it is also possible to change and assign the buttons, even a long press. Why doesn't that work with ours!?