Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
78cf4ca4
Kaydet (Commit)
78cf4ca4
authored
Eki 14, 2015
tarafından
Christian Lohmaier
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make ndk-gdb work again
it hardcodes so much :-( Change-Id: Id86c2bcbf5936f3ab292e87210b967e2331c9435
üst
2511a218
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
15 deletions
+47
-15
.gitignore
android/.gitignore
+2
-0
README
android/README
+16
-7
AndroidManifest.xml
android/source/AndroidManifest.xml
+2
-1
ReleaseManifest.xml
android/source/ReleaseManifest.xml
+7
-0
build.gradle
android/source/build.gradle
+20
-7
No files found.
android/.gitignore
Dosyayı görüntüle @
78cf4ca4
...
...
@@ -5,9 +5,11 @@
/source/assets_strippedUI/
/source/build/
/source/captures/
/source/jni/Application.mk
/source/jniLibs/
/source/jniLibs_debug/
/source/liboSettings.gradle
/source/libs/*/gdb.setup
/source/local.properties
/source/native-code.cxx
/source/obj/
...
...
android/README
Dosyayı görüntüle @
78cf4ca4
...
...
@@ -198,16 +198,25 @@ 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:
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:
cd android/source
<android-ndk-r10d>/ndk-gdb --adb=<android-sdk-linux>/platform-tools/adb --start
<ndk-bundle>/ndk-gdb --adb=<android-sdk-linux>/platform-tools/adb [--start]
In case you used --with-android-package-name, add --package=your.package.name
to the invocation
If you get the error
ERROR: Could not find gdb.setup under ./libs/
(and an empty "Compatible device ABI:" when run with --verbose), you need to fix
the quoting in the ndk-gdb script:
@@ -574 +574 @@
-adb_var_shell BCFILES run-as $PACKAGE_NAME /system/bin/sh -c "ls lib/*.bc"
+adb_var_shell BCFILES run-as $PACKAGE_NAME /system/bin/sh -c \"ls lib/*.bc\"
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
...
...
android/source/AndroidManifest.xml
Dosyayı görüntüle @
78cf4ca4
...
...
@@ -13,6 +13,7 @@
android:allowBackup=
"true"
android:icon=
"@drawable/main"
android:label=
"@string/app_name"
android:debuggable=
"true"
android:hardwareAccelerated=
"true"
android:largeHeap=
"false"
>
...
...
@@ -94,7 +95,7 @@
</activity>
<!-- Document Browser Activity -->
<activity
android:name=
".ui.LibreOfficeUIActivity"
<activity
android:name=
"
org.libreoffice
.ui.LibreOfficeUIActivity"
android:label=
"@string/app_name"
android:theme=
"@style/BrowserTheme"
>
<intent-filter>
...
...
android/source/ReleaseManifest.xml
0 → 100644
Dosyayı görüntüle @
78cf4ca4
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
>
<application
android:debuggable=
"false"
tools:replace=
"android:debuggable"
/>
</manifest>
<!-- vim: shiftwidth=4 softtabstop=4 expandtab:
-->
android/source/build.gradle
Dosyayı görüntüle @
78cf4ca4
...
...
@@ -24,7 +24,6 @@ dependencies {
])
compile
files
(
"${liboInstdir}/${liboShareJavaFolder}/unoil.jar"
)
compile
files
(
"${liboWorkdir}/UnpackedTarball/owncloud_android_lib/bin/owncloud-android-library.jar"
)
compile
'com.android.support:support-v4:23.0.1'
compile
'com.android.support:appcompat-v7:23.0.1'
}
...
...
@@ -39,18 +38,24 @@ android {
// ToDo move to conventional layout, so stuff can be stripped down.
sourceSets
{
main
.
manifest
.
srcFile
'AndroidManifest.xml'
// override the debuggable flag that needs to be in AndroidManifest.xml
// since ndk-gdb awks for the literal string in there :-/
release
.
manifest
.
srcFile
'ReleaseManifest.xml'
main
.
assets
.
srcDirs
=
[
'assets'
]
main
.
res
.
srcDirs
=
[
'res'
]
main
.
java
.
srcDirs
=
[
'../Bootstrap/src'
,
'src/java'
]
main
.
jniLibs
.
srcDirs
=
[
'jniLibs'
]
main
.
jni
.
srcDirs
=
[]
// don't attempt to build native-lib via gradle
// gdbserver
stuff from separate dir
// gdbserver
for debugvariant
debug
.
jniLibs
.
srcDirs
"jniLibs_debug"
// the configuration data that might be stripped or not
fullUI
.
assets
.
srcDirs
'assets_fullUI'
strippedUI
.
assets
.
srcDirs
'assets_strippedUI'
}
// defaults for Manifest
lintOptions
{
// ndk-gdb looks for the literal value in the pre-processed manifest :-(
disable
'HardcodedDebugMode'
}
defaultConfig
{
minSdkVersion
14
// openssl on x86 makes the native-code.so contain text-relocations,
...
...
@@ -197,16 +202,24 @@ task createStrippedConfigRegistry(type: Exec) {
}
}
// ndk-gdb requires the gdb.setup to be in libs/<arch>/ folder - it's hardcoded in the script
// it should in theory also be able to copy the gdbserver binary onto the device, but the matching
// against prebuilt archs is too rudimentary and doesn't map armeabi-v7 to arm for example
task
copyNdkDebugServer
(
type:
Copy
)
{
description
"copies gdbserver into and creates gdb.setup
in the debug-type only native directory
"
description
"copies gdbserver into and creates gdb.setup
and Application.mk for use with ndk-gdb
"
inputs
.
file
"liboSettings.gradle"
def
gdbsetup
=
file
(
"jniLibs_debug/${liboAndroidAppAbi}/gdb.setup"
)
outputs
.
file
gdbsetup
def
gdbsetup
=
file
(
"libs/${liboAndroidAppAbi}/gdb.setup"
)
// only needed on buildhost
// hardcoded path from ndk-gdb - reads the host architecture from that file
def
applicationmk
=
file
(
"jni/Application.mk"
)
outputs
.
files
gdbsetup
,
applicationmk
outputs
.
dir
'jniLibs_debug'
// own the directory, so it is removed on this task's clean
outputs
.
dir
'libs'
// own the directory, so it is removed on this task's clean
into
"jniLibs_debug/${liboAndroidAppAbi}"
from
"${liboNdkGdbserver}"
doLast
{
gdbsetup
.
text
=
"set solib-search-path ./obj/local/${liboAndroidAppAbi}"
file
(
"libs/${liboAndroidAppAbi}"
).
mkdirs
()
gdbsetup
.
text
=
"set solib-search-path ./obj/local/${liboAndroidAppAbi}\n"
applicationmk
.
text
=
"APP_ABI := ${liboAndroidAppAbi}\n"
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment