ya-webadb icon indicating copy to clipboard operation
ya-webadb copied to clipboard

App management

Open yume-chan opened this issue 2 years ago • 3 comments

  • [ ] Enumrate installed apps
    • [ ] icon, name, package name, version, target api, arch
    • [ ] permission
    • ❓ size
  • [ ] Install app
    • [ ] apk
      • [ ] legacy mode
        • [x] normal push
        • [ ] fast deploy
      • [ ] stream mode
        • [ ] normal stream
        • [ ] fast deploy
        • [ ] cmd package
    • ❓ aab
    • ❓ apkm (by apkmirror)
    • ❓ xapk (by apkpure)
  • [ ] Uninstall app
    • [ ] pm
    • [ ] cmd package
  • [ ] Launch app/activities (am) #366
  • [ ] Backup/restore individual app data (bu) #354
  • [ ] Demo

yume-chan avatar Jan 26 '22 03:01 yume-chan

and apk extraction of an app. https://gist.github.com/ctrl-freak/24ac0e61b7cf550a6945

upintheairsheep avatar Feb 03 '22 03:02 upintheairsheep

Add a function to browse app files, for rooted devices it does normal stuff , in debuggable apps it does https://android.stackexchange.com/questions/48609/how-can-i-access-the-files-in-data-data-and-copy-them-into-memory-card-withou/50411 commands and there is a storage emulated 0 Android data packageid folder browser and for backup able apps make a backup but load it to the ram then use a tar extractor to extract it.

upintheairsheep avatar Feb 03 '22 04:02 upintheairsheep

And

upintheairsheep avatar Feb 03 '22 04:02 upintheairsheep

Updates

  • It should be impossible to get app icons using only ADB commands. A Java package similar to Scrcpy is required to call Android framework APIs to retrieve the icon. Using APIs also greatly simplify parsing the results. But it's kind of out of scope for this project, so won't be supported.
  • Similar story for am. I have some strange error like Error: Activity not started, unable to resolve Intent when using am to launch the main activity of apps, while monkey works. So it's better to use the same API as monkey to resolve the main activity component name beforehand, than using action.MAIN and category.LAUNCHER directly. This also requires Java code so won't be supported. (I need am parameters like --display so using monkey is also not an option)

yume-chan avatar Jun 04 '23 13:06 yume-chan

Similar story for am. I have some strange error like Error: Activity not started, unable to resolve Intent when using am to launch the main activity of apps.

A workaround is first resolving the activity using pm resolve-activity (PackageManager#resolveActivity) then am start (ActivityManager#startActivity).


All main goals are completed, other stretch goals will be investigated when required.

yume-chan avatar Sep 21 '23 09:09 yume-chan