getting data off of broken G1/Dream [rooted] - G1 General

I have a broken G1, the screen is shot, and something else is screwed up, because it won't process anything. Once it boots it shows the background for a moment, then the lock screen comes on, but without a background. Then it looses all functionality. I can't get it to do anything. However, what's interesting, is that if I get an incoming call, I can answer using the button (not screen), and talk normally. Anyway, I want to know if there is a way, probably using ADB to get all my contacts minimally (since they're not all sync'd w/ Google), but ideally I would like to make a system image from it and run it in one of the emulators (Eclipse, Spring Source or Android SDK is what I have installed now). Any help would be awesome. There are also a few nandroid backups that I could use somehow, but they are a little old.

As far as I know, contacts data is stored in a sqlite-database which is located on /data. As long as you can connect with adb to your phone, you can copy that database to your pc and analyze it using sqlite3.
In this article you can find some additional information. It's a bit old, but still valid and at least it can give you a hint.
If you cannot access to your phone using adb, you can also extract the contacts.db from your latest nandroid backup. You can use unyaffs or mount your image on a linux system as yaffs file system and extract the file(s) you want. Then you can use again sqlite3 to extract the contacts data.
The same way, you can extract other data. It's enough to concentrate on the /data partition of the G1. As long as adb is running, you can copy them to your local PC, if not, you need to extract them from your latest nandroid backup in the same way I described above.

there is an awesome application called droid explorer (i forget the developers name) that you can download free to your pc (probably mac too) if you have usb debugging turned on then all you have to do is plug your phone into pc via usb.
when your phone comes up you have all the options you need here plus more!
seriously i recommend it to everyone. i use it at work sometimes to access my phone without getting caught, it has a great screen-cast function (a bit laggy)
if you dont have usb debugging turned on then look in the forum how to do it via adb. if you cant find droid explorer let me know and i can put it in my dropbox.
another option is get a used g1 from ebay and swap motherboards. or just fix your screen or whatever the problem is

