No deep sleep after root - AT&T Samsung Galaxy S6

I'm on OE2. I rooted and ran into the no deep sleep after rooting issue.
I've tried running this in Terminal and rebooting, but it didn't work:
mount -o rw,remount /system /system
mkdir /system/su.d
chmod 0700 /system/su.d
echo "#!/tmp-mksh/tmp-mksh" > /system/su.d/000000deepsleep
echo "echo 'temporary none' > /sys/class/scsi_disk/0:0:0:1/cache_type" >> /system/su.d/000000deepsleep
echo "echo 'temporary none' > /sys/class/scsi_disk/0:0:0:2/cache_type" >> /system/su.d/000000deepsleep
chmod 0700 /system/su.d/000000deepsleep
reboot
Click to expand...
Click to collapse
I've tried clearing cache by booting into stock recovery, and that didn't work.
My next step is to flash stock recovery in Flashfire, but I can't find the OE2 ATT Stock Recovery anywhere. Does anyone have it or anyone have any other ideas I can try?
Thanks!

Related

[Solved]Help to mount SDcard

Hi I built a little script to mount my SDcard @ startup of the phone and install some apps.
here it is:
Code:
sleep 2
busybox mount > /data/mount.txt
busybox ls /dev/block/vold >> /data/mount.txt
busybox mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,shortname=mixed,utf8 /dev/block/vold/179:1 /sdcard >> /data/mount.txt
busybox mount >> /data/mount.txt
sleep 3
echo "APPS installation"
if [ -e /sdcard/Apps-install/install.txt ];
then
echo "found file" > /sdcard/Apps-install/install.txt
cd /sdcard/Apps-install
ls *.apk > ./apps.txt
for line in $(cat apps.txt); do install -c -D /sdcard/Apps-install/"$line" /data/app >> /sdcard/Apps-install/install.txt; done
echo "ok" >> /sdcard/Apps-install/install.txt
else
echo "file not found" > /sdcard/Apps-install/install.txt
fi;
sleep 2
echo "Finish"
if [ -e /data/firstboot.sh ];
then
busybox rm -f /data/firstboot.sh;
busybox rm -f /sdcard/Apps-install/apps.txt;
fi;
echo "Restart"
sleep 1
reboot
I'm sure that the code is well executed (as is have data in /data/mount.txt) but the mount of the SD and so every work related to the SD
What is strange is that script work if i execute it after the phone has completely started.
Can someone help please.
Bye
Herc.8)
A Little up for a little help
Hi,
I still need help,
thx by advance
Bye
Herc. 8)
Ok finally found bye myself.
I changed the device: /dev/block/vold/179:1 for /dev/block/mmcblk0p1
That's all.
Bye
Herc. 8)

[Q] Improved Refresh-Rate on 2.1?

