RK平台第一次开机速度优化 “Large app, accepted running with swap.“

news2024/11/24 2:01:53

RK平台第一次开机速度优化 "Large app, accepted running with swap."

  • 问题描述
  • 解决方法

郑重声明:本人原创博文,都是实战,均经过实际项目验证出货的
转载请标明出处:攻城狮2015

Platform: Rockchip
OS:Android 6.0.1
CPU:3368
Kernel: 3.10

问题描述

最近遇到个问题,系统刷完机后,第一次开机,时间超级久,久到离谱,需要8分钟多,才能开机。生产那边先太浪费时间。先需要优化开机时间。

解决方法

1.优化开机时间,有很多种方法,但是优化第一次开机时间,先得知道第一次开机,是解包各种服务apk,加载出资源文件。
2.查找第一次开机时间久的根本原因是什么导致的。
3.怎么进行第一次开机时间优化。

1.经过排查发现,以前的固件开机时间是4-5分钟,经过排查发现,时间变长是加了gms
2.同时查看logcat信息进一步论证这个gms导致
logcat信息
01-21 17:55:58.134 I/dex2oat ( 1902): Starting dex2oat.
01-21 17:56:00.816 I/dex2oat ( 1902): Large app, accepted running with swap.
01-21 17:56:21.144 W/dex2oat ( 1902): Verification of void bpk.a(byte[], byte[]) took 134.308ms
01-21 17:56:21.158 W/dex2oat ( 1902): Verification of void bpl.a(byte[], byte[]) took 146.379ms
01-21 17:56:21.194 W/dex2oat ( 1902): Verification of void bpp.a(byte[], byte[]) took 159.406ms
01-21 17:56:21.199 W/dex2oat ( 1902): Verification of void bpq.a(byte[], byte[]) took 151.839ms
01-21 17:56:21.232 W/dex2oat ( 1902): Verification of void bpr.a(byte[], byte[]) took 145.564ms
01-21 17:56:21.292 W/dex2oat ( 1902): Verification of void bps.a(byte[], byte[]) took 180.747ms
01-21 17:56:21.342 W/dex2oat ( 1902): Verification of void bpt.a(byte[], byte[]) took 138.764ms
01-21 17:56:21.342 W/dex2oat ( 1902): Verification of void bpu.a(byte[], byte[]) took 133.535ms
01-21 17:56:21.470 W/dex2oat ( 1902): Verification of void bpv.a(byte[], byte[]) took 149.697ms
01-21 17:56:23.915 W/dex2oat ( 1902): Verification of void com.google.android.gms.ads.settings.util.e.a(byte[], byte[]) took 119.681ms
01-21 17:56:23.926 W/dex2oat ( 1902): Verification of void com.google.android.gms.ads.settings.util.k.a(byte[], byte[]) took 104.842ms
01-21 17:56:23.943 W/dex2oat ( 1902): Verification of void com.google.android.gms.ads.settings.util.g.a(byte[], byte[]) took 145.134ms
01-21 17:56:23.944 W/dex2oat ( 1902): Verification of void com.google.android.gms.ads.settings.util.j.a(byte[], byte[]) took 141.547ms
01-21 17:56:24.024 W/dex2oat ( 1902): Verification of void com.google.android.gms.ads.settings.util.l.a(byte[], byte[]) took 139.246ms
01-21 17:56:24.144 W/dex2oat ( 1902): Verification of void com.google.android.gms.ads.settings.util.p.a(byte[], byte[]) took 147.684ms
01-21 17:56:24.154 W/dex2oat ( 1902): Verification of void com.google.android.gms.ads.settings.util.o.a(byte[], byte[]) took 158.976ms
01-21 17:56:24.202 W/dex2oat ( 1902): Verification of void com.google.android.gms.ads.settings.util.q.a(byte[], byte[]) took 176.876ms
01-21 17:56:31.786 W/dex2oat ( 1902): Verification of void jik.<clinit>() took 213.807ms
01-21 17:56:48.975 W/dex2oat ( 1902): Compilation of void aiqz.a(long, aipc) took 114.497ms
01-21 17:56:49.131 W/dex2oat ( 1902): Compilation of void aiud.a(double[]) took 112.384ms
01-21 17:56:49.978 W/dex2oat ( 1902): No verified method for method calling String.<init>: java.lang.String java.io.ByteArrayOutputStream.toString()
01-21 17:56:50.158 W/dex2oat ( 1902): Compilation of void ajrv.a_(java.util.List) took 104.426ms
01-21 17:56:50.689 W/dex2oat ( 1902): Compilation of ajmv akbn.a(ajnu, ajmf, ajml, ajmz, boolean) took 162.618ms
01-21 17:56:50.773 W/dex2oat ( 1902): Compilation of void akcl.a(akho, ajnu[], boolean) took 186.966ms
01-21 17:56:50.801 W/dex2oat ( 1902): Compilation of void akex.handleMessage(android.os.Message) took 117.777ms
01-21 17:56:51.652 W/dex2oat ( 1902): Compilation of int akvs.a(java.lang.String) took 111.694ms
01-21 17:56:52.552 W/dex2oat ( 1902): No verified method for method calling String.<init>: java.lang.String java.io.ByteArrayOutputStream.toString()
01-21 17:56:54.265 W/dex2oat ( 1902): Compilation of void android.support.v7.widget.LinearLayoutCompat.b(int, int) took 113.909ms
01-21 17:56:54.953 W/dex2oat ( 1902): Compilation of int anhz.computeSerializedSize() took 180.823ms
01-21 17:56:55.245 W/dex2oat ( 1902): Compilation of atdk anhz.mergeFrom(atcu) took 291.950ms
01-21 17:56:55.423 W/dex2oat ( 1902): Compilation of void anhz.writeTo(atcv) took 177.030ms
[  299.700588]  [2:        healthd:  179] healthd: battery l=66 v=3800 t=22.0 h=2 st=2 c=1000 chg=a 2013-01-21 08:56:56.133308810 UTC
01-21 17:56:56.761 W/dex2oat ( 1902): Compilation of atdk aofg.mergeFrom(atcu) took 107.456ms
01-21 17:56:56.885 W/dex2oat ( 1902): Compilation of atdk aogl.mergeFrom(atcu) took 101.662ms
01-21 17:56:58.878 W/dex2oat ( 1902): Compilation of atdk appj.mergeFrom(atcu) took 102.356ms
01-21 17:56:59.234 W/dex2oat ( 1902): Compilation of atdk aptd.mergeFrom(atcu) took 125.422ms
01-21 17:57:03.268 W/dex2oat ( 1902): Compilation of ancp ancp.a(atcu) took 9.596s
01-21 17:57:07.881 W/dex2oat ( 1902): Compilation of ancs ancs.a(atcu) took 14.205s
01-21 17:57:10.397 W/dex2oat ( 1902): Compilation of void arr.a() took 216.821ms
01-21 17:57:10.412 W/dex2oat ( 1902): Compilation of void aru.a() took 137.632ms
01-21 17:57:11.313 W/dex2oat ( 1902): Compilation of arw asn.a(asg) took 148.613ms
01-21 17:57:11.411 W/dex2oat ( 1902): Compilation of arw aso.a(asg) took 166.075ms
01-21 17:57:11.926 W/dex2oat ( 1902): Compilation of atdk asws.mergeFrom(atcu) took 132.919ms
01-21 17:57:12.421 W/dex2oat ( 1902): Compilation of java.lang.Object atfi.a(int, java.lang.Object, java.lang.Object) took 167.286ms
01-21 17:57:12.572 W/dex2oat ( 1902): Compilation of java.lang.Object atgq.a(int, java.lang.Object, java.lang.Object) took 216.826ms
01-21 17:57:14.697 W/dex2oat ( 1902): Compilation of atdk auqp.mergeFrom(atcu) took 170.475ms
01-21 17:57:14.983 W/dex2oat ( 1902): Compilation of atdk autn.mergeFrom(atcu) took 118.378ms
01-21 17:57:15.049 W/dex2oat ( 1902): Compilation of atdk aura.mergeFrom(atcu) took 483.842ms
01-21 17:57:16.872 W/dex2oat ( 1902): Compilation of byte[] bgr.a(bhc, bha, bdj) took 128.038ms
01-21 17:57:16.910 W/dex2oat ( 1902): Compilation of bbv bgo.a(bdy, bbu) took 160.020ms
01-21 17:57:19.803 W/dex2oat ( 1902): No verified method for method calling String.<init>: void org.json.JSONStringer.<init>(int)
01-21 17:57:20.353 W/dex2oat ( 1902): Compilation of org.json.JSONObject com.google.android.gms.ads.internal.request.service.k.a(com.google.android.gms.ads.internal.request.service.a) took 124.652ms
01-21 17:57:24.527 W/dex2oat ( 1902): Compilation of void com.google.android.gms.smart_profile.SmartProfileChimeraActivity.a(aakr) took 146.931ms
01-21 17:57:24.915 W/dex2oat ( 1902): Compilation of void com.google.android.gms.tapandpay.transaction.WalletTransactionDetailsChimeraActivity.e() took 175.284ms
01-21 17:57:25.774 W/dex2oat ( 1902): Compilation of int com.google.android.libraries.matchstick.net.MessagingService.onStartCommand(android.content.Intent, int, int) took 124.288ms
01-21 17:57:25.870 W/dex2oat ( 1902): Compilation of void com.google.android.libraries.matchstick.ui.MessageActivity.onCreate(android.os.Bundle) took 113.904ms
01-21 17:57:25.940 W/dex2oat ( 1902): Compilation of void com.google.android.libraries.matchstick.net.SilentRegisterIntentOperation.onHandleIntent(android.content.Intent) took 210.698ms
01-21 17:57:26.698 W/dex2oat ( 1902): Compilation of boolean koa.onTransact(int, android.os.Parcel, android.os.Parcel, int) took 105.669ms
01-21 17:57:28.900 W/dex2oat ( 1902): Compilation of erz ets.b(int, int) took 144.930ms
01-21 17:57:32.389 W/dex2oat ( 1902): Compilation of void hyt.a(aluz) took 154.715ms
01-21 17:57:35.984 W/dex2oat ( 1902): Compilation of boolean mri.onTransact(int, android.os.Parcel, android.os.Parcel, int) took 121.063ms
01-21 17:57:36.013 W/dex2oat ( 1902): Compilation of boolean nnu.onTransact(int, android.os.Parcel, android.os.Parcel, int) took 113.086ms
01-21 17:57:37.122 W/dex2oat ( 1902): Compilation of java.lang.Object muw.createFromParcel(android.os.Parcel) took 158.485ms
01-21 17:57:40.331 W/dex2oat ( 1902): Compilation of qfq qfq.a(ozu, aumq) took 146.844ms
01-21 17:57:40.654 W/dex2oat ( 1902): Compilation of void qkx.a(agab) took 101.214ms
01-21 17:57:40.673 W/dex2oat ( 1902): Compilation of boolean qnc.a(java.util.List, long, java.util.HashMap) took 142.439ms
01-21 17:57:41.997 W/dex2oat ( 1902): No verified method for method calling String.<init>: java.lang.String java.io.ByteArrayOutputStream.toString()
01-21 17:57:44.549 W/dex2oat ( 1902): Compilation of boolean trp.onTransact(int, android.os.Parcel, android.os.Parcel, int) took 142.427ms
01-21 17:57:44.954 W/dex2oat ( 1902): Compilation of uir[] udx.a(java.lang.String, uis[], uix[]) took 106.617ms
01-21 17:57:45.244 W/dex2oat ( 1902): Compilation of boolean ufv.a(java.lang.String, long) took 198.961ms
01-21 17:57:46.615 W/dex2oat ( 1902): Compilation of void vsf.d(kwd) took 106.149ms
01-21 17:57:46.949 W/dex2oat ( 1902): Compilation of vxw vvy.a(com.google.android.gms.plus.service.v2whitelisted.models.Person, vxw) took 310.881ms
01-21 17:57:46.987 W/dex2oat ( 1902): Compilation of boolean wba.onTransact(int, android.os.Parcel, android.os.Parcel, int) took 107.139ms
01-21 17:57:47.384 W/dex2oat ( 1902): Compilation of com.google.android.gms.common.data.DataHolder wmg.a(android.content.Context, java.lang.String, java.lang.String, java.lang.String, java.util.List, int, boolean, long, java.lang.String, int, int, int, boolean) took 112.329ms
01-21 17:57:49.215 W/dex2oat ( 1902): Compilation of java.lang.Object yai.createFromParcel(android.os.Parcel) took 144.272ms
01-21 17:57:50.273 W/dex2oat ( 1902): Compilation of java.lang.Object ywz.createFromParcel(android.os.Parcel) took 143.959ms
01-21 17:57:50.986 W/dex2oat ( 1902): Compilation of boolean zmq.a(long, int, byte[], int) took 134.921ms
[  358.744760]  [0:        healthd:  179] healthd: battery l=66 v=3800 t=22.0 h=2 st=2 c=1000 chg=a 2013-01-21 08:57:56.137474922 UTC
01-21 17:57:57.463 I/dex2oat ( 1902): dex2oat took 119.262s (threads: 8) arena alloc=180MB java alloc=44MB native alloc=259MB free=1221KB swap=80MB
01-21 17:57:57.659 I/PackageManager.DexOptimizer(  621): Running dexopt (dex2oat) on: /system/priv-app/GmsCore/GmsCore.apk pkg=com.google.android.gms isa=arm64 vmSafeMode=false debuggable=false oatDir = null bootComplete=false
01-21 17:57:57.744 I/dex2oat ( 1934): Starting dex2oat.
01-21 17:58:00.373 I/dex2oat ( 1934): Large app, accepted running with swap.
01-21 17:58:20.700 W/dex2oat ( 1934): Verification of void bpm.a(byte[], byte[]) took 101.411ms
01-21 17:58:20.721 W/dex2oat ( 1934): Verification of void bpk.a(byte[], byte[]) took 128.921ms
01-21 17:58:20.723 W/dex2oat ( 1934): Verification of void bpl.a(byte[], byte[]) took 128.119ms
01-21 17:58:20.739 W/dex2oat ( 1934): Verification of void bpq.a(byte[], byte[]) took 116.672ms
01-21 17:58:20.748 W/dex2oat ( 1934): Verification of void bpp.a(byte[], byte[]) took 129.126ms
01-21 17:58:20.839 W/dex2oat ( 1934): Verification of void bpr.a(byte[], byte[]) took 170.591ms
01-21 17:58:20.903 W/dex2oat ( 1934): Verification of void bps.a(byte[], byte[]) took 206.649ms
01-21 17:58:20.924 W/dex2oat ( 1934): Verification of void bpt.a(byte[], byte[]) took 125.802ms
01-21 17:58:20.928 W/dex2oat ( 1934): Verification of void bpu.a(byte[], byte[]) took 121.690ms
01-21 17:58:21.036 W/dex2oat ( 1934): Verification of void bpv.a(byte[], byte[]) took 148.830ms
01-21 17:58:23.016 W/dex2oat ( 1934): Verification of void com.google.android.gms.ads.settings.util.f.a(byte[], byte[]) took 106.027ms
01-21 17:58:23.020 W/dex2oat ( 1934): Verification of void com.google.android.gms.ads.settings.util.h.a(byte[], byte[]) took 108.827ms
01-21 17:58:23.024 W/dex2oat ( 1934): Verification of void com.google.android.gms.ads.settings.util.j.a(byte[], byte[]) took 109.112ms
01-21 17:58:23.026 W/dex2oat ( 1934): Verification of void com.google.android.gms.ads.settings.util.e.a(byte[], byte[]) took 115.909ms
01-21 17:58:23.162 W/dex2oat ( 1934): Verification of void com.google.android.gms.ads.settings.util.o.a(byte[], byte[]) took 107.766ms
01-21 17:58:23.179 W/dex2oat ( 1934): Verification of void com.google.android.gms.ads.settings.util.n.a(byte[], byte[]) took 130.419ms
01-21 17:58:27.413 W/dex2oat ( 1934): Verification of void jik.<clinit>() took 141.130ms
01-21 17:58:34.411 W/dex2oat ( 1934): Compilation of void absi.<init>(android.content.Context, java.lang.String, acat, acaz, abqg, abpx) took 170.564ms
01-21 17:58:36.973 W/dex2oat ( 1934): Compilation of java.lang.Integer aebr.b() took 165.151ms
01-21 17:58:38.438 W/dex2oat ( 1934): Compilation of int afft.a(java.lang.String, affu) took 106.839ms
01-21 17:58:42.761 W/dex2oat ( 1934): Compilation of void aiqz.a(long, aipc) took 107.033ms
01-21 17:58:42.951 W/dex2oat ( 1934): Compilation of void aiud.a(double[]) took 117.159ms
01-21 17:58:44.146 W/dex2oat ( 1934): No verified method for method calling String.<init>: java.lang.String java.io.ByteArrayOutputStream.toString()
01-21 17:58:45.017 W/dex2oat ( 1934): Compilation of ajmv akbn.a(ajnu, ajmf, ajml, ajmz, boolean) took 195.911ms
01-21 17:58:45.061 W/dex2oat ( 1934): Compilation of void akcl.a(akho, ajnu[], boolean) took 180.897ms
01-21 17:58:45.216 W/dex2oat ( 1934): Compilation of void akex.handleMessage(android.os.Message) took 148.265ms
01-21 17:58:45.911 W/dex2oat ( 1934): Compilation of void akpj.a(android.content.Intent, akno, boolean) took 100.537ms
01-21 17:58:46.056 W/dex2oat ( 1934): Compilation of void akpj.a(android.content.Intent) took 109.699ms
01-21 17:58:46.323 W/dex2oat ( 1934): Compilation of int akvs.a(java.lang.String) took 152.869ms
01-21 17:58:47.465 W/dex2oat ( 1934): No verified method for method calling String.<init>: java.lang.String java.io.ByteArrayOutputStream.toString()
01-21 17:58:47.665 W/dex2oat ( 1934): Compilation of java.lang.String alyl.b(arnx, java.lang.String, char[], char[], java.lang.String) took 128.561ms
01-21 17:58:49.898 W/dex2oat ( 1934): Compilation of void android.support.v7.widget.LinearLayoutCompat.b(int, int) took 181.323ms
01-21 17:58:50.212 W/dex2oat ( 1934): Compilation of void android.support.v7.widget.Toolbar.onLayout(boolean, int, int, int, int) took 110.205ms
01-21 17:58:50.945 W/dex2oat ( 1934): Compilation of int anhz.computeSerializedSize() took 247.999ms
01-21 17:58:50.947 W/dex2oat ( 1934): Compilation of atdk anij.mergeFrom(atcu) took 119.072ms
01-21 17:58:50.994 W/dex2oat ( 1934): Compilation of atdk anic.mergeFrom(atcu) took 230.311ms
01-21 17:58:51.286 W/dex2oat ( 1934): Compilation of atdk anhz.mergeFrom(atcu) took 341.142ms
01-21 17:58:51.498 W/dex2oat ( 1934): Compilation of void anhz.writeTo(atcv) took 210.761ms
01-21 17:58:53.131 W/dex2oat ( 1934): Compilation of atdk aocz.mergeFrom(atcu) took 121.239ms
01-21 17:58:53.555 W/dex2oat ( 1934): Compilation of atdk aogl.mergeFrom(atcu) took 144.003ms
[  417.780968]  [0:        healthd:  179] healthd: battery l=66 v=3800 t=22.0 h=2 st=2 c=1000 chg=a 2013-01-21 08:58:56.133689534 UTC
01-21 17:58:57.055 W/dex2oat ( 1934): Compilation of atdk aptd.mergeFrom(atcu) took 144.996ms
01-21 17:58:59.750 W/dex2oat ( 1934): Compilation of ancp ancp.a(atcu) took 10.838s
01-21 17:59:04.337 W/dex2oat ( 1934): Compilation of ancs ancs.a(atcu) took 15.411s
01-21 17:59:06.932 W/dex2oat ( 1934): Compilation of void arr.a() took 108.086ms
01-21 17:59:08.211 W/dex2oat ( 1934): Compilation of arw asn.a(asg) took 217.214ms
01-21 17:59:08.221 W/dex2oat ( 1934): Compilation of arw aso.a(asg) took 149.905ms
01-21 17:59:08.393 W/dex2oat ( 1934): Compilation of atdk asrg.mergeFrom(atcu) took 112.652ms
01-21 17:59:09.566 W/dex2oat ( 1934): Compilation of java.lang.Object atgq.a(int, java.lang.Object, java.lang.Object) took 215.763ms
01-21 17:59:11.893 W/dex2oat ( 1934): Compilation of atdk auqp.mergeFrom(atcu) took 162.988ms
01-21 17:59:12.466 W/dex2oat ( 1934): Compilation of atdk aura.mergeFrom(atcu) took 739.597ms
01-21 17:59:14.286 W/dex2oat ( 1934): Compilation of bbv bgo.a(bdy, bbu) took 100.652ms
01-21 17:59:14.322 W/dex2oat ( 1934): Compilation of bbk bgp.a(bhl, bbi) took 132.441ms
01-21 17:59:14.393 W/dex2oat ( 1934): Compilation of byte[] bgr.a(bhc, bha, bdj) took 181.423ms
01-21 17:59:16.431 W/dex2oat ( 1934): Compilation of void com.google.android.chimera.container.ConfigurationManager.checkConfiguration(android.content.Context, java.util.List, java.util.List, java.util.List, java.lang.String, boolean) took 115.588ms
01-21 17:59:17.578 W/dex2oat ( 1934): No verified method for method calling String.<init>: void org.json.JSONStringer.<init>(int)
01-21 17:59:18.086 W/dex2oat ( 1934): Compilation of java.lang.Object com.google.android.gms.ads.internal.request.s.createFromParcel(android.os.Parcel) took 107.397ms
01-21 17:59:18.217 W/dex2oat ( 1934): Compilation of org.json.JSONObject com.google.android.gms.ads.internal.request.service.k.a(com.google.android.gms.ads.internal.request.service.a) took 165.495ms
01-21 17:59:22.818 W/dex2oat ( 1934): Compilation of void com.google.android.gms.smart_profile.SmartProfileChimeraActivity.a(aakr) took 114.144ms
01-21 17:59:23.229 W/dex2oat ( 1934): Compilation of void com.google.android.gms.tapandpay.transaction.WalletTransactionDetailsChimeraActivity.e() took 139.000ms
01-21 17:59:24.221 W/dex2oat ( 1934): Compilation of int com.google.android.libraries.matchstick.net.MessagingService.onStartCommand(android.content.Intent, int, int) took 100.004ms
01-21 17:59:24.390 W/dex2oat ( 1934): Compilation of void com.google.android.libraries.matchstick.net.SilentRegisterIntentOperation.onHandleIntent(android.content.Intent) took 166.432ms
01-21 17:59:27.742 W/dex2oat ( 1934): Compilation of erz ets.b(int, int) took 181.343ms
01-21 17:59:31.601 W/dex2oat ( 1934): Compilation of void hyt.a(aluz) took 163.388ms
01-21 17:59:32.042 W/dex2oat ( 1934): Compilation of void ihb.a(android.content.Context) took 104.311ms
01-21 17:59:36.862 W/dex2oat ( 1934): Compilation of java.lang.Object muw.createFromParcel(android.os.Parcel) took 156.758ms
01-21 17:59:38.533 W/dex2oat ( 1934): Compilation of java.lang.Object ols.createFromParcel(android.os.Parcel) took 132.922ms
01-21 17:59:40.484 W/dex2oat ( 1934): Compilation of qfq qfq.a(ozu, aumq) took 172.336ms
01-21 17:59:40.823 W/dex2oat ( 1934): Compilation of void qkx.a(agab) took 121.655ms
01-21 17:59:40.838 W/dex2oat ( 1934): Compilation of boolean qnc.a(java.util.List, long, java.util.HashMap) took 125.827ms
01-21 17:59:42.287 W/dex2oat ( 1934): No verified method for method calling String.<init>: java.lang.String java.io.ByteArrayOutputStream.toString()
01-21 17:59:45.102 W/dex2oat ( 1934): Compilation of boolean trp.onTransact(int, android.os.Parcel, android.os.Parcel, int) took 135.513ms
01-21 17:59:45.889 W/dex2oat ( 1934): Compilation of boolean ufv.a(java.lang.String, long) took 189.110ms
01-21 17:59:47.492 W/dex2oat ( 1934): Compilation of void vsf.d(kwd) took 144.741ms
01-21 17:59:47.709 W/dex2oat ( 1934): Compilation of vxw vvy.a(com.google.android.gms.plus.service.v2whitelisted.models.Person, vxw) took 218.930ms
01-21 17:59:47.835 W/dex2oat ( 1934): Compilation of java.lang.Object vzb.createFromParcel(android.os.Parcel) took 122.351ms
01-21 17:59:47.914 W/dex2oat ( 1934): Compilation of boolean wba.onTransact(int, android.os.Parcel, android.os.Parcel, int) took 148.665ms
01-21 17:59:50.360 W/dex2oat ( 1934): Compilation of java.lang.Object yai.createFromParcel(android.os.Parcel) took 138.632ms

