yashsingh1/xdaforums huggingface dataset:
[Nook Color Android Development] Decad3nce:
This is work done by clockworx which can originally be found: http://xdaforums.com/showthread.php?t=877752

I just grabbed the original patch and merged it into 1.1.0 framework.jar; and I'm posting this here for reference on how to patch framework.jar in future B&N releases.

Things you'll need:

APKtool(by brutall): http://code.google.com/p/android-apktool/

framework.jar: Just grab it from the official sideload update.zip

Patch: http://dl.dropbox.com/u/9992367/TelephonyManager.patch

Pastebin: http://pastebin.com/4gxqHw6B

How-to:

You'll need to decompile the framework.jar from the sideload update.zip.

Create a separate folder to do all of this.

apktool d framework.jar

Should output:

I: Baksmaling...
I: Copying assets and libs...

Then you'll grab the above patch, and copy it to /framework.jar.out/smali/android/telephony/

cp TelephonyManager.patch /framework.jar.out/smali/android/telephony/TelephonyManager.patch

Then cd to the directory, and patch the file!

cd framework.jar.out/smali/android/telephony
patch -p0 -E < TelephonyManager.patch

output:

patching file TelephonyManager.smali

and you're done patching the file!

Remove the patch file before continuing!

You'll now need to build framework.jar again. Go back to the initial directory and run:

apktool b framework.jar.out

output:

I: Checking whether sources has changed...
I: Smaling...
W: Could not find resources
I: Building apk file...

Don't worry about the warning about not finding resources, it's expected.

And thats about it.

Here's the patched framework.jar for 1.1.0 that's already included in IOMonsters rootpack: http://dl.dropbox.com/u/9992367/framework.jar

Hopefully this will be a valuable reference in the future!

Credits:

Clockworx

brut.all
[Nook Color Android Development] bdcrim:
Deca, anyway to move files with root explorer? I am lazy.
[Nook Color Android Development] Decad3nce:
lol, no. You need to decompile framework.jar to be able to patch telephony manager to generate an AndroidID
[Nook Color Android Development] brianf21:
This patch file does not work with the framework.jar for NF. Could we get an updated patch file? Or the method on how the patch file was created?
[Nook Color Android Development] Decad3nce:
The patch file itself will give you an idea of what needs to be done. There are a lot of differences between the 2.1 Telephony Manager and the 2.2(NF) Telephony Manager so you'll have to take those things into account when merging them in.
[Nook Color Android Development] brianf21:
When i did, i was getting a 15 digit IMEI number error in logcat when i opened thr market.
[Nook Color Android Development] clockworx:
Huh, I had no idea this was still in use :)

I might be able to do a 2.2 version over weekend if no one else gets around to it (on the road currently and my Dev tools are back at home)

Also, at some point I need to have it save to a SqlDB. Right now it generates a new one each request, which doesn't matter for most people since you only get the Android ID once, but I did see a thread complaining that their app validated by IMEI and it generated a new one each time. Oops!

For what it's worth, I've never had to use a hacked framework.jar for NF, otherwise I would have done one already. Does anyone have a further description of why they want it? The main purpose this was used for was to make Market/Talk work, and they both work for me in NF out of the box.
[Nook Color Android Development] racks11479:
Just wanted to say thanks for the patch. After I replaced my framework.jar with the patched one. Some apps that were FC'ing now runs. Especially my NBA Gametime is back up and running. Some of my GAMELOFT HD games that were FC'ing is also running as well now. Guess it has to do with the app looking for an AndroidID.

Stock 1.1.0 Rooted

Update: My apps work now but it broke my stock B&N shop. Goes to a black screen after loading. Im able to exit out of it. What could be causing this?

Edit: Neva mind. Seems that the modified framework didn't include the META and preloaded-class files from my original framework.jar. Guess shop is dependent on it somehow. Everything works now. Thanx again.
[Nook Color Android Development] paleh0rse:
Little bit confused...

1) What problem(s) does this address?

2) Will this fix my current inability to use the web-based market?

3) Can we simply replace our framwork.jar file with the one in the OP, or do we have to compile our own? What directory is it in?

Note: I used the unofficial AN3.0 on top of stock 1.1 to root and install gapps...

Thanks ahead of time!
[Nook Color Android Development] jboxer:
Not working in Windows

