[Q] Android Proguard ERROR: Unknown verificatification type[10] - Android Q&A, Help & Troubleshooting

I am trying to build an apk file for release. My application lib contains a jar (probably obfuscated) from a third party vendor of one of my company's hard-wares. When I build the apk in debug mode it is successful, but when I try to do it in release mode using "ant release" it throws the following error.
Code:
BUILD FAILED
C:\adt-bundle-windows-x86_64\sdk\tools\ant\build.xml:868: Can't read [D:\Workspace\MyProject\libs\ThirdPartyJarV3.1.jar] (Can't process class [g.class] (Unknown verification type [10] in stack map frame))
I have successfully built apks in release mode for other projects (which doesn't have this jar file.)
It seems to be an issue around proguard not being able to read this class in the jar. I have looked through ProGuard's trouble shooting manual and also on google and found no help with this particular error:
Code:
(Unknown verification type [10] in stack map frame)
I also updated proguard from V4.7 to 4.10, but it still encounters the same error.
To my little mind it seems to be a problem with the jar itself and if so how do I fix it? Any help would be appreciated. TIA!
[P.S: I'm new to android]

Related

[Q] [Noob] Having troubles importing a project

So I found this project online that lets me use the gyroscope of a phone. It has all the required files but when I import it into my workspace I get these three errors....
1) The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
(java problem)
2) The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class file
(java problem)
3) Unable to resolve target 'android-5' AccessGyroscope Unknown Android (Target Problem)
Thanks in advanced
EDIT: Actually I think i just fix the problem

[Q] Ant build error while compiling uiautomator script

Hi, I am trying to compile uiautomator script using "ant build" command, and it fails with the following output. Would someone know what is wrong?
I tried to follow the guide in from the android.com website.
I'm not sure where to post the script though, I posted it into subfolder "src" and named it "case" without any extension.
Thanks
Code:
Buildfile: C:\!Android SDK\Workspace\AdminOn\build.xml
-check-env:
[checkenv] Android SDK Tools Revision 22.0.5
[checkenv] Installed at C:\!Android SDK\sdk
-build-setup:
[getbuildtools] Using latest Build Tools: 18.0.1
[echo] Resolving Build Target for AdminOn...
[getuitarget] Project Target: Android 4.3
[getuitarget] API level: 18
[echo] ----------
[echo] Creating output directories if needed...
-pre-compile:
compile:
-post-compile:
-dex:
[dex] input: C:\!Android SDK\Workspace\AdminOn\bin\classes
[dex] Converting compiled files and external libraries into C:\!Android SD
K\Workspace\AdminOn\bin\classes.dex...
[dx] no classfiles specified
BUILD FAILED
C:\!Android SDK\sdk\tools\ant\uibuild.xml:198: null returned: 1
Total time: 4 seconds

[Ruby] Installing gems on android.

Hello friends!
I am using Termux in order to run ruby.
I installed ruby successfully with "apt" command, and it functions fine.
Current ruby version:
Code:
$ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [arm-linux-androideabi]
The problem is, I can't really install gems. I tried to install bettercap for the experiment, but it failed. This is what I get:
Code:
$ gem install bettercap
Fetching: colorize-0.8.1.gem (100%)
Successfully installed colorize-0.8.1
Fetching: network_interface-0.0.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing bettercap:
ERROR: Failed to build gem native extension.
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1/ext/network_interface_ext
/data/data/com.termux/files/usr/bin/ruby -r ./siteconf20161129-14856-1cclchu.rb extconf.rb
mkmf.rb can't find header files for ruby at /data/data/com.termux/files/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/gem_make.out
I found some instructions if I ran "gem help install" but I couldn't really understand what to do in order to fix that.
Can anyone help me to solve this? BTW I have a rooted device so I can use "su" and "sudo" and all that stuff...
Thanks for people who answer~
FurySh0ck said:
Code:
mkmf.rb can't find header files for ruby at /data/data/com.termux/files/usr/lib/ruby/include/ruby.h
Click to expand...
Click to collapse
You can install ruby.h with:
Code:
apt install ruby-dev
.
fornwall said:
You can install ruby.h with: .
Click to expand...
Click to collapse
I installed ruby-dev but it still won't work. It tells me it saved a log file which contains the explanation to the failure. I'll post the whole code, but please pay attention to the last part of it:
Code:
apt install bettercap
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package bettercap
$ gem install bettercap
Building native extensions. This could take a while...
ERROR: Error installing bettercap:
ERROR: Failed to build gem native extension.
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1/ext/network_interface_ext
/data/data/com.termux/files/usr/bin/ruby -r ./siteconf20161206-31345-1xerjr9.rb extconf.rb
[*] Running checks for netifaces code...
[*] Warning : this platform as not been tested
checking for getifaddrs()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/data/data/com.termux/files/usr/bin/$(RUBY_BASE_NAME)
/data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:765:in `try_func'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:1051:in `block in have_func'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:1050:in `have_func'
from extconf.rb:43:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/gem_make.out
Any solutions in mind?
BTW Thanks for your time, I appreciate anyone who tries to help.

