Spinner.getCount() & ArrayAdapter.getCount() - Android Studio

I don't know what these functions are returning, but they apparently have nothing to do with the number of items that have been inserted into them.
Or at least the correct value they return is not persistent and not reliable.

Related

[Q] Is it possible for N1 to choose wrong APN?

My phone provider, vodafone in Ireland, has just charged me €22 for using 13MB from the wrong APN.
Basically, I am entitled to 1GB of data a month, provided I only access the live.vodafone APN. If I accidentally connect to isp.vodafone.ie, I will be charged lots of money.
A few months ago, I got an enormous bill for accessing isp.vodafone.ie. I checked my list of APNs and saw that while isp.vodafone wasn't selected, it did exist in the list and I figured that what had happened was that my phone had simply chosen a faster, or less busy connection to use. So, not wanting to get any more nasty surprises, I removed the isp.vodafone.ie APN completely from my phone. Vodafone were kind enough to give me a refund for something that seemed to be my fault, or my phone's fault, and that was that.
Or so I thought.
This month, I get another large bill for 13MB from the wrong APN. I checked my APN's list, because, you know, with Cyanogen, sometimes you get a large list of them for free whether you want them or not!
But no, it's not in my list and when I pulled the /system/etc/apns-conf.xml file, it wasn't in there either.
So, my question is, is there any way that your phone can still "remember" an APN that's not in the list?
And another question: if an APN *is* in the list, is there a way to disable it? I had originally thought that not having it selected was enough, but I may be wrong.
thanks a lot.

Programming options on Droid 3

If you enter ##7764726 (##PROGRAM), along with the SPC code 000000 (six zeroes); you can check out some stuff to program the phone settings (although I believe this holds true for all verizon phones?)
Haven't looked at all the options yet, but wanted to share this
As always, anything you modify here is at your own risk, and by doing so you accept said risk - I take no responsibility for the consequences.
I just stumbled across the same settings while looking at old threads to improve Droid X call quality, hoping some might apply to the D3.
Having had a look around the settings there's one that should improve call quality - goto "Test mode->next->next" (phone will warn "failed to get CDMA RX diversity" - no idea why but this setting seems to fail every time and cannot be set). Then select "service option->EVRC-B". Then hit back a lot to return to the dialer. This switches the voice codec for calls to a newer version, using less cell bandwidth and resulting in (hopefully) better quality audio.
The only other setting I've used is setting P_REV to 09 (was 06). As far as I can tell this has had no effect tho (I'm on vodafone in UK if that matters).
[edit] wikipedia says this about P_REV_01 to 06:-
http://en.wikipedia.org/wiki/IS-95
And this on P_REV_07 and above :-
http://en.wikipedia.org/wiki/CDMA2000
Which means P_REV_09, should give faster CDMA connections, providing the local network supports it.
[/edit]
Disclaimer - messing with these settings is not recommended, don't do it if you can't take the consequences.
In reference to the programming menu.. The test changes for EVRC-B do not hold. They are either reset randomly, and deffinitley after each reboot. I think this might be a lsot cause on the D3, unlike the other Moto Droid's.
I have found some use with resetting phone numbers and such when 3G has been borked for unknown reasons.

[Guide][Technical]Restoring your device specific data (including Service Tag)

