yashsingh1/xdaforums huggingface dataset:
[Android Software Development] DEVILOPS 007:
Hi, I've got a pretty big problem so here we go.

I did all the normal stuff with syncing the repo and modifying the PackageManagerService.java and PowerManagerService.java and then used the new folder and java file which I put in the com folder. Then I did the normal make services stuff.

After that I deodexed the services.odex from the out folder after making services and had everything I needed there. Then I deodexed the one from my phone that didn't have wakeblock.

I then copied the modified classes for power and package to the one that was on my phone that doesn't have the modifications and I replaced the stock ones with the modified ones. I then copied the new folder with the wakeblock service java file to the right directory. From there I ran the command to make it a classes.dex and placed it in a dummy services.jar file.

Finally, I copied it to /data/abcdefghijk and ran the command to odex the services.jar and then I zipped it up and flashed it.

After rebooting, service was bound and all was good for a bit until I started getting random reboots. I made sure that this mod was causing it because I even tried a fresh install going through the setup wizard and all and it was causing problems. I have uninstalled it for now and everything works fine. I'm using the template 2.0 so I'm not sure if there is a problem with the code or maybe it doesn't work properly with odexed roms but it didn't happen with v1.0 template and the service was bound on v2.0 but just caused lots of reboots even without installing the app or blocking any wakelocks. If there is something I missed then please let me know as I easily could've messed up something as I haven't done it with odexed roms before but the weird thing is the service was bound which makes me think I didn't do anything wrong. Any help would be greatly appreciated and sorry for the massive essay.
[Android Software Development] GioBozza:
Are you sure you are not blocking any core wakelock? A list of the blocked ones could help to identify the problem, as I don't think this is caused by the mod itself.
[Android Software Development] fkfmfz:
I think the easiest way to find out is to grab a log on the crash.... flash the ROM set it up. Then open terminal and do adb devices, on your phone a pop-up will occur for fingerprint key. Allow that then in terminal do adb log and wait for the crash. In the terminal window you will see what is happening when it rebooted.

Sent from my Nexus S.i.X
[Android Software Development] DEVILOPS 007:
Like I said, it happens even on a clean install before the app is even installed so it isn't anything to do with what I am blocking.

---------- Post added at 07:39 PM ---------- Previous post was at 07:38 PM ----------

Okay thanks, will try and report back soon:)

---------- Post added at 07:28 PM ---------- Previous post was at 06:39 PM ----------

Hi, I jut want to let you know there are multiple things that cause my phone to reboot such as leaving it alone or install or update an app or doing something as simple as enabling/disabling adaptive brightness or making a backup in titanium backup. Here is the log but I'm not sure what it means. Hopefully someone can understand it, thanks.

https://transfer.sh/11huGb/Name_of_Log_File.txt

---------- Post added at 08:39 PM ---------- Previous post was at 08:28 PM ----------

I forgot to say what I did to make it reboot. I simply try to update an app through the playstore which caused this reboot.
[Android Software Development] nicesoni_ash:
Hats off to you for being so patient. This thread is more like a how to build a rom then the mod itself. [emoji4]

Sent from my "1+2" powered by Unofficial RR 7.x.x

Compiled by myself
[Android Software Development] SimoIanni:
I recognize an error we got when trying to use the odex file made by make service, however try to take your /system/framework/arm64 files and use them to baksmali and smali

It's strange that it even boots, it was a bootloop error for us
[Android Software Development] fkfmfz:
search for this in your log

--------- beginning of crash

05-26 20:15:13.963 613 3354 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: PackageInstaller

and a few lines under that you will find this error

java.lang.ClassNotFoundException: Didn't find class "com.android.server.pm.PackageManagerService$VerificationInfo" on path: DexPathList[[zip file "/system/framework/services.jar", zip file "/system/framework/ethernet-service.jar", zip file "/system/framework/wifi-service.jar"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64, /system/lib64, /vendor/lib64]]
[Android Software Development] DEVILOPS 007:
Okay thank you, I'll check this out.:)

---------- Post added at 09:51 PM ---------- Previous post was at 09:50 PM ----------