Per the Nookie Froyo thread they have a suggestion to increase the refresh rate to 68000 to stop/reduce flicker.
I noticed a similar flicker on "stock" 2.1 and checked /sys/devices/omapdss/display0/timings only to find out it is also set at 48000. I increased it to 68000, but it is reset after each reboot.
What is the proper refresh rate? Anyone else notice a flicker on the stock ROM?
jleecong said:
Per the Nookie Froyo thread they have a suggestion to increase the refresh rate to 68000 to stop/reduce flicker.
I noticed a similar flicker on "stock" 2.1 and checked /sys/devices/omapdss/display0/timings only to find out it is also set at 48000. I increased it to 68000, but it is reset after each reboot.
What is the proper refresh rate? Anyone else notice a flicker on the stock ROM?
Click to expand...
Click to collapse
what process did you use to modify the file?
paleh0rse said:
what process did you use to modify the file?
Click to expand...
Click to collapse
I used the following from the thread I linked.
Code:
adb shell echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
jleecong said:
I used the following from the thread I linked.
Code:
adb shell echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
Click to expand...
Click to collapse
Did you su and mount as r/w first?
paleh0rse said:
Did you su and mount as r/w first?
Click to expand...
Click to collapse
You don't remount /sys
so does anyone know how to make this stick after boot?
dennisi01 said:
so does anyone know how to make this stick after boot?
Click to expand...
Click to collapse
See the thread I just made: http://forum.xda-developers.com/showthread.php?t=901791
jleecong said:
I used the following from the thread I linked.
Code:
adb shell echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
Click to expand...
Click to collapse
Originally Posted by dennisi01
so does anyone know how to make this stick after boot?
See the thread I just made: http://forum.xda-developers.com/showthread.php?t=901791
Click to expand...
Click to collapse
Thank you both. Seems to work. Now I know how to run my own scripts afterboot.
Does that mean we add the
adb shell echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
Click to expand...
Click to collapse
at the end of the clrbootcount.sh text to have it run that command to fix the refresh and make it stick?
I did this (as I posted in the nook flicker thread):
I did a CAT on immediately after, and it had defaulted instead to 66461 instead of 68000 (maximum rate for the chip?)
Of course it also cleared upon reboot. Should I have seen a flicker improvement right away?
After clearing up all the posted suggestions listed here is what worked for me
greenmky said:
I did this (as I posted in the nook flicker thread):
I did a CAT on immediately after, and it had defaulted instead to 66461 instead of 68000 (maximum rate for the chip?)
Of course it also cleared upon reboot. Should I have seen a flicker improvement right away?
Click to expand...
Click to collapse
I also get 66461
------------------------
increase the refresh rate to 68000/66461 to stop/reduce flicker.
---------------------------------------------------------------------------
adb pull /system/bin/clrbootcount.sh
gedit clrbootcount.sh (assume you stay in specific dir)
add this to end of file and save
---------------------------------------------------
#run other commands
setprop persist.service.mount.umsauto 0
---------------------------------------------------
NEXT
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb push clrbootcount.sh /system/bin/clrbootcount.sh
adb shell chmod 755 /system/bin/clrbootcount.sh
adb shell mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
adb shell reboot
--------------
NEXT
adb shell - NOW AT THE su # PROMPT (HAD NO LUCK WITH THE ADB SHELL and then commands all in one line)
cat /sys/devices/omapdss/display0/timings
mount -o remount,rw /dev/block/mmcblk0p5 /system
chmod 0755 /sys/devices/omapdss/display0/timings
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
reboot
-----------------------------------------------
NEXT
cat /sys/devices/omapdss/display0/timings
66461,1024/70/200/40,600/10/11/10
----------------------------------------------
Three reboots and I still have the changes...
Read all the posting listed if you want/need more details....
here.david said:
adb shell - NOW AT THE su # PROMPT (HAD NO LUCK WITH THE ADB SHELL and then commands all in one line)
cat /sys/devices/omapdss/display0/timings
mount -o remount,rw /dev/block/mmcblk0p5 /system
chmod 0755 /sys/devices/omapdss/display0/timings
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
reboot
Click to expand...
Click to collapse
You do not need to remount /system to write to /sys, and if you have chmod at all (unlikely) it would not be 755, it would be 644.
here.david said:
I also get 66461
------------------------
increase the refresh rate to 68000/66461 to stop/reduce flicker.
---------------------------------------------------------------------------
adb pull /system/bin/clrbootcount.sh
gedit clrbootcount.sh (assume you stay in specific dir)
add this to end of file and save
---------------------------------------------------
#run other commands
setprop persist.service.mount.umsauto 0
---------------------------------------------------
NEXT
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb push clrbootcount.sh /system/bin/clrbootcount.sh
adb shell chmod 755 /system/bin/clrbootcount.sh
adb shell mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
adb shell reboot
--------------
NEXT
adb shell - NOW AT THE su # PROMPT (HAD NO LUCK WITH THE ADB SHELL and then commands all in one line)
cat /sys/devices/omapdss/display0/timings
mount -o remount,rw /dev/block/mmcblk0p5 /system
chmod 0755 /sys/devices/omapdss/display0/timings
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
reboot
-----------------------------------------------
NEXT
cat /sys/devices/omapdss/display0/timings
66461,1024/70/200/40,600/10/11/10
----------------------------------------------
Three reboots and I still have the changes...
Read all the posting listed if you want/need more details....
Click to expand...
Click to collapse
Tried all that and it did not stick. The final CAT showed a reversion to 48000. Still don't understand how the change to the clrbootcount.sh is supposed to make it stick but it isn't working.
DatterBoy said:
Tried all that and it did not stick. The final CAT showed a reversion to 48000. Still don't understand how the change to the clrbootcount.sh is supposed to make it stick but it isn't working.
Click to expand...
Click to collapse
It wouldn't. The change to the clrbootcount.sh only changes the automount, the change to the /sys var is completely temporary. I assume one could also put it in the clrbootcount.sh, assuming it isn't modified later by the system (negating the change made from the clrbootcount.sh script).
Yeah. not sure how anyone is getting this to work but i can't figure it out. As a warning, modifying the clrbootcount.sh and trying to incorporate the fefresh change script has force firmware into boot loop to needing a factory reset twice now. Wonder if anyone else had the same experience.
The flicker is annoying and the refresh change works, but just won't stick.
To get it to stick, follow the steps on my other thread http://forum.xda-developers.com/showthread.php?t=901791.
When you edit clrbootcount.sh, add the following to the end:
Code:
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
The final file (if you also want to disable automounting), will look like:
Code:
#!/system/bin/sh
##################################################################################
#
# File clrbootcount.sh
# Description Clear the bootcount variable to 0 on successful boot
#
##
# Run potential hook first.
/data/boot_complete_hook.sh
# Zero the boot count
dd if=/dev/zero of=/rom/devconf/BootCnt bs=1 count=4
#run other commands
setprop persist.service.mount.umsauto 0
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
While I've never really looked at this, but isn't the "refresh" "rate" largely irrelevant with LCD based screens? I'd always just assumed that even assigning them a "refresh" "rate" was just a place holder to make things work and not break CRT compatibility in drivers/display engines.
Did all this from a super clean root. Did not hold.
cutterjohn said:
While I've never really looked at this, but isn't the "refresh" "rate" largely irrelevant with LCD based screens? I'd always just assumed that even assigning them a "refresh" "rate" was just a place holder to make things work and not break CRT compatibility in drivers/display engines.
Click to expand...
Click to collapse
Don't know if that is true, but I have seen flicker on other LCD panels that could be addressed with refresh changes. The echo command does work instantly on the NC but just won't hold for me.
I have been playing with this and while the changes in clrbootcount.sh do stick, I'm unable to get it to either set the refresh rate or run a script that sets the refresh that I KNOW works from the terminal. Seems idealy this should be set in the ROM. Back to the terminal...
I should add I'm running 1.0.1 (Auto-Nooter 2.12.25) and also tried it in Nookie Froyo.

