温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

关于如何知道一个安装的apk的主activity

发布时间:2020-05-19 15:53:44 来源:网络 阅读:613 作者:GaoNeil 栏目:移动开发

关于如何查找知道一个安装的apk的主activity

关于如何查找知道一个安装的apk的主activity,从而命令行进行am start的方法:
$ adb install /media/neil/neil/temp/com-futuremark-dmandroid-application.apk
7059 KB/s (28784923 bytes in 3.982s)
Success
$

$ adb shell dumpsys | grep futuremark //通过特定的文件名,大概猜测包名的特定关键字。
#111: act=android.intent.action.PACKAGE_ADDED dat=package:com.futuremark.dmandroid.application flg=0x4000010 (has extras)
#113: act=android.intent.action.PACKAGE_ADDED dat=package:com.futuremark.dmandroid.application flg=0x4000010 (has extras)
1556108774708 : com.futuremark.dmandroid.application
^C
$ adb shell dumpsys package com.futuremark.dmandroid.application
Activity Resolver Table:
Non-Data Actions:
android.intent.action.MAIN:
acb1b01 com.futuremark.dmandroid.application/.activity.MainActivity filter fee03ab //注意带MAIN 和带LAUNCHER字样的地方。
Action: "android.intent.action.MAIN"
e7afda6 com.futuremark.dmandroid.application/.activity.SplashPageActivity filter eb7da08
Action: "android.intent.action.MAIN"
Category: "android.intent.category.LAUNCHER"
Category: "android.intent.category.LEANBACK_LAUNCHER"

Registered ContentProviders:
com.futuremark.dmandroid.application/.util.LocalFileContentProvider:
Provider{80ac3e7 com.futuremark.dmandroid.application/.util.LocalFileContentProvider}

ContentProvider Authorities:
[.localfile]:
Provider{80ac3e7 com.futuremark.dmandroid.application/.util.LocalFileContentProvider}
applicationInfo=ApplicationInfo{feffb94 com.futuremark.dmandroid.application}

Key Set Manager:
[com.futuremark.dmandroid.application]
Signing KeySets: 7

Packages:
Package [com.futuremark.dmandroid.application] (4d663d):
userId=10053
pkg=Package{6494e32 com.futuremark.dmandroid.application}
codePath=/data/app/com.futuremark.dmandroid.application-JG_5Iaj56q2Q-7WupdvVFw==
resourcePath=/data/app/com.futuremark.dmandroid.application-JG_5Iaj56q2Q-7WupdvVFw==
legacyNativeLibraryDir=/data/app/com.futuremark.dmandroid.application-JG_5Iaj56q2Q-7WupdvVFw==/lib
primaryCpuAbi=armeabi-v7a
secondaryCpuAbi=null
versionCode=3428 minSdk=14 targetSdk=21
versionName=1.6.3428
splits=[base]
apkSigningVersion=1
applicationInfo=ApplicationInfo{feffb94 com.futuremark.dmandroid.application}
flags=[ HAS_CODE ALLOW_CLEAR_USER_DATA ALLOW_BACKUP ]
dataDir=/data/user/0/com.futuremark.dmandroid.application
supportsScreens=[small, medium, large, xlarge, resizeable, anyDensity]
timeStamp=2019-04-24 20:26:09
firstInstallTime=2019-04-24 20:26:12
lastUpdateTime=2019-04-24 20:26:12
signatures=PackageSignatures{fb5b783 [7bdaa371]}
installPermissionsFixed=true installStatus=1
pkgFlags=[ HAS_CODE ALLOW_CLEAR_USER_DATA ALLOW_BACKUP ]
requested permissions:
android.permission.INTERNET
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.GET_ACCOUNTS
android.permission.WAKE_LOCK
com.android.vending.CHECK_LICENSE
android.permission.ACCESS_NETWORK_STATE
android.permission.ACCESS_WIFI_STATE
android.permission.READ_EXTERNAL_STORAGE
install permissions:
android.permission.INTERNET: granted=true
android.permission.READ_EXTERNAL_STORAGE: granted=true
android.permission.ACCESS_NETWORK_STATE: granted=true
android.permission.GET_ACCOUNTS: granted=true
android.permission.WRITE_EXTERNAL_STORAGE: granted=true
android.permission.ACCESS_WIFI_STATE: granted=true
android.permission.WAKE_LOCK: granted=true
User 0: ceDataInode=115169 installed=true hidden=false suspended=false stopped=true notLaunched=true enabled=0 instant=false virtual=false
overlay paths:
/vendor/overlay/framework-resauto_generated_rro.apk
gids=[1023, 1015, 3003]
runtime permissions:**

Package Changes:
Sequence number=22
User 0:
seq=1, package=com.android.provision
seq=3, package=com.android.nfc
seq=4, package=com.koushikdutta.vysor
seq=19, package=com.android.settings
seq=20, package=com.futuremark.dmandroid.application
seq=21, package=com.aurorasoftworks.quadrant.ui.professional

Dexopt state:
[com.futuremark.dmandroid.application]
path: /data/app/com.futuremark.dmandroid.application-JG_5Iaj56q2Q-7WupdvVFw==/base.apk
arm: /data/app/com.futuremark.dmandroid.application-JG_5Iaj56q2Q-7WupdvVFw==/oat/arm/base.odex[status=kOatUpToDate
, compilation_filter=quicken]

Compiler stats:
[com.futuremark.dmandroid.application]
base.apk - 2120
$

$ adb shell am start -n com.futuremark.dmandroid.application/.activity.MainActivity
Starting: Intent { cmp=com.futuremark.dmandroid.application/.activity.MainActivity }
$

另外我的相关培训视频请看:
欢迎观看我发布的各个课程: https://edu.51cto.com/lecturer/8896847.html

我的新的更多优惠的打包课程链接如下:
https://edu.51cto.com/sd/0a9d4

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI