Code Monkey home page Code Monkey logo

Comments (34)

yujincheng08 avatar yujincheng08 commented on July 24, 2024 1

还是删掉这个功能了,很多人投诉会被其他应用唤醒(ContentProvider的缺陷)。目前是判断有没有 tv.danmaku.bili.MainActivityV2 这个类。如果有就也会hook。所以改包名不把这个类名改掉就也能hook了。

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

b站有3个版本而且都能共存,没必要改包名吧

from biliroaming.

rhjdvsgsgks avatar rhjdvsgsgks commented on July 24, 2024

是因为某些系统只对某些包名的应用中的视频有优化效果,为了体验这些优化只能通过修改包名

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

实现不难,但是目前我SDK已经到了29,很难访问再模块的SharedPreferece了,有空再看看吧。或者你提个PR。

from biliroaming.

rhjdvsgsgks avatar rhjdvsgsgks commented on July 24, 2024

我姿势水平太低了,不怎么了解怎么写这类东西,只能期待各位大佬了

from biliroaming.

aorosora avatar aorosora commented on July 24, 2024

要不你考虑一下直接改源码里面的包名?

from biliroaming.

rhjdvsgsgks avatar rhjdvsgsgks commented on July 24, 2024

我现在装了两个 bilibili ,一个没改包名用插件用来下载,一个改了包名没用插件用来看🤣

from biliroaming.

aorosora avatar aorosora commented on July 24, 2024

不是,我意思是你用AndroidStudio把里面的tv.danmuku.bili或者com.bilibili.app.in其中一个全部替换成你的版本对应的新包名,然后自己编译一份出来。这种需求应该挺小众的(感觉)

from biliroaming.

rhjdvsgsgks avatar rhjdvsgsgks commented on July 24, 2024

我知道你是这个意思,但我 gradle 环境坏了,只好这样将就下

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

技术上似乎没办法实现了。
我是在handleLoadPackage 之后, callApplicationOnCreate之前判断包名的。这个阶段不能访问其他app的ContentProvider。并且在新的安卓版本上,访问其他app的文件和preference都被禁了。也就是说,没办法把自定义的包名在hook之前告诉b站客户端。

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

@GTRxa Won't response due to off topic.

from biliroaming.

rhjdvsgsgks avatar rhjdvsgsgks commented on July 24, 2024

如果“把自定义包名配置的位置放到放到 /data/local/tmp ”或“把自定义包名的配置放到模块这个应用的配置文件里但设置权限使所有应用都有权访问”也不行吗

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

@rhjdvsgsgks /data/local/tmp 不是persistent的。后者就是 XSharePreference 的原理,早在N时代就已经不能用了。而R时代更是完全禁止其他应用访问任何文件。

from biliroaming.

rhjdvsgsgks avatar rhjdvsgsgks commented on July 24, 2024

原来是这样,感谢指点。XSharePreference 再 chown 一下后我试了至少在 Android 9 上是能用的,至于在 r 上用不了我是现在才知道,之前一直没用过 r

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

@rhjdvsgsgks 把模块的target SDK改大就不行了。可以看看这个issue: rovo89/XposedBridge#74

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

我把 @GTRxa 的评论都删了,全都是没有营养的。

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

@GTRxa 你的回复全是和话题无关的没有营养的垃圾

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

@rhjdvsgsgks 好了,搞定了,可以试试 6e08fef

from biliroaming.

rhjdvsgsgks avatar rhjdvsgsgks commented on July 24, 2024

好的,我试试
edit:
另外,我测试的时候模块的 targetSdkVersion 是 30 ,minSdkVersion是 28 ,在 Android 9 下改权限后依然是可以用 XSharePreference 的,很神奇

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

@rhjdvsgsgks 我这边即使改成777也不行(

from biliroaming.

rhjdvsgsgks avatar rhjdvsgsgks commented on July 24, 2024

还有上层的文件夹也要改权限
https://github.com/rhjdvsgsgks/VideoEnhancementPlus/blob/e66328fcfa2011bc4cc532dd01f7e85c439fca85/app/src/main/java/com/example/videoenhancementplus/SettingsActivity.kt#L32-L35
另外,我在这个模块中用到了您的部分代码 (KotlinXposedHelper.kt 和 Log.kt) ,不知道这符不符合 license ,如果您介意的话我可以删掉这部分自己重写

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

@rhjdvsgsgks 那可能是上层目录的权限问题。用是可以用,开源了就行,但是得写一下出处。

from biliroaming.

rhjdvsgsgks avatar rhjdvsgsgks commented on July 24, 2024

在设置了权限后我这边的权限是这样的,可以参考下

. [drwx--x--x]
└── [drwxrwx--x]  shared_prefs
    └── [-rw-rw-r--]  pkgname_preferences.xml

我 readme 里标了出处,需要在应用里也加上吗?

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

@rhjdvsgsgks 源文件写一下哪里来的就行啦

from biliroaming.

rhjdvsgsgks avatar rhjdvsgsgks commented on July 24, 2024

好的,我回去就加上

from biliroaming.

rhjdvsgsgks avatar rhjdvsgsgks commented on July 24, 2024

试过了,可以成功 hook 修改包名后的 bilibili 。
另外我在那两个文件里也已经加上了来源

from biliroaming.

Android1500 avatar Android1500 commented on July 24, 2024

还是删掉这个功能了,很多人投诉会被其他应用唤醒(ContentProvider的缺陷)。目前是判断有没有 tv.danmaku.bili.MainActivityV2 这个类。如果有就也会hook。所以改包名不把这个类名改掉就也能hook了。

Any idea how to make preference readable coz of selinux security on above sdk 25 i cant read my parameters through preference file I appreciate if you could help

from biliroaming.

duzhaokun123 avatar duzhaokun123 commented on July 24, 2024

@Android1500 https://github.com/apsun/RemotePreferences

from biliroaming.

Android1500 avatar Android1500 commented on July 24, 2024

@Android1500 https://github.com/apsun/RemotePreferences

I don't wanna use remotepreference any alternative solution sir?

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

@Android1500 https://github.com/apsun/RemotePreferences

I don't wanna use remotepreference any alternative solution sir?

https://github.com/LSPosed/LSPosed/wiki/New-XSharedPreferences

from biliroaming.

Android1500 avatar Android1500 commented on July 24, 2024

@Android1500 https://github.com/apsun/RemotePreferences

I don't wanna use remotepreference any alternative solution sir?

https://github.com/LSPosed/LSPosed/wiki/New-XSharedPreferences

Yah i tried this one and its really working but it will not works if user don't install edxposed in this case app cant access preference Sir

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

Yah i tried this one and its really working but it will not works if user don't install edxposed in this case app cant access preference Sir

LSPosed also supports this.

from biliroaming.

Android1500 avatar Android1500 commented on July 24, 2024

Yah i tried this one and its really working but it will not works if user don't install edxposed in this case app cant access preference Sir

LSPosed also supports this.

Thanks Sir i address the issue its coz of selinux permission when i change selinux permission to permissive then its works so any solution for read preference file without change selinux permission

from biliroaming.

yujincheng08 avatar yujincheng08 commented on July 24, 2024

Thanks Sir i address the issue its coz of selinux permission when i change selinux permission to permissive then its works so any solution for read preference file without change selinux permission

NEVER EVER TRUN OFF SELINUX: https://twitter.com/topjohnwu/status/1359054106019565571?s=20, https://twitter.com/topjohnwu/status/1318839675180625921?s=20

from biliroaming.

Related Issues (20)

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.