Software Development Modded syu.ms.apk

Search This thread

daviddosa

Senior Member
Sep 21, 2015
322
192
Livingston
OnePlus 3
OnePlus 5
Hi @seb21, i haven't installed your app yet, but i hope to be able to do so soon. Reading the varius post in this treath, i read about long pressure and double pressure of the steering wheel controls.
I have a Peugeot 308, and my steering wheel controls don't accept long pressure and/or double pressure; if i installed your app, my steering wheel controls will accept it? Also with the original radio, the simultaneous pressing of Vol+ and Vol- paused the music, with your app is it possible to achieve this?

Thanks you for the work you do.
I'm using it on a Peugeot 308 too. As @seb21 said in his last post, the Vol + and Vol - buttons will send a Mute command. With the standard Raise decoder, the command works, with the extra SimpleSoft XP decoder, I couldn't get it to work properly and neither with the new RaiseTech decoder.
Double and Long press buttons will work as I'm using it on mine, but you can't set it to pause or play with any of the buttons for some reason. I tried configuring the Band / Mode button to be Play/Pause either on normal press, double press or long press but doesn't work. Tried Play only, tried Pause only, nothing. The only way you can silence the radio is to set it to Mute but that doesn't stop the currently playing music in Apple CarPlay.
 
  • Like
Reactions: Specy01

seb21

Senior Member
Feb 9, 2019
79
56
I'm using it on a Peugeot 308 too. As @seb21 said in his last post, the Vol + and Vol - buttons will send a Mute command. With the standard Raise decoder, the command works, with the extra SimpleSoft XP decoder, I couldn't get it to work properly and neither with the new RaiseTech decoder.
Double and Long press buttons will work as I'm using it on mine, but you can't set it to pause or play with any of the buttons for some reason. I tried configuring the Band / Mode button to be Play/Pause either on normal press, double press or long press but doesn't work. Tried Play only, tried Pause only, nothing. The only way you can silence the radio is to set it to Mute but that doesn't stop the currently playing music in Apple CarPlay.
Play / Pause works, I'm using it on Spotify and tried it on YouTube . The problem you describe is with CarPlay. If you know what signal or sets of signals works with CarPlay then i can add a special action to my mod. And maybe intents will be solution to you problem.
Probably i will put new version (with intents) about a week.
 

daviddosa

Senior Member
Sep 21, 2015
322
192
Livingston
OnePlus 3
OnePlus 5
Play / Pause works, I'm using it on Spotify and tried it on YouTube . The problem you describe is with CarPlay. If you know what signal or sets of signals works with CarPlay then i can add a special action to my mod. And maybe intents will be solution to you problem.
Probably i will put new version (with intents) about a week.
I'll try to figure something out. There might be something in the Carlink app which needs to be checked.
 

Specy01

Senior Member
Jul 12, 2015
147
9
I'm using it on a Peugeot 308 too. As @seb21 said in his last post, the Vol + and Vol - buttons will send a Mute command. With the standard Raise decoder, the command works, with the extra SimpleSoft XP decoder, I couldn't get it to work properly and neither with the new RaiseTech decoder
It's really strange. When I had the canbus Raise the mute did not fonziova, while now that I have the Simple Soft XP works fine. But I suppose it's due to the setting I did in the "car info" app of the canbus.
 

s14kouki

Member
Jan 19, 2013
15
0
Brisbane
Just wanted to say thank you all involved for this great tool - I can finally configure my SWC!

My only limitation is my GOLF 7 has very limited programmable buttons thus I'd like to add more.

I have tried to install a third party controller by wiring the Key 1 and Key 2 to add more buttons but I can't seem to get it working.

I tried programming through the Headunit control app - nothing registers. I also tried changing Seb21 config app to look for Key1/2, again nothing registers.

Is this because my current SW keys are through CANBUS? is it possible to run both?

Or faulty aftermarket SWC Box?
 

barnesk9

Senior Member
Sep 23, 2008
122
11
I'll try to figure something out. There might be something in the Carlink app which needs to be checked.
It's definitely something with the Carlink app. I have the same problem with android auto, when I use the default media player play and pause work fine but in Carlink they don't do anything
 

daviddosa

Senior Member
Sep 21, 2015
322
192
Livingston
OnePlus 3
OnePlus 5
Just wanted to say thank you all involved for this great tool - I can finally configure my SWC!

My only limitation is my GOLF 7 has very limited programmable buttons thus I'd like to add more.

I have tried to install a third party controller by wiring the Key 1 and Key 2 to add more buttons but I can't seem to get it working.

I tried programming through the Headunit control app - nothing registers. I also tried changing Seb21 config app to look for Key1/2, again nothing registers.

Is this because my current SW keys are through CANBUS? is it possible to run both?

Or faulty aftermarket SWC Box?

Might not be the answer you're looking for but you can also try adding different actions to double press and long press for the existing buttons. You can add 2 extra actions for every button.
 

s14kouki

Member
Jan 19, 2013
15
0
Brisbane
Might not be the answer you're looking for but you can also try adding different actions to double press and long press for the existing buttons. You can add 2 extra actions for every button.
Many thanks for your input, that's what I'm currently doing - it can get confusing so ideally would prefer separate button box attached to the steering wheel.
 

daviddosa

Senior Member
Sep 21, 2015
322
192
Livingston
OnePlus 3
OnePlus 5
@seb21
I might have found the part within the CarLink app which is responsible for the button press handling.
I used the Jadx-Gui program on Windows to open and decompile the app I extraced from the AllAppUpdate.bin file.
After decompiling the file can be found in f/a.class.
Java:
package f;

import android.bluetooth.BluetoothClass;
import android.hardware.camera2.legacy.LegacyCameraDevice;
import android.media.AudioManager;
import android.net.wifi.WifiEnterpriseConfig;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.os.Parcel;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.util.Log;
import android.util.Size;
import c.k;
import com.syu.carlink.CarLink;
import com.syu.carlink.CarLinkService;
import d.j;
import java.util.HashSet;
import java.util.NoSuchElementException;
import java.util.Objects;

/* loaded from: classes3.dex */
public final class a implements IBinder.DeathRecipient, Runnable, e.d {

    /* renamed from: a  reason: collision with root package name */
    public int f1040a;

    /* renamed from: b  reason: collision with root package name */
    public int f1041b;

    /* renamed from: c  reason: collision with root package name */
    public int f1042c;

    /* renamed from: d  reason: collision with root package name */
    public int f1043d;

    /* renamed from: e  reason: collision with root package name */
    public final int f1044e;

    /* renamed from: f  reason: collision with root package name */
    public int f1045f;

    /* renamed from: g  reason: collision with root package name */
    public int f1046g;

    /* renamed from: h  reason: collision with root package name */
    public IBinder f1047h;

    /* renamed from: i  reason: collision with root package name */
    public final d f1048i;

    /* renamed from: j  reason: collision with root package name */
    public Handler f1049j;

    /* renamed from: k  reason: collision with root package name */
    public Looper f1050k;

    /* renamed from: l  reason: collision with root package name */
    public long f1051l;

    /* renamed from: m  reason: collision with root package name */
    public long f1052m;

    /* renamed from: n  reason: collision with root package name */
    public boolean f1053n;

    /* renamed from: o  reason: collision with root package name */
    public boolean f1054o;

    /* renamed from: p  reason: collision with root package name */
    public final C0053a f1055p;

    /* renamed from: q  reason: collision with root package name */
    public final HashSet<f> f1056q;

    /* renamed from: f.a$a  reason: collision with other inner class name */
    /* loaded from: classes3.dex */
    public static final class C0053a implements AudioManager.OnAudioFocusChangeListener {

        /* renamed from: a  reason: collision with root package name */
        public int f1057a = -1;

        public C0053a() {
        }