Ok... So I did a little snooping via adb, and fortunately I did leave usb debugging on, so that's a plus. Now there were 2 things that I've tried pulling:
/data/data/com.android.contacts
and
/data/data/com.android.providers.contacts
Unfortunately, these both just gave me .xml files that only had a few lines of code, none of which included contacts or any kind of useful info.
@AndDiSa: I'm going to read the linked article now, but currently I don't have anything useful from /data. Any tips on how I would go about extracting the contacts.db? Articles or links are always great!
@demkantor: I will check that out. Since I don't really know how messed up the phone is, I don't know how useful droid explorer will be, but it sounds like a good utility anyway.
I don't really feel like getting parts for my phone. It's already waaaay behind the curve, and while it's a super fun phone to mess around with, I think it's time to move to something new (like the Droid 1 that I got as a toy phone/media player since I don't have verizon).
Anyway, further help appreciated!
(Oh, and I have to replace the digitizer for my Droid. LOL)

I am not on my PC at the moment, but try to look for
/data/com.android.providers.contacts/databases/contacts2.db
at least in GB this should be the right file or do a
find /data -name "cont*db" -print
in adb shell to look for it.
Sent from my Gingerbread on Dream using XDA App

I'll check it out tomorrow and let you know how it goes. Thanks!

OK! Good news. I found the contacts2.db and was able to pull it. I got SQLite3.exe and started messing around with it. Now what I tried from the link didn't work, as I couldn't get the .db file imported, and don't really know how to declare that as the target of commands. Using the .tables or .databases commands didn't get any results either. .databases just said something like 0-Main and 9-local or something. Do you know how to pull this part off? Hope to hear back soon.
Thanks,
kyle_engineer

Didn't try to use sqlite3 on windows yet, on the phone, you need to do
sqlite3 contacts2.db
> .dump
and you will get all content of the database dumped as sql statements.
Sent from my Gingerbread on Dream using XDA App

Awesome man!!! the .dump worked and I was able to actually get a table output on the screen. Now I just need ot know how to make that something printable (ideally), and I need to try it with my actual G1, not my Droid1... I'll thank you tomorrow when it's done.

Ugh!
So I've been able to correctly import a .db from my droid 1 and get it properly printed on the screen using sqlite3. That worked fine. Now I've pulled the .db from my G1 (which has the needed contacts), and I can't get it to print correctly. Here is what I'm dealing with...
Code:
SQLite3 version 3.7.20
Enter ".help? for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
_sync_state settings
_sync_state_metadata status_updates
accounts v1_settings
activities view_contacts
agg_exceptions view_contacts_restricted
android_metadata view_data
calls view_data_restricted
contact_entities_view view_groups
contact_entities_view_restricted view_raw_contacts
contacts view_raw_contacts_restricted
data view_v1_contact_methods
groups view_v1_extensions
mimetypes view_v1_group_membership
name_lookup view_v1_groups
nickname_lookup view_v1_organizations
packages view_v1_people
phone_lookup view_v1_phones
properties view_v1_photos
raw_contacts
sqlite>
From here, no matter what I try to use the .schema and "select * from XXXX" on, I don't get any user friendly table like I did with the other .db file... could something be messed up with this .db?
Please let me know when you get a chance.
Thanks in advance!
-kyle_engineer

Related

Blizzard Mobile Authenticator for Java Phones ..

Check:
http://us.battle.net/security/
At the bottom it says "for java phones"
I'm guessing by this they mean an app that runs on those old SE's and Nokia's that can run java apps..
Anyone know if we would be able to run this on Android as well ?
NVM - Found this thread > http://forums.wow-europe.com/thread.html?topicId=10920962531&sid=1
Followed the steps and tada! It's working
Looks a bit weird but I can use touch screen controls as well as the HTC scrollball .. sweet!
Well, kind of... You'll need to get your hands on the .jad and .jar file for the mobile authenticator, install Netmite's J2ME Runner, and run the jad/jar through the converter to make an apk out of it.
The guide on downloading the jad/jar that's floating around shows you how to get the 176x220 version, which means the background doesn't come anywhere near filling up your screen. If you edit the .jar before you put it through the converter, you can replace bg.png with a larger background so that it fits our screens (320x390, since there's space taken up by the J2ME runner). If you're going to the effort of that, you'll want to change the icon to a 48x48 png also, so it's not so tiny.
Once you get it on the phone, it works great. You can pick menu options by touching the screen, or use the trackball. Make sure to write down whatever serial number it pulls, so that in the event that you mess something up on your phone you can remove it from your account. You need either the first several digits of your cdkey, the authenticator serial, or a faxed copy of your ID to remove an authenticator, it's a serious pain.
(edit)
And you posted while I was typing... Glad to hear you got it going.
Haha, thanks for sparing some of your time bakageta
If we were to reflash our roms and reinstall the key gen, would we be able to re-sync the authenticator without much problems? I just dont want to install this, and find out I'm screwed after updating a ROM that requires a wipe
To be safe, I'd remove the authenticator from your account before flashing/wiping. Just go to battle.net, security options, and it'll have you enter two consecutive codes.
Technically, if you back up the file on the phone that has the serial and 40-digit key, you should be able to restore that and not change serials, which would mean you wouldn't need to remove the authenticator first. I haven't tried it, so you may want to remove the authenticator the first time you do anyway, and then make sure the serial number is the same after reinstalling it.
I *believe* the file is /data/data/com.netmite.andme/app_rms.SecureLogin/TokenRecord.rms, just back that up and make sure to restore it after you're done and you should be fine.
thanks, bakageta!
I believe you can just reinstall it, long as you use the same installer file.
To be safe I'd follow bakageta's instructions though

Identifying symlink to avoid "infinite" loop when browsing files.

Hi,
I have tested this behaviour on both a N1 and the emulator. Could anyone tell me if that is a problem? How can I avoid the recursive code going forever? What is happening?
If you use any file browser/manager and starting going into /sys/devices/w1 bus master/subsystem/devices/w1 bus master/subsystem it will go inner forever, repeating that pattern devices/w1 bus master/subsystem/ all the way.
So when I run a recursive search it keeps going deeper and deeper and seems never to finish.
What is happening, how to avoid this behaviour?
I tried different file managers and they all seem to be going forever into these folders, although when I do a search through Astro it doesn't seem to get stuck with this loop (It seems to ignore the /sys folder, but I am not sure if this happens also in any other folder).
Some people point me this problem can be related to symlinks, but I didn't find a way of checking for those symbolic links with Android's Java.
I know it can be done (as proved by Astro file manager), I just don't know how.
Hopefully it won't involve any call to functions which I'll have to create using NDK, which would be a pain.
Regards.
astro goes infinite for me on an N1
I think any app needs to do some extra checks instead of following stuff down.
eg the "find" command has the "-follow" option
open a terminal or use "adb shell" and "cd /sys/bus"
now type in "find" and it will display all the files directories and symlinks without following them
now type in "find -follow" - you will need to press Control-C to get out, you will see that each line has an error "too many symlinks" - kernel has protection/limit for symlink levels.
writers of file managers could easily fix this, but you have to ask what you were doing in their anyway?
Lol, I was trying to find some info to address this problem under Android & found a relevant thread I thought might help, only to discover it was you (jfbaro) having this conversation on another forum
Specifically, this thread on anddev.org.
I don't know Android yet, but a getCanonicalPath() like call is always going to be at the heart of spotting in advance & avoiding this type of problem, whatever your environment & language. If it doesn't work either the function is broken or you're making a mistake somewhere, I'm fairly sure.
In the above thread you say this doesn't help you. Can you post what getCanonicalPath returns for both /sys/device/subsystem/ & /sys/device/subsystem/sys/ ?
Let's assume you start your traverse at / & have reached /sys/device/subsystem/. When you check to see if it's safe to follow /sys/device/subsystem/sys you should discover that the latter is actually /sys, and that further, it is in your list of already scanned directories, hence you do not search further down that branch.
Where is this breaking down?
[Edit:] You might also find something of use buried in this bug thread which involves similar issues. Funnily enough it concerns Eclipse, but all that matters is that it's a Java based example of the problem. From a quick scan, getCanonicalPath again seems to be the solution though I think they avoid any performance hit by only using it on files known to be sym-links.

Block ads on your Android phone (2010-04-15)

AdFree is a fantastic program created by XDA user delta_foxtrot2 (see this thread in the G1 forum) to facilitate using your hosts file to block ad servers. This makes it extremely easy. Of course you will need root access!
Unfortunately I found some ads still weren't blocked and the last update to the AdFree hosts file happened 2010-02-27. So I decided to update the hosts file myself. I merged the hosts files from adfree/mvps/yoyo and added a bunch of mobile ad providers I've found myself. The list is free of duplicates and comments, so as to keep it as small as possible (it still amounts to about 635 kB).
To install this hosts file, you still need root access obviously:
download the zip
unpack it to the directory where adb.exe is located (if you don't know what adb is or how to get it running, please use the search)
open a command prompt
Code:
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
adb push hosts.for.mobile.txt /etc/hosts
adb shell mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
You might need to restart your phone. Also clearing the Android browser cache will apparently help in getting rid of already cached ads (worked for me, ymmv).
As for ethical discussions on blocking ads for free apps, blah. I don't so much have a problem with ads, as I do with the personal data that gets send to the ad providers. I'm talking about location data and whatever else they might want to know about my device and what I'm running ("analytics" is a fancy name for "we want to find out as much about you as we possibly can get away with").
Anyway.. use it, don't use it, up to you.
Last updated
15-4-2010 23:23 (20808 hosts blocked)
.
Thanks a bunch!
Thanks for the updated hosts. So should we even bother with the program, especially if it doesn't get updated hardly at all?
You're welcome!
If you push my hosts file, you don't need the AdFree app, but I wanted to acknowledge his work and give people a simpler alternative to using adb.
Best choice right now is my hosts file as it's simply more comprehensive.
Sent from my HTC Hero using the XDA mobile application powered by Tapatalk
phaelox said:
You're welcome!
If you push my hosts file, you don't need the AdFree app, but I wanted to acknowledge his work and give people a simpler alternative to using adb.
Best choice right now is my hosts file as it's simply more comprehensive.
Sent from my HTC Hero using the XDA mobile application powered by Tapatalk
Click to expand...
Click to collapse
Understood. Yeah, it was a great start/beginning to blocking ads, but no updates. Thanks again.
Thanks! I've been looking for something like this for awhile. Real quick question: is getting "Data connectivity errors" in browser normal with this? It didn't start till I pushed this on my phone.
tmayne said:
Real quick question: is getting "Data connectivity errors" in browser normal with this? It didn't start till I pushed this on my phone.
Click to expand...
Click to collapse
Short answer: Yes.
Long answer:
You may know this, but I'll explain anyway. The way this works is as follows. The loopback address for any network interface is 127.0.0.1 -- this is the address for the device, but only from the device itself, it loops back on itself. We don't want to waste bandwidth with ads, or have ad providers collect all sorts of data on us, so we don't want to connect to them. Any FQDN -Fully Qualified Domain Name- (for example: analytics.admob.com) needs to be converted into an IP address to be able to connect to it. Here's where the 'hosts' file comes in. It's a simple text file with a record on each line that says redirect 'hostname' to 'ip-address'. So we put a line in that reads '127.0.0.1 analytics.admob.com'. This tells our device that any connection made to 'analytics.admob.com' needs to be redirected to '127.0.0.1', which is your device. Basically a dead-end, as you are not running their webserver serving ads on your device, so this results in a data connection error.
Now, usually you will surf to a site that loads images (advertisements) from a server that is listed in this hosts file, and as a result the ads will not load. That shouldn't popup any error windows. But if you try to visit http://analytics.admob.com in your browser, then yes, you will see an error.
If the latter happens with a site you do wish to visit, just open the hosts file in a text editor (one that supports UNIX-style line ends) and remove the line in question, or put a '#' in front of the line to comment it out.
Hope that made it clearer.
Yeah it did. No worries though since it seems that after pressing "Ok" everything works fine! Small trade off for blocked ads! Thanks!
Thanks for this How-TO!
So basicaly that mean we can restrict acces to certain websites from our phone?
eg: adding this line
Code:
127.0.0.1 forum.xda-developers.com
and I'll no longer be able to browse XDA from my phone?
Keep writing such How-To, like this one and the one to sign update.zip, I found this interessant and usefull
tmayne said:
Yeah it did. No worries though since it seems that after pressing "Ok" everything works fine! Small trade off for blocked ads! Thanks!
Click to expand...
Click to collapse
You're welcome, glad I could help.
carbonyle said:
Thanks for this How-TO!
So basicaly that mean we can restrict acces to certain websites from our phone?
eg: adding this line
Code:
127.0.0.1 forum.xda-developers.com
and I'll no longer be able to browse XDA from my phone?
Keep writing such How-To, like this one and the one to sign update.zip, I found this interessant and usefull
Click to expand...
Click to collapse
Cheers. And yes, that's exactly right. Just remember the hosts file takes FQDN's, so you can block a domain (or subdomain) this way, but not a directory or page on a domain. Also, blocking a domain does not also block its subdomains.
PS. this method of using the hosts file is not unique to your android phone, it works on most operating systems on PC as well. See this Wikipedia entry for more info.
what about non rooted phones? I just got myself a htc desire, I'm happy with it but would be happier if I wouldn't be required to see all those ads.
Unfortunately root is required to remount /system as writable to be able to overwrite the hosts file.
Without root you could use another free app found in Market called "AdBlock", which functions as a localhost proxy. Just set localhost as proxy in APN/wifi settings. It doesn't come with a prefilled list of keywords to block though, but it works on a URL level, not FQDN, so you can specify a url or part of it to block.
Just one more quick concern about the Data Connectivity issues: Certain areas of my university require a redirect page login in order to connect to wifi. However, it seems that at certain locations, I get the Data Connectivity error pop up repeatedly and my phone never makes it to the redirect page.
Actually it seems my phone only likes the wifi in my dorm. As stepping outside (to a library or classroom) and attempting to connect to the same wifi produces the error.
Is this an issue with the hosts file or with the phone itself??
Thanks!
If you DO see the wifi redirect page at SOME locations, then the hosts file is not blocking it (wouldn't make sense as it's likely an intranet page anyway). Sounds like wifi reception is unstable on your phone.
This is getting off-topic, but..... Have you already updated your radio? (the part of the ROM that handles everything related to GSM/3G/WiFi/Bluetooth connections). If not, here for the latest radio update.zip - flash through recovery.
phaelox said:
If you DO see the wifi redirect page at SOME locations, then the hosts file is not blocking it (wouldn't make sense as it's likely an intranet page anyway). Sounds like wifi reception is unstable on your phone.
This is getting off-topic, but..... Have you already updated your radio? (the part of the ROM that handles everything related to GSM/3G/WiFi/Bluetooth connections). If not, or the latest radio update.zip - flash through recovery.
Click to expand...
Click to collapse
I should note that I'm using a Motorola Cliq...Handler 1.5 ROM. There is a radio update available for the Motorola Cliq (I'm currently using 1.3.18 and 1.4.8 has been released) but there are some apk incompatibilities with it (particularly Swype which I love...since it's in closed beta right now, there are no accessible updates for it unfortunately).
Since I bought my phone off of ebay, I can't send it back for a new one. The essential things work but it is a bit frustrating that it has some problems.
tmayne said:
I should note that I'm using a Motorola Cliq...Handler 1.5 ROM. There is a radio update available for the Motorola Cliq (I'm currently using 1.3.18 and 1.4.8 has been released) but there are some apk incompatibilities with it (particularly Swype which I love...since it's in closed beta right now, there are no accessible updates for it unfortunately).
Since I bought my phone off of ebay, I can't send it back for a new one. The essential things work but it is a bit frustrating that it has some problems.
Click to expand...
Click to collapse
I'm pretty sure that updating radio won't affect other softwares since "radio" is *just* the piece of code that can handle GSM/Wifi/BT/3G, ... signals
I'll always keep an open mind, but from what I know, I'm with carbonyle on this.
Back on topic:
if you come across an app that still displays ad, regardless of my hosts file, please reply in this topic with the app/version (and a logcat output would be nice if you know how) and I'll see if I can find the ad provider domain and update the hosts file.
I'm confused... This is for blocking apps adds???
:No-Frost: said:
I'm confused... This is for blocking apps adds???
Click to expand...
Click to collapse
Yes it is. See it like a firewall wich blocks mobile ads. Because the app wont recieve any response from the ad url it tries to reach, it'll simply not display the ad (like when you use the app without wifi or data connextion on)
Wooooooo thanks... worked like a charm in glympse shazam and others =D...
PS: Air Control still have adds... Mmm how can we know what's the host for the add in the apps so we can contribute into blocking them???

Facebook pictures in 3rd Party Apps. (Requires Root)

I know this has been addressed before, but I never saw a fix for it in the Droid X world. Basically, since version 1.3 of the Facebook app and Android 2.x, your contact pictures would not show up in 3rd party apps such as Dialer One, Launcher Pro widgets, and some messaging apps. This is a facebook thing, not Android.
In any case, I've used SyncMyPix for some time, but was tired of having to go manually update the pictures and what not, so I returned to my old home in the Eris forums and did some searching. Zanfur, one of the great devs over there worked out a more permanent fix at the database level. You can see the original thread HERE.
Unfortunately, this doesn't work with Blur, so I had to do a little screwing around with the code to get it to go. I take absolutely zero credit for this. All I did was write a batch file that works with our Blur-enabled phones.
Basically, the script will remove the permissions restrictions on existing contacts and add a trigger to automatically remove them whenever a new contact is added, synced, etc.
WARNING: As of yet, I have had no issues with this, however, you ARE fooling with a database that you SHOULDN'T be playing in. Therefore, make a NAND backup before doing this. I take no responsibility if you screw up your phone.
You must have the Android SDK installed and working for this to work. If you don't have that up and running already, you probably shouldn't be doing this.
Instructions:
1) Unzip the file to the \tools directory of the SDK
2) Open a command prompt and navigate to your tools folder. *see note
3) Type "facebookfix" without the quotes. Note: This will reboot your phone!
4) Wait for your phone to reboot, and enjoy your facebooky goodness.
*Alternatively, you can just doubleclick "facebookfix.bat", but when someone is doing things to my phone, I like to see what's going on.
Another warning: If you are running a ROM without BlurContacts, this will not work. I doubt it will break anything, but it will most likely error out.
Do you happen to have a solution for the opposite?
I hate how FB dominates my phone. I absolutely love an option to choose between the FB photo and a custom photo like I had on my WinMo phone (Touch Pro 2).
It's a Catch 22 with FB. I love having status updates when I get a call and picture updates, but I also don't like how some pictures it misses a face and I see the persons torso... or worse yet a picture of their pets instead of them.
EtherBoo said:
Do you happen to have a solution for the opposite?
I hate how FB dominates my phone. I absolutely love an option to choose between the FB photo and a custom photo like I had on my WinMo phone (Touch Pro 2).
It's a Catch 22 with FB. I love having status updates when I get a call and picture updates, but I also don't like how some pictures it misses a face and I see the persons torso... or worse yet a picture of their pets instead of them.
Click to expand...
Click to collapse
Just open the contact and manually set a picture. It will always override the FB pics.
Only does for other applications, but not for the address book and / or the phone app.
EtherBoo said:
Only does for other applications, but not for the address book and / or the phone app.
Click to expand...
Click to collapse
I wrote a little SQL script that will set your contacts to only read pictures from google, but obviously you would need to manually sync up your photos from SyncMyPix or the like. You should still get all your status updates and what-not.
Just hook up to adb and copy and paste these one at a time.
Code:
adb pull /data/data/com.motorola.blur.providers.contacts/databases/contacts2.db
sqlite3 contacts2.db "UPDATE blur_sources SET picture_source=0 WHERE gams_account_type in ('com.motorola.blur.service.bsutils.MOTHER_USER_CREDS_TYPE'); UPDATE blur_sources SET picture_source=1 WHERE gams_account_type in ('com.google');"
adb push contacts2.db /data/data/com.motorola.blur.providers.contacts/databases/contacts2.db
adb shell "chmod 777 /data/data/com.motorola.blur.providers.contacts/databases/contacts2.db"
adb reboot
Should you decide this isn't what you want, you can run it again reversing picture_source=. Should put you back to normal.
erishasnobattery said:
I wrote a little SQL script that will set your contacts to only read pictures from google, but obviously you would need to manually sync up your photos from SyncMyPix or the like. You should still get all your status updates and what-not.
Just hook up to adb and copy and paste these one at a time.
Code:
adb pull /data/data/com.motorola.blur.providers.contacts/databases/contacts2.db
sqlite3 contacts2.db "UPDATE blur_sources SET picture_source=0 WHERE gams_account_type in ('com.motorola.blur.service.bsutils.MOTHER_USER_CREDS_TYPE'); UPDATE blur_sources SET picture_source=1 WHERE gams_account_type in ('com.google');"
adb push contacts2.db /data/data/com.motorola.blur.providers.contacts/databases/contacts2.db
adb shell "chmod 777 /data/data/com.motorola.blur.providers.contacts/databases/contacts2.db"
adb reboot
Should you decide this isn't what you want, you can run it again reversing picture_source=. Should put you back to normal.
Click to expand...
Click to collapse
Sweet!
You mean copy each line by itself?
A friend told me I could also do this via a terminal app (can't install Android SDK on work laptop, and I'll be out of town until next week).
Yeah, just run one line at a time.
I've tried this like 100 different ways in terminal emulator, but something with permissions seems to be preventing me from editing the database in place, hence pulling it off the phone, modifying it, and sticking it back.