Introduction:
See: Dell Streak 7: Partition Layout
The Streak 7 stores it's device specific data in partitions WP1 and WP2, which are partitions 23 and 24 respectively.
Due to the overzealous and blind use of NVflash, many Streak 7 users have overwritten their device specific data, this guide will document it's layout so you can regenerate some of the values stored in it.
You should NEVER modify WP1 and WP2 under normal usage, only partitions 2-21 should be modified, even then it is good practice to avoid modifying anything but the relevent partitions.
Requirements:
A Streak 7
A template p23.img and p24.img
Ability to use a hex editor
Understanding of hexadecimal addresses
Understanding of how to use NVflash
As stated: this is a TECHINCAL GUIDE, if you do not understand how to use a hex editor and NVflash without relying on batch scripts, THIS GUIDE IS NOT FOR YOU.
WP1 Layout:
Code:
0x85 - 0x91: Unknown version number
0x92 - 0x103: Picasso Number
0x521 - 0x543: PPID
0x548 - 0x554: Service tag
0x559 - 0x573: IMEI
WP2 Layout:
Code:
0x0 - 0x11: Wifi MAC address
0x16 - 0x27: Bluetooth MAC address
Values:
Unknown version number - self-explanitory [Cannot be regenerated]
Picasso number - use unknown, viewable in fastboot mode on 50x roms [Cannot be regenerated]
PPID - self-explanitory [Listed on flap]
Service tag - self-explanitory [Listed on flap]
IMEI - self-explanitory [Listed on flap]
Wifi MAC address - self-explanitory [Cannot be regenerated]
BT MAC address - self-explanitory [Cannot be regenerated]
Notes:
INTENTIONALLY CHANGING YOUR IMEI IS ILLEGAL, DO NOT CHANGE IT UNLESS YOU ARE ATTEMPTING TO FIX IT
INTENTIONALLY CHANGING YOUR SERVICE TAG CAN BE CONSIDERED WARENTEE FRAUD
If you do not fully understand this guide you are not the target audience for it, this guide is for able users to repair other's devices.
Good info
I am new to this device and have found flashing ROMs can really cause issue in the areas you described. I changed the service tag on ln220/pg23 but did not know about the other issues. I have checked the flap on my device and don't seem to see any IMEI number. Appreciate you sharing your knowledge. Could you explain a little more on this? I want to make the changes and reflash stock 2.2.2 for now. I got the box from Dell this week to send it back but I had rather not. Thanks
If your service tags are still correct, dont ever flash p23/p24 unless it is the one dumped from your own device.
Is your a tmo one, and the imei isnt on the flap? I was only assuming it's on the flap, i havnt actually been able to compare the flaps from US4Gs and wifis
TheManii said:
If your service tags are still correct, dont ever flash p23/p24 unless it is the one dumped from your own device.
Is your a tmo one, and the imei isnt on the flap? I was only assuming it's on the flap, i havnt actually been able to compare the flaps from US4Gs and wifis
Click to expand...
Click to collapse
I have the USTMO 4g, and the asset tag is on the flap - it is very small.
flap info
Mine is a US wi-fi only bought at Staples. If you refer to an earlier post, I scewded the pooch when trying to manually install HC and wiped the memory with CWM. I flashed a TMO rom thinking it was the right one, later found the correct stock ROM and flashed it. I had never read anywhere about the information you provided about pg23/24. The only thing on my flap is the ppid (which is wrong on my ROM flash), service tag, some kind of E service number, model number, type, and fcc id that starts with an E. The later three are not on a white background like the others. There is also some sort of barcode. There is a thread about service tags being wrong after flashing, so I changed it using HxD. I would like to get the other entries fixed as well. I'm just a noob, but I ain't scared to try!
Like on the post, the Service tag, IMEI and PPID are the only ones that can be regenerated as they're the only ones written down somewhere.
They're both written on that flap and on the retail box (as each box has that devices's unique info on the sticker.
The e service number isnt ever listed in p23/24, nor is the serial number ever listed on the flap/box.
The only reason some values cant be regenerated is because they were simply never written down anywhere, if you did in fact have the MAC addresses written down along with the other values, you could just plug them back in.
For P24 the only unique data is the mac addresses, the rest of the partition seems to be bit identical across all devices.
P23 is the main one, on top of the plaintext values, there's a couple fields in binary that are no zeroed, and are unique across devices. I havnt even listed those since I have absolutely no idea what they do/contain.
Without knowing how dell generates them in the first place you will never be able to fully regenerate them, the only right way would be to back up your originals and not ever update P23/24.
-----------------------------
Could you take a clear picture of your flap (or anyone that's on a 3/4g model), I only assumed the IMEI is there as the wifi ones seem to have a blank space on the label where you might be able to squeeze in the IMEI tag.
It SHOULD also be on your retail box as the IEMI on a barcode is usually how stores identify them when selling them.
I will check my box when I get home in a day or so, will also get a pic of the flap.
You also might be able to get your mac address from your wireless router. I know my netgear shows the mac of the devices connected to the dhcp server.
box pic
This is a pic of the box info. It is of course the same as on the flap. The fcc id shown here is the only item on the flap that is not printed on a white background.
If I am not mistaken, MAC adresses on the router are picked up from the connected device. So if the MAC address on pg24 is wrong the router just picks it up. The only way to find your correct address would be if you had some sort of router history file of devices that had connected and you had connected before you flashed a new ROM. I am definatly not an expert.
I have found the correct line to adjust for the ppid number but what about the imei number? If I send this back to Dell they could do a complete restore but they could see that I flashed and cancel me out, even though I told the tech I talked to that I flashed in an attempt to get running again. I had rather just fix it myself.
BTW, if it is not, then the original post on this thread should be stickied as mandatory reading before you flash. I thought I had read everything.
You stated yours is a wifi model, so I dont even know why wifi ones have an imei stored in them, obviously it isnt actually used by the device since there's no modem (or is there? noone's ever taken apart a wifi s7 and checked the slot)
The mac: yes if your router has it's history, if it doesnt for any reason you're SOL.
The imei on wifi ones prob isnt checked at all unless something like the service tag looks wrong and they examine the entirety of p23. I would imagine they have factory tools that can pharse it and not simply look at it in a hex editor
The PPID is also device specific, but it's contents are partially unknown, it's
PPID: CN-<product number>-<unknown 5>-<unknown 3>-<unknown 4>-A00
The 3 unknown fields might be related to something, they might be serial numbers.
74261 is a common value for us wifis,
one of the ones I have a ppid from differs from yours by only the last 2 digits in unknown 4.
Getting entire historys of devices might provide more clues on generating the PPID (yes looking at the box will give you it, but I would be interested in knowing what it contains)
I still need shots from a 3/4G one, i assume their boxes/flaps list the imei (as the previous poster suggested that they did)
Thanks for the post, excellent. I have restored to stock following one of the other posts here & have the issue with Tag No. etc changing, so now I can sort it hopefully.
One question though, I noticed my Bluetooth Mac address is sequential to the wireless MAC address. Can others confirm this is the case on their devices, as I have found the Wireless MAc from my router history. If they are sequential it means the Bluetooth MAC can be sorted as well.
For the s5 and apparently on the s7, the bt mac is the next hex digit after the wifi one, so if you have the wifi one just increment by one
Glad you found your router history. I looked all through my Linksys router pages and can find nothing.
more info on the subject
I am continuing to learn more on this subject. I found that in My Phone Explorer you can find the IMEI number along with a link that tells you exactly what it is. I wrote down the number as it was displayed and opened up the PG23 files and could not find anything that comes close to matching it. The correct lines show only 15 digits whereas the number shown in My phone Explorere is 16 digits. As my unit is a wi-fi only one I wonder if it needs an IMEI number at all. I opened PG24 and found that my bluetooth and wi-fi MAC addresses are the same. I was curious to see what the Tmo ROM I flashed contained and opend it. I was suprised to see that it ended with PG22. So I now know that I had all my information correct after I flashed that ROM and lost it after flashing the "original" ROM. As the OP stated, never flash PG23,24.
new info
I changed the ppid and reflashed, just to try and get it back completly stock. When I connected to My Phone Explorer to sync, a new relationship had to be established. When I looked at the status, the IMEI number had changed and I think also the MAC address also but not sure. So these numbers must somehow be related. When you compare the ppid and the IMEI they are different numbers completely but changing the ppid on PG23 results in a change of the IMEI number.

