Status Update
Comments
ji...@gmail.com <ji...@gmail.com> #2
I have not seen any information about it so just asking here to avoid opening another issue. It also seems that when generating APK with alpha 8 the dex is no more compressed in the APK and stored as is. Leading to way bigger APKs.
While this is not an issue when distributing via Play Store, this could have impact for all the other distribution channels. Is this a normal wanted change and we'll have to deal with it? Or is there some new parameter to control this?
mk...@google.com <mk...@google.com> #3
I can reproduce the originally reported issue of missing Baseline Profiles with AGP 8.0.0-alpha08.
To verify, check out the
ji...@gmail.com <ji...@gmail.com> #5 Restricted
ji...@gmail.com <ji...@gmail.com> #6
the location of the baseline profile has changed, it is now in dexopt folder instead of com.android.tools.build.profiles
please file a different bug for other issues so we can assign them correctly for each issue.
mk...@google.com <mk...@google.com> #7
There is no dexopt or any baseline profile related file in the generated aab. There is also nothing related to baseline profile in APK generated with AGP 8.0.
Can you please verify, keep the issue opened and provide a solution?
ji...@gmail.com <ji...@gmail.com> #8
As a side note I do use:
android.experimental.enableNewResourceShrinker.preciseShrinking=true
And
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:shrinkMode="strict" />
So maybe depending on when the baseline is packaged it's removed, but in all case it's not working currently so not really WAI.
ap...@google.com <ap...@google.com> #9
It's not working either for me. And I don't have android.experimental.enableNewResourceShrinker.preciseShrinking=true
and tools:shrinkMode='strict'
ap...@google.com <ap...@google.com> #10
Still happening with AGP 8.0.0-alpha09. Release build apk don't include baseline profile in assets/dexopt/
ap...@google.com <ap...@google.com> #11
When they quickly close like that without checking on most part of the tracker anything written after is just plain ignored..
Need to reopen an issue, since no access to proper category hope again that triage put it in the proper place then hope that this time it's properly read.
If only all the parts could be like the R8/D8 part of this issue tracker.
ap...@google.com <ap...@google.com> #12
Scott, can you have a look if modifying an app according to
ap...@google.com <ap...@google.com> #13
I'm not able to reproduce.
Ben, the link to the repro project from
ap...@google.com <ap...@google.com> #14
Is there any logs I can provide from the build to help figure out?
ap...@google.com <ap...@google.com> #15
For the record also tested with A9 and there's the result on Windows.
Image is content of the aab (res and BUNDLE-METADATA)
And the result of a search on all the app folder including all the build dirs after the build
PS D:\_Gradle\Symfonik> Get-Childitem -Include *baseline* -Recurse
Directory: D:\_Gradle\Symfonik\app\src\main
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 29/11/2022 10:58 2114655 baseline-prof.txt
Directory: D:\_Gradle\Symfonik\benchmark\src\main\java\app\symfonik\benchmark
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 29/11/2022 10:48 baselineprofile
Directory: D:\_Gradle\Symfonik\benchmark\src\main\java\app\symfonik\benchmark\baselineprofile
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 29/11/2022 10:48 1231 BaselineProfileGenerator.kt
Reverting to A7 generates an aab that is 15k larger (the size of the baseline)
And the search after the build gives:
PS D:\_Gradle\Symfonik> Get-Childitem -Include *baseline* -Recurse
Directory: D:\_Gradle\Symfonik\app\build\intermediates\binary_art_profile\release
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 02/12/2022 20:17 14796 baseline.prof
Directory: D:\_Gradle\Symfonik\app\build\intermediates\binary_art_profile_metadata\release
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 02/12/2022 20:17 1805 baseline.profm
Directory: D:\_Gradle\Symfonik\app\build\intermediates\merged_art_profile\release
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 02/12/2022 20:12 2303810 baseline-prof.txt
Directory: D:\_Gradle\Symfonik\app\src\main
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 29/11/2022 10:58 2114655 baseline-prof.txt
Directory: D:\_Gradle\Symfonik\benchmark\src\main\java\app\symfonik\benchmark
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 29/11/2022 10:48 baselineprofile
Directory: D:\_Gradle\Symfonik\benchmark\src\main\java\app\symfonik\benchmark\baselineprofile
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 29/11/2022 10:48 1231 BaselineProfileGenerator.kt
So the files are properly generated in binary_art_profile
for A7 and completely missing in A8 / A9. This does not sound like a packaging issue (Same behavior without the options from #8) but more a missing generation step.
This is a full compose app, no jetifier, minsdk 28, no png generation, ultra optimized everywhere I can, so maybe the build step depends on a step that is missing now?
ap...@google.com <ap...@google.com> #16
Thanks. I'm able to repro now with the correct link
ji...@gmail.com <ji...@gmail.com> #17
It looks like this was caused by Change-Id: I68ab3a6f342327cfb4c5477f85941fa3a6434a81. When I revert that change, the issue goes away. Working on a fix...
Description
java.lang.ClassCastException: sg.bigo.live.ppi cannot be cast to sg.bigo.live.asd
at sg.bigo.live.c7q.get(Unknown Source:2)
at sg.bigo.live.xka.d(Unknown Source:11)
at sg.bigo.live.kka.u(Unknown Source:8)
at com.yy.iheima.startup.SplashAdvertView.onAttachedToWindow(SplashAdvertView.java:17)
at android.view.View.dispatchAttachedToWindow(View.java:20894)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3539)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2799)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2305)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9133)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1232)
at android.view.Choreographer.doCallbacks(Choreographer.java:1029)
at android.view.Choreographer.doFrame(Choreographer.java:934)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1217)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:233)
at android.os.Looper.loop(Looper.java:344)
at android.app.ActivityThread.main(ActivityThread.java:8212)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
jadx disassemble result:
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import android.util.Base64;
import com.google.android.gms.internal.p001firebaseauthapi.zzwe;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.List;
import sg.bigo.live.t8l;
/* loaded from: classes.dex */
public class c7q implements asd, etr {
public static volatile c7q y;
public Object z;
public /* synthetic */ c7q(Context context) {
this.z = new HashMap();
this.z = context;
}
public /* synthetic */ c7q(Object obj, Object obj2) {
this.z = obj;
this.z = obj2;
}
public /* synthetic */ c7q(String str) {
this.z = new Intent();
this.z = str;
}
public /* synthetic */ c7q(asd asdVar, esd esdVar) {
this.z = asdVar;
this.z = esdVar;
}
public static c7q z(Context context) {
if (context == null) {
nwp.e("[TinyDataManager]:mContext is null, TinyDataManager.getInstance(Context) failed.");
return null;
}
if (y == null) {
synchronized (c7q.class) {
if (y == null) {
y = new c7q(context);
}
}
}
return y;
}
public void a(Context context) {
Class<?> x = t8l.y.z.x((String) this.z);
if (x != null) {
((Intent) this.z).setClass(context, x);
Intent intent = (Intent) this.z;
if (intent == null || intent.getComponent() == null) {
return;
}
Class[] l0 = qc.l0(x);
if (l0 != null && l0.length != 0) {
qc.I(intent);
if (context instanceof p17) {
new sg.bigo.mobile.android.srouter.api.interceptor.y(context, x, intent, -1).z();
return;
}
qc.g1(intent);
}
qc.v1(context, intent, -1, x);
}
}
public void b(Activity activity, int i) {
Class<?> x = t8l.y.z.x((String) this.z);
if (x != null) {
((Intent) this.z).setClass(activity, x);
Intent intent = (Intent) this.z;
if (intent == null || intent.getComponent() == null) {
return;
}
Class[] l0 = qc.l0(x);
if (l0 != null && l0.length != 0) {
qc.I(intent);
if (activity instanceof p17) {
new sg.bigo.mobile.android.srouter.api.interceptor.y(activity, x, intent, i).z();
return;
}
qc.g1(intent);
}
qc.v1(activity, intent, i, x);
}
}
@Override // sg.bigo.live.asd
public ft2 get(Object obj) {
ft2 ft2Var = ((asd) this.z).get(obj);
if (ft2Var == null) {
((esd) this.z).p();
} else {
((esd) this.z).c(obj);
}
return ft2Var;
}
public boolean u(
if (TextUtils.isEmpty(str)) {
nwp.w("pkgName is null or empty, upload ClientUploadDataItem failed.");
return false;
} else if (yyp.v(hnVar, false)) {
return false;
} else {
if (TextUtils.isEmpty(hnVar.d())) {
hnVar.f(yyp.y());
}
hnVar.g(str);
ozp.z((Context) this.z, hnVar);
return true;
}
}
@Override // sg.bigo.live.asd
public boolean v(rsh rshVar) {
return ((asd) this.z).v(rshVar);
}
@Override // sg.bigo.live.asd
public ft2 w(Object obj, ft2 ft2Var) {
((esd) this.z).k();
return ((asd) this.z).w(obj, ft2Var);
}
@Override // sg.bigo.live.etr
public void x(Object obj) {
bur burVar = (bur) obj;
String str = burVar.z;
msh.u(str);
List i = new com.google.android.gms.internal.p001firebaseauthapi.y(new du1(new kbr())).i(str);
if (i.size() < 2) {
throw new RuntimeException("Invalid idToken ".concat(str));
}
String str2 = (String) i.get(1);
try {
uur z = uur.z(new String(str2 == null ? null : Base64.decode(str2, 11), "UTF-8"));
zzwe zzweVar = new zzwe(burVar.y, burVar.z, Long.valueOf(z.y.longValue() - z.z.longValue()), "Bearer");
Object obj2 = this.z;
jqr.a((jqr) obj2, zzweVar, null, Boolean.FALSE, (b3r) obj2, this);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("Unable to decode token", e);
}
}
@Override // sg.bigo.live.asd
public int y(rsh rshVar) {
return ((asd) this.z).y(rshVar);
}
@Override // sg.bigo.live.etr
public void zza(String str) {
((b3r) this.z).y(xoq.z(str));
}
}