[HOWTO] Soultion to Battery Issues After Restoring EFS - Galaxy S III General

People experience battery drain issues after restoring their EFS and have no clue why. I did too for several months until I found out the solution. I think many people are not correctly setting permissions after restoring. You may be able to make calls but you will still experience crazy multipdp and wlan wakelocks. Fortunately, there is a very simple solution that will solve this problem.
Connect via ABD or install Terminal Emulator from the PlayStore.
Type in the following commands:
su
chmod -R 777 /efs <--- (Keep in mind, the R has to be uppercase.)
exit
That's it. If you check the efs folder, you'll see that everything in the efs folder is accessible. Although, it isn't the most elegant solution, your phone will at least have access to everything it needs for it to operate correctly. You'll see a dramatic increase in battery life if you hadn't restored permissions previously.
Cheers.

Related

[GUIDE] How to fix the GPS issue on CM and others

Hi!
The GPS - issue (GPS searching forever, no fix, status bar does not even show the gps-icon) can be fixed by wiping the efs data.
This data is stored in partition 13 and partition 14 on the G2/DZ/DHD/MT4G.
Update 18.04.2011:
Given the tragic end of a phone because of a mistyped dd-command (see this post) i decided to create a tool to replace the original instructions. I leave the original instructions for people who are confident with dd and don't want do download something to get the job done.
So just to make this clear: Method 1 and Method 2 are alternative ways to do the same thing. I would recommend that you do it using Method 1 but anyways, don't do Method 1 and 2.
Method 1: Removing the efs-data using vision_wipe_efs:
Download vision_wipe_efs from vision_wipe_efs_01.zip (md5sum 7bced5385509a58a7c8b0a54d38a6897)
Remark: The program vision_wipe_efs will create backups of the partition 13 and 14 on the sdcard using the name "/sdcard/part13backup-<time>.bin" and "/sdcard/part14backup-<time>.bin" so make sure that the sdcard is mounted to the phone.
Unpack the zip file to a directory on your PC. Open a terminal (or command window) on your PC and change the current directory to where the files are on your PC and execute this command (as always: do not type the # it only indicates the root prompt in the shell or the $ as the prompt in a non-root shell):
Code:
# adb push vision_wipe_efs /data/local/tmp/
You can also use other ways to copy the file to this directory but the following instructions assume that it is there.
Get a root shell on your phone (either using adb shell or a terminal app) and then use the following command:
If your prompt is not # but $ then first do:
Code:
$ su
and answer the question of Superuser. (Well you should all know this by now )
Code:
# stop rmt_storage
# chmod 777 /data/local/tmp/vision_wipe_efs
# /data/local/tmp/vision_wipe_efs
# reboot
Method 2: Removing the efs-data using dd (BRICK RISK):
To do this you have to get a root shell on your phone (either using adb shell or a terminal app) and then use the following command (as always: do not type the # it only indicates the root prompt in the shell or the $ as the prompt in a non-root shell)
If your prompt is not # but $ then first do:
Code:
$ su
and answer the question of Superuser. (Well you should all know this by now )
Code:
# stop rmt_storage
# dd if=/dev/zero of=/dev/block/mmcblk0p13
# dd if=/dev/zero of=/dev/block/mmcblk0p14
# reboot
After you followed Method 1 or 2 should have your GPS back working.
To wipe the efs is general a good idea if you switched radio-firmware or the ril-libs (which might happen when you switch from one rom to another)
have fun - Guhl
guhl99 said:
Hi!
The GPS - issue (GPS searching forever, no fix, status bar does not even show the gps-icon) can be fixed by wiping the efs data.
This data is stored in partition 13 and partition 14 on the G2/DZ/DHD/MT4G.
To do this you have to get a root shell on your phone (either using adb shell or a terminal app) and then use the following command (as always: do not type the # it only indicates the root prompt in the shell or the $ as the prompt in a non-root shell)
If your prompt is not # but $ then first do:
HTML:
$ su
and answer the question of Superuser. (Well you should all know this by now )
HTML:
# stop rmt_storage
# dd if=/dev/zero of=/dev/block/mmcblk0p13
# dd if=/dev/zero of=/dev/block/mmcblk0p14
# reboot
After this you should have your gps back working.
To wipe the efs is general a good idea if you switched radio-firmware or the ril-libs (which might happen when you switch from one rom to another)
have fun - Guhl
Click to expand...
Click to collapse
please be careful with dd. (this isn't for you, op, but for the other hamfisted folks that try to fix things)
why are there HTML backets in your post ?
Perhaps it should be mentioned to do the inverse beforehand.. just to play it safe.
dd if=/dev/block/mmcblk13 of=/mnt/sdcard/p13backup
dd if=/dev/block/mmcblk14 of=/mnt/sdcard/p14backup
I'd still stop that service beforehand..
although I must say.. my gps is ****ing awful after this.. but meh.. it could just be the time/place/conditions.. and by awful.. I mean.. it locks on.. with an error of 305 ft.. sorta screwy.. nothing is as bad as when I tried to modify the gps.conf to use other servers (like my hd2).. i got a 2-3 mile error with 10 sat locks..
oh.. but this DID fix erratic gps behavior. and I'm betting that the accuracy will even out after a couple reboots/gpslocks.
ohgood said:
please be careful with dd. (this isn't for you, op, but for the other hamfisted folks that try to fix things)
why are there HTML backets in your post ?
Click to expand...
Click to collapse
Of course you are right. Be carefull to write the dd commands correctly. Later i will put a tool on my wiki that wipes the partitions without the use of dd.
Sent from my HTC Vision using XDA App
Did anybody use gps status app to download new gps data after trying this?
Sent from my HTC Vision using XDA Premium App
Alright, it worked, thanks. The notification even shows up in the notification bar now!
Sent from my SilverBullet "HTCDesireZ running CM7"
Just out of curiosity, what is the EFS data?
All I did to fix mine was update the kernal.
theSpam said:
Just out of curiosity, what is the EFS data?
Click to expand...
Click to collapse
Temporary (in our case) radio configuration data.
Nonentity018 said:
All I did to fix mine was update the kernal.
Click to expand...
Click to collapse
Lucky you. Sometimes updating, downgrading radio or kernel can lead to the effect that the systems re-initializes the temporary radio data.
Thanks for the tip but I am still unable to have my GPS work in CM after using this. I had no GPS problems with sense roms but have yet to get GPS working on any of the CM ones. I have tried reflashing numerous times with complete data, cache and system wipes alongside multiple radio/kernel reflashes but this just never works for me . Hopefully future releases of CM somehow get it working otherwise I will have to get back to sense
EDIT: Wow, as soon as I post this I decide to try reflashing my kernel one more time and lo and behold the GPS starts magically working! I did nothing different than what I hadn't already been doing but whatever I'm not complaining
What should be the output of the dd commands?
I got something about not enough space on the device error. I still continued with inputting the codes mentioned in the first post. Upon reboot GPS stopped working on me, it was working previously but really spotty. Ill give it some time until I flash CM7 final.
boost3d23 said:
What should be the output of the dd commands?
I got something about not enough space on the device error. I still continued with inputting the codes mentioned in the first post. Upon reboot GPS stopped working on me, it was working previously but really spotty. Ill give it some time until I flash CM7 final.
Click to expand...
Click to collapse
The errors messages that there is no space left on the device are OK.
The dd commands just writes 0's into the output partition until it is full.
Hello to all,
I've read several posts and tried several things now with no success.
I'm currently on CM7 Stable
Radio 12.28h.60.140fU_26.06.02.27_M
Kernel 2.6.32.28-cyanogenmod_g4f4ee2e [email protected]#1.
GPS symbol shows when launching navigation, but no result. It keeps looking for the location. I wiped the Radio data several times as suggested.
Last thing on my list would be flashing a new radio. Since I've read that it can brick the phone I'm quite cautious.
Any other suggestions?
This is how you tell if your GPS is gonna work or not even before booting the os. If you get that small vibration after the normal bootup vibration, your GPS will not work. Been doing research on this.
Staudamm said:
Hello to all,
I've read several posts and tried several things now with no success.
I'm currently on CM7 Stable
Radio 12.28h.60.140fU_26.06.02.27_M
Kernel 2.6.32.28-cyanogenmod_g4f4ee2e [email protected]#1.
GPS symbol shows when launching navigation, but no result. It keeps looking for the location. I wiped the Radio data several times as suggested.
Last thing on my list would be flashing a new radio. Since I've read that it can brick the phone I'm quite cautious.
Any other suggestions?
Click to expand...
Click to collapse
Changing radio solved my GPS issues, check my sig for the one I'm using.
I have changed my radio a few times since getting my DZ and have never had any problems. Just make sure you read the instructions a couple of times and check the md5 sum of the download and you will be fine.
I fixed it by uploading the gps.vision.so to /system/lib/hw/
But I used ADB instead of root explorer by using the following commands:
adb remount
adb push gps.vision.so /system/lib/hw
adb reboot
Originally Posted by slashjiang View Post
I tried to solve this issue by myself.
I extract the nightly build #34 (which GPS works in my G2), and compare it with #38 (GPS doesn't work), I found the file /system/lib/hw/gps.vision.so is different in both ROM. so, I tried to replace this file in my G2 with the same file which is from #34 by using Root Explorer, after reboot, GPS works. The icon in the notification bar appears.
Run GPS status, satellite signal found.
Run Google Maps, working too.
The gps.vision.so file from #34 is attached in ZIP format. Just download it, extract, and copy it to /system/lib/hw/ and replace original one. Have fun.
Hopes Cyanogen Team solve this issue. Thanks.
Click to expand...
Click to collapse
Just wanted to add that these commands didn't work for me. I replaced the kernal with pershoots and it fixed the problem.
Thank you. This worked for me after replacing gps.vision.so and I'm a total n00b. Much appreciated!
Thanks this worked for me.
Sent from my HTC Vision using XDA App

[Q] Issue - sqlite3 in Atrix

I'll start out by saying I'm not strong with adb but I'm learning the commands and I'm familiar with push, install, etc.
After unlocking my Atrix bootloader via the instructions on briefmobile, I restored my backup from Titanium Backup. This caused an issue with my security settings, which is a known bug. The fix is detailed in this thread: http://forum.xda-developers.com/showpost.php?p=12567301&postcount=8
After I get into the adb shell and get su access, I tried typing sqlite3 and the database only to get back "sqlite3: not found". It doesn't appear to be in ls under system/bin either.
I'd appreciate it if someone could tell me what I'm doing wrong or how to install sqlite3.
Thank you
Hi,
The same is happening to me.
sqlite3 not found...
any help?
thanks
Use SQLite Editor from market and go to the said db file.
Do a search on xda for SuperOneClick.zip there is a sqlite3 in there that you can push into /system/xbin then it will be available.
I solved the sqlite issue with sqlite editor after reading pilotboyshorty's thread that solved the Titanium backup bug with the finger sensor.
http://forum.xda-developers.com/showthread.php?t=977600&page=2

[q] urgent help is needed, too many pattern attempts

Hi, i need a fix for this and fast !!! I've tried all that is listed on xda about this issue, but to no avail. Anyway, i forgot my pattern and went to the forgot pattern menu. My wifi was off, so i figured it would give a prompt of some kind to turn on the wifi and then log on to my google account. But nooooo, google supposes that everyone's wifi is on all the time. Please help, what do i do ? I rebooted to recovery, i made a nandroid and currently i am adb pulling the twrp folder from my N7. I would have just factory reseted it, no probs, but i remembered i have some EXTREMELY important works in colornote that i can't afford to lose. Please help, what do i do ?????
Looks like you answered your own question. Unless your Android isn't encrypted, just boot into TWRP and backup your data using adb:
adb pull /data/data C:\backup
Click to expand...
Click to collapse
The main thing you will have to concern about is restoring those data and make it readable by the app. There are several ways, but you can either:
adb push C:\backup\colornotes /data/data/colornotes
Click to expand...
Click to collapse
Don't forget some devices you need to give it write permission first: adb remount rw, though should not be needed with TWRP. Or just copy the folder back using a rooted file manager.
Then go into adb shell and fix permission of the files so the app can get access to them:
adb shell
su - (again shouldn't be needed wile in TWRP)
chmod -R 644 /data/data/colornotes (or 777 for full access)
Click to expand...
Click to collapse
Tips while in adb shell:
Check permissions of files by typing: ls -la
Check what partition is mounted and whether you have write privilege to it by typing: cat /etc/fstab
Also, if you use a custom rom like CyanogenMod or AOKP, there is an option to enable all widgets on the lockscreen. Just put the Power Control widget on the lockscreen, then you can toggle WiFi on and off. (Can't remember if this is also possible with stock.)
Have fun.
OR have a look here.
Looks like either of the two methods suggested would be feasible with only a recovery running, but the 2nd one is easiest (as a custom recovery wouldn't necessarily provide a statically-linked sqlite3 utility).
if it works it doesn't require any wiping.
BTW guess how I found this.... wait for it .... wait for it.... wait for it.... I used google search.
Hi, i forgot to mention that i made the twrp backup while i was locked out and whenever i try to restore from the backup after a factory reset, it goes back to square one... And when i did a full wipe and hoped to use titanium backup to extract stuff from the nandroid, it just gives me and empty list, but the backup is there, all 5gb of it
iAndroidOS said:
Hi, i forgot to mention that i made the twrp backup while i was locked out and whenever i try to restore from the backup after a factory reset, it goes back to square one...
Click to expand...
Click to collapse
Well, that is to be expected, is it not? You are restoring exactly what is already there - effectively a no-op.
OK, I just booted into TWRP (2.4.1.0) and confirmed that the (equivalent of the) following disabled my pattern lock on the next boot:
cd /data/system
mkdir foo
mv locksettings.* foo
mv gesture.key foo
I did all of the above (the 'cd' command is implicit) using TWRPs touch interface - didn't even need adb.
ymmv as I am using jdq39/4.2.2 and my tablet was not in a "locked-out" state, but its an easy thing to try.

[SOLVED] Using Terminal Emulator to write to system

Not sure if this will help anyone else, but I searched forever trying to figure out how to write into the system folder using Terminal Emulator on the Note 3 to no avail. I found a slew of posts that said to type "mount -o rw,remount /system" to achieve this. When I used this command it didn't return any errors so I assumed it worked, however no files ended up being copied and pasted to the location I wanted. I found numerous other examples that were supposed to enable writing to the system as well, but none of them worked. I finally figured out how to get it to work on my Note 3 by typing "mount" in terminal emulator and noticing that at the very beginning of the string that was returned was "rootfs". So if you are wanting write to your system using Terminal Emulator on the VZW Note 3 here is what ended up working for me:
Code:
mount -o remount,rw rootfs
to return to read only enter:
Code:
mount -o remount,ro rootfs
I wanted to figure this out because a bug in TWRP v2.6.3.0 maimed my efs partition and bricklooped my phone. Even flashing the Stock Developer tar by Beans wouldn't bring it out of the brickloop. I was able to get out of the brickloop by following this thread, but even though my phone booted up and the IMEI # was correct, my /efs folder was missing in action. This caused odd things to happen like my lock screen not functioning and the power button instantly turning the phone off instead of bringing up the power menu. I discovered this was because the phone was placed into something called "factory mode" and that to fix it you needed to edit some files in the efs folder, which were completely missing on my device. Member js0uth graciously sent me his efs folder from his Developer Note 3 and when I copied it to my phone it began to function normally again (big shout out to js0uth!). However, this folder was completely deleted once again after a reboot. So now you can see why I was looking for a way to copy these files using Terminal Emulator. I ended up making a Tasker profile with the Secure Settings plugin that automatically copies the files from my ext SD card to my system folder on boot of the device. In order to mount, copy/paste the files while retaining the correct permissions from the folder that js0uth sent me, and unmount the system I had the set up my Secure Settings command as follows:
Code:
mount -o remount,rw rootfs;cp -Rpf /storage/extSdCard/efs/* /efs/;mount -o remount,ro rootfs
So now I have a livable workaround for my problem until I can discover a way for the phone to rebuild my own /efs folder.
Edit: See radionerd's post for a permanent fix to this issue and be sure to hit thanks under his name if it helps you.
I did the same to my DE. Corrupted EFS about a month ago after a few flashes using TWRP 2.6.3.0. Boot loops for 28 hours of hell until I followed your tracks to the trick that deleted my corrupted EFS folder, and created a new empty folder. I guess this would wipe out IMEI, Mac, and more in models that store phone specific data in EFS. We lucked out I've read that our phones have that info in a few other folder not EFS
Since wiping EFS I have run stock ROM, CM11, and now bean V6. I didn't see the factory mode popup until recently. I noticed that the screen will flash when leaving or entering cell service.
My corrupted EFS was 3MB. I'm curious what's the size of the EFS folder from js0uth?
Were you able to enter the factory mode on string? something like this?
Code:
# echo -n ON > /efs/FactoryApp/factorymode
this is from an S3
Thanks for documenting your steps to recovery.
radionerd
radionerd said:
My corrupted EFS was 3MB. I'm curious what's the size of the EFS folder from js0uth?
Click to expand...
Click to collapse
It's 1.04 MB. Sorry for taking so long to respond. I thought I had it set up to send instant emails for replies to this thread, but apparently I didn't.
radionerd said:
Were you able to enter the factory mode on string? something like this?
Code:
# echo -n ON > /efs/FactoryApp/factorymode
this is from an S3
Click to expand...
Click to collapse
Setting the Factorymode folder to ON is actually what disables that mode. Seems backwards I know, but when it's set to OFF (or if the folder is completely missing as in my case) that warning message will display. If that folder is intact on your phone then you should be able to use a string to disable or enable Factorymode.
It got worse before it got better
bodieism said:
It's 1.04 MB. Sorry for taking so long to respond. I thought I had it set up to send instant emails for replies to this thread, but apparently I didn't.
No worries, I went from an annoyance of no lock screen to bricked for over 6 weeks. This happened after trying to do an EFS backup.
I've learned a lot since back then, My DE is back 100%, EFS is repaired. I think we ran the same script which actually points to the wrong mount in our phones. It brought us out of bootloops, but efs was pointed to block12. Qualcom snapdragon Note-3's use mmblk0p11 to load /efs.
If you still have to load the tasker script, I think I figured out an easy fix to rebuild your original efs folder.
I would backup mounts first, delete /efs folder. Then run the original script, but this time change from 12 to 11.
Code:
adb shell
su
mke2fs /dev/block/mmcblk0p11
mkdir /efs
mount -t ext4 /dev/block/mmcblk0p11 /efs
Bet that would do the trick
Here is my thread
Click to expand...
Click to collapse
^ That did do the trick! :good:
Phone is back to 100% working order :highfive:

Guide: Fix for high battery drain and CPU usage

How to fix always maxed CPU usage and its result, high battery drain.
Whats the reason?
This is due to some "program" that tries to log something, unfortunately, this process takes up all CPU capacities.
I have encountered this issue (after Nandroid Restore) and I thought it might by worth mentioning. It not only happens after Nandroid Restores, as my friend reported.
What you need to fix this:
You will need a rooted device, and a file explorer (root explorer)
Optional: Any terminal emulator, and busybox (just for diagnostics)
How to fix it:
Just start the explorer, and navigate to
Code:
/system/bin
and there search
Code:
logd
. Rename this to
Code:
logd.bak
and Restart
Optional diagnostics (or if method above doesnt change anything: Start your Terminal Emulatorand type this:
Code:
su
then
Code:
busybox top
This will give you all inforamtions about the running processes. If you see another process (very unlikely) that takes up much CPU capacity, and you dont need for ANYTHING (like that logd thingy) you can do same thing as above (just track its path)
Hope I helped you. Thanks

Categories

Resources