Giter Site home page Giter Site logo

Comments (12)

changhuapeng avatar changhuapeng commented on August 22, 2024 2

Thanks to you both for testing and verifying that this new fix is working correctly! Upcoming release will contain this fix as well as providing user a choice to patch ApplicationPackageManager or not.

The "replaced by" section appears to be the same as what precedes it, so not sure what it's supposed to be showing there. But again, that's just a visual error and the actual patching appears to be working correctly.

That's not a visual bug since the script actually did replaced the original string with a new similar string. The reason is that from the few framework.jar that I referenced from during development, none of the original string was the correct string right from the start. Hence, the script wasn't expecting such and simply overwriting what was originally correct with what it should be corrected with. I supposed I can write a simple check to fix this confusion. Thanks for highlighting this!

from frameworkpatchergo.

CaptainThrowback avatar CaptainThrowback commented on August 22, 2024 1

@changhuapeng
Unfortunately still say the same.
IMG_20240530_202438

And mine, original (A11) ApplicationPackageManager.smali
IMG_20240531_142417

Same result with the test build here for me.

from frameworkpatchergo.

CaptainThrowback avatar CaptainThrowback commented on August 22, 2024 1

Hopefully this will do the job: FrameworkPatcherGo-test2.zip

Yes! This one works.

Interestingly, on the version where I commented out the "optional" portion so that the patch would complete, I ended up with a "bad signature" error in Key Attestation Demo, resulting in the certificate appearing to be revoked. However, now that it patched completely, the app no longer shows that error.

Unfortunately, I'm still only passing Basic Integrity, so I still need to find a different keybox that actually works. I tried adding a different keybox with 3 certs, but it ends up in a bootloop. I'm going to try changing the props to see if maybe I need to use props from a device that supports HARDWARE-BACKED Attestation.

Screenshot_20240531-110730_Key_Attestation.png

Screenshot_20240531-110750_Google_Play_Store.png

Thanks for all your hard work on this!

P.S. While the installation and patching went fine, I think the logging may be slightly incorrect, as seen below:

******************************
> Patching ApplicationPackageManager.smali file ...
******************************
 
--------------------
Patching hasSystemFeature method:
 
    move-result v0
 
replaced by:

    move-result v0

Edited: "/dev/tmp2065/framework/smali/android/app/ApplicationPackageManager.smali"
--------------------

    invoke-static {v0, p1}, Lcom/android/internal/util/framework/Android;->hasSystemFeature(ZLjava/lang/String;)Z

    move-result v0

added.
Edited: "/dev/tmp2065/framework/smali/android/app/ApplicationPackageManager.smali"
--------------------
 
    return v0
 
replaced by:

    return v0

Edited: "/dev/tmp2065/framework/smali/android/app/ApplicationPackageManager.smali"
--------------------

The "replaced by" section appears to be the same as what precedes it, so not sure what it's supposed to be showing there. But again, that's just a visual error and the actual patching appears to be working correctly.

from frameworkpatchergo.

VisionR1 avatar VisionR1 commented on August 22, 2024

Yeah as I see, after fix it, if can add a option like, if you want the patch for ApplicationPackageManager.smali press the Volume+ if not press Volume-

from frameworkpatchergo.

changhuapeng avatar changhuapeng commented on August 22, 2024

I believe that portion of the process is optional, so perhaps if that method can't be found, the install should continue rather than exit?

I agree. Will make the patching portion to be optional in the upcoming release.

And this is the corresponding log output:

******************************
> Patching ApplicationPackageManager.smali file ...
******************************
DEBUG: apm_line:     invoke-virtual {p0, v0}, Landroid/app/ApplicationPackageManager;->hasSystemFeature(Ljava/lang/String;)Z
.method public whitelist hasSystemFeature(Ljava/lang/String;)Z
sed: unmatched '/'
DEBUG: apm_method_code: 
Name register not found in hasSystemFeature method

Thanks for the debug log. The log does shows some unexpected output from $apm_line, which I'm thinking is what causing the error. Please try this test version to see if it solves the issue that @VisionR1 and you are encountering when patching the hasSystemFeature method.

FrameworkPatcherGo-test.zip

from frameworkpatchergo.

VisionR1 avatar VisionR1 commented on August 22, 2024

@changhuapeng
Unfortunately still say the same.
IMG_20240530_202438

And mine, original (A11) ApplicationPackageManager.smali
IMG_20240531_142417

from frameworkpatchergo.

changhuapeng avatar changhuapeng commented on August 22, 2024

Thanks for testing. Would it be possible for the both of you to send me your unedited framework.jar? You can get it by running adb pull /system/framework/framework.jar

from frameworkpatchergo.

CaptainThrowback avatar CaptainThrowback commented on August 22, 2024

Thanks for testing. Would it be possible for the both of you to send me your unedited framework.jar? You can get it by running adb pull /system/framework/framework.jar

framework.zip

from frameworkpatchergo.

VisionR1 avatar VisionR1 commented on August 22, 2024

Thanks for testing. Would it be possible for the both of you to send me your unedited framework.jar? You can get it by running adb pull /system/framework/framework.jar

framework.zip

from frameworkpatchergo.

changhuapeng avatar changhuapeng commented on August 22, 2024

Hopefully this will do the job: FrameworkPatcherGo-test2.zip

from frameworkpatchergo.

VisionR1 avatar VisionR1 commented on August 22, 2024

Hopefully this will do the job: FrameworkPatcherGo-test2.zip

Yeah, this working, even in emulator i tried it and it works.
Thanks for all your hard work on this!
And to see if all is added proper, I decompile the classes.dex and 2 all is the same.
So now this is fix it, if you can add a option like, if you want the patch for ApplicationPackageManager.smali press the Volume+ if not press Volume-

from frameworkpatchergo.

VisionR1 avatar VisionR1 commented on August 22, 2024

Edited: "/dev/tmp2065/framework/smali/android/app/ApplicationPackageManager.smali"


The "replaced by" section appears to be the same as what precedes it, so not sure what it's supposed to be showing there. But again, that's just a visual error and the actual patching appears to be working correctly.

Yeah and mine the same, but like you say is just a visual error, the main purpose works.

from frameworkpatchergo.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.