[Source] RENOVATE Gaming Boost + Modifying Tutorial - HTC One X

Hello guys,
Just thought i'd share the source code with you and a tutorial on how to modify it to work with a rom with a modified ondemand governor by default. Or if you wanna change the values altogether you will be able to do so.
Also if any other devs wanna modify it to look better or anything feel free, we are a community
Right first off your gonna need
Eclipse properly set up to work with android and OpenSense SDK (i will not go through how to do this, google is your friend for that)
The Source Code provided in this post
An APK signer
Patience because if your not experienced this could take a while
Tutorial:
First off extract the .zip somewhere on your pc
Then your gonna want to open Eclipse, go to File/New/Project.
From there expand the android folder and select "Android Project From Existing Code"
Click Here For ScreenShot
On the next screen where it says "Root Directory", point it to where you extracted the source folder to.
If you have done it correctly your screen should look like this:
Click Here For ScreenShot
Click finish and the project will be open.
From there, at the top left you will see a section saying "Package Explorer".
Underneath you will see "com.ondemand.gaming.boost.OnDemandGamingBoostActivity".
Click the arrow to open it up.
Once opened you will see a lot more options, the one we need to worry about is"src", so go ahead and open that one up.
You will see another 2 options, go ahead and open up "com.ondemand.gaming.boost".
From there you will see "OnDemandGamingBoostActivity.java", double click that and it will open in the main window.
Click Here For ScreenShot
Right the bit we are after is about halfway down, so just scroll down till you find this section of code.
Click Here For ScreenShot
From here you will see that this is where all the commands get executed.
"ShellInterface.runCommand" basically tells the app to run a command.
The top half is the values to revert back to when you disable gaming boost, this is shown by the "preference.setSummary("Gaming Boost Disabled");" at the end of the commands. (Most likely this is just the section you will be editing, but the same would apply if you was changing the optimized values)
From here its pretty much self explanatory, you edit the values to whatever you want them to revert back to after you disable gaming boost.
Make sure you edit all the values, some commands appear twice so make your you edit every instance of the value you see, a good way to check is to search for the old value when you think you have finished to see if you have missed it anywhere.
Please Note: They have to match whatever your ROM Dev uses in his ramdisk, contact him if you dont know what they are or check/modify his ramdisk yourself.
The last thing you need to edit is the file the app checks for before allowing the changes.
Above all the commands you will see "String ODGBState = SubActivities.readFile(ODGB_File + "/up_threshold", true);"
This basically means the app will check the value of "up_threshold" and if the value in the app doesn't match the value in the ramdisk the app won't work.
This is where things may get a little confusing.
The value for the checkfile for when the app is disabled is actually found in the second block of commands, where the optimized values are.
Just above the commands you will see "int iDisabled = 85;"
The "85" is the value of the up_threshold you have just modified in the previous steps, so change that to match what you tweaked it to.
Exporting the APK.
Once you have done all the editing you want to export the apk for use.
On the left hand side pane, the 3rd from the bottom in list you will see "AndroidMnifest.xml". Double Click it.
In the main windows about three quarters of the way down you will see the "exporting" tab. Click on "export an unsigned apk"
Choose a name and where you want to save the app and click save.
A pop up will come up when its saved.
From there all you need to do is sign the APK and push it to system/app, or include it in your ROM ZIP.
This may not be a 100% perfect tutorial but its worked for me, i'm still learning.
If anyone see's any errors please point them out.
Thank you.
SOURCE CODE

Related

colorChange.jar script

I'm lazy, so I used bits of Stericson's Autosigning script as template for a script that semi-automates using Ohsaka's colorChange tool. It basically just cuts out on about half the typing required to recolor a theme. Put a copy of this in your SDK tools folder, change "filepath=" (line 67) to the directory you usually edit your themes in, put a shortcut to the .bat somewhere (I keep mine in my working theme directory), and run. Then just type in the theme name ('no c:\blahblah\path-to\theme.zip', just 'theme.zip') input colors in ARGB like usual and go. It even lets you double check your color selections and redo them if necessary before running.
It does what I want it to do, and I hadn't planned on changing it unless something breaks it, so if it doesn't suit you or you have fixes/improvements, by all means post revisions. I don't code for a living, and I'm sure you all are better than this than I am, so have at it.

How To Set Up an IDE to Develop to the Nook Touch on Windows

