0

Am polishing a C++ game engine I'd like to port to android. However, since my attempt at using android studio and USB debugging has failed regardless of using every trick in the book; I'd like to try some out other options. Am too poor to afford another phone and don't have the extra months to spend on discovering the issue. Already spent a few as is.

So are there other options for developing and installing apps? Maybe through hopefully up to date on device compilers and GitHub(do they come with GCC and some assembler)? Would some kind of software that makes copying files easier be ideal? Is installing the apk through such means reliable? Is there anything to be wary of when it comes to binaries?

Thanks in advance.

EDIT I don't really need debugging features when I could use an emulator thankfully. Just a way of quickly installing and testing would suffice. The main point of testing on actual hardware is mainly for performance measures... Having a profiler is a nice luxury and all but I can make do without it since the main platform is PC anyway.

user3440251
  • 33
  • 2
  • 8

1 Answers1

1

one and only reliable way for installing debug apps is ADB... and ADB needs USB connection, even when you use ADB over Wi-Fi. alternative is to run emulator. there is no other option for "real" debugging (attaching debugger to app, using breakpoints, Android Profiler etc.)

is problem causing your mobile device or PC/laptop?

  • computer - attach your mobile to another PC (e.g. co-workers) just for second and turn on ADB over Wi-Fi, then you may disconnect device and connect to it through tcpip from your computer

  • mobile - you may root your device and put service.adb.tcp.port=5555 in build.prop file - then you won't need even single USB connection for turning ADB over Wi-Fi, it will be enabled always and you may connect to it by tcpip anytime

snachmsm
  • 17,866
  • 3
  • 32
  • 74
  • What if debugging wasn't a requirement? Just a simple release build being compiled and ran on the device would be enough. The engine is a port so I'm not exactly in desperate need of debugging tools. And it's already designed to carefully port datatypes. – user3440251 Sep 15 '20 at 10:11
  • Hmm rooting would be pretty nice actually, that extra control would come in handy for sure, i'm not exactly experienced with phones enough to feel comfortable doing that yet. – user3440251 Sep 15 '20 at 10:13
  • well, on "common" devices there are only two reliable ways to install app - ADB and Google Play Store. first way is one and only supported by Android Studio (automated install), second needs "install" or "update" button click. Play Store is one and only app with authorization which can install/update apps without user acceptance, due to security reasons ofc. if you can accept some manual clicks with every installation then you may just upload apk file to device somehow and install/update yourself – snachmsm Sep 15 '20 at 10:18
  • I guess manually accepting doesn't sound awful if it's not much different than if for example accepting a program install from a web browser like Firefox on a PC. I could never afford a phone so someone was kind enough to donate one though obviously without phone service. I'm just using it as a test bed and to generally run background apps without consuming PC resources. Since there's no contract to worry about, if it's not too easy to totally brick the thing maybe rooting is a good option. If there's no soldering involved. – user3440251 Sep 15 '20 at 10:31
  • Surprised they don't allow stuff like this by default though, having root access is essential to really efficiently use a device. Doesn't feel like i actually own this thing. – user3440251 Sep 15 '20 at 10:32
  • USB is common way for connection for mobile and in most cases one and only wired. any other would be wireless, thus making some space for vulnerabilities - e.g. if you have debugging enabled on your device (when you enable once you won't be disabling it after ending coding, no one does that) and Wi-Fi ADB enabled then anyone in network can `adb connect` to it. so you have to "confirm" you own this device physically by connecting to USB for turning on ADB Wi-Fi – snachmsm Sep 15 '20 at 11:27
  • also note that current [Android 11 introduces possibility for ADB Wi-Fi without cable connection](https://medium.com/@harshilp/wireless-debugging-in-android-11-7169d2596a81), but still you need to have device in your hand for getting pairing code. all these restrictions are there just for security reasons – snachmsm Sep 15 '20 at 11:27
  • Guess i'll check if the device supports that and worst case look for what's probably called an "app downloader" or "installer" or something along those lines maybe. Or maybe something that uses ftp. I really don't need the debugging. Still this is all really nice to know and i'm grateful for your time. – user3440251 Sep 15 '20 at 14:45