可以很清楚的看到dex2oat 解包gms相关的apk,花费好多时间。
下面就是如何处理这个dex2oat问题

+++ b/device/rockchip/common/BoardConfig.mk
# Enable dex-preoptimization to speed up first boot sequence
ifeq ($(HOST_OS),linux)
  ifeq ($(TARGET_BUILD_VARIANT),user)
    ifeq ($(WITH_DEXPREOPT),)
      WITH_DEXPREOPT ?= true
    endif
  endif
endif

要么使用user模式编译系统,要么强行WITH_DEXPREOPT ?= true
可以让系统第一次开机时间缩短到2分钟之内

另外对单个apk进行开机速度优化方法如下

apk目录下的Android.mk中添加
LOCAL_DEX_PREOPT :=true,表示优化该apk
LOCAL_DEX_PREOPT :=false,表示不优化
另外可以在系统编译dex_preopt_odex_install.mk对apk加LOCAL_DEX_PREOPT :=
+ifeq ($(LOCAL_MODULE),helloworld)
+LOCAL_DEX_PREOPT:= true//false
+endif

built_odex :=
installed_odex :=
built_installed_odex :=

这样,就可以在out目录apk的目录生成oat目录

郑重声明:本人原创博文,都是实战,均经过实际项目验证出货的
转载请标明出处:攻城狮2015
有需要可以加VX
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1528408.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Elasticsearch:使用 OpenAI、LangChain 和 Streamlit 的基于 LLM 的 PDF 摘要器和 Q/A 应用程序