[SOLVED] Softbricked, Rooted Bionic.

TL;DR: can someone direct me to a custom recovery image for droid bionic that lets me turn on developer mode USB from recovery mode? does CWM or TWRP do this?
Long version: i thought i could run a game that wasnt running well by installing the chainfire 3D mod. nope. it softbricked, and my developer usb mode was off at the time. now im stuck at a black screen after the M logo.
the device is rooted, running stock. (4.1.2). i plan on switching to a modded rom when i solve this and back my stuff up.
i can boot into fastboot, and the stock recovery mode. through recovery i can get an adb sideload mode to enable, and it does connect properly to PC, but normal ADB commands do not work. i also have options for bp modes and stuff when trying to boot to recovery, but most of those fail to start.
i know that if i can acesss normal ADB mode, fixing this is a couple simple commands away. there's an uninstall.sh file already there i just need to run.
fastboot and the sideload adb mode both function properly. my PC drivers seem to be in order for now.
if there's a file i can sideload or a command that works in adb sideload mode that will uninstall this driver, im all for it. ive already located the code used in the uninstaller:
Code:
#!/system/bin/sh
mount -o rw -o remount /dev/block/mmcblk0p25 /system
stop
cat /system/lib/libGLESv1_CM_ORG_CF3D.so > /system/lib/libGLESv1_CM.so
chown 1000.1000 /system/lib/libGLESv1_CM.so
chown 1000:1000 /system/lib/libGLESv1_CM.so
chown system.system /system/lib/libGLESv1_CM.so
chown system:system /system/lib/libGLESv1_CM.so
chmod 644 /system/lib/libGLESv1_CM.so
cat /system/lib/libGLESv2_ORG_CF3D.so > /system/lib/libGLESv2.so
chown 1000.1000 /system/lib/libGLESv2.so
chown 1000:1000 /system/lib/libGLESv2.so
chown system.system /system/lib/libGLESv2.so
chown system:system /system/lib/libGLESv2.so
chmod 644 /system/lib/libGLESv2.so
#rm /system/lib/libGLESv1_CM_ORG_CF3D.so
#rm /system/lib/libGLESv2_ORG_CF3D.so
rm /system/lib/cf3d_uninstall.sh
rm /system/lib/cf3d_sh
reboot -f
reboot
reboot normal
toolbox reboot
busybox reboot -f
busybox reboot
busybox reboot normal
sadly, i know very little about android and not much about linux. kind of picking this up as i go. im not even sure how to turn that code into an uninstaller file, though im guessing its as easy as a text file with the correct filename extension. i feel like i'm missing something sort of simple that someone more linux/android knowledgeable would be able to share.
can someone suggest, if one exists, an alternate recovery image i could install that would let me browse and edit files on the system partition, or enable full adb mode?
edit: i've tricked the device into charging, so the 'low battery' issue so many bionic softbrickers end up with has been avoided. phew.
edit 2: i used fastboot to reflash only system.img (i knew thats where the bad file was,) from cdma_targa_9.8.2O-72_VZW-22_cfc.xml.zip. the result was what appears to be a proper fix. i just lost a few tweaks (like deleting that godawful startup sound), and root. but i've rooted it before. shouldnt be a problem. next will be a full backup, and adb install of better recovery tools.
marking as solved.