Okay, I have the file decompiled but there is nothing to execute "patch" on my Windows system. Where do I get the tool to do the actual patching. Or how do you do the patch in Windows?
[Nook Color Android Development] racks11479:
Just google for UnxUtil or GNUWin32.
[Nook Color Android Development] jboxer:
Okay. I did that and tried to patch the file but I got the following error:

patching file `TelephonyManager.smali'

Assertion failed: hunk, file patch.c, line 321

What do I need to do to fix this problem?

Thanks again for your help.
[Nook Color Android Development] cosine83:
Any chance of getting a pre-patched framework.jar for 1.1.0? I'm on a road trip and don't have access to a computer with the necessary setup to do this.
[Nook Color Android Development] don_ernesto:
i replaced my framework.jar with the one provided by decadence, and, as racks11479 suggested i also added the META-INF and the preloaded-class from my original file.

it works, it also fixed my gameloft games problems, but now it takes a lot more time when booting and once booted, the startup time (show my homescreen) also takes longer. i have rebooted 3 times to check if the delay dissapear, but no....

is there any logical explanation for this behaviour?
[Nook Color Android Development] racks11479:
Strange. Because mine only delayed the first time after replacing my framework.jar file. Seems fine since. I've just rebooted again to make sure. And no delay whatsoever. Not sure what could be causing your problem.
[Nook Color Android Development] rohit275:
Please excuse my ignorance, but what exactly does this patch provide? Is it for stability issues with the stock eclair rom?
[Nook Color Android Development] racks11479:
Also want to confirm that since the framework patch. My XDA app is surviving login like it used to on 1.0.1.

I understand that this was an issue with the 1.1.0 release.

Stock 1.1.0 rooted.
[Nook Color Android Development] clockworx:
The first boot, yes, as it would force a dalvik cache rebuild, but on subsequent boots no
[Nook Color Android Development] paleh0rse:
Anyone? Please?
[Nook Color Android Development] racks11479:
As i stated in my previous posts. Its helped me deal with my gameloft force closing issues. It also allows the XDA app to survive a login. Its been crashing previously on my 1.1.0 rooted.

And from my experience. I tried using the patched framework from the OP post. But that caused my B&N shop to break. So i had to decompile my framework.jar file and rebuild it and replace my classes.dex with the patched classes.dex from the patched framework file and also include my META. & preloaded-classes file from my original framework.jar file.

Hope that explains it a bit.
[Nook Color Android Development] don_ernesto:
weird, all my system became slower, and my google apps stoped working, i had to go back to my original framework.jar.... i will try again today (when my boss is not watching ;) )
[Nook Color Android Development] don_ernesto:
as it was easy to guess, it was my fault..... just had to change file permissions back to the original state, DUH!!

now everything is working: gameloft games, xda app, B&N Shop

pura vida!!!!!!
[Nook Color Android Development] racks11479:
LOL, awesome. Glad you figured it out. It's always the easiest things we overlook!
[Nook Color Android Development] evertec:
Where are the META and preloaded-class files that need to be included? I decompiled my original framework.jar and couldn't find anything regarding that in there. Do you have a file already patched with those in that you could share, or let me know where to get those files? Thanks in advance.

edit: opened in winrar and found the meta and preloaded-class files... copied them over to the patched file and it looks like it's working... i've attached my file to help future noobs like me :)
[Nook Color Android Development] racks11479:
Great, was just gonna ask to see if it worked for you. Maybe I'll add this to my other thread regarding the FC'ing issues. But for stock rooted 1.1.0
[Nook Color Android Development] Adanedhels:
Did you...

Did you ever get around to making a patch for the NF build?

I would love to be able to do this as then I could get both the Gameloft games I own to run and then hopefully Spectral Souls, which if you've seen I've been working to fix and make run on NF for a few weeks now. I've got a lot of people wanting to see that game in particular fixed so....

Thanks,

Adan
[Nook Color Android Development] racks11479:
I did attempt to. But it's rejecting the patch. But even though. If it was to work. The gameloft games might run. But spectral souls will still error out because it is looking for a static EMIE number. And unfortunately that's a little above my head. But I'll keep looking into it.

-Racks
[Nook Color Android Development] NewZJ:
swype needs a static emie number too, kill a few birds with that stone
[Nook Color Android Development] liqn7:
Is anyone able to write some clear easy to follow instructions for a noob? :P

I'm running Win 7 and have ADB if that helps. Would love to get a stable IMEI on 2.1 for some critical apps.

Can I just replace my framework.jar with evertec's here (http://xdaforums.com/showpost.php?p=11583252&postcount=25)?

cheers :)
[Nook Color Android Development] clockworx:
I cooked up a version that is sort of a hybrid of my version and j4mmer's idea. It will save the generated IMEI (unless you manually insert one yourself, in which case it uses that), and then hopefully retrieve it the next go-around. Anyone feel like beta testing? To test, you need to be comfortable w/ tweaking your current framework, and running logcats to see how if it is working.
[Nook Color Android Development] liqn7:
+1 :)

Where do I sign up? Is this for nookie froyo or stock?

Thanks for the update!
[Nook Color Android Development] Adanedhels:
I'm game!!!!

I'm willing to test it to see if it works, I can test it against Spectral Souls as I bought that game and its a good benchmark for seeing if this will actually work!!!

That is if this is for Nookie Froyo?

Adan
[Nook Color Android Development] clockworx:
Here's one for Nookie Froyo 0.6.8:

http://www.mediafire.com/?fv6rq4nvq6g462d

I suggest backing up your old framework.jar before using this one, in case you need to reverse out.

I haven't even had a chance to test yet myself, so everything about functionality is what I am hoping it does :) If you're logcat-ing, you can look for messages tagged "mockTelephony" to see if it is doing anything.

The planned operation is that it will still generate an IMEI, and "1" for network type (GSM), and then store it for next round. There should be messages when an IMEI is requested, and whether it finds a stored one or tries to generate one and then store. The only thing I'm still not sure on is whether the storing will work across sessions/reboots/etc, I think at the very worst it should behave like the old version if IMEI storing doesn't work.

There's more stuff you can do, but I'll leave it at this for now just to see if we can get confirmation of it working.

Thanks!
[Nook Color Android Development] racks11479:
Awesome. I'll definitely give this a try. Thanks a lot for all your efforts.

-Racks
[Nook Color Android Development] liqn7:
Could someone please explain how to push the new framework.jar?

Do we just replace the existing one using root explorer?
[Nook Color Android Development] racks11479:
Yes you could use Root Explorer. Just remember to do a backup before attempting to mess with the system. Also rename your original one to framework.jar.bak just in case the new one is buggy. And set correct permissions for the framework.jar file.

-Racks
[Nook Color Android Development] liqn7:
Cheers Racks :)

Could you please clarify what you mean by the permissions though? How would I do that?

Thanks once again for everyone's help! :)
[Nook Color Android Development] racks11479:
If you are using root explorer. After copying over the new framework. Set permissions as the original. I'm hoping you renamed ur original to framework.jar.bak. just in case. Long press the new framework and you should see an option for permissions. I believe the correct permissions are rw-r--r--

Once completed. Do a reboot. First reboot will take a while. So be patient. Then you can go ahead and see if the framework worked as suggested by testing out some apps that required a static IMEI.

Good luck,

Racks
[Nook Color Android Development] openallnight:
Ok this is already built into CM7 right? Also will this fix missing apps in froyo?

How will it affect a patched up framework.jar that I am using for the back /menu button already.

thanks!
[Nook Color Android Development] knaries2000:
I replace framework.jar, but I don't see mockTelephony in my logcat. I tried xda app thinking maybe that it fix the login problem, but it is still there.

just to show that I have the framework.jar.

[]# adb shell ls -l /system/framework

total 10193

-rw-r--r-- 1 0 0 8773 Aug 1 2008 am.jar

-rw-r--r-- 1 0 0 85867 Aug 1 2008 android.policy.jar

-rw-r--r-- 1 0 0 76021 Aug 1 2008 android.test.runner.jar

-rw-r--r-- 1 0 0 6247 Aug 1 2008 bmgr.jar

-rw-r--r-- 1 0 0 256327 Feb 27 22:10 com.google.android.maps.jar

-rw-r--r-- 1 0 0 2155263 Aug 1 2008 core.jar

-rw-r--r-- 1 0 0 234748 Aug 1 2008 ext.jar

-rw-r--r-- 1 0 0 1926232 Aug 1 2008 framework-res.apk

-rw-r--r-- 1 0 0 8899 Aug 1 2008 framework-tests.jar

-rw-rw-rw- 1 0 0 2188091 Mar 14 22:36 framework.jar

-rw-r--r-- 1 0 0 2720317 Aug 1 2008 framework.jar.org

-rw-r--r-- 1 0 0 3332 Aug 1 2008 ime.jar

-rw-r--r-- 1 0 0 2441 Aug 1 2008 input.jar

-rw-r--r-- 1 0 0 26527 Aug 1 2008 javax.obex.jar

-rw-r--r-- 1 0 0 34284 Aug 1 2008 monkey.jar

-rw-r--r-- 1 0 0 10920 Aug 1 2008 pm.jar

-rw-r--r-- 1 0 0 627770 Aug 1 2008 services.jar

-rw-r--r-- 1 0 0 3773 Aug 1 2008 svc.jar

grepping for mock or Telephony :

[]# grep Telephony logcat.*

logcat.1:I/SystemServer( 905): Telephony Registry

logcat.1:D/installd( 829): DexInv: --- BEGIN '/system/app/TelephonyProvider.apk' ---

logcat.1:D/installd( 829): DexInv: --- END '/system/app/TelephonyProvider.apk' (success) ---

logcat.1:I/ActivityThread( 1007): Publishing provider telephony: com.android.providers.telephony.TelephonyProvider

[]# grep -i mock logcat.*

[]#
[Nook Color Android Development] clockworx:
Thanks for testing. You're not going to see any logging unless there's something that actually calls those methods (though I would assume something would). I know the initial market setup should call it, but not sure what else can trigger it. If I get a chance I'll try to do some testing myself..

OK, on further testing I screwed up the log tags. Anyone know something I can test this with that requests the IMEI for sure? Market and XDA seem to work.
[Nook Color Android Development] liqn7:
Skyscape requires a stable IMEI.

Link: http://xdaforums.com/showthread.php?t=964663
[Nook Color Android Development] Adanedhels:
Clock,

I used the new framework and the system lagged like a dead mule. Any tank why that would happen did I need to clear any program memories?

Thanks,

Adan
[Nook Color Android Development] clockworx:
Wipe your dalvik cache

adb shell rm -r /data/dalv*
[Nook Color Android Development] TJNooker:
Just to add to the size of your sample, I tried the framework.jar that you uploaded for Froyo. The only app I had fc issues with before was the xda app. After installing the new framework it still fc's. Keep working at it :D
[Nook Color Android Development] don_ernesto:
it happened to me when i replaced the file but didn't set the appropriate permissions. check that out
[Nook Color Android Development] liqn7:
Any updates? :)
[Nook Color Android Development] pryonix:
I have been going crazy about this.

Spent the last 6 hours trying to figure out how to establish a stable IMEI for my phone. I've tried doing apktool method as well as the whole smali baksamali thing but I cannot get to make my replacement framework.jar work. I've actually spent a greater part of the day attempting to understand dalvik bytecode just to figure out where I'm going wrong but it doesn't seem to be the code since I just lifted it from the OP of this post: http://xdaforums.com/showthread.php?t=1004102

Whenever I copy the modified framework.jar over to my system/framework folder, I'd reboot but would encounter a bazillion force closes that would force me to reflash yet again.

I'm currently using Phiremod6.2 from SD.

Anyone have any ideas where I'm going wrong?

I wanted my Nook to have a stable IMEI so I can use Whatsapp messenger. Any help would be greatly appreciated.

I forgot to change the file permissions on framework.jar. :eek:
[Nook Color Android Development] tsukisan:
Just curious but could this be used to trick the netflix app into thinking the nook color is one of the supported devices I.e. nexus 1?
[Nook Color Android Development] dexx0008:
to trick netflix for unsupported devices edit the build.prop file located in /system

there are a few netflix threads that will give you the two lines you need to change.

xxx.model

xxx.manufacturer

depending on what you are running you will use different settings.
[Nook Color Android Development] doncaruana:
Why don't you just use the one with the device check disabled?
[Nook Color Android Development] dexx0008:
you could use that too. I enabled my netflix before that was available and didn't bother to change it. good advice though.
[Nook Color Android Development] xboxexpert:
Its okay guys I'm bringin' it back due to Nook Touch :)
[Nook Color Android Development] Majestyk:
Everything was fine until....

OK I was doing fine until I got to this 'patch' part. Where is this 'patch' command? It's not in the SDK tools folders and it's not an ADB command. I don't know where this is located or how to obtain and execute it. Is this linix command? How do I patch in Windows?

Sorry if it seems like a dumb question but I've not been able to find the answer. I could barely find a working link to the TelephonyManager.patch file and I'm not even sure the one I have is correct as the link posted seems to be the only (dead) link to the file.

Any help would be appreciated!

-Maj
[Windows Phone 7 General] mariolopezjr:
I currently own an iPhone 4 32GB on AT&T and I am considering a Windows Phone 7 device. Should I go ahead and sell my iPhone and purchase a device? I currently own a Zune (which I am selling) with a Zune Subscription (which I plan on keeping) and I am looking into selling my PS3 for an XBOX 360.

I have a lot of music, so that's what I do most. I also text and use the internet a lot, as well as check email. I also use Pandora quite a bit too (though with the Zune marketplace on the phone, probably not as much). I play games, but not often. I love the battery life of my iPhone. I also have an Otterbox to protect it's beauty. I am also a big fan of its screen and resolution. I use my phone as a camera too. Also, I want better navigation than what I currently get on my iPhone, which is MapQuest 4 (since the iPhone Maps sucks for navigation).

I have been considering the Samsung Focus, HTC Surround, and the LG Quantum. Are there more for AT&T I should consider? I really like the Dell Venue Pro, but it seems like it's not offered for AT&T.

So, what do you guys think? Should I jump ship? By the way, I LOVED the Zune and it's interface, if that helps. :D
[Windows Phone 7 General] sure haven't:
Well really the only one who can decide is you. I'd head to a mobile store and just play with one until they kick you out. I have an LG Quantum, here are some thoughts:

-the software keyboard is. a-may-zing. I can type almost as fast on it as i can with two hands on a desktop. Bar none, the best I've ever used. If you text, this will blow you away. It just knows what you meant to type

-the zune player leaves a LOT to be desired, sound quality wise. wp7 needs an eq app soon. It'll get one, but for now, expect a flat sound. Very dissappointing.

-I don't know why I'm reading bad things about it, but the new IE is so fast it's overwhelming. It renders things very very quickly. Better than my wife's iPhone.

-the interface and UI is awesome. It's honestly the next step in smartphone software. Very impressive especially once you get used to it

-great Facebook integration. It adds all your Facebook/SIM contacts/hotmail contacts to one "contacts" app. Which at first sounds like too much. But after using it, I never want to go back. If I want to get a hold of anyone I've ever met, no matter from where, they're in my contacts hub. I can then choose to email them, post on their wall, text them, or call them. It's so quick and easy
[Windows Phone 7 General] mariolopezjr:
I have a question on the sound. Is it comparable to the Zune, better or worse? What about in comparison to the iPhone?

I want to play with it but work and college kind of get in the way. :D
[Windows Phone 7 General] t0nnn:
Like said above, go into a store and play with one. I'm gonna have to agree to everything sure said, windows phone 7 is amazing..the user interface is incredible. I've only had my HD7 for 4 days and I can't put it down. It's so smooth, the social integration with Facebook and your contacts is genius. Go play with one I doubt you'll be dissapointed
[Windows Phone 7 General] vetvito:
With that list. Go for it. Now your decision boils down to which one.
[Windows Phone 7 General] mKTank:
Zune player sounds just fine. He must have really bad headphones or something. But it's at the very least on par with the iPhone if not better.

However, OP, I recommend you stick with the iPhone 4 for now. Several reasons.

WP7 is currently bug infested. You should probably wait and see how and if Microsoft is going to deal with it. You also should generally wait until Mango to see whether WP7 will take off or not. It's a bit of a gamble as of right now.

If you insist on taking the chance with WP7, I recommend you wait for Nokia's WP7 phones. The current hardware is pretty good but Nokia phones will probably have nice exclusives and, if they base them on the concepts, will be the sexiest phones out there.

All signals essentially point to 'wait.'
[Windows Phone 7 General] emigrating:
Based on friends of mine who have made the jump, I'd say go for it. They all love the UX on Phone 7 and while the platform does miss some functionality today it's not something that you will notice on a daily basis.

In the end though, it's a question only you can answer, so I'll agree with most others here and tell you to go have a play with it in store.