Bluetooth debuging on Hero - G1 Android Development

I have been trying to stretch my abilities and see if I can figure out what is wrong with bluetooth in the latest Hero builds. I have come to a point where I "think" I know what is up, however I haven't a clue how to fix it.
Normal case
1) Bluetooth uses the DBUS to communicate with other processes.
2) DBUS uses a system socket called /dev/socket/dbus.
3) the dbus socket is created by the init.rc file with the following commands: service dbus /system/bin/dbus-daemon --system --nofork socket dbus stream 660 bluetooth bluetooth user bluetooth group bluetooth net_bt_admin​4) after the dbus -daemon is started HCI is started. All of these processes are used for bluetooth communication.
service hcid /system/bin/hcid -s -n -f /etc/bluez/hcid.conf socket bluetooth stream 660 bluetooth bluetooth socket dbus_bluetooth stream 660 bluetooth bluetooth group bluetooth net_bt_admin misc disabled​
What I am seeing:
1) the sockets are never created for HCI (bluetooth and dbus_bluetooth) because dbus-daemon is never started.
2) dbus-daemon is never started because upon initialization it is getting a "permissions error"
06-01 17:29:01.614: ERROR/android_bluetooth_AG.cpp(112): Could not get onto the system bus: Failed to connect to socket /dev/socket/dbus: Permission denied​3) when I look at the socket it has 660 permissions (as set above in init.rc). I venture to guess that this could be fixed by simply changing the permissions to 666, however I don't have any idea on how to update the init.rc file to test my theory.
Any thoughts? Am I way off base

re
With out modifying the main init.rc, i changed the permission of the socket (as root). D-Bus was already running, btw. I then manually launched the:
# /system/bin/hcid -s -n -f /etc/bluez/hcid.conf socket bluetooth stream 660 bluetooth bluetooth socket dbus_bluetooth stream 660 bluetooth bluetooth group bluetooth net_bt_admin misc disabled
Which launched just fine the first time.
Except now, when I try to enable it logcat is showing this error:
E/bluetooth_common.cpp( 63): dbus_func_args_timeout_valist: D-Bus error in Create: org.freedesktop.DBus.Error.ServiceUnknown (The name com.ti.btips was not provided by any .service files)
So what is the new provider?

How did you check that dbus was already running? If I do a PS on it, it does not show up for me.

to update the init.rc, you have to unpack the boot.img in the room, and repack it.. there was a thread explaining now to do that.
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images

silby said:
How did you check that dbus was already running? If I do a PS on it, it does not show up for me.
Click to expand...
Click to collapse
It was running.

Can someone explain the dev challenge to get bluetooth in Hero?
So there was a thread about getting BT working and while I thought it would stay active it has dropped from "above the fold". Someone was speculating DBUS daemon was starting, but HCI wasn't. Is anyone making any progress? Is this a limitation of the current SDK and if so, why? Where would I start looking? I presume we can solve this if as has been speculated HTC is releasing a Hero phone for AT&T in less than 3 weeks.

http://forum.xda-developers.com/showthread.php?t=521500&highlight=hero+bluetooth
Yes, it's dropped from the front page, but not necessarily out of reach.

vettejock99 said:
So there was a thread about getting BT working and while I thought it would stay active it has dropped from "above the fold". Someone was speculating DBUS daemon was starting, but HCI wasn't. Is anyone making any progress? Is this a limitation of the current SDK and if so, why? Where would I start looking? I presume we can solve this if as has been speculated HTC is releasing a Hero phone for AT&T in less than 3 weeks.
Click to expand...
Click to collapse
From what I can have gathered and haven't been able to work on since is that HCI and DBUS can both be started with the proper permissions (the init.rc script still needs to be modified, which requires unpacking and repacking the image I looked at the procedure but haven't attempted it yet). I manaually started them on mine.
However, once started the UI can't control or read settings because there is service provider doesn't exist/registered.
E/bluetooth_common.cpp( 63): dbus_func_args_timeout_valist: D-Bus error in Create: org.freedesktop.DBus.Error.ServiceUnknown (The name com.ti.btips was not provided by any .service files)
The "com.ti.btips" (Texas Instruments?) doesn't exist and/or wasn't registered by the system. That's where I am lost. I am assuming that there is an APK missing (maybe HTC didn't have it in the ROM yet) that provides the service. On that assumption i would look for "com.ti.btips.apk".
OR
The may have changed chipsets for bluetooth in Hero, which means while the kernel can interface with it, they have customized DBUS to read in some different settings or interfaces for the chipset. Again shouldn't be -too- difficult to pull those mods out of the other roms and copy them so long as the versions of dbus match and the modification match what the kernel is capable of.
Needless to say I haven't had the time to dive completely into it.