        @Override // android.media.AudioManager.OnAudioFocusChangeListener
        public void onAudioFocusChange(int i2) {
            CarLinkService j2;
            a aVar;
            a aVar2;
            CarLinkService j3;
            a aVar3;
            a aVar4;
            StringBuilder f2 = android.accounts.a.f("===========================>>>>  onAudioFocusChange  focusChange:", i2, "  isShowing: ");
            f2.append(CarLink.n().f800c);
            l.b.a("HDL", f2.toString());
            this.f1057a = i2;
            if (i2 != -1) {
                if (i2 != 1) {
                    return;
                }
                boolean J = CarLink.n().J();
                l.b.a("HDL", "============>>>>01  onAudioFocusChange CARPLAY_C2S_AUDIO_CTRL 3 noMix: " + J + "  isMediaAudio: " + CarLink.n().w());
                if (J) {
                    CarLinkService j4 = CarLink.n().j();
                    if (j4 == null || (aVar4 = j4.f817o) == null) {
                        return;
                    }
                    aVar4.i(true);
                } else if (CarLink.n().w() || (j3 = CarLink.n().j()) == null || (aVar3 = j3.f817o) == null) {
                } else {
                    aVar3.i(true);
                }
            } else if (CarLink.n().f800c) {
                a.this.e().postDelayed(new android.print.a(this, 5), 300L);
            } else {
                boolean J2 = CarLink.n().J();
                l.b.a("HDL", "============>>>>00  onAudioFocusChange CARPLAY_C2S_AUDIO_CTRL 2 noMix: " + J2 + "  isMediaAudio: " + CarLink.n().w());
                if (J2) {
                    CarLinkService j5 = CarLink.n().j();
                    if (j5 == null || (aVar2 = j5.f817o) == null) {
                        return;
                    }
                    aVar2.i(false);
                } else if (!CarLink.n().w() || (j2 = CarLink.n().j()) == null || (aVar = j2.f817o) == null) {
                } else {
                    aVar.i(false);
                }
            }
        }
    }

    public a(f fVar) {
        j.g(fVar, "listener");
        this.f1040a = 1024;
        this.f1041b = 600;
        this.f1042c = 1024;
        this.f1043d = 600;
        this.f1044e = 221;
        this.f1045f = 125;
        this.f1048i = new d();
        this.f1055p = new C0053a();
        HashSet<f> hashSet = new HashSet<>();
        this.f1056q = hashSet;
        if (!hashSet.contains(fVar)) {
            hashSet.add(fVar);
        }
        Objects.requireNonNull(w.e.f1200a);
        HandlerThread handlerThread = new HandlerThread(j.p("LinkServer-", new w.c(a.class)));
        handlerThread.start();
        Looper looper = handlerThread.getLooper();
        j.f(looper, "it.looper");
        this.f1050k = looper;
        this.f1049j = new Handler(looper);
        e().post(this);
    }

    public static void h(a aVar, int i2, boolean z2, int i3) {
        if ((i3 & 2) != 0) {
            z2 = true;
        }
        android.accessibilityservice.e.o(i2, "linkStop  =======>>   aync: ", "HDL");
        if (z2) {
            long elapsedRealtime = SystemClock.elapsedRealtime();
            CarLink carLink = CarLink.f797e;
            if (carLink != null) {
                if (!carLink.E()) {
                    aVar.f1051l = elapsedRealtime;
                }
                aVar.f1052m = elapsedRealtime;
            } else {
                j.r("me");
                throw null;
            }
        }
        aVar.k(201, new int[]{i2}, null);
        CarLink carLink2 = CarLink.f797e;
        if (carLink2 != null) {
            carLink2.m().C.postValue(-1);
        } else {
            j.r("me");
            throw null;
        }
    }

    @Override // e.d
    public void a(int i2) {
        a aVar;
        a aVar2;
        android.accessibilityservice.e.o(i2, "-------->>> onKey keyCode: ", "HDL");
        CarLink carLink = CarLink.f797e;
        if (carLink != null) {
            if (carLink.s()) {
                CarLink carLink2 = CarLink.f797e;
                if (carLink2 != null) {
                    if (!carLink2.r() || i2 == 4100 || i2 == 4099 || i2 == 4109 || i2 == 4108 || i2 == 4111 || i2 == 4110) {
                        CarLink carLink3 = CarLink.f797e;
                        if (carLink3 != null) {
                            CarLinkService j2 = carLink3.j();
                            if (j2 == null) {
                                return;
                            }
                            if (i2 == 4097) {
                                a aVar3 = j2.f817o;
                                if (aVar3 == null) {
                                    return;
                                }
                                aVar3.k(207, new int[]{4}, null);
                                return;
                            } else if (i2 == 4098) {
                                a aVar4 = j2.f817o;
                                if (aVar4 == null) {
                                    return;
                                }
                                aVar4.k(207, new int[]{5}, null);
                                return;
                            } else if (i2 == 4099) {
                                a aVar5 = j2.f817o;
                                if (aVar5 == null) {
                                    return;
                                }
                                aVar5.f(true);
                                return;
                            } else if (i2 == 4100) {
                                a aVar6 = j2.f817o;
                                if (aVar6 == null) {
                                    return;
                                }
                                aVar6.f(false);
                                return;
                            } else if (i2 == 4101) {
                                CarLink carLink4 = CarLink.f797e;
                                if (carLink4 != null) {
                                    if (!carLink4.f800c) {
                                        j2.m(true);
                                        e().postDelayed(new k(j2, 4), 800L);
                                        return;
                                    }
                                    a aVar7 = j2.f817o;
                                    if (aVar7 == null) {
                                        return;
                                    }
                                    aVar7.n();
                                    return;
                                }
                                j.r("me");
                                throw null;
                            } else if (i2 == 4102) {
                                a aVar8 = j2.f817o;
                                if (aVar8 == null) {
                                    return;
                                }
                                aVar8.k(207, new int[]{1}, null);
                                return;
                            } else if (i2 == 4103) {
                                a aVar9 = j2.f817o;
                                if (aVar9 == null) {
                                    return;
                                }
                                aVar9.k(207, new int[]{2}, null);
                                return;
                            } else if (i2 == 4104) {
                                a aVar10 = j2.f817o;
                                if (aVar10 == null) {
                                    return;
                                }
                                aVar10.k(207, new int[]{3}, null);
                                return;
                            } else if (i2 == 4105) {
                                a aVar11 = j2.f817o;
                                if (aVar11 == null) {
                                    return;
                                }
                                aVar11.k(203, new int[]{3, -1}, null);
                                return;
                            } else if (i2 == 4106) {
                                a aVar12 = j2.f817o;
                                if (aVar12 == null) {
                                    return;
                                }
                                aVar12.k(203, new int[]{3, 1}, null);
                                return;
                            } else if (i2 == 4107) {
                                android.accessibilityservice.e.o(2, "=================>>> clickBtn action: ", "HDL");
                                CarLink carLink5 = CarLink.f797e;
                                if (carLink5 != null) {
                                    CarLinkService j3 = carLink5.j();
                                    if (j3 != null && (aVar2 = j3.f817o) != null) {
                                        aVar2.k(203, new int[]{2, 1}, null);
                                    }
                                    CarLink carLink6 = CarLink.f797e;
                                    if (carLink6 != null) {
                                        CarLinkService j4 = carLink6.j();
                                        if (j4 == null || (aVar = j4.f817o) == null) {
                                            return;
                                        }
                                        aVar.k(203, new int[]{2, 0}, null);
                                        return;
                                    }
                                    j.r("me");
                                    throw null;
                                }
                                j.r("me");
                                throw null;
                            } else if (i2 == 4109) {
                                CarLink carLink7 = CarLink.f797e;
                                if (carLink7 != null) {
                                    if (carLink7.r()) {
                                        a aVar13 = j2.f817o;
                                        if (aVar13 == null) {
                                            return;
                                        }
                                        aVar13.f(false);
                                        return;
                                    }
                                    a aVar14 = j2.f817o;
                                    if (aVar14 == null) {
                                        return;
                                    }
                                    aVar14.k(207, new int[]{4}, null);
                                    return;
                                }
                                j.r("me");
                                throw null;
                            } else if (i2 == 4111) {
                                CarLink carLink8 = CarLink.f797e;
                                if (carLink8 != null) {
                                    if (carLink8.r()) {
                                        a aVar15 = j2.f817o;
                                        if (aVar15 == null) {
                                            return;
                                        }
                                        aVar15.f(false);
                                        return;
                                    }
                                    a aVar16 = j2.f817o;
                                    if (aVar16 == null) {
                                        return;
                                    }
                                    aVar16.k(207, new int[]{5}, null);
                                    return;
                                }
                                j.r("me");
                                throw null;
                            } else if (i2 == 4108) {
                                CarLink carLink9 = CarLink.f797e;
                                if (carLink9 != null) {
                                    if (carLink9.r()) {
                                        a aVar17 = j2.f817o;
                                        if (aVar17 == null) {
                                            return;
                                        }
                                        aVar17.f(true);
                                        return;
                                    }
                                    a aVar18 = j2.f817o;
                                    if (aVar18 == null) {
                                        return;
                                    }
                                    aVar18.k(207, new int[]{5}, null);
                                    return;
                                }
                                j.r("me");
                                throw null;
                            } else if (i2 == 4110) {
                                CarLink carLink10 = CarLink.f797e;
                                if (carLink10 != null) {
                                    if (carLink10.r()) {
                                        a aVar19 = j2.f817o;
                                        if (aVar19 == null) {
                                            return;
                                        }
                                        aVar19.f(true);
                                        return;
                                    }
                                    a aVar20 = j2.f817o;
                                    if (aVar20 == null) {
                                        return;
                                    }
                                    aVar20.k(207, new int[]{4}, null);
                                    return;
                                }
                                j.r("me");
                                throw null;
                            } else {
                                return;
                            }
                        }
                        j.r("me");
                        throw null;
                    }
                    return;
                }
                j.r("me");
                throw null;
            }
            return;
        }
        j.r("me");
        throw null;
    }

