[Lldb-commits] [PATCH] D136465: Make remote-android local ports configurable

Luka Markušić via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 25 22:23:37 PDT 2022


mark2185 added a comment.

In D136465#3884047 <https://reviews.llvm.org/D136465#3884047>, @clayborg wrote:

> Looks ok to me. I don't do Android stuff on a daily basis. As long as the old way of connecting still works I think this is ok.

Great! I'd just like to note that I do not have commit access, per the guide's instructions <https://llvm.org/docs/Phabricator.html#phabricator-reviews>.

> It would be great to get more stuff in the Android remove platform connection working at some point. Users still have to manually install things and a lot of the work gets done by the Android Studio IDE kind of like Xcode does. I would love to us add some features in the future:
>
> - allow a lldb_private::Target to have an application bundle FileSpec, which could be pointed to a .apk file for Android and a .ipa file for iOS
> - Implement PlatformAndroid::LaunchProcess
>   - implement "Status PlatformAndroid::Install(const FileSpec &src, const FileSpec &dst)" and handle APK files from target by doing "adb install" if needed
>   - Have PlatformAndroid::LaunchProcess do everything that is needed to debug the app
>     - start lldb-server for the new process via the connect to the "lldb-server platform" process
>     - forward any ports needed
>
> It would be great at some point to be able to do something like:
>
>   (lldb) platform select remote-android
>   (lldb) platform connect ...
>   (lldb) target create --app-bundle /path/to/foo.apk
>   (lldb) run
>
> And have PlatformAndroid take care of everything for us.

That does sound pretty useful, and even Android Studio would benefit from it since currently it just pushes a shell script that launches the `lldb-server`. I'll see what I can do.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136465/new/

https://reviews.llvm.org/D136465



More information about the lldb-commits mailing list