嘿&#xff01; 您是否曾经感觉自己被淹没在信息的海洋中&#xff1f; 有这么多的书要读&#xff0c;而时间却这么少&#xff0c;很容易就会超负荷&#xff0c;对吧&#xff1f; 但猜猜怎么了&#xff1f; 你可以使用大型语言模型创建自定义聊天机器人&#xff0c;该模型可以帮…

重磅升级!P230焕新而来,支持双目SLAM+YOLO点击跟踪,算力高达100TOPS

全新升级的Prometheus 230科研无人机&#xff08;简称P230&#xff09;是一款专为科研工作者及开发者设计的小型&#xff08;250mm轴距&#xff09;无人机实验平台。机载计算机升级为算力100TOPS的Allspark2-Orin NX&#xff0c;结合Prometheus自主无人机开源项目和Prometheus专…

H4010耐压40V降压恒压芯片 40V降12V降5V 支持电流2.5A

H4010是一种内置30V耐压MOS&#xff0c;并且能够实现精确恒压以及恒流的同步降压型 DC-DC 转换器&#xff1b; 支持 1A 持续输出电流输出电压可调&#xff0c;最大可支持 100%占空比&#xff1b;通过调节 FB 端口的分压电阻&#xff0c;可以输出 2.5V到 22V 的稳定电压 。H4010…