Setting up a development environment is really not that hard. I am using Windows 7 with a 64-bit processor, although the procedure is not terribly different across sytems, just make sure you choose the right download for your architecture.
The entire process can be broken down into four major steps. Let's get started.
1) Get Java
You can get the Java Standard Edition Software Development Kit through this link: http://www.oracle.com/technetwork/java/javase/downloads/
At the time of writing this post, the latest version available is 7u3. Click the download button under where it says 'JDK' and you will be taken to a list of installers. Make sure you get an installer from the group who's header is "Java SE Development Kit 7u3"; the other one is just sample code.
Make doubly sure that you choose the right architecture (x86 vs x64) as the wrong one will give you an error message and you will have to go uninstall everything and start over.
After the download has finished, run the installer.
Note: It may give the option to install JavaFX and the Ask Toolbar. While they won't hinder your development in any way, there won't be any need for them within the scope of this guide so you might find it worthwhile to not install them.
2) Get Eclipse
Once you've installed the Java DK, go get a copy of the Eclipse IDE here:
http://www.eclipse.org/downloads/ You can see that the IDE comes in many different flavors. Eclipse Classic will work fine.
Extract the folder and place the 'eclipse' subdirectory in a safe place. Try running eclipse by traversing this directory and running eclipse.exe. If you see the Eclipse splashscreen, everything is OK. If you see an error message then something may have gone wrong when you installed Java. If it complains about missing or corrupted DLLs, you probably have installed the wrong version of Java for your system. If it complains about not being able to find Java (for example, stuff about javaw.exe) you may need to manually add Java's location to your Path environmental variable. There is lots of documentation on how to do throughout the internet and most can probably explain it better than me. (^; Another method to fix the problem is to go find out where all the Java binaries are (Normally something like "C:\Program Files\Java\jdk~~~~~~~\bin"), copy the directory path, and add
Code:
-vm
<FOLDERPATH>\javaw.exe
to the end of the 'eclipse.ini' file that resides alongside 'eclipse.exe'
Note: You may notice that the version of Eclipse you downloaded isn't installed, but instead just runs out of a folder. You may want to consider creating a binaries folder in your home directory to keep all of software of this style in one place.
3) Get Android Plugins for Eclipse
Now that you have Eclipse up an running, you need to set it up for Android development. Start Eclipse up and click the 'Help' menu. Click 'Install New Software...'
In the window that comes up, you should see a combo box labelled 'Work with:' . Paste in:
Code:
https://dl-ssl.google.com/android/eclipse/
then hit enter.
Check 'Developer Tools' and click next. Let Eclipse do it's thing then click 'Finish'.
4) Get the API
Now that you have Eclipse's Android integration plugins, you need to grab an Android API. In Eclipse, under the 'Window' menu, click 'Android SDK Manager.'
The window that opens will automatically go to the internet and grab all the API packages available to download. The Nook Touch currently runs Android 2.1, so find that package set and check it. Click the 'Install <x> Packages' button and let it run.
You are finished! Now to create an Android program. In Eclipse's main menu, navigate File > New > Other... and select 'Android Project' from the 'Android' folder in the window. If you want to modify the source of an existing program, choose the appropriate radio button and browse to the parent directory of the 'src' folder. After you have created your project, you are going to want to make sure it has the right dependencies. On the lefthand pane ('Package Explorer') right click your project folder (The top one) and hit 'Properties.' Under the 'Android' screen, make sure 'Android 2.1' is checked and not another version. Click OK and you should be set.
To generate an APK, under 'File' click 'Export.' In 'Android' click 'Export Android Application.' Choose the right project, click next. If this is the first time you've exported an Android application, you will need to create a keystore. Select the appropriate radio button, navigate to a safe location, and give it your keystore a password. Click 'next' and add all the information you see fit. You will be able to reuse this keystore in future programs. After you've created a keystore, proceed through the export wizard, give your APK a filename, click finish and the file will be generated.
The rest is up to you. (^:
Thanks klausef!
For a non-dev (OK, I used to program short apps in BASIC on my commodore 64 when I was 8 years old), how much can I hope to achieve by setting this up? Do I need to understand a programming language? If so, which? Do you have any suggestions for a noob like me?
Haha I am no Java expert myself but I've been hacking around with the NoRefresh thing and other apps people have coded. You can do more than you think just by rummaging around online documentation.

Getting a syntax error when trying to load a script

Hi. I just finished installing CyanogenMod 11 on my Galaxy Nexus. I also put the DirtyV-SR kernel on as well. Everything seems to be working fine. I then learned about a custom edit of the DirtyV kernel by Nephilim that seems to be popular. I have no idea how to change the settings manually though. Luckily in the DirtyV post there is a link to a script by the user "buscher" that supposedly does the changes for you. I followed the instructions and put the script in the System/etc/init.d folder, removed the .txt extension on the script, and changed it's permission settings (I think I changed the permissions correctly). I'm using an app called SManager to do this BTW. When I try to launch the script I get a syntax error. Here is a screen shot of said error...
i.imgur. com/ b5jAVe3. jpg
(Added spaces so I could post the link)
Link to DirtyV thread: http://forum.xda-developers.com/galaxy-nexus/development/kernel-dirtyv-t2613655
Link to buscher's post with the script: http://forum.xda-developers.com/gal...nel-dirtyv-t2613655/post50202995#post50202995
Does anyone have any idea what im doing wrong? Or perhapsna different way to use Nephilims version of DirtyV?
Thx
I've never used any of the scripts you're talking about, but normally that syntax error means that there's a coding error in the script file that the interpreter doesn't know how to handle. I looked at the script in that thread and I can't see anything that would jump out as being problematic, so there's a chance something may have happened when you downloaded the script or copied it to the device.
I'd say you should try downloading the script again directly on your device, and make sure you're clicking the "Download" button on the Mediafire page with the script instead of doing a "save link as" or anything similar from the forum thread. You may even want to open it up in a text editor app and compare it to the version online to make sure that the file matches.
Alright so I redownloaded it and got it to run this time. My problem now is that it seems some of the required directories for the script don't exist on my phone for some reason.
Here's a new screenshot of the errors
http:// i.imgur. com /mjBjQ88. jpg (again had to add spaces)
It's probably safe to ignore those errors, they probably come from that script being older than the latest kernel version you're running it against. Basically, Linux kernels create a whole bunch of files and folders in /sys that control certain kernel settings. By writing a value to specific files, you can change those settings. Those two errors are the result of the script trying to change two settings files that don't exist anymore, possibly because they were removed in a newer version of the kernel. The rest of the script should run without problems and make the rest of the changes.
just wanted to say, there is no need for script manager to run that script.
remove the .txt
put it in /etc/init.d folder/dir
set all perms(i.e rwxrwxrwx)
then just reboot
it will automatically run and set everything in the script when the device boots.
also
if you want to set those things from nephilim thread, use the app called trickster mod(or Synapse, though trickster might be less overwhelming for someone new to setting these things)
enjoy
any questions feel free to ask

[FAQ] Frequently asked question concerning VTS

How to properly install framework apks and use tags
ApkTool (and therefore VTS) needs framework apks to properly de- & recompile Android resources.
Framework tags are used to differentiate between multiple sets of framework apks.
You are usually going to have one set (ie. multiple apks) per device and base/rom version.
When installing frameworks it's very important to install all frameworks from the same device/rom with the same tag.
Have a look at this tutorial to learn more about installing frameworks with VTS.
Click to expand...
Click to collapse
How to completely reset the VTS layout
VTS has a "Reset layout" button, but sometimes this can't repair all problems with a broken window layout.
To fix such persistent problems, open the settings and untick the "Save dock layout" checkbox.
Now restart VTS, the layout should be reset to the default layout.
You can enable layout saving again.
Click to expand...
Click to collapse
How to manually edit VTS settings
Since VTS 2.6.12 you can easily change these settings with the "Advanced settings" window inside VTS.
Open the settings window and click on the "Advanced" button at the bottom.
VTS stores its settings easily accessible in XML files. They are stored in a folder (normally) located here:
C:\Users\<your user>\Documents\Virtuous Ten Studio\Settings\
You can easily open and edit these settings files, just make sure VTS is closed before doing so.
Note: Some settings only exist after VTS used them for the first time.
Click to expand...
Click to collapse
VTS can't find the Java binary
Make sure to add the location of your Java.exe to your PATH variable and reboot after doing so.
VTS should be able to find your java binary now.
If it still doesn't work, you can manually specify the java path in the VTS settings.
Click to expand...
Click to collapse
Something else went wrong and I need help
Editing apks and other Android related files can be a highly complex task.
There are many possible error sources. If something goes wrong nobody can help you unless you provide some important things: (if applicable)
The VTS logs. Without these it's pretty impossible to troubleshoot problems that occured while using VTS.
Have a look at this tutorial, it explains you how to use the Log Viewer.
Make sure all checkboxes on top are checked and copy all the log text from the textbox.
When asking for help, make sure to include all the text in [CODE]<log text>[/CODE] tags.
A logcat of your device, the packagename (if applicable) and filename of the file you are working on.
If something goes wrong or doesn't work on the device you are working with, it's absolutely required to get a logcat before asking for help.
You can use the Logcat viewer of VTS to get a copy of the so called Logcat. It's the internal log of your device and usually helps revealing and solving all kinds of problems occuring on the device.
As with the VTS logs, please include the Logcat in [CODE]<logcat text>[/CODE] tags.
Your Operating System version (eg. Windows 8, Windows Vista etc)
General information:
Can you reproduce the issue?
Did you try to restart your computer/your device first?
Click to expand...
Click to collapse
Feel free to propose me any new entries for this post
Something is badly messed up..
I used VTS v2.6.12 .. Until then everything was alright.. I used to decompile framework-res.apk, framework.jar, systemui.apk..
I never got any boot loop..
I downloaded and installed the latest version and ..
Whatever projects I made in v2.6.12 .. Were not recompiling.. May be because there was an update to apktool..
I had to make all new projects.. .
SystemUI.apk of my stock ROM is ~2.5mb.. After I decompile and recompile its size is like 5mb .. Why so??
I have to do everything manually ..
It never shows any error while decompiling or compiling..
How can i figure out where the problem is??
rkharat98 said:
Something is badly messed up..
I used VTS v2.6.12 .. Until then everything was alright.. I used to decompile framework-res.apk, framework.jar, systemui.apk..
I never got any boot loop..
I downloaded and installed the latest version and ..
Whatever projects I made in v2.6.12 .. Were not recompiling.. May be because there was an update to apktool..
I had to make all new projects.. .
SystemUI.apk of my stock ROM is ~2.5mb.. After I decompile and recompile its size is like 5mb .. Why so??
I have to do everything manually ..
It never shows any error while decompiling or compiling..
How can i figure out where the problem is??
Click to expand...
Click to collapse
You made a pretty big jump in versions there, I suspect the changes in the file formats prevented a proper loading of your old files.
Sorry for that, I never expected such large version jumps.
As for the size, in its default configuration VTS builds all binaries with no compression, whereas most binaries come with some compression. You can set the compression level in the settings of the zip module yourself. In any case, the size difference does no harm, you can leave it either way.
@Diamondback, great work.
Can I compile Apk via VTS? Example: I have sources and want to compile it with my drawables,XML,values. Thanks in Advance

[ROOT HD 10] Enable advanced power menu (global actions) + my other framework mods!

*****ONLY WORKS FOR FIREOS 5.6.2.0 OR LOWER*****
The title says it all. I've activated the stock global actions power menu. The options need tweaking a bit still, but this was too good to wait.
For the moment, without an Xposed module, the stock options are: Airplane Mode, Settings, Lock Now, and volume. With Gravitybox, you can add power (might be stock. I noticed this after gravitybox was installed), restart (which leads to soft reboot, reboot, recovery reboot and boot loader reboot).
How?
One minor edit to the framework was all it took. The menu was disabled, the value set to 0. Change the value to 1, and you get the menu. Simply long press the power button for a couple of seconds and it will pop up.
I have been trying for so long to get this to work. I looked at the configuration dozens of times and didn't figure out what it meant until today. This needs a bit more work and can probably be added to my settings.apk, but that's for another day.
Requirements:
Rooted HD 10 on FireOS ***5.6.1.0 or 5.6.2.0****
Windows PC with ADB
Installation:
1. Download and install adbd insecure.
2. Download and place the attached framework-res.apk in your ADB folder and plug your tablet into your PC.
3. Open adbd insecure and check the top box to make adb insecure. Open an adb window and type the following, hitting enter at the end of each line:
Code:
adb remount
adb push framework-res.apk /system/framework/framework-res.apk
adb reboot
4. Long press power button. Score. :highfive:
P.S. This framework also contains all previous modifications. References:
How to guide: Enable 'ok Google' to work from ANY screen
[ROOT] [HD 10 2017] FireTabletSettings.apk Rewritten [August 22, 2018]
[FIRMWARE] [STOCK] Pre-rooted, optimized, stock firmware for HD 10 Suez [APRIL 2019]
[Root] [HD 10 Suez] Remove parental control applications/restrictions [May 2019]
[TEST] [Flash Zip] [HD 10] [ROOT] All-in-1: The ultimate hacks, tricks & mods zip
[Root] [App] [All tablets] Disable & replace lock screen - set custom wallpaper
NO ROOT REQUIRED: Working Screen Mirroring
UPDATE (for 5.6.1.0):
June 1, 2019
- Increased default system volumes from -6 db to 8
- Set preference for 5ghz wifi to false. Setting this to true only allows 5ghz connections. 2ghz are ignored if set to true.
- Fixed typo in time server I found in the system logs.
- Extend network attributes (I don't know if these actually work but doesn't hurt either way)
- Wpa_supplicant_scan_interval by default is set to 15000.... milliseconds. Raised value to 150000000. This may have been the cause of disconnects on a constant level.
- preferences prefer dual pane set to true
- Bar separating notifications from system messages was narrow (set to true). Set it to false.
- Low battery warning is now 10% instead of 25%. Extreme low battery warning (almost dead battery) set at 5%
DragonFire1024 said:
The title says it all. I've activated the stock global actions power menu. The options need tweaking a bit still, but this was too good to wait.
For the moment, without an Xposed module, the stock options are: Airplane Mode, Settings, Lock Now, and volume. With Gravitybox, you can add power (might be stock. I noticed this after gravitybox was installed), restart (which leads to soft reboot, reboot, recovery reboot and boot loader reboot).
How?
One minor edit to the framework was all it took. The menu was disabled, the value set to 0. Change the value to 1, and you get the menu. Simply long press the power button for a couple of seconds and it will pop up.
I have been trying for so long to get this to work. I looked at the configuration dozens of times and didn't figure out what it meant until today. This needs a bit more work and can probably be added to my settings.apk, but that's for another day.a
Requirements:
Rooted HD 10 on FireOS ***5.6.1.0*** (5.6.2.0 comes soon. Possibly 5.3.x.x)
Windows PC with ADB
Installation:
1. Download and install adbd insecure.
2. Download and place the attached framework-res.apk in your ADB folder and plug your tablet into your PC.
3. Open adbd insecure and check the top box to make adb insecure. Open an adb window and type the following, hitting enter at the end of each line:
Code:
adb remount
adb push framework-res.apk /system/framework/framework-res.apk
adb reboot
4. Long press power button. Score. :highfive:
Click to expand...
Click to collapse
I have updated to the latest, 5.6.3.0 (erroneously called 5.3.6.4). I guess it is risky to do this until someone tries it and says it works? I've been using retyre's prerooted installs for the last couple of releases. So if this screws things up, I would have to adb sideload and root again, which I'd like to avoid.
Ignoring that issue, can the file just be copied into the correct folder with a file manager since I'm already rooted?
sga999 said:
The title says it all. I've activated the stock global actions power menu. The options need tweaking a bit still, but this was too good to wait.
For the moment, without an Xposed module, the stock options are: Airplane Mode, Settings, Lock Now, and volume. With Gravitybox, you can add power (might be stock. I noticed this after gravitybox was installed), restart (which leads to soft reboot, reboot, recovery reboot and boot loader reboot).
How?
One minor edit to the framework was all it took. The menu was disabled, the value set to 0. Change the value to 1, and you get the menu. Simply long press the power button for a couple of seconds and it will pop up.
I have been trying for so long to get this to work. I looked at the configuration dozens of times and didn't figure out what it meant until today. This needs a bit more work and can probably be added to my settings.apk, but that's for another day.a
Requirements:
Rooted HD 10 on FireOS ***5.6.1.0*** (5.6.2.0 comes soon. Possibly 5.3.x.x)
Windows PC with ADB
Installation:
1. Download and install adbd insecure.
2. Download and place the attached framework-res.apk in your ADB folder and plug your tablet into your PC.
3. Open adbd insecure and check the top box to make adb insecure. Open an adb window and type the following, hitting enter at the end of each line:
I have updated to the latest, 5.6.3.0 (erroneously called 5.3.6.4). I guess it is risky to do this until someone tries it and says it works? I've been using retyre's prerooted installs for the last couple of releases. So if this screws things up, I would have to adb sideload and root again, which I'd like to avoid.
Ignoring that issue, can the file just be copied into the correct folder with a file manager since I'm already rooted?
Click to expand...
Click to collapse
There was one report of it working a week or two ago. No one has said anything since. If it doesn't work, worst case is you need to flash back to 5.6.x.x
DragonFire1024 said:
There was one report of it working a week or two ago. No one has said anything since. If it doesn't work, worst case is you need to flash back to 5.6.x.x
Click to expand...
Click to collapse
1. If it fails, and I'm unable to boot, I will have to redo the sideload of the bin file. Then I have to reroot. As I said, I've just been using the prerooted version for the last couple of releases which means I don't have to go through extra steps to root. Since I am rooted, I just use Flashfire to flash the new prerooted version by retyre.
2. I was asking about copying the framework file that you put out there. If I ignore the problems of it possibly messing up my system, and I just want to try it anyway, why is it necessary to use Adb insecure and the PC? Since I'm rooted, can't your framework file just be copied to the correct folder?
3. Finally, can you tell me exactly what you changed in the framework? In your other thread about modifying the framework, you give some good instructions on how to decompile and recompile. I might want to try that instead of using the version that you have created here (since I'm on 5.6.3.0). Is it really just one boolean that needs to be changed?
sga999 said:
1. If it fails, and I'm unable to boot, I will have to redo the sideload of the bin file. Then I have to reroot. As I said, I've just been using the prerooted version for the last couple of releases which means I don't have to go through extra steps to root. Since I am rooted, I just use Flashfire to flash the new prerooted version by retyre.
2. I was asking about copying the framework file that you put out there. If I ignore the problems of it possibly messing up my system, and I just want to try it anyway, why is it necessary to use Adb insecure and the PC? Since I'm rooted, can't your framework file just be copied to the correct folder?
3. Finally, can you tell me exactly what you changed in the framework? In your other thread about modifying the framework, you give some good instructions on how to decompile and recompile. I might want to try that instead of using the version that you have created here (since I'm on 5.6.3.0). Is it really just one boolean that needs to be changed?
Click to expand...
Click to collapse
1. Yes
2. With a root explorer yes.
3. For this? An integer was all. Everything else? That's too much to type. Honestly I spend hours and days reading them testing and mostly failing. I can't tell you the amount of bookmarks i have, maybe close to 500 or more. A lot of times I have to mix together old tricks. you spend most time reading than anything.
DragonFire1024 said:
1. Yes
2. With a root explorer yes.
3. For this? An integer was all. Everything else? That's too much to type. Honestly I spend hours and days reading them testing and mostly failing. I can't tell you the amount of bookmarks i have, maybe close to 500 or more. A lot of times I have to mix together old tricks. you spend most time reading than anything.
Click to expand...
Click to collapse
I don't understand your answer to 3. I'm just interested in what you changed in the framework-res to get the advanced power menu. You said it's just an integer. If I decompile framework-res.apk, where is the integer that must be changed? When you said "everything else", maybe you mean all your changes in the thread about hacks, tricks, and mods? I'm not asking about those. I'm only asking about the advanced power menu that you are talking about in this thread.
sga999 said:
I don't understand your answer to 3. I'm just interested in what you changed in the framework-res to get the advanced power menu. You said it's just an integer. If I decompile framework-res.apk, where is the integer that must be changed? When you said "everything else", maybe you mean all your changes in the thread about hacks, tricks, and mods? I'm not asking about those. I'm only asking about the advanced power menu that you are talking about in this thread.
Click to expand...
Click to collapse
If you decompile it, it would be in res/values/integers. The config would be (paraphrasing) 'long_press_on_power'. Since in this AOSP framework the global actions are active, you have a choice of values of 0 or 1. 0 being no action, 1 being the action. It's a few lines away from 'long_press_on_home' which is supposed to be between 0 and 3. 2 would activate the voice assist. But for some reason I haven't figured out, setting that value does nothing one way or the other but gravitybox fixes it.
You can change around the global action menu too I saw, but didn't have time to experiment with that yesterday.
@DragonFire1024
Nice hack! Like your new power menu - always wanted something like that!
Now, given that it'd be such a burden to update this for every FireOS version, any chance you'd take a stab at putting this together as an Xposed module? Other rooted Fire tablets could use it too.
I recall sometime in the past there were modules designed for FireOS - if you find that on XDA, you could start from that one.
DragonFire1024 said:
If you decompile it, it would be in res/values/integers. The config would be (paraphrasing) 'long_press_on_power'. Since in this AOSP framework the global actions are active, you have a choice of values of 0 or 1. 0 being no action, 1 being the action. It's a few lines away from 'long_press_on_home' which is supposed to be between 0 and 3. 2 would activate the voice assist. But for some reason I haven't figured out, setting that value does nothing one way or the other but gravitybox fixes it.
You can change around the global action menu too I saw, but didn't have time to experiment with that yesterday.
Click to expand...
Click to collapse
Here's what is in my integers.xml file for 5.6.3.0. Are you saying I need to change 2 to 1 in the first one? And no changes to the others?
<integer name="config_longPressOnPowerBehavior">2</integer>
<integer name="config_shortPressOnPowerBehavior">1</integer>
<integer name="config_doublePressOnPowerBehavior">0</integer>
<integer name="config_triplePressOnPowerBehavior">0</integer>
@DragonFire1024, Have you edited smalis? It is for do it in the framework-res.apk of another tablet.
sga999 said:
Here's what is in my integers.xml file for 5.6.3.0. Are you saying I need to change 2 to 1 in the first one? And no changes to the others?
<integer name="config_longPressOnPowerBehavior">2</integer>
<integer name="config_shortPressOnPowerBehavior">1</integer>
<integer name="config_doublePressOnPowerBehavior">0</integer>
<integer name="config_triplePressOnPowerBehavior">0</integer>
Click to expand...
Click to collapse
Correct. First config set to 1 and leave the others as is, unless you want to test them out.
Rortiz2 said:
@DragonFire1024, Have you edited smalis? It is for do it in the framework-res.apk of another tablet.
Click to expand...
Click to collapse
I have not. I rarely touch that at least not Amazon smali. It doesn't translate well at all. And haven't really had to so far. And the framework is odexed...well the .jar in system/framework is, so they don't have smalis.
bibikalka said:
@DragonFire1024
Nice hack! Like your new power menu - always wanted something like that!
Now, given that it'd be such a burden to update this for every FireOS version, any chance you'd take a stab at putting this together as an Xposed module? Other rooted Fire tablets could use it too.
I recall sometime in the past there were modules designed for FireOS - if you find that on XDA, you could start from that one.
Click to expand...
Click to collapse
I was thinking about that however if gravity box works to bring out the rest (reboot etc) I imagine other power menu modules will also work now.
DragonFire1024 said:
I was thinking about that however if gravity box works to bring out the rest (reboot etc) I imagine other power menu modules will also work now.
Click to expand...
Click to collapse
Gravity box might work - AFTER your framework-res.apk replacement (which needs updating after each OS version). As is, for me Gravity does not bring anything out beyond the stock "Power off" option. It seems a module could simply patch framework with the correct flag, and then Gravity will do its thing. Same logic would apply to other features that Amazon might have chosen to disable.
bibikalka said:
Gravity box might work - AFTER your framework-res.apk replacement (which needs updating after each OS version). As is, for me Gravity does not bring anything out beyond the stock "Power off" option. It seems a module could simply patch framework with the correct flag, and then Gravity will do its thing. Same logic would apply to other features that Amazon might have chosen to disable.
Click to expand...
Click to collapse
Install framework in OP then you need to enable the advanced power menu in gravitybox, power tweaks. Then long press power button, tap restart, then you get your options for reboot.
Rortiz2 said:
@DragonFire1024, Have you edited smalis? It is for do it in the framework-res.apk of another tablet.
Click to expand...
Click to collapse
Also for the most part Amazon just moved configurations around maybe changed a few characters or couple of words. But for the most part a significant portion if not almost all of the Android source for this version was left inside these files. There are very few things I actually had to rebuild. The battery stats is one of those things. Other things are more difficult and require other pieces of software, for example specific apks. That took quite a lot of time to hunt down working versions of certain apks. Remember we are working with what is considered a stone age OS version. So we have to literally search for needles and haystacks just to find the one tiny thing that makes it all work... Well at least some of it
Gosh, I tried for a long time to decompile/recompile framework-res.apk (5.6.3.0)...no luck! I'm using your instructions in post 2 in the 7 wallpaper thread as a guideline. I can decompile successfully. Then, even without making any changes at all, recompile does not work. I won't bother to put the error display here unless you're interested. (systemui.apk fails on the recompile also, but in a different way). A "regular application" will decompile and recompile just fine.
So I have no idea what's wrong. I do have xposed/gravitybox installed, and I wonder if that causes the problem (but it sounds like have those also?). Or some change to 5.6.3.0 that you did not encounter with prior releases. I'm wondering if you can upload your framework-res.apk somewhere so that I can try that. At least that would narrow it down to the new release or my error.
There are lots of posts about this kind of problem, but they mostly talk about wrong paths, etc. That is definitely not my issue.
I had downloaded the most recent apktool, 2.3.4. Just for fun, I just tried 2.2.0. There are 4 warnings, but otherwise, it worked. I haven't tried to install the new framework, so I can't be sure all is okay, but it's certainly a good sign. I will also try more recent versions of apktool, i.e. ones between 2.2.0 and 2.3.4, and see where it went wrong.
EDIT: 2.3.2 and earlier are good, 2.3.3 and 2.3.4 are bad.
---------- Post added at 04:58 PM ---------- Previous post was at 04:55 PM ----------
If it ain't one thing, it's another! After changing the integer, I'm trying to drag and drop with 7zip from the new apk to the old, as you described in your other thread. For resources.arsc, it works as you said, i.e. it asks if I'm sure I want to copy. But for the res folder, it doesn't ask me anything and just starts extracting into the old. I cancel it before it can complete.
Do you recall doing something different for the res folder? I could be on a different 7zip version than you, of course. I've used 7zip, but I'm not that familiar with it.
EDIT2: I don't think a notification is done if my edit gets combined with my prior post. I tried both reply and quick reply, and both ended up combining. Can someone tell me how to make it do a new post? Or maybe I'm wrong and another notification occurs, in which case, ignore this!
sga999 said:
I had downloaded the most recent apktool, 2.3.4. Just for fun, I just tried 2.2.0. There are 4 warnings, but otherwise, it worked. I haven't tired to install the new framework, so I can't be sure all is okay, but it's certainly a good sign. I will also try more recent versions of apktool, i.e. ones between 2.2.0 and 2.3.4, and see where it went wrong.
EDIT: 2.3.2 and earlier are good, 2.3.3 and 2.3.4 are bad.
---------- Post added at 04:58 PM ---------- Previous post was at 04:55 PM ----------
If it ain't one thing, it's another! After changing the integer, I'm trying to drag and drop with 7zip from the new apk to the old, as you described in your other thread. For resources.arsc, it works as you said, i.e. it asks if I'm sure I want to copy. But for the res folder, it doesn't ask me anything and just starts extracting into the old. I cancel it before it can complete.
Do you recall doing something different for the res folder? I could be on a different 7zip version than you, of course. I've used 7zip, but I'm not that familiar with it.
EDIT2: I don't think a notification is done if my edit gets combined with my prior post. I tried both reply and quick reply, and both ended up combining. Can someone tell me how to make it do a new post? Or maybe I'm wrong and another notification occurs, in which case, ignore this!
Click to expand...
Click to collapse
Lol it's going to take a bit to get used to everything. I actually had messed around with apktool when I first started all this and got so frustrated I just stopped trying. 6 months after that I tried again and it took me a week or so before I successfully compiled and installed a system apk. My initial goal was to use this method to try and trick a non rooted tablet into thinking it was installing an update to a system app. Though it worked on rooted devices, I could never get it to work for non rooted ones. Don't give up,keep trying and re check everything, especially make sure your PATH to the proper tools is correct. I'll look at the latest fireOS framework tomorrow.
P.S. without any further modifications, I tested APM+ Xposed module and it works too. You can add and remove all the optioions plus add different ones depending on the module. No further tweaking needed on my end.
Okay, when dragging and dropping res, it does finally ask if I really want to copy AFTER it takes quite a while "extracting". I was confusing extracting with unzipping or unpacking...or some other term that would imply it was changing the format. I'm still not sure if it's doing it properly, but I'll keep trying. And I'd still like to know how to make these combined posts cause a notification, and if not, how can I force it to.

Categories

Resources