[Q] Meid Set to Zero - Can't write actual meid

I posted this in Android Forums too, so sorry for posting again here but perhaps someone can assist.
I know this is a sensitive subject but I bought a phone from ebay to put onto my account. The meid, is zeroed out. It shows up in the phone status as 0000000000000. I have been trying for a week to get this fixed using the usual tools, but I can't. Whenever I try to write the proper meid using requestnvitemwrite meid, I get a "Error response received from target". What I THINK the problem is is that, although the meid is zeroed, the ESN is not. I didn't think this was possible as the meid was supposed to write the p(ESN). When I do a requestnvitemread meid, it comes back as as 0x0000000000000000. However, when I do a requestnvitemread esn, I always get the proper actual ESN. (The p(ESN) that shows when I do a online calculation of my actual meid)
Obviously, I can't take the phone to be set on my phone account with no meid.
I read that both MEID and ESN have to be zeroed to fix the meid. I have tried SCM 0x2A and SCM 0x3A. I have downgraded the radio to 1.04. I have downgraded the operating system to 1.5. What I believe I understand is that if all p(ESN) are not put to zero, you can't write either the ESN or the MEID. It appears that the MEID is zero but that perhaps one of the ESN location is not? I have read and read and read about this. I have searched every location I have found listed, or that I could scan for and search with a hex editor and no matter what I do, the ESN comes back as the proper one, but the MEID can't be written.
Perhaps I have missed a ESN address, or perhaps I am missing something, but I would sure appreciate any suggestions.
If anyone can, within the forum rules, give me any guidance or thoughts on how I can resolve this, I would appreciate it.
I am having somewhat the same problem, but I'm having trouble with the MEID instead of the ESN. I cannot find their locations.
are you trying to fix the meid/esn back to the original (printed under the battery) or are you trying to clone it. cloning is illegal and is not acceptable talk around these parts, but repairing to original i believe can be talked about. there are plenty of repair guides out there (google is your best friend)
since i assume your repairing the meid/esn to original, for educational purposes check out the link
http://forum.xda-developers.com/showthread.php?p=8166124
post # 13 has more info, link may be down, see if there is a cached page on google
good luck

[Q] Question for tech experts

