Trusted Unlock - Nexus 5 Themes and Apps

One of the things that I liked about the Moto X was the trusted unlock feature when connected to specific Bluetooth devices. As this isn't present outside of the Moto X I decided to write something similar.
What this app does is allow you to define specific Bluetooth devices that are trusted. When a connection to one of those devices is found it will modify the security database to set the lock screen to none as well as back up the key file and salt (for restoration). When the connection is lost or the notification tapped the lock screen will be restored (database settings restored to their original values, key file replaced and salt set properly).
Requirements:
Rooted device
sqlite3 binary in path (need sqlite3 binary to modify the security database)
I've used it on the Nexus 4, Galaxy Nexus and Nexus 5 and it seems to work just fine for AOSP devices running ICS, JB or KitKat.
If it's something anyone else would be interested in I can throw up an APK, the sqlite binary, and shove the code up on Github. Screenshots attached.
Edit: Signed APK attached. sqlite3 binary is in the assets folder of the project in the repo.
Code: https://github.com/krohnjw/TrustedUnlock
Copy the sqlite3 binary into a bin/xbin/sbin dir in your patch and chmod appropriately (755 for example)
DISCLAIMER: This is using root access to modify your security database and move / restore the keyfiles. This could break your lock screen entirely.

There is an app called Delayed Lock out there that does this, though its not free. You can also setup a timer for it before it requires unlocking.

I'm interested in this. I can see it being very useful with my bluetooth headphones.
Sent from my Galaxy Nexus using Tapatalk

krohnjw said:
One of the things that I liked about the Moto X was the trusted unlock feature when connected to specific Bluetooth devices. As this isn't present outside of the Moto X I decided to write something similar.
What this app does is allow you to define specific Bluetooth devices that are trusted. When a connection to one of those devices is found it will modify the security database to set the lock screen to none as well as back up the key file and salt (for restoration). When the connection is lost or the notification tapped the lock screen will be restored (database settings restored to their original values, key file replaced and salt set properly).
Requirements:
Rooted device
sqlite3 binary in path (need sqlite3 binary to modify the security database)
I've used it on the Nexus 4, Galaxy Nexus and Nexus 5 and it seems to work just fine for AOSP devices running ICS, JB or KitKat.
If it's something anyone else would be interested in I can throw up an APK, the sqlite binary, and shove the code up on Github. Screenshots attached.
Click to expand...
Click to collapse
YES please!

RichieRich84 said:
YES please!
Click to expand...
Click to collapse
See OP

Wifi
Are you able to set it up to work the same with wifi networks too?

Works well
Tried this last night. Works perfectly. I was using Tasker to accomplish the same thing. Nice job.
Adding WiFi would be welcome for me.
B

I like to use Llama. You have many functions I. It, including turning off lock screen when connected to whatever you want, WiFi, Bluetooth etc.
Sent from my Nexus 5 using xda app-developers app

Also try advanced keyboard manager, does it for wifi and Bluetooth.

Can you help me with the SQLITE3 part? I have no clue what to do.
bwagner said:
Tried this last night. Works perfectly. I was using Tasker to accomplish the same thing. Nice job.
Adding WiFi would be welcome for me.
B
Click to expand...
Click to collapse

benzyne said:
Can you help me with the SQLITE3 part? I have no clue what to do.
Click to expand...
Click to collapse
Code:
Have root
Put sqlite binary on the sd card
adb shell
su
mount -o remount,rw /system
cat /sdcard/sqlite3 > /system/xbin/sqlite3
chmod 755 /system/xbin/sqlite3
mount -o remount,ro /system

You can do this with tasker and secure settings including using certain WiFi connections to enable or disable security
Sent from my Nexus 5 using XDA Premium 4 mobile app

Related

[SCRIPT] Adblock Script and Updater

I put together a small shell script to make it easy for anyone rooted to block ads and check to see if they have the latest version I keep of adhosts. If after checking you do not have the latest, it will download it for you automatically.
What does this script do (in a nutshell):
1) Checks to see if you have the latest version of ad hosts for adblocking from me
2) If you do not have the latest, it will download it for you
3) If you have the latest, it just exits out, no changes
4) Installs the script to your /system/xbin directory so the next time you just have to type:
Code:
su
blockads
and it will run the script for you
How to run this?
Get this if you are using an AOSP ROM:
1) Download it from http://dl.dropbox.com/u/24904191/blockads
Try this if you are using a SENSE ROM (thanks chrootz for the fixes):
1) http://dl.dropbox.com/u/24904191/sense/blockads
*** If you have troubles getting the script to work, try updating your system to the latest version of busybox (stick it in /system/xbin and overwrite the current version of busybox, then change the permissions to 755 and owner and group to root) ***
2) Move it to /data/local/tmp (if you dont have it, create it) from a file explorer with root permissions (must set the system in r/w mode) or from the terminal shell
3) make sure the script has the right permissions by typing:
Code:
su
chmod 755 /data/local/tmp/blockads
in the terminal shell (in the emulator or whatever you use to get to it)
4) run the script by typing
Code:
/data/local/tmp/blockads
5) let it do its thing
After its done you can run it again anytime from the terminal by typing
Code:
su
blockads
as already mentioned.
I'm working on making it a GUI app next (with more features), but this should tie anyone who wants it over until then
Anyone who finds any adservers and wants me to add them to the list, feel free to list them here and I will add them.
Latest updates:
2011-12-01: Updated to block carrieriq
Tried this out and got this:
sh-3.2# su
sh-3.2# /data/local/tmp/blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
update could not be completed, sorry
sh-3.2#
newter55 said:
Tried this out and got this:
sh-3.2# su
sh-3.2# /data/local/tmp/blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
update could not be completed, sorry
sh-3.2#
Click to expand...
Click to collapse
I forgot some ROMs and such have a busybox version that doesn't work right with hostnames in wget. I'll see if I can work around that and update the script
EDIT: updated to work around by using the IP for those that their busybox wget does not work correctly with hostnames. Only issue with that is the IP may change.
Ok. I am stuck. I actually don't have a hosts file under "etc", only a hosts.bak. With root explorer mounted as r/w I am still not able to rename the "host.bak" file to "hosts" - error message "read-only file/directory". I created a blank "hosts" text file, put in on the sdcard and with terminal emulator still can't cp to "etc" because of "read-only directory" error message. Any other suggestions?
GermanGuy said:
Ok. I am stuck. I actually don't have a hosts file under "etc", only a hosts.bak. With root explorer mounted as r/w I am still not able to rename the "host.bak" file to "hosts" - error message "read-only file/directory". I created a blank "hosts" text file, put in on the sdcard and with terminal emulator still can't cp to "etc" because of "read-only directory" error message. Any other suggestions?
Click to expand...
Click to collapse
Top right corner of Root Explorer .... Mount RW.
Sent from my A05PTH3ORY using XDA App
Does this do anything differently then AdFree, from the market?
yareally said:
I forgot some ROMs and such have a busybox version that doesn't work right with hostnames in wget. I'll see if I can work around that and update the script
EDIT: updated to work around by using the IP for those that their busybox wget does not work correctly with hostnames. Only issue with that is the IP may change.
Click to expand...
Click to collapse
Updated blockads script to test this am and:
sh-3.2$ export PATH=/data/local/bin:$PATH
sh-3.2$ su
sh-3.2# blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
The busybox version of wget on your system does not work correctly with
hostnames. Trying workaround with latest known IP to the hostname...
Connecting to 184.73.229.87 (184.73.229.87:80)
hosts 100% |***********| 641k 00:00:00 ETA
backing up old host file and updating
failed on 'hosts' - Cross-device link
md5sum: can't open '/system/etc/hosts': No such file or directory
/system/xbin/blockads: line 38: [: 8172d35d1b72871f7e1ef4e709920f0e: unary operator expected
Unable to chmod /system/etc/hosts: No such file or directory
Unable to chmod /system/etc/hosts: No such file or directory
remounting filesystem in r/o mode...
Cleaning up files...
rm failed for -f, No such file or directory
update complete!
sh-3.2#
The end result is the existing hosts file being renamed hosts.bak and obviously no new hosts filebeing being created.
EDIT.... The above is testing on my inspire running busybox 1.19. Tried using the script on my sensation running bb 1.18.4 and it works fine.
Edit edit... Installed bb 1.18.4 on inspire and result is the same as posted above.
DroidTh3ory said:
Top right corner of Root Explorer .... Mount RW.
Sent from my A05PTH3ORY using XDA App
Click to expand...
Click to collapse
That's what I did, but it does not work - still does not let me modify read-only files.
After reading over the code and seeing the comments, I can only guess you had the modified version of wget on your device during testing, which does support host names. Before I continue, I am not trying to rain on your parade, but... By downloading the file, checking the md5, comparing it to the existing file, replacing if needed, and then cleaning up... you went about 5 steps beyond what just doing an "if server file is newer" check would do by including a custom wget. Even though you have to put in the code to install and verify the wget, the trade is that you no longer have to download the file every time, check it every time, and worry about making sure the md5 matches.
If you decide you want to switch over to that method, you can check out the option already included in http://forum.xda-developers.com/showthread.php?t=1092128 by downloading the live install version to view the actual script. Just a recommendation to optimize the process. Nice work, though, you definitely found a way to get the job done.
As for the difference between this and Adfree. There is no real difference. Adfree checks the server, does a callback, and prompts the user with updates. Adfree just requires an entire shell to turn it into an app, but will automatically run on boot.
twistedumbrella said:
As for the difference between this and Adfree. There is no real difference. Adfree checks the server, does a callback, and prompts the user with updates. Adfree just requires an entire shell to turn it into an app, but will automatically run on boot.
Click to expand...
Click to collapse
So, for those of you not comfortable running ADB, or Terminal Emulator, just install AdFree, and let it do everything for you.
spotmark said:
So, for those of you not comfortable running ADB, or Terminal Emulator, just install AdFree, and let it do everything for you.
Click to expand...
Click to collapse
Well, you also have the option of most included ROM toolkits, ScriptFusion, and a lot of preinstalled adblock scripts, but the big difference is the hosts file itself. Sounds like this one is custom, whereas mine takes bamf and adfree and merges them. This one may end up blocking more ads, but the only way to know would be to sit down and compare them all.
Sent from my ADR6400L using Tapatalk
twistedumbrella said:
Well, you also have the option of most included ROM toolkits, ScriptFusion, and a lot of preinstalled adblock scripts, but the big difference is the hosts file itself. Sounds like this one is custom, whereas mine takes bamf and adfree and merges them. This one may end up blocking more ads, but the only way to know would be to sit down and compare them all.
Sent from my ADR6400L using Tapatalk
Click to expand...
Click to collapse
Ah, I see.
Thank you for your comments everyone . I'll refine the script a bit more and also deal with a permanent workaround for not having a wget that checks hostsnames by testing with a ping and getting the IP first, using that and then doing wget. This started as a way for me to deal with having to move my ad host file each time I update it on my phone to just giving it out to everyone.
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
If anyone is still having problems that weren't resolved with it from above, let me know as well. I tested it against busybox 1.16.2 on my own phone, but it seems no 2 busybox version are alike
I havent tried this, but this one does include busybox 1.19 for those that don't want to manually install it. https://market.android.com/details?id=com.jrummy.busybox.installer&feature=related_apps
yareally said:
Thank you for your comments everyone . I'll refine the script a bit more and also deal with a permanent workaround for not having a wget that checks hostsnames by testing with a ping and getting the IP first, using that and then doing wget. This started as a way for me to deal with having to move my ad host file each time I update it on my phone to just giving it out to everyone.
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
If anyone is still having problems that weren't resolved with it from above, let me know as well. I tested it against busybox 1.16.2 on my own phone, but it seems no 2 busybox version are alike
I havent tried this, but this one does include busybox 1.19 for those that don't want to manually install it. https://market.android.com/details?id=com.jrummy.busybox.installer&feature=related_apps
Click to expand...
Click to collapse
Hit me up if I can be any help. It's good to have a better list available. Adfree has never been very thorough.
Sent from my ADR6400L using Tapatalk
+1 I exam yareally's hosts, This is much faster killing them and I glad you finally developing the script update for the hosts. I am going test your script update on 2 of the roms A05PTH3ORY and Gengeritis 3D VII. Thanks - Keep it up
yareally said:
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
Click to expand...
Click to collapse
Added about 10-15 more hosts today.
Thanks for the script. I'm going to give it a shot in a little bit. AdFree hasn't worked right in months. I've been using Absolute System to block ads, but I think I'll give this a try. Thanks again.
I'm about 50% done working on a basic gui app to do what the script does + some other features, just to give an update. GUI app will be free to any xda members of course
Things I am putting into it:
Choice between no blocking, partial blocking (basically in browser only stuff in case you want to show developers some love by not blocking their application ads), and full blocking.
Updating like the script does with just a touch of a button.
Optional ability to download a host block list for your desktop pc.
*features that may come later*
-ability to send me hosts from the app to add to the block list
-ability to add your own hosts on the fly to the list (either for personal routing or for adblocking, since adblocking is only the secondary use of the hosts file). Unfortunately, you will have to figure out the hosts yourself, since there's no easy way to tell really automatically.
Any other suggestions are welcomed
yareally said:
I'm about 50% done working on a basic gui app to do what the script does + some other features, just to give an update. GUI app will be free to any xda members of course
Things I am putting into it:
Choice between no blocking, partial blocking (basically in browser only stuff in case you want to show developers some love by not blocking their application ads), and full blocking.
Updating like the script does with just a touch of a button.
Optional ability to download a host block list for your desktop pc.
*features that may come later*
-ability to send me hosts from the app to add to the block list
-ability to add your own hosts on the fly to the list (either for personal routing or for adblocking, since adblocking is only the secondary use of the hosts file). Unfortunately, you will have to figure out the hosts yourself, since there's no easy way to tell really automatically.
Any other suggestions are welcomed
Click to expand...
Click to collapse
Sounds like AdFree but much better and will work better as well. Can't wait!!
Just tried this today on gingeritis 3d beta8 and it doesnt seem to work as i get the same error someone else posted a few posts back. Something about no such file or directory system/etc/hosts. I reverted adfree and uninstalled it and renamed the hosts file to hosts from hosts.bak but when I Su adblock it gets renamed to hosts.bak and terminal shows that same error

[UPDATE 2/12/2010] Terminal IDE - Full 'on device' Java / Android IDE

[UPDATE]
BusyBox 1.19.2
Bash 4.2
Midnight Commander 4.8
TMUX 1.5 - That's right, full terminal multiplexer..
Vim 7.3
Terminal IDE ASCII Soft keyboard first round bug fixes complete.
It's the addition of TMUX and MC that really excites..
--------------------------
Well,
As the only people I know who might even be interested in this, I would like to announce the release of Terminal IDE v1.0.
A complete Java / Android Development Environment that runs on the device itself, with a nice telnetd / sshd feature.
For Android. Of course... Eat this you IPhone Hounds..
Woo HOO!!
The application is available on Android Market.
https://market.android.com/details?id=com.spartacusrex.spartacuside
As what I can only describe as 'dark days' finally draw to an end, I am very pleased with this first draft.
PLEASE give it a go, log in over telnet for a smoother ride, and let me know how it goes..
DO THE TUTORIAL! Does it work ?!
I have released the whole project GPLv2! Yeah, Who Knew!?
http://code.google.com/p/terminal-ide/
BOOOOOM!
Spartacus
a link to the app in the market would be usefull.
Interesting. Was just wondering about coding on my tablet.
Pretty freakin sweet
Thanks for putting this out!
Awesome
The full keyboard alone makes it worth downloading, but the IDE as well - wow!
this is best bro.
I randomly found this last night while looking for a decent mobile IDE for my tablet. I was looking for a simple text editor with syntax highlighting and you've taken that extra step to include other tools for ssh, telnet and compilers. Much appreciated.
One question, how do you start the ssh server? sshd doesn't seem to do it. I would like to scp files to my device from my desktop in order to work on my commute.
Thanks
The sshd app is actually called Dropbear.
You also have Dropbearkey.
You use Dropbearkey to generate the sshd certificates you need.
I really need to add a tutorial on setting the sshd keys up
For now Google has a couple of articles on it.
For file transfers you also have busybox FTP but I admit not terribley secure..
Allthough SSH is provided, and I wonder whether an SSH pipe can be created..?
And lastly you can just copy the files over to your sdcard via USB..
Will look into it & add tutorials asap.
Ok. So I now have SSHD working..
But there is a slight issue.. basically when you log in you have to start bash manually.. unless you have the file /etc/shell with the correct shell to use.. Which requires a rooted phone.
Since Terminal IDE is for non-ROOT users, I will have to recompile the code to allow a shell to be specified on the command line.. Soon..
FOR NOW - This is how to connect to the phone via SSH (There are other ways using public keys but this is one way)
So - Once in Terminal IDE
2) You need to create a couple of server ssh keys
Start in $HOME
Code:
cd ~
Create folder
Code:
mkdir .ssh
Give it some secure permissions
Code:
chmod 700 .ssh
Get in there
Code:
cd .ssh
Now create the keys
Code:
dropbearkey -t dss -f dropbear_dss_host_key
dropbearkey -t rsa -f dropbear_rsa_host_key
ok - That's almost it. Just need to start dropbear with the correct parameters now. [Probably want to keep this in a script]
Back HOME
Code:
cd ~
You need to know the UID of your app, which is different per phone - use 'id'
Code:
id
That will tell you your user ID / Group ID. Let's say its 10058.
Now to start DropBear
Code:
dropbear -A -N username -U 10058 -G 10058 -C password -d ~/.ssh/dropbear_dss_host_key -r ~/.ssh/dropbear_rsa_host_key -F -E -p 8090 -P PidFile
This will start it running in the foreground with password set to 'password' on port 8090.
Then you can connect, like telnet, and simply use 'password' for the password.
Now for the issue. It will start a simple shell session in / with no ENVIRONMENT variables or anything..
I'll fix it permanently in a future release, but for now it can be fixed with these 2 commands.
cd into your home dir - Check this is correct on your device
Code:
cd /data/data/com.spartacusrex.spartacuside/files
And start bash with an init file Terminal IDE auto-magically creates..
Code:
./system/bin/bash --init-file ./.init
Everything should now be setup as usual.
Good luck..
Very awesome and thank you sir. Works like a charm.
One thing to clarify for those "braving" this (not that it's all that insane to try)... the '-N' is setting the username (in the case of the example, setting it to 'username').
Also, it gives a permission denied for scp, I'm assuming since it doesn't init/run the shell. Should be fine since FTP is included. Haven't tried this option yet. Not too worried about security at the moment, since I'll only run it on a private network.
May I make a (maybe) small feature request? Is it possible to include a "keep screen awake" option in the options menu? I have my Xoom config'd to turn off the wifi when the screen is off for power saving (can go ~4 days on 1 charge), so it will kill my connections if I let this happen. I know not everyone has this config set, but it'd be a nice option.
NOW, if I wasn't lazy, I could probably add this myself and build since I've dl'd the source. But, lazy and working on a few projects already.
Again, much thanks.
And as if by magic..
Funnily enough I was having the exact same issue last night while using wget to transfer a big file to my device..
NEW VERSION UPLOADED v1.13
Now has 3 non-exclusive lock types available in the options :
- CPU Lock
- SCREEN Lock
- WIFI Lock
Set them as you wish...
Saw that this morning when I was on the bus (Thursday morning here in Hong Kong). Very awesome and much appreciated.
As well, thanks for open-sourcing it. +1 for you sir!
Very cool stuff
Thanks for creating this.
Great app! However I can't compile .java files. I always get an error that it can't unzip a file in /android.policy.jar. Any idea?
Sent from my GT-I9100 using XDA App
Do you think its possible to also support compiling C sources directly in your phone
I've been searching for this ever since I got an android.
THANK YOU.
Says that it's incompatible with my OG Droid. Any idea why?
shpen said:
Says that it's incompatible with my OG Droid. Any idea why?
Click to expand...
Click to collapse
Most likely seems to be due to the ROM you are using and/or the market version
can u post the build.prop here?
/system/build.prop
also, try going back to market 2.x, 3.x market(s) do loads of checks
Does anybody know why I can't compile java files? I always get the following error:
Error reading /system/framework/android_policy.jar cannot read zip file.
Any ideas? Could anyone upload there android_policy.jar because that might cause the error.
Sent from my GT-I9100 using XDA App
Hi Schindler33.
Can I ask, have you followed the tutorials, say the first helloworld example TO THE LETTER?
Does the helloworld example work?
The parameters have to be correct, and as always exact, and the BOOTCLASSPATH variable must be set.
If so, is it a custom ROM?
Does that policy jar file exist and is it readable by non root users?
As much info as possible good..

[N5] [FKU and PAM apps] Default kernel and Per App Mode Swaps.

So, In an attempt to get the configuration talk out of @franciscofranco's kernel thread, I decided to open this "swap meet"
As you may know I've wrote a couple scripts to make it easier to pull a backup of the kernel settings available through the franco kernel updater app.
Preparing files for sharing
Kernel Settings
so, if you want to share your kernel settings, grab the backup-script.sh file from here, run it either through a file manager or a terminal emulator, then head over to /sdcard/settings_backup/ and grab the restore-script.sh file, rename it to <your_user_name-defaults.sh> and post a link to it here.
Per App Modes
If you want to share you Per-App Modes settings, you'll need to use either the franco kernel updater or his stand alone Per-App Modes app, either way, the process is the same, just the file paths are a little different.
FKU App
So, if you use the fku app, go into fku -> Per-App Modes -> Manage your modes and click the BACKUP MODES in the top right corner. This creates an xml file of all your per app settings (one file per mode). These files are stored in /sdcard/franco.kernel_updater/saved_per_app_modes
Create a zip file including the modes you want to share and post it here.
Stand Alone Per-App Modes App
The process for using the stand alone app is the same. Per-App Modes -> Manage, and click BACKUP MODES in the top right corner again, this creates another batch of .xml files... Only they're stored in /sdcard/per-app_modes/saved_per_app_modes/
Once again, Create a zip file of the modes you want to share and post here.
Using Shared Settings
Okay, so you've downloaded the scripts and zips that you want to try out... how do you use them..
Kernel Settings
The scripts are easy, just run them (as root) through a file manager or terminal emulator.. then use fku or an init.d system to set the changes on boot if you want.
Per App Modes
The process for using the downloaded zips is just the reverse of sharing them...
Unzip the file and place the .xml files in the appropriate folder (/sdcard/franco.kernel_updater/saved_per_app_modes if you use fku, or /sdcard/per-app_modes/saved_per_app_modes/ for the standalone Per-App Modes app)
Then go into into your app, back to the manage page, where we clicked the BACKUP MODES last visit, only this time, click the LOAD MODES button.
Now, if you had copied the .xml file to the right folders, you should see the new PAM modules loaded into the list.
I will try to keep my signature link up to date with posted settings, and try to keep an eye out for identical or substantially similar settings.
For those using mobile apps and can't see signatures, here is the link to the scripts.
the backup-script.sh file is in the scripts folder, kernel and pam settings are in the settings folder.
Custom Paths for Per-App Modes
One thing that the stand alone app brought that hasn't (officially?) been ported back to the fku app is custom paths...
Giving you the ability to use any tunable setting in your Per-App Modes. --now in fku
While you can add and edit these easily through the stand alone app (and one reason why I think you should get it) once you know how the files work, thy can also be used in the main fku app...
Because of this, I am somewhat hesitant to give out the directions without approval from franciscofranco... Per-App Modes is a paid app of his and I would hate to take revenue out of his pocket.
Okay, since @franciscofranco has given me permission to release this, here we are...
This Zip file contains all the (useful) per app mode custom paths... to use this DO NOT FLASH IT... this is just a simple zip, nothing else... just unzip it in the right location...
If you use the fku app, then you need to unzip it and move/copy the files from the zipped folder to the franco.kernel_updater/per-app_custom_paths folder.
If you use the standalone per app modes then follow the same directions as fku, but put the files in the per-app_modes/per-app_custom_paths folder
Cautions and Warnings
-Any and all zips you find in this thread should NOT be flashed via recovery, don't try, bad things may happen...
-Permission errors may occur when running scripts from this thread as root. I haven't been able to figure out why, but some roms seems to set various file permissions to 444 instead of the 664 that my script expects... if you do encounter this situation, let me know and I'll give you a quick fix for it (requires adding a line to the scripts)
I haven't added the fix to my backup-script yet because I'm curious what files they are.. I've encountered 2 files so far
- Upon further testing, we've learned that root browser (app) might not work to run these scripts... adb shell and terminal emulator are working properly though. (backup script needed a small tweak as well)
Kernel setting scripts
Nexus 5
STOCK Settings
r46
aow1980
April 17, 2014
The Gingerbread Man
April 13, 2014
Tzfardaya
April 13, 2014
Vomer
July 22, 2014
Per-App Modes
The Gingerbread Man
April 13, 2014
Francisco Franco
May 11, 2014 - Low Power
May 12, 2014 - Games, Low Power
Vomer
May 11, 2014 - Low Power
Subscribed
Sent from my Nexus 5 using XDA Premium 4 mobile app
Subscribed! This is gonna be good! I'll upload a few of my setups soon!
Interesting Kernel settings , will give it a try and test your script. Thanks for sharing. Good luck with your thread
Tapatalk Team SlimRoms
This would be the perfect place to share some custom paths too
Subscribed and I'll see about linking to this thread from my learner lounge
Sent from my Nexus 5 using Tapatalk
The Gingerbread Man said:
This would be the perfect place to share some custom paths too
Subscribed and I'll see about linking to this thread from my learner lounge
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Yeah, I've got a zip of ALL the custom paths ready, just working on the write up for them...
and trying to solve a small moral dilemma with them...
This thread could also be used for all the supported fku devices if you were to split up the op into several device specific sections and ask about getting the thread moved to Android General forum. New posts can also be inserted on your behalf but you need to contact a moderator for both of these...
Sent from my Nexus 5 using Tapatalk
The Gingerbread Man said:
This thread could also be used for all the supported fku devices if you were to split up the op into several device specific sections and ask about getting the thread moved to Android General forum. New posts can also be inserted on your behalf but you need to contact a moderator for both of these...
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I know, but I don't have the other devices to get the scripts set up for it.. and I'm more interested in working the nexus 5 right now..
I would have no problem if others wanted to use my scripts as a base for writing their own for swapping
Tzfardaya said:
Per-App Modes
The Gingerbread Man
April 13, 2014
Click to expand...
Click to collapse
FYI, getting a bad zip file here, but the tgbm.zip in your sig works just fine
(damn that was hard to write with auto correct on SwiftKey. Lol.)
Sent from my Nexus 5 using XDA Premium 4 mobile app
WettbackMartyr said:
FYI, getting a bad zip file here, but the tgbm.zip in your sig works just fine
(damn that was hard to write with auto correct on SwiftKey. Lol.)
Sent from my Nexus 5 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
heh, yeah, swiftkey autocorrection is a pain at times..
but I just downloaded through both the pc and nexus 5 and got clean downloads of that zip...
I'm not sure if the two gingerbread zip are different, but he just sent me the current batch today... (hence the date in the name) the others are from when I first worked on the scripts
Tzfardaya said:
heh, yeah, swiftkey autocorrection is a pain at times..
but I just downloaded through both the pc and nexus 5 and got clean downloads of that zip...
I'm not sure if the two gingerbread zip are different, but he just sent me the current batch today... (hence the date in the name) the others are from when I first worked on the scripts
Click to expand...
Click to collapse
Hmmmmmm :-/ I just can't get a good download on my Nexus 5. I'm not complaining tho, just trying to help for other people that may encounter the same. I got the scripts on my end one way or another.
Sent from my Nexus 5 using XDA Premium 4 mobile app
WettbackMartyr said:
Hmmmmmm :-/ I just can't get a good download on my Nexus 5. I'm not complaining tho, just trying to help for other people that may encounter the same. I got the scripts on my end one way or another.
Sent from my Nexus 5 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Try this one https://docs.google.com/file/d/0B2ar5BB6clkDQ0JfMVQ3NGtucEU/edit?usp=docslist_api I probably won't keep it in my drive long but feel free to get it while its there
Sent from my Nexus 5 using Tapatalk
How do I run (as root) or file manager for script ?where do I put the script file for kernel settings? I open the .sh file and it open and I see just texted files
Sent from my Nexus 5 using xda app-developers app
Just tested The Gingerbreads configuration and I must say I definitely see an improvement from the settings I had previously set. Nice job.
The Nexus 5 advocate (Team Inferno)
Ramone360 said:
How do I run (as root) or file manager for script ?where do I put the script file for kernel settings?
Sent from my Nexus 5 using xda app-developers app
Click to expand...
Click to collapse
It doesn't matter where the scripts are ran from, you run them either by selecting them in the file browser or running the following commands in a terminal emulator.
Code:
su
Then
Code:
sh <script-name>
Just realize that running the script alone will not keep the settings across reboots...
You need some other way to persist the settings... Either using fku or an init.d system.
My recommendation is fku, use these scripts to set the values all at once, then use the fku set on boot toggles.
All a shell script is is a text file with a series of shell commands, it's only purpose is to run a series of commands in a row to prevent forgetting one or making typos... It's like the old dos/Windows batch commands...
Tzfardaya said:
It doesn't matter where the scripts are ran from, you run them either by selecting them in the file browser or running the following commands in a terminal emulator.
Code:
su
Then
Code:
sh
Just realize that running the script alone will not keep the settings across reboots...
You need some other way to persist the settings... Either using fku or an init.d system.
My recommendation is fku, use these scripts to set the values all at once, then use the fku set on boot toggles.
All a shell script is is a text file with a series of shell commands, it's only purpose is to run a series of commands in a row to prevent forgetting one or making typos... It's like the old dos/Windows batch commands...
Click to expand...
Click to collapse
Sorry I still don't get it. I'm too familiar with terminal emulater. l always use root explorer. I downloaded the file but now my question is how do I run as root.
Sent from my Nexus 5 using xda app-developers app
Sent from my Nexus 5 using xda app-developers app
To run the script from terminal emulator you'll need to first locate the file.. But you need to be root to launch an .sh file.
Type "su" without quotes and let SuperSU prompt you, make sure you grant it root access.
Navigate to the file by using the "cd" command without quotes.
If you're like me..and downloaded it from a browser or Tapatalk.. You'd type cd storage/sdcard0/Download
Then run "ls" without quotes to make sure the file is in there. Once it is make a note of the name.
Type su FILENAME.sh (replacing filename with the actual name of the file) and hit enter. Should have worked. It did for me. If done correctly you should see no confirmation or error message. In Linux no messages are a good thing.
PS : don't forget to grant root to terminal emulator if you haven't yet. Remember to use FKU or init.d to make settings stick after reboot.
Edited to include "su" command for those who don't know how to run terminal emulator as root.
The Nexus 5 advocate (Team Inferno)

chmod in a Root Shell Fails On A File in /data/data

I hope I am getting this is the right place. If not, please respond with a suggestion of where to place it. Thanks!
First some background. I have written a root app that, to accomplish its work, must chmod some files located under /data/data. This app works as expected on my 3 test devices - all JB or KK and has been published to Play Store where comments from users indicate that it works on other devices including those with Android 5 and 6.
The other day, a user contacts me and says the app doesn't work on his device. Here is some of the device info my app captures:
Linux Version: 3.10.40-perf-g90ddf4a
Android SDK Version: 22
Maker: motorola
Brand: motorola
Product: quark_verizon
Device: quark
Model: XT1254​
My app confirms that the device is indeed rooted and that there is a recent SuperSu app installed. My app is able to chmod directories and some other files. But it cannot manage certain others. I get a result code of 10 but am not sure what exactly that means except some form of failure.
I should add that trying to change the permissions on the file using Root explorer also seems to fail (silently) since right after doing so, the user ran my app and its log shows the file's permissions unchanged.
I wondered if it was an SeLinux issue - something about the files' contexts - but having my app perform ls -Z shows that the contexts (other than the user id - as expected) are identical to those on my 3 devices. Plus there are no context violation warnings in dmesg as I understand there should be were SeLinux the issue.
I have read about extended file attributes and there is one for marking a file immutable. I don't know if this would case a chmod to fail but maybe. I doubt this is the case with these files since I know they are being changed by the file's owning app. But there is no way to confirm this unless the user installs busybox which contains the lsattr command. And he isn't keen on doing that.
Can anyone suggest what might be causing this problem and why it might be restricted to this particular device? I am just completely stumped.
Thanks

[7.0] Enable google daydream (root needed)

I've managed to get daydream VR up and running on my LG G5.
I'm just gonna jump straight to the point and explain how I've managed to do this.
To set this up, you're gonna have to be on Android 7.0, and have root access.
First of all, enable ADB Debugging in your developer settings and test if it works on your computer, we are gonna need this later on.
Download and install the following apps;
Daydream apk http://www.apkmirror.com/apk/google-inc/daydream/daydream-1-1-161121023-release/daydream-1-1-161121023-android-apk-download/
VR Serviceshttp://www.apkmirror.com/apk/google-inc/google-vr-services/google-vr-services-1-1-141111507-release/
Daydream Keyboardhttp://www.apkmirror.com/apk/google-inc/daydream-keyboard/daydream-keyboard-1-0-release/daydream-keyboard-1-0-android-apk-download/
Any root explorer app, i used https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree&hl=en
Open up the root explorer and navigate to: /system/etc/permissions
In the permissions folder, look for the following file and open it: "handheld_core_hardware.xml"
BE SURE TO CREATE A COPY THE FILE FIRST SO YOU HAVE A BACK-UP OF THE ORIGINAL HANDHELD_CORE_HARDWARE FILE
Add the following lines between the <permissions> tags
"<feature name="android.software.vr.mode" />"
"<feature name="android.hardware.vr.high_performance" />"
Reboot your phone. A lot of things will crash when it starts up, this happened to me too. This happens because the file we just edited doesn't have the proper permissions set up.
To fix this problem we're gonna open up an ADB Shell on the computer.
Once you have ADB open do the following commands:
SU (and grant superuser permissions on phone)
mount -o rw,remount -t /system
chmod 644 /system/ect/permissions/handheld_core_hardware.xml
mount -o ro,remount -t /system
reboot
Now, if we open the daydream app we can launch daydream by pressing the cardboard button in the corner.
You can also use a secondary android phone as a controller, if you have one. Google has a guide set up for this https://developers.google.com/vr/daydream/controller-emulator
Sources: https://www.reddit.com/r/Android/comments/5hno6u/got_daydream_to_work_on_my_5x_might_work_on_other/
If you have any questions, feel free to leave a comment and i'll get back to you as soon as i can!
Thank you
Successfully tried this on fulmics 1.0. Even didn't have to chmod after reboot, config file already was 644. Thank you a lot for this tutorial, its great to know we can use g5 with daydream, in my opinion the experience with the qhd lcd screen is good enough, amoled is not a (real) must.
tatsujin said:
Successfully tried this on fulmics 1.0. Even didn't have to chmod after reboot, config file already was 644. Thank you a lot for this tutorial, its great to know we can use g5 with daydream, in my opinion the experience with the qhd lcd screen is good enough, amoled is not a (real) must.
Click to expand...
Click to collapse
I'm glad it works for you! i think i had to chmod since i'm on stock v20a. This will probably (don't take my word for it though) work on a lot of newer high-end phones running on 7.0 or higher.
There's a way to use it without NFC ?
Confirmed on Xiaomi Mi5
Works perfectly on a Xiaomi Mi5 with a Moto G controller emulator both running on LineageOS 14.1.
Only a couple of Games wont Run, but almost everyone does and runs smoothly.
did so just without rooting and editing the xml File
Everything Works fine - the g5 says "Hold the Home Button...", my old Samsung galaxy s4 (Controller Emulator) says Bluetooth (Connected)
but if i push the Controller Home Button on the s4 nothing happend on the g5
are you shure it will work with root and editing xml File?
i Don t want to root the g5
thanks
xamax88 said:
did so just without rooting and editing the xml File
Everything Works fine - the g5 says "Hold the Home Button...", my old Samsung galaxy s4 (Controller Emulator) says Bluetooth (Connected)
but if i push the Controller Home Button on the s4 nothing happend on the g5
are you shure it will work with root and editing xml File?
i Don t want to root the g5
thanks
Click to expand...
Click to collapse
I haven't gotten around to figuring out how the controller emulator actually works, you need to initiate the pairing on the G5 (or the phone that's running daydream) as far as i know. I have no idea if it works without root since you're editing a build.prop, i couldn't tell you since i'm always rooted.
night.shadows said:
There's a way to use it without NFC ?
Click to expand...
Click to collapse
How do you mean use it without nfc? If you're talking about the controller emulator, open the link in the OP (original post) to the google page that provides you with the controller emulator. It explains pretty much everything you need to know when it comes down to that.
TFDRA said:
How do you mean use it without nfc? If you're talking about the controller emulator, open the link in the OP (original post) to the google page that provides you with the controller emulator. It explains pretty much everything you need to know when it comes down to that.
Click to expand...
Click to collapse
No I meant use daydream on non-nfc phone, but I've found in the developers options, thanks !
Just keeps crashing
So i go into the daydream app and go into the actual vr mode and it just crashes the app, idk what to do from here. I bought the daydream headset and i have a oneplus 3t so I dont really know what to do and it sucks cause i really wanna use it.
statertot said:
So i go into the daydream app and go into the actual vr mode and it just crashes the app, idk what to do from here. I bought the daydream headset and i have a oneplus 3t so I dont really know what to do and it sucks cause i really wanna use it.
Click to expand...
Click to collapse
Check out this thread on the oneplus forums, someone managed to get it working on the oneplus3.
I think the proccess would be fairly similar for you since you're probably using oxygenOS as well.
https://forums.oneplus.net/threads/major-announcement-daydream-vr-fully-running-on-op3-oxygenos.479505/
TFDRA said:
Check out this thread on the oneplus forums, someone managed to get it working on the oneplus3.
I think the proccess would be fairly similar for you since you're probably using oxygenOS as well.
https://forums.oneplus.net/threads/major-announcement-daydream-vr-fully-running-on-op3-oxygenos.479505/
Click to expand...
Click to collapse
Hi I've tried this method but I'm stuck, when it try to modify the permissions of the file the terminal keeps saying its a read only file system, help please :crying:
matias041198 said:
Hi I've tried this method but I'm stuck, when it try to modify the permissions of the file the terminal keeps saying its a read only file system, help please :crying:
Click to expand...
Click to collapse
If you have root, you can try running these commands in a terminal:
Code:
su
mount -o remount rw /
SkyrisBactera said:
If you have root, you can try running these commands in a terminal:
Code:
su
mount -o remount rw /
Click to expand...
Click to collapse
I've tried with no success
Code:
victara:/ $ su
victara:/ # mount -o rw,remount -t /system
/system/etc/permissions/handheld_core_hardware.xml <
chmod: chmod '/system/etc/permissions/handheld_core_hardware.xml' to 100644: Read-only file system
1|victara:/ # mount -o remount rw /
mount: '/' not in /proc/mounts
I just realised I can't change permissions of any file in my phone :crying:
I've attached my handheld core hardware file, it's from my Moto x 2014 (VICTARA). Can anyone please make it .xml, set permissions and make a flashable .zip? Thanks
EDIT: I was able to mount the /system using root explorer somehow, after that it was straight forward
Hi, i'm planning on buying the lg g5 and the daydream view headset, is it worth it? does it work well? i want to know if daydream games are working with the daydream controller too. Thanks a lot!!!
guideahon said:
Hi, i'm planning on buying the lg g5 and the daydream view headset, is it worth it? does it work well? i want to know if daydream games are working with the daydream controller too. Thanks a lot!!!
Click to expand...
Click to collapse
Maybe you should get a phone with oficial daydream support
Hi, i tried all the steps from here, the daydream app crashes and i cant play any daydream games, do i have to install any specific version?? i'm on stock 20a
Hi, followed the guide on a LG G2 with BOBO-VR Z5 with controller, everythings fine except the pairing of the controller through bluetooth.
"No controller found. Make sure that your controller is charged and next to your phone, then try again."
Any idea?
Install Magisk Module Daydream Enabler
Install Magisk Module Daydream Enabler For solve this issue in a better way.

Categories

Resources