AutoHome : IoT for Home Automation - Raspberry Pi General

Hello All,
I am glad to share my IoT project - AutoHome : IoT for Home Automation in this Raspberri Pi Community.
AutoHome turns your mobile into a location-agnostic real-time Home Appliance remote, anywhere,
anytime! The Home Appliance can be controlled not just within home, but from anywhere, as long
as the devices are network-reachable.
AutoHome - Internet of Things(IoT) for Home Automation - Raspberry Pi version :
https : //www . youtube . com/watch?v=LQ7NM2CKo3M
This demo shows the Raspberry Pi version of AutoHome wherein the Lasko Room Heater is controlled
by using my Android Smartphone running my LaskoHeaterRemote app as per the below key combinations :
_____________________________________________________________
Lasko Room Heater Button :: Android Keys
_____________________________________________________________
Power On/Off -- Power + Volume Up + Volume Down
Plus -- Volume Up
Minus -- Volume Down
Oscillate -- Power + Volume Up
High/Low -- Power + Volume Down
Timer -- Volume Up + Volume Down
_____________________________________________________________
The demo contains the below segments :
1. What is AutoHome?
2. What can AutoHome do?
3. How does AutoHome all of that?
4. AutoHome overview
5. Raspberry Pi - AutoHome - Circuit
6. AutoHome - Introduction
7. AutoHome - Demo
8. AutoHome - Non-line-of-sight(NLOS) demo
9. AutoHome - Platform
10. AutoHome - Bringup
11. AutoHome - Android & Raspberry Pi
12. AutoHome - Challenges overcome - Raspberry Pi version
13. AutoHome - Timeline
14. AutoHome - Statistics
15. AutoHome - Scope
AutoHome - Raspberry Pi version includes below components :
1. Raspberry Pi 3 Model B v1.2
2. GPIO extension board
3. Breadboard
4. Jumper wires
5. Infrared transmitter
6. LCD (I2C)
7. Android Smartphone
8. Infrared-controlled Home Appliance - Lasko Room Heater
There is an Arduino version of this project as well. Here is the link for the same.
AutoHome - Internet of Things(IoT) for Home Automation - Arduino version :
https : //www . youtube . com/youtube.com/watch?v=cZg5UvX9iPY
The demo contains the below segments :
1. What is AutoHome?
2. What can AutoHome do?
3. How does AutoHome all of that?
4. AutoHome overview
5. Arduino - AutoHome - Circuit
6. AutoHome - Introduction / Bridge
7. AutoHome - Demo / Bridge
8. AutoHome - Non-line-of-sight(NLOS) demo / Bridge
9. AutoHome - Auto-reset recovery / Bridge
10. AutoHome - Introduction / Serial
11. AutoHome - Demo / Serial
12. AutoHome - Non-line-of-sight(NLOS) demo / Serial
13. AutoHome - Auto-reset recovery / Serial
14. AutoHome - Platform
15. AutoHome - Bringup / Bridge
16. AutoHome - Android & Arduino / Bridge
17. AutoHome - AVR MCU code - Build and Upload automation / Bridge
18. AutoHome - Bringup / Serial
19. AutoHome - Android & Arduino / Serial
20. AutoHome - AVR MCU code - Build and Upload automation / Serial
21. AutoHome - Challenges overcome - Arduino version
22. AutoHome - Timeline
23. AutoHome - Statistics
24. AutoHome - Scope
AutoHome - Arduino version includes below components :
1. Arduino Yún
2. Infrared transmitter
3. Jumper wires
4. LCD (I2C)
5. Android Smartphone
6. Infrared-controlled Home Appliance - Lasko Room Heater
Cheers!

Related

Key mapping (help me, quickly!)

I need an app/list that will show me the number of pressed key
For example:
Call - 61
EndCall - 62
VolumeUp - 64
VolumeDown - 65
Enter - 28
If there is no such app - where i can find the list for HTC Blue Angel?
I've tried SpvDuke3D, but it doesn't show "Special keys", such as Start, Mail, OK, Internet, Calendar etc
Xetra tools:
* KeyCode.exe Get the code of the hardware button
* GetClass.exe Get the current window's Class
* GetEXE.exe Get the current window's Proccess
* xMacro.exe record macro (pen click and key)
http://xetranet.free.fr/xbar2/download/tools.zip
oldsap said:
Xetra tools:
* KeyCode.exe Get the code of the hardware button
* GetClass.exe Get the current window's Class
* GetEXE.exe Get the current window's Proccess
* xMacro.exe record macro (pen click and key)
http://xetranet.free.fr/xbar2/download/tools.zip
Click to expand...
Click to collapse
Thanks! Now i can navigate throught Android menus!

[Interop] Windows Phone 8+ Registry Hacks + hosts file source

[size=+2]Discontinued; but the hosts files below are always updated[/size]
This is a recompilation of registry hacks for Interop-unlocked Windows Phone devices.
I have tested this on my freshly hard-resetted Lumia 730; Windows Phone 8.1 GDR1 (Also tried on Win10 v14393.189 as of 2 weeks ago).
I have used CustomPFD to explore the whole WP Registry, I will update this thread if I find something new and unusual.
- Created registry values are tested while there are some that says 'create a value for this key', I did not include it without initial and further testing
- Most WPTweaker tweaks are not here though, I still haven't consulted them for replicating their list of tweaks. All of the tweaks below are the ones I always use/alter on my device.
- Several tweaks might still apply on W10M but I haven't tested it all yet.
- Useful things are in here, I will dig down further to add more to this thread
Credits:
- CustomPFD
- WP10 WPTweaker
- WPTweaker
________________
Code:
HKLM\SYSTEM\ControlSet001\Services
(Start: 4 (Disable), 3 (Manual), 2 (Automatic), 1 (System), 0 (Boot))
- DataCollection
- DiagnosticSvc
- DiagTrack
- dmwappushsvc
- DnsCache → You might want to disable this service if and only if you are using a large hosts file
- FeedbackSvc
- telrepsvc → Telemetry, haven't confirmed yet but somehow breaks clearing of Telemetry files in Storage
- telwatsvc → Telemetry
Code:
HKLM\SYSTEM\ControlSet001\Control
- WaitToKillServiceTimeout
Code:
HKLM\SYSTEM\Maps\Storage
- UseSmallerCache
Code:
HKLM\SOFTWARE\OEM\VolumeLimit
- EnableVolumeLimit
- VolumeLimit
Code:
HKLM\SOFTWARE\OEM\Nokia\Onboarding
(I do not know what this does)
- EnableNokiaCare
Code:
HKLM\SOFTWARE\Microsoft\CommandChannel\Internal
(Testing; Disables Push Notifications?)
- IsWNSEnabled
Code:
HKLM\SOFTWARE\Microsoft\DataCollection\Default\WifiAutoConnectConfig
(Disables Wi-Fi Sense)
- AutoConnectEnabled
Code:
HKLM\SOFTWARE\Microsoft\DeviceEncryption
(Testing; Bitlocker?)
- Enabled
Code:
HKLM\SOFTWARE\Microsoft\Internet Explorer
- Disable Display Inline Images → Enables IE's Show Pictures Automatically option
Code:
HKLM\SOFTWARE\Microsoft\Internet Explorer\GestureNavigation
(Testing; IE Swipe Gesture)
- FlickThreshold
Code:
HKLM\SOFTWARE\Microsoft\Internet Explorer\Main\TabStore
(Testing; Max Tabs? I think this one is the tabs to be kept in memory, or else.. It will be unloaded)
- NumberToKeep
Code:
HKLM\Software\Microsoft\Messaging\GlobalSettings
- ShowSendingStatus → Useful if you want to see the "Sending..." status in your outgoing sms
Code:
HKLM\Software\Microsoft\PolicyManager\current
(Works like Group Policy Editor? Feedback in Settings now says Disabled by policy/administrator or something like that)
- ...\System\AllowTelemetry, it is set to 2. Setting this to 0 disables Telemetry and Feedback.
Code:
HKLM\Software\Microsoft\SEMgr\UI
(NFC Settings)
Code:
HKLM\Software\Microsoft\Shell\CustomHoldDelays
(Contains Hold Delays for touch taps, higher=longer tap to activate)
Code:
HKLM\Software\Microsoft\Shell\NavigationBar
- IsBurnInProtectionEnabled → This is the one that makes your software navigation bar grayish
- IsDoubleTapOffEnabled → This option is hidden in the Navigation Bar settings for Windows Phone 8.1 GDR1 users, double tapping the navbar will lock/turn-off the screen; good for hardware key prolongation
Code:
HKLM\Software\Microsoft\Shell\Start
(Tile Flipping Delay)
- NotificationCycleTimer
Code:
HKLM\Software\Microsoft\SQMClient\Windows
(Windows Customer Experience Improvement program)
- CEIPEnable
Code:
HKLM\Software\Microsoft\Windows\CurrentVersion\Control Panel\Theme
(Use 59, 64, or 75)
- UserPreferenceWidth → 75 in my device gives 5 Quick Settings instead of the usual 4
Code:
HKLM\Software\Microsoft\Windows\CurrentVersion\Audio
(Testing; Allows compressed format like FLAC?)
- AllowCompressedFormatSupport
Code:
HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings
- ReceiveTimeOut
- SendTimeOut
Code:
HKLM\Software\Microsoft\Windows\CurrentVersion\WINEVT\Channels
(Testing; Event Logging)
~ I tried setting Enabled to 0, I do not see/feel any changes though.
Custom Hosts file
hosts sources are now posted here.

Joying 2GB - Steering wheel key customization - V6 (NO KILL)

THIS MOD IS ONLY FOR THE JOYING / 2GB / Sofia models - It is stable and working well .
Please use V4.1 if you have not upgraded to Marshmallow!
History:
V6.4: Update using code base 9/1/2017 Joying Update ( Android 6.0 ) (updated Oct 7)
Changes:
- Meida keys - Removed support for media keys customization. No longer sent to launcher.sh due to slow response time.
- Media keys - Modified code to only send media keys to the active media player.
- Changed reboot timer from 1/2 second to 2 seconds. Should help eliminate random reboots when coming from standby.
- Updated player_app.txt and navi_app.txt to latest from @surfer63
- Fixed issue with button 33 not working
- Files included:
- V6.4-Sofia-1-C9-Server_NOKILL.zip - Original file with task killer removed
- V6.4-Sofia-1-C9-Server_NOKILL_GVS.zip - Task killer removed, Google Voice Search on 'SRC' key
- V6.4-Custom_Keys-Mods.zip - Complete key modifications ( requires launcher.sh - description below )
V6.3: Update using code base 5/25/2017 Joying Update ( Android 6.0 )
- Files included:
- V6.3-Sofia-1-C9-Server_NOKILL.zip - Original file with task killer removed
- V6.3-Sofia-1-C9-Server_NOKILL_GVS.zip - Task killer removed, Google Voice Search on 'SRC' key
- V6.3-Custom_Keys-Mods.zip - Complete key modifications ( requires launcher.sh - description below )
V6.2: Updated using code base 5/8/2017 Joying Update ( Android 6.0 )
- Added fix for google maps voice output on radio from @xdamember2
V6.1: Updated code base using 5/8/2017 Joying Update ( Android 6.0 )
V6: Updated code base using 4/27/2017 Joying Update ( Android 6.0 )
Android 5.1.1
V4.1 - Fixed issue with "Google Voice Search" not lowering music volume (3/23/2017) - Android 5.1.1
V4: Updated code base using 3/14/2017 Joying ROM
Changes/Added support for:
- MEDIA KEY - hard key on unit
- BAND KEY - hard key on unit
- ACC_ON - Triggers on key on
- Minor changes to example shell scripts to add cases for MEDIA, BAND, ACC_ON ( launcher.sh )
- FIX/UPDATE - Updated list of NAVI APPS in assets/property/navi_app.txt ( allows more applications to speak during radio )
- Many thanks to @surfer63 for navi app radio fix and windows install script
V3 - Rebuilt using latest Joying ROM dated 2/22/2017 - Includes V1 & V2 steering wheel / key modifications.
Changes/Added support for:
- ACC_OFF - Added support for running actions at key off (case 98 )
- Added case 98 to example scripts to perform "PAUSE" - to stop current music player when key off
V2 Removed killAppWhenSleep(); - Eliminates tasks being killed on sleep
Added support for additional keys / Minor changes to example shell script ( launcher.sh )
- HANG - steering wheel softkey
- DVD - hard key on unit (if available)
- EJECT- hard key on unit (if available)
- CALL/BT softkey - Fixed issue where key would not respond after call disconnect.
V1 Initial version
There is little risk with this mod, but please understand what you are doing, and make backup of the original apk file ( in case you want to revert back ). The installer script does make a backup, but will overwrite the backup if installed more than once.
I also added a simpler "launcher_simple.sh" into the zip, which only changes the functionality of the Source (rotates radio, pandora, spotify ) and Call buttons ( google voice command ). These scripts are working examples of what can be done. If you want the simpler version, just rename "launcher_simple.sh" to "launcher.sh" before installing.
---------------------- Original Post -----------------
I have spent quite a bit of time working on being able to customize the steering wheel keys of my Joying 2GB headunit (JY-UL135N2 / 2GB / Sofia unit). I have made some good progress and thought I would share what I have done so far.
The system package /system/app/Sofia-1-C9-Server-V1.0/Sofia-1-C9-Server-V1.0.apk has been modified to intercept the keys sent by the MCU, and thus able to change the behavior of the key presses. The keys listed below are supported, and will launch a "shell" process, so any action that can be done by the command line can be performed. If your not familiar with the Android command line, you might be surprised how powerful it is. As a side note, this works very fast and efficient. From my testing the overhead of the system call and shell script is almost non-existent, and key presses are registered with no delay. In other words, it is working very nicely.
In addition to the steering wheel button mods, also provided is the ability to launch a command or series of commands when a RESUME is received.
Included is my shell script (example) that can be used as a model for your own customization. The example script included performs the following actions:
CALL/BT PHONE(27) - One press is HOME, 2 presses is BACK, 3 presses brings up Google Voice Commands
MODE/SRC(37) - Rotates through music apps: Radio, Pandora, Spotify, Stock Music App - If it has been longer than 1 minute since the last press it will return you to the last selected music app with first press, then continue with the rotation. ( I'm working on a more intelligent way of doing this, that looks at the process list and will post soon)
NAVI(9) - One press is Torque, 2 presses is google maps
PAUSE/PLAY(85*),NEXT(87*), PREVIOUS(88*), FASTBACK(89*), FASTFWD(90*),HOME(3), BACK(4) - Currently set to perform stock functions. They ARE passed to script so they can be assigned other functions if wanted.
ACC_ON(97) - Executes at ignition switch on. Sample script has a 'play' here to restart music player that was paused at key off.
ACC_OFF(98) - Executes at ignition switch off. I suggest you assign "pause" on this case, to stop current music player. Resolves issue of music player advancing for several minutes after key is turned off.
RESUME(99) - Executes on system resume.
Please note the media control keys marked with a (*) are hardcoded to specific functions within the stock Joying applications. They are only passed through to the shell script when you are NOT using a Joying media application. They will ONLY work as the original keys when you are within the Joying media applications.
Remember, the apk is just handing codes to you, what you do with them after that is up to you! I have tried to comment the example script enough to be understandable to someone with basic programming knowledge.
Attached is a zip file with the updated Sofia-1-C9-Server-V1.0.apk, launcher.sh ( my example script), and install script. The launcher.sh script must be placed in the /data directory ( /data/launcher.sh ), as it is hardcoded in the apk file.
The install script is a shell/linux script, but you can easily copy/paste the adb commands if your using windows.
[NOTE: Please update to the latest version of busybox! I found some bugs in the version included by Joying that caused several issues.]
Awesome work. I will mess with this sometime this week. I still need to root my unit. Just installed it last week.
Sent from my SAMSUNG-SM-G935A using Tapatalk
Excellent work, sir! Before I start modifying the script for personal taste, could you help how to find key number for DVD and Eject buttons that currently have no function as the DVD drive is non-existent? Maybe logcat or something?
sonof said:
Excellent work, sir! Before I start modifying the script for personal taste, could you help how to find key number for DVD and Eject buttons that currently have no function as the DVD drive is non-existent? Maybe logcat or something?
Click to expand...
Click to collapse
I see a few references in the code for the DVD/eject button in the common code. My 'best guess' would be to add a system call to the cases listed below, but I seriously doubt the MCU would even send the codes if there is no DVD present.
bsp/FinalBsp.java
public static final int KEY_CODE_DVD = 242;
public static final int KEY_CODE_EJECT = 231;
bsp/HandlerBspKey.java
public static void keyEvent(int paramInt1, int paramInt2)
case 242:
bspKeyDvd(paramInt2);
return;
case 231:
bspKeyEject(paramInt2);
return;
gustden said:
I see a few references in the code for the DVD/eject button in the common code. My 'best guess' would be to add a system call to the cases listed below, but I seriously doubt the MCU would even send the codes if there is no DVD present.
bsp/FinalBsp.java
public static final int KEY_CODE_DVD = 242;
public static final int KEY_CODE_EJECT = 231;
bsp/HandlerBspKey.java
public static void keyEvent(int paramInt1, int paramInt2)
case 242:
bspKeyDvd(paramInt2);
return;
case 231:
bspKeyEject(paramInt2);
return;
Click to expand...
Click to collapse
Seems that MCU does send the codes as seen here.
I will see what I can do but I doubt I am able to do anything as I just installed apktool the first time today and am new with apk's. Thanks for your efforts! Very appreciated.
sonof said:
Excellent work, sir! Before I start modifying the script for personal taste, could you help how to find key number for DVD and Eject buttons that currently have no function as the DVD drive is non-existent? Maybe logcat or something?
Click to expand...
Click to collapse
sonof said:
Seems that MCU does send the codes as seen here.
I will see what I can do but I doubt I am able to do anything as I just installed apktool the first time today and am new with apk's. Thanks for your efforts! Very appreciated.
Click to expand...
Click to collapse
If I create and send you a apk file with additional debug statements, would you be able to install it, and capture the 'logcat' of the buttons being pressed? It makes it much more difficult since I don't have the DVD buttons. Hacking smali code is a LOT of trial and errors. Their code is quite complex, and doesn't decompile into Java very nicely in some critical areas.
gustden said:
If I create and send you a apk file with additional debug statements, would you be able to install it, and capture the 'logcat' of the buttons being pressed? It makes it much more difficult since I don't have the DVD buttons. Hacking smali code is a LOT of trial and errors. Their code is quite complex, and doesn't decompile into Java very nicely in some critical areas.
Click to expand...
Click to collapse
Yes I am capable of doing that!
sonof said:
Excellent work, sir! Before I start modifying the script for personal taste, could you help how to find key number for DVD and Eject buttons that currently have no function as the DVD drive is non-existent? Maybe logcat or something?
Click to expand...
Click to collapse
sonof said:
Yes I am capable of doing that!
Click to expand...
Click to collapse
I put in debugging code that parses the data stream from the MCU and dumps the first 4 bytes of EVERY message that is received from the MCU (skipping checksum info). Simply replace the original file (make a copy first ) and reboot. When looking for the keys, I suggest you do not use the radio, as it sends a constant flood of messages, such as RDS updates.
Even when the radio is off, there are still messages constantly being sent. If you filter on the debug messages MCUKEY in adb, and press the button in question a few times quickly, you should see a consistent pattern. I was able to identify the 'HANG' key in a couple minutes using this method. You should see something like this in the logcat:
D/MCUKEY ( 693): MCUKEYINPUT: B1=1 B2=0 B2=5 B2=224
D/MCUKEY ( 693): MCUKEYINPUT: B1=1 B2=7 B2=16 B2=0
D/MCUKEY ( 693): MCUKEYINPUT: B1=1 B2=0 B2=0 B2=49
D/MCUKEY ( 693): MCUKEYINPUT: B1=1 B2=7 B2=16 B2=0
D/MCUKEY ( 693): MCUKEYINPUT: B1=1 B2=3 B2=34 B2=0
In this case the HANG key is in bold ( 1, 7, 16, 0 ) messages. IF the DVD and eject keys are sent, they should definitely show up here. Not every key is sent by the MCU, if it is not relevant to the current state of the system. For example the media buttons are not sent when the radio is on, since the MCU is in control of the radio, however it does send the results such as a frequency change resulting from the button press.
It is possible that the MCU knows there is no DVD present and suppresses the messages. From looking at the code, it may be the action of a disc being ejected that is sent from the MCU, with the eject button press handled internally by the MCU. Your more likely to find the press of the DVD button than the eject button, but may find both.
When your done searching, you want to put back the original file and reboot. If you find the codes, I can certainly add them to trigger the shell script and you can take whatever action you want with them.
Thank you! I will try this the first thing next week when I get back home from a weekend trip.
Question: if I remove a customization from the script file for a key, the key should then perform its default functions, correct?
vassandrei said:
Question: if I remove a customization from the script file for a key, the key should then perform its default functions, correct?
Click to expand...
Click to collapse
The keys being passed to the shell script (launcher.sh) is hard-coded in the APK file and is just sent to the script. If you remove it from the script, the key would no longer do anything.
If you want to keep the stock functionality of a specific button, it should be fairly easy to duplicate it in the shell script. For example:
BT/CALL button: "am start com.syu.bt/com.syu.bt.BtAct"
NAVI: By default, I think NAVI just toggles between a Navi app, and the previous activity on the stack.
The code below should behave the same as the original for both the NAVI an BTPHONE buttons ( assuming your using google maps )
Code:
case $key in
9) # NAVI
x=`dumpsys activity activities | grep "Run #" | cut -f 13 -d" "| head -1 | grep maps`
if [ "$x" = "" ]
then
$maps
else
am start `dumpsys activity activities | grep "Run #" | cut -f 13 -d" " | grep -v launcher | grep -v systemui | grep -v maps |head -1`
fi
;;
27) # BTPHONE/PTT
am start com.syu.bt/com.syu.bt.BtAct
;;
Play/Pause: you can just remove the 85 case, it would just hit the default case and pass "input keyevent 85" which is identical in functionality.
gustden said:
The keys being passed to the shell script (launcher.sh) is hard-coded in the APK file and is just sent to the script. If you remove it from the script, the key would no longer do anything.
If you want to keep the stock functionality of a specific button, it should be fairly easy to duplicate it in the shell script. For example:
BT/CALL button: "am start com.syu.bt/com.syu.bt.BtAct"
NAVI: By default, I think NAVI just toggles between a Navi app, and the previous activity on the stack.
The code below should behave the same as the original for both the NAVI an BTPHONE buttons ( assuming your using google maps )
Code:
9) # NAVI
x=`dumpsys activity activities | grep "Run #" | cut -f 13 -d" "| grep -v launcher | grep -v systemui | head -1 | grep maps`
if [ "$x" = "" ]
then
$maps
else
am start `dumpsys activity activities | grep "Run #" | cut -f 13 -d" " | grep -v launcher | grep -v systemui | head -2 | tail -1`
fi
;;
27) # BTPHONE/PTT
am start com.syu.bt/com.syu.bt.BtAct
;;
Play/Pause: you can just remove the 85 case, it would just hit the default case and pass "input keyevent 85" which is identical in functionality.
Click to expand...
Click to collapse
brilliant! thank you so much!
Last thing: I want to have viper4android launch on resume (in the background ideally). where can I find the "app identifier" to put in the shell script?
vassandrei said:
Question: if I remove a customization from the script file for a key, the key should then perform its default functions, correct?
Click to expand...
Click to collapse
vassandrei said:
brilliant! thank you so much!
Last thing: I want to have viper4android launch on resume (in the background ideally). where can I find the "app identifier" to put in the shell script?
Click to expand...
Click to collapse
I made a slight change to the 'CODE' section of my previous post, so if you copy it make sure you get the edited version. I tested it and made a couple of changes.
There are several ways to get the package name and activity.
What I typically do is start the application on the unit and do the following in adb:
> adb shell
> dumpsys activity activities | grep "Run #"
This shows you a list of the activities ( package/activity ) in the task list with most recent at the top.
You should be able to pick it out pretty easily. If it is the app that I found with google, this should work to start it.
> am start com.vipercn.viper4android_v2/.activity.ViPER4Android
In most cases, you can just give the package name when using 'am start' with no need for the activity. It will default to the 'LAUNCHER' activity in the package. I usually always give the activity, just to be safe. I would sleep for a couple seconds to give it time to initialize and then $home to take you back to the Home screen. So whole command would look like this. It is easy to test using adb.
am start com.vipercn.viper4android_v2/.activity.ViPER4Android ; sleep 2 ; $home
Thanks for this, it's working great on my Joying (JY-UL135N2 ).
My only issue is that the CALL/BT PHONE (27) button is assigned to my "Pick Up/Call Out" button on my steering wheel. So I can't use it to pick up calls. I actually have another dedicated button on my steering to activate voice commands, so I'd rather assign the CALL/BT PHONE function to that. Do you happen to know how to find out what numbers corresponds to each button press?
akuma148 said:
Thanks for this, it's working great on my Joying (JY-UL135N2 ).
My only issue is that the CALL/BT PHONE (27) button is assigned to my "Pick Up/Call Out" button on my steering wheel. So I can't use it to pick up calls. I actually have another dedicated button on my steering to activate voice commands, so I'd rather assign the CALL/BT PHONE function to that. Do you happen to know how to find out what numbers corresponds to each button press?
Click to expand...
Click to collapse
I make and receive so few voice calls, It wasn't worth having a steering wheel button dedicated for the dialer/call pickup . I just tap the screen to answer and use google voice to make calls.
If you want to have a button answer a call, there *should* be a way to do it given the right command. I will play around with it more. Worse case I can just back out the changes for the (27) , and send you an updated apk.
I used the joying steering wheel control app and switched the dialer/call pickup to my voice button and that works, but my dialer/call pickup doesn't do anything. Please let me know if you want me to test anything. Thank you.
gustden said:
I put in debugging code that parses the data stream from the MCU and dumps the first 4 bytes of EVERY message that is received from the MCU (skipping checksum info). Simply replace the original file (make a copy first ) and reboot. When looking for the keys, I suggest you do not use the radio, as it sends a constant flood of messages, such as RDS updates.
Even when the radio is off, there are still messages constantly being sent. If you filter on the debug messages MCUKEY in adb, and press the button in question a few times quickly, you should see a consistent pattern. I was able to identify the 'HANG' key in a couple minutes using this method. You should see something like this in the logcat:
D/MCUKEY ( 693): MCUKEYINPUT: B1=1 B2=0 B2=5 B2=224
D/MCUKEY ( 693): MCUKEYINPUT: B1=1 B2=7 B2=16 B2=0
D/MCUKEY ( 693): MCUKEYINPUT: B1=1 B2=0 B2=0 B2=49
D/MCUKEY ( 693): MCUKEYINPUT: B1=1 B2=7 B2=16 B2=0
D/MCUKEY ( 693): MCUKEYINPUT: B1=1 B2=3 B2=34 B2=0
In this case the HANG key is in bold ( 1, 7, 16, 0 ) messages. IF the DVD and eject keys are sent, they should definitely show up here. Not every key is sent by the MCU, if it is not relevant to the current state of the system. For example the media buttons are not sent when the radio is on, since the MCU is in control of the radio, however it does send the results such as a frequency change resulting from the button press.
It is possible that the MCU knows there is no DVD present and suppresses the messages. From looking at the code, it may be the action of a disc being ejected that is sent from the MCU, with the eject button press handled internally by the MCU. Your more likely to find the press of the DVD button than the eject button, but may find both.
When your done searching, you want to put back the original file and reboot. If you find the codes, I can certainly add them to trigger the shell script and you can take whatever action you want with them.
Click to expand...
Click to collapse
Luckily the eject key was also found! Here are the codes:
DVD:
D/MCUKEY ( 691): MCUKEYINPUT: B1=1 B2=0 B2=16 B2=80
EJECT:
D/MCUKEY ( 691): MCUKEYINPUT: B1=1 B2=161 B2=2 B2=91
Looking forward to the modified apk. If you happen to take donations I'd be willing to give you a beer. Thank you.
Model number for reference: JY-AL003N2
sonof said:
Luckily the eject key was also found! Here are the codes:
DVD:
D/MCUKEY ( 691): MCUKEYINPUT: B1=1 B2=0 B2=16 B2=80
EJECT:
D/MCUKEY ( 691): MCUKEYINPUT: B1=1 B2=161 B2=2 B2=91
Looking forward to the modified apk. If you happen to take donations I'd be willing to give you a beer. Thank you.
Model number for reference: JY-AL003N2
Click to expand...
Click to collapse
Here is an updated apk file that should catch the code you listed. In the zip there is a file "keys.txt" and also updated APK file. The keys.txt is a complete list button codes for both the soft-keys ( steering wheel ) and hard-keys (on unit ) that the new apk sends to the script. This is a beta of V2.0 which I added:
3 - HOME ( On unit hard key )
4 - BACK ( On unit hard key )
28 - HANG/CALL END ( Steering wheel softkey)
31 - DVD ( On unit hard key )
32 - EJECT ( On unit hard key )
The HOME/BACK keys are sending the keycodes for the home/back actions. You don't need to map them in a script, as long as you have a default that passes keycodes at the end of the script.
*) input keyevent $key
;;
I have used it the last couple of days and it is working fine for me, but can't test the dvd or eject.
Let me know if it registers the keys.
sorry for the dumb question but do you need to root the unit to use this?
Is there a way to run a shell script when I switch ignition off and illumination on or off?