Okay thanks will do. By arm64 files do you mean that instead of the boot files in whatever the folder was?
[Android Software Development] DEVILOPS 007:
Just tried what you said and the problem is still there unfortunately.
[Android Software Development] DEVILOPS 007:
I've gone back to the DU version [MENTION=4101055]CappyT[/MENTION] did with the template 1.0 and no problems anymore.
[Android Software Development] DEVILOPS 007:
[MENTION=7087071]GioBozza[/MENTION] Just wondering if you could possibly add template 1.0 back to your github repo so we have an option which one to use as your 2.0 template doesn't seem to work with odexed roms. If not then could you possibly send me a text file with the code as I have no backup of what code was modified for template 1. Thanks.
[Android Software Development] CappyT:
Core v.2.0 is thought around the closed sourced and odexed roms, to enable us to make wakeblock even without compiling the services.jar (or .odex).

I can assure you that v.2.0 perfectly works. Already enabled OP3 and OP3T on OxygenOS roms (which are closed source).

So the answer is, in short, we won't switch to an older method due to an error by your end.

Also, right now v2 and v1 are cross compatible, starting with v3, older versions won't be compatible due to changes.
[Android Software Development] DEVILOPS 007:
Am I missing something? Simolanni said he had problems with getting this working on an odexed rom with v2.0 and apparently there is a problem unless I have misunderstood something. I did everything right with DU and v2.0 template. I did everything the same as v1.0 which I reproduced what you did to make sure I did it right. I did v2.0 right including the new folders and java file in com so I haven't done anything wrong as far as I know.
[Android Software Development] SimoIanni:
No, we had that problem during core 1.0 devloping
[Android Software Development] DEVILOPS 007:
Oh... Well what's my problem then?! In my explanation explaining my problems could you see anything I might have done wrong? I'm sure I did everything right which leads me to think there is a problem with the code because there weren't any problem with v1.0
[Android Software Development] bhanuprasad1981:
Feature request :- add option to query google for info on wakelock, just below block button add button for query net option

Thanks
[Android Software Development] ZeNiXxX:
hey thanks for the awesome work. Can i use your app in my rom ? I would like to add it as preinstalled app.
[Android Software Development] nicesoni_ash:
Answer is already in your quoted post.

Sent from my "1+2" powered by Unofficial RR 7.x.x

Compiled by myself
[Android Software Development] Face_Plant:
I have a feature request: I would find it very helpful if the search also included the acquiring package name along with the wakelock name.

For example, if I search for "Facebook" all wakelocks with the word "Facebook" in it would appear, along with any wakelocks that have Facebook as the acquiring package, but don't necessarily have the word "Facebook" in its name.
[Android Software Development] GioBozza:
Of course you can!
[Android Software Development] hh11bbaacchh11:
Hey. I'm really interested on the app. May I know where I can find the DU patch for the 6P, if there are any?
[Android Software Development] DEVILOPS 007:
Here you go.
[Android Software Development] Mar-cel:
Hm. It doesn't work with OnePlus 3 unsupported device/rom
[Android Software Development] DEVILOPS 007:
That's probably because your device isn't supported and the app doesn't just work. You need to flash the right zip for that rom and device or port the core mod if the source code isn't available. Can you tell me what rom you are using please?
[Android Software Development] Mar-cel:
Phoenix Aosp Extended
[Android Software Development] DEVILOPS 007:
[MENTION=4101055]CappyT[/MENTION] Any chance you could upload the dummy services.jar again please? The original link doesn't work anymore. Thanks a lot.
[Android Software Development] skiely666:
Hello, just two questions, if I want to revert back to stock do I just replace the services.odex file with the backup one, un install the app & reboot? If so would you be able to incorporate a back to stock option in the app?

Thanks & great app working perfect here on 6P stock 7.1.2 47O
[Android Software Development] SimoIanni:
You should COPY the backup file from the recovery's file explorer
[Android Software Development] tomte28:
It could become a bit of annoying month by month, I know ;) But have you had a chance to check WakeBlock for stock 7.1.2 June patch (Build N2G47W)?
[Android Software Development] GioBozza:
Sure, I'm going to build it as soon as I have some free time!
[Android Software Development] aviraxp:
I think you can provide users a guide about how to use smali and java things to manually patch system framework. It is not difficult. You can see the guide from Brevent here https://github.com/aviraxp/Brevent/tree/patch-2/aosp
[Android Software Development] DEVILOPS 007:
Little question to do with swapping the smali from the deodexed services.odex. When copying the smali for the PowerManagerService.java and PackageManagerService.java whichines actually need to be copied? There seems to be lots and I'm not sure which exactly need to be copied over. Thanks.
[Android Software Development] aviraxp:
Just replace the file. Actually I think it is a bad idea to release the full file cause they could be different in many roms. The right way is to release a diff.
[Android Software Development] DEVILOPS 007:
Oh, okay thanks for explaining. Any idea when you will release a supported version and is there any way round it for me at the moment?
[Android Software Development] GioBozza:
Support for deodexed ROMs is a top priority and I will update you when it's done.

