Closed farafonov-alexey closed 6 years ago
I see it was intetionally added here - https://github.com/ks32/crosswalk/commit/2fc4bc5cff9f9386793b9a26d5879308a2744f9b#diff-32a8c099ccb75ea20046fd6c07ff5a8fR69, but the usage of getPackageId method is commented out - https://github.com/ks32/crosswalk/commit/2fc4bc5cff9f9386793b9a26d5879308a2744f9b#diff-32a8c099ccb75ea20046fd6c07ff5a8fR170
You can rebuild crosswalk. Use docker image https://hub.docker.com/r/ks32/crosswalk-build-tools It has all tools and just ready for building.
So i've succefully started the container and followed by instruction fetched the source with gclient sync.
import("//xwalk/build/android.gni")
target_os = "android"
proprietary_codecs=true
ffmpeg_branding = "Chrome"
without last two lines i have assertion fault ffmpeg_branding!=Chromium
FAILED: libxwalkcore.cr.so libxwalkcore.cr.so.TOC lib.unstripped/libxwalkcore.cr.so
python "/root/crosswalk/src/build/toolchain/gcc_solink_wrapper.py" --readelf="../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-readelf" --nm="../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-nm" --strip=../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --sofile="./lib.unstripped/libxwalkcore.cr.so" --tocfile="./libxwalkcore.cr.so.TOC" --output="./libxwalkcore.cr.so" -- ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -shared -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=gold -Wl,--icf=all -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,--exclude-libs=libgcc.a -Wl,--exclude-libs=libc++_static.a -Wl,--exclude-libs=libvpx_assembly_arm.a -Werror -nostdlib -Wl,--warn-shared-textrel --sysroot=../../third_party/android_tools/ndk/platforms/android-16/arch-arm -Wl,--version-script=/root/crosswalk/src/build/android/android_only_explicit_jni_exports.lst -Wl,-wrap,calloc -Wl,-wrap,free -Wl,-wrap,malloc -Wl,-wrap,memalign -Wl,-wrap,posix_memalign -Wl,-wrap,pvalloc -Wl,-wrap,realloc -Wl,-wrap,valloc -L../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -o "./lib.unstripped/libxwalkcore.cr.so" -Wl,-soname="libxwalkcore.cr.so" @"./libxwalkcore.cr.so.rsp"
../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include/memory:2431: error: undefined reference to 'content::DevToolsHttpHandler::~DevToolsHttpHandler()'
../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include/memory:2431: error: undefined reference to 'content::DevToolsHttpHandler::~DevToolsHttpHandler()'
../../xwalk/runtime/browser/android/xwalk_dev_tools_server.cc:173: error: undefined reference to 'content::DevToolsHttpHandler::DevToolsHttpHandler(content::DevToolsManagerDelegate*, std::__ndk1::unique_ptr<content::DevToolsSocketFactory, std::__ndk1::default_delete<content::DevToolsSocketFactory> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, base::FilePath const&, base::FilePath const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)'
../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include/memory:2431: error: undefined reference to 'content::DevToolsHttpHandler::~DevToolsHttpHandler()'
../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include/memory:2431: error: undefined reference to 'content::DevToolsHttpHandler::~DevToolsHttpHandler()'
../../xwalk/runtime/browser/devtools/remote_debugging_server.cc:169: error: undefined reference to 'content::DevToolsHttpHandler::DevToolsHttpHandler(content::DevToolsManagerDelegate*, std::__ndk1::unique_ptr<content::DevToolsSocketFactory, std::__ndk1::default_delete<content::DevToolsSocketFactory> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, base::FilePath const&, base::FilePath const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Is there any workaround for this? @ks32
I am using following args:
gn args out/Default_arm
import("//xwalk/build/android.gni") is_debug = false target_os = "android" enable_nacl = false symbol_level = 0 remove_webcore_debug_symbols = true target_cpu = "arm" use_aura=false use_ozone=false enable_plugins=false disable_bundled_extensions=true ffmpeg_branding = "Chrome" #disable to reduce size proprietary_codecs=true #disable to reduce size v8_use_snapshot=true enable_webrtc=false #disable to reduce size pdf_enable_v8=false multidex_in_release=true is_official_build=true v8_enable_i18n_support=false disable_ftp_support=true disable_libfuzzer=true enable_basic_print_dialog=false
ninja -C out/Default_arm xwalk_core_library It should work. You can change arguments if you want.
Thank you, @ks32 I've successfully build xwalk_core_library with your parameters. Is there any param to enable Web Sql support?
check arguments for what you are looking for: gn args out/Default_arm --list
Well it seems that websql is turned on by default, but using it lead to error:
there was not enough remaining storage space, or the storage quota was reached and the user declined to allow more space
Maybe xwalk source code needs changing? I see tenta-browser has some encryptedSql, maybe that's somehow related with this error. @ks32
UPD: I'm observing strange WebSql behavior:
var shortName = "db", version = "1.0", displayName = "db", maxSize = 20 * 1024 * 1024;
var db = openDatabase(shortName, version, displayName, maxSize);
db.transaction(tx => {
tx.executeSql("CREATE TABLE IF NOT EXISTS cache3 (key TEXT PRIMARY KEY ASC NOT NULL, value TEXT NULL);", [], (tx, res) => console.info(res), (tx, err) => console.error(err));
})
db.transaction(tx => {
tx.executeSql("CREATE TABLE IF NOT EXISTS cache1 (key TEXT PRIMARY KEY ASC NOT NULL, value TEXT NULL);", [], (tx, res) => console.info(res), (tx, err) => console.error(err));
})
There is no cache1 table, and i don't know why???
PS: insert commands in cache3 table works just fine
tenta encryptedSql is closed repo. So that I have to remove it and also references to it in the code. It maybe the cause for this problem.
Well I've successfully integrated this xwalk_core_library to our Cordova project at last. We switched from WebSql to https://github.com/litehelpers/Cordova-sqlite-storage.git plugin.
One more thing. I see in tenta-browser/crosswalk repository there are branches - chromium_59 and chromium_64. According to your comment this chromium versions could be used too.
Is there any chance that you can remove your private libraries from these branches too? Or is there some kind of instruction with help of which I can do it myself?
First, I am not link to tenta nor do know what they do. Regarding chromium_64, I can work on it after 2-3 months because of my current work.
It is not difficult to remove private libraries. If you look at ks_chromium_58, there are not many changes with chromium_58. You just need to apply similar changes to chromium_64 to make it work.
Did anyone make it work with chromium_64?
Does anyone has an .aar to share or instructions? Thanks :)
I successfully build your xwalk_core_library_58.aar with cordova, however when the app starting the roor occured
I' tried to search method getAssignedPackageIdentifiers at tenta-browser's XWalkViewDelegate.java - https://github.com/tenta-browser/crosswalk/blob/master/runtime/android/core_internal/src/org/xwalk/core/internal/XWalkViewDelegate.java But this entire method doesn't exsists. Do you have any workaround? Maybe I need to recompile xwalk_core_library.jar somehow.