[APP][root] Android Auto 3rd party App Enabler

Search This thread

turboAWD

New member
Jul 18, 2021
1
0
Not new to computers, but haven't hacked on Android too much. I have an old phone (Moto E4, Android 5.1) that was just retired. Willing to hack as much as necessary - would like to display jb4 app (car ECU piggyback software) on my Stinger main display.

I've used my S10 to test basic android auto and use the jb4 app (Edit: obviously NOT on android auto), but can't hack my S10 (for work reasons), so I don't want to hack around on that phone.

What are my chances of success? Would like to know that it SHOULD work in theory before I invest any time.

Also, use phenotype patcher (I saw somewhere it was Android 6.0+, so I couldn't use it), or root the phone + AA3AE (or whatever this app is called).

Thanks for any hints.
 
Not new to computers, but haven't hacked on Android too much. I have an old phone (Moto E4, Android 5.1) that was just retired. Willing to hack as much as necessary - would like to display jb4 app (car ECU piggyback software) on my Stinger main display.

I've used my S10 to test basic android auto and use the jb4 app (Edit: obviously NOT on android auto), but can't hack my S10 (for work reasons), so I don't want to hack around on that phone.

What are my chances of success? Would like to know that it SHOULD work in theory before I invest any time.

Also, use phenotype patcher (I saw somewhere it was Android 6.0+, so I couldn't use it), or root the phone + AA3AE (or whatever this app is called).

Thanks for any hints.
This is depreciated .. not working, old stuff..
Go follow to new app from link..
 
  • Like
Reactions: turboAWD

fcaronte

Senior Member
Nov 4, 2011
855
290
Still wait for some methods? Oh, it is!
Here is NO-ROOT method to add designed for android auto app, to the screen of your car! Just told to your device that your app installed from Google Play.
Use adb as described here: https://stackoverflow.com/questions/39265358/android-auto-app-testing (mobile-debug.apk is an app that need to install from PC)
Code:
adb push mobile-debug.apk /sdcard/app.apk
adb shell pm install -i "com.android.vending" -r /sdcard/app.apk
adb shell rm /sdcard/app.apk
Want without PC? Use special flags!
Attached app "asKing.apk" great to install the app as if it were downloaded from Google Play. Just select a file and press Install. Use custom file manager like Total Commander to correct select file, if your path starts with /root - remove /root from a path (string with path is editable). For example, /root/storage/emulated/0/Download/tmp/my.apk - not correct, but /storage/emulated/0/Download/tmp/my.apk is OK.
It work on all AA on Android 10 and lower, on Android 11 and higher it works on AA 6.3 and lower or AA 6.6 and higher (exclude 6.4 and 6.5 if we be simple)
But if you have Android 11 and Android Auto 6.4 or 6.5 seems to it use this that works like this and cannot change without root.
However, with root you can got it (It is only on Android 11, if you have Android 10 and lower, can use without root with any version AA.).
Before you start root manipulations, just imagine that your phone may stop booting losting all data, as this is an important system file!
See system name of your car APP, that you want add to the car screen AA. com.best.app for example! It must be already installed. Actions below told your device that it from Google Play (car app updates are installed in the same way, it is unlikely that it will be possible to update from Android)
So reboot to TWRP and connect to PC with adb.
Then, open command line on your pc!
Code:
adb pull /data/system/packages.xml
Near adb appears file packages.xml on your PC
Open it with any text editor. Find by your system app name:
Code:
<package name="com.best.app" codePath="/data/app/com.best.app-1" nativeLibraryPath="/data/app/com.best.app-1/lib" primaryCpuAbi="arm64-v8a" publicFlags="675855940" privateFlags="0" ft="179523e9258" it="179523ea69a" ut="179523ea69a" version="1" userId="10215">
And add this (installer="com.android.vending" installInitiator="com.android.vending") to end before the closing tag. If it already in file, but not equals "com.android"vending", it need to correct this. Example for this case:
Code:
<package name="com.best.app" codePath="/data/app/com.best.app-1" nativeLibraryPath="/data/app/com.best.app-1/lib" primaryCpuAbi="arm64-v8a" publicFlags="675855940" privateFlags="0" ft="179523e9258" it="179523ea69a" ut="179523ea69a" version="1" userId="10215" installer="com.android.vending" installInitiator="com.android.vending">
Be aware, installInitiator needs only in Android 11 and high.
If your Android is 10 or lower, and installInitiator were not in packages.xml, you should not add it to file - add only installer.
Save file on your PC and push to device:
Code:
adb push packages.xml /data/system/packagesnew.xml
adb shell "cat /data/system/packagesnew.xml > /data/system/packages.xml"
adb shell rm /data/system/packagesnew.xml
Very important not remove or not completely rewrite /data/system/packages.xml - only replace text in this. So using cat instead mv/rm/cp.
Reboot mobile. If it booted, youre lucky. If not, return to TWRP, do all again to prevent errors, or remove on your own risk file /data/system/packages.xml from TWRP (adb shell rm /data/system/packages.xml). Next booting will long, system recreate this file... maybe. Always has a chance! For lost your data also. So always have your backup and do all tihis for your own risk!
Want without PC? Oh, sure, but be careful, I warned you!
Just use attached changeInstaller.apk [ROOT ONLY] instead of all the described actions with the computer adb!
1. Install
2. At the first start, grant root rights and access to the repository. After issuing the rights, close and reopen the application. It is important.
3. Select the application from the list that you want to mark as installed from Google Play. Its status will appear. On the left is a log of events, on the right - errors, there should be no errors
4. Press Start, wait for the status to change. We carry out the procedure for all the necessary applications
5. Press Force Reboot and wait for reboot.
Booted? Excellent.
Didn't load? At the root of the internal sdcard is the packages_backups folder with the packages.xml backup.
Check out the manual version of the solution to understand what has been fixed and what to look for.
Remember that /data/system/packages.xml cannot be overwritten, only change the text inside.

All of this is only for testing your apps.
seem this things aren't work on android 13. i try with lineage os 20 on emulator is work correctly but in the car app disappear. i try to pull the packages.xml but seem crypted and is read bad and probably this is why changeinstaller can't find any app in the packages list
Edit: I fix the problem reinstalling rom and flash nikigapps BEFORE a first rom boot
 
Last edited:
  • Haha
Reactions: drnightshadow

GPSMapper

Member
Apr 11, 2009
49
9
Xiaomi 12
seem this things aren't work on android 13. i try with lineage os 20 on emulator is work correctly but in the car app disappear. i try to pull the packages.xml but seem crypted and is read bad and probably this is why changeinstaller can't find any app in the packages list
Edit: I fix the problem reinstalling rom and flash nikigapps BEFORE a first rom boot
I am having the same issue with lineageos 19.1 - none of the methods are working because
/data/system/packages.xml is encoded and not an editable text file.

I was trying with both recommended Mindthegapps and with Nikgapps (full)
I was flashing the gapps before the first boot.

What Nikgaps package you've been using?
 

fcaronte

Senior Member
Nov 4, 2011
855
290
I am having the same issue with lineageos 19.1 - none of the methods are working because
/data/system/packages.xml is encoded and not an editable text file.

I was trying with both recommended Mindthegapps and with Nikgapps (full)
I was flashing the gapps before the first boot.

What Nikgaps package you've been using?
Full package, but probably you can use another package + android auto addons
 

GPSMapper

Member
Apr 11, 2009
49
9
Xiaomi 12
Full package, but probably you can use another package + android auto addons
Thanks, undortunately for me this does not work. I have been trying LOS 19.1 clean install + Nikgapps full - same issue - can't make AA to see S2A/Fermata, not matter which options I try (AAEase, King Installer, ADB, AIO Tweker)

Changeinstaller does not work while /data/system/packages.xml file is not plain text.

With another rom (Pixel Experience Plus) - everything is OK (but it's unofficial and some AA functionality is broken there)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 42
    Since Android Auto 3.0, third party apps have been removed from Android Auto despite having Developer Options and "Unknown Sources" checked.

    Some developers have came up with a root workaround to allow these apps to show in the menu.

    This workaround is dependent on current AA version to work and has always been implemented by specific apps. Some even had the unlock button in the AAuto interface :)

    This app comes to fix that all.

    It will list the currently installed AA third party apps, and will apply the workaround for them.

    Instructions:
    1. Get AA in developer mode and "Unknown Sources" checked. (details in steps 1-7 in this thread). Start head unit server is not needed in my tests.
    2. Open the app, click "Read apps". Check the apps you want to enable in AA.
    3. Click "Unlock"
    4. Click "Apply".
    5. Reboot.
    6. Enjoy your apps :)

    The indicator of wheter the Chimera service is enabled or not doesn't still work properly, don't take it as reference. Just click unlock every time you want to apply changes in the list.

    The app will be improved whenever I have time.

    Screenshot:
    t0fWF4L.jpg

    Download: https://androidfilehost.com/?fid=1322778262904028904 (updated 15/10 with support to android 5.0 and 6.0)
    18
    Dedicated to Galaxy S9 owners with Android 9 and all other people who get a black screen with AAM
    After updating Android, trouble came to our devices - AAM stopped working and instead of a SurfaceView mirror it shows only a black screen.
    I can please you: the solution is found.
    This is a historical obsolete text, the actual method is located below. To see this, just go to the bottom - to "More simple solution".

    It is formed by combining two programs:
    1. https://play.google.com/store/apps/details?id=info.dvkr.screenstream
    Launches a live broadcast of the device screen on port 8080
    An open source tool, thanks so much to dkrivoruchko (many thanks).
    2. https://github.com/slashmax/AABrowser/tree/master/apk
    Browser for Android Auto, displays this broadcast

    So, how to get a mirror if you have a black screen on AAM:
    1. Install ScreenStream by link 1 above
    2. Install AABrowser by reference 2 above
    3. Unlock AABrowser in AAPP, connect one time to car or emulator
    4. Edit the file /data/data/com.github.slashmax.aabrowser/shared_prefs/com.github.slashmax.aabrowser_preferences.xml
    In the parameters "home page" and "last page" we register:
    http://127.0.0.1:8080
    The easiest way is to edit the file by copying it somewhere, and then replacing the existing one.
    5. Launch ScreenStream, disable “wi-fi only” in the settings

    When connecting to the machine, do the following:
    1. Launch ScreenStream, click "Enable Broadcast"
    2. We connect to the car
    3. Run AABrowser

    This solution displays a complete mirror out of the box, without the support of a touch and a consistent sound to which we are used to AAM. It is planned to make a version based on the method described above, with the support of all these buns. If who wants - make it please :) In the meantime, use video is better than black screen.

    Note: this solution is worse than direct capture of the screen used by AAM, since it introduces a delay of ~ 1s when displaying a picture on the screen. S9 is a powerful device, the delay is very small, a second or less. I don’t know what will happen to others, but the problem seems to be so far only Samsung 9 android, which has nothing to do with weak devices.

    Upd. This manual is for any device, who can't use standart AAM, but I test it only on Galaxy S9.

    upd. I test it in motion. Navigator has no delay or It is not noticeable when you look: at the phone next to the multimedia system, there is no difference. I have a resolution of 720 and 1080 in the settings.
    But in menu I have very little delay

    Updated
    A modified version of AAM is available, based on this method, with all the goodies from the original AAM.
    Everything is simplified a bit with her, no need to mess around with AABrowser.

    For full-fledged work after installation, it must be made systemic, otherwise the screen settings are not applied until know why (some rights are not enough).
    And then everything is simple - we start the broadcast, run AAM_mod instead of AABrowser, enjoy.

    More simple solution
    Detailed instructions for modified AAM
    1. Install ScreenStream https://play.google.com/store/apps/details?id=info.dvkr.screenstream
    (but version from update below is more recommended)
    2. Install AAM_mod
    (version from update below is more recommended)
    3. Making it a system app (optional, but otherwise some screen settings, for example, rotation, are not applied)
    4. Unlock AAM_mod in AAPP
    5. Launch ScreenStream, disable “wi-fi only” in the settings

    For each connection to the machine, do the following:
    1. Launch ScreenStream, click "Enable Broadcast"
    2. We connect to the car
    3. Run AAM_mod

    If you have problems with rotation, please, connect to car with standart orientation and when you see your mirror on car display, change orientation to other.
    Note. If ScreenStream not work, try ScreenStream v2

    Update!
    Unexpectedly for me, many were outraged by the new decision due to the fact that the picture is displayed in full screen, but has a small indent. “We have tiny displays already!”, - they shouted :)
    These requests were heard, the problem was eliminated.
    The problem turned out to be in ScreenStream, for its elimination it is enough to replace the data / assets / index.html file in apk, and the holiday will come again to our street.
    It did it for version 3.0.16, but if you want to do for the latest version, it is very easy through the ApkEditor program. Recorded a video about rebuilding the package and publish index.html, but if you are not a geek, just put the attached files and enjoy :)


    The frames are removed in ScreenStreamMod! In AAM, only the shift of the wheelbarrow is fixed.
    In general, the latest version of the alternative mirror is enclosed in these files (remove previous versions)

    aam_mod2.apk: https://forum.xda-developers.com/attachment.php?attachmentid=4717719&stc=1&d=1551874248
    ScreenStream_mod.apk: https://forum.xda-developers.com/attachment.php?attachmentid=4717718&stc=1&d=1551874248

    ScreenStream v2 mod (previous version, some like it more): https://forum.xda-developers.com/attachment.php?attachmentid=4720342&stc=1&d=1552215688

    If you use the AAM "Ajust ratio on focus" option, you first need to run AAM on the machine and only then start the broadcast

    Solving problems with screen cutout: https://forum.xda-developers.com/showpost.php?p=79084489&postcount=484
    17
    SOLUTION FOR A MIRROR ON LAST GMS/AA WITHOUT DANCING AROUND IT
    Code:
    inserted 10.12.2018
    Meet the AA Phenotype Patcher: https://forum.xda-developers.com/showpost.php?p=78402151&postcount=317
    Stated that he does everything for you completely, even sql puts, but personally did not check.
    1. First of all, delete all your unlockers. They are not needed anymore
    2. Turn back on Chimera and all previously disabled Google services. They do not interfere with the work of the mirror.
    3. Switch Android Auto to Release mode, uncheck Unknown sources
    4. Install Termux https://play.google.com/store/apps/details?id=com.termux&hl=ru
    5. Install Sqlite3 for root, launch it and click Install. https://play.google.com/store/apps/details?id=com.kanolato.sqlite&hl=ru
    6. Go to Termux.
    Perform successive commands and restart the phone. After that, AAMirror will always remain in the list of Android Auto applications, with the latest versions of services and the application itself. No loss anymore.

    0
    su

    1. Open DB
    sqlite3 /data/data/com.google.android.gms/databases/phenotype.db

    2. Insert flags
    Code:
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car#car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car#car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    If you encounter Error NOT NULL constraintfailed: Flags.version (and only in this case, because car instead of car # car is used extremely rarely on phones and there is no way to check, it may not work!) Try
    Code:
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    If there is a failure here, try the third option (often does not work, but try to do it)
    Code:
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 240, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", (SELECT version FROM ApplicationStates WHERE packageName="com.google.android.gms.car#car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 240, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", (SELECT version FROM ApplicationStates WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    And fourth solution
    Code:
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 240, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", (SELECT version FROM ApplicationStates WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    3. Make a trigger to prevent their removal (only if there were no errors in the previous paragraph)
    If in the last paragraph there were no errors:
    Code:
    CREATE TRIGGER after_delete AFTER DELETE
    ON Flags
    BEGIN
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car#car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car#car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    END;

    If in the previous paragraph you had to use an first alternative option:
    Code:
    CREATE TRIGGER after_delete AFTER DELETE
    ON Flags
    BEGIN
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 230, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 234, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    END;
    If in the previous paragraph the third option worked
    Code:
    CREATE TRIGGER after_delete AFTER DELETE
    ON Flags
    BEGIN
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 240, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", (SELECT version FROM ApplicationStates WHERE packageName="com.google.android.gms.car#car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 240, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", (SELECT version FROM ApplicationStates WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    END;
    If in the previous paragraph only the fourth option worked
    Code:
    CREATE TRIGGER after_delete AFTER DELETE
    ON Flags
    BEGIN
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 240, 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", (SELECT version FROM ApplicationStates WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "com.github.slashmax.aamirror",1);
    END;
    Note
    If, when creating a trigger, you see ERROR: trigger after_delete already exists, but you want to recreate it, execute
    Code:
     DROP TRIGGER after_delete;
    Then create anew
    Check your trigger to prevent messages "not working, go away". Just execute:
    Code:
     SELECT * FROM Flags WHERE name="app_white_list";
    You may see 6 or more added by you flags.
    Then, try to remove it!
    Code:
     DELETE FROM Flags WHERE name="app_white_list";
    And select again:
    Code:
     SELECT * FROM Flags WHERE name="app_white_list";
    Only if result not empty (maybe not equal 2 commands ago, but not empty), you do all correctly. Else not.

    If you raise the version of the car # car application, a temporary loss of AAMirror is possible (until a trigger is triggered, which determines the new version). To fix it quickly, repeat step 2. This fact should be taken into account.

    Hint: you can add any other AA-applications, separated by a comma, not only aamirror
    Example: "com.github.slashmax.aamirror,com.app.test"

    Important! If you see "sqlite3 not found" in the terminal as root, then sqlite3 has not been established for the root and you need to find a solution for your phone!
    Until you install it, nothing will work. If existing installers do not work (or work, but still sqlite3 not found), try to turn to the theme of the firmware specifically for your device.
    All I can offer is to try from root /system/xbin/sqlite3 or /system/bin/sqlite3 instead of just sqlite3.
    Still, perhaps it will help: i added the xbin folder to the system folder. The error is gone.

    For the future: https://forum.xda-developers.com/showpost.php?p=78347721&postcount=1313

    If you get black screen: https://forum.xda-developers.com/showpost.php?p=78548457&postcount=383
    14
    Hello,
    New version of AA Phenotype Patcher 0.8 is up.

    Changelog:
    - Added third and fourth options of @Jen94 SQLs (big thanks!)
    - Added 3 new apps to "top list" (AA Mirror Plus, Performance Monitor for VAG and AAuto Launcher)

    Download:
    https://github.com/Eselter/AA-Phenotype-Patcher/tree/master/app/release
    11
    On Xiaomi Mi8 with Magisk 18, AA Phenotype Patcher 0.6 I had to manually add exec permission on /data/user/0/pl.eselter.aaphenotypepatcher/sqlite3 otherwise it raise the following error:

    Code:
    --  Apps which will be added to whitelist: --
      - AA Mirror (com.github.slashmax.aamirror)
    
    
    -- Drop Triggers  --
     OutputStream:
      /data/user/0/pl.eselter.aaphenotypepatcher/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DROP TRIGGER after_delete;'
     ErrorStream:
      /system/bin/sh: <stdin>[1]: /data/user/0/pl.eselter.aaphenotypepatcher/sqlite3: can't execute: Permission denied
    
    --  DELETE old Flags  --
     OutputStream:
      /data/user/0/pl.eselter.aaphenotypepatcher/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DELETE FROM Flags WHERE name="app_white_list";'
     ErrorStream:
      /system/bin/sh: <stdin>[1]: /data/user/0/pl.eselter.aaphenotypepatcher/sqlite3: can't execute: Permission denied

    0.7 should fix this problem. In 0.6 I moved chmod instuction inside check if sqlite3 file exist and if exist but don't have required permissions you will see this error. It can also happend when file don't exist but you don't give su permission.