I really don't think you can do something to make it work on a deodexed ROM right now and in this days I can't support you much as I have low to none internet connection.

Despite this, [MENTION=4101055]CappyT[/MENTION] owns a 6P. I'll check if he can find a way in the meantime.
[Android Software Development] keaheng:
Hey, If you need a beta-tester, Pm me. Btw I installed on my HTC 10 android N stock rom, doesn't work.
[Android Software Development] GioBozza:
This currently supports Nexus 6 and 6P. I'm going to support more phones with a stable release.
[Android Software Development] keaheng:
sure i'm keeping my eyes on this one. I own both 6P and HTC 10. 6P has many good kernels that can block useless wakelocks for example like Franco kernel or DU rom that is native supported the wakelock blocker.

the problem is with other device that has less support need this your app the most. Currently my HTC 10 is suffering from IPA_WS, WLAN WAKE, WLAN_RX_wake and so on and there is no way to block them. That's really annoying me. Anyway thank for your time. Gluck.
[Android Software Development] GioBozza:
Thank you! I'm trying to find the best way to standardize the process, as every device is a bit different and has to be done separately.
[Android Software Development] JonasVFC:
i've just installed this on my 6p. rebooted after app installation and it said "service bound" and everything appeared fine. after an hour or so, it says "service unbound" (i've just go around the app, didn't block any wakelocks)

edit: rebooted and it says bound again
[Android Software Development] GioBozza:
This should only happen if the service has been somehow killed, as it binds on system startup. Do you have any task killer running or did you reinstall the app?
[Android Software Development] JonasVFC:
no task killer, no reinstall, stock rooted 7.1.1 and elementalx kernel
[Android Software Development] GioBozza:
Umm, I'm going to investigate it, thanks for the report! Tell me if it happens again.
[Android Software Development] JonasVFC:
ok i will. if you want to me send any logs to you, just tell me the file path
[Android Software Development] GioBozza:
Sure. You can run "logcat | grep com.giovannibozzano.wakeblock" on the device or adb to get the full log of the app and service, if you encounter the same problem.
[Android Software Development] CappyT:
Try this:

Go to Settings > Battery > Three dot menu > Battery optimization and select Wakeblock as "Do not optimize"

Also, to ensure the app isn't killed, check your ram usage, the system may have killed the app because of low memory.
[Android Software Development] JonasVFC:
i didn't do that and it didn't happen again. so far so good
[Android Software Development] DEVILOPS 007:
Any updates?
[Android Software Development] CappyT:
Sadly dev is pretty busy and so am I, new year's eve and all the holidays... Finding time to develop or test is pretty tough atm
[Android Software Development] DEVILOPS 007:
That's alright I understand. I hope you guys are having a great holiday and enjoying yourselves and we all really appreciate any work you do but no rush. ?
[Android Software Development] JonasVFC:
This is working great. I'm achieving ~0.45%/hr drain following the extreme battery guide that there is here in xda.

Do you have any plans to make the regex tab work?

Keep up the good work guys.
[Android Software Development] CappyT:
We're currently testing the mod for non-odexed roms, after that the dev will focus on either regex or alarm blocking (alongside bugfixing)

Also, magisk support is undergoing, by me.
[Android Software Development] mymistake:
i blocked a few items however i am getting random reboots, if anyone has a list of what items to block? i did unblock most to figure out what's causing the reboots, got tired. i have completely unblocked everything for now, no reboots.
[Android Software Development] DEVILOPS 007:
I don't think I explained it properly. Basically to get this on an odexed rom I need to do l the normal syncing the repo and edit the files and make services etc. I then need to deodex it and the one from the actual rom and swap those certain classes then make it a classes.dex and odex it. Do you have a dummy services.jar btw to put the classes.dex? Thanks.
[Android Software Development] aviraxp:
Java can make a Dex into jar.

