Code Monkey home page Code Monkey logo

deepsleep's Introduction

DeepSleep

  • This is English version(although a lot of google translation😂), for china user 中文版

  • DeepSleep is a Xposed module. It can limit the background behavior of apps and reduce the power consumption of apps in the background.

    • Block acquire wakelock and alarms to prevent redundant wake-ups.
    • Block start services to reduce memory consumption.
    • Block sync to prevent redundant wake-ups.
  • EDxposed/LSPosed scope Select the application to be limited.

  • Serious warning

    • Using deepsleep is not recommended if your device has no standby power consumption problems.
    • Using deepsleep to limit the application may cause unusual problems with the application.
      • IM may experience message delays
      • Music player may not play on the lock screen
      • Other exceptions caused by restricting the background behavior of the app.

About

  • Due to some persion reason, NoWakeLock is gradually in a state of suspension, and some functions of NoWakeLock are too complicated, so DeepSleep was written.

Features

  • Beta:

    • wakelock/alarm/service/sync restriction
    • Data backup and recovery
    • help/about fragment
    • black/white list/regex support
    • dark/light theme switch
    • broadcast restriction
  • Release

Compatibility

  • Android N ~
  • Edxpoed LSPosed

Compile

Installation

Support

  • Only DeepSleep downloaded from the above channels is supported
  • Please submit ISSUE

Contributing

License

  • DeepSleep is released under GNU GPLv3 (License).

deepsleep's People

Contributors

jasper-1024 avatar

Stargazers

san avatar idiotz828 avatar Kay Kostrowski avatar  avatar Muhammad Karodia avatar  avatar Alex Zhang avatar  avatar John Smith avatar  avatar Evan avatar 风沐白 avatar Bob Johnston avatar  avatar Mayuu酱重症患者 avatar  avatar  avatar  avatar ZHIN avatar  avatar Cyrus Yip avatar GAURAV avatar  avatar  avatar  avatar  avatar DeepDiver avatar  avatar Unknown avatar 路人甲 avatar  avatar  avatar  avatar  avatar ⭐ 🐾 avatar  avatar  avatar Buerck avatar Ajay Mamtora avatar Stanislav Zaleski avatar  avatar  avatar  avatar  avatar ArtEngr avatar  avatar reilly avatar  avatar  avatar  avatar NunYah_BitNiz avatar Acardia avatar someone5678 avatar  avatar Qutaiba-Khader avatar illdephyn3d avatar Void avatar  avatar Peter MacDonald avatar lifansama avatar  avatar Starry Sky avatar

Watchers

James Cloos avatar  avatar OpenApk avatar

deepsleep's Issues

Android System - too many alarms

Hi Jasper,

I'm currently planning to switched from NoWakeLock to DeepSleep.

Before running deeper into it.

I am facing too many Android System - Alarms: *job.deadline and *job.delay

Can deep sleep help me fix that?

ADB mode

Bruh you should add ADB mode

Because with basic knowledge of ADB you can disable WAKE_LOCK permission using app ops

Realme 5i
RMX 2030
Android 10 Realme UI 1.0

NoWakeLock or DeepSleep ?

Hi
i saw that both block wakelocks
do i have to use both apps or just 1 ?
in case of one, which one do you suggest and thank you

BroadcastReceiver 可以这样hook

val tmp: Class<*>? =
                XpUtil.getClass("android.content.BroadcastReceiver", lpparam.classLoader)

val hookedClassSet = HashSet<Class<*>>()
XposedBridge.hookAllConstructors(tmp, object : XC_MethodHook() {
    override fun afterHookedMethod(param: MethodHookParam) {
        val thisClass = param.thisObject.javaClass
        if (!hookedClassSet.contains(thisClass)) {
            XposedBridge.hookAllMethods(thisClass, "onReceive", Test())
            hookedClassSet.add(thisClass)
        }
    }
})

LSPosed permission

Let's say I have an app called 1.1.1.1 and I want to block the wakelocks for this app.

Would I just need to enable this app in the DeepSleep module in LSPosed, then disable wakelock under DeepSleep app?

image

image

Is this correct?

LSPosed Whitelist

Thanks for the module!

In Lsposed, which apps do I need to 'check' in order to use DeepSleep? Is the system framework sufficient or does it need to be whitelisted for each application where I block wakelocks?

开关表达意思不明确

在deepsleep app 列表显示页面,点按app图标出现的开关,开关默认打在右边,这样是允许后台服务,还是不允许后台服务?

20220705-165826.jpg

F-Droid inclusion

Hello,

Since the app is open source licensed, would you agree to have it included to F-Droid? It's a strong community (actually almost the unique) focusing on distributing open-source Android apps.

You can find documentation here.

If you're interested, feel free to contact @ linsui or @ Poussinou for further details.

Thanks for your attention and it wouldn't take too much time since their team would help you.

PS: Apps on F-Droid are signed by F-Droid by default, but you can ask for the case of reproducible build, then they just verify if your builds are reproducible and simply distribute the builds signed by you, in that way there would be no problem of distributing packages with different signatures.

Lsposed guide

For which apps must the module be enabled? Thank you

增加禁止JobScheduler的功能

根据我的观察,这个貌似是系统唤醒应用去干事情,现有的功能应该是无法限制(目前我不清楚那个“同步”是什么东西)。
不过android的确会自己安排什么时候唤醒,理论上耗电应该不大,可能也没必要去刻意禁止他。也许可以考虑增加一个选项,手动设定安排work的间隔(拉长他本来要设定的时间或者条件)。
另外就是,很多应用会使用jetpack里的WorkManager,他底层用的就是JobScheduler(某个android api以上),但是,在类原生系统上,这个东西离谱的是他居然在force stop以后会重启,我没找到具体重启的代码,但是有一段注释写了,而且也符合我的观察(在强制停止微信4 5小时后他的确做到自己重启了),源码: ForceStopRunnable.java,这个基本就是重启后检测了一下是否是force stop,是的话就重新安排work(因为force stop会取消所有job。。。没错,Google就是这么自相矛盾),我觉得这个行为非常奇怪,不符合force stop的含义,目前我发现的是如果hook ForceStopRunnable::run为空似乎可以解决,希望也能增加这个功能

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.