[How to] Set Selinux to permissive on boot

Everyone ecxited about xposed framework released for lollipop.. But there are many facing problems installing framework because of SELinux set to enforce by default.
You can check you Selinux status in settings - About phone
You can set the SELinux to Permissive temporarily by running the bellow two commands in Terminal emulator
su
setenforce 0
But it SElinux will change to default once you hard reboot your phone.. In order to keep it in permissive, you need to soft reboot always whenever reboot needed and it's quite annoying..
So I found a workaround to Set the SELinux to permissive on boot itself.
For this you need to have init.d support.. If you don't have just install it via universal init.d tool available in xda.. (just do a search, u will get it) install universal init.d and activate init.d..
Then go to /etc/init.d directory, create a file and rename it as "08setperm" (without quotes) and add the below lines in the file and save it..
#!/system/sh
setenforce 0
And give full permission (rwxrwxrwx) .. Use root Explorer to edit and give permissions..
Now hard reboot your phone and you can see SELinux is set to "permissive" on boot itself..
Now install Xposed framework by following the steps mentioned in the official xposed thread..
This method is tested in moto G and working fine for me... I'm not responsible for anything if happened with your mobile after trying this..
Ps: if you flash any new nightly or new rom, you need to add the file in to init.d directory again..
I posted this using my mobile. So pardon me if any formatting issues..
Hit thanks if i helped you..
Very obviously, can't set permissive on Galaxy S5. Hopefully soon though.
Thanks, I was looking for the enforce command to make a script. It worked perfectly for me on an S4.
LGtMgG2t said:
Thanks, I was looking for the enforce command to make a script. It worked perfectly for me on an S4.
Click to expand...
Click to collapse
Press thanks button dude instead of saying it..
Doesn't work on Z3 Compact (D5803) CM12 nightly.
Nexus 6
"Alright So i have everything down according to your installation guide, When i want to set the file "08setperm" is when root browser tells me that the operation failed even though it has SU Granted."
Okay so I did some tinkering, Got it to work Reboot but after the 2nd Reboot it Boot-looped, On my Nexus But it can work .
Scriptkiddie7 said:
"Alright So i have everything down according to your installation guide, When i want to set the file "08setperm" is when root browser tells me that the operation failed even though it has SU Granted."
Okay so I did some tinkering, Got it to work Reboot but after the 2nd Reboot it Boot-looped, On my Nexus But it can work .
Click to expand...
Click to collapse
Upgrade your root Explorer or super Su and try
Using the commands below should get permissive even after reboot
per http://forum.xda-developers.com/showpost.php?p=58887725&postcount=230
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "echo 0 > /sys/fs/selinux/enforce" >> /system/su.d/permissive.sh
chmod 755 > /system/su.d/permissive.sh
Zwulf said:
Doesn't work on Z3 Compact (D5803) CM12 nightly.
Click to expand...
Click to collapse
Which part didn't work? As far as I can tell, we don't have init.d support on the Z3 Compact yet. Was it the Universal init.d Tool that didn't work for you?
mattdm said:
Which part didn't work? As far as I can tell, we don't have init.d support on the Z3 Compact yet. Was it the Universal init.d Tool that didn't work for you?
Click to expand...
Click to collapse
CM has init.d support buddy.
aalupatti said:
Using the commands below should get permissive even after reboot
per http://forum.xda-developers.com/showpost.php?p=58887725&postcount=230
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "echo 0 > /sys/fs/selinux/enforce" >> /system/su.d/permissive.sh
chmod 755 > /system/su.d/permissive.sh
Click to expand...
Click to collapse
Doesn't work this way. You should have read following posts.
Solution:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Click to expand...
Click to collapse
Works!
Finally got a permissive system on reboot.
Edit: Doesn't help to get XPosed working on my Z3C though.
Another z3c here on the latest nightly, none of these methods even give me permissive status on boot...
EDIT: I lied I just had to install SuperSu
Solution:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Click to expand...
Click to collapse
This method worked for me also thank you sir :good:
Just dd the kernel partition and hex-edit the kernel command line (androidboot.selinux=permissive).
So i am using Xperia Z2 with CM12.
Now, the issue with this particular CM12 is that, in case if we do a soft reboot then xposed starts working but networks vanishes. The Network comes back upon a normal restart but with soft reboot the issue comes back.
I have used these steps to
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Make permissive survive a normal reboot but it doesnt work till i do a soft reboot. any help?
Exact same issue for me
I have same phone with CM12, when I soft reboot
1st soft reboot: no network
2nd soft reboot: screen goes black after unlocking the device
in last 2 days of multiple soft reboots, i got one soft reboot where xposed and network everything worked.
manu44 said:
So i am using Xperia Z2 with CM12.
Now, the issue with this particular CM12 is that, in case if we do a soft reboot then xposed starts working but networks vanishes. The Network comes back upon a normal restart but with soft reboot the issue comes back.
I have used these steps to
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Make permissive survive a normal reboot but it doesnt work till i do a soft reboot. any help?
Click to expand...
Click to collapse
Ok, so..
I want script who started on boot(set permissive), because i do not have soft reboot after every normal reboot to working Xposed. How to do it? I have CM12 Nightly on Xperia Z1.
If i wrote in terminal this script:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Click to expand...
Click to collapse
It's work on every boot phone or once?
Code:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Work cm12. No need soft reboot:good::good:
@UP:
Only wrote this in Terminal and all is it?
Rygiel98 said:
@UP:
Only wrote this in Terminal and all is it?
Click to expand...
Click to collapse
SuperSu + android terminal or adb shell