jar -cvf services.jar classes.dex
[Android Software Development] DespairFactor:
Is it possible to backup the options from a user? This will be helpful when flashing a new ROM or update(if settings are lost).
[Android Software Development] DEVILOPS 007:
If by backing up the data then you could use titanium backup, unless I misunderstood the question.
[Android Software Development] shadowstep:
I think what [MENTION=5169465]DespairFactor[/MENTION] meant to ask was is there a way to backup the settings/chosen wakelocks to be blocked via this app so that whenever a new flash is made, a user can open the app, just import the wakelocks he/she had blocked earlier & it'll be good to go.. instead of re-selecting the wakelocks to be blocked.

Does backing up the app using TiBu (with data, of course) back up the above mentioned settings too?
[Android Software Development] DEVILOPS 007:
Yeah it does. I've backed it up with Titanium backup and restored on new roms and the wakelocks stay blocked as the data was restored that had what I set saved in the data.
[Android Software Development] AlemanSantos:
amazing, just come here to ask this, trying the app on OP3 with Zenity ROM seems to work without problems
[Android Software Development] DespairFactor:
I would prefer to avoid titanium backup, it was more a request to create something like a profile that you can also share amongst users.
[Android Software Development] rdlr88:
[MENTION=7087071]GioBozza[/MENTION] is it posible to implement this to RR rom if so could you explain to me the process, i will be extremely grateful

Thanks
[Android Software Development] AlemanSantos:
working on Zenity RR if you want to try
[Android Software Development] rdlr88:
[MENTION=7367536]AlemanSantos[/MENTION] thats for OP3 im on N6p but thanks
[Android Software Development] AlemanSantos:
Lol yes xD thought I was on OP3 forum hahaha
[Android Software Development] ProudRed:
Is there any guide that tells which wakelocks are safe to block ? I do not want to block wakelocks that makes the system unstable.
[Android Software Development] DEVILOPS 007:
https://xdaforums.com/nexus-6p/general/guide-set-forget-setup-easy-update-t3560052
[Android Software Development] K-alz:
Could someone please tell me where the flashable zip for wakeblock is in the link provided? All I see is a page of github that's full of codes. Am I missing something? Thanks.
[Android Software Development] DEVILOPS 007:
Well it depends if you are on stock rom or custom rom.
[Android Software Development] K-alz:
I don't think you're getting my question. I'm trying to download the flashable zip for the wakeblock mod and the link provided takes me a github page and I see no zip to download. I'm about to flash s.i.x ROM.
[Android Software Development] DEVILOPS 007:
I don't think you're getting my point. The reason I asked was because the github links here are for wakeblock for stock rom only. I have a thread with at least 10 custom roms with wakeblock support. As for s.i.x rom, the dev has intergrated wakeblock into the rom meaning you only need to download the app and reboot after flashing the rom, kernel, gapps, root etc.
[Android Software Development] K-alz:
Thank you, now it makes sense. Already got it running.
[Android Software Development] fkfmfz:
Bye, bye whiteui....[emoji106]
[Android Software Development] wangdiam:
i would be extremely grateful if one were to share how to patch it to the framework
[Android Software Development] DEVILOPS 007:
Um... How?
[Android Software Development] fkfmfz:
Added the overlay to S.i.X theme, is in the playstore
[Android Software Development] Lord. Tech:
damn, this sounds really interesting, but.... ok so apparently im a total NOOB at getting this to work. im on RR for 6P and have just installed the app from playstore, it says UNBOUND. i know, i know....

there is no folders in system/framework.

reading a few pages i figure its either

1)my rom is not supported

2)i need to flash some zip?

3)i need to create some folders?

4)I'm way over my head about my technical expertise

ps i cant bake or cook or anything to a rom, so can anyone help me in NOOB language? i'd really appreciate it
[Android Software Development] nicesoni_ash:
Your maintainer has to add the patch to sources for it to work.

Sent from my "1+2" powered by Unofficial RR 7.x.x

Compiled by myself
[Android Software Development] syrkles:
And RR already has a wakelock blocker built in
[Android Software Development] nicesoni_ash:
No, that's a different feature.

Sent from my "1+2" powered by Unofficial RR 7.x.x

Compiled by myself
[Android Software Development] AlemanSantos:
With that you block always, with Wakeblock you can delay the wakelocks, instead of all or nothing, you can make more or less depending the timers you use, i'm using this on OP3, excelent app :good:
[Android Software Development] dnsh89:
Not working on the latest July update..
[Android Software Development] DEVILOPS 007:
That's because every monthly update changes things like the services.odex as it is an odexed rom which means a new build needs to be done every month. You'll just have to wait for it to be released. Or switch to a deodexed custom rom with it intergrated into the source code like I've done.:)
[Android Software Development] GioBozza:
In this period I've been (and will be for a while) really busy because of exams. I promise I'll be back to work on WakeBlock as soon as possible guys!