    public final Size b(int i2, int i3) {
        int i4;
        int i5;
        boolean z2 = ((float) i2) / ((float) i3) <= 1.0f;
        if (z2 && (i3 > 1920 || i2 > 1080)) {
            int[] c2 = c(i2, i3, BluetoothClass.Device.AUDIO_VIDEO_VIDEO_MONITOR, LegacyCameraDevice.MAX_DIMEN_FOR_ROUNDING);
            i4 = c2[0];
            i5 = c2[1];
        } else {
            if (!z2 && (i3 > 1080 || i2 > 1920)) {
                int[] c3 = c(i2, i3, LegacyCameraDevice.MAX_DIMEN_FOR_ROUNDING, BluetoothClass.Device.AUDIO_VIDEO_VIDEO_MONITOR);
                i4 = c3[0];
                i5 = c3[1];
            }
            return new Size(i2 - (i2 % 8), i3 - (i3 % 8));
        }
        int i6 = i4;
        i3 = i5;
        i2 = i6;
        return new Size(i2 - (i2 % 8), i3 - (i3 % 8));
    }

    @Override // android.os.IBinder.DeathRecipient
    public void binderDied() {
        for (f fVar : this.f1056q) {
            fVar.a();
        }
        this.f1047h = null;
        e().postDelayed(this, 800L);
    }

    public final int[] c(int i2, int i3, int i4, int i5) {
        float f2 = i4;
        float f3 = i5;
        float f4 = i2;
        float f5 = i3;
        int[] iArr = new int[2];
        if (f4 / f5 > f2 / f3) {
            iArr[1] = (int) ((f5 * f2) / f4);
            iArr[0] = i4;
        } else {
            iArr[0] = (int) ((f4 * f3) / f5);
            iArr[1] = i5;
        }
        return iArr;
    }

    public final boolean d(int i2, Parcel parcel, Parcel parcel2) {
        IBinder iBinder = this.f1047h;
        if (iBinder == null) {
            return false;
        }
        return iBinder.transact((i2 << 8) | 2, parcel, parcel2, 0);
    }

    public final Handler e() {
        Handler handler = this.f1049j;
        if (handler != null) {
            return handler;
        }
        j.r("mHandler");
        throw null;
    }

    public final void f(boolean z2) {
        if (z2) {
            k(208, new int[]{1}, null);
            k(208, new int[]{0}, null);
        } else if (z2) {
        } else {
            CarLink carLink = CarLink.f797e;
            if (carLink != null) {
                if (carLink.r()) {
                    k(208, new int[]{3}, null);
                    k(208, new int[]{0}, null);
                    return;
                }
                return;
            }
            j.r("me");
            throw null;
        }
    }

    public final void g(int i2) {
        CarLink carLink = CarLink.f797e;
        if (carLink != null) {
            carLink.m().f1029q.postValue(1);
            CarLink carLink2 = CarLink.f797e;
            if (carLink2 != null) {
                carLink2.m().f1030r.postValue(254);
                k(200, new int[]{i2}, null);
                return;
            }
            j.r("me");
            throw null;
        }
        j.r("me");
        throw null;
    }

    public final void i(boolean z2) {
        int i2 = z2 ? 3 : 2;
        StringBuilder k2 = android.accessibilityservice.c.k("============================>>> CarPlay Music ");
        k2.append(z2 ? "Play" : "Pause");
        k2.append(" !!!");
        l.b.a("HDL", k2.toString());
        k(216, new int[]{i2}, null);
    }

    public final void j() {
        AudioManager audioManager;
        CarLink carLink = CarLink.f797e;
        if (carLink != null) {
            l.b.a("HDL", j.p("===========================>>>>  requestAudioFocus  type:: ", Integer.valueOf(carLink.G())));
            if (this.f1053n && this.f1055p.f1057a == 1) {
                return;
            }
            CarLink carLink2 = CarLink.f797e;
            if (carLink2 != null) {
                if (carLink2.G() == 1) {
                    CarLink carLink3 = CarLink.f797e;
                    if (carLink3 != null) {
                        CarLinkService j2 = carLink3.j();
                        int i2 = -1;
                        if (j2 != null && (audioManager = j2.f818p) != null) {
                            i2 = audioManager.requestAudioFocus(this.f1055p, 3, 1);
                        }
                        this.f1055p.f1057a = i2;
                        this.f1053n = true;
                        StringBuilder k2 = android.accessibilityservice.c.k("===========================>>>>  requestAudioFocus  type:: ");
                        CarLink carLink4 = CarLink.f797e;
                        if (carLink4 != null) {
                            k2.append(carLink4.G());
                            k2.append("  ");
                            k2.append(i2);
                            l.b.a("HDL", k2.toString());
                            return;
                        }
                        j.r("me");
                        throw null;
                    }
                    j.r("me");
                    throw null;
                }
                return;
            }
            j.r("me");
            throw null;
        }
        j.r("me");
        throw null;
    }

    public final boolean k(int i2, int[] iArr, String[] strArr) {
        j.g(iArr, "ints");
        Parcel obtain = Parcel.obtain();
        Parcel obtain2 = Parcel.obtain();
        boolean z2 = false;
        try {
            try {
                obtain.writeInterfaceToken("CarplayServer.ICarplayService");
                int length = iArr.length;
                int i3 = 0;
                while (i3 < length) {
                    int i4 = iArr[i3];
                    i3++;
                    obtain.writeInt(i4);
                }
                if (strArr != null) {
                    int i5 = 0;
                    while (true) {
                        if (!(i5 < strArr.length)) {
                            break;
                        }
                        int i6 = i5 + 1;
                        try {
                            obtain.writeString(strArr[i5]);
                            i5 = i6;
                        } catch (ArrayIndexOutOfBoundsException e2) {
                            throw new NoSuchElementException(e2.getMessage());
                        }
                    }
                }
                j.f(obtain2, "outparam");
                if (d(i2, obtain, obtain2) && obtain2.readInt() >= 0) {
                    z2 = true;
                }
            } catch (Exception e3) {
                e3.printStackTrace();
            }
            obtain.recycle();
            obtain2.recycle();
            return z2;
        } catch (Throwable th) {
            obtain.recycle();
            obtain2.recycle();
            throw th;
        }
    }