Keeping things together
vettejock99 said:
Originally Posted by vettejock99 View Post
So there was a thread about getting BT working and while I thought it would stay active it has dropped from "above the fold". Someone was speculating DBUS daemon was starting, but HCI wasn't. Is anyone making any progress? Is this a limitation of the current SDK and if so, why? Where would I start looking? I presume we can solve this if as has been speculated HTC is releasing a Hero phone for AT&T in less than 3 weeks.
Click to expand...
Click to collapse
From what I can have gathered and haven't been able to work on since is that HCI and DBUS can both be started with the proper permissions (the init.rc script still needs to be modified, which requires unpacking and repacking the image I looked at the procedure but haven't attempted it yet). I manaually started them on mine.
However, once started the UI can't control or read settings because there is service provider doesn't exist/registered.
E/bluetooth_common.cpp( 63): dbus_func_args_timeout_valist: D-Bus error in Create: org.freedesktop.DBus.Error.ServiceUnknown (The name com.ti.btips was not provided by any .service files)
The "com.ti.btips" (Texas Instruments?) doesn't exist and/or wasn't registered by the system. That's where I am lost. I am assuming that there is an APK missing (maybe HTC didn't have it in the ROM yet) that provides the service. On that assumption i would look for "com.ti.btips.apk".
OR
The may have changed chipsets for bluetooth in Hero, which means while the kernel can interface with it, they have customized DBUS to read in some different settings or interfaces for the chipset. Again shouldn't be -too- difficult to pull those mods out of the other roms and copy them so long as the versions of dbus match and the modification match what the kernel is capable of.
Needless to say I haven't had the time to dive completely into it.
edit: reposted here to keep things together

johnsonnc said:
From what I can have gathered and haven't been able to work on since is that HCI and DBUS can both be started with the proper permissions (the init.rc script still needs to be modified, which requires unpacking and repacking the image I looked at the procedure but haven't attempted it yet). I manaually started them on mine.
However, once started the UI can't control or read settings because there is service provider doesn't exist/registered.
E/bluetooth_common.cpp( 63): dbus_func_args_timeout_valist: D-Bus error in Create: org.freedesktop.DBus.Error.ServiceUnknown (The name com.ti.btips was not provided by any .service files)
The "com.ti.btips" (Texas Instruments?) doesn't exist and/or wasn't registered by the system. That's where I am lost. I am assuming that there is an APK missing (maybe HTC didn't have it in the ROM yet) that provides the service. On that assumption i would look for "com.ti.btips.apk".
OR
The may have changed chipsets for bluetooth in Hero, which means while the kernel can interface with it, they have customized DBUS to read in some different settings or interfaces for the chipset. Again shouldn't be -too- difficult to pull those mods out of the other roms and copy them so long as the versions of dbus match and the modification match what the kernel is capable of.
Needless to say I haven't had the time to dive completely into it.
Click to expand...
Click to collapse
This sounds like reasonable thinking. Today stinks for me but I will try to audit the files from my other 1.5 ROMs this weekend to see if I can find anything there to contribute.

