Skip to content

Conversation

@rockstar5495
Copy link
Member

Signed-off-by: Pratyaksh Bharadwaj [email protected]

kdrag0n and others added 3 commits September 17, 2021 08:20
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
to make sure it matches Google's official certificate.

This was forward-ported from the Android 10 patch by gudenau:
microg/GmsCore#957

Changes made for Android 11:
  - Updated PackageInfo calls
  - Added new permission to public API surface, needed for
    PermissionController which is now an updatable APEX on 11
  - Added a dummy permission group to allow users to manage the
    permission through the PermissionController UI
    (by Vachounet <[email protected]>)
  - Updated location provider comment for conciseness

Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
Signed-off-by: rockstar5495 <[email protected]>
Can't get package setting info with wrong package name.
The API toStaticSharedLibraryPackageName will build correct package name
with correct information.

Bug: 170699390
Bug: 172232086
Test: manual test pass.
Change-Id: Iad97a3adf19ec37797123070a0662bfc7fc3337c
Signed-off-by: DennySPb <[email protected]>
Mudit200408 pushed a commit to Mudit200408/colt_frameworks_base that referenced this pull request Jun 2, 2023
* this fixup is based from reported backtrace from crdroid (i have no copy of updated backtrace)

pid: 2564, tid: 2618, name: RenderThread  >>> com.android.systemui <<<
uid: 10293
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
Cause: null pointer dereference
    x0  b40000736242a1e0  x1  0000000000000000  x2  00000073845059b0  x3  0000000000000001
    x4  0000007384504fd0  x5  b4000074120a0244  x6  00000000134813e0  x7  0000000000000010
    x8  0000000000000000  x9  0000000000000000  x10 0000000000000000  x11 b400007443b7cfcc
    x12 000000000000015e  x13 0000000000000000  x14 00000074c626d330  x15 0000000000000000
    x16 00000074d6b35060  x17 00000074e3eea600  x18 00000073841be000  x19 b40000736242a1e0
    x20 b40000741219e640  x21 b4000074131080d0  x22 0000007384506000  x23 00000000ffffffff
    x24 b400007443cf0008  x25 7ffffffffffffff8  x26 1fffffffffffffff  x27 00000000ffffffff
    x28 b4000074061b0da8  x29 0000007384505790
    lr  00000074c6469778  sp  0000007384505790  pc  00000074c6467da8  pst 0000000000001000

backtrace:
      #00 pc 0000000000251da8  /system/lib64/libhwui.so (android::uirenderer::BaseRenderNodeAnimator::pushStaging(android::uirenderer::AnimationContext&)+232) (BuildId: 79dc23449e3f71e7647d99fc4984c53f)
      Colt-Enigma#1 pc 0000000000253774  /system/lib64/libhwui.so (android::uirenderer::AnimatorManager::pushStaging()+596) (BuildId: 79dc23449e3f71e7647d99fc4984c53f)
      Colt-Enigma#2 pc 000000000025132c  /system/lib64/libhwui.so (android::uirenderer::AnimationContext::runRemainingAnimations(android::uirenderer::TreeInfo&)+44) (BuildId: 79dc23449e3f71e7647d99fc4984c53f)
      Colt-Enigma#3 pc 00000000002676c4  /system/lib64/libhwui.so (android::uirenderer::AnimationContextBridge::runRemainingAnimations(android::uirenderer::TreeInfo&)+36) (BuildId: 79dc23449e3f71e7647d99fc4984c53f)
      Colt-Enigma#4 pc 0000000000292780  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::prepareTree(android::uirenderer::TreeInfo&, long*, long, android::uirenderer::RenderNode*)+352) (BuildId: 79dc23449e3f71e7647d99fc4984c53f)
      Colt-Enigma#5 pc 0000000000293f00  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::prepareAndDraw(android::uirenderer::RenderNode*)+176) (BuildId: 79dc23449e3f71e7647d99fc4984c53f)
      Colt-Enigma#6 pc 00000000002a94dc  /system/lib64/libhwui.so (std::__1::__function::__func<android::uirenderer::renderthread::RenderThread::frameCallback(long, long, long, long)::$_0, std::__1::allocator<android::uirenderer::renderthread::RenderThread::frameCallback(long, long, long, long)::$_0>, void ()>::operator()() (.cf82759fcc28f80417602914fe3f7adc)+172) (BuildId: 79dc23449e3f71e7647d99fc4984c53f)
      #07 pc 0000000000282d44  /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+1108) (BuildId: 79dc23449e3f71e7647d99fc4984c53f)
      #08 pc 00000000002a80fc  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+556) (BuildId: 79dc23449e3f71e7647d99fc4984c53f)
      #09 pc 0000000000013a14  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+436) (BuildId: 83f16edd6c377c8ae02f3810c8fdb2cc)
      #10 pc 00000000000ce7fc  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204) (BuildId: 5c2a466eab8a09587d6f96c2c9b8f088)
      #11 pc 0000000000055cd0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 5c2a466eab8a09587d6f96c2c9b8f088)