    public final void l(String str, String str2) {
        k(226, new int[0], new String[]{str, str2});
    }

    public final void m(boolean z2) {
        int i2;
        StackTraceElement[] stackTraceElementArr = Thread.getAllStackTraces().get(Thread.currentThread());
        Log.e("Qin", j.p("========>>>> called method :", "----------------->>  videoPlay "));
        j.e(stackTraceElementArr);
        int length = stackTraceElementArr.length;
        int i3 = 0;
        while (i3 < length) {
            StackTraceElement stackTraceElement = stackTraceElementArr[i3];
            i3++;
            StringBuffer stringBuffer = new StringBuffer();
            stringBuffer.append(stackTraceElement.getFileName() + ':' + ((Object) stackTraceElement.getMethodName()) + ":(" + stackTraceElement.getLineNumber() + ')');
            stringBuffer.append("\n");
            Log.e("Qin", j.p("========>>>>", stringBuffer));
        }
        StringBuilder k2 = android.accessibilityservice.c.k("============================>>> CarPlay linkstate: ");
        CarLink carLink = CarLink.f797e;
        if (carLink == null) {
            j.r("me");
            throw null;
        }
        k2.append(carLink.F());
        k2.append("  isUIShowing: ");
        CarLink carLink2 = CarLink.f797e;
        if (carLink2 != null) {
            k2.append(carLink2.f800c);
            k2.append(" video play: ");
            k2.append(z2 ? "Start" : "End");
            k2.append(" Projection !!!");
            l.b.a("HDL", k2.toString());
            if (z2) {
                CarLink carLink3 = CarLink.f797e;
                if (carLink3 != null) {
                    if (carLink3.f800c) {
                        i2 = 3;
                        k(210, new int[]{i2}, null);
                        return;
                    }
                } else {
                    j.r("me");
                    throw null;
                }
            }
            i2 = 2;
            k(210, new int[]{i2}, null);
            return;
        }
        j.r("me");
        throw null;
    }

    public final void n() {
        CarLink carLink = CarLink.f797e;
        if (carLink != null) {
            boolean B = carLink.B();
            StringBuilder k2 = android.accessibilityservice.c.k("vocie state: ");
            CarLink carLink2 = CarLink.f797e;
            if (carLink2 != null) {
                k2.append(carLink2.B());
                k2.append(" to enable : ");
                k2.append(B ? 1 : 0);
                l.b.a("HDL", k2.toString());
                k(205, new int[]{B ? 1 : 0}, null);
                return;
            }
            j.r("me");
            throw null;
        }
        j.r("me");
        throw null;
    }

    @Override // java.lang.Runnable
    public void run() {
        boolean z2;
        e().removeCallbacks(this);
        IBinder iBinder = (IBinder) n.a.f("android.os.ServiceManager", null, "getService", "CarplayServer");
        this.f1047h = iBinder;
        if (iBinder != null) {
            iBinder.linkToDeath(this, 0);
            d dVar = this.f1048i;
            j.g(dVar, "binder");
            IBinder iBinder2 = this.f1047h;
            if (iBinder2 == null) {
                z2 = false;
            } else {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("CarplayServer.ICarplayService");
                    obtain.writeStrongBinder(dVar);
                    iBinder2.transact(3, obtain, obtain2, 0);
                    z2 = obtain2.readInt() != 0;
                    obtain2.readException();
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }
            l.b.a("HDL", j.p("CarplayListener register result:", Boolean.valueOf(z2)));
            for (f fVar : this.f1056q) {
                fVar.b(this);
            }
        }
        l.b.a("HDL", j.p("=================>>>  CarplayServer Start!! ", this.f1047h));
        if (this.f1047h == null) {
            Class cls = Integer.TYPE;
            j.e(cls);
            Integer num = (Integer) n.a.e("android.os.SystemProperties", null, "getInt", new Class[]{String.class, cls}, "sys.fyt.carplay", -1);
            if ((num != null ? num.intValue() : -1) == 1) {
                SystemProperties.set("sys.fyt.carplay", WifiEnterpriseConfig.ENGINE_DISABLE);
                try {
                    Thread.sleep(20L);
                } catch (InterruptedException e2) {
                    e2.printStackTrace();
                }
                SystemProperties.set("sys.fyt.carplay", WifiEnterpriseConfig.ENGINE_ENABLE);
                e().postDelayed(this, 800L);
            }
        }
    }
}
I also noticed something what might be interesting, another file
Java:
package com.syu.ipc;

/* loaded from: classes3.dex */
public class FinalRemoteToolkit {
    public static final int DISABLE = 0;
    public static final int ENABLE = 1;
    public static final int MODULE_CODE_AMP = 15;
    public static final int MODULE_CODE_BT = 2;
    public static final int MODULE_CODE_CANBUS = 7;
    public static final int MODULE_CODE_CAN_UP = 14;
    public static final int MODULE_CODE_CUSTOMER = 11;
    public static final int MODULE_CODE_DVD = 3;
    public static final int MODULE_CODE_DVR = 9;
    public static final int MODULE_CODE_EMITTER = 16;
    public static final int MODULE_CODE_GESTRUE = 18;
    public static final int MODULE_CODE_GSENSOR = 17;
    public static final int MODULE_CODE_IPOD = 5;
    public static final int MODULE_CODE_MAIN = 0;
    public static final int MODULE_CODE_OBD = 12;
    public static final int MODULE_CODE_RADIO = 1;
    public static final int MODULE_CODE_SENSOR = 19;
    public static final int MODULE_CODE_SOUND = 4;
    public static final int MODULE_CODE_STEER = 10;
    public static final int MODULE_CODE_TEST = 13;
    public static final int MODULE_CODE_TPMS = 8;
    public static final int MODULE_CODE_TV = 6;
    public static final int OFF = 0;
    public static final int ON = 1;
    public static final int SWITCH = 2;

    /* loaded from: classes3.dex */
    public class Face {
        public static final int ALL = 1073741824;
        public static final int FRONT = 65536;
        public static final int LEFT = 4096;
        public static final int REAR = 131072;
        public static final int RIGHT = 8192;

        public Face() {
        }
    }

    /* loaded from: classes3.dex */
    public class Index {
        public static final int A = 16;
        public static final int B = 32;
        public static final int C = 48;
        public static final int D = 64;
        public static final int E = 80;
        public static final int F = 96;
        public static final int FIVE = 5;
        public static final int FOUR = 4;
        public static final int H = 256;
        public static final int L = 0;
        public static final int ONE = 1;
        public static final int SIX = 6;
        public static final int THREE = 3;
        public static final int TWO = 2;
        public static final int ZERO = 0;

        public Index() {
        }
    }
}
There's a keycode for next, previous, mute, but there's no separate keycode for pause. Could this be the cause?
 

Specy01

Senior Member
Jul 12, 2015
147
9
What are your selections in the CANBUS settings menu, which model of car did you choose?
Sorry for the delay. My car is a 308 eHDI of 2012, but if I set the 308 some steering wheel controls do not work. Now I have set the 4008 of 2017 and all the steering wheel controls work and I also have the mute with the simultaneous pressure of the Vol + and Vol-. IMG_20221214_190432.jpgIMG_20221214_190441.jpgIMG_20221106_112107.jpgIMG_20221214_190407.jpg
 

Attachments

  • IMG_20221214_190501.jpg
    IMG_20221214_190501.jpg
    916.2 KB · Views: 52

seb21

Senior Member
Feb 9, 2019
79
56
@seb21
I might have found the part within the CarLink app which is responsible for the button press handling.
I used the Jadx-Gui program on Windows to open and decompile the app I extraced from the AllAppUpdate.bin file.
After decompiling the file can be found in f/a.class.
Java:
package f;