Zenfone 2 Laser [Z00T] ASUS camera to SD app script (ROOT) Lineage/CM (7.1.1)

This is a script based on this great post https://forum.xda-developers.com/showpost.php?p=70357867&postcount=734
I've compiled te steps needed for fix automation on this script, to spare some time.
First of all you need to be root to run this
You can run this script from any file manager (as root) no command line access needed.
Need to have ASUS camera previously installed, once the app is installed, just run the script (I have it saved on my SD card).
Be aware, after script finish to run your phone will reboot.
fixcamera.sh
Code:
echo "Fixing Camera..."
echo "Start..."
echo "Re-mount /system as rw file system..."
mount -o rw,remount /system
cd /system/priv-app
echo "Creating /system/priv-app/AsusCamera"
mkdir AsusCamera
echo "Updating permissions"
chmod 755 AsusCamera
echo "Copying AsusCamera base.apk to /system/priv-app/AsusCamera"
cp /data/app/com.asus.camera-1/base.apk /system/priv-app/AsusCamera
echo "Uninstalling Asus Camera"
cd /data/app/
rm -rf com.asus.camera-1
echo "Setting permissions"
chmod 644 /system/priv-app/AsusCamera/base.apk
res=`cat /system/build.prop |grep ro.epad.mount_point.microsd=/storage/sdcard1`
if [ -z $res ]
then
echo "ro.epad.mount_point.microsd=/storage/sdcard1" >> /system/build.prop
fi
echo "Installing Asus Camera base.apk"
cd /system/priv-app/AsusCamera/
pm install base.apk
reboot
Be sure to set proper permissions to script file.
It worked for me on CM 7.1.1 and Latest 7.1.1 LineageOs releases.
Haven't tried it with other Zenfone models, but you can take your chances.
NOTE: Asus Camera app will just dissapear on every update, so after every install, you need first install Asus Camera from market and run this.

Categories

Resources