Samsung J5 and TAB4 refuse native debugging - android-studio

Using Android Studio 1.5.1 in a win7 ultimate sp1 and in a Mac mini 10.11.3 fully updated.
I have a number of Samsung units for testing my app development incl JNI and this week my private Samsung Galaxy S4mini (Kitkat) died physically so I got a new Samsung Galaxy J5.
However the J5 (lollipop) refuses to be debugged in native mode. Does not matter the app, fails also with Hello-JNI.
The J5 also have some odd java bugs like in a AlertDialog (with stacked linear layouts) linearLayout.addView(anotherLinearLayout); just crashes?? Also I have an odd JNI-bug, I like to debug. And both "bugs" works without crashing in my other devices my old S4mini and a TAB4 Kitkat and a TAB3 and S3mini.
However I found the TAB4 also refuses native debugging. Both the TAB4 and the J5 works fine in (non-native) app-debugging. All other units debugs native no problem, just switching unit on the cable and run, works fine?
Is there something missing in the J5 and TAB4 for making native debugging available?
The debug error message is (I tried everything I could find):
Target device: samsung-sm_j500fn-0af60463
Installing APK: C:\Users\JB\AndroidStudioProjects\HelloJNI\app\build\outputs\apk\app-all-debug.apk
Uploading file to: /data/local/tmp/com.example.hellojni
Installing com.example.hellojni
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.hellojni"
pkg: /data/local/tmp/com.example.hellojni
Success
Launching application: com.example.hellojni/com.example.hellojni.HelloJni.
DEVICE SHELL COMMAND: am start -D -n "com.example.hellojni/com.example.hellojni.HelloJni" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.hellojni/.HelloJni }
Warning: debug info can be unavailable. Please close other application using ADB: Monitor, DDMS, Eclipse
Restart ADB integration and try again
Waiting for process: com.example.hellojni
DEVICE SHELL COMMAND: run-as com.example.hellojni mkdir /data/data/com.example.hellojni/lldb
Error while launching debug server on device: com.android.tools.ndk.run.DebuggerContext$StartServerException: java.lang.IllegalStateException: run-as is broken (please see http://b.android.com/187955 for details)

Related

Can't Debug App on emulator

I am using Android Studio 2.2.2 and ran the app on emulator Nexus_5_5_API_23
The app runs very well on emulator, but I can't debug it on emulator:
Here is my console log:
$ adb shell am start -n
"mmstart0312.com.webrtc_android/mmstart0312.com.webrtc_android.MainActivity"
-a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Waiting for application to come online:
mmstart0312.com.webrtc_android.test | mmstart0312.com.webrtc_android
Waiting for application to come online:
mmstart0312.com.webrtc_android.test | mmstart0312.com.webrtc_android
Waiting for application to come online:
mmstart0312.com.webrtc_android.test | mmstart0312.com.webrtc_android
What's wrong?
In Android-Studio : File -> Invalidate Caches / Restart
May The Code Be With You!
solved by attaching debugger to Android process once

Running protractor tests on IE 11

OK, so I have been searching a lot to get proper solution to the blocker I am facing right now. Let me give you a background of what I have done so far :
I want to run protractor tests (located on Linux machine) on IE 11 of Windows Server 2012 R2 (IP : 10.81.73.248). My protractorTest.conf.js has below :
exports.config = {
seleniumAddress: 'http://10.81.73.248:4444/wd/hub',
baseURL: 'http://10.81.78.137:80000/',
capabilities: {
browserName: 'internet explorer',
platform: 'ANY',
version: '11'
},
On my Windows Server 2012 R2 machine, I've downloaded IEDriverServer_Win32_2.47.0 and placed it under C:\Windows\System32, environment variable PATH has been updated with above location. Protected mode settings are same for all zones. Windows machine also has selenium-server-standalone-2.48.2.jar placed under C:\Users\Selenium.
On Windows machine, I am starting selenium server using below command :
java -jar selenium-server-standalone-2.48.2.jar -port 4444 -Dwebdriver.ie.driver="C:\Windows\System32\IEDriverServer_Win32_2.47.0\IEDriverServer.exe" , which starts selenium server fine.
With above settings, I run protractor tests from my Linux machine using grunt protractor_test, which launches IE browser on Windows machine, shows localhost:dynamic port and a message as : This is the initial page of webdriver server and within 2 seconds, closes the browser.
The exception I get on selenium server terminal is as below :
Session ID is null. Using WebDriver after calling quit() ?
This is where I am stuck at. I looked at various posts which describes similar issue (?) as mine along with the potential solution, but I am unable to resolve my issue here.
Is there anything I might be doing wrong to setup the connections ? or am I missing some steps to get me through ?
I would really appreciate if you guide me in resolving this long time pending blocker.
I think you are trying to run using old selenium version.It should be 2.53.x something.
Few basics things to check first regarding IE execution:
1).IE Setting for protractor(Selenium)
http://elgalu.github.io/2014/run-protractor-against-internet-explorer-vm/
2).Take IE driver of 32 bit(don't take 64 it has known slowness issues) and manually copy on the following path:
Root Folder\node_modules\protractor\node_modules\webdriver-manager\selenium\IEDriverServer_Win32_2.53.1
3). IE Driver can be downloaded from following path:
http://selenium-release.storage.googleapis.com/index.html?path=2.53/
**OR**
Please upgrade your protractor version to latest like 4.0.11 by changing the version in package.json file and do from command prompt(inside project root directory):
npm update
and then give update your selenium driver with following command from command prompt
webdriver-manager update --ie
it will update the selenium version of IE driver to latest and then try running your tests again.

