New issue
Advanced search Search tips

Issue 620100 link

Starred by 5 users

Issue metadata

Status: Archived
Owner: ----
Closed: May 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

I Don't see how to enable CheckJNI for Android applications running in ARC

Reported by alankoz...@gmail.com, Jun 14 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:47.0) Gecko/20100101 Firefox/47.0
Platform: 7978.74.0 (Official Build)

Steps to reproduce the problem:
1. Use ARC Welder to convert an Android app to run on my Chromebook
2. Test the app
3. Read the logcat output from ARC

What is the expected behavior?
I want to see:
D/AndroidRuntime(   201): CheckJNI is ON

What went wrong?
Instead, I see:
D/AndroidRuntime(  201): CheckJNI is OFF

WebStore page: ARC

Did this work before? N/A 

Chrome version: 50.0.2661.103 (64-bit)  Channel: stable
OS Version: 50.0.2661.103 (64-bit)
Flash Version: Shockwave Flash 21.0.0.242-r1
 
Also, I should mention that I build the Android app with android:debuggable=true in the Manifest.
On and Android device, that is what should trigger CheckJNI to be enabled.
Not so on Chromebook Chrome OS ARC.
This is tricky since it needs to be enabled before an app launches, but to issue adb commands you generally have started an app in ARC.

One option might be to override the default shell command that launches the activity.  You can maybe inject an "adb shell setprop debug.checkjni 1" before the launch.  For instance, in metadata:

"shell": ["setprop", "debug.checkjni", "1", ";", "am", "start", "$launch", "--activity-reset-task-if-needed", ";"]

This is untested and may require a bit of munging to get to run correctly.  This has never been used in ARC before either so it's possible not all the CheckJNI functionality works.
I'll give it a try.
But I see references to CheckJNI being used in some of the other issues listed when searching for "CheckJNI"
For instance  Issue 332079 
https://bugs.chromium.org/p/chromium/issues/detail?id=332079

Your suggested metadata didn't have an effect.  But I'm not sure I'm using it correctly.
At the bottom of ARC Welder, I can specify "Additional Metadata" and I'm assuming this is where you expect me to add your suggested JSON data.
The actual string I used was:

{"stderrLog":"V",
"shell": ["setprop", "debug.checkjni", "1", ";", "am", "start", "$launch", "--activity-reset-task-if-needed", ";"]}

Comment 5 by uekawa@chromium.org, May 11 2017

Labels: ARCWelder
Project Member

Comment 6 by sheriffbot@chromium.org, May 11 2018

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment