Hey im trying to write a reboot_recovery.sh script to reboot to recovery for my i9100 and the OTA.
Anyone know the correct path ?
I added an example from a different device.
up..
Reboot recovery help
Hi, thank you very much for posting the information. I tried to use your script on the RK3066 based TV Box - DroidTV X1 . This script is supposed to be called by the OTA Updater to reboot the box to the recovery mode. It didn't work for me.
When I tried to execute it through the terminal connection on the box I get this error:
dd: can't open '/dev/block/nandf': Permission denied
reboot: Operation not permited.
Could you please advice what these commands supposed to do:
Code:
#!/system/bin/sh
echo -n boot-recovery | busybox dd of=/dev/block/nandf count=1 conv=sync; sync; reboot
and why do I'm getting this kind of messages?
Thanks a lot for your help!
Hello i need help to enable dnsmasq(this http://forum.xda-developers.com/showpost.php?p=38062781&postcount=1980)
I open terminal emulator and enter this
Code:
su
busybox echo "127.0.0.1" >> /data/local/tmp/dnsmasq
then i reboot.
Open terminal emulator again and enter
Code:
su
top | grep dnsmasq
and then i dont know how to do this
if it produce output then just change both your dns1 and dns2 in wifi settings to 127.0.0.1 or whichever address u chose to use earlier..
Click to expand...
Click to collapse
After that i dont know what to do. Tried with adb but with no luck again... Any help?
If I run this in a terminal on an Android Gingerbread device, it works fine:
Code:
echo "1250" > /proc/sys/vm/dirty_writeback_centisecs
I tried writing a script to run the same command:
Code:
#!/system/xbin/ash
echo "1250" > /proc/sys/vm/dirty_writeback_centisecs
echo "1250" > /proc/sys/vm/dirty_expire_centisecs
but when I run the script I get:
Directory nonexistentproc/sys/vm/dirty_writeback_centisecs
Directory nonexistentproc/sys/vm/dirty_expire_centisecs
Click to expand...
Click to collapse
Note the missing space. I get the same problem with the `route` command. This command works fine in a terminal:
Code:
route add default gw 192.X.X.X dev wlan0
But when I try to run it from a script, it doesn't work.
So I'm an idiot. Anyway, I recently installed cyanogenmod with CWM recovery (on a Nexus 7) and decided to try one of the largest grids for the lock screen security. Needless to say it was soon forgotten. I've tried the gmail reset but it says the details are incorrect even though I can sign in with them on my PC. My guess is that it can't connect to gmail for authentication due to the firewall I'm using.
Edit: Solution
Factory reset from CWM, that's it.
RoberGalarga said:
Factory reset from CWM, that's it.
Click to expand...
Click to collapse
Not the solution I was aiming for.
Fortunately I found http://forum.xda-developers.com/showthread.php?t=1800799
However this does not work for cyanogenmod as they use an additional system. I had no knowledge of this beforehand but a comment on the above post led me to believe something was different. I decided to pull /data/system folder so I could investigate further. I found cm_gesture.key which after looking it up, I found out it's cyanogenmods additional key file.
I decided to remove this file using the same method as the above post and it worked perfectly. After a reboot the pattern screen is still there but any input is correct.
Mini Cyanogenmod 10.1.2 pattern unlocking guide:
If ADB won't work from android reboot into CWM recovery (other custom recoveries may work). Open a CMD (ADB will need to be installed and setup).
Enter the each of the following:
Code:
adb shell rm /data/system/gesture.key
Code:
adb shell rm /data/system/cm_gesture.key
Code:
adb reboot
It should reboot into android and now any pattern will be correct. You should now go into settings and reconfigure your lock screen.
This works if you only have/delete /gesture.key
works on 4.4.2
Trying to make this work on CWM 13. It doesnt, any tips? forgot my 6x6 lockscreen which is also invisible...
Revome the unlock pattern! [CM13.0 tested]
Cryorus said:
Trying to make this work on CWM 13. It doesnt, any tips? forgot my 6x6 lockscreen which is also invisible...
Click to expand...
Click to collapse
FINALLY I HAVE A SOLUTION!
Version 1 (Custom Recovery):
------------
Get the updated version of TWRP (twrp.me). Flash it via Odin or whatever you use and boot into it (Vol Up + Home + Power).
1) go to Advanced > File Manager
2) then go to '/data/system'
3) press on 'gatekeeper.password.key' > Delete > Swipe to Confirm
4) repeat 3) with 'gatekeeper.pattern.key'
5) Reboot & be happy!
Version 2 (Android Debugging Bridge - adb):
-------------------------------------------------------
Just follow these steps:
1) make sure your device shows up here:
Code:
adb devices
2) restart adb as root:
Code:
adb root
3) start the device-shell:
Code:
adb shell
4) make sure to have su access:
Code:
su
5) go to the 'system' directory in the 'data' folder:
Code:
cd /data/system
6) remove the pattern:
Code:
rm gatekeeper.password.key
7) remove the password sequence:
Code:
rm gatekeeper.pattern.key
8) exit the shell:
Code:
exit
9) reboot to be happy again:
Code:
adb reboot
That's it! Hope I was able to help you!
~ Kerskes ~
Awesome. Thanks for sharing your research.
Kerskes said:
FINALLY I HAVE A SOLUTION!
Version 1 (Custom Recovery):
------------
Get the updated version of TWRP (twrp.me). Flash it via Odin or whatever you use and boot into it (Vol Up + Home + Power).
1) go to Advanced > File Manager
2) then go to '/data/system'
3) press on 'gatekeeper.password.key' > Delete > Swipe to Confirm
4) repeat 3) with 'gatekeeper.pattern.key'
5) Reboot & be happy!
Version 2 (Android Debugging Bridge - adb):
-------------------------------------------------------
Just follow these steps:
1) make sure your device shows up here:
Code:
adb devices
2) restart adb as root:
Code:
adb root
3) start the device-shell:
Code:
adb shell
4) make sure to have su access:
Code:
su
5) go to the 'system' directory in the 'data' folder:
Code:
cd /data/system
6) remove the pattern:
Code:
rm gatekeeper.password.key
7) remove the password sequence:
Code:
rm gatekeeper.pattern.key
8) exit the shell:
Code:
exit
9) reboot to be happy again:
Code:
adb reboot
That's it! Hope I was able to help you!
~ Kerskes ~
Click to expand...
Click to collapse
Thanks a ton man !
Acrylate said:
Not the solution I was aiming for.
Fortunately I found http://forum.xda-developers.com/showthread.php?t=1800799
However this does not work for cyanogenmod as they use an additional system. I had no knowledge of this beforehand but a comment on the above post led me to believe something was different. I decided to pull /data/system folder so I could investigate further. I found cm_gesture.key which after looking it up, I found out it's cyanogenmods additional key file.
I decided to remove this file using the same method as the above post and it worked perfectly. After a reboot the pattern screen is still there but any input is correct.
Mini Cyanogenmod 10.1.2 pattern unlocking guide:
If ADB won't work from android reboot into CWM recovery (other custom recoveries may work). Open a CMD (ADB will need to be installed and setup).
Enter the each of the following:
Code:
adb shell rm /data/system/gesture.key
Code:
adb shell rm /data/system/cm_gesture.key
Code:
adb reboot
It should reboot into android and now any pattern will be correct. You should now go into settings and reconfigure your lock screen.
Click to expand...
Click to collapse
Thanks man i was wondering and worried that i would have to reset my phone again .
wajeehuzkhan said:
Thanks man i was wondering and worried that i would have to reset my phone again .
Click to expand...
Click to collapse
Too late for me, already reseted my phone
I'm on lineage
After a softbrick I deleted these two files.
not I can pass the lockscreen again! nice!
now I can't set a new lockpattern...
How can I fix this?
sejmand said:
I'm on lineage
After a softbrick I deleted these two files.
not I can pass the lockscreen again! nice!
now I can't set a new lockpattern...
How can I fix this?
Click to expand...
Click to collapse
Did you manage to find any solution? I'm on LG G5 and get an FC when I try to open Lock screen settings.
Hassaan Masroor said:
Did you manage to find any solution? I'm on LG G5 and get an FC when I try to open Lock screen settings.
Click to expand...
Click to collapse
Finally, I did a hardreset with wipe data partition. After that I use a pin and never had the problem again...
(Do not remove files, rename them... Remember to see beforehand "ls -l" - access permissions and owners.)
With Lineage OS 14.1-20170607-nightly I succeded with as root:
Code:
mv /data/system/locksettings.db /data/system/locksettings.db_disabled
+ two subsequent reboots.
Settings are available and functional after it.
P.S.
The following was done before the trick above, but I'm not sure final permissions should be exactly as below (I did certain moves before it, but finished with the following):
Code:
# chown system.system /data/system/gatekeeper.pa*
# chmod 660 /data/system/gatekeeper.pa*
# ls -l /data/system/gatekeeper.pa*
-rw-rw---- 1 system system 0 2017-06-13 20:40 /data/system/gatekeeper.password.key
-rw-rw---- 1 system system 58 2017-06-13 20:40 /data/system/gatekeeper.pattern.key
Removing-renaming of the files will remove the pattern and fully unlock screen... and will break Settings app functionality (not able to set up new lock of any type). If files are back with these permissions - the pattern is back.
The following is definitely so, sure:
Code:
# ls -lh /data/system/locksettings.db
-rw-rw---- 1 system system 20K 2017-06-13 12:26 /data/system/locksettings.db
P.S.S. Ideas have been found here - https://forum.xda-developers.com/showthread.php?t=1800799&page=15
Hi Kerskes,
Thanks for the solution. It does work also on my hlte phone with Linage 14.1.
But I am seeing only one problem which is addressed by others as well.
That is Settings crashes everytime I want to set new security setting for lockscreen.
Do you have any proposals or solutions?
Also I would request Admin to set this as unsolved or open detach to new thread for the above issue.
Kerskes said:
FINALLY I HAVE A SOLUTION!
~ Kerskes ~
Click to expand...
Click to collapse
---------- Post added at 08:50 AM ---------- Previous post was at 08:32 AM ----------
Thanks Anker,
Your solution did wonderfully worked on Linage 14.1 over HLTE Phone.
I restarted after renaming locksettings.db using SolidExplorer (With Root). Then I needed one restart and Settings did responded properly for Lock Screen Pattern setting. I also observed that the gatekeeper.pa* files which I had deleted were also created again but they has only 600 file permissions. Soon I modified the file properties in SolidExplorer with proper 660 file permissions. Once again thanks a lot.
I apologize for my stupid previous post which I posted without seeing your solution.
B Anker said:
(Do not remove files, rename them... Remember to see beforehand "ls -l" - access permissions and owners.)
Click to expand...
Click to collapse
> adb shell "dd if=/dev/block/mmcblk0p22 of=/sdcard/Boot.img"
using the above command i cannot get the kernel, the message i get is this: /dev/block/mmcblk0p22: cannot open for read: no such file or directory
tried using the same command on android terminal on the phone, still get similar message that the directory doesn't exist.
command used on terminal:
> su
> dd if=/dev/block/mmcblk0p22 of=/sdcard/Boot.img
any idea how to get the kernel? if you know please help. thanks
device:
- Xperia P LT22i
- Rooted with Locked Bootloader
- Stock Jelly Bean 4.1.2 ROM and Kernel
user44 said:
> adb shell "dd if=/dev/block/mmcblk0p22 of=/sdcard/Boot.img"
using the above command i cannot get the kernel, the message i get is this: /dev/block/mmcblk0p22: cannot open for read: no such file or directory
tried using the same command on android terminal on the phone, still get similar message that the directory doesn't exist.
command used on terminal:
> su
> dd /dev/block/mmcblk0p22 of=/sdcard/Boot.img
any idea how to get the kernel? if you know please help. thanks
device:
- Xperia P LT22i
- Rooted with Locked Bootloader
- Stock Jelly Bean 4.1.2 ROM and Kernel
Click to expand...
Click to collapse
where did you get =/dev/block/mmcblk0p22 from? There is no such partition.
Kernel is at /dev/block/mmcblk0p9
ChikeD said:
where did you get =/dev/block/mmcblk0p22 from? There is no such partition.
Kernel is at /dev/block/mmcblk0p9
Click to expand...
Click to collapse
got it from here: http://forum.xda-developers.com/showthread.php?t=1450588
i did what you said and it says ----- /dev/block/mmcblk0p9: cannot open for read: permission denied
user44 said:
got it from here: http://forum.xda-developers.com/showthread.php?t=1450588
i did what you said and it says ----- /dev/block/mmcblk0p9: cannot open for read: permission denied
Click to expand...
Click to collapse
It will definitely work if you do it as superuser (well, maybe unless you're using a rom with SELinux configured to block that...)
user44 said:
got it from here: http://forum.xda-developers.com/showthread.php?t=1450588
i did what you said and it says ----- /dev/block/mmcblk0p9: cannot open for read: permission denied
Click to expand...
Click to collapse
Every device is different, so you better look at Xperia P development for how to do things on our device.