I don't know if anyone else noticed.
Haykuro's Hero build has 2 liba2dp.so files.
One of them is capitalized.
/system/lib/liba2dp.so (53.1 KB, same as other builds)
/system/lib/libA2DP.so (9.1 KB, smaller)
I believe the update might be overwriting the first file with the second while applying the update.
I am not running hero right now.
If anyone running hero can check the lib folder on the phone and see which file is there, it will be of great help.
Code:
On terminal:
ls -l /system/lib/lib*2*.so
From adb:
adb shell ls -l /system/lib/lib*2*.so
If the lib on the phone is the smaller one, can anyone push the bigger file and report the result.
If this works, all we have to do is remove the second file from the hero update.

It's running the larger liba2dp.so
Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Admin>adb shell ls -l /system/lib/lib*2*.so
-rw-r--r-- root root 130600 2008-08-01 08:00 libOmxH264Dec.so
-rw-r--r-- root root 54412 2008-08-01 08:00 liba2dp.so
-rw-r--r-- root root 79240 2008-08-01 08:00 libon2.so
-rw-r--r-- root root 9476 2008-08-01 08:00 libxml2wbxml.so
C:\Documents and Settings\Admin>

xyrcncp said:
http://forum.xda-developers.com/showthread.php?t=521500&highlight=hero+bluetooth
Yes, it's dropped from the front page, but not necessarily out of reach.
Click to expand...
Click to collapse
Is it posts like that which get one to 381 posts since Feb of 09? Feel free to actually contribute to this discussion about the problem at hand. Although this discussion is much like that one, this one was made to identify whether there is something lacking altogether that would prevent debugging until additional code is dropped.

vettejock99,
Can you explain your point? The other post is much more relevant as it talks about the technical issues. Also, it only has 7 posts in it, not 309.
This thread should be closed and all communication should go in the other one.

silby said:
vettejock99,
Can you explain your point? The other post is much more relevant as it talks about the technical issues. Also, it only has 7 posts in it, not 309.
This thread should be closed and all communication should go in the other one.
Click to expand...
Click to collapse
I don't need to explain my point. It is quite evident. Maybe the subject of the other should be edited to something like trying to solve the bluetooth issue in Hero. Or maybe not - maybe I just believe in accurately stating the problem. My point is you can't debug it (at least not fully) if some of the code flat out isn't there yet (which I do not believe to be the case but wanted to confirm). Anyway, I do support closing\merging this thread as I have my answer now.

Dladu said:
It's running the larger liba2dp.so
Code:
-rw-r--r-- root root 54412 2008-08-01 08:00 liba2dp.so
Click to expand...
Click to collapse
The liba2dp.so on other builds with working bluetooth is also 54412 bytes, so I don't think this is our problem.

I wonder what would happen if we deleted the second one thats there

I also found that /system/etc/firmware has a different TI driver there than other builds. Most builds have brf6300.bin. I tried replacing what was there with the brf one and it didn't make a difference. I suspect there is a confi file that might be pointing to the other firmware.

buttkicker said:
I don't know if anyone else noticed.
Haykuro's Hero build has 2 liba2dp.so files.
One of them is capitalized.
/system/lib/liba2dp.so (53.1 KB, same as other builds)
/system/lib/libA2DP.so (9.1 KB, smaller)
I believe the update might be overwriting the first file with the second while applying the update.
I am not running hero right now.
If anyone running hero can check the lib folder on the phone and see which file is there, it will be of great help.
Code:
On terminal:
ls -l /system/lib/lib*2*.so
From adb:
adb shell ls -l /system/lib/lib*2*.so
If the lib on the phone is the smaller one, can anyone push the bigger file and report the result.
If this works, all we have to do is remove the second file from the hero update.
Click to expand...
Click to collapse
# ls -l lib*2*.so
-rw-r--r-- root root 9336 2008-08-01 07:00 libA2DP.so
-rw-r--r-- root root 130600 2008-08-01 07:00 libOmxH264Dec.so
-rw-r--r-- root root 54412 2008-08-01 07:00 liba2dp.so
-rw-r--r-- root root 79240 2008-08-01 07:00 libon2.so
-rw-r--r-- root root 9476 2008-08-01 07:00 libxml2wbxml.so