[Q] usb reverse tether to feature phone

I have a basic samsung feature phone. Id like to use this as a modem for my Acer if possible. This phone works fine on all my ubuntu systems - just plug it in for the first time, click next-next in the wizard and I'm online. On the tablet, I see that it shows up as a /dev/ttyACM0. I belive this means that its a matter of getting the correct chat commands and associating pppd with the android layer. I imagine the process must be similar as to getting a USB 3G dongle working. Does anyone have any thoughts on how to do this?
There are already some threads about tethering the tablet to your phone, as well as 3G dongles.
http://forum.xda-developers.com/showthread.php?t=1152869
But yeah, no solution yet.
got it working
I thought I'd post the info on how I got this working for my specific situation. I have not read many other threads about this so maybe this type of info is already out there.
My phone is a basic samsung feature phone on AT&T that I called up and got unlimited data for $10/mo extra. This phone is practically unusable for browsing on itself. I plugged it into my ubuntu laptop and basically the tethering worked right away. I thought then that it should be able to work on the tablet. I wanted to make sure that "unlimited data" also applied to tethering to a computer. They said yes, if you can get tethering working - still no limit. I get 1-2Mbit rate over it.
This is on a rooted tablet, of course.
When I plug it into my tablet I get a single /dev/ttyACM0. If your phone is similar, you maybe able to use this info.
I went to At+t website and found this:
Then I read the man pages for pppd "man pppd". From this information, I understood how to modify the sample scripts "gprs", "gprs-connect-chat" and "gprs-disconnect-chat".
I then came up with a suitable "ip-up" script, based on ones found in the Huawei 3G modem example code. This is called when a ppp0 connection is made. Some of the lines in there I am not sure of, but it works, regardless.
I was surprised to find the standard "chat" program was not present in any of the roms I'd tried. Currently I am using virtuous Xoom. Somewhere, I found "chat-ril" which did the trick.
I've attached "modem.zip" which contains all the mentioned files.
From a root shell, you type:
pppd call gprs &
(This is kind of a pain but I'd like to find a way to automatically do that when the phone is plugged in)
If you do ifconfig ppp0, you should have an address, then try to browse.
Now I'm watching Netflix on my A500 as I drive! Also google navigation is absolutely great on a tablet, once you have the data connection.
willyampz said:
I've attached "modem.zip" which contains all the mentioned files.
From a root shell, you type:
pppd call gprs &
(This is kind of a pain but I'd like to find a way to automatically do that when the phone is plugged in)
If you do ifconfig ppp0, you should have an address, then try to browse.
Now I'm watching Netflix on my A500 as I drive!
Click to expand...
Click to collapse
Thanks for the work, but what are we to do with the modem.zip file you provided?
Modem zip contains the scripts and the chat-ril utility that need to be copied to your tablet. There's two ways to copy the files to your tablet:
1)
first unzip the files on your PC
use adb and push the files over to your tablet in the corresponding locations under /system.
2)
unzip the files to a micro SD or USB stick
remount the /system partition as read/write
copy them to the corresponding locations in the tablet filesystem from the SD or USB stick.
Copying files to your /system partition is described elsewhere in the forum but I can give more detail if needed.
I'm admittedly a noob on many levels. I think I followed your instructions but I get:
# pppd call gprs &
# /system/bin/chat-ril: permission denied
Any suggestions?
make sure you do it as root by typing 'su' first. Also check the permissions of chat-ril binary to be executable.
Thanks, it was the chat-ril with incorrect permissions.
So going with what you provided and much help from Google, I was able to make my own set of scripts for my phone and carrier (a Nokia 5230 and T-mobile). It looks like it's connecting both in my shell on the tablet (all "got it"s and OKs) and on the phone side which shows it with the 3G connection in use. Executing that ifconfig ppp0 gives me an ip address with a [up point-to-point running multicast].
My problem is I can't seem to access anything on the tablet. I can ping google from within the shell but the default browser, Dolphin, and the rest of my internet accessing apps don't work. I did change a line in the ip-up file from /system/bin/setprop "net.interfaces.defaultroute" "gprs" to "3g", which is what I named my connection script. Is there something else I'm missing?
Thank you for all the help.
Well, the good news is you can ping which probably means it can work and you are just about there.
The stuff in ip-up I don't completely understand myself, but that's probably where the issue is. By that point I was so close and anxious, that I just manually did some 'setprop's and experiment until it worked. I had exactly the same issue where I could ping but not browse at one point. Also, make sure the dns setprop's are set. Are you sure the "3g" should not be "gprs". I'm not sure that has to do with the script name. But maybe just the fact that you can ping means that's ok. I'm just not sure. Good luck.

Categories

Resources