Can anyone answer this? I don't have a problem right now. I'm just interested in learning how this works.
On my Note, the number shown in Messaging > Settings > Message Centre is +6596197777 which is the correct number for Singapore where I live.
However, the number shown by the code string *#*#4636#*#* > Phone Information > SMSC: > Refresh is "06915669917777".
Why are these two numbers different? Is the second one a different format?
Why I'm Asking
I came across a number of posts on various forums describing problems with sending sms (while still being able to receive) and I had this problem myself for a while.
1. Many posts said that the way to fix this problem was to get into the testing menu with *#*#4636#*#* and input the number in the SMSC: field and hit the "Update" button.
2. However, when I tried entering +6596197777, it returned "Update Error"
3. If I leave the field blank (it's always blank by default), and hit Refresh then
"06915669917777" appears.
4. I was able to send sms messages successfully with this number BUT WITH NO number entered in the Messaging > Settings > Message Centre.
5. I assumed (probably wrongly) that the Message Centre number was embedded on the SIM card when supplied by the telco.
Thanks in advance for any help with how this works.
Trevor
sacentre said:
Can anyone answer this? I don't have a problem right now. I'm just interested in learning how this works.
On my Note, the number shown in Messaging > Settings > Message Centre is +6596197777 which is the correct number for Singapore where I live.
However, the number shown by the code string *#*#4636#*#* > Phone Information > SMSC: > Refresh is "06915669917777".
Why are these two numbers different? Is the second one a different format?
Why I'm Asking
I came across a number of posts on various forums describing problems with sending sms (while still being able to receive) and I had this problem myself for a while.
1. Many posts said that the way to fix this problem was to get into the testing menu with *#*#4636#*#* and input the number in the SMSC: field and hit the "Update" button.
2. However, when I tried entering +6596197777, it returned "Update Error"
3. If I leave the field blank (it's always blank by default), and hit Refresh then
"06915669917777" appears.
4. I was able to send sms messages successfully with this number BUT WITH NO number entered in the Messaging > Settings > Message Centre.
5. I assumed (probably wrongly) that the Message Centre number was embedded on the SIM card when supplied by the ISP.
Thanks in advance for any help with how this works.
Trevor
Click to expand...
Click to collapse
i had similar problem with miui on my samsung s2, for me helped like this: put another sim card, send sms and than put back that main sim card. Maybe it will help
Hello sacentre,
I had a similar experience with my x10 when i updated to gingerbread 2.3.3. I tried messing with the settings, and after a lot of factory resets and google search, only one thing solved it. I can't guarantee if this will work for you, but here it goes.
1. Go to your local ISP and ask them to replace your SIM with a new one. (the reason behind this is that there might be an issue with old SIM cards, even if they are only a few months old) In most countries they allow you to keep the same number.
2. Power down phone and remove the old SIM card.
3. Power on the phone without the SIM card.
4. Power off phone.
5. Power it on with the new SIM card inserted.
The above did the job for me. If all else fails, factory reset.
Hi, thanks for the replies.
It's one of those things where the picture gradually evolves over time and is far more complicated than I'd thought (no surprise really). It's interesting though. As I said at the start of the thread, I can send sms correctly but I'd like to know more about how the software/firmware works and what these damn numbers mean.
The trick of putting the SIM card into another phone and attempting to enter the Message Centre number there was suggested a couple of times on the forums.
When I took the phone to my telco, that's the first thing they tried after I asked them to check and/or replace the SIM card. This confirmed my assumptions that
1. the number is embedded on the SIM card by the telco when supplied with the mobile contract.
2. the phone reads the number from the SIM card and the number should appear in the SMSC: field in the Testing menu when the Refresh button is hit. This doesn't happen. Even when I tried it the first time, all I was getting was "00" but later the different number as I describe above appeared. It works however but I still want to know why the number is different from the one in the Messaging app.
The staff at my telco had no knowledge of the Testing menu and emphatically claimed it was a third party app I'd installed illegally until I got one of them to key in the code on their own phone and see the menu for themselves!
Neither they nor I noticed that the phone's Messaging app did not have any Message Centre number entered at the time. I was still able to send sms with no number entered.
I learn a little more each day thanks to contributors on these forums. Thanks again.
Trevor
Bassarnis said:
Hello sacentre,
I had a similar experience with my x10 when i updated to gingerbread 2.3.3. I tried messing with the settings, and after a lot of factory resets and google search, only one thing solved it. I can't guarantee if this will work for you, but here it goes.
1. Go to your local ISP and ask them to replace your SIM with a new one. (the reason behind this is that there might be an issue with old SIM cards, even if they are only a few months old) In most countries they allow you to keep the same number.
2. Power down phone and remove the old SIM card.
3. Power on the phone without the SIM card.
4. Power off phone.
5. Power it on with the new SIM card inserted.
The above did the job for me. If all else fails, factory reset.
Click to expand...
Click to collapse

Categories

Resources