silby said:
vettejock99,
Can you explain your point? The other post is much more relevant as it talks about the technical issues. Also, it only has 7 posts in it, not 309.
This thread should be closed and all communication should go in the other one.
Click to expand...
Click to collapse
This type of post is counter-productive. There should be no room for it and you should think twice before you post something so rude. We're all here trying to help each other out and figure out how to fix issues with the Hero rom.

Related

Give (system) applications more permissions

Hello!
I've been looking for a way to achieve the topic title for a very long time but without result...
So what i'd like to accomplish is to give my application the ability to execute root/su -c commands without the device being actually rooted.
If this has to be done at the compiling of system.img / rom-cooking thats oke..
From what gathered through searching the source is that the init executable in the root of the device starts zygote, and zygote in turn is responsible of starting up each application.
This Zygote also manages what uid each application gets? If so shouldn't it be possible to change that uid to "system" or even "root"?
When you look at running processes on a device the "phone" app has as user radio..once again indicates it's very well possible to change under what user an app is being executed?
Also looking through the source the way an application gets a different uid seems to be because of sharing the same certificate on build, and in the androidmanifest.xml having
Code:
android:sharedUserId="android.uid.phone"
Am i have not yet find out where android.uid.* comes from but should the uid: system and root be there as well?
If anyone could enlighten me whether i am on the completely wrong track or if this makes any sense i'd be greatly appreciated!
Richard
Monday morning bump!
Isn't there any way to have an application start up as system/root user? is another way to do it perhaps via a service? and have that start up as another user?

Finally got a bluetooth keyboard working