* it seems like 104a9ac2879042e0129767779c086f7b223a6061 caused a breakage in synchronization across multiple invocations of pushStaging() without fixing the issue.
* this CL attempts to address the synchronization breakage (for race condition) while giving another try to resolve the null point dereference issue (just trying until someone better fixes it for real or until the qs crash bug count reduces to few numbers)
* this CL adds previously remove null checks from f263477f1908bbefdd81e3f1f0dbd16d1a123571 (just changed the null checks to nullptr, credits and thanks for the backtrace), while adding another set of null checks and logs checkpoint for debugging and finally tracing the root cause of this issue.

incase a pro decides to fix this issue for real:

here are captured logs while debugging with null handling checkpoints and stuffs i got

logs:
05-19 16:23:27.475  1780  1862 E OpenGLRenderer: PushStaging: Null animator or animation handle in mAnimators.push_back()
05-19 16:23:27.475  1780  1862 E OpenGLRenderer: PushStaging: Null animator or animation handle in mAnimators.push_back()

* null dereferencing
  - adding anim->target() != nullptr causes white screen when unlocking with pin

Change-Id: If0b014ebbfee7d4c00712a4d193f0ffbb3389012
Signed-off-by: minaripenguin <[email protected]>
RakeshBatra pushed a commit that referenced this pull request Jun 18, 2023
* i thought this was fixed by dropping HB and freetype modifications but a user reported a sysui crash without logcat nor context so im using my old copy

* addr2line was pointing the NPD [1] to a new instance of SkMemoryStream (if im not mistaken)
minaripenguin@minaripenguin:~/bugreport-oriole-TQ2A.230405.003.E1-2023-04-13-09-02-17/FS/data/tombstones$ addr2line -f -e '/mnt/xxxx/xxxxx/out/target/product/oriole/system/lib/libhwui.so' 000000000024a61c
_ZN14SkMemoryStreamC2E5sk_spI6SkDataE

* to temporarily aid the crash issue, until we find and fix the font that causes the crash, silently swallow the errors since the rom shouldn't booting at all if current font in use has invalid data.

[1]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
RisingOS Version: '1.0-20230412-UNOFFICIAL-oriole'
Build fingerprint: 'google/oriole/oriole:13/TQ2A.230305.008.E1/9677224:user/release-keys'
Revision: 'MP1.0'
ABI: 'arm64'
Timestamp: 2023-04-13 00:41:15.026955853+0800
Process uptime: 216s
Cmdline: com.android.systemui
pid: 17576, tid: 17613, name: RenderThread  >>> com.android.systemui <<<
uid: 10403
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000010
Cause: null pointer dereference
    x0  b4000074cc5b7e60  x1  00000072ca63fa20  x2  00000072ca63fa20  x3  0000000000000001
    x4  00000072ca63efa0  x5  000000747c59e4bc  x6  00005a120000edab  x7  0000906f00008280
    x8  0000000000000000  x9  56bd015d3f6fc8f6  x10 0000000000000000  x11 000000000000001a
    x12 0000000000000000  x13 b4000074ecbba980  x14 0000000000000033  x15 0000000000000019
    x16 00000075f74ae6a8  x17 00000075fdb0fec0  x18 00000072ca470000  x19 b4000074cc5b7e60
    x20 b4000074cc5b7e88  x21 b4000074cc5b7e60  x22 b40000737c76ae48  x23 b40000737c76ae30
    x24 7ffffffffffffff8  x25 1fffffffffffffff  x26 00000000ffffffff  x27 b4000073cc52f898
    x28 00000072ca547000  x29 00000072ca63f7e0
    lr  00000075eec487e0  sp  00000072ca63f7e0  pc  00000075eec4a61c  pst 0000000020001000

