• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[DEV][PATCH] AndroidID for gapps (patched framework.jar) || Firmware 1.1.0

Search This thread

knaries2000

Senior Member
Apr 13, 2009
172
12
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.*
[]#



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!
 

clockworx

Senior Member
Jun 7, 2009
191
22
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.
 
Last edited:

Adanedhels

Senior Member
Jun 3, 2010
345
56
Columbus
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

Sent from my PC36100 using XDA App
 

TJNooker

Senior Member
Jan 31, 2011
166
6
Chicago
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
 

pryonix

Senior Member
Apr 24, 2011
65
9
Mandaluyong
www.flickr.com
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://forum.xda-developers.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:
 
Last edited:

dexx0008

Senior Member
Apr 2, 2011
141
10
Twin Ciites, MN
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?

Sent from my NookColor using Tapatalk

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.
 

Majestyk

Member
Sep 1, 2007
31
0
Everything was fine until....

Then cd to the directory, and patch the file!

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

output:
Code:
patching file TelephonyManager.smali

and you're done patching the file!

Remove the patch file before continuing!

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
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    This is work done by clockworx which can originally be found: http://forum.xda-developers.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.

    Code:
    apktool d framework.jar

    Should output:
    Code:
    I: Baksmaling...
    I: Copying assets and libs...

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

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

    Then cd to the directory, and patch the file!

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

    output:
    Code:
    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:

    Code:
    apktool b framework.jar.out

    output:
    Code:
    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
    1
    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 :)

    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.
    1
    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!