diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-08 11:27:20 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-08 11:28:49 +0200 |
commit | b102c585ee6f697000d7876c1ec90e68c18dc40f (patch) | |
tree | a78b9e6ccc41dde372e81d9b3941286135f61f1b /android | |
parent | 42dd9019953c79467e9bccd0861625bc08a71330 (diff) |
android: update emulator / debugging documentation
Change-Id: I402e9073f15dccb3618c06e355559b9f8ff7f763
Diffstat (limited to 'android')
-rw-r--r-- | android/README | 70 |
1 files changed, 33 insertions, 37 deletions
diff --git a/android/README b/android/README index 48c3d6ea69b9..08379007d50e 100644 --- a/android/README +++ b/android/README @@ -148,74 +148,70 @@ TextCursorView (org.libreoffice.overlay.TextCursorView) and TextCursorLayer (org.libreoffice.overlay.TextCursorLayer) are the classes that provide the overlay over the document, where selections and the cursor is drawn. -Android-specific notes -********************** - -Note that this document has not necessarily been updated to match -reality... +Emulator and debugging notes +**************************** For instructions on how to build for Android, see README.cross. -* Getting something running on an emulated device +* Getting something running - Create an AVD in the android UI, don't even try to get -the data partition size right in the GUI, that is doomed to producing -an AVD that doesn't work. Instead start it from the console: +Attach your device, so 'adb devices' shows it. Then run: - LD_LIBRARY_PATH=$(pwd)/lib emulator-arm -avd <Name> -partition-size 500 + cd android/experimental/LOAndroid3 + ant debug install + adb logcat -In order to have proper acceleration, you need the 32-bit libGL.so: +and if all goes well, you should have some nice debug output to enjoy when you +start the app. - sudo zypper in Mesa-libGL-devel-32bit +* Using the emulator - Where <Name> is the literal name of the AVD that you entered. +Create an AVD in the android UI, don't even try to get the data partition size +right in the GUI, that is doomed to producing an AVD that doesn't work. +Instead start it from the console: - Then: + LD_LIBRARY_PATH=$(pwd)/lib emulator-arm -avd <Name> -partition-size 500 - cd android/experimental/LOAndroid3 - ant debug install - adb logcat +where <Name> is the literal name of the AVD that you entered. - And if all goes well - you should have some nice debug output to enjoy -when you start the app. After a while of this loop you might find that you have -lost a lot of space on your emulator's or device's /data volume. If using the -emulator, you can do: +[ In order to have proper acceleration, you need the 32-bit libGL.so: - adb shell stop; adb shell start + sudo zypper in Mesa-libGL-devel-32bit + +and run emulator-arm after the installation. ] -but on a (non-rooted) device you probably just need to reboot it. On the other -hand, this phenomenon might not happen on actual devices. +Then you can run ant/adb as described above. -* What about using a real device? +After a while of this loop you might find that you have lost a lot of +space on your emulator's or device's /data volume. You can do: - That works fine, too. + adb shell stop; adb shell start * Debugging - First of all, you need to configure the build with --enable-debug or +First of all, you need to configure the build with --enable-debug or --enable-dbgutil. You may want to provide --enable-selective-debuginfo too, like --enable-selective-debuginfo="sw/" or so, in order to fit into the memory during linking. - Building with all symbols is also possible but the linking is currently +Building with all symbols is also possible but the linking is currently slow (around 10 to 15 minutes) and you need lots of memory (around 16GB + some swap). - You also want to avoid --with-android-package-name (or when you use -that, you must set it to "org.libreoffice"), otherwise ndk-gdb will complain -that +You also want to avoid --with-android-package-name (or when you use +that, you must set it to "org.libreoffice"), otherwise ndk-gdb will complain: -ERROR: Could not extract package's data directory. Are you sure that - your installed application is debuggable? + ERROR: Could not extract package's data directory. Are you sure that + your installed application is debuggable? - When you have all this, install the .apk to the device, and: +When you have all this, install the .apk to the device, and: cd android/experimental/LOAndroid3 <android-ndk-r10d>/ndk-gdb --adb=<android-sdk-linux>/platform-tools/adb --start - Pretty printers aren't loaded automatically due to the single shared - object, but you can still load them manually. E.g. to have a pretty-printer for - rtl::OString, you need: +Pretty printers aren't loaded automatically due to the single shared +object, but you can still load them manually. E.g. to have a pretty-printer for +rtl::OString, you need: (gdb) python sys.path.insert(0, "/master/solenv/gdb") (gdb) source /master/instdir/program/libuno_sal.so.3-gdb.py |