Can I install an app as certified on my own phone? (Firefox OS)

Is there any way that I can develop an app for Firefox OS that uses a certified API and install it on my own phone?
Our specific need is for telephony data such as signal strength. We can do this on Android without any difficulty (indeed, we could put the app on Google Play if we wanted to). But we just need to install it on a small number of in-house phones.
It seems that Firefox OS considers it to be in some way a security risk to find out the signal strength of the cell tower, and similar telephony data. Am I correct in assuming that there is no way that Firefox OS will let a developer app read this data?
If you are using Firefox OS 1.2 > you should be able to push a certified app to a unlocked phone for testing purposes. I put in code like:
testconn.onclick = function () {
var cnx = navigator.mozMobileConnection;
if (cnx.voice.connected) {
console.log("The signal has a strength of " + (+cnx.voice.relSignalStrength) + "%");
} else {
console.log("The state of the connection is: " + cnx.voice.state);
}
};
and entered the following permission in the manifest:
"permissions": {
"mobileconnection":{}
},
"type": "certified"
You should be able to install your certified app on a real Firefox OS phone after performing these steps from MDN:
On your computer, enter the following command in Terminal/console to enter your device's filesystem via the shell:
adb shell
Your prompt should change to root#android.
Next, stop B2G running using the following command:
stop b2g
Navigate to the following directory:
cd /data/b2g/mozilla/*.default/
Here, update the prefs.js file with the following line:
echo 'user_pref("devtools.debugger.forbid-certified-apps", false);' >> prefs.js
After you've finished editing and saving the file, start B2G again using the following command:
start b2g
Exit the android filesystem using the exit command; this will return you to your normal terminal prompt.

Why My project Run goodly But dont shown in emolator?

I am a new linux user and when I installed eclipse and sdk for android in linux.I get below error
when I start emolator and wait for 15 minute. I ran my project.my project run very good and below message is shown.
[2013-05-30 09:53:13 - RamzNegar] Android Launch!
[2013-05-30 09:53:13 - RamzNegar] adb is running normally.
[2013-05-30 09:53:13 - RamzNegar] Performing com.elmos.ramznegar.MainActivity activity launch
[2013-05-30 09:53:13 - RamzNegar] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2013-05-30 09:53:22 - RamzNegar] Uploading RamzNegar.apk onto device 'emulator-5554'
[2013-05-30 09:53:23 - RamzNegar] Installing RamzNegar.apk...
[2013-05-30 09:53:39 - RamzNegar] Success!
[2013-05-30 09:53:39 - RamzNegar] Starting activity com.elmos.ramznegar.MainActivity on device emulator-5554
but i cannot show anything in emolator
I see below image
if answer is ~my emolator not run yet~;why my emolator dont run
how i can solve this problem?
for the first time that you run emulator it will run very slow
and when you run your app ,eclipse didnot get you error
I think this is a bug for google
I hope that speed of emulator will be improve

Error 'result::failure -9' when porting android app to BlackBerry 10

I am trying to deploy my android app from eclipse on to my blackberry Z10 running 10.0.9.422 and i am unsuccessfull at it.
Here is the actual error that i am receiving.
Failed to deploy project XXXX
Info: Sending request: Install
Info: Action: Install
Info: File size: 8659959
Info: Installing ...
Info: Processing 8659959 bytes
Info: Progress 0%...
Info: Progress 49%...
Info: Progress 50%...
Info: Progress 100%...
actual_dname::com.xxx.xxxx.testEPPwDTJahv0UbAeaecXksgI
actual_id::testEPPwDTJahv0UbAeaecXksgI
actual_version::1.0.3.0
result::failure -9
After this error, I could see the app icon on my Z10, but when i try to access it, it says' Initializing. Please wait...' and the app crashes thereafter.
What does failure -9 indicate and any idea on what's the issue/resolution might be?
Any help is greatly appreciated.
I was able to fix my problem after doing little research and finding the unsupported libraries for my app. I figured out the unsupported libraries using the apkbarVerifier tool.
My app was using com.google.android.maps package. So, I edited the android manifest file to reflect the below line.
<uses-library android:name="com.google.android.maps" android:required="false" />
After this change, even though the 'Verify apk' option from eclipse is showing me the same warnings, I was able to deploy the app to my Z10 and had it to work.
Basically, failure -9 on deployment means that the app contains an unsupported library.

Resources