I've had the little targus keypad (bluetooth HID; not SPP) and and Apple bluetooth keyboard (salvaged from an Apple loving friend after he let the battries leak). Now that I finally plucked up the courage to root my Nexus and install the hidd binary I can (with a little bit of effort) finally type effectively if I need to (mostly for connectbot when I need to ssh into remote servers)
I need to issue hidd --connect [BLUETOOTH ADDRESS] each time I want to connect, but I'm happy to do that until it gets a little more elegantly plumbed in.
In fact I'm using it right now
wanna d/l genesisoid or whatever its called and see if you can use that bluetooth keyboard to play some sega roms?
One of the upcoming Motorola devices lists HID as a supported profile. I am all hot and sweaty with anticipation hoping it will be part of Android and not something Motorola added. I am writing a SPP IME (there is KeyPro in the market but the IME is just a side benefit of the actual project) but would be so much happier with official HID support.
SilentMobius said:
Now that I finally plucked up the courage to root my Nexus and install the hidd binary I can (with a little bit of effort) finally type effectively if I need to (mostly for connectbot when I need to ssh into remote servers)
Click to expand...
Click to collapse
I'm trying the same. Where did you get the hidd binary? Or do you mind describing how you built it? Thanks in advance!
I go my info from here:
http://i-miss-erin.blogspot.com/2009/09/connect-bluetooth-keyboard-in-android.html
I already had hcitool from the extras package when I rooted, just needed the hidd binary.
Got mine working too! thanks for the help
Script / app for connecting this?
I just got mine working too!
Wish someone could write an app for this so I wouldn't have to use the console every time I want to connect..
If you have the think outside / igo bluetooth keyboard, word of warning! Be very very careful opening and closing this baby all the time. Don't let it get smashed in your bag. I'm on my 2nd one.. and this one is showing signs of failure. I have to bend the casing a bit to get my return / windows key to work. The inside cables have a tendency to slip out if things get mashed, and trust me, this is one keyboard you don't want to be opening up with a screwdriver..
I did.. got mine working again.. but only after bending the case after it was all put back together again. :-/
Great little keyboard though! Use it with my tablet pc too.
C
FYI the ASE allows you to execute shell scripts from home screen icons.
If you chmod the binary to suid it will run as root
chmod 4777 hidd
Then stick a script in /sdcard/ase/scripts
hidd --connect <BTADDR>
And long press on the home screen->shortcut->ase->your script
Cool. Any idea if it will work with portable bluetooth keyboards? Like the iGo Stowaway?
SilentMobius said:
FYI the ASE allows you to execute shell scripts from home screen icons.
If you chmod the binary to suid it will run as root
chmod 4777 hidd
Then stick a script in /sdcard/ase/scripts
hidd --connect <BTADDR>
And long press on the home screen->shortcut->ase->your script
Click to expand...
Click to collapse
I used gscript didn't have to do the chmod 4755 (has a run as root checkbox)
but still the same, thanks for the tip!
I would love to see a tutorial for the nexus one bluetooth keyboard pairing. I tried to follow the website but got nowhere. Whenever i run:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
on my mobile i get the error :no such file or directory. I even created the danm directory and still get nowhere.
Anyone give me a hint? i want to figure this one out!
ok i got past that problem dumb me and my spacebar.
Anyhow now im trying to adb push hidd but im getting an
error: device not found
i have a cyangenmod nexusone with a ubnuntu 9.10 machine.
Thanks!
Alright i just copied and pasted the three files to the folder that was specified. Now everything works other than hidd specificaly hidd -connect gives me a
hidd: not found
Im now stuck here
Draaktatsu said:
Alright i just copied and pasted the three files to the folder that was specified. Now everything works other than hidd specificaly hidd -connect gives me a
hidd: not found
Im now stuck here
Click to expand...
Click to collapse
did you change the permissions for hidd?
chmod 4755 hidd
Tried it just now, says:No such file or directory.
Maybe i have a bad file? Im stumped
LOL, I just paired and connected a Bluetooth mouse. LOL Not very useable though, moving the mouse is equivalent to rolling the trackball.
On cyanogenmod 5.0.4.1 I just had to push over the hidd program as the others were already there.
For everyone that's having problems, the methods described here work like a charm, make sure you turn off Internet Tethering (if you have it) and turn on development debugging mode.
Can't somebody write a simple keyboard pairing program for us? Seems like it would be fairly simple to write a root app that would do this but I'm no programmer, especially in Java.
BrandonG777 said:
LOL, I just paired and connected a Bluetooth mouse. LOL Not very useable though, moving the mouse is equivalent to rolling the trackball.
On cyanogenmod 5.0.4.1 I just had to push over the hidd program as the others were already there.
For everyone that's having problems, the methods described here work like a charm, make sure you turn off Internet Tethering (if you have it) and turn on development debugging mode.
Can't somebody write a simple keyboard pairing program for us? Seems like it would be fairly simple to write a root app that would do this but I'm no programmer, especially in Java.
Click to expand...
Click to collapse
Better yet would be to edit the source of the Settings app to put seamless support for HID in there. I'm going to look at writing a KB pairing program next week, I think.
The normal pairing in Android setting works for pairing keyboards just fine, its the android native hidd equivalent we need.
OK... finally got hidd recognised by deleting the .bin extension.
Now the problem is I get this error:
Can't open HIDP control socket: Operation not permitted
Anyone?
what is ase? i cant find it in market. i created the script and put it in the folder but i just need whatever ase is to create the shortcut

Phone Identification

Being a long served WinMo user i'm quite lost when it comes to Android.
I (and others) have a problem in that the recipient of a phone call via our bluetooth connections to our Nokia CK-7W car kits experience bad echoing.
I have started a thread in the HTC Desire forum and it is clear that I'm not the only one who suffers. Here's the link http://forum.xda-developers.com/showthread.php?t=676175
A user in a WinMo forum posted a solution by changing the Class of Device (COD) in the registry so that the phone identifies itself as a normal phone rather than a smartphone and it seemed to work.
Is there a similar thing we can do in Android so that the device identifies itself as a normal phone?
Thanks
Rob
We've found the following text in the '/system/etc/bluez/main.conf' file
# Default device class. Only the major and minor device class bits are
# considered.
# Local device class
# 0x400000 - Service class: Telephony
# 0x000200 - Major class: Phone
# 0x00000C - Minor class: Smart phone
Class = 0x40020C
I've tried all sorts of ways to edit this file to change the Class but nothing seems to work.
I've tried editing the file directly from the phone using root explorer, but every time I save the changes the phone reboots itself and restores the original file.
I've tried adb in recovery mode to push the edited file from my pc to my device, this appears to work but again when rebooted the original file is back.
I've tried adb file explorer but this will not find the /etc/ folder in the /system/ folder.
I'm running out of ideas, can anyone help?
If I'm not mistaken, because the Desire isn't fully rooted (no access to /system) you are unable to make the modifications you are looking to do...
Thanks acolwill,
I didn't realise you could only partially root a phone.

