miguelfreitas/twister-webview-app

Doesn't launch the daemon

Opened this issue · 5 comments

rkfg commented

On my Nexus 10 with Android 5.1 all I have is this:
screenshot_2015-05-04-01-33-37

I waited for several minutes and tapped the link, nothing changed. /sdcard/Android/data/com.mfreitas.twister/files/ is empty. I don't know how long it starts (if it runs at all, there's no indication of that). Tried on Nexus 4 (Android 5.0), all the same. Would be good to show some heartbeat instead of an error page.

rkfg commented

logcat:

[ 05-04 01:49:51.683   411:  522 I/ActivityManager ]
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mfreitas.twister/.twisterActivity (has extras)} from uid 10022 on display 0

[ 05-04 01:49:51.689   411:  522 V/WindowManager ]
addAppToken: AppWindowToken{3e4edb70 token=Token{28f409b3 ActivityRecord{1601cb22 u0 com.mfreitas.twister/.twisterActivity t1016}}} to stack=1 task=1016 at 0

[ 05-04 01:49:51.694   411:  434 V/WindowManager ]
Adding window Window{f15776e u0 Starting com.mfreitas.twister} at 11 of 17 (after Window{3a727d97 u0 com.eolwral.osmonitor/com.eolwral.osmonitor.OSMonitor})

[ 05-04 01:49:51.743   411: 1038 I/ActivityManager ]
Start proc 11628:com.mfreitas.twister/u0a118 for activity com.mfreitas.twister/.twisterActivity

[ 05-04 01:49:51.796   526:  526 V/PhoneStatusBar ]
setLightsOn(true)

[ 05-04 01:49:52.847 11628:11628 I/twisterActivity ]
/data/app/com.mfreitas.twister-2/lib/arm/libtwisterd.so

[ 05-04 01:49:52.930 11628:11628 I/WebViewFactory ]
Loading com.google.android.webview version 42.0.2311.137 (code 2311137)

[ 05-04 01:49:52.938 11628:11628 I/LibraryLoader ]
Time to load native libraries: 1 ms (timestamps 1918-1919)

[ 05-04 01:49:52.938 11628:11628 I/LibraryLoader ]
Expected native library version number "",actual native library version number ""

[ 05-04 01:49:52.963 11628:11628 V/WebViewChromiumFactoryProvider ]
Binding Chromium to main looper Looper (main, tid 1) {d34fcac}

[ 05-04 01:49:52.965 11628:11628 I/LibraryLoader ]
Expected native library version number "",actual native library version number ""

[ 05-04 01:49:52.965 11628:11628 I/chromium ]
[INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0


[ 05-04 01:49:52.972 11628:11628 I/BrowserStartupController ]
Initializing chromium process, singleProcess=true

[ 05-04 01:49:52.972 11628:11628 W/art      ]
Attempt to remove local handle scope entry from IRT, ignoring

[ 05-04 01:49:52.972 11628:11628 E/SysUtils ]
ApplicationContext is null in ApplicationStatus

[ 05-04 01:49:52.984 11628:11628 W/chromium ]
[WARNING:resource_bundle.cc(286)] locale_file_path.empty()


[ 05-04 01:49:52.985 11628:11628 I/chromium ]
[INFO:aw_browser_main_parts.cc(63)] Load from apk succesful, fd=33 off=46996 len=3337


[ 05-04 01:49:52.987 11628:11628 I/chromium ]
[INFO:aw_browser_main_parts.cc(76)] Loading webviewchromium.pak from, fd:34 off:7953036 len:1161174


[ 05-04 01:49:52.989 11628:11652 W/AudioManagerAndroid ]
Requires BLUETOOTH permission

[ 05-04 01:49:53.301 11628:11665 W/chromium ]
[WARNING:data_reduction_proxy_config.cc(150)] SPDY proxy OFF at startup


[ 05-04 01:49:53.311 11628:11628 W/art      ]
Attempt to remove local handle scope entry from IRT, ignoring

[ 05-04 01:49:53.318 11628:11628 W/AwContents ]
onDetachedFromWindow called when already detached. Ignoring

[ 05-04 01:49:53.340   411:  425 V/WindowManager ]
Adding window Window{1a1143b8 u0 com.mfreitas.twister/com.mfreitas.twister.twisterActivity} at 11 of 18 (before Window{f15776e u0 Starting com.mfreitas.twister})

[ 05-04 01:49:53.430   411:  434 I/ActivityManager ]
Displayed com.mfreitas.twister/.twisterActivity: +1s711ms

[ 05-04 01:49:53.464 11628:11628 W/BindingManager ]
Cannot call determinedVisibility() - never saw a connection for the pid: 11628

[ 05-04 01:49:53.469 11628:11628 W/BindingManager ]
Cannot call determinedVisibility() - never saw a connection for the pid: 11628

[ 05-04 01:49:53.528 11628:11628 I/chromium ]
[INFO:CONSOLE(0)] "Not allowed to load local resource: file:///android_asset/webkit/android-weberror.png", source: data:text/html,chromewebdata (0)

When I tap the link, it only repeats this:

[ 05-04 01:50:26.328 11628:11628 W/BindingManager ]
Cannot call determinedVisibility() - never saw a connection for the pid: 11628

[ 05-04 01:50:26.358 11628:11628 W/BindingManager ]
Cannot call determinedVisibility() - never saw a connection for the pid: 11628

[ 05-04 01:50:26.359 11628:11628 I/chromium ]
[INFO:CONSOLE(0)] "Not allowed to load local resource: file:///android_asset/webkit/android-weberror.png", source: data:text/html,chromewebdata (0)

do you have a console (terminal) installed?

if so, would you try running the command '/data/app/com.mfreitas.twister-2/lib/arm/libtwisterd.so' directly?

also please post the result of 'ls -l /data/app/com.mfreitas.twister-2/lib/arm/libtwisterd.so'

don't be fooled by the .so extension, this is an executable... the problem i've seen is that the .so "trick" (to get the executable bit set) may not work on never androids. if you could please confirm that it would be nice.

i believe the apk may need to use a different technique, for example, unziping the executable somewhere and then chmod +x it.

rkfg commented

I've run adb shell, much easier and the effect is basically the same.

$ ls -l /data/app/com.mfreitas.twister-2/lib/arm/libtwisterd.so
-rwxr-xr-x system system 11621004 1979-12-31 17:21 libtwisterd.so

Launching it results in the following:
error: only position independent executables (PIE) are supported.

Looks like Google restricted some binary features.

Same issue here.
Wanna help to have a functionally apk but how?
Nice job!

Good catch! It seems it should be easy to fix, provided we want to live with supporting only Android 4.1+

http://stackoverflow.com/questions/24818902/running-a-native-library-on-android-l-error-only-position-independent-executab

You may try to recompile it using this pre-configured virtualbox image:

http://twister.net.co/?p=449