一文快速掌握docker的理念和基本使用

写在文章开头 写于一个周末&#xff0c;在复盘梳理文章时候发现这一篇关于早期了解docker时记录的文档&#xff0c;仔细阅读了一下&#xff0c;为了保证文章更加清晰以便读者使用。故再次重新一次梳理一次&#xff0c;通过这篇文章&#xff0c;你将会对docker的基本理念和基础…

Machine Learning ---- Gradient Descent

目录 一、The concept of gradient&#xff1a; ① In a univariate function&#xff1a; ②In multivariate functions&#xff1a; 二、Introduction of gradient descent cases&#xff1a; 三、Gradient descent formula and its simple understanding: 四、Formula o…

GPIO和Pinctrl子系统的使用

一、 Pinctrl子系统 1、基本架构 现在的芯片动辄几百个引脚&#xff0c;在使用到GPIO功能时&#xff0c;让你一个引脚一个引脚去找对应的寄存器&#xff0c;说实话很烦。所以&#xff0c;要把引脚的复用、配置抽出来&#xff0c;做成Pinctrl子系统&#xff0c;给GPIO、UART等模…

2082.找单词

动态规划问题&#xff1a; 先声明两个数组&#xff1a; 数组 a&#xff1a;存储当前状态下&#xff0c;所有可能的单词价值总和的计数。在每次迭代开始时&#xff0c;我们使用 a 数组来跟踪包含当前字母之前的所有可能单词的价值总和。 数组 b&#xff1a;在处理每个字母时&a…

XMind for mac/Win:解锁思维新境界,让思维导图成为你的创意引擎

在信息爆炸的时代&#xff0c;如何高效地整理思绪、捕捉灵感&#xff0c;成为每个人都需要面对的挑战。而XMind&#xff0c;作为一款功能强大的思维导图软件&#xff0c;正以其独特的魅力&#xff0c;帮助无数用户解锁思维新境界&#xff0c;让思维导图成为他们的创意引擎。 无…

idea远程试调jar、远程试调war

idea远程试调jar、远程试调war 目的&#xff1a;测试运行时与ide开发时是否一致。 配置jar Maven中添加 <packaging>jar</packaging>将其打包为jar。 设置运行入口main 编译jar 看到jar输出 配置试调 添加jar运行 远程试调 先在源码中打好断点试调 debug运行…

String类型详解

1. Java为何要创造String类 在C语言中,是没有String这个类型的,通常使用字符数组中存放一个个字符,再加上最后一个\0来表示/存放一个字符串.也可以使用一个字符指针指向字符串的首元素,直到遇到\0停止,再加上C语言头文件string.h中封装的函数,对于字符串的操作已经够用了. Java…

Learn OpenGL 18 几何着色器

几何着色器 在顶点和片段着色器之间有一个可选的几何着色器(Geometry Shader)&#xff0c;几何着色器的输入是一个图元&#xff08;如点或三角形&#xff09;的一组顶点。几何着色器可以在顶点发送到下一着色器阶段之前对它们随意变换。然而&#xff0c;几何着色器最有趣的地方…