Edit: and I hopefully will make some sort of autopatcher...
[Android Software Development] DEVILOPS 007:
And services, alarms and regex blocking? ;) Hopefully your exams go well and they definitely prioritise over wakeblock.
[Android Software Development] amerino1:
Please,we need support for one plus3 t. Please,anybody can make one zip flasheable for open beta 10?????please

Enviado desde mi ONEPLUS A3003 mediante Tapatalk
[Android Software Development] yorllin:
I searched but I'm not sure if this works on nitrogen.
[Android Software Development] shantam3108:
No it doesn't
[Android Software Development] ProudRed:
Do you mind sharing your setup for wakeblock ? lot of wakeblocks for user apps which I do not know how to regulate.
[Android Software Development] DEVILOPS 007:
- NlpWakeLock -- 900 000ms

- GCoreFlp -- 900 000ms

- RILJ -- 900 000ms

- UlrDispSvcFastWL -- 900 000ms

- CMWakeLock -- 900 000ms

- *net_scheduler* -- 3 600 000ms

- Wakeful StateMachine: GeofencerStateMachine -- 900 000ms

- LocationManagerService -- 900 000ms

- SyncLoopWakeLock -- 900 000ms

- NetworkStats -- 900 000ms

- Icing -- 3 600 000 ms

- ULR_BarometerReading_WakeLock -- 900 000ms

- NfcService:mRoutingWakeLock -- 3 600 000ms

- NlpCollectorWakeLock -- 900 000ms [/HIDE]

- wake:com.google.android.gms./ measurement.PackageMeasurementService -- Disable

- Anything with FireBaseInstantIDService -- Disable

- Anything with the word analytics in the name -- Disable
[Android Software Development] ProudRed:
Done. Anything for user apps ?
[Android Software Development] DEVILOPS 007:
Up to you, apps work differently so I can't say but I just do what I said and it works great
[Android Software Development] AlemanSantos:
sorry, i thought i reply already xD the post was resting on xda labs :v

i've used this and this as guide, just add three zero to those numbers, wakeblock use miliseconds, those are seconds.

Some are duplicated with different values, i put always the higher
[Android Software Development] ProudRed:
I am following the same for the wakelocks. Still looking for a solution for the alarms.
[Android Software Development] EdgeVibration:
I flashed it on OP3 recent Android PA and it gave me a bootloop, any way to make it work? I know that the Radioactive Rom for Op3 has it and it worked wonders.
[Android Software Development] AlemanSantos:
the team of AOSPA need to compile on the rom, you can't just flash the zip, that's only for Nexus 6P users.
[Android Software Development] DEVILOPS 007:
I'm currently compiling it for my Nexus 6p but if you send me your services.odex then I can have a go at getting wakeblock working for you once I'm done with the 6p.
[Android Software Development] EdgeVibration:
Noob questions but where do I get the services.odex from?

Thanks for your help and attempting to help me.
[Android Software Development] DEVILOPS 007:
Here and you're welcome. /system/framework/oat/arm64/services.odex
[Android Software Development] EdgeVibration:
https://ufile.io/0zbjl

There you go, thanks a lot!
[Android Software Development] yung40oz84:
Which zip do I flash to get this working? I am 9m DU, latest July vendor. I tried one in GitHub and got boot loop.

---------- Post added at 01:34 PM ---------- Previous post was at 01:32 PM ----------

Which thread? I need DU

EDIT: found in thread, thanks.

Will the one in thread work as DU is on 11.6 now?
[Android Software Development] CappyT:
First of all, this thread and the app itself has support for ONLY STOCK N6P rom (AOSP)

But, the mod could be ported to ANY rom.

For DU, there's a port I made here. It supports Official 11.6 DU for Nexus 6P.
[Android Software Development] yung40oz84:
I know it's only for stock, but I saw there were ports, thanks for the zip bud.

---------- Post added at 02:43 PM ---------- Previous post was at 01:56 PM ----------

I am getting a boot loop on that zip. Am I missing something as far as install procedure? I am running RU 11.6, magisk, sdcardfs module, audio modules, flash kernel.