[Project] HuamiWatchfaces based custom watchfaces [Pace/Stratos] (APK not WFZ) v0.1

Custom Watchfaces for the Amazfit Pace/Stratos
Spun off from this thread New watchface for the Amazfit watch
So I wanted to fix the custom watchfaces that were looking really cool and don't work with the WFZ system so here is how to do it.
Disclaimers:
I am not an Android or Java developer, so expect some rookie mistakes (I usually do C#)
If you do this it is at your own risk!
I do not provide the original Huami APK/odex files. You will have to source them your self.
I also do not have a Pace, only a Stratos so this is not tested on the Pace.
Credit where credit is due
I did not come up with any of this, I just fixed it to work with the latest HuamiWatchFaces code.
Most of the credit goes to Manual Alvarez (manvel7650) whose code is here.
And the original thread at XDA Developers here
The other watchfaces come from Fabio Barbon(DrBourbon) whose code is here
Known Issues
Fixed for now!!!
Prerequisites
Currently you will need to be able to build this code and have the original Huami code to build against.
Android Studio
Android SDK version 21 (Android Studio should prompt you)
ADB (should come with Android Studio)
The HuamiWatchFaces.odex or HuamiWatchFaces2.odex from you watch (read below)
An older HuamiWatchFaces.odex (read below)
oat2dex (here)
dex2jar (here
This repo
Getting the HuamiWatchFaces files
To get the odex files needed for your watch, connect it via USB.
Then use a terminal/console to:
For Pace
adb pull /system/app/HuamiWatchFaces/mips/HuamiWatchFaces.odex
To streamline the instructions further rename the downloaded file to HuamiWatchFaces2.odex
For Statos
adb pull /system/app/HuamiWatchFaces/mips/HuamiWatchFaces2.odex
Then you will need an older one, i suggest downloading the APK from here. The link is below the image.
Converting the files to jars
You will need to convert the odex and dex files in to JAR files so the code can build against it.
java -jar oat2dex.jar -a 22 odex HuamiWatchFaces2.odex
d2j-dex2jar.sh HuamiWatchFaces2.dex
You should see some GLITCH: zero-width instruction messages
One of them is HardwareList, this is a problem and we will fix it.
Make sure the result is named HuamiWatchFaces2.jar (rename if not)
Now get the older HuamiWatchFaces file. Open the APK with something like 7Zip and extract the classes.dex and then:
d2j-dex2jar.sh classes.dex
Now you should have 2 jar files, the HuamiWatchFaces2.jar and probably classes-dex2jar.jar.
Open both of them with something like 7Zip again don’t extract them, just open and go to com\ingenic\iwds in both.
In your target jar (HuamiWatchFaces2) delete the HardwareList.class, and in your donor (classes-dex2jar) extract the HardwareList.class.
NEW In your target jar (HuamiWatchFaces2) also delete com\huami\watch\watchface\slpt\Lock\LowPowerClock.class
Now place the HardwareList.class in your target jar so it looks the same as before but now with the HardwareList.class from your donor.
Great! You should now have a working HuamiWatchFaces2.jar.
Building the repo
If you haven’t already, clone the repo to your PC.
Now take your HuamiWatchFaces2.jar and place it in app\src\main\java\es\malvarez\mywatchfaces\libs.
Open the project with Android Studio and build the project with gradle (click the hammer icon in the top left bar).
This should complete with no errors.
You should now have the APK in app\build\outputs\apk.
Installing the APK
adb install app/build/outputs/apk/debug/app-debug.apk
Or you can take the release one.
After installing you should have these watchfaces
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Reserved.
I don't mean to sound like a noob, but is there an easier method to doing this?
I have 0 knowledge of android studio and coding in general and I'm struggling with this a little bit. I got to converting the odex to dex file and gave up haha.
I really like your watchface though and I appreciate the effort
@x3malex
I completely understand and it is in the plans. The biggest issue is that I can only make it for Windows easily at the moment and it is a bit dependent on 7zip.
It would be a powershell script in the first version.
The reason it's not high on the priority list right now is the lockscreen issue. I want to fix that first.
Currently it is a bit one step forward, two steps backwards as it is a bit of a hassle to debug because the watch won't lock when connect via usb to logcat.
When that is fixed I will start working on a more automated solution.
So, I fixed the lockscreen issue finally (at least I think I did this time). It seems to work nicely now.
The bad news is I had to add a (slightly) modified file from the original assemblies, I don't like that and hopefully fix that soon. This also means you need to remove that from the JAR file, the same as with HardwareList.
The next step is automate most of the procedure, but the first version will be Windows only. Sorry about that.
Edit: My github readme.md is being difficult. The enters after most of the important text are not showing. Strange thing is that it works in my local text editors (including Android Studio) and dillinger.io... So if anyone knows how to fix that, please.
LOTG said:
So, I fixed the lockscreen issue finally (at least I think I did this time). It seems to work nicely now.
The bad news is I had to add a (slightly) modified file from the original assemblies, I don't like that and hopefully fix that soon. This also means you need to remove that from the JAR file, the same as with HardwareList.
The next step is automate most of the procedure, but the first version will be Windows only. Sorry about that.
Click to expand...
Click to collapse
Just to let you know, I've had no DMCA requests (or any complaints at all) for uploading reversed and repackaged JAR files for the launcher to create homescreen pages, so I doubt they'd do it for watchfaces either
You can also remove unused classes from the JAR file, which makes any watchfaces created with it smaller
And if you use powershell, it means you use dotnet.
Did you know that with dotnet core 2 you can write sw that runs on Windows,Linux and mac?
If you need help with that, just contact me
@Quinny899
I'l think about it, and I'll look into unneeded files. Any easy way to check? Android Studio was pretty sure that LowPowerClock was not needed, but it disagreed with that while trying to run it. The dependency chain is not great.
I think the best solution overall would be to ditch the whole Huami system and build a new watch face system on top of the low-level stuff. This also leaves the door open for a new XML based watch face system. However, that is quite time-consuming (and who has time nowadays) and to do that I would rather use a language and environment I'm more familiar with.
@fzelle
Yes, I've build some software in .net core 2.0, but the problem is you will need to install the runtime for it. Not a big issue for Windows (I think it get's pushed through Windows Update), but Mac/Linux users might not be as enthusiastic. So I'm thinking about trying to create a bash variant. I'll need to look into a test setup for that though.
@Quinny899
I'l think about it, and I'll look into unneeded files. Any easy way to check? Android Studio was pretty sure that LowPowerClock was not needed, but it disagreed with that while trying to run it. The dependency chain is not great.
I think the best solution overall would be to ditch the whole Huami system and build a new watch face system on top of the low-level stuff. This also leaves the door open for a new XML based watch face system. However, that is quite time-consuming (and who has time nowadays) and to do that I would rather use a language and environment I'm more familiar with.
@fzelle
Yes, I've build some software in .net core 2.0, but the problem is you will need to install the runtime for it. Not a big issue for Windows (I think it get's pushed through Windows Update), but Mac/Linux users might not be as enthusiastic. So I'm thinking about trying to create a bash variant. I'll need to look into a test setup for that though.
LOTG said:
@Quinny899
I'l think about it, and I'll look into unneeded files. Any easy way to check? Android Studio was pretty sure that LowPowerClock was not needed, but it disagreed with that while trying to run it. The dependency chain is not great.
I think the best solution overall would be to ditch the whole Huami system and build a new watch face system on top of the low-level stuff. This also leaves the door open for a new XML based watch face system. However, that is quite time-consuming (and who has time nowadays) and to do that I would rather use a language and environment I'm more familiar with.
@fzelle
Yes, I've build some software in .net core 2.0, but the problem is you will need to install the runtime for it. Not a big issue for Windows (I think it get's pushed through Windows Update), but Mac/Linux users might not be as enthusiastic. So I'm thinking about trying to create a bash variant. I'll need to look into a test setup for that though.
Click to expand...
Click to collapse
I checked manually but there aren't a huge amount of classes required for the pages. Use jd-gui to view the jar and note down which classes are used, delete those that aren't
@LOTG
I don't think that it's that hard to install on linux or mac, did the same for a modified AmazfitExporter ( the phone db, not the pace db ).
https://github.com/FZelle/Amazfit_CoreExporter
Could not find below step
unable to find the lowpowerclock.class in the step "NEW In your target jar (HuamiWatchFaces2) also delete com\huami\watch\watchface\slpt\Lock\LowPowerClock. class "
but i tried with the jar and the code base given. I am getting below error
Information:Gradle tasks [:app:assembleDebug]
Warning:The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (26.0.2) for Android Gradle Plugin 3.0.1.
Android SDK Build Tools 26.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\com\ravenliquid\watchfaces\Utility.java
Error3, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error4, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error5, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error6, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error16, 52) error: cannot find symbol class SlptLayout
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\widget\HasSlptViewComponent.java
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\AbstractWatchFace.java
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\AbstractWatchFaceSlpt.java
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\data\MultipleWatchDataListenerAdapter.java
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\MalvarezWatchFace.java
Error3, 33) error: package com.huami.watch.watchface does not exist
Error24, 31) error: cannot find symbol class AbstractSlptClock
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\MalvarezWatchFaceSplt.java
Error3, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\widget\CirclesWidget.java
Error11, 38) error: package com.huami.watch.watchface.util does not exist
Error12, 38) error: package com.ingenic.iwds.slpt.view.arc does not exist
Error13, 38) error: package com.ingenic.iwds.slpt.view.arc does not exist
Error14, 38) error: package com.ingenic.iwds.slpt.view.arc does not exist
Error15, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error16, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error17, 40) error: package com.ingenic.iwds.slpt.view.sport does not exist
Error18, 40) error: package com.ingenic.iwds.slpt.view.sport does not exist
Error19, 40) error: package com.ingenic.iwds.slpt.view.sport does not exist
Error20, 40) error: package com.ingenic.iwds.slpt.view.utils does not exist
Error253, 17) error: cannot find symbol class SlptViewComponent
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\widget\HeartRateWidget.java
Error9, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error10, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error11, 40) error: package com.ingenic.iwds.slpt.view.sport does not exist
Error67, 17) error: cannot find symbol class SlptViewComponent
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\widget\MalvarezClock.java
Error9, 38) error: package com.huami.watch.watchface.util does not exist
Error10, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error11, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error12, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error13, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error14, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error15, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error16, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error17, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error18, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error19, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error20, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error21, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error22, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error23, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error24, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error25, 40) error: package com.ingenic.iwds.slpt.view.sport does not exist
Error26, 40) error: package com.ingenic.iwds.slpt.view.utils does not exist
Error109, 17) error: cannot find symbol class SlptViewComponent
........ deleted last few error lines .........
@suryateja8
Could you provide me with some info about the files you are using? ( Pace/Stratos, firmware version).
@LOTG to use both libraries is only for stratos? Or pace need too?
LOTG said:
@suryateja8
Could you provide me with some info about the files you are using? ( Pace/Stratos, firmware version).
Click to expand...
Click to collapse
@LOTG, Till the step of getting the Jar file i was able to do exactly as mentioned by you. But the step you mentioned to remove the com\huami\watch\watchface\slpt\Lock\LowPowerClock. class, i did not find the path.
So I ignored that and continued to build the APK file. Then i got the attached error.
I am using Pace with ROM Version 1.3.6d
@suryateja8 It seems like the later Pace versions are different from the one I have (I don't have a Pace watch, only a Stratos). I'll try to get the files and see what needs to change for the Pace.
You need the file huamiwatchfaces.odex for latest versions of pacefield versions. But stockfield remains in old file.
LOTG said:
@suryateja8 It seems like the later Pace versions are different from the one I have (I don't have a Pace watch, only a Stratos). I'll try to get the files and see what needs to change for the Pace.
Click to expand...
Click to collapse
I was able to manage the build and compiled the apk successfully( need to fix some errors in the code though).
I have also updated the Time Text watch face to display like how we read time.
suryateja8 said:
I was able to manage the build and compiled the apk successfully( need to fix some errors in the code though).
I have also updated the Time Text watch face to display like how we read time.
Click to expand...
Click to collapse
If you need me to include something just let me know.
I've had a shortage of free time this last week, and I found out that the CN files do not play nice with the US FW for Stratos.
I hope to get all that fixed this week.
suryateja8 said:
I was able to manage the build and compiled the apk successfully( need to fix some errors in the code though).
I have also updated the Time Text watch face to display like how we read time.
Click to expand...
Click to collapse
I've compiled my version of the APK a few days ago but there is a bug in the FuzzyText watchface. It displays the fuzzy text only when the watch is unlocked ("Four o'clock"), then reverts back to a Numbers Text ("Zero Four Zero Zero") when the watch is locked.
Did you fix this issue?

[DEV][AAOS][GAS] Google Services on Android Automotive OS build

Hello, I'm looking for a way to use Google Automotive Services in my custom ROM.
My aim is to develop an application using privilage/system permissions (android.car.permission.CAR_INFO, android.permission.SYSTEM_ALERT_WINDOW, etc.) and Google API, but I can't see a way to install it on the official emulator.
For a start - I've downloaded 12.1 sources, built an SDK image and created an emulator. Then I've downloaded AAOS 12.1 emulator image with a Play Store.
Side note: I'd like to do the same with AAOS 13, but there is no official AAOS 13 emulator image with GAS so far.
Then I've found all apk packages present in the emulator system img file and absent in my image, sign them all with my platform key and install with adb install with "-g" switch.
The emulator starts but it just pretends to work.
Google Maps starts, but it can't read the GPS signal (I'm in the middle of the ocean )
I still see "The device isn't Play Protect certified" message, even when registered at https://www.google.com/android/uncertified/.
When trying to log into a Google Account, I can see "addAccount(com.google): java.lang.SecurityException: Cannot delegate to Service with different signature." exception thrown.
There are a lot of security-related errors in logs:
GooglePlayServices not available due to error 9
com.google.android.carassistant requires Google Play services, but their signature is invalid
java.lang.SecurityException: UID 10157 is not associated with a first party app!
File error accessing recents directory,
Tried to access the API:ViewConfiguration which needs to have proper configuration from a non-UI Context:[email protected]
Package com.android.car.activityresolver is not installed for any user, java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/lib64/libbluetooth_jni.so" needed or dlopened by "/apex/com.android.art/lib64/libnativeloader.so" is not accessible for the namespace "classloader-namespace"
java.lang.SecurityException: Caller com.google.android.gms needs to hold android.permission.SCHEDULE_EXACT_ALARM to set exact alarms.
and a lot more....
Side note: I've tried an another way - to install my app as a system one in the official emulator, but repacking those super images beat me .
What else should I do? Is there an easy way, like Open GApps for Automotive or how can I create my own GApps package?

Categories

Resources