最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】分析安卓游戏app欢乐大作战的主页面mainActivity

app crifan 1444浏览 0评论
折腾:
【未解决】uiautomator2中如何获取到欢乐大作战游戏界面中的元素
期间,要去搞清楚
https://github.com/openatx/uiautomator2
“通过atx-agent解析apk包的mainActivity”
此处是安卓游戏app:欢乐大作战
atx-agent解析apk mainActivity
解析apk mainActivity
Go、Python 语言解析安卓 APK 包 · TesterHome
用Python解析AndroidManifest.xml文件找MainActivity – 编程小栈 – CSDN博客
那貌似:aapt之类的也可以解析啊
去试试
➜  ~ which aapt
aapt not found
此处没有aapt
此处之前有下载,所以先去试试是否可用
如果可用,再加到PATH中
还要下载游戏apk
欢乐大作战下载_欢乐大作战安卓版下载-4399手机游戏网
-》
-》
去解析:
➜  28.0.3 pwd
/Users/crifan/dev/dev_tool/android/AndroidSDK/build-tools/28.0.3
➜  28.0.3 ./aapt dump badging /Users/crifan/dev/dev_tool/android/apk/HappyBigBattle.apk
package: name='com.hldzz.dmw' versionCode='20' versionName='444' compileSdkVersion='28' compileSdkVersionCodename='9'
install-location:'auto'
sdkVersion:'16'
targetSdkVersion:'28'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='com.android.vending.BILLING'
uses-permission: name='com.hldzz.dmw.permission.JPUSH_MESSAGE'
uses-permission: name='android.permission.RECEIVE_USER_PRESENT'
uses-permission: name='android.permission.READ_PHONE_STATE'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.MOUNT_UNMOUNT_FILESYSTEMS'
uses-permission: name='com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE'
uses-permission: name='android.permission.VIBRATE'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
application-label:'欢乐大作战'
application-label-zh:'欢乐大作战'
application-icon-120:'res/drawable-ldpi-v4/app_icon.png'
application-icon-160:'res/drawable-mdpi-v4/app_icon.png'
application-icon-240:'res/drawable-hdpi-v4/app_icon.png'
application-icon-320:'res/drawable-xhdpi-v4/app_icon.png'
application-icon-480:'res/drawable-xxhdpi-v4/app_icon.png'
application-icon-640:'res/drawable-xxxhdpi-v4/app_icon.png'
application: label='欢乐大作战' icon='res/drawable-mdpi-v4/app_icon.png' banner='res/drawable-xhdpi-v4/app_banner.png'
application-isGame
launchable-activity: name='com.hldzz.dmw.MainActivity'  label='欢乐大作战' icon=''
leanback-launchable-activity: name='com.hldzz.dmw.MainActivity'  label='欢乐大作战' icon='' banner=''
feature-group: label=''
  uses-gl-es: '0x20000'
  uses-feature-not-required: name='android.hardware.sensor.accelerometer'
  uses-feature-not-required: name='android.hardware.touchscreen'
  uses-feature-not-required: name='android.hardware.touchscreen.multitouch'
  uses-feature-not-required: name='android.hardware.touchscreen.multitouch.distinct'
  uses-feature: name='android.hardware.location'
  uses-implied-feature: name='android.hardware.location' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and requested android.permission.ACCESS_FINE_LOCATION permission'
  uses-feature: name='android.hardware.screen.landscape'
  uses-implied-feature: name='android.hardware.screen.landscape' reason='one or more activities have specified a landscape orientation'
  uses-feature: name='android.hardware.wifi'
  uses-implied-feature: name='android.hardware.wifi' reason='requested android.permission.ACCESS_WIFI_STATE permission'
main
other-activities
other-receivers
other-services
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--' 'zh'
densities: '120' '160' '240' '320' '480' '640'
native-code: 'armeabi-v7a'
此app的mainActivity应该就是
com.hldzz.dmw.MainActivity
顺带看到了其他相关信息:
  • 包名=package name
    • com.hldzz.dmw
  • 启动主界面=launchable activity
    • com.hldzz.dmw.MainActivity
  • app名字=label
    • 欢乐大作战
【总结】
用aapt去解析apk可以得到想要的MainActivity和其他相关信息。
此处app:HappyBigBattle.apk
解析:
aapt dump badging HappyBigBattle.apk
得到:
  • 包名=package name
    • com.hldzz.dmw
  • 启动主界面=launchable activity
    • com.hldzz.dmw.MainActivity
  • app名字=label
    • 欢乐大作战

转载请注明:在路上 » 【已解决】分析安卓游戏app欢乐大作战的主页面mainActivity

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
90 queries in 0.190 seconds, using 22.14MB memory