import android.bluetooth.BluetoothClass;
import android.hardware.camera2.legacy.LegacyCameraDevice;
import android.media.AudioManager;
import android.net.wifi.WifiEnterpriseConfig;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.os.Parcel;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.util.Log;
import android.util.Size;
import c.k;
import com.syu.carlink.CarLink;
import com.syu.carlink.CarLinkService;
import d.j;
import java.util.HashSet;
import java.util.NoSuchElementException;
import java.util.Objects;

/* loaded from: classes3.dex */
public final class a implements IBinder.DeathRecipient, Runnable, e.d {

    /* renamed from: a  reason: collision with root package name */
    public int f1040a;

    /* renamed from: b  reason: collision with root package name */
    public int f1041b;

    /* renamed from: c  reason: collision with root package name */
    public int f1042c;

    /* renamed from: d  reason: collision with root package name */
    public int f1043d;

    /* renamed from: e  reason: collision with root package name */
    public final int f1044e;

    /* renamed from: f  reason: collision with root package name */
    public int f1045f;

    /* renamed from: g  reason: collision with root package name */
    public int f1046g;

    /* renamed from: h  reason: collision with root package name */
    public IBinder f1047h;

    /* renamed from: i  reason: collision with root package name */
    public final d f1048i;

    /* renamed from: j  reason: collision with root package name */
    public Handler f1049j;

    /* renamed from: k  reason: collision with root package name */
    public Looper f1050k;

    /* renamed from: l  reason: collision with root package name */
    public long f1051l;

    /* renamed from: m  reason: collision with root package name */
    public long f1052m;

    /* renamed from: n  reason: collision with root package name */
    public boolean f1053n;

    /* renamed from: o  reason: collision with root package name */
    public boolean f1054o;

    /* renamed from: p  reason: collision with root package name */
    public final C0053a f1055p;

    /* renamed from: q  reason: collision with root package name */
    public final HashSet<f> f1056q;

    /* renamed from: f.a$a  reason: collision with other inner class name */
    /* loaded from: classes3.dex */
    public static final class C0053a implements AudioManager.OnAudioFocusChangeListener {

        /* renamed from: a  reason: collision with root package name */
        public int f1057a = -1;

        public C0053a() {
        }

        @Override // android.media.AudioManager.OnAudioFocusChangeListener
        public void onAudioFocusChange(int i2) {
            CarLinkService j2;
            a aVar;
            a aVar2;
            CarLinkService j3;
            a aVar3;
            a aVar4;
            StringBuilder f2 = android.accounts.a.f("===========================>>>>  onAudioFocusChange  focusChange:", i2, "  isShowing: ");
            f2.append(CarLink.n().f800c);
            l.b.a("HDL", f2.toString());
            this.f1057a = i2;
            if (i2 != -1) {
                if (i2 != 1) {
                    return;
                }
                boolean J = CarLink.n().J();
                l.b.a("HDL", "============>>>>01  onAudioFocusChange CARPLAY_C2S_AUDIO_CTRL 3 noMix: " + J + "  isMediaAudio: " + CarLink.n().w());
                if (J) {
                    CarLinkService j4 = CarLink.n().j();
                    if (j4 == null || (aVar4 = j4.f817o) == null) {
                        return;
                    }
                    aVar4.i(true);
                } else if (CarLink.n().w() || (j3 = CarLink.n().j()) == null || (aVar3 = j3.f817o) == null) {
                } else {
                    aVar3.i(true);
                }
            } else if (CarLink.n().f800c) {
                a.this.e().postDelayed(new android.print.a(this, 5), 300L);
            } else {
                boolean J2 = CarLink.n().J();
                l.b.a("HDL", "============>>>>00  onAudioFocusChange CARPLAY_C2S_AUDIO_CTRL 2 noMix: " + J2 + "  isMediaAudio: " + CarLink.n().w());
                if (J2) {
                    CarLinkService j5 = CarLink.n().j();
                    if (j5 == null || (aVar2 = j5.f817o) == null) {
                        return;
                    }
                    aVar2.i(false);
                } else if (!CarLink.n().w() || (j2 = CarLink.n().j()) == null || (aVar = j2.f817o) == null) {
                } else {
                    aVar.i(false);
                }
            }
        }
    }

    public a(f fVar) {
        j.g(fVar, "listener");
        this.f1040a = 1024;
        this.f1041b = 600;
        this.f1042c = 1024;
        this.f1043d = 600;
        this.f1044e = 221;
        this.f1045f = 125;
        this.f1048i = new d();
        this.f1055p = new C0053a();
        HashSet<f> hashSet = new HashSet<>();
        this.f1056q = hashSet;
        if (!hashSet.contains(fVar)) {
            hashSet.add(fVar);
        }
        Objects.requireNonNull(w.e.f1200a);
        HandlerThread handlerThread = new HandlerThread(j.p("LinkServer-", new w.c(a.class)));
        handlerThread.start();
        Looper looper = handlerThread.getLooper();
        j.f(looper, "it.looper");
        this.f1050k = looper;
        this.f1049j = new Handler(looper);
        e().post(this);
    }

    public static void h(a aVar, int i2, boolean z2, int i3) {
        if ((i3 & 2) != 0) {
            z2 = true;
        }
        android.accessibilityservice.e.o(i2, "linkStop  =======>>   aync: ", "HDL");
        if (z2) {
            long elapsedRealtime = SystemClock.elapsedRealtime();
            CarLink carLink = CarLink.f797e;
            if (carLink != null) {
                if (!carLink.E()) {
                    aVar.f1051l = elapsedRealtime;
                }
                aVar.f1052m = elapsedRealtime;
            } else {
                j.r("me");
                throw null;
            }
        }
        aVar.k(201, new int[]{i2}, null);
        CarLink carLink2 = CarLink.f797e;
        if (carLink2 != null) {
            carLink2.m().C.postValue(-1);
        } else {
            j.r("me");
            throw null;
        }
    }

    @Override // e.d
    public void a(int i2) {
        a aVar;
        a aVar2;
        android.accessibilityservice.e.o(i2, "-------->>> onKey keyCode: ", "HDL");
        CarLink carLink = CarLink.f797e;
        if (carLink != null) {
            if (carLink.s()) {
                CarLink carLink2 = CarLink.f797e;
                if (carLink2 != null) {
                    if (!carLink2.r() || i2 == 4100 || i2 == 4099 || i2 == 4109 || i2 == 4108 || i2 == 4111 || i2 == 4110) {
                        CarLink carLink3 = CarLink.f797e;
                        if (carLink3 != null) {
                            CarLinkService j2 = carLink3.j();
                            if (j2 == null) {
                                return;
                            }
                            if (i2 == 4097) {
                                a aVar3 = j2.f817o;
                                if (aVar3 == null) {
                                    return;
                                }
                                aVar3.k(207, new int[]{4}, null);
                                return;
                            } else if (i2 == 4098) {
                                a aVar4 = j2.f817o;
                                if (aVar4 == null) {
                                    return;
                                }
                                aVar4.k(207, new int[]{5}, null);
                                return;
                            } else if (i2 == 4099) {
                                a aVar5 = j2.f817o;
                                if (aVar5 == null) {
                                    return;
                                }
                                aVar5.f(true);
                                return;
                            } else if (i2 == 4100) {
                                a aVar6 = j2.f817o;
                                if (aVar6 == null) {
                                    return;
                                }
                                aVar6.f(false);
                                return;
                            } else if (i2 == 4101) {
                                CarLink carLink4 = CarLink.f797e;
                                if (carLink4 != null) {
                                    if (!carLink4.f800c) {
                                        j2.m(true);
                                        e().postDelayed(new k(j2, 4), 800L);
                                        return;
                                    }
                                    a aVar7 = j2.f817o;
                                    if (aVar7 == null) {
                                        return;
                                    }
                                    aVar7.n();
                                    return;
                                }
                                j.r("me");
                                throw null;
                            } else if (i2 == 4102) {
                                a aVar8 = j2.f817o;
                                if (aVar8 == null) {
                                    return;
                                }
                                aVar8.k(207, new int[]{1}, null);
                                return;
                            } else if (i2 == 4103) {
                                a aVar9 = j2.f817o;
                                if (aVar9 == null) {
                                    return;
                                }
                                aVar9.k(207, new int[]{2}, null);
                                return;
                            } else if (i2 == 4104) {
                                a aVar10 = j2.f817o;
                                if (aVar10 == null) {
                                    return;
                                }
                                aVar10.k(207, new int[]{3}, null);
                                return;
                            } else if (i2 == 4105) {
                                a aVar11 = j2.f817o;
                                if (aVar11 == null) {
                                    return;
                                }
                                aVar11.k(203, new int[]{3, -1}, null);
                                return;
                            } else if (i2 == 4106) {
                                a aVar12 = j2.f817o;
                                if (aVar12 == null) {
                                    return;
                                }
                                aVar12.k(203, new int[]{3, 1}, null);
                                return;
                            } else if (i2 == 4107) {
                                android.accessibilityservice.e.o(2, "=================>>> clickBtn action: ", "HDL");
                                CarLink carLink5 = CarLink.f797e;
                                if (carLink5 != null) {
                                    CarLinkService j3 = carLink5.j();
                                    if (j3 != null && (aVar2 = j3.f817o) != null) {
                                        aVar2.k(203, new int[]{2, 1}, null);
                                    }
                                    CarLink carLink6 = CarLink.f797e;
                                    if (carLink6 != null) {
                                        CarLinkService j4 = carLink6.j();
                                        if (j4 == null || (aVar = j4.f817o) == null) {
                                            return;
                                        }
                                        aVar.k(203, new int[]{2, 0}, null);
                                        return;
                                    }
                                    j.r("me");
                                    throw null;
                                }
                                j.r("me");
                                throw null;
                            } else if (i2 == 4109) {
                                CarLink carLink7 = CarLink.f797e;
                                if (carLink7 != null) {
                                    if (carLink7.r()) {
                                        a aVar13 = j2.f817o;
                                        if (aVar13 == null) {
                                            return;
                                        }
                                        aVar13.f(false);
                                        return;
                                    }
                                    a aVar14 = j2.f817o;
                                    if (aVar14 == null) {
                                        return;
                                    }
                                    aVar14.k(207, new int[]{4}, null);
                                    return;
                                }
                                j.r("me");
                                throw null;
                            } else if (i2 == 4111) {
                                CarLink carLink8 = CarLink.f797e;
                                if (carLink8 != null) {
                                    if (carLink8.r()) {
                                        a aVar15 = j2.f817o;
                                        if (aVar15 == null) {
                                            return;
                                        }
                                        aVar15.f(false);
                                        return;
                                    }
                                    a aVar16 = j2.f817o;
                                    if (aVar16 == null) {
                                        return;
                                    }
                                    aVar16.k(207, new int[]{5}, null);
                                    return;
                                }
                                j.r("me");
                                throw null;
                            } else if (i2 == 4108) {
                                CarLink carLink9 = CarLink.f797e;
                                if (carLink9 != null) {
                                    if (carLink9.r()) {
                                        a aVar17 = j2.f817o;
                                        if (aVar17 == null) {
                                            return;
                                        }
                                        aVar17.f(true);
                                        return;
                                    }
                                    a aVar18 = j2.f817o;
                                    if (aVar18 == null) {
                                        return;
                                    }
                                    aVar18.k(207, new int[]{5}, null);
                                    return;
                                }
                                j.r("me");
                                throw null;
                            } else if (i2 == 4110) {
                                CarLink carLink10 = CarLink.f797e;
                                if (carLink10 != null) {
                                    if (carLink10.r()) {
                                        a aVar19 = j2.f817o;
                                        if (aVar19 == null) {
                                            return;
                                        }
                                        aVar19.f(true);
                                        return;
                                    }
                                    a aVar20 = j2.f817o;
                                    if (aVar20 == null) {
                                        return;
                                    }
                                    aVar20.k(207, new int[]{4}, null);
                                    return;
                                }
                                j.r("me");
                                throw null;
                            } else {
                                return;
                            }
                        }
                        j.r("me");
                        throw null;
                    }
                    return;
                }
                j.r("me");
                throw null;
            }
            return;
        }
        j.r("me");
        throw null;
    }

    public final Size b(int i2, int i3) {
        int i4;
        int i5;
        boolean z2 = ((float) i2) / ((float) i3) <= 1.0f;
        if (z2 && (i3 > 1920 || i2 > 1080)) {
            int[] c2 = c(i2, i3, BluetoothClass.Device.AUDIO_VIDEO_VIDEO_MONITOR, LegacyCameraDevice.MAX_DIMEN_FOR_ROUNDING);
            i4 = c2[0];
            i5 = c2[1];
        } else {
            if (!z2 && (i3 > 1080 || i2 > 1920)) {
                int[] c3 = c(i2, i3, LegacyCameraDevice.MAX_DIMEN_FOR_ROUNDING, BluetoothClass.Device.AUDIO_VIDEO_VIDEO_MONITOR);
                i4 = c3[0];
                i5 = c3[1];
            }
            return new Size(i2 - (i2 % 8), i3 - (i3 % 8));
        }
        int i6 = i4;
        i3 = i5;
        i2 = i6;
        return new Size(i2 - (i2 % 8), i3 - (i3 % 8));
    }

    @Override // android.os.IBinder.DeathRecipient
    public void binderDied() {
        for (f fVar : this.f1056q) {
            fVar.a();
        }
        this.f1047h = null;
        e().postDelayed(this, 800L);
    }

    public final int[] c(int i2, int i3, int i4, int i5) {
        float f2 = i4;
        float f3 = i5;
        float f4 = i2;
        float f5 = i3;
        int[] iArr = new int[2];
        if (f4 / f5 > f2 / f3) {
            iArr[1] = (int) ((f5 * f2) / f4);
            iArr[0] = i4;
        } else {
            iArr[0] = (int) ((f4 * f3) / f5);
            iArr[1] = i5;
        }
        return iArr;
    }

    public final boolean d(int i2, Parcel parcel, Parcel parcel2) {
        IBinder iBinder = this.f1047h;
        if (iBinder == null) {
            return false;
        }
        return iBinder.transact((i2 << 8) | 2, parcel, parcel2, 0);
    }

    public final Handler e() {
        Handler handler = this.f1049j;
        if (handler != null) {
            return handler;
        }
        j.r("mHandler");
        throw null;
    }

    public final void f(boolean z2) {
        if (z2) {
            k(208, new int[]{1}, null);
            k(208, new int[]{0}, null);
        } else if (z2) {
        } else {
            CarLink carLink = CarLink.f797e;
            if (carLink != null) {
                if (carLink.r()) {
                    k(208, new int[]{3}, null);
                    k(208, new int[]{0}, null);
                    return;
                }
                return;
            }
            j.r("me");
            throw null;
        }
    }

    public final void g(int i2) {
        CarLink carLink = CarLink.f797e;
        if (carLink != null) {
            carLink.m().f1029q.postValue(1);
            CarLink carLink2 = CarLink.f797e;
            if (carLink2 != null) {
                carLink2.m().f1030r.postValue(254);
                k(200, new int[]{i2}, null);
                return;
            }
            j.r("me");
            throw null;
        }
        j.r("me");
        throw null;
    }

    public final void i(boolean z2) {
        int i2 = z2 ? 3 : 2;
        StringBuilder k2 = android.accessibilityservice.c.k("============================>>> CarPlay Music ");
        k2.append(z2 ? "Play" : "Pause");
        k2.append(" !!!");
        l.b.a("HDL", k2.toString());
        k(216, new int[]{i2}, null);
    }