入门:Vue全家桶都有谁,分别肩负什么责任?

当使用Vue.js开发项目时&#xff0c;通常会使用Vue全家桶来提供完整的开发工具和功能。以下是Vue全家桶的各个部分的详细介绍&#xff1a; 项目构建工具 - Vue-cli&#xff1a; Vue-cli是Vue.js官方提供的脚手架工具&#xff0c;可以快速生成一个Vue.jswebpack的项目模板。它提…

【机器学习-01】机器学习基本概念与建模流程

机器学习的过程本质上是一个不断通过数据训练来提升模型在对应评估指标上表现的过程。在此过程中&#xff0c;为模型提供有效的反馈并基于这些反馈进行持续的调整是至关重要的。只有当这个过程顺利进行时&#xff0c;模型才能得到有效的训练&#xff0c;机器才能真正实现学习。…

nodejs基于vue大学生健身爱好者交流网站flask-django-php

任何系统都要遵循系统设计的基本流程&#xff0c;本系统也不例外&#xff0c;同样需要经过市场调研&#xff0c;需求分析&#xff0c;概要设计&#xff0c;详细设计&#xff0c;编码&#xff0c;测试这些步骤&#xff0c;基于python技术、django/flask框架、B/S机构、Mysql数据…

边缘计算网关能够解决企业数改中哪些问题?-天拓四方

随着工业4.0时代的到来&#xff0c;数字化转型已经成为工业企业发展的必然趋势。在这一过程中&#xff0c;边缘计算网关以其独特的优势&#xff0c;正逐渐成为工业企业实现智能化、高效化运营的关键技术。 边缘计算网关是一种部署在网络边缘的设备&#xff0c;它集成了计算、存…

从自动化到测开,测试人员逆袭之路从此起步!

在当今竞争激烈的软件测试行业中&#xff0c;近期的招聘市场确实面临一些挑战。大量的求职者争相涌入岗位&#xff0c;许多热衷于功能测试的人士甚至难以找到理想的工作机会。更不幸的是&#xff0c;连自动化测试和性能测试这些专业领域也受到了测试开发人员的竞争压力。然而&a…

Linux 常见驱动框架

一、V4L2驱动框架 v4l2驱动框架主要对象&#xff1a; &#xff08;1&#xff09;video_device&#xff1a;一个字符设备&#xff0c;为用户空间提供设备节点(/dev/videox)&#xff0c;提供系统调用的相关操作(open、ioctl…) &#xff08;2&#xff09;v4l2_device&#xff1a…

QT中dumpcpp以及dumpdoc使用

qt中调用COM的方式方法有四种&#xff0c;参考解释在 Qt 中使用 ActiveX 控件和 COM (runebook.dev) 介绍dumpcpp的使用方法Qt - dumpcpp 工具 (ActiveQt) (runebook.dev)&#xff1a; 在安装好了的qt电脑上&#xff0c;通过powershell窗口来实现&#xff0c;powershell比cmd要…

融云:TikTok背水一战,出海应用「用户被遗忘权」保护需升级

TikTok开启全面反击了。 针对美国众议院投票通过法案“强制要求TikTok在165天内剥离母公司字节跳动&#xff0c;否则TikTok将在美国的应用商店下架”这一晴天霹雳&#xff0c;TikTok近日采取了弹窗动员策略&#xff0c;号召用户共同应对挑战。 事实上&#xff0c;从TikTok仅用…

xss.pwnfunction(DOM型XSS)靶场

环境进入该网站 Challenges (pwnfunction.com) 第一关&#xff1a;Ma Spaghet! 源码&#xff1a; <!-- Challenge --> <h2 id"spaghet"></h2> <script>spaghet.innerHTML (new URL(location).searchParams.get(somebody) || "Somebo…