[Q] Warning and errors in logcat with HOB7/i9505 - Galaxy S 4 Q&A, Help & Troubleshooting

Hi!
My logcat is full of lines like the following:
Code:
04-03 11:38:09.692 W/SurfaceFlinger(280): Fail to Open /sys/devices/platform/gpusysfs/fps
04-03 11:38:09.702 E/SMD (19000): smd Interface open failed errno is 2 -1
04-03 11:38:10.442 E/Diag_Lib(20120): Diag_LSM_Init: Failed to open handle to diag driver, error = 2
04-03 11:38:10.452 E/auditd (2317): In denial and Property audit_ondenial is set to 1
04-03 11:38:10.452 W/ContextImpl(873): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1699 com.android.server.SEDenialService$AuditFileObserver.onEvent:76 android.os.FileObserver$ObserverThread.onEvent:122 android.os.FileObserver$ObserverThread.observe:-2 android.os.FileObserver$ObserverThread.run:85
These are being generated continuously, all the time.
Any idea what those might be?
Thank you!

Hi. I'm getting the same on XXUOBH7 5.0.2

No idea what they are, but if your S4 is working properly they aren't something you should be worrying about. Enjoy your phone.

I have these aswell, and the device seems to have poor battery life and poor performance!

OB7 what....?
Problems with custom built ROM belong in respective thread.
Seems like this one is a double post (which is not really appreciated by XDA )
http://forum.xda-developers.com/showthread.php?p=59864728
It's always a good start to be as specific as possible whether it's ROM, kernel or modem OB7 to narrow down the issue.

Related

[Q] CM11 HWA Settings FC

Hi xda,
I've been reading the defy section for quite a while now, and love whats happening to the Defy! Thanks to everyone involved.
I have a problem with the HWA Settings, whenever I open them and whatever I do (scroll or uncheck an app), I get a forced closed notification. I am really running low on RAM and would love to disable HWA for a couple of apps, but am unable to do so.
Has anyone experienced a similar behaviour in the past and can recommend a procedure?
I am currently on 20140610, same problem occured to me with 20140518.
Thanks for all hints. If this is a yet unknown behaviour, I'll see if I can get any useful logs.
Cheers
Have you done a clean install means wiped data, cache and dalvik before install the new ROM? Because of I dont have such problems with the newest CM11 ROMs. At the other hand you could try to disable hwa for some apps with the terminal app. I can remember vaguely such a command exists but I dont know the precise writing anymore, sorry. Maybe someone with more profound knowledge can help you out.
Thank you for the hint.
Just in case anyone else is facing this issue and looking for a manual workaround, just create empty files inside /data/local/hwui.deny/ and fix the permissions (likely chown system:system and chmod 600).
e.g.
Code:
cd /data/local/hwui.deny/
touch com.android.browser
chmod 600 *
chown system:system *
My system has beed dirty flashed ever since I started using CM 10.2, I actually do not want to try a clean install now, for this minor issue.
The error that I see in logcat is:
Code:
D/AndroidRuntime( 8960): Shutting down VM
W/dalvikvm( 8960): threadid=1: thread exiting with uncaught exception (group=0x415a4ce0)
E/AndroidRuntime( 8960): FATAL EXCEPTION: main
E/AndroidRuntime( 8960): Process: com.cyanogenmod.settings.device.hwa, PID: 8960
E/AndroidRuntime( 8960): java.lang.ClassCastException: android.text.SpannableString cannot be cast to java.lang.String
E/AndroidRuntime( 8960): at com.cyanogenmod.settings.device.hwa.PackageListFragment.onItemClick(PackageListFragment.java:191)
E/AndroidRuntime( 8960): at android.widget.AdapterView.performItemClick(AdapterView.java:298)
E/AndroidRuntime( 8960): at android.widget.AbsListView.performItemClick(AbsListView.java:1113)
E/AndroidRuntime( 8960): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2911)
E/AndroidRuntime( 8960): at android.widget.AbsListView$3.run(AbsListView.java:3645)
E/AndroidRuntime( 8960): at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime( 8960): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 8960): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 8960): at android.app.ActivityThread.main(ActivityThread.java:5161)
E/AndroidRuntime( 8960): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 8960): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 8960): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
E/AndroidRuntime( 8960): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
E/AndroidRuntime( 8960): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1618): Force finishing activity com.cyanogenmod.settings.device.hwa/.HwaSettingsActivity
W/ActivityManager( 1618): Activity pause timeout for ActivityRecord{41fdfdc0 u0 com.cyanogenmod.settings.device.hwa/.HwaSettingsActivity t12 f}
I/Timeline( 1893): Timeline: Activity_idle id: [email protected] time:3048164
I/Timeline( 1618): Timeline: Activity_windows_visible id: ActivityRecord{4220a3d0 u0 com.teslacoilsw.launcher/com.android.launcher2.Launcher t1} time:3048618
I/Process ( 8960): Sending signal. PID: 8960 SIG: 9
I/ActivityManager( 1618): Process com.cyanogenmod.settings.device.hwa (pid 8960) has died.
I/WindowState( 1618): WIN DEATH: Window{421c25b0 u0 com.cyanogenmod.settings.device.hwa/com.cyanogenmod.settings.device.hwa.HwaSettingsActivity}
If it is just me, I'll leave it for now, if the problem arises for other users aswell, I'll try to find the upstream code and and hunt the issue down.
HWA Stopped Working
I've tried all sorts of things here.
I note that the folder hwui.deny to which madmuffin refers has no files at all.
I've deleted associated HWA Settings data via app settings.
This error persists in spite of my flashing a new ROM update today.:silly:
@gbossley The folder was empty on my side as well.
Since I manually created these files I havent used HWA Settings, but when I wanted to show the problem to a friend this weekend, HWA Settings worked flawless.
madmuffin said:
@gbossley The folder was empty on my side as well.
Since I manually created these files I havent used HWA Settings, but when I wanted to show the problem to a friend this weekend, HWA Settings worked flawless.
Click to expand...
Click to collapse
Could I trouble you for a file please - exactly as you've loaded into the folder? I'll PM you.
gbossley said:
Could I trouble you for a file please - exactly as you've loaded into the folder? I'll PM you.
Click to expand...
Click to collapse
The files are completely empty. If you use a Unix-like O/S like Linux, you can use the touch command on the prompt. Or you can just create an empty textfile using any method you like.
I did not upload the files from anywhere, I created them on the device.
Side note: I believe that it doesn't even matter. They might as well contain something. I believe the system only reads the list of files from that folder and processes that list. It won't check the contents or open the files.
Progress!
Thanks to Madmuffin, and a bit of tenacity (?), I see progress.
When looking at HWA Settings, under each app the file name to be managed is shown.
EG. for Aero Control, the file name will be com.aero.control
For ASR (a voice-recorder app) the file name is com.nll.asr
I used ROM Toolbox because with it you can use ROM Browser, navigate to the folder /data/local/hwui.deny/ and press New to create a new blank file with the appropriate names (as for Aero Control or ASR examples above).
So I created three blank files for three of the apps that I want to turn acceleration off for.
Now HWA shows those three files as deselected! However, it still stops working after either trying to turn them back on or turn others off.
So it looks as though I need to create a new blank file for every app that I want to turn off acceleration for.
My only question is "if the app is deselected per the above process, is acceleration actually turned off?" How could I test?
As Advised by Madmuffin, HWA Settings has started working! I'd love to know what logic goes on there...
HWA Not Working (Again)
I upgraded my ROM - TO Quarx CM11 (0607). HWA now not working again.
The HWUI.Deny folder has a heap of blank files in it.
Ideas?
gbossley said:
I upgraded my ROM - TO Quarx CM11 (0607). HWA now not working again.
Click to expand...
Click to collapse
Is the HWA Settings app not working or is hardware acceleration not disabled for the apps previously deselected?
gbossley said:
The HWUI.Deny folder has a heap of blank files in it.
Click to expand...
Click to collapse
What do you mean by "blank files"? The files in the folder are empty files by design and need no content.
madmuffin said:
Is the HWA Settings app not working or is hardware acceleration not disabled for the apps previously deselected?
What do you mean by "blank files"? The files in the folder are empty files by design and need no content.
Click to expand...
Click to collapse
Sorry, I could have been more specific.
The EMPTY files are there. If I try to make any changes "Unfortunately, Hwa Settings has stopped".
220
gbossley said:
Sorry, I could have been more specific.
The EMPTY files are there. If I try to make any changes "Unfortunately, Hwa Settings has stopped".
Click to expand...
Click to collapse
Well thats the previously observed behaviour of the HWA Settings App. I guess it will start to work after a while again, just like it did before. Since I do not need to make any changes, I usually don't even open up the app.
This seems to be a bug in HWA Settings App, but to be honest, I do not really care to much.
madmuffin said:
Code:
E/AndroidRuntime( 8960): Process: com.cyanogenmod.settings.device.hwa, PID: 8960
E/AndroidRuntime( 8960): java.lang.ClassCastException: android.text.SpannableString cannot be cast to java.lang.String
E/AndroidRuntime( 8960): at com.cyanogenmod.settings.device.hwa.PackageListFragment.onItemClick(PackageListFragment.java:191)
Click to expand...
Click to collapse
Hi,
when searching for this error message I found this:
http://stackoverflow.com/questions/11041973/why-cant-i-pass-data-via-intent
It was because getText() needs to have a 'toString()' at the end. Without this 'toString()', it will crash on Android 4.x, but will work on Android 2.x.
Click to expand...
Click to collapse
According to answer #4 this should help, the patch is _not_ compile-tested:
Code:
--- a/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java 2014-05-25 14:34:36.115629433 +0200
+++ b/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java 2014-07-21 18:44:53.271472949 +0200
@@ -189,7 +189,7 @@
.findViewById(R.id.hwa_settings_enabled);
boolean enableHwa = !hwaCheck.isChecked();
String packageName = (String) ((TextView) view
- .findViewById(R.id.hwa_settings_packagename)).getText();
+ .findViewById(R.id.hwa_settings_packagename)).getText().toString();
Intent service = new Intent(mContext, HwaSettingsService.class);
service.putExtra(PackageListProvider.PACKAGE_NAME, packageName);
service.putExtra(PackageListProvider.HWA_ENABLED, enableHwa);
sevenrock said:
Hi,
when searching for this error message I found this:
http://stackoverflow.com/questions/11041973/why-cant-i-pass-data-via-intent
According to answer #4 this should help, the patch is _not_ compile-tested:
Code:
--- a/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java 2014-05-25 14:34:36.115629433 +0200
+++ b/packages/apps/HwaSettings/src/com/cyanogenmod/settings/device/hwa/PackageListFragment.java 2014-07-21 18:44:53.271472949 +0200
@@ -189,7 +189,7 @@
.findViewById(R.id.hwa_settings_enabled);
boolean enableHwa = !hwaCheck.isChecked();
String packageName = (String) ((TextView) view
- .findViewById(R.id.hwa_settings_packagename)).getText();
+ .findViewById(R.id.hwa_settings_packagename)).getText().toString();
Intent service = new Intent(mContext, HwaSettingsService.class);
service.putExtra(PackageListProvider.PACKAGE_NAME, packageName);
service.putExtra(PackageListProvider.HWA_ENABLED, enableHwa);
Click to expand...
Click to collapse
Sevenrock if you posted this to assist me in some way thanks. However, I'm an ignoramus! How do I use this information? I haven't the faintest clue!:silly:

[Q] NFC problems in CM12-based mods with klte/g900f

Hi,
the mod threads for the various cm12 builds claim that NFC is working, and there are also several user replies with reports that it works fine. Yet it doesn't work correctly for me, and at least some others: The device reports that NFC is working, I can activate and deactivate it, but accessing cards only works partially or not at all. The funny thing is that after flashing cm12, restoring an old cm11 nandroid backup does not restore NFC functionality. It doesn't matter if I do a clean install/full wipe. With Lollipop TW roms (I've tried XtreStoLite), NFC works fine.
I'll try to keep this top post up to date. Last update: 2015/03/15
We've found the issue that caused the major part of the problems. A configuration file must be adapted to the latest firmware. (update.zip version) This fix has been accepted upstream and is included in nightlies starting from 20150316.
There are cards/tags that still don't work, but do with stock, though. I've tested:
German eID (works)
Mifare Ultralight (works)
Beam (works)
EMV (works)
Mifare Classic (e.g. German "Mensacard", membership card from gym / McFit, ..) does not work. See below for debug output of libncf-nci.
Hi there,
I have exactly the same problem. NFC doesn't work for me neither. My device is a G900F from Germany, bought via Amazon using Euphoria OS which is based on CM12.
Ah, and just to get that straight, european G900F is klte without any other letters, right?
This post is obsolete: The problem is very likely not kernel-driver related.
I investigated a bit if the Kernel could be the problem. For this, I took the amplitude_rw kernel (based on Samsung's, but available from github) and Ktoonsez's version of the CM12 kernel . Both use the same version of the pn547 driver. The nfc-nci driver differs, but it doesn't make any difference if I copy the files over from the Samsung-based version and recompile. (The driver is disabled in the CM kernel by default anyway, I tried to enable it, of course. If I additionaly copy the related .so files from the Samsung rom that doesn't change anything either.) Continuing to investigate the differences, I noticed that the other difference is that the CM kernel has a hack that prevents the bcm2079x from being loaded on non-900P/I variants. I removed that line and noticed that the probe function of the driver did not complain that the device was missing, though from the looks of the code it would if it wasn't there. With that in mind, I tried to copy the bcm2079x firmware, configuration and .so files from a CM12 sprint build, but that didn't resolve the problem either.
More info: I've also compiled Ktoonsez's kernel with NFC_DEBUG set, and enabled the dynamic debug output for the driver. Doesn't look helpful to me, but for the sake of completeness:
Code:
<7>[ 967.651230] pn547_dev_open : 10,60
<6>[ 967.662071] pn547_dev_ioctl power on, irq=1
<6>[ 967.762268] pn547_dev_ioctl power off, irq=0
<6>[ 967.884563] pn547_dev_ioctl power on, irq=1
<6>[ 967.887970] pn547 : + w
<7>[ 967.888021] pn547_dev_write : writing 4 bytes.
<6>[ 967.889048] pn547 : - w
<7>[ 967.889159] pn547_dev_read : reading 3 bytes. irq=0
<6>[ 967.889218] pn547 : + r
<6>[ 967.889264] pn547: wait_event_interruptible : in
<6>[ 967.918905] pn547 : call
<6>[ 967.919127] pn547 : h
<6>[ 967.919655] pn547: i2c_master_recv
<7>[ 967.919741] pn547_dev_read : reading 3 bytes. irq=1
<6>[ 967.919793] pn547 : + r
<6>[ 967.920168] pn547: i2c_master_recv
<6>[ 967.921893] pn547 : + w
<7>[ 967.921938] pn547_dev_write : writing 3 bytes.
<6>[ 967.922314] pn547 : - w
<6>[ 967.922474] pn547 : call
<7>[ 967.922664] pn547_dev_read : reading 3 bytes. irq=1
<6>[ 967.922709] pn547 : + r
<6>[ 967.923138] pn547: i2c_master_recv
.. etc ..
<6>[ 998.860380] pn547: i2c_master_recv
<6>[ 998.873274] pn547_dev_ioctl power off, irq=0
During the log, I've had an NFC test application open and an NFC tag close to the device.
Last, I tried to check what's the problem with copying Samsung's files. If I use their NfcNci.adb, logcat throws
Code:
E/AndroidRuntime( 2655): FATAL EXCEPTION: main
E/AndroidRuntime( 2655): Process: com.android.nfc, PID: 2655
E/AndroidRuntime( 2655): java.lang.NoSuchMethodError: No static method isProductShip()I in class Landroid/os/Debug; or its super classes (declaration of 'android.os.Debug' appears in /system/framework/framework.jar)
E/AndroidRuntime( 2655): at com.android.nfc.NfcService.<clinit>(NfcService.java:164)
E/AndroidRuntime( 2655): at com.android.nfc.NfcApplication.onCreate(NfcApplication.java:61)
E/AndroidRuntime( 2655): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
E/AndroidRuntime( 2655): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
E/AndroidRuntime( 2655): at android.app.ActivityThread.access$1600(ActivityThread.java:147)
E/AndroidRuntime( 2655): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1357)
E/AndroidRuntime( 2655): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 2655): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 2655): at android.app.ActivityThread.main(ActivityThread.java:5256)
E/AndroidRuntime( 2655): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 2655): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 2655): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
E/AndroidRuntime( 2655): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
After doing some more digging, I discovered that running
Code:
setprop nfc.nxp_log_level_global 3
as root enables tons of debug messages.
Maybe it's the firmware
Obsolete: This is unlikely. Its only Mifare cards that don't work, and the protocols are, as far as I can see, implemented in the userland library.
I noticed that after enabling NFC, one of the logcat outputs is
Code:
D/NxpHal ( 1081): FW version for FW file = 0x118
D/NxpHal ( 1081): FW version from device = 0x8011f
D/NxpHal ( 1081): FW image older than device's, skip update
Maybe this helps. (Could anyone with working NFC check which FW their device has? Should work the same way: Run setprop.. as root, enable NFC, search logcat output for the FW info, then reset the log level to 0.)
Mifare cards
I further noticed that holding a Mifare card near the antenna does trigger a reaction:
Code:
D/NxpTml ( 2317): PN547 - I2C Read successful.....
D/NxpNciR ( 2317): len = 23 > 61051401808000FF010904000454566739010800000000
D/NxpTml ( 2317): PN547 - Posting read message.....
D/NxpHal ( 2317): read successful status = 0x0
D/NxpHal ( 2317): NxpNci: RF Interface = MIFARE
D/NxpHal ( 2317): NxpNci: Protocol = MIFARE
D/NxpHal ( 2317): NxpNci: Mode = A Passive Poll
D/NxpExtns( 2317): const CNfcParam* CNfcConfig::find(const char*) const found MIFARE_READER_ENABLE=(0x1)
D/NxpTml ( 2317): PN547 - Write requested.....
D/NxpTml ( 2317): PN547 - Invoking I2C Write.....
D/NxpTml ( 2317): PN547 - Read requested.....
D/NxpTml ( 2317): PN547 - Invoking I2C Read.....
D/NxpNciX ( 2317): len = 7 > 20020401800100
D/NxpTml ( 2317): PN547 - I2C Write successful.....
D/NxpTml ( 2317): PN547 - Posting Fresh Write message.....
D/NxpTml ( 2317): PN547 - Tml Writer Thread Running................
D/NxpHal ( 2317): write successful status = 0x0
D/NxpTml ( 2317): PN547 - I2C Read successful.....
D/NxpNciR ( 2317): len = 4 > 40020106
D/NxpTml ( 2317): PN547 - Posting read message.....
D/NxpHal ( 2317): read successful status = 0x0
D/NxpHal ( 2317): > Deinit workaround for LLCP set_config 0x0 0x0 0xa
D/NxpHal ( 2317): phNxpNciHal_print_res_status: response status =STATUS_OK
D/NxpTml ( 2317): PN547 - Read requested.....
D/NxpTml ( 2317): PN547 - Invoking I2C Read.....
But nothing ever shows up in an NFC test app and I have to deactivate and reactivate NFC at this point to scan any of the working smartcards. So likely something in the mifare reader code does not work.
No NFC for me either
Running yesterday's nightly 20150310 on klte, no NFC either.
Any news? I have a SM-G900F and am unable to read NFC tags since updating to CM12 (now using 20150313).
My NFC was gone too after I updated to the latest nightly yesterday. It appears that copying the firmware file and configuration from XtreStoLite fixed that, and that I'm back to the situation I described in the top post again now. I'll attach both files (in one archive). They should be placed in the according directories in the /system partition, i.e.
etc/libnfc-nxp.conf -> /system/etc/libnfc-nxp.conf
system/vendor/firmware/libpn547_fw.so -> system/vendor/firmware/libpn547_fw.so
Could you test if copying them & rebooting (partially) restores NFC for you, too? (This should be possible with a file manager like X-Plore) If you don't want to use my archive, download XtreStoLite and extract the same files from their zip. Flashing CM should restore the original files in any case.
FirebirdDE said:
My NFC was gone too after I updated to the latest nightly yesterday. It appears that copying the firmware file and configuration from XtreStoLite fixed that, and that I'm back to the situation I described in the top post again now. I'll attach both files (in one archive). They should be placed in the according directories in the /system partition, i.e.
etc/libnfc-nxp.conf -> /system/etc/libnfc-nxp.conf
system/vendor/firmware/libpn547_fw.so -> system/vendor/firmware/libpn547_fw.so
Could you test if copying them & rebooting (partially) restores NFC for you, too? (This should be possible with a file manager like X-Plore) If you don't want to use my archive, download XtreStoLite and extract the same files from their zip. Flashing CM should restore the original files in any case.
Click to expand...
Click to collapse
Hey, that actually worked! I tried with an NFC reader app, and my nfc tag popped up right away.
So now we're missing only flashable zip
I will try this one and if it will work, I will try my scripting luck
And here it is, enjoy
I believe that it might suffice to update the configuration file. According to the logs, at least on my phone, the firmware file isn't used anyway.
FirebirdDE said:
My NFC was gone too after I updated to the latest nightly yesterday. It appears that copying the firmware file and configuration from XtreStoLite fixed that, and that I'm back to the situation I described in the top post again now. I'll attach both files (in one archive). They should be placed in the according directories in the /system partition, i.e.
etc/libnfc-nxp.conf -> /system/etc/libnfc-nxp.conf
system/vendor/firmware/libpn547_fw.so -> system/vendor/firmware/libpn547_fw.so
Could you test if copying them & rebooting (partially) restores NFC for you, too? (This should be possible with a file manager like X-Plore) If you don't want to use my archive, download XtreStoLite and extract the same files from their zip. Flashing CM should restore the original files in any case.
Click to expand...
Click to collapse
WOHOOOO! Thank you very much. My klte's NFC stopped working after flashing some alpha CM12. Some days ago I flashed cm-12-20150310-NIGHTLY-klte and the NFC problem remained. Now I replaced /etc/libnfc-nxp.conf with the config file you attached and NFC is working again.
Great! I've submitted this upstream, hopefully they'll accept this. It would be good to get feedback from someone who didn't experience any NFC issues in the first place, though, to make sure that this does not break NFC for anyone.
How awesome. NFC is really stable too and I think we have found the fix. I belive that many galaxy s5 CM12 users will be happy
Seems like the fix will be in the next nightly, too.
Still some Problems
Hello,
first at all thanks for your research!
I installed your fix for the NFC (tried both zip and "self" copy) but NFC is not working correct:
* sometimes when enable/disable NFC i get a sound (not allways)
* When i scan a tag (the first time after enabling nfc) i get a sound for scanning, but NFC TagInfo and Tagstand Writer did not recognize the tag.
* Sometimes NFC TagInfo by NXP is working but one one time... (hard to explain, often the scanning works when i open the settings?)
* The Scanning works only once till i deaktivate/active NFC
I used the the fix with cyanogenmod nightly 14-03-2015 and now with the Unofficial build [ROM] CyanogenMod 12.0 | Android 5.0 Lollipop | [03/13/2015]
Also installed the latest Xposed framwork and SELinux "Permissive" ...
Any ideas?
Thanks in advance
Which variant do you have? (I, and afaik all others that reported here, have a g900f)
What kind of NFC tag do you try to scan? (As I've already written in the top post, Mifare Classic does not work.)
The relevant logcat (see a few posts up, I've posted a setprop-command that enables debug output) would also be interesting.
Btw., the only sound I get is for the recognition of a NFC chip and its removal. Enabling/disabling makes no sound whatsoever.
FirebirdDE said:
Which variant do you have? (I, and afaik all others that reported here, have a g900f)
What kind of NFC tag do you try to scan? (As I've already written in the top post, Mifare Classic does not work.)
The relevant logcat (see a few posts up, I've posted a setprop-command that enables debug output) would also be interesting.
Btw., the only sound I get is for the recognition of a NFC chip and its removal. Enabling/disabling makes no sound whatsoever.
Click to expand...
Click to collapse
What i forgot i have G900F
Sometimes i really got sound for enable/disable!?!
Hard to tell you what type of NFC tag i use, bacuse i cannot read them at all.
I tried
* a writable tag from androidbands.com
* a company card
* a skiing card
I will try to logcat later this day....
FirebirdDE said:
Which variant do you have? (I, and afaik all others that reported here, have a g900f)
What kind of NFC tag do you try to scan? (As I've already written in the top post, Mifare Classic does not work.)
The relevant logcat (see a few posts up, I've posted a setprop-command that enables debug output) would also be interesting.
Btw., the only sound I get is for the recognition of a NFC chip and its removal. Enabling/disabling makes no sound whatsoever.
Click to expand...
Click to collapse
Here is a loccat (created with logcat extrem app - currently no adb available for me)
Actions:
Activate NFC // Scann androidbrands.com Tag // Deactivate NFC
Looks like problems with the "libpn547_fw":
Code:
Line 191: D/NxpFwDnld( 447): @@@/system/vendor/firmware/libpn547_fw.so
Line 193: E/NxpFwDnld( 447): NULL handler : unable to load the library file, specify correct path
Line 199: E/NxpFwDnld( 447): Image extraction Failed - invalid imginfo or imginfolen!!
Line 201: E/NxpFwDnld( 447): Error loading libpn547_fw !!
Line 209: E/NxpHal ( 447): Wrong FW Version >>> Firmware download not allowed
The file exists in "/system/vendor/firmware/libpn547_fw.so" with "rw-rw----"
ostauss said:
Here is a loccat (created with logcat extrem app - currently no adb available for me)
Actions:
Activate NFC // Scann androidbrands.com Tag // Deactivate NFC
Looks like problems with the "libpn547_fw":
Code:
Line 191: D/NxpFwDnld( 447): @@@/system/vendor/firmware/libpn547_fw.so
Line 193: E/NxpFwDnld( 447): NULL handler : unable to load the library file, specify correct path
Line 199: E/NxpFwDnld( 447): Image extraction Failed - invalid imginfo or imginfolen!!
Line 201: E/NxpFwDnld( 447): Error loading libpn547_fw !!
Line 209: E/NxpHal ( 447): Wrong FW Version >>> Firmware download not allowed
The file exists in "/system/vendor/firmware/libpn547_fw.so" with "rw-rw----"
Click to expand...
Click to collapse
changed permissions to "rw-rw-r--" looks like lib is correctly loaded, but scanned androidbands.com Tag still not recognized by TagInfo...

[Q] Can't turn on neither wifi nor bluetooth

I've been reading a lot over the web to find information about this issue I'm having, but by no means I could solve this issue.
I just got my S5. Here's a (very short) excerpt of the
Code:
adb shell dumpstate
command:
Code:
[ril.product_code]: [SM-G900MZWPZTO]
[ro.product.model]: [SM-G900M]
When I got the phone, the first thing I did, as it was used, was to factory-reset it, because I didn't want any data from the previous user. I did this through the phone UI, not from within recovery (wipe cache/wipe data).
Once reset was done, I put in my microSIM and turned it back on. I had no way to test wifi and bluetooth at that point, so I used the mobile network to update my personal info, etc.
By the end of the day, I got home and tried to turn on wireless. The normal behavior of the indicator when turning wifi on is GRAY->DARK GREEN->GREEN, but the phone goes GRAY->DARK GREEN and doesn't go further. It stays in DARK GREEN for a couple minutes, then it goes back to GRAY.
The same happens to bluetooth. The only difference is that bluetooth takes less time to go back to GRAY.
The Android version installed was 4.2.2.
There was an offer to update Android, so I thought that could solve the problem, so I updated Android to 5.0 over mobile network (no wifi, remember?).
After the update, wifi still didn't work. By dialing *#1234#, I noticed this:
Code:
AP: G900MUBU1BOC4
CP: G900MUBU1BOC3
CSC: G900MZTO1BOC4
AP and CP are different. Shouldn't they be equal?
Anyway, after seeing the update didn't solve the problem, I did a downgrade, again with no success. The *#1234# now shows this:
Code:
AP: G900MUBU1ANCE
CP: G900MUBU1ANCE
CSC: G900MZTO1ANCE
Wifi still don't go on.
I also tried to flash two Android 5.0 (Lollipop) versions available to my country (got them from sammobile dot com):
Code:
/firmwares/download/45787/G900MUBU1BOC4_G900MZTO1BOC4_ZTO/
Code:
/firmwares/download/44412/G900MUBU1BOC1_G900MZTO1BOC1_ZTO/
None worked.
I used ODIN for all updates. Some background on how to use ODIN can be found here:
www dot droidforums dot net threads guide-complete-samsung-odin-v3-xx-options-and-reference.278159
While inspecting the phone's dumpstate, I found this:
Code:
01-01 10:56:42.519 732 967 E WifiHW : ##################### set firmware type 0 #####################
01-01 10:56:42.519 252 914 I WifiHW : wifi_change_fw_path(): fwpath = /system/etc/wifi/bcmdhd_sta.bin
01-01 10:56:42.519 252 914 E WifiHW : Cannot open "/data/.cid.info": No such file or directory
01-01 10:56:42.519 252 914 I WifiHW : wifi_change_nvram_path() = /system/etc/wifi/nvram_net.txt
01-01 10:56:42.519 252 914 E WifiHW : TEMP_FAILURE_RETRY complete
.
.
.
01-01 10:56:42.529 732 967 E WifiStateMachine: Unable to change interface settings: java.lang.IllegalStateException: command '16
01-01 10:56:42.529 732 967 E WifiHW : supplicant_name : p2p_supplicant
01-01 10:56:42.529 732 967 D WifiMonitor: startMonitoring(wlan0) with mConnected = false
The following also appears from time to time along the log:
Code:
01-01 10:56:53.549 732 967 E WifiHW : Supplicant not running, cannot connect
I read a lot about wifi connections dropping, but none about not being able to turn on wifi on Samsung Galaxy S5. Got to some similar threads on S4 and previous versions, but none about S5, so I decided to post here.
Some questions arises:
1. Am I the only one having this issue?
2. Can it be hardware-related? And if yes, is there any way to check this?
3. Could the Factory Reset have done something nasty to wifi config files? I read some suggestions to erase wpa_supplicant config files.
4. When flashing a new rom, is any data kept inside the phone or everything is erased?
5. Is there a way to reset the wifi only or updating its firmware?
Thanks for helping!
There could be 3 causes for this...
1. Kernel WIFI modules doesn't match the kernel.
2. Hardware problem
3. Not sure about this since I'm just new to samsung but it could also be from a corrupt EFS partition.
But to further troubleshoot this problem can you do this for me?
1. Install terminal emulator from playstore.
2. execute this command from there
Code:
svc wifi enable
See if it shows some errors, warnings or whatever text it will print.
if not type logcat and paste here the last 100 to 150 lines of the output.
htimsxela said:
I've been reading a lot over the web to find information about this issue I'm having, but by no means I could solve this issue.
I just got my S5. Here's a (very short) excerpt of the
Code:
adb shell dumpstate
command:
Code:
[ril.product_code]: [SM-G900MZWPZTO]
[ro.product.model]: [SM-G900M]
When I got the phone, the first thing I did, as it was used, was to factory-reset it, because I didn't want any data from the previous user. I did this through the phone UI, not from within recovery (wipe cache/wipe data).
Once reset was done, I put in my microSIM and turned it back on. I had no way to test wifi and bluetooth at that point, so I used the mobile network to update my personal info, etc.
By the end of the day, I got home and tried to turn on wireless. The normal behavior of the indicator when turning wifi on is GRAY->DARK GREEN->GREEN, but the phone goes GRAY->DARK GREEN and doesn't go further. It stays in DARK GREEN for a couple minutes, then it goes back to GRAY.
The same happens to bluetooth. The only difference is that bluetooth takes less time to go back to GRAY.
The Android version installed was 4.2.2.
There was an offer to update Android, so I thought that could solve the problem, so I updated Android to 5.0 over mobile network (no wifi, remember?).
After the update, wifi still didn't work. By dialing *#1234#, I noticed this:
Code:
AP: G900MUBU1BOC4
CP: G900MUBU1BOC3
CSC: G900MZTO1BOC4
AP and CP are different. Shouldn't they be equal?
Anyway, after seeing the update didn't solve the problem, I did a downgrade, again with no success. The *#1234# now shows this:
Code:
AP: G900MUBU1ANCE
CP: G900MUBU1ANCE
CSC: G900MZTO1ANCE
Wifi still don't go on.
I also tried to flash two Android 5.0 (Lollipop) versions available to my country (got them from sammobile dot com):
Code:
/firmwares/download/45787/G900MUBU1BOC4_G900MZTO1BOC4_ZTO/
Code:
/firmwares/download/44412/G900MUBU1BOC1_G900MZTO1BOC1_ZTO/
None worked.
I used ODIN for all updates. Some background on how to use ODIN can be found here:
www dot droidforums dot net threads guide-complete-samsung-odin-v3-xx-options-and-reference.278159
While inspecting the phone's dumpstate, I found this:
Code:
01-01 10:56:42.519 732 967 E WifiHW : ##################### set firmware type 0 #####################
01-01 10:56:42.519 252 914 I WifiHW : wifi_change_fw_path(): fwpath = /system/etc/wifi/bcmdhd_sta.bin
01-01 10:56:42.519 252 914 E WifiHW : Cannot open "/data/.cid.info": No such file or directory
01-01 10:56:42.519 252 914 I WifiHW : wifi_change_nvram_path() = /system/etc/wifi/nvram_net.txt
01-01 10:56:42.519 252 914 E WifiHW : TEMP_FAILURE_RETRY complete
.
.
.
01-01 10:56:42.529 732 967 E WifiStateMachine: Unable to change interface settings: java.lang.IllegalStateException: command '16
01-01 10:56:42.529 732 967 E WifiHW : supplicant_name : p2p_supplicant
01-01 10:56:42.529 732 967 D WifiMonitor: startMonitoring(wlan0) with mConnected = false
The following also appears from time to time along the log:
Code:
01-01 10:56:53.549 732 967 E WifiHW : Supplicant not running, cannot connect
I read a lot about wifi connections dropping, but none about not being able to turn on wifi on Samsung Galaxy S5. Got to some similar threads on S4 and previous versions, but none about S5, so I decided to post here.
Some questions arises:
1. Am I the only one having this issue?
2. Can it be hardware-related? And if yes, is there any way to check this?
3. Could the Factory Reset have done something nasty to wifi config files? I read some suggestions to erase wpa_supplicant config files.
4. When flashing a new rom, is any data kept inside the phone or everything is erased?
5. Is there a way to reset the wifi only or updating its firmware?
Thanks for helping!
Click to expand...
Click to collapse
I believe, (Don't quote me on this), if the EFS partition was corrupted or lost, the phone would not have any radio functionality including voice and text etc
Also I 'think' the IMEI is also included on that partition, so *#06# should come up blank if it was the EFS partition causing the problem
But again, this is just what I've also picked up in the short time I've been with my S5 so could be missing something
[Solved], but the hard way
I took the device to Samsung and they said there was a problem on the main board (?), so they replaced it for a new one. I don't think I'm going to complain about it. Although I think that could be fixed somehow, replacing was probably easier. I said "the hard way" on the title, meaning it was a "brute force" fix. It is a pity I wasn't able to keep the old board for experimentation...
Thanks for your replies, guys. I didn't even expect replies and got yours and so complete! Thanks a lot!

sensors (acceleration gyroscope orientation etc) issues, nv data dump request

Hello,
i got a D802 phone which apparently has some sensors disabled in some way. When apps try to use them (so the system see them as existent) they fail or crash.
here some example log:
-Orientation:
Code:
W/OrientationEventListener( 957): Cannot detect sensors. Invalid disable
-Calibration:
Code:
E/AndroidRuntime( 7456): java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.Sensor.getType()' on a null object reference
E/AndroidRuntime( 7456): at com.qualcomm.sensors.sensortest.SensorID$SensorTyp e.getSensorType(SensorID.java:61)
E/AndroidRuntime( 7456): at com.android.settings.lge.MotionSensorCalibration$C alThreadRunnable.run(MotionSensorCalibration.java: 228)
E/AndroidRuntime( 7456): at java.lang.Thread.run(Thread.java:818)
-Gravity:
Code:
I/SensorManager(14094): registerListenerImpl() [Sensor: LGE Gravity Sensor, Rate: 200000, SensorEventListener: [email protected]] by com.kfodor.MySensors.SensorView.registerSensorListener():735
D/sensors_hal_SAM( 949): batch:sensor(android.sensor.gravity) handle:29 freq:1 report_rate:1 max:1.000000 min:0.000000
D/sensors_hal_Gravity( 949): enable: handle=29
D/sensors_hal_Gravity( 949): enable: handle=29, freq=1 report_rate=1 batch_rate=0 batched=0 wakeup 0
D/sensors_hal_Gravity( 949): enable: handle=29 synchronous req
I/sensors_hal_SAM( 949): sendEnableReq:sensor(android.sensor.gravity) Sending enable to svc no:20
E/Sensors ( 474): sns_acm_mr.c(776):Request made to disabled service
E/Sensors ( 474): sns_main.c(1331):Error writing request. sns_err 3 error 0 qmi_err 0
E/sensors_hal_Gravity( 949): processResp: Msg 2; Result: 1, Error: 3
D/sensors_hal_Gravity( 949): enable: Received Response: 1
-Acceleration:
Code:
I/sensors_hal_SAM( 949): sendEnableReq:sensor(android.sensor.linear_acceleration) Sending enable to svc no:20
E/Sensors ( 474): sns_acm_mr.c(776):Request made to disabled service
E/Sensors ( 474): sns_main.c(1331):Error writing request. sns_err 3 error 0 qmi_err 0
E/sensors_hal_LinearAccel( 949): processResp: Msg 2; Result: 1, Error: 3
-Rotation:
Code:
I/sensors_hal_SAM( 949): sendEnableReq:sensor(android.sensor.rotation_vector) Sending enable to svc no:18
E/Sensors ( 474): sns_acm_mr.c(776):Request made to disabled service
E/Sensors ( 474): sns_main.c(1331):Error writing request. sns_err 3 error 0 qmi_err 0
E/sensors_hal_RV( 949): processResp: Msg 2; Result: 1, Error: 3
I/SensorManager(14094): removeAllSensors() [Sensor: LGE Rotation Vector Sensor] by com.kfodor.MySensors.SensorView.registerSensorListener():732
I followed a lot of paths to find a solution, different distributions and full revert to all available stock versions. no way.
As my last trial I want to try to compare my NV data with a working one to search for some misconfigured parameter.
I found a great guide on how to access and extract all NV parameters and save to a text file, here:
http://www.droidviews.com/how-to-bac...imei-on-lg-g2/
As you can see, the guide is for changing IMEI, but the application permit to dump all parameters to a file.
I ask some good man to send me his dump. or i can send mine and get the differences. Because this file contains sensitive data, they should be removed (IMEI, S/N, MAC) even if i am not interested in stealing ids!
I have a D802 32GB.
thank you to everyone, hope to receive some useful feedback!.
Fabio T

GPS for your Nook?

Maybe you've thought, "Oh, if only I had GPS on me ereader I could have it log locations so that it could tell me exactly where I read the last page of Jane Eyre".
Or you could use it for hiking/mapping applications.
I presume that this thread will be more for amusement than actual instruction.
I have a Glow3. I prefer Glow2's for normal reading.
I have a GPS module, the GP-2106.
It's small, not being sold anymore.
The lower corner of the Glow3 PCB is only ground plane with no traces.
You can cut out a bunch of it, then you have about 1/4" depth to put stuff.
The only accessible UART is UART4 (/dev/ttymxc3) since we want to keep the original console in place.
That UART is not already configured or existing as a /dev/
The GP-2106 uses 1.8V interfaces and supply.
I modified the kernel (not rebuilt, just hex modified) to initialize UART4.
I stole 1.8V power supply off a bus.
Currently I am using this directly in an application and not implemented as a LocationProvider (yet).
I have a JNI NDK thread that reads the NMEA data and parses it.
Shown is my own little hiking app that uses my own KML maps.
(On other devices I use this with the standard built-in LocationProvider.)
Yes, the grab is in color, although the Nook is obviously black & white.
That's a bit of a con, but the visibility in bright sunlight is a plus.
So, I took a look at how the whole Android GPS worked.
In the Secure settings you have:
location_providers_allowed = gps
location_mode = 3 (3 = high accuracy, 0 = off)
In /system/framework/framework.jar is android.location.LocationManager
In /system/framework/services.jar is com.android.server.location.GpsLocationProvider
This tries to read /etc/gps.conf (which gives you network resources like NTP and is not strictly required, it's not present)
This uses native code like "native_agps_..." in:
/system/lib/libandroid_servers.so
This uses hw_get_module() in:
/system/lib/libhardware.so
Which uses a search for hardware HAL modules to load, like
/system/lib/hw/gps.default.so
Which does not exist on our Glows
I made a junk file and libhardware.so does try to load it (and fails)
Code:
E/HAL ( 2461): load: module=/system/lib/hw/gps.default.so
E/HAL ( 2461): dlopen failed: "/system/lib/hw/gps.default.so" is too small to be an ELF executable
There are some projects out there for building a generic gps.default.so
FWIW, the whole meat of GPS is in this file, i.e. NMEA decoders, callbacks...
I'll be trying to do that later.
Edit: Well, I built a gps.default.so and it seems to work fine, but somewhere along the way I misplaced my serial port.
In any case:
Code:
GPS: [email protected]
Renate NST said:
So, I took a look at how the whole Android GPS worked.
In the Secure settings you have:
location_providers_allowed = gps
location_mode = 3 (3 = high accuracy, 0 = off)
In /system/framework/framework.jar is android.location.LocationManager
In /system/framework/services.jar is com.android.server.location.GpsLocationProvider
This tries to read /etc/gps.conf (which gives you network resources like NTP and is not strictly required, it's not present)
This uses native code like "native_agps_..." in:
/system/lib/libandroid_servers.so
This uses hw_get_module() in:
/system/lib/libhardware.so
Which uses a search for hardware HAL modules to load, like
/system/lib/hw/gps.default.so
Which does not exist on our Glows
I made a junk file and libhardware.so does try to load it (and fails)
Code:
E/HAL ( 2461): load: module=/system/lib/hw/gps.default.so
E/HAL ( 2461): dlopen failed: "/system/lib/hw/gps.default.so" is too small to be an ELF executable
There are some projects out there for building a generic gps.default.so
FWIW, the whole meat of GPS is in this file, i.e. NMEA decoders, callbacks...
I'll be trying to do that later.
Edit: Well, I built a gps.default.so and it seems to work fine, but somewhere along the way I misplaced my serial port.
In any case:
Code:
GPS: [email protected]
Click to expand...
Click to collapse
Hi Renate !
I was off grid for some time, so i 'm just taking known of your work. Quite impressive, again.
It's look like a very good news, so you made a custom gps.default.so from scratch ?
not sure to undersand perfectly what you mean about misplaced the seral port, but existing projects about generic serial driver seem use directive based from build.prop like this :
Code:
# Custom GPS driver
ro.kernel.android.gps=ttyS1
ro.kernel.android.gps.speed=9600
ro.kernel.android.gps.max_rate=1
BTW you have make a great improvement of GPS support on the NST !
let us know when you will able to release your work
See you later !
liptonthe said:
misplaced the seral port...
Click to expand...
Click to collapse
Oh, I lost track of where the patches for ttymxc3 were.
I found them, tried the built gps.default.so and it was eating all the CPU.
I'll have to do some debugging.
(The GPS module is pretty crappy, slowest fix that I've ever seen.)
Renate NST said:
Oh, I lost track of where the patches for ttymxc3 were.
I found them, tried the built gps.default.so and it was eating all the CPU.
I'll have to do some debugging.
(The GPS module is pretty crappy, slowest fix that I've ever seen.)
Click to expand...
Click to collapse
All right, i guess it would be too easy that work at the first attempt.
But at least it's a progress, i can relate, UsbGps4Droid is not really a fast fix solution too !
Hi @Renate NST, what's up
Did you fix your issue about CPU comsumtion ?
i'm still interessted to try it on my BNRV300 if you want.
See you later.
liptonthe said:
I'm still interested to try it on my BNRV300 if you want.
Click to expand...
Click to collapse
Yeah, the NST gives you a choice of 1.8V or 3.3V also.
I've been busy on other stuff, but I should get back to this.
Renate NST said:
Yeah, the NST gives you a choice of 1.8V or 3.3V also.
I've been busy on other stuff, but I should get back to this.
Click to expand...
Click to collapse
Hi, Okay thats a good news
i'm availble for trying binary's and confs. Let me know when you are ready.
I realized what the problem was with the lost /dev/ttymxc3
I had bodged it into where the Bluetooth goes and it only worked if you had the WiFi on.
I knew this, but I forgot it.
I've got that working a different way now (but I managed to disable the console accidentally).
So now I'm back to something eating all my CPU.
And the stupid GPS module still hasn't gotten a fix after 15 minutes.
Renate NST said:
I realized what the problem was with the lost /dev/ttymxc3
I had bodged it into where the Bluetooth goes and it only worked if you had the WiFi on.
I knew this, but I forgot it.
I've got that working a different way now (but I managed to disable the console accidentally).
So now I'm back to something eating all my CPU.
And the stupid GPS module still hasn't gotten a fix after 15 minutes.
Click to expand...
Click to collapse
Hi Renate !
It look like i have missed the notification of your last response the 10/03..
I'm working myself on the implementation of the gps.default.so from this project : https://github.com/dipcore/gps-glonass-android-driver
i have pushed + chmod the gps.default.so lib in /system/lib/hw/ and edited the /system/build.prop to add :
Code:
# Custom GPS driver
ro.kernel.android.gps=ttyS1
ro.kernel.android.gps.speed=9600
ro.kernel.android.gps.max_rate=1
But actually i'm not able to see anything loading in logcat or dmesg for the moment.
Maybe you could try yourself with this lib ?
---------- Post added at 11:12 PM ---------- Previous post was at 10:35 PM ----------
Actually i set this value but it's not better.
Code:
sqlite> update secure set value=3 where name='location_mode';
sqlite> update secure set value=0 where name='mock_location';
sqlite> update secure set value='gps' where name='location_providers_allowed';
gps.default.so should be natively loaded by HAL scanner as described in the /system/lib/libhardware.so but i don't see it in logs.
Perhaps
Code:
ls /sys/module
seem show the loading of a "garmin_gps" module
Still loaded when gps.default.so is no present in the system, that's strange !
Code:
# ls /sys/module
kernel
printk
wakelock
userwakelock
earlysuspend
spurious
omap3epfb
keyboard
vt
bridgedriver
scsi_mod
sg
usbcore
usb_storage
usbserial
aircable
ark3116
belkin_sa
ch341
cp2101
cyberjack
cypress_m8
digi_acceleport
io_edgeport
io_ti
empeg
ftdi_sio
funsoft
[B]garmin_gps[/B] <---------------
ipaq
ipw
ir_usb
iuu_phoenix
keyspan
keyspan_pda
kl5kusb105
kobil_sct
mct_u232
mos7720
mos7840
navman
omninet
opticon
option
oti6858
pl2303
safe_serial
sierra
spcp8x5
ti_usb_3410_5052
visor
whiteheat
adutux
berry_charge
iowarrior
ldusb
legousbtower
usbtest
musb_hdrc
mousedev
psmouse
omap_hdq
w1_bq27000
usbhid
binder
lowmemorykiller
snd
snd_timer
snd_pcm
snd_dummy
snd_usb_audio
oprofile
rfkill
pvrsrvkm
omaplfb
bc_example
tiwlan_drv
It loads and correctly accesses the GPS module and decodes the NMEA correctly.
You can see that if you edit gps.h and rebuild it.
Code:
#define GPS_DEBUG 1
//#undef GPS_DEBUG
(You get lots more messages.)
My stupid GPS module was being so annoying. It would take 20 minutes to capture.
I've been looking for a new module, but all the small ones use a stupid scheme where pulsing a pin cycles it through various modes.
You can never tell what mode you're in.
In any case, I was still left with the Android world not getting GPS updates and "top" was showing 99% CPU.
Does yours react this way?
Renate NST said:
It loads and correctly accesses the GPS module and decodes the NMEA correctly.
You can see that if you edit gps.h and rebuild it.
Code:
#define GPS_DEBUG 1
//#undef GPS_DEBUG
(You get lots more messages.)
Click to expand...
Click to collapse
Hum great tips ! I've been able to find and edit the .h file but i'm not common with the rebuilt / compile process of C programs.
did you use GCC, make and stuff to do that ?
In any case, I was still left with the Android world not getting GPS updates and "top" was showing 99% CPU.
Does yours react this way?
Click to expand...
Click to collapse
A quick look on "top" was not showing an overstimulated CPU, maybe it's due to the debug params.
---------- Post added at 02:03 AM ---------- Previous post was at 01:55 AM ----------
I'm using a little app to get somes indicatives values about GPS data.
--> https://apkpure.com/just-gps/net.thenumber42.android.justgps
When i launch it i get a pop-up about "The GPS is not enabled" however i have set the settings.db properly.
This app is running like charm when i use the moc location trick.
Maybe i missed something, when this app is launched the result in logcat is :
Code:
E/LocationManagerService( 1026): requestUpdates got exception:
E/LocationManagerService( 1026): java.lang.IllegalArgumentException: provider=gps
E/LocationManagerService( 1026): at com.android.server.LocationManagerService.requestLocationUpdatesLocked(LocationManagerService.java:863)
E/LocationManagerService( 1026): at com.android.server.LocationManagerService.requestLocationUpdates(LocationManagerService.java:833)
E/LocationManagerService( 1026): at android.location.ILocationManager$Stub.onTransact(ILocationManager.java:79)
E/LocationManagerService( 1026): at android.os.Binder.execTransact(Binder.java:287)
E/LocationManagerService( 1026): at com.android.server.SystemServer.init1(Native Method)
E/LocationManagerService( 1026): at com.android.server.SystemServer.main(SystemServer.java:514)
E/LocationManagerService( 1026): at java.lang.reflect.Method.invokeNative(Native Method)
E/LocationManagerService( 1026): at java.lang.reflect.Method.invoke(Method.java:521)
E/LocationManagerService( 1026): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/LocationManagerService( 1026): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/LocationManagerService( 1026): at dalvik.system.NativeStart.main(Native Method)
I/PowerManagerService( 1026): setPowerState: mPowerState=0x3 newState=0x3 noChangeLights=false reason=2
E/LocationManagerService( 1026): isProviderEnabled got exception:
E/LocationManagerService( 1026): java.lang.IllegalArgumentException: provider=gps
E/LocationManagerService( 1026): at com.android.server.LocationManagerService._isProviderEnabledLocked(LocationManagerService.java:1387)
E/LocationManagerService( 1026): at com.android.server.LocationManagerService.isProviderEnabled(LocationManagerService.java:1361)
E/LocationManagerService( 1026): at android.location.ILocationManager$Stub.onTransact(ILocationManager.java:237)
E/LocationManagerService( 1026): at android.os.Binder.execTransact(Binder.java:287)
E/LocationManagerService( 1026): at dalvik.system.NativeStart.run(Native Method)
---------- Post added at 02:31 AM ---------- Previous post was at 02:03 AM ----------
Also i just found this project dedicated to generic serial GPS driver : https://tinkerboarding.co.uk/forum/thread-671.html && https://github.com/joerg65/libGPS_TinkerBoard
Hmm, do you have secure / location_providers_allowed=gps
My GPS is working (when the GPS module finally captures).
The CPU being eaten is possibly unrelated.
It's the Alarm Manager spamming on an alarm set for the year 2000!
It may be trying to set the time constantly.
If I delete gps.default.so it stops.
But, in any case, the clock is not even syncing to the NMEA.
I tried the beaglebone one, it builds fine and does about the same. Oops, I was rebuilding the first one.
Renate NST said:
Hmm, do you have secure / location_providers_allowed=gps
Click to expand...
Click to collapse
I think it should be good, there is my setup sequence :
Code:
adb connect xxx.xxx.x.x:5555
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb push gps.default.so /system/lib/hw/
adb shell chmod 644 /system/lib/hw/gps.default.so
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update secure set value=3 where name='location_mode';
update secure set value=0 where name='mock_location';
update secure set value='gps' where name='location_providers_allowed';
.q
reboot
But my apps (Oruxmaps or Just GPS) still saying GPS is disabled :/
My GPS is working (when the GPS module finally captures).
Click to expand...
Click to collapse
I'm happy to ear that ! A great improvement I hope reproducing it too.
The CPU being eaten is possibly unrelated.
It's the Alarm Manager spamming on an alarm set for the year 2000!
It may be trying to set the time constantly.
If I delete gps.default.so it stops.
Click to expand...
Click to collapse
A really strange glitch..
But yes it's could be the time updating system, but the alarm.. this is really strange.
But, in any case, the clock is not even syncing to the NMEA.
Click to expand...
Click to collapse
That's strange because that should be updated ! maybe this is a linked to the high power consumtion (infinite retry of time setup after failed attempt ?)
I tried the beaglebone one, it builds fine and does about the same. Oops, I was rebuilding the first one.
Click to expand...
Click to collapse
I'm not sure to understand, do you try the other GPS project's lib ?
---------- Post added at 12:26 AM ---------- Previous post was at 12:24 AM ----------
Maybe you could share me the lib you recompile with log enabled ?
---------- Post added at 12:50 AM ---------- Previous post was at 12:26 AM ----------
It seem this command has no effect in my case :
Code:
sqlite> update secure set value=3 where name='location_mode';
I can't see it in the DB
Code:
sqlite> select * from secure;
1|android_id|1e70509c-cb20-4b12-8ce2-2a3fce741da9
2|bluetooth_on|0
3|data_roaming|1
4|install_non_market_apps|1
5|location_providers_allowed|gps
6|assisted_gps_enabled|1
7|network_preference|1
8|usb_mass_storage_enabled|1
11|wifi_networks_available_notification_on|0
12|preferred_network_mode|0
13|cdma_cell_broadcast_sms|1
14|preferred_cdma_subscription|1
15|mock_location|0
16|backup_enabled|0
17|backup_transport|
18|demo_mode|off
19|wifi_max_restart_supplicant_attempts|3
20|enabled_input_methods|com.android.inputmethod.latin/.LatinIME
26|device_provisioned|1
274|wifi_on|1
277|default_input_method|com.android.inputmethod.latin/.LatinIME
278|adb_enabled|0
sqlite>
---------- Post added at 01:17 AM ---------- Previous post was at 12:50 AM ----------
I just create a row mannualy in the DB.
But i still gett "GPS disabled in apps"
Code:
insert into secure (name) VALUES('location_mode');
Code:
select * from secure;
...
279|location_mode|3
...
Hello @Renate NST
I've retry to setup the gps library on a brand new NST BNRV300 from ebay this week to create an second topographic eReader like mine.
The result is the same i'm stuck with the gps.default.so, i don't know how to rebuilt it to integrate debug and check if it's loaded correctly. On the other hand it seem the OS has not GPS settings enabled. (But my params has been pushed successfully by sqlite). i'm really confused about that point.
I'm still getting thoses errors in logcat when i'm launching an app with GPS location needs :
Code:
E/LocationManagerService( 822): requestUpdates got exception:
E/LocationManagerService( 822): java.lang.IllegalArgumentException: provider=gps
E/LocationManagerService( 822): at com.android.server.LocationManagerService.requestLocationUpdatesLocked(LocationManagerService.java:863)
E/LocationManagerService( 822): at com.android.server.LocationManagerService.requestLocationUpdates(LocationManagerService.java:833)
E/LocationManagerService( 822): at android.location.ILocationManager$Stub.onTransact(ILocationManager.java:79)
E/LocationManagerService( 822): at android.os.Binder.execTransact(Binder.java:287)
E/LocationManagerService( 822): at dalvik.system.NativeStart.run(Native Method)
I/PowerManagerService( 822): setPowerState: mPowerState=0x3 newState=0x3 noChangeLights=false reason=2
E/LocationManagerService( 822): isProviderEnabled got exception:
E/LocationManagerService( 822): java.lang.IllegalArgumentException: provider=gps
E/LocationManagerService( 822): at com.android.server.LocationManagerService._isProviderEnabledLocked(LocationManagerService.java:1387)
E/LocationManagerService( 822): at com.android.server.LocationManagerService.isProviderEnabled(LocationManagerService.java:1361)
E/LocationManagerService( 822): at android.location.ILocationManager$Stub.onTransact(ILocationManager.java:237)
E/LocationManagerService( 822): at android.os.Binder.execTransact(Binder.java:287)
E/LocationManagerService( 822): at dalvik.system.NativeStart.run(Native Method)
I guess the glowlight 3 you are using has some differences about that in the firmware.
Do you have an opinion on that ?
##### Other Subject #####
I just read your thread about the SD card soldering perfomed on Glows 2/3/4 and it's very interesting
I will maybe buy a BNRV510 (Glow2) and try to reproduce the SD card mod but also soldering a GPS on the UART. I'm not totally sure but i guess it will be easier to make it work natively with a 4.4 Android OS.
The BNRV510 is waterproof, has SD card (after mod) and an UART serial input so it's a good setup for me but i'm not aware about what expect.
Advices ?
By the way, thank's for your time !
Yeah, I've got to get back on this.
I had tried the two different sources for gps.default.so, the one with a bunch of files, the one with one big source file.
I'm just building them using the stock Android NDK toolchain.
The bunch-of build is detected as GPS but it does weird stuff like using NaN for no fix and I think it's reporting erroneous time which drives the AlarmManager crazy and eats CPU.
The big-file build is not recognized as GPS. I haven't really looked at it, but it doesn't touch the serial port at all.
When troubleshooting it helps to look at the serial port and see if the driver has set baud rate and characteristics.
Code:
# busybox stty -F /dev/ttymxc3
(Or whichever your device is.)
You should be able to cat it and see NMEA sentences. (Although it "steals" the text while you are doing this.)
Code:
# cat /dev/ttymxc3
Are you sure that your serial port is accessible?
I added this to ueventd.rc
Code:
/dev/ttymxc3 0666 root root
Adding an SD card on the Glow2 & Glow4 is easy.
The Glow3 needs a kernel mod and/or NTX hwcfg mod.
Oh! I see a problem with my build of the single-source gps.default.so:
Code:
E/HAL ( 2454): dlopen failed: cannot locate symbol "floor" referenced by "gps.default.so"...
Interesting, the other one didn't use math.
Also, I had to patch the source to understand 4800 baud, slow, but the official baud for NMEA-0183.
So, here's gps.default.txt, just rename it gps.default.so (it's not zipped or anything).
MD5=4c3eb7408a1ef94ec90ea44d045b7df2
The setup goes in /system/etc/gps.conf (not in build.prop like the other one).
Code:
GPSPORT /dev/ttymxc3
GPSSPEED 4800
Renate NST said:
When troubleshooting it helps to look at the serial port and see if the driver has set baud rate and characteristics.
Code:
# busybox stty -F /dev/ttymxc3
(Or whichever your device is.)
Click to expand...
Click to collapse
Yes, the GP-735 is running well at 9600 baud on ttyS1 in my case :
Code:
# busybox stty -F /dev/ttyS1
speed 9600 baud;
Renate NST said:
You should be able to cat it and see NMEA sentences. (Although it "steals" the text while you are doing this.)
Code:
# cat /dev/ttymxc3
Click to expand...
Click to collapse
Yeap this is work perfectly too, i'm able to see NMEA sentences :
Code:
# cat /dev/ttyS1
$GPRMC,224350.00,V,,,,,,,271120,,,N*78
$GPVTG,,,,,,,,,N*30
$GPGGA,224350.00,,,,,0,00,99.99,,,,,,*64
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,02,26,,,33,30,,,24*7A
$GPGLL,,,,,224350.00,V,N*48
Renate NST said:
Are you sure that your serial port is accessible?
I added this to ueventd.rc
Code:
/dev/ttymxc3 0666 root root
Click to expand...
Click to collapse
Yes it was 0660, but worked perfectly with the UsbGps app.
But i changed it to try with 0666, it seem not changing the matter.
Renate NST said:
Adding an SD card on the Glow2 & Glow4 is easy.
The Glow3 needs a kernel mod and/or NTX hwcfg mod.
Click to expand...
Click to collapse
This is a very good news, do you think the UART serial port is also ready to use on the Glow2 ?
Renate NST said:
Oh! I see a problem with my build of the single-source gps.default.so:
Code:
E/HAL ( 2454): dlopen failed: cannot locate symbol "floor" referenced by "gps.default.so"...
Interesting, the other one didn't use math.
Also, I had to patch the source to understand 4800 baud, slow, but the official baud for NMEA-0183.
So, here's gps.default.txt, just rename it gps.default.so (it's not zipped or anything).
MD5=4c3eb7408a1ef94ec90ea44d045b7df2
The setup goes in /system/etc/gps.conf (not in build.prop like the other one).
Code:
GPSPORT /dev/ttymxc3
GPSSPEED 4800
Click to expand...
Click to collapse
Thank's you, i have tried with the gps.default.so an gps.conf you provide (but with adapted params).
I'm not able to see anything in logcat or dmesg at this time. But the error about GPS not enabled in Android still present.
This last error is not a problem with the lib for sure but with the android system itself about his settings parameters. I will continue to try things with the settings.db
Since you're using the default of 9600 that won't tell you anything.
If stty says "echo" then the driver hasn't touched it.
It should show "-echo".
Check to see if it even tried to load.
I'll get you the debug version in a bit.
Edit: Charging up my old Nook NST to check what the scoop with that is...
Edit^2: What I posted above is actually the verbose one (that spams logcat) but works fine on the Glows.
The NST needs a different build.
I'll post a non-logcat-spamming versions for the Glows in a bit.
Renate NST said:
Since you're using the default of 9600 that won't tell you anything.
If stty says "echo" then the driver hasn't touched it.
It should show "-echo".
Check to see if it even tried to load.
I'll get you the debug version in a bit.
Click to expand...
Click to collapse
I guess i have understand what you want mean. It's about using the "GPSSPEED" value to check with stty if the lib module is correctly loaded by alterating the link speed ?
So to test it i have changed the value to 4800 has you recommanded. But the stty stil give back the 9600 default value.
Code:
# busybox stty -F /dev/ttyS1
speed 9600 baud; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-brkint -imaxbel
#
nothing revelent about :
Code:
/ # dmesg | grep gps
/ # logcat | grep gps
Renate NST said:
Edit: Charging up my old Nook NST to check what the scoop with that is...
Edit^2: What I posted above is actually the verbose one (that spams logcat) but works fine on the Glows.
The NST needs a different build.
I'll post a non-logcat-spamming versions for the Glows in a bit.
Click to expand...
Click to collapse
Alright !
[If I can only figure out how this forum works now...]
Ok, so the problem was getting this to run on the NST, which is still running Android 2.1, API 7.
Android forced us to Clang for builds, there's an incompatibility with libdl.so, dladdr() is too modern.
So, here's a version that should work on both old and new.
I haven't double-checked it on the Glow3 yet.
It loads on the NST but I don't have any hardware check of it yet.
This is called gps.default.txt, rename it gps.default.so
MD5 188477c37d86b7a3ae43573e7174238b

Categories

Resources