backtrace:
      #00 pc 000000000024a61c  /system/lib64/libhwui.so (android::uirenderer::AnimatorManager::pushStaging()+108) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #1 pc 00000000002487dc  /system/lib64/libhwui.so (android::uirenderer::AnimationContext::runRemainingAnimations(android::uirenderer::TreeInfo&)+44) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #2 pc 000000000025b2a4  /system/lib64/libhwui.so (android::uirenderer::AnimationContextBridge::runRemainingAnimations(android::uirenderer::TreeInfo&)+36) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #3 pc 000000000027fdcc  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::prepareTree(android::uirenderer::TreeInfo&, long*, long, android::uirenderer::RenderNode*)+348) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #4 pc 0000000000282bdc  /system/lib64/libhwui.so (std::__1::__function::__func<android::uirenderer::renderthread::DrawFrameTask::postAndWait()::$_0, std::__1::allocator<android::uirenderer::renderthread::DrawFrameTask::postAndWait()::$_0>, void ()>::operator()() (.c1671e787f244890c877724752face20)+364) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #5 pc 0000000000272c34  /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+580) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #6 pc 0000000000292e9c  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+412) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #07 pc 0000000000013220  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+416) (BuildId: 536947a6fb111c99b28090cdd95ee772)
      #08 pc 00000000000bc1cc  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204) (BuildId: 7c802f36645db769f96376c94049c9cf)
      #09 pc 0000000000055020  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 7c802f36645db769f96376c94049c9cf)

Signed-off-by: minaripenguin <[email protected]>
Signed-off-by: RakeshBatra <[email protected]>
RakeshBatra pushed a commit that referenced this pull request Jun 18, 2023
* i thought this was fixed by dropping HB and freetype modifications but a user reported a sysui crash without logcat nor context so im using my old copy

* addr2line was pointing the NPD [1] to a new instance of SkMemoryStream (if im not mistaken)
minaripenguin@minaripenguin:~/bugreport-oriole-TQ2A.230405.003.E1-2023-04-13-09-02-17/FS/data/tombstones$ addr2line -f -e '/mnt/xxxx/xxxxx/out/target/product/oriole/system/lib/libhwui.so' 000000000024a61c
_ZN14SkMemoryStreamC2E5sk_spI6SkDataE

* to temporarily aid the crash issue, until we find and fix the font that causes the crash, silently swallow the errors since the rom shouldn't booting at all if current font in use has invalid data.

[1]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
RisingOS Version: '1.0-20230412-UNOFFICIAL-oriole'
Build fingerprint: 'google/oriole/oriole:13/TQ2A.230305.008.E1/9677224:user/release-keys'
Revision: 'MP1.0'
ABI: 'arm64'
Timestamp: 2023-04-13 00:41:15.026955853+0800
Process uptime: 216s
Cmdline: com.android.systemui
pid: 17576, tid: 17613, name: RenderThread  >>> com.android.systemui <<<
uid: 10403
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000010
Cause: null pointer dereference
    x0  b4000074cc5b7e60  x1  00000072ca63fa20  x2  00000072ca63fa20  x3  0000000000000001
    x4  00000072ca63efa0  x5  000000747c59e4bc  x6  00005a120000edab  x7  0000906f00008280
    x8  0000000000000000  x9  56bd015d3f6fc8f6  x10 0000000000000000  x11 000000000000001a
    x12 0000000000000000  x13 b4000074ecbba980  x14 0000000000000033  x15 0000000000000019
    x16 00000075f74ae6a8  x17 00000075fdb0fec0  x18 00000072ca470000  x19 b4000074cc5b7e60
    x20 b4000074cc5b7e88  x21 b4000074cc5b7e60  x22 b40000737c76ae48  x23 b40000737c76ae30
    x24 7ffffffffffffff8  x25 1fffffffffffffff  x26 00000000ffffffff  x27 b4000073cc52f898
    x28 00000072ca547000  x29 00000072ca63f7e0
    lr  00000075eec487e0  sp  00000072ca63f7e0  pc  00000075eec4a61c  pst 0000000020001000

backtrace:
      #00 pc 000000000024a61c  /system/lib64/libhwui.so (android::uirenderer::AnimatorManager::pushStaging()+108) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #1 pc 00000000002487dc  /system/lib64/libhwui.so (android::uirenderer::AnimationContext::runRemainingAnimations(android::uirenderer::TreeInfo&)+44) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #2 pc 000000000025b2a4  /system/lib64/libhwui.so (android::uirenderer::AnimationContextBridge::runRemainingAnimations(android::uirenderer::TreeInfo&)+36) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #3 pc 000000000027fdcc  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::prepareTree(android::uirenderer::TreeInfo&, long*, long, android::uirenderer::RenderNode*)+348) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #4 pc 0000000000282bdc  /system/lib64/libhwui.so (std::__1::__function::__func<android::uirenderer::renderthread::DrawFrameTask::postAndWait()::$_0, std::__1::allocator<android::uirenderer::renderthread::DrawFrameTask::postAndWait()::$_0>, void ()>::operator()() (.c1671e787f244890c877724752face20)+364) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #5 pc 0000000000272c34  /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+580) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #6 pc 0000000000292e9c  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+412) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #07 pc 0000000000013220  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+416) (BuildId: 536947a6fb111c99b28090cdd95ee772)
      #08 pc 00000000000bc1cc  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204) (BuildId: 7c802f36645db769f96376c94049c9cf)
      #09 pc 0000000000055020  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 7c802f36645db769f96376c94049c9cf)

Signed-off-by: minaripenguin <[email protected]>
Signed-off-by: RakeshBatra <[email protected]>
RakeshBatra pushed a commit that referenced this pull request Jun 18, 2023
* i thought this was fixed by dropping HB and freetype modifications but a user reported a sysui crash without logcat nor context so im using my old copy

* addr2line was pointing the NPD [1] to a new instance of SkMemoryStream (if im not mistaken)
minaripenguin@minaripenguin:~/bugreport-oriole-TQ2A.230405.003.E1-2023-04-13-09-02-17/FS/data/tombstones$ addr2line -f -e '/mnt/xxxx/xxxxx/out/target/product/oriole/system/lib/libhwui.so' 000000000024a61c
_ZN14SkMemoryStreamC2E5sk_spI6SkDataE

* to temporarily aid the crash issue, until we find and fix the font that causes the crash, silently swallow the errors since the rom shouldn't booting at all if current font in use has invalid data.

[1]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
RisingOS Version: '1.0-20230412-UNOFFICIAL-oriole'
Build fingerprint: 'google/oriole/oriole:13/TQ2A.230305.008.E1/9677224:user/release-keys'
Revision: 'MP1.0'
ABI: 'arm64'
Timestamp: 2023-04-13 00:41:15.026955853+0800
Process uptime: 216s
Cmdline: com.android.systemui
pid: 17576, tid: 17613, name: RenderThread  >>> com.android.systemui <<<
uid: 10403
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000010
Cause: null pointer dereference
    x0  b4000074cc5b7e60  x1  00000072ca63fa20  x2  00000072ca63fa20  x3  0000000000000001
    x4  00000072ca63efa0  x5  000000747c59e4bc  x6  00005a120000edab  x7  0000906f00008280
    x8  0000000000000000  x9  56bd015d3f6fc8f6  x10 0000000000000000  x11 000000000000001a
    x12 0000000000000000  x13 b4000074ecbba980  x14 0000000000000033  x15 0000000000000019
    x16 00000075f74ae6a8  x17 00000075fdb0fec0  x18 00000072ca470000  x19 b4000074cc5b7e60
    x20 b4000074cc5b7e88  x21 b4000074cc5b7e60  x22 b40000737c76ae48  x23 b40000737c76ae30
    x24 7ffffffffffffff8  x25 1fffffffffffffff  x26 00000000ffffffff  x27 b4000073cc52f898
    x28 00000072ca547000  x29 00000072ca63f7e0
    lr  00000075eec487e0  sp  00000072ca63f7e0  pc  00000075eec4a61c  pst 0000000020001000

backtrace:
      #00 pc 000000000024a61c  /system/lib64/libhwui.so (android::uirenderer::AnimatorManager::pushStaging()+108) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #1 pc 00000000002487dc  /system/lib64/libhwui.so (android::uirenderer::AnimationContext::runRemainingAnimations(android::uirenderer::TreeInfo&)+44) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #2 pc 000000000025b2a4  /system/lib64/libhwui.so (android::uirenderer::AnimationContextBridge::runRemainingAnimations(android::uirenderer::TreeInfo&)+36) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #3 pc 000000000027fdcc  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::prepareTree(android::uirenderer::TreeInfo&, long*, long, android::uirenderer::RenderNode*)+348) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #4 pc 0000000000282bdc  /system/lib64/libhwui.so (std::__1::__function::__func<android::uirenderer::renderthread::DrawFrameTask::postAndWait()::$_0, std::__1::allocator<android::uirenderer::renderthread::DrawFrameTask::postAndWait()::$_0>, void ()>::operator()() (.c1671e787f244890c877724752face20)+364) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #5 pc 0000000000272c34  /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+580) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #6 pc 0000000000292e9c  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+412) (BuildId: f37109e40765e94e2634e351e2ba0981)
      #07 pc 0000000000013220  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+416) (BuildId: 536947a6fb111c99b28090cdd95ee772)
      #08 pc 00000000000bc1cc  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204) (BuildId: 7c802f36645db769f96376c94049c9cf)
      #09 pc 0000000000055020  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 7c802f36645db769f96376c94049c9cf)

Signed-off-by: minaripenguin <[email protected]>
Signed-off-by: RakeshBatra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants