logcat in Crosscall Action X3 - Crosscall Smartphones

Hi there!
I just bought the Crosscall Action X3 phone, which it is quite cool
However when I plugged into my computer in order to try to develop some app, I was shocked by the fact that logcat is quite empty:
./adb logcat
--------- beginning of main
11-04 20:10:13.338 360 360 W auditd : type=2000 audit(0.0:1): initialized
11-04 20:10:15.579 360 360 I auditd : type=1403 audit(0.0:2): policy loaded auid=4294967295 ses=4294967295
11-04 20:10:15.579 360 360 W auditd : type=1404 audit(0.0:3): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295
And no application was reporting to logcat
It seems logcat is somehow disabled by the ROM
Is there any solution known to that?
I have seen that in Huawei phones there's a secret menu in order to enable logcat.
Does anyone know if there are a generic hidden menu or something like that?
Thanks in advance

Related

[Guide]Howto LOGCAT

I think this one is definitely needed for this forum. So posting this here.
Here's how to use logcat:
There are two main ways to do a logcat, within android, and through adb.
Logcat within android can be done one of two ways, through a Logcat app:
Here are two good examples are either: aLogcat or Catlog
I prefer catlog, because in my opinion it has a little bit nicer UI. Both of these programs can dump their logs to a txt file, which is very useful for debugging. Or, you can do it in terminal emulator (same rules as running through adb(see below))
From Moscow Desire:
On the other hand, using adb to run logcat, in my opinion is much more useful, because you can start using it when android boots (i.e. once the boot animation appears.)
The code for logcat to output to a file is
Code:
adb logcat > name of problem.txt
you can also do
Code:
adb logcat -f name of problem.txt
how I prefer to do it is this way:
Code:
adb logcat -v long > name of problem.txt
with the -v flag & the long argument, it changes output to long style, which means every line of logcat will be on its own line (makes it a little neater, imo)
Note: When outputting to a file, you will see a newline, but nothing printed, this is normal. To stop logcat from writting to a file, you need to press ctrl+c.
Here's where using logcat (via adb makes life really easy)
Lets say you find a problem you're having after looking at a logcat.
For example:
When I was trying to use a different ramdisk, wifi wouldn't work so I got a logcat that's almost 1300 lines long (a lot of stuff happens in the background)
So if you are searching for an error in the logcat file (it's always e/ for error, f/ for fatal. Those are the two main things that will break a system.)
Code:
D/dalvikvm( 871): GC_CONCURRENT freed 472K, 6% free 10224K/10823K, paused 1ms+6ms
V/AmazonAppstore.DiskInspectorServiceImpl( 871): Available blocks: 21981, Block size: 4096, Free: 90034176, Threshold: 5242880, withinThreshold? true
D/AmazonAppstore.UpdateService( 871): Received action: null from intent: Intent { cmp=com.amazon.venezia/com.amazon.mas.client.framework.UpdateService }
W/AmazonAppstore.UpdateService( 871): Confused about why I'm running with this intent action: null from intent: Intent { cmp=com.amazon.venezia/com.amazon.mas.client.framework.UpdateService }
D/dalvikvm( 890): GC_CONCURRENT freed 175K, 4% free 9375K/9671K, paused 2ms+3ms
V/AmazonAppstore.ReferenceCounter( 871): Reference (MASLoggerDB) count has gone to 0. Closing referenced object.
E/WifiStateMachine( 203): Failed to reload STA firmware java.lang.IllegalStateException: Error communicating to native daemon
V/AmazonAppstore.UpdateService( 871): runUpdateCommand doInBackground started.
V/AmazonAppstore.UpdateService( 871): Running UpdateCommand: digitalLocker
V/AmazonAppstore.UpdateCommand( 871): Not updating key: digitalLocker from: 1334228488057
V/AmazonAppstore.UpdateService( 871): Finished UpdateCommand: digitalLocker
V/AmazonAppstore.UpdateService( 871): Running UpdateCommand: serviceConfig
V/AmazonAppstore.MASLoggerDB( 871): performLogMetric: Metric logged: ResponseTimeMetric [fullName=com.amazon.venezia.VeneziaApplication_onCreate, build=release-2.3, date=Wed Apr 11 13:10:55 CDT 2012, count=1, value=1601.0]
V/AmazonAppstore.MASLoggerDB( 871): onBackgroundTaskSucceeded: Metric logged: ResponseTimeMetric [fullName=com.amazon.venezia.VeneziaApplication_onCreate, build=release-2.3, date=Wed Apr 11 13:10:55 CDT 2012, count=1, value=1601.0]
W/CommandListener( 118): Failed to retrieve HW addr for eth0 (No such device)
D/CommandListener( 118): Setting iface cfg
D/NetworkManagementService( 203): rsp
D/NetworkManagementService( 203): flags
E/WifiStateMachine( 203): Unable to change interface settings: java.lang.IllegalStateException: Unable to communicate with native daemon to interface setcfg - com.android.server.NativeDaemonConnectorException: Cmd {interface setcfg eth0 0.0.0.0 0 [down]} failed with code 400 : {Failed to set address (No such device)}
W/PackageParser( 203): Unknown element under : supports-screen at /mnt/asec/com.android.aldiko-1/pkg.apk Binary XML file line #16
D/wpa_supplicant( 930): wpa_supplicant v0.8.x
D/wpa_supplicant( 930): random: Trying to read entropy from /dev/random
D/wpa_supplicant( 930): Initializing interface 'eth0' conf '/data/misc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
D/wpa_supplicant( 930): Configuration file '/data/misc/wifi/wpa_supplicant.conf' -> '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 930): Reading configuration file '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 930): ctrl_interface='eth0'
D/wpa_supplicant( 930): update_config=1
D/wpa_supplicant( 930): Line: 4 - start of a new network block
D/wpa_supplicant( 930): key_mgmt: 0x4
(mind you, that's 29 lines out of 1300ish, just for example)
I then could do the following with logcat:
Code:
adb logcat WifiStateMachine:E *:S -v long > name of problem.txt
and this will only print out any errors associated with WifiStateMachine, and anything which is fatal, which makes it about a million times easier to figure out what's going on!
In WifiStateMachine:E, the :E = to look for Errors, the full list of options is as follows:
V — Verbose (lowest priority)
D — Debug
I — Info (default priority)
W — Warning
E — Error
F — Fatal
S — Silent (highest priority, on which nothing is ever printed)
You can replace the :E with any other letter from above to get more info.
In order to filter out anything other than what you are looking for (in this case, WifiStateMachine) you must put a *:S after your last command (i.e. WifiStateMachine:E ThemeChoose:V ... ... AndroidRuntime:E *:S)
Sources: http://developer.android.com/tools/help/logcat.html
http://developer.android.com/tools/help/adb.html
Update for windows users:
Thank go to FuzzyMeep Two, Here's what he's posted for windows
(If you used his tool, here's his post, thank him for his work!)
Note : I am just sharing. Original post here.
Don't be a noob. Be a newbie..!!
Details here.
Great Guide! Should become a sticky.
You know,today morning you said you were not an expert with logcats.I see this thread and i am awestruck,but then i read the second last line :|
Prawesome said:
You know,today morning you said you were not an expert with logcats.I see this thread and i am awestruck,but then i read the second last line :|
Click to expand...
Click to collapse
I said i am no expert. That doesn't mean i cannot take, read or understand logcat..!!
Don't be a noob. Be a newbie..!!
Details here.
This thread is perfect to be a sticky in the Android Development Section.
Newcommers should know how to properly report bugs. I also leave a redirect in the Original Android Development.
I rather use ddms for all
Command prompt is the most basic thing same old Windows
Sent from my GT-P7300 using xda app-developers app
helped me out. Thanks
Fro "noobs" it will be easier to use qtadb https://qtadb.wordpress.com/download/ , just download, install and run. Nice GUI for adb, contains access to logcat too.
Fro "noobs" it will be easier to use qtadb https://qtadb.wordpress.com/download/ , just download, install and run. Nice GUI for adb, contains access to logcat too.
Click to expand...
Click to collapse
And it colours out errors according to their priority
I am a potato, problem?
Thanks bro
Sent from my GT-S5830 using Tapatalk 2
Extremely useful,
thank you!
However, catlog force closes when I added it as system app.
How can i get application specific logcat like i want to get logcat of systemui only
Really helpful!
Aman
Wysłane z mojego GT-I8190 przy użyciu Tapatalka
Thanks Sir...its helped me a lot..about understanding logcat
---------- Post added at 07:17 AM ---------- Previous post was at 07:12 AM ----------
Thanks Sir...its helped me a lot..about understanding logcat

[SOLVED][Q] Commands not properly executing

EDIT:
The problem was that i was trying to read a line from the inputreader, when there was no line, so it was waiting for a response there...
Hello,
I am currently building an app to fix a little problem that exists on some devices with the wifi-mac and bluetooth addresses constantly changing (for me it's a N4 but I read somewhere that there are other devices with that problem too)
The thing the app should do is (steps taken from another xda thread: http://forum.xda-developers.com/showpost.php?p=43164157&postcount=1 )
- Mount /persist
- create the folders wifi and bluetooth
- create a text file in each of these directories containing the addresses that should be used in future
- fix the owners and permissions of these files and directories
- execute /system/bin/conn_init as su
The app is mostly done but somehow not working at all.
Everything from generating random adresses to saving them in a temporary file seems to work fine, but as soon as I try to mount the persist directory, the app stops to react.
At first, this was the first thing done by the SU Shell class that I wrote for executing su shell commands, so I thought that might be not working, but when I let that execute echo test it returns test just fine...
The code that is used could be expressed like that (this is missing some debug info and strings that get passed, but it should technically have the same result):
Code:
try {
shell = Runtime.getRuntime().exec("su");
outputStream = new DataOutputStream(shell.getOutputStream());
inputStream = new BufferedReader(new InputStreamReader(shell.getInputStream()));
outputStream.writeBytes("mount /dev/block/mmcblk0p20 /persist");
outputStream.flush();
} catch (IOException e) {
e.printStackTrace();
}
The attached zip file contains my main activity and the before mentioned su shell.
The complete source code of the app is available via my git server: http://greensserver.redirectme.net/greenchris/WiFi-MAC-and-Bluetooth-Adress-Fix.git
Does anybody have an idea why this isn't working?
Greetings
GreenChris
Edit:
I forgot to add the logcat...
Code:
04-09 23:33:21.289 3903-3903/com.janchristiangruenhage.macfixer I/art﹕ Late-enabling -Xcheck:jni
04-09 23:33:21.791 3903-3949/com.janchristiangruenhage.macfixer D/OpenGLRenderer﹕ Render dirty regions requested: true
04-09 23:33:21.797 3903-3903/com.janchristiangruenhage.macfixer D/Atlas﹕ Validating map...
04-09 23:33:21.951 3903-3949/com.janchristiangruenhage.macfixer I/Adreno-EGL﹕ : QUALCOMM Build: 10/28/14, c33033c, Ia6306ec328
04-09 23:33:21.953 3903-3949/com.janchristiangruenhage.macfixer I/OpenGLRenderer﹕ Initialized EGL, version 1.4
04-09 23:33:21.985 3903-3949/com.janchristiangruenhage.macfixer D/OpenGLRenderer﹕ Enabling debug mode 0
04-09 23:33:22.318 3903-3903/com.janchristiangruenhage.macfixer I/Timeline﹕ Timeline: Activity_idle id: [email protected] time:14543691
04-09 23:33:31.781 3903-3919/com.janchristiangruenhage.macfixer I/art﹕ Background sticky concurrent mark sweep GC freed 11333(680KB) AllocSpace objects, 3(44KB) LOS objects, 13% free, 4MB/5MB, paused 5.706ms total 39.550ms
04-09 23:33:31.843 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ address-bytes generated
04-09 23:33:43.923 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ save .bdaddr
04-09 23:33:43.925 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ address written: .bdaddr
04-09 23:33:43.954 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ su shell started
04-09 23:33:43.955 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ added outputstream
04-09 23:33:43.957 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ added inputstreamreader
04-09 23:33:43.957 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ echo test
04-09 23:33:43.973 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ test
04-09 23:33:43.974 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ mount /dev/block/mmcblk0p20 /persist

Porting from AOSP help

Hello!
I have available device, vendor end kernel source for my device so I tried port Omnirom. I have never done this before or similar ports but I want to learn. I managed to do a working kernel and recovery but stuck with the ROM. It just stuck at the manufacturer logo not even the boot animation comes in. Of course no adb and no logcat. Managed to get the last kernel message from recovery: http://pastebin.com/wBshmx8J
Can someone help or give idea what did I done wrong?
Here is the device tree: https://github.com/Gaboros/android_device_vernee_thor_k506
I have managed to step forward, now I have adb on boot but I got this:
Code:
01-14 17:12:12.893 275 275 E libEGL : load_driver(/system/lib64/egl/libGLES_mali.so): dlopen failed: cannot locate symbol "__xlog_buf_printf" referenced by "/system/lib64/libdpframework.so"...
01-14 17:12:12.893 275 275 F libEGL : couldn't find an OpenGL ES implementation
--------- beginning of crash
01-14 17:12:12.893 275 275 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 275 (surfaceflinger)
The problem is "__xlog_buf_printf" in the "libmtk_symbols.so" which is compiled and installed in the ROM and also preloaded on boot. It's seems impossible to get this error after this but still can't get through it. Any idea please?
Gaboros said:
I have managed to step forward, now I have adb on boot but I got this:
Code:
01-14 17:12:12.893 275 275 E libEGL : load_driver(/system/lib64/egl/libGLES_mali.so): dlopen failed: cannot locate symbol "__xlog_buf_printf" referenced by "/system/lib64/libdpframework.so"...
01-14 17:12:12.893 275 275 F libEGL : couldn't find an OpenGL ES implementation
--------- beginning of crash
01-14 17:12:12.893 275 275 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 275 (surfaceflinger)
The problem is "__xlog_buf_printf" in the "libmtk_symbols.so" which is compiled and installed in the ROM and also preloaded on boot. It's seems impossible to get this error after this but still can't get through it. Any idea please?
Click to expand...
Click to collapse
Fixed it by patching liblog. If anyone interested in the fix: https://github.com/Gaboros/android_...mmit/44ac2f707c0a12af038f4a4911e8eca47f9a7aff

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

WearOS Sync problem

Hello
I recently got a new phone (Xperia 10 III)
I wanted to pair my watch (Casio F20A) to it...
Problem, after reset I was unable to pair my watch again, it get stuck during "Updating informations" step.
I eventually found like 6 other case reported for this exact same problem and watch.
So I did some ADB log and finally found the problem, the app connection break at this exact moment
04-08 11:50:24.864 27178 29358 I CwSetup.CreateConfig: re-enabling connection
04-08 11:50:24.865 24198 26679 E WearableService: enableConnection is no longer supported. Use enableDeviceConnection instead.
04-08 11:50:24.867 27178 29358 E CwSetup.CreateConfig: Unable to enable connection.
04-08 11:50:24.870 27178 29358 I CwSetup.CreateConfig: finished creating ConnectionConfiguration: CreateConfigTask.Result{ isSuccess=false, mConfig=null }
04-08 11:50:24.870 27178 29358 E CwSetup.SetupJob: Failed to create ConnectionConfiguration
04-08 11:50:24.872 27178 27178 E PairingController: pairing failed
04-08 11:50:24.880 27178 29358 I BluetoothDevice: cancelBondProcess() for device 08:00:74:6F:E0:47 called by pid: 27178 tid: 29358
04-08 11:50:24.881 5803 8710 D bt_btif_config: btif_get_device_type: Device [08:00:74:6f:e0:47] type 3
04-08 11:50:24.881 5803 8710 I bt_btif_dm: get_cod remote_cod = 0x00080704
04-08 11:50:25.773 1096 6033 I [email protected]_handler: DeviceSleep: TX Awake, Sending SLEEP_IND
04-08 11:50:25.773 1096 6033 D [email protected]_handler: SerialClockVote: vote for UART CLK OFF
04-08 11:50:25.923 1096 5891 D [email protected]_lock: Release wakelock is released
I guess there was some update with some back compatibility mistake on WearableService.
And I need to figure which componets I should update on the Watch/Downgrade on Phone.
Any help is appreciated
Thanks
Complete details:
https://www.reddit.com/r/CasioSmartwatch/comments/uddypf

Categories

Resources