    public final void j() {
        AudioManager audioManager;
        CarLink carLink = CarLink.f797e;
        if (carLink != null) {
            l.b.a("HDL", j.p("===========================>>>>  requestAudioFocus  type:: ", Integer.valueOf(carLink.G())));
            if (this.f1053n && this.f1055p.f1057a == 1) {
                return;
            }
            CarLink carLink2 = CarLink.f797e;
            if (carLink2 != null) {
                if (carLink2.G() == 1) {
                    CarLink carLink3 = CarLink.f797e;
                    if (carLink3 != null) {
                        CarLinkService j2 = carLink3.j();
                        int i2 = -1;
                        if (j2 != null && (audioManager = j2.f818p) != null) {
                            i2 = audioManager.requestAudioFocus(this.f1055p, 3, 1);
                        }
                        this.f1055p.f1057a = i2;
                        this.f1053n = true;
                        StringBuilder k2 = android.accessibilityservice.c.k("===========================>>>>  requestAudioFocus  type:: ");
                        CarLink carLink4 = CarLink.f797e;
                        if (carLink4 != null) {
                            k2.append(carLink4.G());
                            k2.append("  ");
                            k2.append(i2);
                            l.b.a("HDL", k2.toString());
                            return;
                        }
                        j.r("me");
                        throw null;
                    }
                    j.r("me");
                    throw null;
                }
                return;
            }
            j.r("me");
            throw null;
        }
        j.r("me");
        throw null;
    }

    public final boolean k(int i2, int[] iArr, String[] strArr) {
        j.g(iArr, "ints");
        Parcel obtain = Parcel.obtain();
        Parcel obtain2 = Parcel.obtain();
        boolean z2 = false;
        try {
            try {
                obtain.writeInterfaceToken("CarplayServer.ICarplayService");
                int length = iArr.length;
                int i3 = 0;
                while (i3 < length) {
                    int i4 = iArr[i3];
                    i3++;
                    obtain.writeInt(i4);
                }
                if (strArr != null) {
                    int i5 = 0;
                    while (true) {
                        if (!(i5 < strArr.length)) {
                            break;
                        }
                        int i6 = i5 + 1;
                        try {
                            obtain.writeString(strArr[i5]);
                            i5 = i6;
                        } catch (ArrayIndexOutOfBoundsException e2) {
                            throw new NoSuchElementException(e2.getMessage());
                        }
                    }
                }
                j.f(obtain2, "outparam");
                if (d(i2, obtain, obtain2) && obtain2.readInt() >= 0) {
                    z2 = true;
                }
            } catch (Exception e3) {
                e3.printStackTrace();
            }
            obtain.recycle();
            obtain2.recycle();
            return z2;
        } catch (Throwable th) {
            obtain.recycle();
            obtain2.recycle();
            throw th;
        }
    }

    public final void l(String str, String str2) {
        k(226, new int[0], new String[]{str, str2});
    }

    public final void m(boolean z2) {
        int i2;
        StackTraceElement[] stackTraceElementArr = Thread.getAllStackTraces().get(Thread.currentThread());
        Log.e("Qin", j.p("========>>>> called method :", "----------------->>  videoPlay "));
        j.e(stackTraceElementArr);
        int length = stackTraceElementArr.length;
        int i3 = 0;
        while (i3 < length) {
            StackTraceElement stackTraceElement = stackTraceElementArr[i3];
            i3++;
            StringBuffer stringBuffer = new StringBuffer();
            stringBuffer.append(stackTraceElement.getFileName() + ':' + ((Object) stackTraceElement.getMethodName()) + ":(" + stackTraceElement.getLineNumber() + ')');
            stringBuffer.append("\n");
            Log.e("Qin", j.p("========>>>>", stringBuffer));
        }
        StringBuilder k2 = android.accessibilityservice.c.k("============================>>> CarPlay linkstate: ");
        CarLink carLink = CarLink.f797e;
        if (carLink == null) {
            j.r("me");
            throw null;
        }
        k2.append(carLink.F());
        k2.append("  isUIShowing: ");
        CarLink carLink2 = CarLink.f797e;
        if (carLink2 != null) {
            k2.append(carLink2.f800c);
            k2.append(" video play: ");
            k2.append(z2 ? "Start" : "End");
            k2.append(" Projection !!!");
            l.b.a("HDL", k2.toString());
            if (z2) {
                CarLink carLink3 = CarLink.f797e;
                if (carLink3 != null) {
                    if (carLink3.f800c) {
                        i2 = 3;
                        k(210, new int[]{i2}, null);
                        return;
                    }
                } else {
                    j.r("me");
                    throw null;
                }
            }
            i2 = 2;
            k(210, new int[]{i2}, null);
            return;
        }
        j.r("me");
        throw null;
    }

    public final void n() {
        CarLink carLink = CarLink.f797e;
        if (carLink != null) {
            boolean B = carLink.B();
            StringBuilder k2 = android.accessibilityservice.c.k("vocie state: ");
            CarLink carLink2 = CarLink.f797e;
            if (carLink2 != null) {
                k2.append(carLink2.B());
                k2.append(" to enable : ");
                k2.append(B ? 1 : 0);
                l.b.a("HDL", k2.toString());
                k(205, new int[]{B ? 1 : 0}, null);
                return;
            }
            j.r("me");
            throw null;
        }
        j.r("me");
        throw null;
    }

    @Override // java.lang.Runnable
    public void run() {
        boolean z2;
        e().removeCallbacks(this);
        IBinder iBinder = (IBinder) n.a.f("android.os.ServiceManager", null, "getService", "CarplayServer");
        this.f1047h = iBinder;
        if (iBinder != null) {
            iBinder.linkToDeath(this, 0);
            d dVar = this.f1048i;
            j.g(dVar, "binder");
            IBinder iBinder2 = this.f1047h;
            if (iBinder2 == null) {
                z2 = false;
            } else {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("CarplayServer.ICarplayService");
                    obtain.writeStrongBinder(dVar);
                    iBinder2.transact(3, obtain, obtain2, 0);
                    z2 = obtain2.readInt() != 0;
                    obtain2.readException();
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }
            l.b.a("HDL", j.p("CarplayListener register result:", Boolean.valueOf(z2)));
            for (f fVar : this.f1056q) {
                fVar.b(this);
            }
        }
        l.b.a("HDL", j.p("=================>>>  CarplayServer Start!! ", this.f1047h));
        if (this.f1047h == null) {
            Class cls = Integer.TYPE;
            j.e(cls);
            Integer num = (Integer) n.a.e("android.os.SystemProperties", null, "getInt", new Class[]{String.class, cls}, "sys.fyt.carplay", -1);
            if ((num != null ? num.intValue() : -1) == 1) {
                SystemProperties.set("sys.fyt.carplay", WifiEnterpriseConfig.ENGINE_DISABLE);
                try {
                    Thread.sleep(20L);
                } catch (InterruptedException e2) {
                    e2.printStackTrace();
                }
                SystemProperties.set("sys.fyt.carplay", WifiEnterpriseConfig.ENGINE_ENABLE);
                e().postDelayed(this, 800L);
            }
        }
    }
}
I also noticed something what might be interesting, another file
Java:
package com.syu.ipc;

/* loaded from: classes3.dex */
public class FinalRemoteToolkit {
    public static final int DISABLE = 0;
    public static final int ENABLE = 1;
    public static final int MODULE_CODE_AMP = 15;
    public static final int MODULE_CODE_BT = 2;
    public static final int MODULE_CODE_CANBUS = 7;
    public static final int MODULE_CODE_CAN_UP = 14;
    public static final int MODULE_CODE_CUSTOMER = 11;
    public static final int MODULE_CODE_DVD = 3;
    public static final int MODULE_CODE_DVR = 9;
    public static final int MODULE_CODE_EMITTER = 16;
    public static final int MODULE_CODE_GESTRUE = 18;
    public static final int MODULE_CODE_GSENSOR = 17;
    public static final int MODULE_CODE_IPOD = 5;
    public static final int MODULE_CODE_MAIN = 0;
    public static final int MODULE_CODE_OBD = 12;
    public static final int MODULE_CODE_RADIO = 1;
    public static final int MODULE_CODE_SENSOR = 19;
    public static final int MODULE_CODE_SOUND = 4;
    public static final int MODULE_CODE_STEER = 10;
    public static final int MODULE_CODE_TEST = 13;
    public static final int MODULE_CODE_TPMS = 8;
    public static final int MODULE_CODE_TV = 6;
    public static final int OFF = 0;
    public static final int ON = 1;
    public static final int SWITCH = 2;