How to access Engineering Mode for AC8227L

I am brand new to the Head Unit world and have been on a VERY steep learning curve (sadly begun AFTER I purchased a unit #lessonlearned).
I bought on ebay an aftermarket chinese Android head unit and have been pouring over your website (THANK YOU for existing btw) looking for answers to all sorts of questions.
I have found most of what I was looking for between resources here and on Youtube, however, the one that I still need help with is figuring out how to access "Engineering Mode" from my menu. Most videos show it under the Factory Settings menu, but my menu is extremely limited compared to what I've seen on other units.
I've seen tons of videos of people with units very similar to mine, but with different interfaces.
I'm attaching my specs, a screenshot of my Factory settings, and one of the Factory Settings I've seen on other units.
Is anyone familiar with my settings and know of a hidden secret way of accessing the Engineering Mode??
Specifically, I want to figure out how to raise the external microphone volume which is currently so low that it might as well not be there.
I've emailed the seller for assistance, but so far his responses have been one step above useless so I'm not holding out hope that that will change any time soon.
Please let me know if I need to post additional information. Like I said, I'm new to this and don't know what I don't know.
Thank you in advance for your help. I truly appreciate everyone sharing their knowledge so generously.
Engineering mode is activated/accessed with pin code just like entering in factory settings, I don't know what pin is but you should serch for thread about 8227l pin codes on this forum. There are all codes and pins.
Anton TNT said:
Engineering mode is activated/accessed with pin code just like entering in factory settings, I don't know what pin is but you should serch for thread about 8227l pin codes on this forum. There are all codes and pins.
Click to expand...
Click to collapse
Thank you but when I enter my code on Factory settings it takes me to a limited menu, not like the one I've seen in other videos. It looks like the chip is the same, but the interface is different. I was hoping someone here had the same interface and knew how to access Engineering mode.
It is accessed by numeric pad (same as would for factory settings, but only entering specific code in number pad).
Code is 7788 so you must enter it in numeric pad in order to access directly to engineering mode.
Also, there are other codes accessed with numeric pad directly :
Code: 0 - Opens MCU update window (com.ts.can.CanMcuUpdateActivity)
Code: 1 - Opens some sort of window (com.ts.main.CStudy.CStudyMainActivity)
Code: 5 - Checks chip version and if matches opens some sort of LCD settings
Code: 2 - QR code that redirects to url with head units serial id that redirects to wechat
Code: 3 - Shows Phone device id?
Code: 4 - Sends signal to MCU to reboot - HARD reset just like with reset hole on unit
Code: 8 - Resets audio settings for Navi
Code: 9 - (DONT TRY THIS) Opens some sort of head unit activation window (com.ts.main.auth.AuthActivity)
Code: 6 - Sets Bluetooth id to 10000
Code: 12 - Opens a window that shows head units production id
Code: 22 - QR code that redirects to url with head units production id
Code: 5678 - Opens custom boot logo window (com.ts.logoset.LogoSetMainActivity)
Code: 8888 - Opens factory settings window (com.ts.factoryset.FsMainActivity)
Code: 4321 - Deletes files from "/mnt/sdcard/demo"
Code: 1234 - Copies files to "/mnt/sdcard/demo"
Code: 1101 - Something with screenshots
Code: 1313 - Sends signal to radio to reset
Code: 1414 - Reboots system and saves changed device settings or factory settings
Code: 1616 - Display Brightness, Contrast, Hue, Sat, Sharp, GrassToneH, GrassToneS, SkinToneH, SkinToneS, SkyToneH, SkyToneS settings (Saved to /storage/emulated/0/Ts/filter.txt)
Code: 1515 - Opens test mode window? (something for head unit activation?) (com.ts.main.auth.FactoryMainActivity)
Code: 6666 - Copies and installs some sort of APK files (maybe all default apps)
Code: 7777 - Shouldn't do anything
Code: 7788 - Opens engineering window (debugging information, you can view all logs etc.) (com.mediatek.engineermode.EngineerMode)
Code: 8877 - Opens a window where you can change all audio volume settings, boot logo, other settings (com.ATCSetting.mainui.MainActivity)
Code: 120 - Checks for system update?
Code: 2134 - Opens app info list (com.qiner.appinfo.AppListActivity)
Code: 12345678 - Sends some sort of signal to the MCU and opens some sort of tscanupdate window (com.ts.tscanupdate)
Code: 3699 - Check if some system files exists and opens tscanupdate window with some custom flags sent to it (com.ts.tscanupdate.MainActivity2)
Code: 5699 - Check if some system files exists and opens tscanupdate window with some custom flags sent to it (com.ts.tscanupdate.MainActivity2)
Code: 7758258 - Android stress-test, executes a command "monkey --throttle 500 --pct-touch 90 --pct-motion 10 -v -v 100000 >"
Code: 1111 - Opens some sort of window (Memory status real-time) (com.ts.phonestate.PhoneStateService)
Code: 140 - Closes GPS
Code: 141 - Opens GPS
Code: 123 - If DSP is supported opens alert with DSP version
Code: 0128 - Opens some sort of window (CanAllUpdateActivity)
Code: 0129 - Starts some sort of Can service (com.ts.can.CanDataLogService)
Code: 5555 - Opens a window where you can export advanced settings to SD or USB (com.ts.factoryset.FsMPModeActivity)
Code: 860 - Checks for disk
Code: 1717 - Should play some audio track
Code: 002446 - Roots head unit, installs google services, unroots head unit, reboots -> REPORTED THAT DID NOT WORKED ON ANY DEVICES
Anton TNT said:
It is accessed by numeric pad (same as would for factory settings, but only entering specific code in number pad).
Code is 7788 so you must enter it in numeric pad in order to access directly to engineering mode.
Also, there are other codes accessed with numeric pad directly :
Code: 0 - Opens MCU update window (com.ts.can.CanMcuUpdateActivity)
Code: 1 - Opens some sort of window (com.ts.main.CStudy.CStudyMainActivity)
Code: 5 - Checks chip version and if matches opens some sort of LCD settings
Code: 2 - QR code that redirects to url with head units serial id that redirects to wechat
Code: 3 - Shows Phone device id?
Code: 4 - Sends signal to MCU to reboot - HARD reset just like with reset hole on unit
Code: 8 - Resets audio settings for Navi
Code: 9 - (DONT TRY THIS) Opens some sort of head unit activation window (com.ts.main.auth.AuthActivity)
Code: 6 - Sets Bluetooth id to 10000
Code: 12 - Opens a window that shows head units production id
Code: 22 - QR code that redirects to url with head units production id
Code: 5678 - Opens custom boot logo window (com.ts.logoset.LogoSetMainActivity)
Code: 8888 - Opens factory settings window (com.ts.factoryset.FsMainActivity)
Code: 4321 - Deletes files from "/mnt/sdcard/demo"
Code: 1234 - Copies files to "/mnt/sdcard/demo"
Code: 1101 - Something with screenshots
Code: 1313 - Sends signal to radio to reset
Code: 1414 - Reboots system and saves changed device settings or factory settings
Code: 1616 - Display Brightness, Contrast, Hue, Sat, Sharp, GrassToneH, GrassToneS, SkinToneH, SkinToneS, SkyToneH, SkyToneS settings (Saved to /storage/emulated/0/Ts/filter.txt)
Code: 1515 - Opens test mode window? (something for head unit activation?) (com.ts.main.auth.FactoryMainActivity)
Code: 6666 - Copies and installs some sort of APK files (maybe all default apps)
Code: 7777 - Shouldn't do anything
Code: 7788 - Opens engineering window (debugging information, you can view all logs etc.) (com.mediatek.engineermode.EngineerMode)
Code: 8877 - Opens a window where you can change all audio volume settings, boot logo, other settings (com.ATCSetting.mainui.MainActivity)
Code: 120 - Checks for system update?
Code: 2134 - Opens app info list (com.qiner.appinfo.AppListActivity)
Code: 12345678 - Sends some sort of signal to the MCU and opens some sort of tscanupdate window (com.ts.tscanupdate)
Code: 3699 - Check if some system files exists and opens tscanupdate window with some custom flags sent to it (com.ts.tscanupdate.MainActivity2)
Code: 5699 - Check if some system files exists and opens tscanupdate window with some custom flags sent to it (com.ts.tscanupdate.MainActivity2)
Code: 7758258 - Android stress-test, executes a command "monkey --throttle 500 --pct-touch 90 --pct-motion 10 -v -v 100000 >"
Code: 1111 - Opens some sort of window (Memory status real-time) (com.ts.phonestate.PhoneStateService)
Code: 140 - Closes GPS
Code: 141 - Opens GPS
Code: 123 - If DSP is supported opens alert with DSP version
Code: 0128 - Opens some sort of window (CanAllUpdateActivity)
Code: 0129 - Starts some sort of Can service (com.ts.can.CanDataLogService)
Code: 5555 - Opens a window where you can export advanced settings to SD or USB (com.ts.factoryset.FsMPModeActivity)
Code: 860 - Checks for disk
Code: 1717 - Should play some audio track
Code: 002446 - Roots head unit, installs google services, unroots head unit, reboots -> REPORTED THAT DID NOT WORKED ON ANY DEVICES
Click to expand...
Click to collapse
Oooh, thank you!! I'll try this later and report back.
Anton TNT said:
It is accessed by numeric pad (same as would for factory settings, but only entering specific code in number pad).
Code is 7788 so you must enter it in numeric pad in order to access directly to engineering mode.
Also, there are other codes accessed with numeric pad directly :
Code: 0 - Opens MCU update window (com.ts.can.CanMcuUpdateActivity)
Code: 1 - Opens some sort of window (com.ts.main.CStudy.CStudyMainActivity)
Code: 5 - Checks chip version and if matches opens some sort of LCD settings
Code: 2 - QR code that redirects to url with head units serial id that redirects to wechat
Code: 3 - Shows Phone device id?
Code: 4 - Sends signal to MCU to reboot - HARD reset just like with reset hole on unit
Code: 8 - Resets audio settings for Navi
Code: 9 - (DONT TRY THIS) Opens some sort of head unit activation window (com.ts.main.auth.AuthActivity)
Code: 6 - Sets Bluetooth id to 10000
Code: 12 - Opens a window that shows head units production id
Code: 22 - QR code that redirects to url with head units production id
Code: 5678 - Opens custom boot logo window (com.ts.logoset.LogoSetMainActivity)
Code: 8888 - Opens factory settings window (com.ts.factoryset.FsMainActivity)
Code: 4321 - Deletes files from "/mnt/sdcard/demo"
Code: 1234 - Copies files to "/mnt/sdcard/demo"
Code: 1101 - Something with screenshots
Code: 1313 - Sends signal to radio to reset
Code: 1414 - Reboots system and saves changed device settings or factory settings
Code: 1616 - Display Brightness, Contrast, Hue, Sat, Sharp, GrassToneH, GrassToneS, SkinToneH, SkinToneS, SkyToneH, SkyToneS settings (Saved to /storage/emulated/0/Ts/filter.txt)
Code: 1515 - Opens test mode window? (something for head unit activation?) (com.ts.main.auth.FactoryMainActivity)
Code: 6666 - Copies and installs some sort of APK files (maybe all default apps)
Code: 7777 - Shouldn't do anything
Code: 7788 - Opens engineering window (debugging information, you can view all logs etc.) (com.mediatek.engineermode.EngineerMode)
Code: 8877 - Opens a window where you can change all audio volume settings, boot logo, other settings (com.ATCSetting.mainui.MainActivity)
Code: 120 - Checks for system update?
Code: 2134 - Opens app info list (com.qiner.appinfo.AppListActivity)
Code: 12345678 - Sends some sort of signal to the MCU and opens some sort of tscanupdate window (com.ts.tscanupdate)
Code: 3699 - Check if some system files exists and opens tscanupdate window with some custom flags sent to it (com.ts.tscanupdate.MainActivity2)
Code: 5699 - Check if some system files exists and opens tscanupdate window with some custom flags sent to it (com.ts.tscanupdate.MainActivity2)
Code: 7758258 - Android stress-test, executes a command "monkey --throttle 500 --pct-touch 90 --pct-motion 10 -v -v 100000 >"
Code: 1111 - Opens some sort of window (Memory status real-time) (com.ts.phonestate.PhoneStateService)
Code: 140 - Closes GPS
Code: 141 - Opens GPS
Code: 123 - If DSP is supported opens alert with DSP version
Code: 0128 - Opens some sort of window (CanAllUpdateActivity)
Code: 0129 - Starts some sort of Can service (com.ts.can.CanDataLogService)
Code: 5555 - Opens a window where you can export advanced settings to SD or USB (com.ts.factoryset.FsMPModeActivity)
Code: 860 - Checks for disk
Code: 1717 - Should play some audio track
Code: 002446 - Roots head unit, installs google services, unroots head unit, reboots -> REPORTED THAT DID NOT WORKED ON ANY DEVICES
Click to expand...
Click to collapse
Sadly, these codes work for the units I've seen in videos, but not with my interface.
I've added a video (second video) of the menu I have under factory settings.
None of the other codes I tried worked either (8888, 8877).
The original interface didn't even have the full standard android menu. No access to Apps or Build number for example, but I was able to get around that by installing Agama where those menu options are accessible. Which makes me suspect that Engineering mode menu is in the system. I just can't figure out how to access it from my interface.
With access to build number through Agama I was able to activate Developer mode but I didn't find what I needed there either.
Any ideas?
Newbie_75 said:
Sadly, these codes work for the units I've seen in videos, but not with my interface.
I've added a video (second video) of the menu I have under factory settings.
None of the other codes I tried worked either (8888, 8877).
The original interface didn't even have the full standard android menu. No access to Apps or Build number for example, but I was able to get around that by installing Agama where those menu options are accessible. Which makes me suspect that Engineering mode menu is in the system. I just can't figure out how to access it from my interface.
With access to build number through Agama I was able to activate Developer mode but I didn't find what I needed there either.
Any ideas?
Click to expand...
Click to collapse
There are codes for your unit, you must find correct ones.
Try searching the net and youtube for it, enter model of your unit and search for pin codes
Anton TNT said:
There are codes for your unit, you must find correct ones.
Try searching the net and youtube for it, enter model of your unit and search for pin codes
Click to expand...
Click to collapse
Thank you. I've searched but I haven't found any which is why I was hoping someone here had my same unit/interface and could help me.
1234 is for factory setings as I saw in video you posted, developer mode should be 7890+current hour (if now is 08:12 you input like 789008->which 08 is current hour)
In factory settings you can adjsut almost everything but developer mode serves as debugging there is no much to do there. Advanced mode is 123456, there are system settings regarding all configuration of all functions.
This codes are specific for TS10-TS18 units. What unit do you have , provide some info of device from car settings / about device menu.
Anton TNT said:
1234 is for factory setings as I saw in video you posted, developer mode should be 7890+current hour (if now is 08:12 you input like 789008->which 08 is current hour)
In factory settings you can adjsut almost everything but developer mode serves as debugging there is no much to do there. Advanced mode is 123456, there are system settings regarding all configuration of all functions.
This codes are specific for TS10-TS18 units. What unit do you have , provide some info of device from car settings / about device menu.
Click to expand...
Click to collapse
Oh, this is promising. I'll give it a shot, thank you.
I posted images with information about my model in my original post.
Copying it here again for convenience.
Newbie_75 said:
Oh, this is promising. I'll give it a shot, thank you.
I posted images with information about my model in my original post.
Copying it here again for convenience.
Click to expand...
Click to collapse
The code 7890+hour didn't work on my unit, however messing around in the Car Launcher FREE settings, I found an icon for Car Settings (different from the one under factory settings). In there, I found 3 sub menus. Under the "other" menu, I found Engineer mode!!! I forgot to take a picture, but I this is a screenshot from a youtube video to showing the same menu options I see.
Once there, you scroll over to Hardware testing and then Audio. That's where you find ALL the audio levels you need. I'm still playing around with it as I haven't gotten the mic to the level I want, but at least I'm one step closer.
I've also seen other threads where folks have had better success after disabling the front facing mic.
I don't know if I have the guts to open it up and cut the connections, but I've done crazier things so ... we'll see.
THANK YOU everyone for your help. I hope my post can help anybody after me looking for a same info.
Newbie_75 said:
The code 7890+hour didn't work on my unit, however messing around in the Car Launcher FREE settings, I found an icon for Car Settings (different from the one under factory settings). In there, I found 3 sub menus. Under the "other" menu, I found Engineer mode!!! I forgot to take a picture, but I this is a screenshot from a youtube video to showing the same menu options I see.
Once there, you scroll over to Hardware testing and then Audio. That's where you find ALL the audio levels you need. I'm still playing around with it as I haven't gotten the mic to the level I want, but at least I'm one step closer.
I've also seen other threads where folks have had better success after disabling the front facing mic.
I don't know if I have the guts to open it up and cut the connections, but I've done crazier things so ... we'll see.
THANK YOU everyone for your help. I hope my post can help anybody after me looking for a same info.
Click to expand...
Click to collapse
So you have JCAC system version from 2019 as I saw in image, that changes a few things... like PIN codes.
Will find correct ones for your system.
PINS FOR ANDROID
Try with these.
Play arround , enter each one and see what PIN activaes what menu. Eventually you will find correct one.

AppSwitcher v3 - smart SWC launcher (for Junsun, Xtrons and similar devices) incl. autostart

AppSwitcher v3​SWC (Steering Wheel Control) app launcher
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Stay focused on the street and don't touch the head units display to switch between apps.​
Your browser is not able to display this video.
Support the development of this free app via
ko-fi.com/appswitcher​
What is AppSwitcher?​
AppSwitcher enhances your steering wheel key to switch between apps.
Hereby you can select which apps should be offered and you can choose stock apps (e.g. the radio app) and 3rd party apps like your favorite mp3 or DAB player. You can switch between media and navigation app by only one key press.
Additionally AppSwitcher offers a lot of options:
- start the last used media app after boot and after sleep 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 to realize your own automations
- enable/disable DuraSpeed to prevent the head unit from killing your apps
- 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 SWC key "mode" even if CAN box is in place (if modded MainUI gets used)
- ...
How it works​
AppSwitcher has two options to register for a SWC key. A basic understandinghow it works will help you to do the initial setup of AppSwitcher.
Option 1 - GPS​
The head units main app (MainUI) writes by default a log message on each key press. AppSwitcher can listen to the Android log and react on a log message.
This will not overwrite the standard behavior of the original key function but we can configure a SWC key and assigned it to "open navigation app". With a special app (AppSwitcherStarter) set as navigation app there is no need to modify system files or system apps.
This will only work if
a) a dedicated SWC key to start the navigation app is present. If no CAN box is used every SWC key can be configured
b) a dedicated SWC key to switch between apps (mode button) is present AND the radio app is not used/required
Option 2 - MainUI​
Replacing the head units main app (MainUI) with a modded version.
In this version, the SWC mode key is disabled so that its functionality can be overridden (replaced) by AppSwitcher.
Additionally the modded version starts AppSwitcher after boot / sleep and sends a broadcast on each key press. This allows AppSwitcher to register for the broadcasts to receive a trigger. Other apps (e.g. Automate) can also register for these broadcasts.
This will only work if
a) a modded version of MainUI is available
b) you are not afraid of replacing a system app and know how to flash a firmware in case of problems. You're replacing the system app at your own risk.
Installation​
Option 1 - GPS​
Please read previous post to check if this is the best installation type for you.
Spoiler
- Install AppSwitcher AND AppSwitcherStarter.
- Enable automatic start of navigation app in factory settings
and let your device reboot.
Please be aware that changing factory settings will reset some settings on your device like equalizer and radio station presets. This is not an issue of AppSwitcher(Starter).
- Open AppSwitcher and select your navigation and media apps. Additionally activate the log listener:
- Set 'AppSwitcher Starter' as navigation app:
Don't set AppSwitcher itself as navigation app.
- Configure one button of steering wheel to start navigation app (if not already done)
With this setup the head unit will start AppSwitcherStarter after each reboot/sleep whereby AppSwitcherStarter will start the service of AppSwitcher.
Pressing the SWC navigation key will also start AppSwitcherStarter but this will have no effect if the service is already running. Nevertheless the AppSwitcher service will recognize the log entry and can present the AppSwitcher dialog.
The log entry can vary from head unit to head unit so it may be required to adjust the log listener settings https://forum.xda-developers.com/t/...-devices-incl-autostart.4593865/post-88620913
​Option 2 - MainUI​
Please read previous post to check if this is the best installation type for you.
You choose this way of installation at your own risk. It may lead to a bootloop and you should be familiar how to flash a firmware to restore your device in case of problems.
Spoiler
- First you need to check if a suitable modded version of MainUI is available for your device.
You can find a list of modded versions here: https://forum.xda-developers.com/t/...-devices-incl-autostart.4593865/post-88620949
- Download the modded MainUI version, place it in the "Download" folder on the device and rename it to MainUI.apk
- Install MainUiUpdater and perform the replacement of MainUI system application. If the device freezes after the update simply use the reset hole to force a reboot.
- Install AppSwitcher
- Open AppSwitcher and select your navigation and media apps.
Ensure the log listener is disabled.
- Reboot your device. E.g. by using the Reboot.apk from here: https://forum.xda-developers.com/t/...r-aux-bt-music-carinfo-from-launcher.4237797/
Installation files​
Attached installation files are only for testing purposes.
V3 is still under construction and may be not stable. This version is not supported.
AppSwitcher: Core application
AppSwitcher Starter: Starter of AppSwitcher and dummy navigation app. Only needed for installation option "Option 1 - GPS".
MainUiUpdater: Helper tool to replace MainUI. Only needed for installation option "Option 2 - MainUI".
Reboot: Adds an icon to launcher for an easy reboot of the head unit. Can be found here.
Changelog
AppSwitcher
3.0.3
- Adjusted to new broadcast key
MainUiUpdater
0.7
- Changed backup dir to /sdcard/MainUIbackups
Adjust the log listener​
Installation type "Option 1 - GPS" may require to adjust the log listener settings. They are pre-configured for systems without CAN box and a SWC key assigned to the GPS function (see Installation instruction on previous posts).
First you have to identify which log entries get written as soon as you press the SWC key. I suggest to use "Logcat Reader" from Google Playstore to identify usable log messages.
The log listener settings​
Log tag: Tag of the log entry. On most systems this is "MainUI".
Short button press log entry: If this log entry occurs AppSwitcher will show the dialog or jump to the next app.
This is the most important entry.
If you get a set of log entries as soon as you push and release a SWC key "Short button press log entry" should be set to the log message which gets written as soon as you release the key after a short amount of time.
Optional:
On button press log entry: This log message gets written as soon as you push down the SWC key. AppSwitcher will stop the countdown as soon as this message gets detected. This allows to set a very short countdown time.
Long button press log entry: If you hold down the button you can cancel the AppSwitcher dialog or jump to the home screen / launcher if the dialog is currently not visible.
The log entries need not to contain the whole message. It's sufficient to enter a substring if this is unique and not part of other log messages.
Modded MainUI​
For MTK825X​
MainUI_825X_1.3.apk​Version 1.3 from 8259P_军灿UI02v1280x720-国外_v81_20230427
Changelog
23/6/18
- Allow remap of SWC keys even if CAN box is in place
For 8667​To bring this version on the same level as 825X I need your testing support!
MainUI_8667_1.1.apk​Version 1.1 from 8667Q军灿UI02-国外-1280x720_v28_20230302.zip
Remap SWC keys​
If a CAN box is in place Junsun devices doesn't allow to remap SWC keys and assign other functions to it. But if you install a modded MainUI it is possible to define a config file with a mapping according to your needs.
The mapping file must be called "keyMapping.ini" and must be stored on the top level of the memory next to the "Download" folder.
The file is a simple text file containing key code mappings:
Code:
[from value 1]:[to value 2]
[from value 2]:[to value 1]
[from value 3]:[to value 4]
This is an example to swap the volume keys:
Code:
19:20
20:19
The most used key codes:
Mode = 10
Vol + = 19
Vol - = 20
next track = 44
prev track = 45
All key codes:
Spoiler
0 = 31;
1 = 32;
2 = 33;
3 = 34;
4 = 35;
5 = 36;
6 = 37;
7 = 38;
8 = 39;
9 = 40;
AIR = 105;
AM = 53;
AMS = 58;
ANGLEDN = 74;
ANGLEUP = 73;
APPS = 100;
APP_LONG = 115;
APP_SHORT = 114;
AUDIO = 101;
AUX = 2;
AVIN = 3;
AVM = 107;
BKL = 6;
BT = 23;
BT_A2DP = 111;
CAMERA = 108;
CARINFO = 106;
CAR_DEVICE = 110;
CAR_PLAY = 103;
CLOCK = 5;
DEL = 109;
DELETE = 84;
DIM = 24;
DIMDN = 88;
DIMUP = 87;
DISP = 85;
DN = 67;
DTV = 1;
DVD = 13;
DVR = 27;
ECAR = 89;
EJECT = 71;
EJECT_L = 83;
ENT = 21;
EQ = 17;
FAV = 86;
FCAM = 26;
FEEL_BACKWARD = 198;
FEEL_CCW = 200;
FEEL_CW = 199;
FEEL_DOWN = 196;
FEEL_FORWARD = 197;
FEEL_LEFT = 194;
FEEL_RIGHT = 193;
FEEL_UP = 195;
FEEL_WAVE = 201;
FF = 46;
FM = 52;
FMAM = 51;
FR = 47;
HOME = 99;
INFO = 98;
IPOD = 25;
J = 41;
LEFT = 68;
LOC = 55;
LOUD = 18;
MEDIA = 28;
MEDIA_PP = 60;
MEDIA_RDM = 61;
MEDIA_RPT = 62;
MEDIA_SCAN = 63;
MEDIA_SEARCH = 65;
MEDIA_STOP = 64;
MENU = 8;
MODE = 10;
MODE_DN = 94;
MODE_UP = 93;
MUTE = 16;
NAVI = 11;
NEXT = 44;
OPEN = 72;
PAUSE = 91;
PHONE_SIM = 104;
PLAY = 90;
POWER = 70;
POWER_OFF = 82;
POWER_ON = 81;
PRE = 45;
RADIO = 12;
RADIO_1S = 75;
RADIO_2S = 76;
RADIO_3S = 77;
RADIO_4S = 78;
RADIO_5S = 79;
RADIO_6S = 80;
RADIO_BAND = 43;
RADIO_SCAN = 59;
RDS_AF = 48;
RDS_PTY = 50;
RDS_TA = 49;
RETURN = 22;
RIGHT = 69;
SD = 15;
SET = 7;
SPEAKER = 95;
SPEAKER_SW = 96;
ST = 54;
TELCALLOF = 30;
TELCALLON = 29;
TOGGLE_LEFT = 112;
TOGGLE_RIGHT = 113;
TOUCH = 9;
TPMS = 102;
TUNEDEC = 57;
TUNEINC = 56;
TV = 4;
UP = 66;
USB = 14;
VIEW360 = 92;
VIEW360_UP = 97;
VOLDN = 20;
VOLUP = 19;
X = 42;
reserved
reserved
TorstenH said:
Installation
Option 1 - GPS
Please read previous post to check if this is the best installation type for you.
- Install AppSwitcher AND AppSwitcherStarter.
- Enable automatic start of navigation app in factory settings
View attachment 5927899
and let your device reboot.
Please be aware that changing factory settings will reset some settings on your device like equalizer and radio station presets. This is not an issue of AppSwitcher(Starter).
- Open AppSwitcher and select your navigation and media apps
- Set 'AppSwitcher Starter' as navigation app:
View attachment 5927901
Don't set AppSwitcher itself as navigation app.
- Configure one button of steering wheel to start navigation app (if not already done)
View attachment 5927903
With this setup the head unit will start AppSwitcherStarter after each reboot/sleep whereby AppSwitcherStarter will start the service of AppSwitcher.
Pressing the SWC navigation key will also start AppSwitcherStarter but his will have no effect if the service is already running. Nevertheless the AppSwitcher service will recognize the log entry and can present the AppSwitcher dialog.
The log entry can vary from head unit to head unit so it may be required to adjust the Log listener settings.
Option 2 - MainUI
Please read previous post to check if this is the best installation type for you.
You choose this way of installation at your own risk. It may lead to a bootloop and you should be familiar how to flash a firmware to restore your device in case of problems.
Click to expand...
Click to collapse
Some models of a car - like mine , does not allow changing swc buttons and settings, is there a way to bypass that ?
Anton TNT said:
Some models of a car - like mine , does not allow changing swc buttons and settings, is there a way to bypass that ?
Click to expand...
Click to collapse
Sure. You can help to let the magic happen:
Junsun V1 - Codes
Code description from {Mod edit} Please note: Don't just try a code without to know what happens. E.g. 9191 will lead to the message "device not activated" and you need a file called license.dat. 8888 - restricted settings menu 8878 - full...
forum.xda-developers.com
TorstenH said:
Sure. You can help to let the magic happen:
Junsun V1 - Codes
Code description from {Mod edit} Please note: Don't just try a code without to know what happens. E.g. 9191 will lead to the message "device not activated" and you need a file called license.dat. 8888 - restricted settings menu 8878 - full...
forum.xda-developers.com
Click to expand...
Click to collapse
Thanks good to know
Here is working with mainui option
ramig said:
Here is working with mainui option
Click to expand...
Click to collapse
If you want to test the SWC key remapping via config file, let me know...
I can install MainUI on my unit (8667L), I need to know if the 8667L version is compatible or only for 8667. If it is compatible, is key mapping available for this version?
elalvaro19 said:
I can install MainUI on my unit (8667L), I need to know if the 8667L version is compatible or only for 8667. If it is compatible, is key mapping available for this version?
Click to expand...
Click to collapse
Could you please let me know which firmware you have currently installed by providing a link to the firmware zip file?
Key mapping can be made available but I need you to test because I don't have a 8667(L) unit.
TorstenH said:
Could you please let me know which firmware you have currently installed by providing a link to the firmware zip file?
Key mapping can be made available but I need you to test because I don't have a 8667(L) unit.
Click to expand...
Click to collapse
This is the firmware I currently have installed:
8227L 固件 - Google Drive
drive.google.com
elalvaro19 said:
This is the firmware I currently have installed:
8227L 固件 - Google Drive
drive.google.com
Click to expand...
Click to collapse
Unfortunately I can't extract the firmware with the same tools I use for 8867 and 825X.
Could you please install MainUiUpdater and perform replacement without a MainUI.apk in Download folder? This should create a backup of your MainUI.apk file you can share here.
Hello TorstenH, I have a Junsun 8667Q and I would like to reassign the steering wheel keys, I have a 2019 kia Sportage with CAN, does your MAINUI work for my radio?
The VOICE button opens the google search for me and I would like it to open the google assistant.
Thank you so much

Categories

Resources