[Q] Trouble activating sweep2wake. - HTC Droid DNA

Hey guys, gals, I recently downloaded the Viper v3.0.1 Android 4.4 Sense 5 rom, viperhttp://forum.xda-developers.com/showthread.php?t=2629211. With the Sense kernel edited by zarbov, says sweep2wake is enabled but doesnt work. Attempted to activate using Kconrol and Kernel tuner. Can anyone educate me on what is missing or give any advice. All would be appreciated!!

You need to set the start button and end button files
Sent from my HTC6435LVW using XDA Premium HD app

hey Torrented, attempted this with kernel tuner...no go. Recommended method of setting this?
.torrented said:
You need to set the start button and end button files
Sent from my HTC6435LVW using XDA Premium HD app
Click to expand...
Click to collapse

fastguy82 said:
hey Torrented, attempted this with kernel tuner...no go. Recommended method of setting this?
Click to expand...
Click to collapse
AHH! Figured it out after playing with permissions thanks

fastguy82 said:
AHH! Figured it out after playing with permissions thanks
Click to expand...
Click to collapse
Hey fastguy82 can u post your fix and does it stick after reboot? thanks

mopartonyg said:
Hey fastguy82 can u post your fix and does it stick after reboot? thanks
Click to expand...
Click to collapse
Navigate to /sys/android_touch/
Look for the sweep2wake files and edit them, I found that after you enter what you want press enter to add a second blank like to the file and then save and exit
I use root explorer and this is what I needed to do.

.torrented said:
Navigate to /sys/android_touch/
Look for the sweep2wake files and edit them, I found that after you enter what you want press enter to add a second blank like to the file and then save and exit
I use root explorer and this is what I needed to do.
Click to expand...
Click to collapse
thanks torrent still cany get settings to stick. u mean a space right after the entry?

mopartonyg said:
thanks torrent still cany get settings to stick. u mean a space right after the entry?
Click to expand...
Click to collapse
Well I somehow made it work last night, but after rebooting today. Not working again. So without "holding my hand",jk. What do I change exactly? Iam using Root Browser, I am going to permissions and editing them, correct? I have also tried using Kernel tuner to edit but this does nothing useful. All input once again is appreciated.d

fastguy82 said:
Well I somehow made it work last night, but after rebooting today. Not working again. So without "holding my hand",jk. What do I change exactly? Iam using Root Browser, I am going to permissions and editing them, correct? I have also tried using Kernel tuner to edit but this does nothing useful. All input once again is appreciated.d
Click to expand...
Click to collapse
not sure what to tell u, I have tried all different ways and still no luck

Settings do not seem to stick upon reboot, not sure why.
mopartonyg said:
thanks torrent still cany get settings to stick. u mean a space right after the entry?
Click to expand...
Click to collapse
Inside the sweep2wake file
Code:
1
<----Needs an extra blank line
Startbutton file
Code:
BACK
Endbutton file
Code:
MENU
fastguy82 said:
Well I somehow made it work last night, but after rebooting today. Not working again. So without "holding my hand",jk. What do I change exactly? Iam using Root Browser, I am going to permissions and editing them, correct? I have also tried using Kernel tuner to edit but this does nothing useful. All input once again is appreciated.d
Click to expand...
Click to collapse
No don't mess with perms, there in no need to just change the values inside the file (I recommend removing kernel tuner or just disable its SU access)

.torrented said:
Settings do not seem to stick upon reboot, not sure why.
Inside the sweep2wake file
Code:
1
<----Needs an extra blank line
Startbutton file
Code:
BACK
Endbutton file
Code:
MENU
No don't mess with perms, there in no need to just change the values inside the file (I recommend removing kernel tuner or just disable its SU access)
Click to expand...
Click to collapse
Make a init.d script to setup buttons
Sent from my HTC6500LVW using XDA Premium 4 mobile app

Zarboz said:
Make a init.d script to setup buttons
Sent from my HTC6500LVW using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Ill make some scripts later tonight when I get home from work.

.torrented said:
Settings do not seem to stick upon reboot, not sure why.
Inside the sweep2wake file
Code:
1
<----Needs an extra blank line
Startbutton file
Code:
BACK
Endbutton file
Code:
MENU
No don't mess with perms, there in no need to just change the values inside the file (I recommend removing kernel tuner or just disable its SU access)
Click to expand...
Click to collapse
I can them to work until reboot, hopefully Z will figure it out. Thanks

.torrented said:
Ill make some scripts later tonight when I get home from work.
Click to expand...
Click to collapse
you can also use cmdline.. i THINK i enabled that
you would set in cmdline
s2w_start=%value s2w_end=%value s2w=%value
and insert your values for %value

mopartonyg said:
I can them to work until reboot, hopefully Z will figure it out. Thanks
Click to expand...
Click to collapse
Considering the config files are spawned by the kernel and are rewritten upon boot ... that is why it wont stick
you can just add some edit lines to any init.d script in /system/etc/init.d/
just add
echo "WHATEVERKEY" > /sys/android_touch/sweep2wake_startbutton
echo "WHATEVERKEY" > /sys/android_touch/sweep2wake_endbutton
echo "WHATEVERSETTING" > /sys/android_touch/sweep2wake

Zarboz said:
Considering the config files are spawned by the kernel and are rewritten upon boot ... that is why it wont stick
you can just add some edit lines to any init.d script in /system/etc/init.d/
just add
echo "WHATEVERKEY" > /sys/android_touch/sweep2wake_startbutton
echo "WHATEVERKEY" > /sys/android_touch/sweep2wake_endbutton
echo "WHATEVERSETTING" > /sys/android_touch/sweep2wake
Click to expand...
Click to collapse
Yeah I know, I've done scripting for chris' kernel a while ago.

.torrented said:
Yeah I know, I've done scripting for chris' kernel a while ago.
Click to expand...
Click to collapse
since you compile source enable CMDLINE functions in defconfig
then you can use the s2w_start= s2w_end= s2w= in cmdline

Fixed the issue
Edit* Found the problem why S2W doesn't work, DT2W needs to also be enabled, I will look at the code and see if I can fide where its causing the issue.
If anybody wants this, all you will need to do is add two files to the sdcard called
torrented-s2w-start
torrented-s2w-end
inside these files add the button of choice using all caps like
1 of these: BACK MENU HOME
also this will enable S2W by default if it is not.
then flash the kernel attached, and then you should be good to go!
to debug this, there will be a file called torrented.log on the sdcard after my script executes
@Zarboz When I enabled cmdline in defconfig I got build errors in the /arch/arm/mach-msm/build-in.o
I didn't look into in a lot, but I can check it out later.
Also my 99torrented script will only execute if you are on my kernel, if you flash back to z's kernel this will no longer work! <---- the way @crpalmer's scripts work (you can only use them on his kernel)
source: https://www.github.com/torrented/Monarudo_GPU_M7
scripts:
"99torrented"
Code:
#!/system/bin/sh
(
if grep torrented /proc/version > /dev/null
then
echo "** torrented's Sweep2Wake configuration:"
for script in /system/etc/torrented/*
do
$script
done
else
echo "!! torrented's Sweep2Wake configuration not running, this isn't my kernel !!"
fi
)2>&1 | tee /sdcard/torrented.log
"sweep2wake.sh"
Code:
#!/system/bin/sh
F=/sdcard/torrented-s2w-
S2W=/sys/android_touch/sweep2wake_
echo "Enabling Sweep2Wake"
echo 1 > /sys/android_touch/sweep2wake
for which in start end
do
Fwhich=$F"$which"
if [ -r $Fwhich ]
then
s2w=`cat $Fwhich`
echo $s2w > "$S2W$which""button"
echo "Setings $S2W$which""button to $s2w"
else
echo "Leaving $S2W$which""button alone"
fi
done
This is what the log should output on success
Code:
Enabling Sweep2Wake
Setings /sys/android_touch/sweep2wake_startbutton to BACK
Setings /sys/android_touch/sweep2wake_endbutton to MENU

hi torrent, in an attempt to get this to work on my device , I flashed your kernel, and did the above steps. I kept getting an internet crash, so I reflashed your kernel, and rebooted. device soon froze and is now stuck looping on the DNA screen. Hardware keys to get into recovery are not working. i have been trying for over a half hour now. i am on viper 3.0, twrp .6 beta. phone is not recognized in adb. will pulling battery get me a reboot? or is that dangerous? any input would be appreciated. thanks
---------- Post added at 05:09 AM ---------- Previous post was at 05:06 AM ----------
.torrented said:
Fixed the issue
Edit* Found the problem why S2W doesn't work, DT2W needs to also be enabled, I will look at the code and see if I can fide where its causing the issue.
If anybody wants this, all you will need to do is add two files to the sdcard called
torrented-s2w-start
torrented-s2w-end
inside these files add the button of choice using all caps like
1 of these: BACK MENU HOME
also this will enable S2W by default if it is not.
then flash the kernel attached, and then you should be good to go!
to debug this, there will be a file called torrented.log on the sdcard after my script executes
@Zarboz When I enabled cmdline in defconfig I got build errors in the /arch/arm/mach-msm/build-in.o
I didn't look into in a lot, but I can check it out later.
Also my 99torrented script will only execute if you are on my kernel, if you flash back to z's kernel this will no longer work! <---- the way @crpalmer's scripts work (you can only use them on his kernel)
source: https://www.github.com/torrented/Monarudo_GPU_M7
scripts:
"99torrented"
Code:
#!/system/bin/sh
(
if grep torrented /proc/version > /dev/null
then
echo "** torrented's Sweep2Wake configuration:"
for script in /system/etc/torrented/*
do
$script
done
else
echo "!! torrented's Sweep2Wake configuration not running, this isn't my kernel !!"
fi
)2>&1 | tee /sdcard/torrented.log
"sweep2wake.sh"
Code:
#!/system/bin/sh
F=/sdcard/torrented-s2w-
S2W=/sys/android_touch/sweep2wake_
echo "Enabling Sweep2Wake"
echo 1 > /sys/android_touch/sweep2wake
for which in start end
do
Fwhich=$F"$which"
if [ -r $Fwhich ]
then
s2w=`cat $Fwhich`
echo $s2w > "$S2W$which""button"
echo "Setings $S2W$which""button to $s2w"
else
echo "Leaving $S2W$which""button alone"
fi
done
This is what the log should output on success
Code:
Enabling Sweep2Wake
Setings /sys/android_touch/sweep2wake_startbutton to BACK
Setings /sys/android_touch/sweep2wake_endbutton to MENU
Click to expand...
Click to collapse
hi torrent, in an attempt to get this to work on my device , I flashed your kernel, and did the above steps. I kept getting an internet crash, so I reflashed your kernel, and rebooted. device soon froze and is now stuck looping on the DNA screen. Hardware keys to get into recovery are not working. i have been trying for over a half hour now. i am on viper 3.0, twrp .6 beta. phone is not recognized in adb. will pulling battery get me a reboot? or is that dangerous? any input would be appreciated. thanks

findinghomer said:
hi torrent, in an attempt to get this to work on my device , I flashed your kernel, and did the above steps. I kept getting an internet crash, so I reflashed your kernel, and rebooted. device soon froze and is now stuck looping on the DNA screen. Hardware keys to get into recovery are not working. i have been trying for over a half hour now. i am on viper 3.0, twrp .6 beta. phone is not recognized in adb. will pulling battery get me a reboot? or is that dangerous? any input would be appreciated. thanks
---------- Post added at 05:09 AM ---------- Previous post was at 05:06 AM ----------
hi torrent, in an attempt to get this to work on my device , I flashed your kernel, and did the above steps. I kept getting an internet crash, so I reflashed your kernel, and rebooted. device soon froze and is now stuck looping on the DNA screen. Hardware keys to get into recovery are not working. i have been trying for over a half hour now. i am on viper 3.0, twrp .6 beta. phone is not recognized in adb. will pulling battery get me a reboot? or is that dangerous? any input would be appreciated. thanks
Click to expand...
Click to collapse
So holding down the power button and vol down button isnt working? <- this usually 99% will work if not
try this
plug in the device to the pc and run
Code:
adb wait-for-device reboot recovery
either restore the stock viper boot.img or grab this kernel http://www.androidfilehost.com/?fid=23329332407576625
I personally don't recommend opening the device to disconnect the battery, unless you really know what you are doing because the internals are very sensitive.

Related

[Q] [Request] Charging/Accessory Overide

pokey9000 found in the kernel, drivers/accessory/30pin_con.c:
if (acc_adc != false) {
if ((2600 < acc_adc) && (2800 > acc_adc)) {
env_ptr = "ACCESSORY=OTG";
acc->current_accessory = ACCESSORY_OTG;
Which he used to figure out what was needed to put the unit into Host mode and through his help and testing I figured out that you needed a 3:1 split on the power to get the unit to think it was charging from an OEM charger.
Is it possible to change the above code and whatever the other code is that senses power on the data lines so that we can force the tablet into whatever mode we want?
I don't have the proper setup to code myself so I hope there might be a Dev out there up for the challenge.
This works, it not only allows usb charging from a computer/laptop, but it enables it to be charged from any (In my case my Kindle's wall plug.) wall plug.
Hope that helps!
FillTheVoid said:
I am having trouble with command
adb shell
echo 1 > /sys/class/power_supply/battery/force_usb_charging
Works fine from my Laptop, but when in a terminal on the tab I get
adb shell
error: device not found
I did give the terminal su permission. Anything special I have to do when running this script from the tab itself. I would like to be able to do this "on the go" since it is not persistent after reboot. Thanks.
Click to expand...
Click to collapse
Mullicious said:
You can make it persistent, slap it in a bog standard text editor, then by using script manager, create it as a script to run as root and at boot. Confirmed it to work myself, very handy.
Sent from my GT-P7510 using xda premium
Click to expand...
Click to collapse
Edit:
I see this doesn't answer your question, I'm sorry; misread.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums and Read THIS
Moving to Q&A
Could someone put this into a package or give detailed instructions for a noob like me to get this running? I really hate that the Tab doesnt just recognize car usb power like my galaxy phone does...Thanks!
Mullicious said:
This works, it not only allows usb charging from a computer/laptop, but it enables it to be charged from any (In my case my Kindle's wall plug.) wall plug.
Hope that helps!
Edit:
I see this doesn't answer your question, I'm sorry; misread.
Click to expand...
Click to collapse
D you mean this command works:
adb shell
echo 1 > /sys/class/power_supply/battery/force_usb_charging
Did you get it to work from terminal eventually?
Can you share the script you created please?
Szadzik said:
D you mean this command works:
adb shell
echo 1 > /sys/class/power_supply/battery/force_usb_charging
Did you get it to work from terminal eventually?
Can you share the script you created please?
Click to expand...
Click to collapse
This shell command works if you are running pershoot's kernel, it is not persistent after reboot though. This doesnt bother me cause if I really need to charge it in the car I just open a terminal emulator and type in in. Takes 30 sec.
FillTheVoid said:
This shell command works if you are running pershoot's kernel, it is not persistent after reboot though. This doesnt bother me cause if I really need to charge it in the car I just open a terminal emulator and type in in. Takes 30 sec.
Click to expand...
Click to collapse
SO it does not work on stock kernel?
Szadzik said:
SO it does not work on stock kernel?
Click to expand...
Click to collapse
That is correct. Pershoot built it into his kernel.
FillTheVoid said:
That is correct. Pershoot built it into his kernel.
Click to expand...
Click to collapse
Any idea if Pershoot's kernel is available for P7500?
Szadzik said:
Any idea if Pershoot's kernel is available for P7500?
Click to expand...
Click to collapse
It is available. That's the 3G model right?
FillTheVoid said:
It is available. That's the 3G model right?
Click to expand...
Click to collapse
Yes, it is 3G. I have to look for the right thread. LEt me know if you have any pointers.
Szadzik said:
Yes, it is 3G. I have to look for the right thread. LEt me know if you have any pointers.
Click to expand...
Click to collapse
See forum.xda-developers.com/showthread.php?t=1138167

[Q] Vibrator - disable TOTALLY

Hello friends! I really hate the vibrator function (yes, I love a quiet phone) and I will be very happy if someone know a way to totally disable the vibrator (well, let me explain, I don't want to open the phone and disconnect it...)
Each app can be configured individualy to vibrate or not (I know) and sound options lets you configure the vibration when the phone rings, but is very annoying to do it for each application, even when you have a lot of apps (it's my case)
I was googling for a module, a build.prop line, delete a file... no sucess...
Do you guys know a way to totally disable vibration?
Regards and merry Xmas
Havent tried myself, but you could delete the vibrator module so the kernel doesnt load it.
The module is located on /lib/modules/vibrator.ko
You should make a backup else where (just in case) and try to power the phone with it deleted to see if it all loads correctly and the vibrator should be disabled.
AzureusPT said:
Havent tried myself, but you could delete the vibrator module so the kernel doesnt load it.
The module is located on /lib/modules/vibrator.ko
You should make a backup else where (just in case) and try to power the phone with it deleted to see if it all loads correctly and the vibrator should be disabled.
Click to expand...
Click to collapse
Thanks for your reply, but unfortunatelly this doesn't work, I tried it and the module recreates itself when phone is restarted. I also tried to unload it with a init.d script, using the command rmmod -f vibrator, but no sucess...
Checking the init.rc file I have the following line:
Code:
#ko files for vibrator
insmod /lib/modules/vibrator.ko
Have you tried commenting that line?
The init.rc file is located on the root / of the phone.
AzureusPT said:
Checking the init.rc file I have the following line:
Code:
#ko files for vibrator
insmod /lib/modules/vibrator.ko
Have you tried commenting that line?
The init.rc file is located on the root / of the phone.
Click to expand...
Click to collapse
I tried it, but init.rc also recreates itself on every boot... I'm using SpeedMod K2-18 kernel, anyway to parse kernel parameters to disable vibrator module? Now, disable vibrator is a question of honor...
dani_mola said:
I tried it, but init.rc also recreates itself on every boot... I'm using SpeedMod K2-18 kernel, anyway to parse kernel parameters to disable vibrator module? Now, disable vibrator is a question of honor...
Click to expand...
Click to collapse
Use the leaked ICS builds as they do not have proper kernel support for the vibrator

[WIDGET][SCRIPT][ROOT] Force USB Charging toggle script

Here is a small script that toggle force usb charging option from pershoot kernel :
Code:
#!/system/bin/sh
export STATE=`cat /sys/class/power_supply/battery/force_usb_charging`
if [ $STATE == 0 ]
then echo 1 > /sys/class/power_supply/battery/force_usb_charging
echo "Enable USB Charging"
else echo 0 > /sys/class/power_supply/battery/force_usb_charging
echo "Disable USB Charging"
fi
It needs root permission and a suitable kernel such as pershoot's.
PS: first step in the XDA community
It will be nice if you could explain how to use this script (one of the several ways).
Sorry to forgot the documentation part, here it is :
It can be used with any terminal apps with root access, just copy the content into a file (toggle_usb.sh for instance) and launch it in root terminal with :
Code:
sh toggle_usb.sh
A more user friendly way is to use Script Manager with SMWidget to add it on your homescreen. I use it this way so I could disable charging when the tab is plugged only for a file transfert.
Will this work on other devices? Like say the acer a100 or acer a500. Considering getting one of those but don't like that neither will charge usb.
If this only works for galaxy tab, how come? Just curious why force usb works on galaxy tab and not other devices.
It might work on other devices if the charging chipp support it and if the kernel has driver for. For the Galaxy Tab,The stock kernel and many others shipped with custom rom don't allow usb charging.
If supported by your hardware the script should work, it only use standard script and kernel related configuration.
EDIT:
The Acer a100 et a500 have a dedicated charger wich deliver 12V which is far more than a USB port can deliver (5V), I seriously doubt they put a dc-dc converter to connect the usbport to the charging chip.
Envoyé depuis mon GT-P7500 avec Tapatalk
Widget Apps
Hello,
I've tried to make it more user friendly, so I created a small widget apps using my previous script. It's my first real apps for Android, it still has some flaws.
Known Issues :
when adding the widget the file is at unknown state, need to hit the refresh button
Design is perfectible especially icons...
I would like to thanks the authors of the android-widget-development-tutorials availlable on google code.
not on tab 3
ebolalex said:
Here is a small script that toggle force usb charging option from pershoot kernel :
Code:
#!/system/bin/sh
export STATE=`cat /sys/class/power_supply/battery/force_usb_charging`
if [ $STATE == 0 ]
then echo 1 > /sys/class/power_supply/battery/force_usb_charging
echo "Enable USB Charging"
else echo 0 > /sys/class/power_supply/battery/force_usb_charging
echo "Disable USB Charging"
fi
It needs root permission and a suitable kernel such as pershoot's.
PS: first step in the
Well so far as I can see the folder called battery here apears as a file that is un openable to root explorer, the terminal will go in but there is no editing allowance as the files are locked, command chmod return a bad mode eror, since force_usb_charging does not exist I thought np ill creat on... long story short I made a file by that name in storage then used cp to copy that file to the destination mentioned (after chmod the sys class power_supply to write for all, ) battery would not as I mention take such command. All in all I still have not created the file force_usb_charging with a 1 as cat. So question........ how can I create the file in the directory. I am rooted, all my work in terminal has been su, I see the # show me as rooted, and I can alter the permissions. (Ps sorry dude with svsfsswitch.apk did absolutly nothing as the file did not exist, nor did the script above) is the smt 210r that different from othet machines? Lol retorical q, sorry . Tyvm for the help in advance. With time ill learn this linux /android stuff out.... summery how to creat a file in the sys/class/power_supply/battery called force_usb_charging containing the number 1.....
Click to expand...
Click to collapse
grummbunger said:
ebolalex said:
Here is a small script that toggle force usb charging option from pershoot kernel :
Code:
#!/system/bin/sh
export STATE=`cat /sys/class/power_supply/battery/force_usb_charging`
if [ $STATE == 0 ]
then echo 1 > /sys/class/power_supply/battery/force_usb_charging
echo "Enable USB Charging"
else echo 0 > /sys/class/power_supply/battery/force_usb_charging
echo "Disable USB Charging"
fi
It needs root permission and a suitable kernel such as pershoot's.
PS: first step in the
Well so far as I can see the folder called battery here apears as a file that is un openable to root explorer, the terminal will go in but there is no editing allowance as the files are locked, command chmod return a bad mode eror, since force_usb_charging does not exist I thought np ill creat on... long story short I made a file by that name in storage then used cp to copy that file to the destination mentioned (after chmod the sys class power_supply to write for all, ) battery would not as I mention take such command. All in all I still have not created the file force_usb_charging with a 1 as cat. So question........ how can I create the file in the directory. I am rooted, all my work in terminal has been su, I see the # show me as rooted, and I can alter the permissions. (Ps sorry dude with svsfsswitch.apk did absolutly nothing as the file did not exist, nor did the script above) is the smt 210r that different from othet machines? Lol retorical q, sorry . Tyvm for the help in advance. With time ill learn this linux /android stuff out.... summery how to creat a file in the sys/class/power_supply/battery called force_usb_charging containing the number 1.....
Click to expand...
Click to collapse
Hi grummbunger,
The /sys folder is a special filesystem handled by the linux kernel itself (by the means of its drivers), it provide information and control on peripheral. So If you do not have a specific fil in your /sys you could not create it. My Script was intended to work with Pershoot kernel, if you do not use it, the driver may not be loaded or might use a different file.
I would asked you which ROM and Kernel you are using to test it, but unfortunately i don't have access to a galaxy tab anymore...
Could you post me the list of file availlable in your battery folder ?
Welcome in the community, I hope you'll find the way to hack into your device to suit your needs
Click to expand...
Click to collapse
samsung usb charge enabling
ebolalex said:
grummbunger said:
Hi grummbunger,
The /sys folder is a special filesystem handled by the linux kernel itself (by the means of its drivers), it provide information and control on peripheral. So If you do not have a specific fil in your /sys you could not create it. My Script was intended to work with Pershoot kernel, if you do not use it, the driver may not be loaded or might use a different file.
I would asked you which ROM and Kernel you are using to test it, but unfortunately i don't have access to a galaxy tab anymore...
Could you post me the list of file availlable in your battery folder ?
Welcome in the community, I hope you'll find the way to hack into your device to suit your needs
Click to expand...
Click to collapse
android version 4.1.2 (could not find a pershoot rom to run on a 7 inch samsung tab3, and before flashing at all i wanna make sure that the setting can't be applied without flashing as that is really a last resort.) but i am totally ok with flashing if it is nessesary. i have rockettab ready to go, but have no idea if that would help at all with this situation.
kernel 3.4.5-1304745-user
found that the link "battery" goes to sys/devices/platform/sec-battery/power_supply/battery there are many files there that report status of power and such i found, some of the files names are like:
batt_charging_source batt_lp_charging Charge_now charge_type soip_activated soip_level status talk_gsm wc_enable wc_status. etc...
tyvm for your interest in helping my problem!
Click to expand...
Click to collapse
grummbunger said:
ebolalex said:
android version 4.1.2 (could not find a pershoot rom to run on a 7 inch samsung tab3, and before flashing at all i wanna make sure that the setting can't be applied without flashing as that is really a last resort.) but i am totally ok with flashing if it is nessesary. i have rockettab ready to go, but have no idea if that would help at all with this situation.
kernel 3.4.5-1304745-user
found that the link "battery" goes to sys/devices/platform/sec-battery/power_supply/battery there are many files there that report status of power and such i found, some of the files names are like:
batt_charging_source batt_lp_charging Charge_now charge_type soip_activated soip_level status talk_gsm wc_enable wc_status. etc...
tyvm for your interest in helping my problem!
Click to expand...
Click to collapse
In fact the kernel you need to install must support charging from any sources. It should be specified in the kernel feature list. Stock kernel won't let you do this or it would work out of the box.
Be aware that your Usb port must provide enough power to charge your device.
You're welcome.
Click to expand...
Click to collapse
ebolalex said:
grummbunger said:
In fact the kernel you need to install must support charging from any sources. It should be specified in the kernel feature list. Stock kernel won't let you do this or it would work out of the box.
Be aware that your Usb port must provide enough power to charge your device.
You're welcome.
Click to expand...
Click to collapse
Well it is a dell usb with power share at 1.2 a a wall charger is 2, the battery is 4000ma, I digress though I have in fact found the battery lasts for well over the time I need so I am all good. Thanks again for the responce!
Click to expand...
Click to collapse
If your kernel supports init.d scripts you can save script to /system/etc/init.d and it will be automatically launched on device boot. You have to delete extension from script name and prefix is number from 00 to 99
Hi,
Any way to get this working on kitkat rom (carbon kk)?
Phone is photon q, in the original sprint rom burried under hidden menu's the is a app to do it, so it must be possible in some way....any ideas?
Thanks!

[KERNEL] [GPL] [N5] [DT2W/S2W] franco.Kernel - r57 [4.4.4] [Phantom]

Hey guys, this is just a version of @franciscofranco's kernel built with DoubleTap2Wake and Sweep2Wake from Bricked Kernel merged in.
(By downloading and installing the kernel you assume all responsibility for any damage to your device, but I don't post images with the intention of this occurrence and test them to the best of my abilities.)
Download:
r57
boot image - https://sundergaming.com/downloads/hammerhead/franco.Kernel/boot-franco.Kernel-r57-dt2w.img
md5 - 9ba11b4c3f5cd963c69d54bbfd919fe1
zip - https://sundergaming.com/downloads/hammerhead/franco.Kernel/zips/boot-franco.Kernel-r57-dt2w.zip
*Color tweak is integrated since r30, check 2nd post for information on how to enable.
Want a dedicated build for color tweaks because your boot animation isn't pretty enough? Build it yourself. Sources below.
**Test builds posted throughout the thread.
Kernel is for 4.4.1/2 since r19
Installation:
fastboot flash boot boot_name_img
or
flash the .zip in recovery
Sources
Kernel - https://github.com/PhantomGamers/hammerhead
Ramdisk - https://github.com/PhantomGamers/ramdisk_hammerhead
Credits
@franciscofranco for his kernel - http://forum.xda-developers.com/showthread.php?t=2508284
@show-p1984 for the dt2w and s2w additions - http://forum.xda-developers.com/showthread.php?t=2524557
@flar2 for his on-the-fly color tweak, power key touch to wake suspend, and other general dt2w improvements. - http://forum.xda-developers.com/showthread.php?t=2519607
I do accept and appreciate any donations but I urge you to first donate to the amazing developers listed above for their work because my contributions are minimal and without them this kernel variant would not exist.
Franco's original thread for reference only:
franciscofranco said:
Hi all.
Currently does not work with recent CyanogenMod nightlies or any rom has uses CM sources as a base because they made underlying changes that are now incompatible with Kernels that don't follow their path.
Installation:
fastboot flash boot boot_name_img
or
flash the .zip in the recovery
Changelog:
http://kernels.franco-lnx.net/Nexus5/4.4/appfiles/changelog.xml
franco.Kernel updater Free apk: http://forum.xda-developers.com/showthread.php?t=1867127
Nexus Display Control Free apk: http://forum.xda-developers.com/showthread.php?t=2424467
Got any questions that you couldn't find after searching?
FAQ: http://forum.xda-developers.com/showthread.php?t=2532422
Disclaimer to moderators:
Slight OT is fine, but when users decide to act stupid they should be dealt with with the appropriate means - its really annoying for me when OT turns crazy. Please put the warning/ban hammer anytime any of you think there's lack of respect and/or too much unwanted OT crap - but if it doesn't meet this criteria let the OT posts alone. Thank you.
Cheers!
Click to expand...
Click to collapse
XDA:DevDB Information
franco.Kernel+DT2W/S2W, a Kernel for the Google Nexus 5
Contributors
PhantomGamers, franciscofranco, show-p1984, flar2
Kernel Special Features:
Version Information
Status: Stable
Created 2014-02-06
Last Updated 2014-02-06
Kernel Settings
Disabled by default. To enable execute the code next to terminal in adb shell or terminal emulator as root.
If you wish for it to be automatically enabled on boot you can create the file named in the boot section.
After creating this file you can still execute the terminal code to enable it immediately or you can just reboot and have the kernel enable it for you.
[DT2W/S2W]
S2W
terminal -
Code:
echo 1 > /sys/android_touch/sweep2wake
boot - Create /sdcard/fkSettings/fks2w
DT2W
terminal -
Code:
echo 1 > /sys/android_touch/doubletap2wake
boot - Create /sdcard/fkSettings/fkdt2w
Bottom Half Screen DT2W (Only allows you to double tap bottom half to turn screen on, instead of above.)
terminal -
Code:
echo 2 > /sys/android_touch/doubletap2wake
boot - Create /sdcard/fkSettings/fkdt2wps
S2Sleep
terminal -
Code:
echo 1 > /sys/android_touch/s2w_s2s
boot - Create /sdcard/fkSettings/fks2s
PWRKEY_SUSPEND (Turns off touch to wake when display is turned off with power button, reenables when turned on, useful for long idle periods, unaffected by sweep to sleep)
terminal -
Code:
echo 1 > /sys/module/qpnp_power_on/parameters/pwrkey_suspend
boot - Create /sdcard/fkSettings/fkpwrks
Touch Wake Timeout
terminal -
Code:
echo 15 > /sys/android_touch/wake_timeout
(15 is an example, include the number of minutes you prefer)
boot - Create /sdcard/fkSettings/fkwt with number of minutes to delay timeout (IE: text file with "15" inside)
[COLOR]
*This tweak is experimental and you use it at your own risk.
**Breaks gamma calibration apps.
terminal -
Code:
echo 1 > /sys/module/mdss_dsi/parameters/color_preset
boot - Create /sdcard/fkSettings/fkcolor
[WIDGETS]
*Thanks to @JsChiSurf
http://forum.xda-developers.com/showthread.php?t=2626476
[App]
*Thanks to @casperpas
http://forum.xda-developers.com/showpost.php?p=51682981&postcount=839
just giving my 2 cents, franco's kernel intention is to deliver a stable, optimized and battery efficient kernel for the n5, by baking in these S2W/DT2W features into the kernel, aren't you defeating the purpose? If I would want those features built in, I could have flashed Elementalx, Bricked etc. No offense but that's what occur to me, to others, it may be godsend. :good:
kashix said:
just giving my 2 cents, franco's kernel intention is to deliver a stable, optimized and battery efficient kernel for the n5, by baking in these S2W/DT2W features into the kernel, aren't you defeating the purpose? If I would want those features built in, I could have flashed Elementalx, Bricked etc. No offense but that's what occur to me, to others, it may be godsend. :good:
Click to expand...
Click to collapse
Elementalx and Bricked don't have Franco's custom hotplug driver, personally that's the main selling point of his kernel to me.
I don't particularly care for these features anyway though and just used this as a learning experience to build kernels.
(I am currently running this build though to play around with it, haven't noticed a huge difference in battery life myself)
I am used to flashing zips, I guess I am not advanced enough to flash img files. Can I get more detailed instructions on how to flash this?
This is very tempting to try out.
Thank you!
---------- Post added at 07:57 PM ---------- Previous post was at 07:57 PM ----------
durhamite said:
I am used to flashing zips, I guess I am not advanced enough to flash img files. Can I get more detailed instructions on how to flash this?
Click to expand...
Click to collapse
Flashify seems like it'd do the trick, if original Franco kernels are any indication.
Well, I tried it, and it works!
Thanks OP!
Tip: if u have FKU, put the img in the franco.kernel_updater bkp folder and restore if it were bkp. Most easy!
Sent from N5
durhamite said:
I am used to flashing zips, I guess I am not advanced enough to flash img files. Can I get more detailed instructions on how to flash this?
Click to expand...
Click to collapse
Yeah Flashify seems like your best bet if you're rooted.
I might try and include zip releases in the future, sorry for the inconvenience.
grumphy said:
Well, I tried it, and it works!
Thanks OP!
Tip: if u have FKU, put the img in the franco.kernel_updater bkp folder and restore if it were bkp. Most easy!
Sent from N5
Click to expand...
Click to collapse
Thanks for the confirmation!
Thanks for doing this. Will you be updateing this to keep up with Franco's releases, or was this a one time experiment?
Nastybutler said:
Thanks for doing this. Will you be updateing this to keep up with Franco's releases, or was this a one time experiment?
Click to expand...
Click to collapse
Yeah that's my plan, I'll most likely keep this going until franco includes his own DT2W feature or unless I run into some technically difficulty.
Welp. I'm having trouble getting the dt2w working. Here's what I'm entering in terminal emulator (after "su" of course) without the quotation marks: "echo 1> /sys/android_touch/doubletap2wake"
Nothing happens in the terminal after I hit enter, it just goes to a new command line, and if I turn the screen off it won't wake back up with a double tap. Did I enter the command in wrong?
Nastybutler said:
Welp. I'm having trouble getting the dt2w working. Here's what I'm entering in terminal emulator (after "su" of course) without the quotation marks: "echo 1> /sys/android_touch/doubletap2wake"
Nothing happens in the terminal after I hit enter, it just goes to a new command line, and if I turn the screen off it won't wake back up with a double tap. Did I enter the command in wrong?
Click to expand...
Click to collapse
The space between the 1 and the > is essential.
PhantomGamers said:
The space between the 1 and the > is essential.
Click to expand...
Click to collapse
Eureka! That was my problem. Thanks! Works a treat.
Gonna give this a whirl
edit: works great thanks so much! for subsequent kernels you release, will one have to put in that command every time?
Also so glad you carried over francos screen calibration too! you rule! And so glad you'll be supporting until (if) franco implements it.
What are you guys doing to put the device to sleep without hitting that button? I'd like to do without it all together
tyrellcorpnexus said:
edit: works great thanks so much! for subsequent kernels you release, will one have to put in that command every time?
Click to expand...
Click to collapse
Currently you need to do it every time you reboot but you can put a file in /etc/init.d to do it automatically.
tyrellcorpnexus said:
Also so glad you carried over francos screen calibration too! you rule!
Click to expand...
Click to collapse
Yeah it's essentially a straight franco build so anything he implements will be included as long as he pushes it to github
tyrellcorpnexus said:
What are you guys doing to put the device to sleep without hitting that button? I'd like to do without it all together
Click to expand...
Click to collapse
This isn't currently a feature of the kernel but I do agree that doubletap2screenoff and sweep2screenoff would be really neat.
I'm going to TRY to implement this myself but I wouldn't hold my breath because I'm not really experienced with this level of coding.
PhantomGamers said:
Currently you need to do it every time you reboot but you can put a file in /etc/init.d to do it automatically.
Yeah it's essentially a straight franco build so anything he implements will be included as long as he pushes it to github
This isn't currently a feature of the kernel but I do agree that doubletap2screenoff and sweep2screenoff would be really neat.
I'm going to TRY to implement this myself but I wouldn't hold my breath because I'm not really experienced with this level of coding.
Click to expand...
Click to collapse
I see I see. Thanks again! Hitting that button one time to go to sleep is better than waking every time as well that is for sure!
I'm used to putting my device to sleep with a gesture on Activator with my JB'en iPhone 5. But I still have to wake it using home or lock button so I guess its still needed on that as well..
I don't think double tap to sleep would be the best, what about when getting text to fit the screen on Chrome and such? Double tap is a relatively common gesture once the device is awake.
Also, any way you can walk me through how to make sure it automatically kicks in on a reboot?
This is too good
tyrellcorpnexus said:
What are you guys doing to put the device to sleep without hitting that button? I'd like to do without it all together
Click to expand...
Click to collapse
I have the LMT Pie controls and one of buttons on my second row is a key that turns the screen off. So now, in theory, I'll hardly ever have to use the power button. :good:
---------- Post added at 11:47 AM ---------- Previous post was at 11:40 AM ----------
PhantomGamers said:
Currently you need to do it every time you reboot but you can put a file in /etc/init.d to do it automatically.
Click to expand...
Click to collapse
Would you be kind enough to walk noobs like me through how to set up that file? Right now I've got a note saved with the command that I copy & paste into the terminal each time now, but I can tell that's going to get old pretty quick.
Nastybutler said:
I have the LMT Pie controls and one of buttons on my second row is a key that turns the screen off. So now, in theory, I'll hardly ever have to use the power button. :good:
Click to expand...
Click to collapse
Do you have a link to the APK and maybe a screenshot of what it looks like? I'd only be interested in this toggle.
tyrellcorpnexus said:
I don't think double tap to sleep would be the best, what about when getting text to fit the screen on Chrome and such? Double tap is a relatively common gesture once the device is awake.
Click to expand...
Click to collapse
I meant like the G2 does it, where it's only when you double tap on the notification or nav bar in certain apps etc
tyrellcorpnexus said:
Also, any way you can walk me through how to make sure it automatically kicks in on a reboot?
Click to expand...
Click to collapse
Nastybutler said:
Would you be kind enough to walk noobs like me through how to set up that file? Right now I've got a note saved with the command that I copy & paste into the terminal each time now, but I can tell that's going to get old pretty quick.
Click to expand...
Click to collapse
Trying to figure this out now, it would appear that the kernel doesn't actually have init.d support as my script isn't working... maybe I'm doing something wrong here.
PhantomGamers said:
I meant like the G2 does it, where it's only when you double tap on the notification or nav bar in certain apps etc
Trying to figure this out now, it would appear that the kernel doesn't actually have init.d support as my script isn't working... maybe I'm doing something wrong here.
Click to expand...
Click to collapse
Ah, in that case, that'd be awesome!
No worries, appreciate your work thus far.
This is so great :highfive:

How to shut down permantly one core on Android phone programatically

Good Afternoon.
I working on an Android application, but I'm stuck on a problem now. I want to shut down permantly one (or more) of the four CPU cores of my android device. I found a way through ADB but none through Java.:crying:
Can anyone help me out?
Thanks in advance!
GiorgosKanellis said:
Good Afternoon.
I working on an Android application, but I'm stuck on a problem now. I want to shut down permantly one (or more) of the four CPU cores of my android device. I found a way through ADB but none through Java.:crying:
Can anyone help me out?
Thanks in advance!
Click to expand...
Click to collapse
What's the ADB command to do that? There should be a way to integrate some shell commands into java code.
Well I want this ADB piece of code into java in some way.
adb root
adb stop mpdecision
adb shell
echo "0" > /sys/devices/system/cpu/cpu1/online
echo "0" > /sys/devices/system/cpu/cpu2/online
echo "0" > /sys/devices/system/cpu/cpu3/online
Click to expand...
Click to collapse
GiorgosKanellis said:
Well I want this ADB piece of code into java in some way.
Click to expand...
Click to collapse
Hi, can you turn off cpu cores permanently..since boot?. Or when reboot phone it get back load all cores? Thank you
Try using app kernel auditor mod I think it can do what you want
Sent from my iPhone 4s using Tapatalk I also own a g900v
[email protected] said:
Try using app kernel auditor mod I think it can do what you want
Sent from my iPhone 4s using Tapatalk I also own a g900v
Click to expand...
Click to collapse
Thank you, but kernel adiutor or another kernel manager don`t apply changes since early boot (early init). It apply changes once the phone loads the rom and enters on launcher
I need modify kernel image boot.img or something similar
There is boot img which holds
Kernel img ram disk and one other img I can't remember the name of
A custom kernel may be required
Sent from my iPhone 4s using Tapatalk I also own a g900v

Categories

Resources