    /* loaded from: classes3.dex */
    public class Face {
        public static final int ALL = 1073741824;
        public static final int FRONT = 65536;
        public static final int LEFT = 4096;
        public static final int REAR = 131072;
        public static final int RIGHT = 8192;

        public Face() {
        }
    }

    /* loaded from: classes3.dex */
    public class Index {
        public static final int A = 16;
        public static final int B = 32;
        public static final int C = 48;
        public static final int D = 64;
        public static final int E = 80;
        public static final int F = 96;
        public static final int FIVE = 5;
        public static final int FOUR = 4;
        public static final int H = 256;
        public static final int L = 0;
        public static final int ONE = 1;
        public static final int SIX = 6;
        public static final int THREE = 3;
        public static final int TWO = 2;
        public static final int ZERO = 0;

        public Index() {
        }
    }
}
There's a keycode for next, previous, mute, but there's no separate keycode for pause. Could this be the cause?
But there are keycodes for play,pause and play/pause.
Look at this . It is taken from older carlink apk :
Java:
        private static final int KEYCODE_NEXT = 4097;
        private static final int KEYCODE_PREV = 4098;
        private static final int KEYCODE_CALL = 4099;
        private static final int KEYCODE_ENDCALL = 4100;
        private static final int KEYCODE_VOICE = 4101;
        private static final int KEYCODE_PLAY = 4102;
        private static final int KEYCODE_PAUSE = 4103;
        private static final int KEYCODE_PLAY_PAUSE = 4104;
        private static final int KEYCODE_DPAD_LEFT = 4105;
        private static final int KEYCODE_DPAD_RIGHT = 4106;
        private static final int KEYCODE_DPAD_CENTER = 4107;
        private static final int KEYCODE_PICK_OR_MEDIA_PREV = 4108;
        private static final int KEYCODE_HANG_OR_MEDIA_NEXT = 4109;
        private static final int KEYCODE_PICK_OR_MEDIA_NEXT = 4110;
        private static final int KEYCODE_HANG_OR_MEDIA_PREV = 4111;
I don't see this definitions in new versions but i doubt that they are changed.
In f/a.class you have
Java:
  } else if (i2 == 4102) {
                                a aVar8 = j2.f817o;
                                if (aVar8 == null) {
                                    return;
                                }
                                aVar8.k(207, new int[]{1}, null);
                                return;
                            } else if (i2 == 4103) {
                                a aVar9 = j2.f817o;
                                if (aVar9 == null) {
                                    return;
                                }
                                aVar9.k(207, new int[]{2}, null);
                                return;
                            } else if (i2 == 4104) {
                                a aVar10 = j2.f817o;
                                if (aVar10 == null) {
                                    return;
                                }
                                aVar10.k(207, new int[]{3}, null);
                                return;
 

Specy01

Senior Member
Jul 12, 2015
147
9
@daviddosa
I forgot to point out. The only problem I have with this setting is that from time to time, randomly, I turn on the maintenance light (the key) and the opening of the doors is indicated incorrectly. But today I should get another canbus and we'll see if it will be the right one
 

s14kouki

Member
Jan 19, 2013
15
0
Brisbane
I just updated my canbus files via the Teyes update app, now the patch no longer works.

I've also tried to reflash the mod with no luck. The config app doesn't register any of my SW buttons like it did before.

During the update process I had to download 4 files and install in sequence, I'm pretty sure one of them was titled MS.apk. Could this another case of Teyes locking out mods after update?

Help! This mod was so good, I wish I never updated the canbus :cry:
 

seb21

Senior Member
Feb 9, 2019
79
56
I just updated my canbus files via the Teyes update app, now the patch no longer works.

I've also tried to reflash the mod with no luck. The config app doesn't register any of my SW buttons like it did before.

During the update process I had to download 4 files and install in sequence, I'm pretty sure one of them was titled MS.apk. Could this another case of Teyes locking out mods after update?

Help! This mod was so good, I wish I never updated the canbus :cry:
Send me the updated ms.apk.
 

seb21

Senior Member
Feb 9, 2019
79
56
I have updated first post and the files.

@zinemahk Config app now support vertical screens
@rs200z new version is here. And if you get the ""downgrade" error then use lsecXXXXupdate binary from new firmware. Update script stays the same.
 
  • Like
Reactions: zinemahk

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Hi everyone.
    New versions available . Updated first post.
    2
    Hi everyone.
    New versions available . Updated first post.
    Great piece of work! Re-assigned my VW SWC and use this together with @mariodantas MD Edition kernel (no Mainservice) - works really well!
    2
    @seb21 Thank you for the awsome app just a quick question I have a COHO FTY and my problem is my resolution of the screen is 1920x720 is there any way to force scale the app to make it full screen currently it is very small in the center (the original one that is)?
    I will make changes to the UI to fit your resolution.
    1
    I see, I'm not really guru in the TEYES structure, I think that here around this thread you must find someone who knows TEYES strusture better than me.
    1
    I see, I'm not really guru in the TEYES structure, I think that here around this thread you must find someone who knows TEYES strusture better than me.
    Sounds good. Also, thanks for everything you've done for the community. I've just started playing with these headunits and all of the work you (and surfer and seb and others) have done are a huge benefit to everyone.
  • 6
    Hi all.
    This syu.ms.apk mod main function is to extend control of steering wheel controls (CAN based) plus some extra.
    It is two part mod :
    - factory com.syu.ms.apk must be replaced with this modded syu.ms.apk - easiest way is to use lsec mathod . If you don't know how see post #15
    - Mod Config App (install like every apk ) - the configuration tool for this mod.
    For more information please read user manual.txt

    Change log :
    - added possibility to assign intents to buttons.
    - Config App : added UI for vertical screens
    26.01.2023 :
    - added possibility to use up to 5 different user apps lists
    - added possibility to use you own order of app in the carousel.
    - added external assets files. I attached a zip file with all used assets. - This is based on @mariodantas idea
    01.02.2023
    - added system property for @mariodantas project.


    As there is no point to maintain two different versions of syu.ms.apk files i will use the newest, for now is from the joying firmware (04-11-2022)

    For now i am working on totally re-built the UI of the settings app.
    For translations thanks to :
    @muzoss - German
    @daviddosa - Hungarian
    @mariodantas - French
    @surfer63 - Dutch
    4
    If anyone wants to update their translation i updated the strings.xml file in first post.
    New versions of Config App and syu.ms i will post tomorrow .
    4
    Hi everyone.
    New versions available . Updated first post.
    3
    I have updated the installer to include the new ModConfigApp and newer versions of modded syu.ms.apk.
    Find it in post #15.
    3
    As i see if you replace ms.apk with another for example my modded version and it is not working there can be only one explanation : system for some reason (different signature ???)has not updated Dalvik Cache- therefore it still using old app.

    Do you know a way (without root) to force the system to clear/rebuild Dalvik ?
    Yes, I just explained that in another post if you flash a single app.
    See post #1250 from the "General FYT based Spreadtrum uis7862 etcetera" thread.
    For the com.syu.ms it should be
    Code:
    # Remove the current app data/program cache/cache
    rm -rf /data/dalvik-cache/profiles/com.syu.ms
    rm -rf /data/data/com.syu.ms
    rm -rf /data/dalvik-cache/arm64/*com.syu.ms*

    Edit:
    The relevant dalvik files are actually:

    A lot of users know my HWGetinfo.apk by now, but personally I use a flashable lsec script to do this as it gives much more info. I will add some informational text to it and share it in "my" thread.