[Q] Connecting to DBUS API on unrooted Android phone to connect an HID device

Hi everyone,
I'm trying to write an android program which will allow users to connect to an HID device. The device captures external pen strokes and I would like to retrieve this data and make a basic whiteboard app.
I've made some progress so far: if I use adb push to put the "hidd" daemon on a rooted phone and use hidd --connect, then I can open up hcidump and see the raw data appearing when the pen is used, so I know such a connection is possible.
I'm still a beginner at Android development, but I've learned that app communication with the bluetooth facilities is done via the dbus API. So, I wrote a simple test program using the NDK that tries to make a connection to the system dbus, based on some bluetooth-related code in mydroid/bin/frameworks/base/core/jni:
DBusConnection *conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
On my non-rooted phone, this results in the error "VERBOSE/JNI1Activity_DEBUG(3226): Result: Could not get onto the system bus: Failed to connect to socket /dev/socket/dbus: Permission denied."
If I go ahead and do chmod 666 on /dev/socket/dbus on my rooted phone, then the connection can be made without error.
So, my question is this--first of all, am I going about this the right way? If so, is there some way that an application can get permission to talk to dbus on a non-rooted phone?
(If I can get this working, I think the next step would be to try and package/build in the needed parts of hidd to include with my app...)
Many thanks for any help,
Tom
Hi pyro777,
I was wondering if you received any replies on your query?
I also have a similar problem -- my android app accesses Dbus via a JNI, but I am getting the same permissions problem. I can use your workaround of explicitly setting the permissions on /dev/socket/dbus, but that solution can't be used for production code.
My Android java app as BLUETOOTH permissions, but this doesn't appear to be applied across the JNI boundary (as my experience indicates) into the JNI c++ library (*.so).
Does anyone have more info on this issue?
Thanks in advance,
robin
Hi evodevo,
No, no such luck so far if you figure it out I'd be happy to hear.
Strange, if this fails how does the normal Bluetooth java API it?
Perhaps certain permissions need to be set on your app? BLUETOOTH_ADMIN or so?
question 4 u: which libraries do you include when doing dbus stuff I get undefined references the whole time?

Carrier IQ

So, looks like we have Carrier IQ on our phones, thanks to AT&T. Any luck on getting a 3rd party ROM on here yet? Any estimates as to when?
Can you give us more information? like how you found it on the phone, what steps did you take?
With more info, those of us in the know can figure out how to disable it, or remove it, without having to resort to waiting for a rom.
I have been looking for it for quite some time without much luck.
It's the device health app.it calls the ciq agent . Easily frozen.
Sent from my MB865
mtnlion said:
It's the device health app.it calls the ciq agent . Easily frozen.
Sent from my MB865
Click to expand...
Click to collapse
Thanks, I will see what else I can come up with for the ciq agent, maybe a way I can fake it out on the *NIX side of the house.
Yep first thing I went looking for after I got root.
Bloat freezer. It's free, finds it fast. When you freeze device health it doesn't want to close and keeps force closing, just reboot, it will be frozen and not running.
Douchewithaphone said:
Bloat freezer. It's free, finds it fast. When you freeze device health it doesn't want to close and keeps force closing, just reboot, it will be frozen and not running.
Click to expand...
Click to collapse
Must be rooted.
Sent from my mAtrix2!!
Well, I have found a way from the UNIX end to stop this thing in it's tracks, but it is not pretty for those unfamiliar with command line....
What we have to do is uncompress the kernel image in the boot.img remove the sys.DeviceHealth from the init.rc file there, then compress the kernel back up, all using cpio.... now to see if I can possibly make it work, and not brick any phones in the process, maybe I can throw a quick apk together next week.
I have tried the bloat freezer and the android assistant and I can still find the sys.DeviceHealth running on the UNIX side with the ps command, so this is a nasty one.
I will keep you guys posted, If I can find a better way.
Here is the link I saw, and how I figured out where sys.DeviceHealth is starting from.
For those interested ONLY. PLEASE do not try this yet, give me some more time to play with this in an emulator and see what I can come up with.
I am just sharing information at this time. BTW Zygote is the process that is calling the sys.DeviceHealth on the Atrix 2.
To see this Do the following from the terminal emulator app on your phone or though adb shell.
ps | grep -i Heal
ps | grep -i zygote
If you notice on the sys.DeviceHealth process that the second number is the same number as the first number of the zygote process.... What that means is that the zygote process starts the sys.DeviceHealth process. The first number is process ID (the processes "adress" so to speak), and the second number is the Parent process ID (The process that started the next one).
http://vinnysoft.blogspot.com/2009/12/zygote-system-process.html
jimbridgman said:
Here is the link I saw, and how I figured out where sys.DeviceHealth is starting from.
For those interested ONLY. PLEASE do not try this yet, give me some more time to play with this in an emulator and see what I can come up with.
I am just sharing information at this time. BTW Zygote is the process that is calling the sys.DeviceHealth on the Atrix 2.
To see this Do the following from the terminal emulator app on your phone or though adb shell.
ps | grep -i Heal
ps | grep -i zygote
If you notice on the sys.DeviceHealth process that the second number is the same number as the first number of the zygote process.... What that means is that the zygote process starts the sys.DeviceHealth process. The first number is process ID (the processes "adress" so to speak), and the second number is the Parent process ID (The process that started the next one).
http://vinnysoft.blogspot.com/2009/12/zygote-system-process.html
Click to expand...
Click to collapse
zygote appears to be a process respawner (watchdog) of some type. The trick is to find out where its config lies and tweak that to prevent the launching of sys.DeviceHealth.
I've just got the busybox installed that came with TiBackup and the shell tools are sorely limited (no grep for eg.). The shell itself is also pretty limited (no pipe??? WTF?). I had a version of bash on my atrix4g, and I'm wondering if you know of a reliable source for bash and shell tools for the atrix2?
A lil info on what AT&T says and how it uses Carrier IQ and some of the devices it is on can be read here http://m.androidcentral.com/atts-us...its-own-analytics-app-not-just-embedded-phone
razholio said:
zygote appears to be a process respawner (watchdog) of some type. The trick is to find out where its config lies and tweak that to prevent the launching of sys.DeviceHealth.
I've just got the busybox installed that came with TiBackup and the shell tools are sorely limited (no grep for eg.). The shell itself is also pretty limited (no pipe??? WTF?). I had a version of bash on my atrix4g, and I'm wondering if you know of a reliable source for bash and shell tools for the atrix2?
Click to expand...
Click to collapse
Yes that is exactly what zygote is. You would disable the sys.DeviceHealth in the EXACT way it says in the in link I posted, but you have to uncompress the kernel image, and extract the init.rc in there, then edit it to not include the sys.DeviceHealth, then re-compress it with cpio. This is just for information right now, so that later on when the ROM developers get started, they can use this info for their ROMs. I am testing this using a couple Android emulators to see what I can do with this.
As for a reliable busybox, I like the version from JRummy16 in the market, go grab that an install the latest version of busybox from his installer you downloaded (I think it is 1.19.3 or something similar).
also go get the hackers keyboard in the market, it helps a lot if you EVER use the terminal app ON the phone, heck I like for text and typing as well.
Jim: I'm assuming you mean the initrd image and not the kernel, or is that all wrapped up into one in android? the initrd is an odd place for the system's watchdog config. I suppose putting it in the kernel image prevents disabling it because presumably we don't have the key to sign the new image...
that's a new version of busybox, but I'm more interested in one with all of the options compiled in. What I have is pretty bare-bones... Does his busybox have grep at least? what do you do for a decent shell?
razholio said:
Jim: I'm assuming you mean the initrd image and not the kernel, or is that all wrapped up into one in android? the initrd is an odd place for the system's watchdog config. I suppose putting it in the kernel image prevents disabling it because presumably we don't have the key to sign the new image...
that's a new version of busybox, but I'm more interested in one with all of the options compiled in. What I have is pretty bare-bones... Does his busybox have grep at least? what do you do for a decent shell?
Click to expand...
Click to collapse
Yes in the initrd image the kernel is packed in there, as well as the init.rc file on Android, as well the filesystem subset, etc.
The init.rc file in / on the phone is NOT the one the kernel itself executes, take a look at that link I posted, Here is the excerpt we are interested in, I am pretty sure that the sys.DeviceHealth is in the exact same place:
I want to get a bit more control of what things are starting up when. To do this I need to modify the init.rc file. To do this I first extracted the the ramdisk to the fileystem so that I can modify it (gnucpio -iz -F ramdisk.img).
After this I simply commented out the line from init.rc. Then we can recreate it: (gnucpio -i -t -F ../ramdisk.img | gnucpio -o -H newc -O ../rootfs.img).
Click to expand...
Click to collapse
Yes both the stericson and JRummy16 busybox have most every command in the busybox you really need, oh and they create links in /system/bin for you, so that you can run commands without needing to always type busybox in front of the command.
As far as shells, I am a bourne or korn guy, so I just use the default /system/bin/sh, since I am closely intimate with bourne, being the UNIX Engineer that I am, and handling anything at the lowest level of the OS still requires bourne. But I love to program in korn (ksh), but I have not found any android shells that are useable beyond the basics, since we really are not going to spend much time there, it does not matter much. I would get aquainted the bourne, that android uses, since android seems be using the old school UNIX style bourne, more and more, yes there is some bourne again in there too.
P.S. pipe is in the /system/bin/sh, just make sure you source the /osh/apath.sh file, to get the /system/bin and /system/xbin in the shell...
The hackers keyboard has things like the arrow keys so that you can command recall, and other helpful things.
If you really need to run something, from the shell, just make sure put sh in front of it, or it won't run in a shell, one of the oddities about Android.
I have tested the method I mentioned before, and uncompressing the ramdisk that holds the kernel, and removing the sys.DeviceHealth from the init,rc, and it does work, after packaging it back up with CPIO. I tested this on an older phone that does not have a locked bootloader.
I am afraid to test it on the Atrix 2 since we still do not have a true way to get back after a soft brick at that low level.
Given the fact that this was another style of phone, and an unlocked bootloader, and the fact that the process name is a little different, I am still confident we can do something similar for our phone.
If you follow the directions on my post, you'll find it much easier to disable the Carrier IQ.
http://forum.xda-developers.com/show...6#post20281786
mrpoet said:
If you follow the directions on my post, you'll find it much easier to disable the Carrier IQ.
http://forum.xda-developers.com/show...6#post20281786
Click to expand...
Click to collapse
^^^^^^^^^^^Page not found^^^^^^^^^^^
kirkgbr said:
^^^^^^^^^^^Page not found^^^^^^^^^^^
Click to expand...
Click to collapse
Try this Link. I am not sure if it will do the job for us or not, because we don't have the same Apps installed as the Epic 4g that this original post was copied from.
Here is the thread, mrpoet created and pointed to:
http://forum.xda-developers.com/showthread.php?t=1390874
Here is the original one, that he does link to in his references:
http://forum.xda-developers.com/showthread.php?t=1373394
I am going to see if it works.
----Edit---
I just gave this a try and all the commands ran successfully, but sys.DeviceHealth is still running after following the above post.
JRW 28 said:
A lil info on what AT&T says and how it uses Carrier IQ and some of the devices it is on can be read here http://m.androidcentral.com/atts-us...its-own-analytics-app-not-just-embedded-phone
Click to expand...
Click to collapse
Just to let everyone know, the information contained in the link that JRW 28 posted, is an accurate statement from AT&T.
I have inside information that, that is BS. There are 100's of Terrabytes of Disk Storage just for this purpose.
They're a pack of bastards.

Categories

Resources