[SCRIPT][INIT.D]Configurable shell script pack - T-Mobile Samsung Galaxy S II SGH-T989

Just posting this here if anyone wants it.
Basicly its a configurable, multifunction script pack thats designed for user-level customizability
With a WIDE variety of options & some perks to other packs, like advanced permissions scanning,
An 'improved' ZipAlign section, Fast load times, no duplicate sections lmfao
For advanced permissions, it can take the directory you specify, record owner, group, & permissions
Of every file in it, & record it to database, & execute whenever you need, whether that be on boot, from console
Or whatever (& yes, it detects links & subdirectories) Its even capable of full-recursive scanning
Zipalign now adds filesize to db, simply put, now even if the apk exists in db, it will cross check the size & go from there
(Why just check a name?)
By default, script starts with 4 configurations when installed, 2 user, 2 script based
Script based hold configurations for forcing updated system apks into system & fixing data
& setting priorities, user configurations hold the majority of user options, & the secondary config is capable
Of enabling the 3 added userlevel configs, (net settings, vm settings, & CPU)
These 3 are not enabled by default as some of the settings contained can cause issues & is completely
Up to the user.
To make it easier editing the configurations, once installed, if you have a program like BTEP, simply open it & type
'sf config' in root mode (su first), this will start the Configuration utility which is basicly the menuscript i posted about a week ago
With some work done to finish it lol xD
The menu is fully customizable in every aspect straight from configuration
By default scripts install to '/system/SuperFly' but the path is fully customizable aswell
Configurations are (default) '/system/SuperFly/SuperFly.prop' (main configuration)
'/data/SuperFly/SuperCFG.cfg' (secondary, all other user configs will spawn here when created)
All script based configs (by default) get processed from '{INSTALLPATH}/Config'
Scripts should work on almost any device out of the box, but is locked to GSII
Remaking is as simple as editing one script (all modified links are stored in one override)
Script is multi-core compatible (1-4 cores)
**NOTES**
- Script will remove ALL current init.d scripts (most will be moved to '/data/local/userinit.d' & will be executed AFTER load to
Avoid conflicts)
- This WILL replace bash binary when installed (script utilizes native functions not included in standard ARM compiled
Bash)
- Installer is >7.5mb, as it includes all needed binaries/sources needed to initialize propely, if this isnt ok with you,
Dont install.
- Script features an ARM compiled p7zip binary (7za equivelant) aswell as 2 shell scripts to make it easier processing archives via commandline
The binaries main purpose is backup/restore functionality & is not technichly required to install, but you WILL lose functionality if removed.
- Script started as a rom specific script, & slowly got adapted for multi-base/multi-device, & has made its home on 4 different devices
Meaning, you might see options that dont really pertain to your device or have Zero effect, this WONT be fixed, i have no plans
For a device-specific build, as i currently run it on 3 devices. & it has zero effect on load.
- i make no garuntee that this will not harm your device, there are some advanced options with powerful effects
& the worlds full of stupid people, alls i can say, is nandroid first.
- Most importantly, feel free to use the pack in any way you wish, whether it be disect it, perfect it, wreck it
Use it, add to it, use it in your project, etc. Just make sure you remember where it came from
& if you have suggestions/tweaks/concerns/etc, just send me a pm, im not on all the time, but usually once a day or so.
- if you want an override for another device, just request, i only got about 4-5 done but their easy, & pretty much all
Similar.
- Script does NOT use standard logging, for the specific reason, it allows disabling the logger, so on errors, would be kind
Of difficult to pinpoint the issue, instead, we just echo the time & specific section to file.
**INFO**
This script started as a pack release back in 2k10 & was scrapped when i just had 2 much on my plate xD
I decided to pick it back up again about 6-8mths ago as a side project & since then is only worked on on the go, meaning
I only work on it when im bored & either on lunch, or omw home xD & has yet to see a PC (only developed using
DroidEdit pro & BTEP (better terminal emu pro)), & i dont dedicate much time to this.
**The script is NOT perfect, & with my lack of time, some parts are not a priority,
Eg:
Descriptions for secondary configs in menu, updating readme (its old as hell), Writing a proper changelog, etc.
il probably add more info later, my battery is almost dead n still got about 30min til i get home xD lmfao
Any questions just ask
To install: download zip
Copy to /sdcard
Flash in recovery
Reboot & configure before next boot
Script has been proven to work on CM9/10, Tw, & sense based roms
You will notice one weird file in root of zip, dont recommend deleting..
Script is capable of reinstalling/updating itself without going to recovery, but needs that configuration to do so,
On first install it means absolutely nothing, basicly just gives user another option, but requires full install to do so.
Download here:
http://db.tt/nQtZwdI
& install via recovery
**edit
Added zip to attachments, for ppl who couldnt access dropbox

Related

[GSM + CDMA] BeatsleigherRootHelper/Gainer| Gain root acces the easy way, with this!!

Welcome to the original thread, of Beatsleigher's Root Helper!!​
This program is completely free, with no Xtra options for donators...
What this program will do:​Well this program is designed for beginners, and advanced users. It has several modes; If you like to do everything yourself, then Ok, you can. If however you want Windows to do everything, it will.
If you need to setup ADB drivers, then follow the steps, in the ADB -> Help menu!!
List of features:​Several Reboot options,
Backup/Restore
Unlock bootloader (fastboot)
Relock bootloader (fastboot)
Root (ADB+fastboot)
Flash recovery (fastboot)
All-in-one solutions
Complete make over, now using a GUI!
Very explicit detailing of what the program is currently doing!
Install drivers - (USB + ADB/fastboot drivers)
List of ROMs/kernels
Help menus
What's to expect:​In-program E-Mail subscription, to get notified about updates.
Better IE Engine for XDA Link.
Context menus, for faster checking of radiobuttons.
Maybe adding an advert or two. Because I am now slowly but surely needing more money, for phones, so that I can program programs like this, for them.
Maybe re-add the main menu music. But, with music, that is a bit more calming... And not House ^^
A fully functional fastboot menu.
A user experience program, so I can collect feedback!!
Working progressbars.... (-.-")
FAQ:​Q:When installing the drivers, why do I need to change my system configuration?
A:You need to configure your machine, to notice the device, but to leave it alone, instead of looking for, and downloading drivers for it. This just confuses the computer, meaning you can't do anything in the bootloader, because Windows Update doesn't yet have the needed drivers...
Q: Why have you gone over to making a GUI? The batch files, were just fine...
A: I'm going over to making a GUI, because it is easier to use, less work. And I have the option, to just, drag & drop a button, write two lines of code, to make the button functional and then it's just a matter of creating the batch file, converting it to an EXE. Easy as pie. Whereas, with the batch files, to create one more option, you have to write 6 lines of code, then the batch file, and then half of the stuff doesn't work properly, because you didn't debug... If you know, what I mean...
Q: Why are there so many files???
A: This program needs so many files, so it can perform different processes/options/tasks
. But it isn't hard, to find out, what file, does which job
Q: Why is there only a version for windows??
A: I am working on a version, for Mac users, but it will take some time. I'm glad to be nearly finished, with the Windows version
Q: I want to donate to you, but you won't allow it. Why?
A: I don't accept any donations, because I only wrote the program to flash files on to your phone... I don't want to take credit for things, that other people did.
Instead of trying to donate to me, donate to chainfire, ChainsDD, and Kousik Dutta; for creating such brilliant recoverys, Apps (like superuser and ROM Manager) and ROMs...
BTW: If you really want to donate (which you won't ), you can send me some albums ^^ I need house music, to work.. And all my songs/albums have been listened dead -.-
Q: Do you mind if I use this program for commercial use, and post videos(tutorials) on Youtube?
A: As long as you DO NOT create mirrors, and let me know, I'm not that fussed... But then please post the link of the video to me, so that I can tell you if I like the way you did it, or not.
Q: When are you gonna stop talking about things, that don't interrest anyone (the FAQ)??
A: Now, but still thx for reading, other good questions will be posted here, aswell...
Thanks:​Many thanks to Kouschik Dutta for creating the recoveries for near-to all Android phones. Yo the man!
And not to forget the awsome app: ROM Manager ^^
Thanks to my good friend Accendare (baddinski), for creating the splashscreen. I appreciate it much
Thanks to Google, for creating the AOSP, for the great developers, to create even greater ROMs, for us!
Also, thanks to Google, for buying Android, and making suh a (rather) bug-free OS!!
If I forgot anyone, please let me know immediatly!!
Downloads:​
If you want to flash stock firmware, you will need to install this. This contains all the neccessary files/folders you need:
GSM: to be downloaded, by clicking this...
CDMA: to be downloaded here...
Ok, we've done it!! (I've done it...) We've gone out of Alpha.
We beat the beta!
Now, I'm proud to present; Beatsleigher's Root Helper... VERSION 3.0.0.8!!!!!!!!!!!!!!!!!!
Each and every script, has been either re-written, or has just gotten a makeover!!
Everything unneeded, has been removed, It's more compatible, with Windows XP, loading time has gone down!!
I've added a few options, but not that many, to make a big changelog...
To upgrade/update, please, copy ALL the files, you created/copied/moved there, to a safe place, on your hard drive. Then, delete "C:\Beatsleigher_root_helper"
Run the installer (It's contained in an ISO image, so, download PowerISO, should you not ahave an image mounting system...) and done!!
Download here
Screenshots:​View attachment 967846 View attachment 967847
View attachment 967848 View attachment 967849
View attachment 967850 View attachment 967851
View attachment 967852 View attachment 967853
View attachment 967854 View attachment 967855
View attachment 967856 View attachment 967857
View attachment 967859 View attachment 967860
View attachment 967861 View attachment 967862
View attachment 967863 View attachment 967864
If you want to see more, download it
Installer:​The installer will install to your C:\ drive. Some older scripts, are still working with "%homedrive%" so, to make sure, that everything is working, please make sure, that your homedrive is your C:\ drive. Or, if you have a seperate C:\ drive (like me), copy a copy, of the "Beatsleigher_root_helper" folder, to your homedrive. Then it should do the trick. By the tiome, the program is released properly (full) all scripts should be working with "C:\".
Should you have NOT got a C:\ drive, because your homedrive is named differently/you deleted the C:\ partition, see: installation help.
EDIT: The installer has been split in two!! They are both in an ISO image... Once mounted, the secondary installer will run (setup.exe). Just open the virtuall CD-ROM, and run "Install.exe"
Requests:​If you have any requestes (features, etc.), please PM me, or send me an E-Mail!!
Or, visit: This page
Please read!!:​Sorry for not updating this thread, as much, as the GSM thread. If you want to stay up-to-date, then click here every now and then
Changelog:
Version 3.0.0.8:
Full release, no BETA, anymore...
Two installers, instead of one...
All scripts have been re-written or have had a makeover...
Version 2.6.5.7 [Minor 3]:
Some tweaks and additions... Mostly hidden...
Some preparations, for full release.
Next version will be 2.7
Version 2.6.5.5 (BETA) [Minor 2]:
Added some juicy developer features! (Using the ADB shell)
A few options, for n00bs, are in there, aswell...
Added options, to the ADB menu.
Added a complete new form. (Dev. options)
Added a few more scripts. Making the update zise about 6MB, on your HDD
Removed some buggy code.
When navigating, from ADB menu to Dev. Menu, ADB menu closes, but can be re-opened from the "File" menu.
Dev. menu has also got CPU/RAM usage detector!
Download, for more changelog
Version 2.6.5.4 (BETA) [minor]:
Working progressbars (!!!)
ADB menu got a makeover.
Added CPU/RAM usage detection
Added option to enable/disable CPU/RAM usage detection in fastboot menu.
Fixed bug in ADB help menu.
Added options to the m,ain menu...
The rest has been forgotten, or you're ment to download the program, and check for yourself...
NOTE:
If you are interested in downloading this product, please download version 2.6.5.3, install and then download/install 2.6.5.4.
Then you can be rest assured, that everything is working as good, as it should in the BETAphase, of a program
Version 2.6.5.3 (BETA):
Removed bug that caused phone crash, whilst prompting device name.
Cleansed the code.
Removed two un-used forms.
Repaired the menustripbutton.
Added scripts, to update package.
Removed other scripts, from update package.
Compressed some, of the files (drivers, executables)
Using traditional installer, again.
Installation path set to: C:\Beatsleigher_root_helper\
Version 2.6.5.2 (BETA):
Fastboot menu fully working.
Fastboot help menu, is popping up/has been created, though it has no content.
ADB help menu is working/all buttons have a task.
Some unneeded code has been removed.
A complete list of ROMs & kernels is present (CDMA + GSM).
No change in the IE engine...
All messages giving a tone/sound.
Options have ben added to the ADB menu.
New all-in-one solutions for ADB menu.
Scripts have been edited, for more friendliness
More tooltips.
Progressbars still not working ( )
Maximization has been disabled in ALL windows.
Better usage of RAM, whilst opening other exe - files
Version 2.6.5.1 (BETA)
Added update check-support.
Changed file hoster to mediafire (updates coming from there)
Added ADB reboot options.
Fastboot reboot options working.
Added (hidden) features.
Using a proper installer.
Can be installed anywhere on HDD, will work anyway
Two packages are to be downloaded, not one. This ensures, that updates are working, as planned.
(Hidden features will be released, when version is 2.6.5.3 (next update) )
Version: 2.6 D:
Everything you see, down the bottom is working.
You can now flash a recovery via fastboot menu!!
Kernel and ROMs, I have decided, to take them back out. They were a bit buggy...
The size of the EXE itself, has gone up to, ca. 2.4 MB.
Option to flash stock ROM (LTE + GSM) has been enabled, for fastboot.
Looks a bit more friendly
Icons have been added!
You'll have to find the rest out, yourself
Version 2.6C:
ADB menu has been carried on. You are now able to flash a kernel (LTE & GSM)
It will open the Explorer for you, when you need to copy the file!!
LTE menu is finally working!! It had problems opening, due to a minor type-error.
Though the LTE menu is working, you will only be able to use one button, in about an hour. Once I've completed doing the ADB menu...
(See: "What's to expect", for more info's on what's coming!!)
Version 2.6:
New GUI!
Complete new code.
In-program help.
Direct link to thread.
Seperate fastboot and ADB menus!
More explicit details...
Removed the music, that pops up, upon start. (To many house haters )
All batch files converted to executables... (This prevents tampering with the code)
Fully compatible with 64x machines. Doesn't use as much RAM, but therefore shows up as a process.
Installation help:​
Not much can go wrong, when install9ing this program.
Mostly, the reasons, of failure, to use this program, are due to:
Not having a C:\ drive.
Not copying a copy of the root folder, to hamedrive, if C:\ is not the homedrive, of your windows machine.
Tutorial 1:
Problem: I installed the program, but my homedrive is not C:\. I installed to C:\, but I can't use half of the program.
Well, first of all; sorry, for this. I could of said this earlier... I forgot to edit the scripts, to use ONLY the C:\ drive, so it useshalf the C:\ drive, and half your homedrive. But, that's why I posted this tutorial.
It's quick & easy ^^
Tutorial:
Install the program, to your C:\ drive. Close the installer, and re-open it.
Once back in the installer, set the installation path to your homedrive (Where Windows is installed).
Install to that directory, and done
It should now work ^_^
Tutorial 2:
Problem, I don't have a C:\ drive, and the ROM-Full/Less version, isn't available for download... What to do??
This is also no problem!! With a few, simple clicks of your mouse, we will fix this minor problem
Tutorial:
Type following key-combination, on your keyboard; START(WIN)+R.
The "Run" prompt should now pop up.
In the RUN prompt, type: "diskmgmt.msc" and it enter.
Once the disk manager pops up, shrink your homedrive(or, if you have unalocated disk space, which is 3GB or more, right click on that)
Shrink your homedrive, about 3GB. If you can, allocate more space, because you will need quite some space, because of stock ROMs/custom ROMs/kernels and backups.
To shrink, right-click on the partition and select "Shrink Volume". Enter this amount, to shrink: 3072 MB, that should be 3GB. Like I said, feel free to allocate more space.
Now you should see a black field. This is unallocated disk space. Right click on this space and select" Create simple partition" Make sure, you create the exact space, you shrunk, other wise, you will have some unallocated space, on your HDD and this can cause problems, if unnoticed.
Name the partition : C:. Wait, for the Diskman. to create the partition (can take up to 5 Minutes, for that amount of space, depending on size of HDD, CPU clock speed and amount of RAM).
Now, just install Beatsleigher's Root Helper to your C:\ drive and again, to your homedrive. Done! You can now use Beatsleigher's Root Helper.
If you should notice any other problems, please let me know, so I can solve them.
EULA:​Please read the EULA, should you not have, during installation. Or, you are interested in installing the prgram.
There is vital information, in this text document!
This post will be used for announcing updates and changelogs!
The first update, to be announced here, will contain some CDMA kernels and ROMs... They will all get QR-Codes, so you can download them directly on to your Android, if neccesary!
Only use this package to root your phone and flash recovery!!
The other images/ZIPs are on their way!! Before I get told off, for not telling you this.... I am making a package, that will delete all GSM files!
This reduces size, and no one gets confused!!
Cool. 400mb is the reason I wouldn't download it. Opinions:
Remove the extra crap. Include just your code.
Create a folder /flash and instruct people to just throw stuff in there. Then code your app to read and list the contents of that folder (If that's even possible).
Your program can't be more then a meg or two itself. This way people can just download your tool and flash whatever. It then won't ever be "outdated" with old files. Streamline it and it'll catch on.
EXT LTE Galaxy Nexus 4.0.3
Transformer TF101 ICS
player911 said:
Cool. 400mb is the reason I wouldn't download it. Opinions:
Remove the extra crap. Include just your code.
Create a folder /flash and instruct people to just throw stuff in there. Then code your app to read and list the contents of that folder (If that's even possible).
Your program can't be more then a meg or two itself. This way people can just download your tool and flash whatever. It then won't ever be "outdated" with old files. Streamline it and it'll catch on.
EXT LTE Galaxy Nexus 4.0.3
Transformer TF101 ICS
Click to expand...
Click to collapse
That's a good idea
I'll try and do something like that
player911 said:
Cool. 400mb is the reason I wouldn't download it. Opinions:
Remove the extra crap. Include just your code.
Create a folder /flash and instruct people to just throw stuff in there. Then code your app to read and list the contents of that folder (If that's even possible).
Your program can't be more then a meg or two itself. This way people can just download your tool and flash whatever. It then won't ever be "outdated" with old files. Streamline it and it'll catch on.
EXT LTE Galaxy Nexus 4.0.3
Transformer TF101 ICS
Click to expand...
Click to collapse
Have done Even though it took a bit longer, to get here... Sorry, about that...
I just kept on forgetting, to update this thread. But it will be different, from now on

[Tweak][V2.4] Extend your Battery Life - init.d, build.prop and everything

(To any visitors to this thread,
Please Rate this thread based on your reading and tweaks that I provided. If the rate is too low, that means I'm doing a bad job in here! If the rate goes down below 4 stars, I'll stop providing these tweaks! So, please excuse me. Please don't rate this thread with the only reason that I do not provide the tweaks for your rom, which you are using! I'm using my own time for this just like lots of other users. Only the thing that makes me more happy and get focused on this would be your rates and 'thanks' on this thread)
** All the information in here is for informational purpose only. I'm getting lots of new requests and great feedbacks but I can't handle everything. Please don't ask me to do anything. If anything is causing a boot loop or force closing in here, I'll drop those contents. But be sure that any other rom users beside of rooted Stock ICS, don't try this and don't ask me to do anything.
Please don't post your battery life in here if it's not from the Stock ICS. This is not a place to show-up or for any competition. This is a place to show-up the battery life before and after the tweaks.
Currently supporting ROMS - Any sfhub's rom, any Calk's Rom, any Agat's rom, VeNuM_ICE_Rom_RL5.0, MIJJz BLEND ICS, AnaKonda Rom ICS, etc....
Now flashable zip files are available at http://forum.xda-developers.com/showthread.php?p=26201865#post26201865
*Note* Please read the second post also for quick install guide, Q/A, progress report, issues and change logs.
Maybe some of you already know that I was working on the tweaks to extend the battery life. In here, all the information is based on my experimental test and its result. Personally I spent lots of time for this stuff and to get the longest battery life. So, if you believe this information is not helpful, please don't blame me and don't even think about trying these tweaks.
But if you want to give it a shot, I would be more than happy to help you to get the better result.
Rule of thumb: Do it with your own risk and don't ask me to buy you a beer because you're doing it. But, if you like this info and/or you see any longer battery life of your phone, please don't hesitate saying 'thank you' and/or consider to buy me a beer.
I'm ok with not leaving any comments and just taking this tweak and recommendation but don't use this info in any other places with 'copy and paste' style.
OK. Now let's get started.
1. Who needs this tweak?
2. What do you need?
3. How to run init.d scripts?
4. what's in init.d scripts?
5. build.prop tweaks
6. Additional tweaks on your phone
7. Startups
8. Closing comments
1. Who needs this tweak?
If you are a heavy user or gamer, this place wouldn't be a right place for you. In here, I'm only focusing on extending battery life and keep it longer without recharging it under our daily usage.
Because it's really hard to save the battery during the screen on (awake status), I'm only focused on the battery savings during the screen is off or sleep (lazy) status. I've seen lots of battery drains during the stand-by mode and I tested lots of things to save the battery during this time frame.
Actually this was my first project working on this phone because I was never able to use my phone more than one day without recharging it before I started this project. In my location, almost everything is not good - so weak radio signal, 3G/4G is not enough to get the fast data speed.
Somehow, wifi is the biggest consumer of battery drain.
Guess what? I had to find out some way to extend my battery life.
I believe the information in here would be very helpful for the person who
keeps phone offline most of time
lives in bad signal area
reasonably think battery life is more important than performance (the performance with this tweak is still good but not best)
do not believe in battery saver apps
wants to experience the best battery life!
2. What do you need?
Most importantly your phone
init.d support (startup scripts during the boot)
Smanager if your kernel does not support init.d or install-recovery.sh
file editor like root explorer
root access, busybox (rooted phone)
init.d scripts and build.prop files (download)
3. How to run init.d script?
I've already posted one thread in here - http://forum.xda-developers.com/showthread.php?t=1610741 (thanks for the people who already left great feedbacks)
From there, you will find out how you can get the init.d script support during the boot and how to test whether it's working or not. If you don't have the Kernel that is not supporting init.d script or install-recovery.sh during the boot, you can also use the SManager tool to run the scripts in here during the boot.
4. what's in init.d scripts?
4.1 cpufreq_governor
21cpufreq_governor script sets the governor that contorls the CPU's thresholds and sampling_rates. I choosed ondemand governor and some values are changed from Calk's original script (big thanks to Calkulin and he provided some init.d scripts on his FD02 tweaked rom).
4.2 cpufreq_screenstate_scaling
31cpufreq_screenstate_scaling script defines the governor values and decides the actions based on the phone's state - conservative, ondeman, lazy, awake, sleep modes. I've changed lots of values from Calk's original script to save more battery power thru this script. As indicated in Calk's original thread for FD02, this script would not run if you have already installed some CPU control apps something like OC Widget, Quick Clock, SETCPU, and Android OC.
For both cpufreq_governor and cpufreq_screenstate_scaling scripts, I had to stay with maximum 1GHz CPU speed and it couldn't go down below 1GHZ because if it goes not below 1GHz, some of the apps could be force closed, frozen, or even you can see the random reboot. Especially, stock camera app and some other camera apps had issues running under 1GHz CPU speed (facebook camera, FX Camera Zoom). If you don't care about the camera apps and want to save more battery, then we can set up maximum CPU speed to 800 MHz and I had no issues with that except the camera apps. With 800 MHz setting, I saw more battery saving and battery life, but I'm not posting that script in here.
4.3 tweaks_kobridge
41tweaks_kobridge script has almost everything in it to improve the network speed, sdcard tweaks, other battery saving tweaks, VM management, Kernel, wifi tweaks, etc. For some of the values in here, there are some overlaps with build.prop tweaks. So, if you do not apply the tweaks to the build.prop file, many tweaks would still work.
4.4 zipalign
zipalign is an archive alignment tool introduced first time with 1.6 Android SDK (software development kit). It optimizes the way an Android application package (APK) is packaged. Doing so enables the Android operating system to interact with the application more efficiently, and hence has the potential to make the application and overall the whole system much faster. Execution time is minimized for zipaligned applications, resulting is lesser amount of RAM consumption when running the APK.
If less number of applications with an unaligned home application, you’d see slower application launch times. This is the best case scenario. For a worst case scenario, having a number of unaligned applications will result in the system repeatedly starting and killing processes, struggling with lags and huge battery drain.
4.5 Wifi Sleep Wait timer
In my original version of this tweak, it was required to manually insert the table row to use this tweak. But it's fixed and now you can use this tweak without manually handling the database.
What this tweak does is, it controls the time until wifi sleeps after the screen turned off. By default, it's 15 minutes. So, even you turned off the screen, by default, phone will wait for 15 minutes and then turn off the wifi. By using this tweak, you will have the control over wifi idle time until wifi sleeps.
5. build.prop tweaks
build.prop file is created while you flash the rom and /system folder will be totally replaced by your new rom. So, don't expect your tweak would be there forever even after you flashed a new rom (Every Rom format the /system partition before it's installed). If you have your own customized tweaks, then make backup those tweaks before you apply the new rom. After flashing new rom, those tweaks won't be there.
The file list needs to be backed up -
/system/etc/init.d folder and it's contents
/system/build.prop
/system/etc/install-recovery.sh (if it's there)
/system/etc/gps.conf (if you have GPS tweak)
Basically build.prop file defines lots of system values related to phone settings and those values are loaded to phone during the boot.
Because build.prop is created by rom, it holds some current rom's build related information. So, if you want to keep this file up to dated, whenever you flash the new rom, take the new build.prop file and compare it with this tweaked file.
Update the current rom's build.prop file based on your comparison -
1. don't update/replace any ro.build.xxxx and ro.product.xxx items
2. for any all other items, replace the lines with the items in tweaked file.
By doing above steps, I believe you've started already getting lots of battery savings. But there're some more critical things that could affect your phone's battery life. The below section is not directly related to init.d and build.prop tweaks but it's important as much as tweaks!
6. Additional tweaks on your phone
I've worked on this part so long time since I've started using ICS ROM. I also tried almost every battery saver apps but didn't get any better result using my own method because sometimes there are lots of overheads using it (I'm trying to avoid describing any individual app's pros and cons in here and just provide you the better way to configure your phone).
Currently I'm on FD26 rooted stock rom/modem/kernel. So, all the information in here is based on this rom but it's not limited to any specific phone or build. You could probably use it in anywhere.
1. Wifi
Some of you understand that wifi is faster than 3G and use less battery than 3G. You also say that 4G is the biggest monster consuming lots of battery. But that would be true and false.
Sometimes, wifi uses lots of battery to get the faster speed and keep the connection.
My suggestion is turning off wifi connection when you are in the area where wifi is not available and keep the 3G turned on. But if you are in the area where the wifi is available and connected, then you don't need to turn off the wifi.
Based on my and JC's test, turning on wifi (if you are connected to wifi), keeping wifi turned on during the standby or sleep mode does not affect the battery life a lot.
2. 3G
Keeping 3G turned on is a good habit. Because it covers wifi and 4G whenever those are not available. 3G uses battery a lot less than wifi and 4G.
Howto keep it on: setting -> more -> mobile networks -> check 3G DATA
3. 4G
Just like wifi, minimize turning on 4G network. This use a lot of battery if you are in the bad reception area. If the signal strength is really good, then it would be probably ok keeping 4G turned on. In some cases, 4G would be the only solution to watch the movies, streaming videos when the wifi is not available.
Based on my limited test, using 4G in good reception area is much better than using wifi with low/weak signal.
4. Call option
Mark checkbox for Turn on proximity sensor for your convenience even there would be a little battery drain. But if you are a heavy talker, then I recommend to uncheck this option.
5. Sound
Lower the sound/vibration level within the acceptable range for you. There would be some differences on battery behavior by turning off or on of sound/vibration. But I don't want to recommend anything in here because I don't want you to lose any incoming calls/messages/etc.
6. Display
Automatic brightness should be fine in most cases. It's really related to screen on time battery consumption. I don't want to deal with this option at this time.
Pulse notification light, display battery percentage - turn it on or off based on your preference. Battery consumption by turning on these options would be minimal. I saw that some people said that they recommend to turning off the 'pulse notification light'. But I don't agree with that. One blinking LED light almost does not use any battery!
display timeout - I set it with highest value provided. After using the phone, I manually press the power button to go to sleep mode. With short timeout value, I have to keep press the button or screen to keep the screen on. I don't like this method.
Turn on 'Auto adjust screen power'.
7. Power saving mode
I always keep this option off because I do not want to lose anything because of low battery. I would rather change the numbers in my tweak (battery profile 2 in scaling tweak).
8. Account and sync
Most of time, I keep this option turned off. This would be one of the battery eating monster. I would rather individually sync the apps whenever I need it or from the actual apps.
9. Battery
when you charge the battery and phone shows that 100% charged, unplug the cable few seconds and plug-in again to charger. Repeat this couple of times and your battery would be really fully charged. Many times, even phone shows 100% charged, it could be the minimum 100% range. Actually, there's some voltage allowed and considered as 100% charge. But by maximizing the voltage during the charge, your battery life could be extended.
10. Motion
Turn off this option if you don't need this.
11. email
If possible, turn off the option that pushing email immediately. Instead, put the retrieval interval as long as you can. Based on my test, it could extend your battery life as maximum as couple of hours. In my case, I put the 2 hours interval. By doing this, your phone is much easier to enter the 'deep sleep' mode.
7. Startups
For me, I don't allow the apps automatically start during the boot as much as possible. If it's the system app and critical app for the phone's normal operation, then you have to allow those startups but otherwise, you can disable the startup apps based on your test.
For this, I usually use Rom Toolbox and/or System Tuner Pro. These apps allow us to enable or disable the startup apps.
For any apps like I don't use frequently or at all, I disable the apps from the 'event' (rom toolbox) or startups (system tuner pro). Once you disable the startups, you may need some test to see what happens when you manually launch the apps. If your app does not start normally, then go back and enable the event again.
There's also one more battery eating moster - widgets (currently doing some experimental test on it)
Regardless of widgets are in foreground screen or just stays in widgets folder, almost same amount of battery could be used by widgets to make it upto dated and refresh the connections, etc.
So, if you don't need the widget or don't use, go to (from Rom Toolbox) Auto Start Manager -> Applications -> select app you want to check -> it will show that widget updating is enabled or not. If it's enabled and you don't want it, just disable it. Then the app is not going to use that specific widget and actually widget will disappear from widgets folder.
8. Closing comments
Thanks for reading my guide and tweaks. I hope everyone of you found some useful information in here.
I'm not perfect just like you. So, there could be some wrong information. If you find anything like that, please let me know.
Again,
Do it with your own risk and don't ask me to buy you a beer because you're doing it. But, if you like this info and/or you see any longer battery life of your phone, please don't hesitate saying 'thank you' and/or consider to buy me a beer.
I'm ok with not leaving any comments and just taking this tweak and recommendation but don't use this info in any other places with 'copy and paste' style.
What's in attachment:
all_in_here.zip First version of tweaks. build.prop is based on FD26.
70wifiSleepWait_kobridge.zip Tweak to handle the wifi lag time before sleep. Wifi will be turned on 10 seconds after the screen turned off. To make this tweak work, you will need sqlite3 and some manual task. Check here http://forum.xda-developers.com/showthread.php?t=1630792
FE07stock_build.prop.zip This is a build.prop file tweaked based on stock kernel FE07. This file would not work on other Roms but stock. You can use this on other stock based kernel but some information about the phone would be incorrectly displayed at settings > About phone. So, use the right version of build.prop. For any other Roms/Kernels, you can just keep your build.prop if you do not find any tweaked build.prop based on your kernel/rom.
init.d.v2b.zip Including CPU tweaks, additional tweaks, and wifi idle (lag) time tweak. Set to max cpu speed to 1Ghz on awake, max 500Mhz during the sleep. Fast and lots of power savings during the sleep mode.
init.dv2b2.zip Same as init.d.v2b scripts except some more CPU tweak changes. Same Max awake and sleep speed. Targeting more power save but no result yet. Experimental tweaks (you may experience a little slowness of phone with these tweaks).
Tweaked-FE10-build.prop.zip This is a tweaked Stock FE10 build.prop. This file would not work on other Roms but stock. Directly under /system folder and permission set to 644. Other init.d tweaks don't need to be changed.
zipalign.zip Two files included. zipalign goes to /system/xbin, permission 755, move the file if it's not there. 11zipalign goes to /system/etc/init.d. permission 755. If there is any apk files those are not zip aligned, this tweak will automatically align the apk files for better performance and battery savings.
zipalign.v3.1.zip 11zipalign modified a little to confirm the temporary APK file removal. If temporary APK is not deleted, it will be shown in log file and Temporary APK will be removed during the next boot.
init.d.v2.4.zip Complete set of init.d scripts. 41tweaks_other tweak changed a lot based on sysctl and fixed one error. 21&31cpufreq tweaks were also changed more aggressively. 11 & 70 are same. In the zip file, included sqlite3, busybox, zipalign executables in case you don't have it.
70wifiSleepWait_kobridge.v2.zip Check the section 4.5 from OP. Now this tweak works without any manual database handling.
Quick guide about how to install these tweaks :
Because many people asked me how to run these tweaks, I spent sometime to give you the quick instruction. To follow this instruction, you will need the following files downloaded and available at your sdcard.
Pre-requisite:
1. init.d scripts (able to download from op section). Download the zip file and unzip it. Save the files into your sdcard.
2. build.prop file (able to download from op section).
3. sqlite3 executable (just in case you want to use the tweak that updating wifi idle time before sleep). where to download and how to use it is here - http://forum.xda-developers.com/showthread.php?t=1630792
4. Get the install-recovery.sh from here if you are on the stock kernel (not repacked) - http://forum.xda-developers.com/showthread.php?t=1610741
If you have sfhub's auto root tool, then run the option 'E' to install the init.d support installed on your phone. Actually his tool will install the install-recovery.sh. (I assume that you've already have busybox installed, otherwise, you can download it too from above link)
Backup:
Do the backup for the following files -
1. /system/etc/init.d files - if there's any existing init.d scripts then back it up.
2. /system/build.prop - backup this file also for just in case
Now you are ready to start, follow these steps:
1. copy downloaded init.d script into /system/etc/init.d folder. If the init.d folder is not there, create the folder 'init.d' under /system/etc. Be sure that init.d folder permission should be 'rwxr_xr_x' (755). For the copied init.d scripts, check the permissions and changed it to same 755 (if it's not like that). If there's any script that you don't want to run during the boot, then change the permission to 'rw_r__r__' (644).
2. copy the install-recovery.sh file to /system/etc folder (only if you are on stock kernel or you've never installed sfhub's auto root tool (option 'E'). Change the permission to 'r_xr_x___' (550).
3. copy build.prop file to /system folder. Change the permission to 'rw_r__r__' (644).
4. Additional steps if you don't have sqlite3 or busybox.
copy the files to /system/xbin folder. permission 755.
5. You are done now. Reboot the phone.
How to verify that the script is running - the easiest way would be checking the Maximum CPU speed and SD tweaks applied to your phone. If you have any tool like Rom Toolbox (Pro) or System Tuner (Pro), then goto the options that showing CPU or SDcard (SD Boost), it will show the different values if you did not applied the tweaks previously.
Hope this help!
[Q/A]
On which Rom/Kernel this tweak is going to work?
The tweaks in here is mainly for the stock based ICS roms/Kernels only.
Any sfhub's rom, any Calk's Rom, any Agat's rom, VeNuM_ICE_Rom_RL5.0, MIJJz BLEND ICS, AnaKonda Rom ICS, etc....
init.d tweak files can be used for some other roms but it's not tested from my side. build.prop tweak is also mainly for stock roms and based on specific kernel version. If the kernel is upgraded, then you will need a different build.prop.
Can I try it on different rom and kernel?
Before applying the tweaks, make sure that you have the nandroid backup first and try it. If the phone is stuck on boot screen, you may need to flash your rom again thru the odin or CWM recovery.
(usually incorrect edit on build.prop file could cause a freezing on boot screen. So be sure that you know how to edit build.prop)
Does build.prop support different ROMs except the stock?
Basically, my answer is no. To make the build.prop working on different ROM, it needs to be modified based on your rom and kernel. Currently I have a few versions supporting stock rom and kernel - check the progress report and change log for any updates. For any other Roms, please check the same area also.
Progress report:
4/29/12 10:50 pm US EST I'm adding three more screenshots.
screenshot#4 : Lasting More than 21 hours and battery still left 52%
#5: showing screen-on statistics. In here, on battery time was reset somehow. But actual time is 21+ hours (same on screenshot #4,5,6)
#6: It shows which apps were running during the sleep mode and screen was off. If you wonder which apps are running when the phone is on sleep/deep sleep mode, you can check the apps thru this kind of tool (battery monitor widget). If you want to save more battery, you can change the options from each apps if it provides a such kind of options.
4/30/12 My first full battery cycle test was ended up with about 40 hours until battery capacity reaches to 30%. During my test, I found some apps were still running during the sleep mode and those were using lots of battery. In my case, some of those apps were touchdown (email), Kakao talk (sns), and facebook apps. In many cases, we are not able to control the method how the application run in foreground and background. Some apps provides us how to sync and when to sync but there are still lots of chances for those apps for the improvement at least in the perspective of battery consumption.
5/1/12 The second version tweak is coming soon -> done.
5/2/12 WiFi issue resolved. http://forum.xda-developers.com/showthread.php?t=1630792 and added one more tweak file. Before applying this file, read the attached thread first. You won't be disappointed.
5/4/12 Tested battery consumption with wifi turned on 24x7 (like JC's snapshot somewhere in this thread). Not bad at all. #7 snapshot shows that. About 19 hours and still 63% remaining (with on screen 30m, voice call 2m, lots of snapshots, lots of emails (100+), some SNS). Added snapshots #8 & 9.
5/5/12 Big Thanks to TeamERA and team member who converted build.prop for each Kernels. TeamERA provided build.prop files based on different Kernels(Roms). Check out the post #88.
Supported Kernel: AOKP CM9a3 (tested) CNA FD26 MIUI. For FD26, I've checked the items and values on it. There's some items sequence change made comparing build.prop in here and minor values changes - post #94.
So anyone who had issues on boot screen with build.prop that I posted, now you can try build.prop tweak based on your current rom.
5/6/12 GB Kernel Test - Blazer 4.1 EL29 - Not able to change the CPU frequencies and frequency change is causing phone freezing during the sleep & wakeup. No way to change this by init.d script so far. Only the way would be using Tegrak or System Tuner Pro tools. I tried System Tuner Pro and set the conservative governor (underclock to 1GHz) as on boot instead of init.d option. Working like a charm and no freezing yet.
Update: since applied, 19 hours and 70% of battery remaining. For more info, post your questions. Related post: http://forum.xda-developers.com/showthread.php?t=1625299&page=11 post #107.
5/8/12 Added FE07 Stock based tweaked build.prop. Only for Stock FE07 based Kennels.
5/9/12 Two more zip files added. init.d.v2b - moderate CPU tweaks. init.dv2b2 - agressive CPU tweaks (could save more battery).
5/10/12 Added AOKP FE07 version of build.prop at post #156.
http://forum.xda-developers.com/showpost.php?p=25907510&postcount=156
5/14/12 zipalign tweak added
5/16/12 wifiSleepWait tweak improved. Check the section 4.5 from OP. Now this tweak works without any manual database handling.
5/17/12 Now supporting flashable zip files. You may get customized flashable zip files based on your rom. Check out - http://forum.xda-developers.com/showthread.php?t=1658471
Issue Log:
5/1/12 a. It seems like changing the Wi-Fi option to 'Never' and pm.sleep_mode to 1 does not work. My previous test based on the 3G turned on always and minimized turning on wifi. Now I'm testing wi-fi options but status shows that wifi is turned on always. Checking more details... Checked with wifi fixer but wifi still does not sleep. Started removing anything related wifi, but no luck yet. Spending several hours but no luck. Going to test on fresh installed stock rom/kernel.
Status: Resolved. http://forum.xda-developers.com/showthread.php?t=1630792
b. AOKP Rom users or custom Kernel users - Do not sue these tweaks. Basically I cannot help any issues on AOKP because I'm not a user of AOKP. So far, it's known that 31tweak file is causing a boot loop on Samsung logo screen.
Change log:
4/29/12 41tweaks_kobridge tweak updated. changed value setprop pm.sleep_mode to sync with build.prop.
4/30/12 lcd_density value changed back to default 240. It's my mistake uploading the file based on my configuration and forgot to change it back to default. Thanks to TeamERA for findings. If anything else found, more updates will be added to build.prop.
Thanks again to TeamERA. He found another one - "In your kobridgetweaks script you have ring delay at 1000, and in build.prop 0, it should be 0". Updated attached zip file.
5/2/12 New wifi idle tweak init.d file attached (only for the update of existing table)
5/4/12 Added 11 email section.
5/6/12 Wrong link in wifi section corrected.
5/8/12 Build.prop created based on FE07. Rearranged tweaked items based on Stock sequence. Removed duplicates.
5/9/12 uploaded updated init.d scripts. CPU tweaks changed to deal with only ondemand governor. Fixed few errors on 41tweaks. Currently it's a beta version because very few times, I saw that wifi was not automatically reconnected after the sleep. I confirmed that it's the stock rom issue and it's not coming from the tweaks in here.
5/14/12 zipalign tweak updated to confirm the removal of temporary APK files.
5/15/12 Improvement on 41Tweaks_other tweak file (more tweaks based on sysctl). Fixed on error from previous file. 21&31 CPU tweak files were changed more aggressively.
5/16/12 70wifiSleepWait_kobridge version2 tweak uploaded.
I am basically running everything exactly as you mentioned with one exception... the wifi while I am asleep. I generally lose between 2 and 5% over eight hours but I am right next to the router. I never thought to try turning it off and letting the 3g sleep take care of things but I will definitely give it a shot since we are basically on the same page with sync, screen time out, etc. I do also have auto brightness off and slide across status bar to adjust but that wouldn't make an enormous difference. Also inverted apps really seem to get me on average an extra hour or so of screen on time. Very thorough info. I need to consider running my CPU at 1000 Max as well
Edit..all FD26 setup with init.d added by sfhub's auroroot option E
Sent from my SPH-D710 using Xparent Blue Tapatalk 2
JohnCorleone said:
I am basically running everything exactly as you mentioned with one exception... the wifi while I am asleep. I generally lose between 2 and 5% over eight hours but I am right next to the router. I never thought to try turning it off and letting the 3g sleep take care of things but I will definitely give it a shot since we are basically on the same page with sync, screen time out, etc. I do also have auto brightness off and slide across status bar to adjust but that wouldn't make an enormous difference. Also inverted apps really seem to get me on average an extra hour or so of screen on time. Very thorough info. I need to consider running my CPU at 1000 Max as well
Edit..all FD26 setup with init.d added by sfhub's auroroot option E
Sent from my SPH-D710 using Xparent Blue Tapatalk 2
Click to expand...
Click to collapse
Thanks John for the input! The easiest way to adding init.d support is adding his script (recovery-install.sh) into /system/etc folder with permission 550. recovery-install.sh is available thru my linked thread (just in case you don't have it).
Again thanks for trying and let me know your findings!
BTW the script is install-recovery.sh (not recovery-install.sh) I think you had it right in some sections but reversed it in others.
Also since we last discussed I made some improvements to the script. It is now compatible with other apps which like to use install-recovery.sh to get their stuff done like link2sd. The installer in Auto Root will move the existing install-recovery.sh to install-recovery-orig.sh and the install-recovery.sh (init.d version) will call install-recovery-orig.sh (if present) after it is done. The uninstaller will reverse the process.
Also install-recovery.sh will now defer to init.d support in the kernel regardless of which .rc file it was added to in the kernel. Previously it only looked in init.rc but I saw some repacked kernels were adding support in different .rc files (they also removed install-recovery.sh support from their .rc file, so it might be a moot point because install-recovery.sh might never get called)
Thanks kobridge. I think this script is just what I've been looking for and I'm going to give it a run.
sfhub, somewhat off topic, but continuing with kobridge's related thread, How to run init.d scripts on boot, how come chmod 755 is not expressed rwx-rx-rx instead of -rwxr-xr-x? Seems more logical to me.
sfhub said:
BTW the script is install-recovery.sh (not recovery-install.sh) I think you had it right in some sections but reversed it in others.
Also since we last discussed I made some improvements to the script. It is now compatible with other apps which like to use install-recovery.sh to get their stuff done like link2sd. The installer in Auto Root will move the existing install-recovery.sh to install-recovery-orig.sh and the install-recovery.sh (init.d version) will call install-recovery-orig.sh (if present) after it is done. The uninstaller will reverse the process.
Also install-recovery.sh will now defer to init.d support in the kernel regardless of which .rc file it was added to in the kernel. Previously it only looked in init.rc but I saw some repacked kernels were adding support in different .rc files (they also removed install-recovery.sh support from their .rc file, so it might be a moot point because install-recovery.sh might never get called)
Click to expand...
Click to collapse
Thanks so much sfhub!
It seems like I stayed too many nights awake. I corrected one place saying recovery-install.sh to install-recovery.sh.
Now I'm downloading your auto root package again and let me also correct the information accordingly.
RustedRoot said:
Thanks kobridge. I think this script is just what I've been looking for and I'm going to give it a run.
sfhub, somewhat off topic, but continuing with kobridge's related thread, How to run init.d scripts on boot, how come chmod 755 is not expressed rwx-rx-rx instead of -rwxr-xr-x? Seems more logical to me.
Click to expand...
Click to collapse
It's always rwxrwxrwx order.
rwx (read write execute) -> 4 + 2 + 1 -> 7
rw_ -> 4 + 2 + 0 -> 6
r_x -> 4 + 0 + 1 -> 5
r__ -> 4 + 0 + 0 -> 4
the second bit is always for w (write) permission. So, the order -rx is not possible.
Some basic binary calculation and permission related info:
The permission is consist of 9 bits for user, group, and other (each user group holds 3 bits).
With binary expression, it would be same
111 (user) 111 (group) 111 (other)
For first bit represent the read permision and the second is for write, third one is for execute.
so 755 equals in binary expression 111 101 101 (= rwxr_xr_x)
Thanks for the info kobridge, I still have not figured out why wifi causes a partial wake lock on ICS. But it plays much better with GB. Ive tested this also.
Sent from my SPH-D710 using xda premium
So these can be applied to gingerbread right?
Sent from my SPH-D710 using Tapatalk 2
Can we use this on aokp?
Transmission sent from my slim n trim Galaxy S II.
kobridge said:
It's always rwxrwxrwx order.
rwx (read write execute) -> 4 + 2 + 1 -> 7
rw_ -> 4 + 2 + 0 -> 6
r_x -> 4 + 0 + 1 -> 5
r__ -> 4 + 0 + 0 -> 4
the second bit is always for w (write) permission. So, the order -rx is not possible.
Some basic binary calculation and permission related info:
The permission is consist of 9 bits for user, group, and other (each user group holds 3 bits).
With binary expression, it would be same
111 (user) 111 (group) 111 (other)
For first bit represent the read permision and the second is for write, third one is for execute.
so 755 equals in binary expression 111 101 101 (= rwxr_xr_x)
Click to expand...
Click to collapse
Gotcha, with thanks.
Sent from my SPH-D710 using XDA
Pheno.menon said:
Can we use this on aokp?
Transmission sent from my slim n trim Galaxy S II.
Click to expand...
Click to collapse
It's not been tested on aokp. If the kernel is same, then there are high chances that this tweak would run. But, all the paths on this tweak needs to be verified and tested.
If someone want to run this from AOKP, please try it with scripting tool like SManager first before putting it into init.d folder.
Unfortunately, I don't use AOKP rom yet. Only the way, I can do the test would be downloading the rom and verifying the zip file manually. But if the kernel is different, then I couldn't do that because I don't know the command difference on AOKP rom.
TeamERA said:
Thanks for the info kobridge, I still have not figured out why wifi causes a partial wake lock on ICS. But it plays much better with GB. Ive tested this also.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
To properly answer your question, we may need the kernel source to check the mechanism.
There are couple of options locking wifi (I think you already know about this, right?)
Sleep Modes: (pm.sleep_mode=)
This is supposedly for topaz/rhodium that I found on the xda wiki:
* '4' will do "wait for interrupt", no change in arm11's clock or voltage
* '3' will do "wait for interrupt and ramp clock", the arm11's clock is lowered to 20MHz instead of 300-500, and voltage is lowered too.
* '2' will do "app sleep", arm11 is still on, but put into low power mode (registers are still saved)
* '1' and '0' will totally power off the arm11 (so we have to restore registers and things ourself), don't know the differences between them
pm.sleep_mode=0 -> Power Collapse Suspend
pm.sleep_mode=1 -> Power Collapse (Provides best power savings)
pm.sleep_mode=2 -> Apps Sleep
pm.sleep_mode=3 -> Slow Clock and Wait for Interrupt
pm.sleep_mode=4 -> Wait for Interrupt
(http://forum.xda-developers.com/showpost.php?p=17680020&postcount=9)
The similar function is also provided by settings > wifi > menu > advanced > Keep wi-fi on during sleep options. There are three options, Always, Only when plugged in, and never.
If you set up above values in somewhere, partial wake up lock would be dependent on the values you've chosen. Aslo, if there is any application which is configured to use wifi for communication, you may also need to check the application if it's causing partial wakeup lock.
It seems like there's something needs to be tested from your side.
FYI, I set the pm.sleep_mode value to 1 in my tweak and build.prop.
Update: I just added some more screenshots on post #2. Check out screenshot #6 and comments on that.
sfhub said:
BTW the script is install-recovery.sh (not recovery-install.sh) I think you had it right in some sections but reversed it in others.
Also since we last discussed I made some improvements to the script. It is now compatible with other apps which like to use install-recovery.sh to get their stuff done like link2sd. The installer in Auto Root will move the existing install-recovery.sh to install-recovery-orig.sh and the install-recovery.sh (init.d version) will call install-recovery-orig.sh (if present) after it is done. The uninstaller will reverse the process.
Also install-recovery.sh will now defer to init.d support in the kernel regardless of which .rc file it was added to in the kernel. Previously it only looked in init.rc but I saw some repacked kernels were adding support in different .rc files (they also removed install-recovery.sh support from their .rc file, so it might be a moot point because install-recovery.sh might never get called)
Click to expand...
Click to collapse
Updated my thread based on your information! http://forum.xda-developers.com/showthread.php?p=25120392#post25120392
Thanks sfhub!
Updated info :
4/29/12 sfhub improved his auto root tool to support some other kernels, those are enabling init.d through different .xc files.
Stock kernels and some repacked kernels are supporting init.d scripts through init.xc and/or install-recovery.sh but some other repacked kernels are supporting init.d scripts running through different .xc files. So, sfhub made some modification on his script. Because he's adding a new install-recovery.sh file into /system/etc folder, if there's a existing install-recovery.sh file at the same location, the existing install-recovery.sh file will be replaced by his previous version of Auto Root Tool. To prevent the replacing existing install-recovery.sh file with his same named install-recovery.sh file which supports the init.d scripts, his tool now creates a copy of old file and create a new one. Old install-recovery.sh file will be named as install-recovery-orig.sh.
If you are enabling the init.d support by running his tool, be sure that the existing install-recovery.sh file was not created by his old Auto root tool nor you manually created it following this guide. If the file is the one you created by sfhub's tool or my guide in here, be sure that you remove the old file manually before you run his new Auto Root Tool. Otherwise, the init.d scripts would run twice whenever you reboot your phone.
If you just want to simply enable init.d support without using sfhub's tool, then download the new-install-recovery.zip file from my second post and unzip it. Like I explained above, if there's any existing install-recovery.sh file and it's not related to init.d support, then rename it to install-recovery-orig.sh and move the unzipped file to same directory (/system/etc). Assign the file permission 550 (r_xr_x___). New install-recovry.sh file will execute the init.d scripts (if it's there) and old install-recovery-orig.sh (if it's there) during the boot.
kobridge said:
If you are enabling the init.d support by running his tool, be sure that the existing install-recovery.sh file was not created by his old Auto root tool nor you manually created it following this guide. If the file is the one you created by sfhub's tool or my guide in here, be sure that you remove the old file manually before you run his new Auto Root Tool. Otherwise, the init.d scripts would run twice whenever you reboot your phone.
Click to expand...
Click to collapse
BTW the installer in Auto Root checks to see if the existing install-recovery.sh is the one that adds init.d support. If it is, it just overwrites it. Only if the existing install-recovery.sh has nothing to do with init.d support does it move it to install-recovery-orig.sh. The way it detects whether the existing install-recovery.sh is used for init.d support is the presence of the BusyboxBin string, which is the shell variable used to define the busybox location used by the script. The chances some arbitrary install-recovery.sh script defines that string is very low (but not zero)
So bottom line if Auto Root is working properly, it shouldn't be necessary to remove your existing init.d install-recovery.sh script as it will not cause a situation where init.d is run twice.
Also I forgot to mention that some people wanted to run init.d but didn't have busybox installed. I didn't want to clobber busybox for people that have installed it, so basically just had the init.d install-recovery.sh use /system/xbin/busybox-initd (which gets copied into place by the auto root installer) This makes it easier (more symmetrical) to remove init.d support and associated busybox-initd without worrying about who installed busybox to start with.
For the "new-install-recovery.zip" you should do a symlink from busybox-initd to busybox
Code:
su
cd /system/xbin
ln -s busybox busybox-initd
kobridge said:
It's not been tested on aokp. If the kernel is same, then there are high chances that this tweak would run. But, all the paths on this tweak needs to be verified and tested.
If someone want to run this from AOKP, please try it with scripting tool like SManager first before putting it into init.d folder.
Unfortunately, I don't use AOKP rom yet. Only the way, I can do the test would be downloading the rom and verifying the zip file manually. But if the kernel is different, then I couldn't do that because I don't know the command difference on AOKP rom.
Click to expand...
Click to collapse
didn't work for me. had to Odin a kernel and reflash. not sure which script as I tried all from the OP. tomorrow I can figure it out which.
anyway to delete init.d scripts via Odin if it fails to boot? I end up odining el26, wiping, and reflashing. :/
EDIT:
oops. I used the sh script.
want me to post the included fd26 aosp kernel from aokp?
gershee said:
didn't work for me. had to Odin a kernel and reflash. not sure which script as I tried all from the OP. tomorrow I can figure it out which.
anyway to delete init.d scripts via Odin if it fails to boot? I end up odining el26, wiping, and reflashing. :/
EDIT:
oops. I used the sh script.
want me to post the included fd26 aosp kernel from aokp?
Click to expand...
Click to collapse
Do you think aosp kernel works on stock rom? If it is, then I think I can make some test.
If init.d fails on boot, and boot screen is stuck on Samsung logo, then we would flash the rom again. Flashing kernel would not help because it does not delete the system partition. Once after the rom is flashed, do the nandroid recovery that you made before the init.d test.
kobridge said:
snip
Click to expand...
Click to collapse
Just curious if you are experiencing any Sleep of Death using the CPU screenstate settings you have, specifically enabling a powersave as the sleep governor with a cpu freq range of 200-500. A very common issue on the ICS builds so far is setting the max freq below 1ghz can cause Sleep of Death where the device will not wake from sleep and must be rebooted.
odub303 said:
Just curious if you are experiencing any Sleep of Death using the CPU screenstate settings you have, specifically enabling a powersave as the sleep governor with a cpu freq range of 200-500. A very common issue on the ICS builds so far is setting the max freq below 1ghz can cause Sleep of Death where the device will not wake from sleep and must be rebooted.
Click to expand...
Click to collapse
And I was curious if the undervolt or underclock have triggered any 4g reboots for you. A few of my friends were getting them on earlier ICS ROM and I had them delete the undervolt script and they stopped. Some people's phones just handle that stuff better than others though
Sent from my Nexus S 4G using Xparent Blue Tapatalk 2

[ROM][ICS] sediROM - current inside - stable - smooth - rooted or not-rooted

|
|
| sediROM - or why I created a new ROM based on good old (ancient) ICS
|
|
| Read the background and the whole story and all the discussions about sediROM here:
| http://forum.xda-developers.com/showthread.php?t=2789119
|
|____________________________________________________________________________________________
Some first words:
A lot has changed since I forked LiteROM v0.9 in May 2014 and therefore started sediROM. sediROM has grown up in the meanwhile to a standalone ROM with some mods coming from LiteROM but in comparison to the current state of sediROM they are not many anymore.
LiteROM was a very good starting point for me to dive into ROM development and doing my first steps here so many thanks going to thegreatergood, of course.
As a result of that learning process I will change the base of sediROM in one of the next major releases (see Roadmap) to remove the rest of LiteROM stuff which I do not need/use anymore.
Summary:
Debloated, Partially De-odexed, Zip-aligned, SuperSU, Busybox, Init.d Support, Tons of Memory and Build.prop Tweaks, Sysctl Tweaks, 14 toggles Mod, Power Menu, Tethering fix and more...
Aroma Install
Customizable Apps, Tweaks, Mods
BLN Support
Selectable Kernel, Modem, Bootanimation
No Samsung backdoor inside!
Full Feature List:
Explanation: Default values in "Easy Installation" mode are marked in the following lists in RED
Installer:
sediROM flashing will be done by AROMA installer which gives you 2 selectable modes when starting:
Easy Installation:
This will do all the hard stuff for you and installs besides the ROM itself well tested preselected apps & enhancements.
You need to choose this mode when you install sediROM the first time or want to install an upgraded version of sediROM.
Default values in "Easy Installation" mode are marked in the following lists in RED
.
Modify Installation:
This mode needs an existing sediROM installation first. So you can choose the Easy Installation mode first and after that has finished simply choose this mode to modify things like the Kernel, Modem whatever. This mode can be choosen whenever you want - e.g. you can test a Kernel X and after a while you want to test another one - no problem - simply restart the Installer and choose the Modify Installation mode!
Available Kernels:
sediKERNEL v1.0 (Kernel 3.1.10) (see changelog for details)
CM11 based (Kernel 3.1.10)
JB 4.2 LiteKernel release-20130222 (see changelog for details)
JB 4.2 LiteKernel release-20130221 (see changelog for details)
LiteKernel v1.2.2 GPU not OverClocked and with UnderVoltage
LiteKernel v1.2.2 GPU OverClocked and with UnderVoltage
LiteKernel v1.2.2 Original LiteRom v0.9 Kernel.Tweaked - LiteKernel v1.2.2 overclocked with UnderVoltage
LiteKernel_l2hsicpatched-bubor-r20150506 with L2_HSIC patch based on code of 2014-04
Stock ICS Kernel UCLJ3 (Kernel 3.1.10)
Enhanced UCLJ3 stock Kernel
enhancements:
- init.d support (this enables sediROM bluetooth fix for this kernel)
- added custom boot animation support
Stock ICS Kernel UCLH2 (Kernel 3.1.10)
Available Modems:
UCLJ3
UCKL1
UCLH2
UCKI3
RUXKJ5
Some meaningful Apps & Tools:
ATOM launcher
Several other launchers available in "modify" mode (Apex, Nova, ADW, Stock)
Ghostery, Quickpic, ES File Explorer, AndroidTerm, Vodoo Sound Control
Camera apps: Open Camera, HD Camera Ultra, Stock, ICS, JB)
Kii Keyboard, Samsung Keyboard (default enabled), Go Keyboard, Stock Keyboard
"Under the hood" - Integrated Features:
The possibility to execute shutdown scripts (and for boot-up but every Kernel in sediROM supports that out-of-the-box)
The possibility to choose a non-rooted mode! If you're running Apps which detects root (and hiding is not possible) or if you want to be most secure than this mode is for you. Enterprise users may want this to be complain with their security policy e.g.
(Major) Bugfixes (related to ICS and/or LiteRom):
That was driving me nuts and costs WEEKS to fix -> BT fix (better a fully working workaround) for loosing paired devices after a reboot!!!
Lags/waits when pressing the power button to switch the display on
Within Aroma installer: Many many fixes and enhancements when modifiying or/and installing the ROM to get the most out of it
There are many other fixes which can be found in the full changelog
Device encryption was not working in LiteROM. That was fixed in sediROM since v1.1.
Known issues:
Check the open bug reports for a complete list: Click
HOW-TO flash & Download:
Disclaimer:
sediROM is not fully finished nor bugfree (yet).
[*]But is has less bugs and more features then it's fork "LiteROM" and fixes bugs within stock ICS as well.
[*]I use it continuesly since 1th of May 2014 and sporadically developing / enhancing sediROM since then.
Installing sediROM may result in several explosions in your garden (or in that of your neighbour) .. you have been warned!
DO NEVER USE OPTIONS WHICH ARE MARKED AS "TESTING" IN THE INSTALLER!
I'M NOT RESPONSIBLE IF YOU BRICK YOUR PHONE (nor the things that happens to your house and/or car!)
Requirements:
Do a nandroid backup and ensure you have an EFS backup, too !! EFS: (http://forum.xda-developers.com/showthread.php?t=2019540)
COPY THAT BACKUP TO AN EXTERNAL DEVICE TOO !!!! --> SAVED MY DAY TODAY BECAUSE OF MD5 MISMATCHES THAT CAN HAPPEN.. (I cannot recommend that "fixes" cursing around to simply workaround MD5 sum checking! If the md5sum mismatch you should NOT restore IMO. That may simply not work or can result in bad behaviour etc minutes later or some days later)
Check your backup! (e.g. md5sum -c nandroid.md5) in BOTH places (on the Glide AND on your external ressource)
Install TWRP(!) or migrate to it! DO NOT USE CWM - flashing may fail with CWM (and is besides that not recommended).
DL- Link CWM: CWM v6 (click) (several users reported CWM will not work! use TWRP!)
DL- Link TWRP: twrp v2.7.1 (click)
You should have a windows box running Odin + TWRP near - just for the case.
Flashing Guide:
I'M NOT RESPONSIBLE IF YOU BRICK YOUR PHONE (nor the things that happens to your house and/or car!)
Copy BOTH the sediROM zip AND the sediROM md5 file to your Glide!!
Boot into Recovery mode (Poweroff the device then Power on while holding Volume Down)
Ensure that you use TWRP and that the MD5 sum file is in the same directory as the sediROM zip! Only then TWRP will automatically check the MD5 !
Flash the latest sediROM zip file
Choose "Easy Installation" mode
Answer the few questions and wait until the flashing finishes
When finished - reboot and wait until it has fully started up
The Android setup wizard should come up (if not -> flash again
Go through the wizard and reboot once again afterwards
Enjoy
Please read the FAQ (click)!
Please file a bug if you encounter problems: File a bug (click here)
Download:See above in the Download Menu (click here to open it)http://forum.xda-developers.com/devdb/project/?id=4942#downloadshttp://forum.xda-developers.com/devdb/project/?id=4942#downloads
Mirror:
Use this ONLY when the above xda DL does not work!! Mirror Downloads may be outdated or not available all the time! Mirror-Link <-- DOWN. Write me a PM if the xda download does not work and I will upload it for you
Take also a look on:
Changelog
FAQ
Roadmap
Trouble
File a bug
Request a feature
Best regards
xdajog
Special THANKS (please give them a Thanks-Click ! That costs you nothing but 2 seconds (for each)!!)
thegreatergood for LiteROM v0.9 and LiteKernel builds --> Give a "Thanks" here
bartito for Shutdown-Script option (and therefore the possibility to fix the BT issues!!) --> Give a "Thanks" here
PS: Happy for every single click on my "thanks" button (you are free to do that on the changelog, roadmap and faq post again... )
And as an absolutely premiere I want to say thank you to maddbomber83 for the donation.
You're the first one (until now the only one ) who say thx this way. Highly appreciated and motivating.
Sources:
sediROM --> https://github.com/xdajog/android_i927_sediROM
sediKERNEL --> https://github.com/xdajog/kernel_samsung_i927
.
XDA:DevDB Information
sediROM, ROM for the Samsung Captivate Glide
Contributors
xdajog, bubor (for all his work! highly appreciated!), maddbomber83, organic2 (for heavy testing!)
Source Code: https://github.com/xdajog/android_i927_sediROM
ROM OS Version: 4.0.x Ice Cream Sandwich
ROM Kernel: Linux 3.1.x
ROM Firmware Required: sediTWRP or TWRP >= v2.7
Based On: STOCK, LiteROM
Version Information
Status: Stable
Current Stable Version: v2.1 (2.1.2)
Stable Release Date: 2016-01-04
Current Beta Version: ---
Created 2014-07-11
Last Updated 2016-07-26
FAQ
Frequently Asked Questions (FAQ)
Why another ROM and why build on ICS?
Please read the full story here: http://forum.xda-developers.com/showthread.php?t=2789119
[*]Do you need to network unlock the Glide?
Follow the excellent guide here: >Click here<
And also take a look on my additions to it here: >Click here<
[*]When version [FILL-IN-WHATEVER-YOU-LIKE] will be released?
Please keep in mind that this project is not a full time job so questions about a release date is something I will / can not reply to.
This is not because I don't like you but it is because I cannot promise anything. RL is my priority and this can not be controlled (fully) as you may know
[*]Is device encryption supported?
Yes, device encryption is supported since sediROM v1.1
You may want to check out a working TWRP version to be able to still do nandroid backups here sediTWRP with decrpytion support (click)
Hint: Device Encryption is fully supported when choosing the easy installation mode while installing.
That means if you choose the modify mode afterwards be careful what to choose within the TWEAK section (kernel optimization/swap internal to external sdcard/...). Those are not all tested yet so do a backup before choosing them. ALSO for /sdcard! because that gets encypted to.
If you choose the easy installation method and change only apps/kernel/modem etc you will be safe though.
[*]Can I upgrade from a previous version of sediROM?
basic* --> will be explained some lines later (pls look for: "What does "tested (basic)" means?" in this FAQ)
v2.0 ----> v2.1
Yes: tested (basic + full)
basic --> pls look for: "What does "tested (basic)" means?" in this FAQ
full -----> tested on my production device, too
v1.7 ----> v2.0
Yes: tested (basic + full)
basic --> pls look for: "What does "tested (basic)" means?" in this FAQ
full -----> tested on my production device, too
v1.6 ----> v1.7
Yes: tested (basic --> pls look for: "What does "tested (basic)" means?" in this FAQ)
v1.5 ----> v1.6
Yes: tested (basic --> pls look for: "What does "tested (basic)" means?" in this FAQ)
v1.1 ----> v1.6 (this is the last upgrade test for v1.1. I will not test upgrading to higher releases from v1.1!)
Yes: tested (basic --> pls look for: "What does "tested (basic)" means?" in this FAQ)
v1.1 ----> v1.5
Yes: tested (basic --> pls look for: "What does "tested (basic)" means?" in this FAQ)
The same pre-requirements necessary as in v1.0 ---> v1.1 !
v1.0 ----> v1.1 (this is the last upgrade test for v1.0. I will not test upgrading to higher releases from v1.0!)
Yes: tested (basic --> pls look for: "What does "tested (basic)" means?" in this FAQ).
Manual pre-requirements necessary! To upgrade from v1.0 to v1.1 you need to wipe /system partition manually before you start the upgrade because there is a bug in v1.1 and v1.5 preventing from doing the partial wipe which normally will do that for you.
These are the steps:
Within TWRP choose the wipe menu and then "advanced". Afterwards select only "system" !
Go on and afterwards start the sediROM installer again and choose "partial wipe". Because you have wiped /system manually the installation should run fine afterwards.
This way you will NOT wipe any configs or apps or something as long as you leave /sdcard and /data untouched in step 1.
That workaround should work even when you already tried the partial wipe in "Easy Installation" mode.
If you use L2SD here a special note: from @maddbomber83:
maddbomber83 said:
Just as a note; upgrading an install that has a lot of symlinks (such as L2SD) does not appear to be working properly. If your install includes any of these then as the Developer has stated, MAKE SURE TO DO A NANDROID BACKUP!
On mine at least, the phone had a lot of FC errors focused around the PHONE APK. If you did do a data wipe and can get back into your phone but are missing your linked apps then:
Q. I upgraded/changed my ROM and I can not see my linked apps, their files are on the 2nd partition but the system can not see the apps. How can I make them available, do I need to reinstall and relink them again?
No, if you didn't wipe data when updating ROM the only thing you need to do is to run "Recreate mount scripts" from "menu -> more" within Link2SD and do a normal (not quick) reboot.
If you wiped data, after executing "Recreate mount scripts" and rebooting, run "Relink all application files" from "menu -> more" and then reboot. All of your linked apps should be available again after reboot.
If you also wiped dalvik-cache, in addition to the above step run "Link dalvik-cache files".
Click to expand...
Click to collapse
What does "tested (basic)" means?
When I test upgrades I do that very basic. As the system is still the same (ICS 4.0.4) and normally no android related things changed I strongly believe that doing upgrades shouldn't harm anything. Even all the apps should work as long as you don't played around with system apps (In Titanium Backup and other tools you can make an app a system app which means it will also be copied to the /system area which will be overwritten due to the upgrade. If you have converted a user app to a system app it will be lost then). Normally you wouldn't do such a conversion but as it is possible I need to add that hint here..
When I state an upgrade path as "tested (basic)" it means that it SHOULD work but as always no guarantee
My Test setup is always as follows:
a custom wallpaper (Home + Lock Screen)
added some icons to the launcher
set a lock screen password
system settings for screen timeout and screen off
WiFi settings for my WLAN
Installed Titanium Backup app
acquiring root permission (ES File Explorer and after "adb shell")
Upgrade guide:
do a nandroid backup! <-- sigh this is VERY important do not skip that step!!
copy that backup to your pc just to be sure!
choose to install sediROM
choose easy installation
then (the upgrade magic): choose "partial wipe" !
complete the rest of the installation and you're done.
[*]Screen wakeup delay?
I have a screen wakeup delay when using sediROM! AND I use sediROM < v2.0 (e.g. v1.7).
The problem here is the default used kernel in sediROM before v2.0.
All smaller versions uses "Litekernel" as the default kernel which is the root cause for this problem.
Before v1.7 there is no really option for fixing this other than installing another kernel manually.
In v1.7 you are able to switch to the CM11 kernel in the modify mode within the sediROM installer but the shipped version has issues with MTP (connecting storage to PC).
So that is also not a workaround for everyone unfortunately but if you do not use MTP (USB mass storage works btw) this may an option for you.
Well so what is the solution?
Install sediROM v2.0 and use the latest sediKERNEL (default in easy installation mode) or the CM11 kernel (including the MTP fix) provided by bubor or the modified STOCK UCLJ3 kernel by xdajog (me).
All of them have no screen wakeup delay issues and working fine.
All are available in v2.0 and you can switch between them in the modify mode as always (sediKERNEL is default since v2.0)
[*]What is that "Bluetooth HSP fix"?
Bluetooth HSP (HeadSet Profiles) is buggy in ICS 4.0.4. All paired devices gets lost after a reboot. In sediROM there is a fix for this implemented. To be honest that fix was the reason why I started sediROM..!
It is implemented in two steps:
a shutdown script which backups the bluetooth pairings and settings
an init.d script on boot which restores those pairings
The problem that pairings go to hell after a reboot is kind of special. The first thought was to simply backup the correct folders and restore them again when boot up. That alone won't work - the pairings will not shown up when enabling BT afterwards because they are deleted right when BT gets enabled. I tried to find out why but without success. Then I found a way by simply protecting the BT config file. That said when BT starts up it can not delete it anymore and stops trying that and that means the restored pairings will be read and shown.. A little bit crazy I know but it works very great (in my case).
Further Readings (they may related to this issue):
Kenneth Thorman's discoveries
Google Issue 34161
Some suggestions at stackoverflow (5885438)[/MENTION]
Another one from StackOverflow: 5102549
There are different caveats depending on which sediROM version you are using with the current implementation:
sediROM >= v1.7
Since v1.7 the BT fix is very stable and the caveats we have are absolutely minor:
Bluetooth will from now on always beeing OFF after a restart. That is wanted and nothing really bad and is a protection that things goes right.
After sediROM is up'n'running you can switch on BT and/or off again - only when rebooting BT will be always off again.
The system needs to be fully started in order to get BT working. As this is only a couple of seconds (about 10-20 sec) and starts while in boot process this has no impact for the user.
sediROM < v1.7
If you change the name in BT settings that will not be restored atm so it is sticked at "SGH-I927"
Under some circumstances the BT fix hasn't worked. check out the details at the bottom to find out the reason.
sediROM = v1.5 OR sediROM < v1.5
If you want to delete a pairing it was restored in sediROM <v1.5 when you reboot - to completely delete a pairing you need to:
in sediROM = v1.5:
You don't need to do anything. If you delete a pairing or add a pairing both will be saved and no need to do anything else then reboot.
In case you have problems you can delete /sdcard/.sediROM/btfix/00_btbackup.tar and/or check the logs in /sdcard/.sediROM/btfix/ . But that is normally not needed anymore.
in sediROM < v1.5:
delete "/data/local/tmp/00_btbackup.tar" and then reboot
Detailed background information
and the reason why before v1.7 it may haven't worked for everyone:
"rm" will delete the directory and I'm not able to find out which file will be deleted first and therefore I can't prevent the deletion of the pairings as I do before!
Background:
/system/bin/bluetoothd will remove the whole directory /data/misc/bluetoothd (well that is known and at the end the reason why the pairings gets lost in ICS)
I "fixed" that by making the config file immutable so Android is not able to delete the directory anymore which results in the fact that the pairings will stay!
Unfortunately it is not such easy as thought. On my second device I saw that my pairings still get lost..
Well ... As mentioned bluetoothd wants to remove and it uses "rm -r" for this. Exactly it will call "rm -r /data/misc/bluetoothd/".
.. and "rm" uses the C function "readdir()" when it parses the directory and readdir() will give you the result randomly (it depends on several not predectivable things).
There is no chance to know the exact order and even when it would be the case then mine would be different from yours!
... but that's not all. Some docs said that subdirs will be deleted first when using "rm -r" but in fact that is NOT true! If it would be true then the solution would be very easy.
The question stays why it happens on my productive phone and the previous fix still working fine on my DEV device. I believe that it is because I restored a previous made BT backup after I installed sediROM v1.6.
The command "tar" uses the same behaviour as readdir() so it is also randomly when it comes to restoring a backup. That would explain it maybe but I'm not totally sure.
You can test that readdir() behaviour very easily. If you execute a "find . -type f -print" you will see what readdir() see.. The result is obviously unsorted.
Execute it again and the result stays the same but that changes when files are deleted or other things happens to the filesystem!
In my case the problem occured after enabling encryption because that changes also things related to readdir() obviously.
Further readings:
- http://linux.die.net/man/3/readdir
- http://utcc.utoronto.ca/~cks/space/b...x/ReaddirOrder
- http://stackoverflow.com/questions/8...antee-an-order
The way of finding a solution:
- I tried to find out the root cause again (means bluez Java code).
- I tried to port the latest v4 of the bluez stack which contains a lot of fixes.
- I tried to re-compile bluetoothd in order to remove the whole folder deletion.
- I tried to save/restore the settings.db sqlite3 database (alone and together with the BT files)
- I tried some other stupid things.
The solution:
At the end I found a working solution (again). Instead of protecting a single file only which readdir() accesses randomly I switched over to protect the whole directory.
This way the order within the directory doesn't matter anymore
That alone wasn't enough. I needed to completely restructure the way of handling that fix.
That means:
- the bluetooth main.conf was changed to set InitiallyPowered=false !
- I stop all bluetooth related processes when booting
- I restore the previous BT settings and pairings
- I make the BT dir(!) immutable
- Then I give rfkill0/state the info (add a "1") that bluetooth is able to start
- Then I start all BT processes in correct order
- Then I remove the immutable bit from the BT dir
(Minimal) Caveats:
- Bluetooth will from now on always beeing OFF after a restart. That is wanted and nothing really bad and is a protection that things goes right.
After sediROM is up'n'running you can switch on BT and/or off again - only when rebooting BT will be always off again.
- The system needs to be fully started in order to get BT working. As this is only a couple of seconds (about 10-20 sec) and starts while in boot process this has no impact for the user.
[*]What is that "adb" thing??
adb stands for: Android Debug Bridge and can help a lot when it comes to work with your device. It is not for developers only but they use it a lot of course.
But a normal user can use this to exchange files without the need of mounting, backing up the device, reboot the device and use it as a very comfortable way of having a terminal emulator.
Normally adb itself is not available as a standalone application - it comes with the Android SDK which is very big and heavy if you want to use adb and/or fastboot (another great tool) only.
But we live in a great world with many people wanting to make things easy so here you go when you want/need only adb and fastboot:
download & install adb at lifehacker
(Direct link for Windows users: Got to easy ADB install thread)
[*]What is a "nandroid" backup?
nandroid means essentially: "a full image of all your partitions" so it is a full snapshot of your ROM including all your apps and contents.
The name NANDroid is a portmanteau of "NAND" (as in Flash memory - NAND flash) and "Android." (Source)
[*]How to create a "nandroid" backup?
(See above for the meaning of "nandroid backup")
You have several options on how to do that.
The normal and absolutely recommended way is to do that "offline" (from within recovery mode) but you can also do it "online" (while Android is running).
.
Offline nandroid backup by using TWRP recovery: Guide
If you have no custom recovery installed read on.
.
Online nandroid backup:
by using an app:
There is 1 (known to me) "online" nandroid backup tool available which will backup from within your running Android: PlayStore.
I tested it and still using it since a while and I really like it but I would not fully resist on it.
I had no problems backing up but sometimes an app is lost when restoring. This may have been fixed but well it is like imaging a running Windows or Linux system:
Do not do it online if you can - it may/will work but there could be problems/inconsistencies later!!
If you never made a nandroid before doing it online will not harm anything and should be your first start. So install the Online Nandroid backup tool and begin.
Check out this guide for some hints: Guide
(If you like the Android app do not hesitate to buy the unlock key to support the developer!)
by using commandline tools:
First of all you need "adb" installed (check out the FAQ #8 above).
Then you need someone who is telling you the device partition table and you need a big sized SD card to hold the images.
The reason is that you will use a special command named "dd" which images the whole partition (not the content only!).
dd is a VERY dangerous tool because if you use it wrong your device may get bricked so it is essential that you are using the
correct command and check that twice!
Check out the next FAQ on how to do this for the i927.
[*]How to create a "nandroid" backup for the i927/cappy - WITHOUT having a custom recovery?
The whole process will take a big amount of time but it is worth to follow each step including the md5sum checks at the end.
Please read the previous FAQ first because there you will find more information about background and other options you may have.
Ensure you have a SD card inserted which is big enough and having enough free space available (4GB at least! I recommend at least 8 GB but this depends on the size of your current data partition. A completely stock ROM with nothing installed and unused will need 3 GB space).
.
Install "adb" on your pc (check out the FAQ #8 above).
root your device (check out FAQ #12)
connect with adb to your (running) i927:
adb shell
(you should see a prompt)
su
(you need to grant permission if you haven't yet)
Then backup your current ROM and data:
dd if=/dev/block/mmcblk0p2 of=/storage/external_SD/system.2015-07-20.img
dd if=/dev/block/mmcblk0p9 of=/storage/external_SD/boot.2015-07-20.img
dd if=/dev/block/mmcblk0p6 of=/storage/external_SD/userdata.2015-07-20.img
dd if=/dev/block/mmcblk0p8 of=/storage/external_SD/recovery.2015-07-20.img
# If you never backed up your EFS you really should do that once:
dd if=/dev/block/mmcblk0p1 of=/storage/external_SD/efs.img
Click to expand...
Click to collapse
Just to be sure you can do an online backup now, too ( Guide ) Online Nandroid backup App
.
copy the backup(s) to your device (connect USB cable - open your external storage and drag&drop) <--- DO NOT SKIP THIS STEP!!!! It is absolutely essential!
Check your copy on your device:
md5sum /storage/external_SD/system.2015-07-20.img
md5sum /storage/external_SD/boot.2015-07-20.img
md5sum /storage/external_SD/userdata.2015-07-20.img
md5sum /storage/external_SD/recovery.2015-07-20.img
md5sum /storage/external_SD/modemst1.img
md5sum /storage/external_SD/modemst2.img
Click to expand...
Click to collapse
Download a md5sum checker like this one Windows MD5 and load each file you copied to it (on Linux the "md5sum" command can be used of course).
compare the md5sums from the above output and ensure that they are all matching.
[*]How to root the i927/cappy?
There are several guides on this here are 2:
- First or
- Second
[*]"efs" backup and/or restore?
There are several guides on this but here is mine.
Backup efs:
1) open a terminal
2) type in su --> now you may need to give root permissions
3) type in tar zcvf /sdcard/efs-backup.tar.gz /efs
4) type in dd if=/dev/block/mmcblk0p1 of=/sdcard/efs-dd.img
5) connect your device to a PC and copy both the efs-backup.tar.gz and efs-dd.img to your PC
6) now you have a full backup of your efs and therefore your phone unlock state
Step 2 is essential you need root for this in order to work.
Normally you can see a change from a dollar $ sign to a hash # one after root has been achieved like this:
xxxxxx:/ $ > su (answering the request for root permissions with yes)
xxxxxx:/ # >
Restore previously saved efs:
1) open a terminal
2) type in su --> now you may need to give root permissions
3) connect your device to a PC and copy your dd-image backup "efs-dd.img" to /sdcard of your device
optional: do the same for the tar archive "efs-backup.tar.gz". This is just needed for the case the dd image is corrupt.
4) type in the terminal dd if=/sdcard/efs-dd.img of=/dev/block/mmcblk0p1
optional: if that step fails ensure you have mounted /efs (ls -la /efs should show you several files) and execute (press Enter after each line):
su
cd /
tar xvzf /sdcard/efs-backup.tar.gz
5) reboot your device
6) now your efs is fully restored and therefore your phone unlock state, too
Step 2 is essential you need root for this in order to work.
Normally you can see a change from a dollar $ sign to a hash # one after root has been achieved like this:
xxxxxx:/ $ > su (answering the request for root permissions with yes)
xxxxxx:/ # >
.
Changelog
Changelog of sediROM
v2.1.0 - v2.1.2 (Release date: 2016-01-04)
--------------------------------------------------
Bugfix Release
Github detailed changelog (compared with the previous version):
https://github.com/xdajog/android_i927_sediROM/compare/v2.0...v2.1
Github tag for this version:
https://github.com/xdajog/android_i927_sediROM/tree/v2.1
Enhancements
introducing sediROM testsuite: /system/xbin/sediROM_testsuite.sh
execute it like this to test if your sediROM version is fully working:
adb push sediROM_testsuite.sh /sdcard/ && adb shell "su -c sh /sdcard/sediROM_testsuite.sh"
Fixes
issue #25 (https://github.com/xdajog/android_i927_sediROM/issues/25)
YES ALL THE FOLLOWING IS > 1 < SINGLE RELEASE
v2.0.68 -v2.0.1 (Release date: 2015-12-29)
--------------------------------------------------
Major Release
Github detailed changelog (compared with the previous version):
https://github.com/xdajog/android_i927_sediROM/compare/v1.7...v2.0
Github tag for this version:
https://github.com/xdajog/android_i927_sediROM/tree/v2.0
Enhancements
first sediROM app (sediROM_boot.apk) inside.. the app itself is extremely simple: a text and a button thats all. When
sediROM boots the first time a new added init script will detect if this is the first boot and if this is the case it will open
the sediROM_boot app. Read & follow carefully the hints there!
you to reboot. May be annoying but due to douzends of changes in v2.0 it is really necessary to point to a clean reboot.
All scripts related to run sediROM on github now !!!! Starting from v1.7.
Introduced the first version of sediKERNEL (v1.0) a customized kernel optimized for STOCK ICS so as for sediROM.
sediKERNEL is based on CM11 kernel made by bubor (so l2_hsic patched, no wakeup delays, OC etc) enhanced by:
- adding MTP support for STOCK ICS!
- less battery drain
default kernel = sediKERNEL v1.0
Upgraded AROMA from v2.56 to v2.70-RC2 (means compiling 2.70rc2 from the sources!)
Go DIRECTLY from the installer to the MODIFY mode!
That means when you choosen the easy installation mode and everything went fine you will get the
offer to open the modify mode instead of rebooting
No adb debugging from initial ram disk (security fix)
No adb debugging as default (security fix)
Integrated LiteKernel_l2hsicpatched-bubor-r20150506 with L2_HSIC patch included (hopefully fix battery drain)
The kernel is based on code of 2014-04 afaik also maded by bubor
Integrated enhanced UCLJ3 stock Kernel (option in modify mode)
enhancements:
- init.d support (this enables sediROM bluetooth fix for this kernel)
- added custom boot animation support
Migrated and integrated JB 4.2 LiteKernel release-20130221 to sediROM (option in modify mode) which comes with the following changelog:
(all changes between v1.2.2 to 20130221)
- Interactive set as default governor ... Wheatley lags on AOSP
- Added FM Radio Driver
- Fixed Mic for AOSP
- Fixed/Added 1.4ghz frequency
- Fixed/Added Smartassv2
- Removed USB Whitlists
- Recoded BLN myself so that there is no need for an app... has in kernel blinking ...
- Tons of Cleanup
- XZ Kernel Compression
- Removed Wake Lag
- Fixed and increased Charging Current
- Tweaked Ondemand for better performance
- New Storage Setup
Migrated and integrated JB 4.2 LiteKernel release-20130222 (option in modify mode) which comes with the following changelog.
HINT: MTP does not work with this kernel. I will not fix that! If you need MTP use release-20130221 or sediKERNEL!
(all changes between r20130221 to r20130222)
- Entropy Tweaks inspired by lambgx02s Seeder (for silky smoothness)
- Memory Managment Tweaks
- Added Dynamic vsync
- Zipaligning and Fix permissions at boot (zeppelinrox script)
- Tons of Kernel Tweaks for Battery life and Performance...
- IO tweaks...
- Auto EFS Backup...
- New Experimental WIFI Management battery saving feature: If at screen off, WIFI is inactive and or using very little traffic, it gets turned off
and then on again once you wake device, if battery level is below 50% it will no longer turn wifi on again, if you disable WIFI it will be left alone...
- Decreased Vibration Intensity (when you boot up device you will feel a slight vibration)...
- New Experimental CPU Management feature: Frequency get changed according to battery level....
- No more laggy lock screen drawing ...
- Instant wake to lock screen
- Removed Increase Charging Current mod till more testing can be done
- Improvements for better battery life
- Stability
- Option to Disable WIFI and CPU Control
- Clear Memory after boot
- Massive Improvements to: Performance, Battery Life
- Fixed Battery leak with CPU + WIFI manager
- Memory Management Improvements
- SD card Speed Tweaks
- Reduced Wake Lag
- Reduced Stuttering when playing music on screen off
- CPU-Manager is now enabled by default ... it boosts wake speed manages sleep speed and reduces max speed as your battery diminishes ... the profiles are fully modifiable and all with no battery drain ...
- MTP is now the default pc connection ... if you want mass storage change /data/LiteKernel/MTP to "0"
- Memory management improved .... should also help for battery life
- frequency with Interactive governor will now stay a little lower ... should help with screen on battery life ....
crond (provided by busybox) activated to automatize things like in Linux
init script 00sediROM will prepare the settings, paths etc for crond to start
and init script 99sediROM will start the crond
Open Camera will be the only camera app installed by default. HD Ultra camera stays an option in modify mode.
added this changelog to AROMA installer screen
added modify option after easy install in README of the installer zip
updated sqlite3 binary to v3.8.7.4 (THANKS to user tech128 details: http://forum.xda-developers.com/showpost.php?p=52174054)
Removed all my own copyright hints and licensed all sediROM scripts under CC BY-SA 4.0 (http://creativecommons.org/licenses/by-sa/4.0) license! Freedom for everyone ;o)
New script header including new version concept of all sediROM scripts
Updated SuperSU app and binaries to v2.46
Installation of SuperSU is now completely based on the original installer to avoid any problems while installing
Added a new minimalistic terminal app AndroidTerm (https://play.google.com/store/apps/details?id=jackpal.androidterm) which replaces connectbot as default installed terminal app.
Connectbot will not being installed by default anymore but you can still install it in modify mode.
Connectbot has many advantages but 1) updating within a ROM is harder then with AndroidTerm and 2) I want to keep it minimal so no ssh, telnet. only a local console.
BACKUP Connectbot before upgrading when you still want to use it.
If you want to continue using CB you can upgrade and at the end of the installer select "Start sediROM modify mode"
and install Connectbot directly after installation (Screen "Main Features" - Section "Tools"). Nevertheless you still need to restore your settings as they are lost.
Added Ghostery (v1.2.1) - a very tiny (around 2 MB installer files), fast, stable and anonymous browser (https://www.ghostery.com/en/how-it-works). Will be installed by default!
Removed Google Chrome to save disk space (the installer files are 64 MB!)
Chrome is VERY slow on our phone in comparison to other browsers (try to open several tabs & browsing) and last but not least updating it within sediROM is harder then with other browsers.
BACKUP Google Chrome before upgrading when you do not want to loose settings.
Started to use a common function file for the init scripts in sediROM (/system/etc/sediROM/init.func)
Several new boot logs are written to /cache/*.debug which makes debugging easier (commit b053e738 and commit e3fe9332).
After sediROM is booted fully up everything will be moved to: /preload/.sediROM/boot/.
Added commandline aliases/shortcuts for remounting any mountpoint as read-write (remountrw) or read-only (remountro) - handled by commit 41fcc3c6.
Added automatic /efs backup !!!
- The backup is a full image dump made by dd
- backup will be saved to /sdcard/efs_[current-date].dd
("[current-date]" will be replaced by the current date+ unix timestamp)
- if somehow no timestamp could be generated the sediROM version number will be used instead
- if the backup fails we will CONTINUE! That means the installer will not abort to ensure that you will not end with an unused device
That also means that you should not rely on that efs backup it is a help for those not familar with the CLI only.
Added a "getdate.sh" script in aroma installer to filter tzdata errors
Added a sediROM bootanimation (NSA) and made it default
Removed facebook installer files from sediROM zip (was unused since the beginning) which frees some space of the ZIP
Fixes
on first boot bluetooth will be enabled once. This is needed to ensure that /data/misc/bluetoothd/MAC-ADRESS will be created.
That directory is device specific and will be created by Android when not existent. As the bluetooth fix from this version on
depending on a indicator file within this directory it is necessary to enforce its creation by enabling bluetooth once.
This is done within the init script 00sediROM_1stbootDT.
(!) whenever a soft reboot or system force close has happened bluetooth has stopped working. The only workaround was to
reboot the device. A fix was added which checks every minute if the bluetooth indicator file is there and if not the init
script for fixing bluetooth will be restarted. This way in worst case scenario of a soft reboot crash after 1 minute latest
Bluetooth becomes usable again (so no reboot anymore needed).
Changes:
- /etc/cron.d/root
Added:
- /system/xbin/sedi_btFCdetect.sh
fixing some problems with encrypted storage detection
due to a timing issue some early logfiles of sediROM were not got written to /sdcard. The fix was to use /preload instead:
When sediROM boots the init script 00sediROM_first will try to mount /preload.
If mounting /preload was successful it will be used for all logs and existing data will be moved to /preload.
It would be nive to have a symbolic link here but this is not possible across different filesystem types. So there will be
an indicator created in /sdcard/.sediROM with the hint to goto the /preload for logs instead.
All scripts within sediROM were modified to check for the existence of this indicator file and dependending on that they use
/preload or /sdcard for their logging data.
(!) when a soft reboot occured the bluetoothd directory gets trashed, too. If you then rebooted the empty bluetooth settings gets
backed up and therefore you boot with emtpy BT settings. This was fixed by using an indicator file (btfix.indicator) which
will be added after booting the first time. When a system shutdown is initiated sediROM will check for this file and as a
soft reboot would also delete that indicator file it will detect this and backup when this indicator file is still there.
In other words: when a soft reboot has occured you can safely reboot now and your settings will be there on the next reboot and
not lost.
cosmetics within updater-script output and AROMA
(!) Extreme battery drain caused by Google Play Framework Service.
This fix is a big one and splitted into 3 parts:
1) When system booting up /system/xbin/sedi_fix-gplay-drain will be triggered by /system/etc/init.d/00sediROM_first
2) /system/etc/init.d/00sediROM_first will also enable the cron daemon crond (coming with busybox) so we can automatize things
"enable" crond means several things need to be setup first:
a) creating a /etc/passwd
b) creating /etc/cron.d/
c) starting crond as a process
3) With the now introduced crond we can run the script /system/xbin/sedi_fix-gplay-drain every 8 minutes.
This is to ensure that even when Google updates (this will be done SILENTLY! by Google) it's app(s) it will be fixed again on the next cron run.
/system/etc/cron.d/root contain's the magic line for that.
For details checkout the original thread here:
http://muzso.hu/2014/09/18/how-to-f...yanogenmod-11-with-google-play-services-and-o
http://forum.xda-developers.com/showpost.php?p=53881089
http://www.imoseyon.com/2011/02/cron-on-android-is-awesome.html
init.d scripts cleanup. 00sediROM_tweaks in the installer package under /system was never used because always replaced by the BTfix one.
I moved the both scripts 00sediROM_first and 00sediROM_last to /system/etc/init.d/ instead of havin them within BTfix.
All this is firstly cosmetic only but becomes more and more important to have things clear for coding.
Removed the option to install Cranium & IcePop Bluetooth (was for testing purposes only)
compat linkage when coming back from JB now respecting it's existence. That means it will check first and do the links when needed only.
RNGD's init script was blocking for 30s the next boot scripts (changed to 3s intervalls)
changed order for the BT fix init script (from 99 to 92)
the 00 sediROM init script was not respecting encryption state which itself is not a problem but as the switch to /preload is happening in this
version this has result in problems. The fix was to check for encryption state and /data/misc before proceeding
fixing enhancing databases coming with init script 16sqlite:
- sqlite3 binary was not working (since literom days....!) and therefore replaced!
- when /data and/or /sdcard is encrypted no enhancements had taken place (now respecting encryption state and wait until decrypted)
installer: When FULL-wiping all init scripts were not executed because of missing /preload/.sediROM and /sdcard/.sediROM. Those directories are
created by the installer now or when they exist the following files gets deleted instead:
- /preload/.sediROM/.initialized
- /preload/.sediROM/dir-moved-2-preload.txt
- /sdcard/.sediROM/.initialized
- /sdcard/.sediROM/dir-moved-2-preload.txt
installer: When PARTLY-wiping all init scripts were not executed because of missing /preload/.sediROM and /sdcard/.sediROM. Those directories are
created by the installer now or when they exist the following files gets deleted instead:
- /preload/.sediROM/.initialized
- /preload/.sediROM/dir-moved-2-preload.txt
- /sdcard/.sediROM/.initialized
- /sdcard/.sediROM/dir-moved-2-preload.txt
BETA-related (fix affects BETA release only): litekernels in modify mode could not be installed (therefore may soft bricked the phone!)
RFKILL switch desc added inside 92sediROM_btfix, slightly modified the log output too
(!) Not everything was cleaned/removed when UN-ROOT was selected. The uninstallation/unrooting will remove all related parts now including dalvik cache etc.
daemon mode in install-recovery.sh makes no sense in sediROM as it is not SDK 18+ and no selinux forced therefore removed
When switching the kernel the modules within /system/lib/modules/ were not deleted (e.g. dhd.ko) which could had caused trouble in rare situations.
The installer now deletes all modules when switching to another kernel
BETA-related (fix affects BETA release only): new sediKERNEL version (v1.0 build 50). Change: wifi as kernel module instead builtin.
On encrypted devices the installer was not able to mount /data and /sdcard. Now it will:
- check for the existence of dm-0 and dm-1 which are the unlocked /data and /sdcard partitions
- when they can be found they will be mounted and used accordingly and correctly
- when they can NOT be found an abort is raised to avoid data loss - 3 hints are given to solve the situation
- you N--E--E--D sediTWRP - Clockworkmod cannot unlock encrypted devices and "normal" TWRP versions are not able to unlock STOCK ROM encryption!!
--> sediTWRP can be downloaded here: http://forum.xda-developers.com/showthread.php?t=3007035
installer: When upgrading / partial wiping the system partition will be deleted at the END now. This is to avoid data loss e.g. when you have an encrypted
device and not unlocked the partitions in sediTWRP (or when using CWM or other "normal" TWRP versions)
installer: When normal installing / full / recommended wiping the system partition will be deleted after successful mount of /data and /sdcard first.
This is to avoid data loss e.g. when you have an encrypted device and not unlocked the partitions in sediTWRP (or when using CWM or other "normal" TWRP versions)
installer cosmetics:
- Easy installation description changed
- "Recommended Wipe" renamed to "Clean install / Recommended Wipe"
- "Partial Wipe" renamed to "Upgrade mode / Partial wipe"
fixes an issue where Android goes into a boot loop in rare circumstances (issue #11). In rare cases several XMLs will be zeroed out by Android when not shutdown cleanly.
Those XML files still be there but they are empty! When Android boots up it tries to open those XMLs and as they are empty the whole boot process will hang!!!
I fixed this by:
- adding a new function which searches for all opened /data/system/.*xml files after a given period of time
- after this time period a file size check will be made: if the open xml is 0 it will be renamed
- when a renaming happened the parent process will be killed to ensure the boot process will not stop
moved the first boot detector to the near end of the boot process instead! That may fixes other issues as well regarding displaying the first boot app
better integration of the wait for system readiness while booting up (commit d0970abf6ec6c65af9999e2428b96fe293a55f17).
bluetooth file exchange was not working since a change in audio.conf
content in installer welcome screen
modify mode: when no kernel was selected the radio/modem force selection dialog appears
modify mode: removed several hard coded preselections
modify mode: modifying failed under some circumstances which resulted in aborting and may have left you with an unusable device
For older releases see attached file (View attachment CHANGES.log) !
Click to expand...
Click to collapse
Dev facts
sediROM v2.1 (Bugfix Release)
Development duration: about 8 hours
Finished on: 2016-01-04
Builds taken: 3
Changes: 2
sediROM v2.0 (Major Release)
Development duration: about 304 hours
Finished on: 2015-12-29
Builds taken: 69
Changes: 64
sediROM v1.7 (Important Bugfix Release)
Development duration: about 68 hours
Finished on: 2015-02-02
Builds taken: 7
Changes: 6
sediROM v1.6 (Important Bugfix Release)
Development duration: about 24 hours
Finished on: 2015-01-08
Builds taken: 22
Changes: 11
sediROM v1.5 (Big Maintenance Release)
Development duration: about 67 hours
Finished on: 2014-12-24
Builds taken: 24
Changes: 21
sediROM v1.1 (Bugfix Release)
Development duration: about 28 hours
Finished on: 2014-10-21
Builds taken: 15
Changes: 8
sediROM v1.0 (First Stable Release)
Development duration: about 640 hours!
Finished on: 2014-09-02
Builds taken: 58
Changes: more than 82
Click to expand...
Click to collapse
Trouble?
Trouble after flashing?
For EVERY request you have to upload the install log:
after every installation an automatic logfile will be saved to /sdcard/install_sediROM_vX.x.x.log where vX.x.x is the sediROM version number. Upload that log to pastebin and give me the URL.
Flashing failed? or Download mode always coming up?
Download rooted stock ICS http://forum.xda-developers.com/showpost.php?p=30421243&postcount=1
Go in download mode
Open Odin in Windows
Select Auto-Reboot and nothing else and add in the PDA section the above ROM (unzip first - you need the tar.md5 inside)
When it finishes your Glide should reboot (and Odin should say PASS). You do not need to wait if it is fully booting up and you can reboot once again in the download mode
Open Odin in Windows again
Flash TWRP (pretty nice gui, better handling, charging while active) or CWM (ugly gui, more robust, will NOT charge while active) over the PDA slot again (see flashing guide above for DL links)
(I use TWRP and several reflashings etc and it is working fine for me - but keep in mind that Nandroid backups are NOT compatible between those both recovery tools so choose the one you had before. I can highly recommend that you switch to TWRP when you currently using CWM because the handling and features are great (besides flashing probs of course)
For those who need more details and screenshots etc: http://unbrick.itcse.com/unbrick-soft-bricked-samsung-captivate-glide-sgh-i927/
"no recovery kernel" displayed when trying the recovery menu?
That is easy to solve when you know the correct partition name.. That is for the glide "LNX".
On Linux: Start heimdall or heimdall-frontend and simply flash a kernel back. For this you need a pit file which need to be catched first:
Download PIT:
Code:
$> heimdall download-pit --output mycurrent.pit
Flash the kernel with that catched PIT info: (Click to see an image of the heimdall frontend)
Flashing itself failed? Corrupted image message or /cache mount failures?
Flash with TWRP instead of CWM! See the OP for the DL Link (section Howto & Download)
loosing signal / bad signal ?
In my case I had sometimes problems with my baseband (loosing signal / bad signal) which was silly.
I found out that this was not ROM related because happens with several ROMs and total random.. Because of that randomness it was first hard to say if it is ROM/Modem based or not.
So if you come in such a situation and a modem change does not help I can recommend to open you Glide's back and check the SIM..
Sometimes (not often) it can be easy: In my case a little tape fixed my problems with that because the SIM is hanging very lax in it's case..
Maybe that little trick helps others, too
Roadmap
ROADMAP FOR sediROM
I never promise that a requested feature will be in a specific version or even added!
But you can add your ideas and wishes here if you like:
Open a Feature request (click here)
If you find a bug then it is your absolute responsibility to file a bug.
You can do it here: >CLICK HERE<
Version X.x
The Roadmap has been completely moved to github:
Github Milestones
upcoming features/enhancements need to fulfill at least one of those:
Fixing a (real) bug or serious problem
Performance optimization
Battery optimization
System optimization or stability
Even if your request met one ore more of those requirements I will decide on my own if it will be added or not.
If you don't like that you're free to create your own ROM
On the roadmap the base of sediROM was planned as UCLJ3 but to be honest according to the thread poll () I will look into the base question before starting v3 again.
The poll result is clear: It has to be stable - I don't care about the base
So I'm free to decide I will look into the issues CM9 has and compare them with UCLJ3 and then I will decide which will be the base at the end.
If someone is willing to help - let me know your results, analysis!
sediROM BETA download area / file exchange
http://tinyurl.com/pv7utvl
(password protected - PM me to get access)
Great!!! :laugh: Downloading tonight! :fingers-crossed::fingers-crossed::fingers-crossed:
It's great to have so many choices for people to choose from
I've added this to the guide of course ;D People would love using this ROM because you can be close stock and have the stability of a custom ROM!
Also I would like to remind people if you cant post bugs in the dev section,post what ROM your using and bug in my thread so we can figure it from there
Waiting for the link:thumbup:
Sent from my HTC6435LVW using XDA Premium 4 mobile app
I believe sediROM's installer is the main show stopper atm.
but as now it is good enough to state as alpha because it is working fine in my tests (tested preseleted config only) and therefore if someone wants to help me - even when it is still a risc - write me a PM.
... and I cannot say it often enough:
DO A NANDROID BACKUP
COPY THAT BACKUP TO AN EXTERNAL DEVICE TOO !!!! --> SAVED MY DAY TODAY BECAUSE OF MD5 MISMATCHES THAT CAN HAPPEN..
ENSURE THAT YOUR BACKUP IS FULLY OK (e.g. md5sum -c nandroid.md5) in BOTH places (on the Glide on on your external ressource)
You should have a windows box running Odin + CWM6) near - just for the case. TWRP is not such bulletproof then CWM in my case..
regards
xdajog
This is great! Thank you all for the continuing support for our Glide!
Sometimes ancient is better when it was made with at least some support from the manufacturer. I'm still running GB based OsiMood as I haven't found a better alternative (because of Samsung's non-existant support for our great devs).
Yeah today I shot a used Cappy. That will be much easier for development when not needing to use my productive device. Will be here in 2 weeks..
Sent from my SGH-I927 using XDA Free mobile app
THat Rom can install in Roger?
Sorry My English Not good
joedeng said:
THat Rom can install in Roger?
Click to expand...
Click to collapse
yes it will work on Rogers variant, too. But I cannot recommend to use sediROM when you do not have good enough english skills to understand what you need to do in case of trouble.. You need to know how you can rescue your system in case of error or problems.
I wrote a very basic troubleshooting guide in the original post of this thread.
If you still want to try write me a PM and I provide you the download link to the current testing version (v1.0.18) of sediROM.
regards
xdajog
xdajog said:
yes it will work on Rogers variant, too. But I cannot recommend to use sediROM when you do not have good enough english skills to understand what you need to do in case of trouble.. You need to know how you can rescue your system in case of error or problems.
I wrote a very basic troubleshooting guide in the original post of this thread.
If you still want to try write me a PM and I provide you the download link to the current testing version (v1.0.18) of sediROM.
regards
xdajog
Click to expand...
Click to collapse
I do not generally write good English but I can understand. That the rom of your development from LiteRom v0.9 rom right? On the status bar has percent battery and 14 toggle it? If the trial is still okay, right? just as there were some errors when spending alone is not
p/s Finally i will try it, you get me your link, i will test it ^^
joedeng said:
I do not generally write good English but I can understand.
Click to expand...
Click to collapse
ok just wanted to be sure that you know what you're doing
That the rom of your development from LiteRom v0.9 rom right?
Click to expand...
Click to collapse
Yes it is based on LiteROM v0.9 as stated in the OP. (Well atm I'm currently re-thinking this and testing a complete new build on stock ICS instead of LiteROM).
On the status bar has percent battery and 14 toggle it?
Click to expand...
Click to collapse
yes to both
p/s Finally i will try it, you get me your link, i will test it ^^
Click to expand...
Click to collapse
You have a PM
Hey i have already install your rom. It awsome, but you can add some more app. Example click Volume Up or Down wake phone. Get some launcher LG, Samsung, Sony...More theme. recent app, status bar add slide brightness......
Today i have test, it can not share file via bluetooth...Stock ROm can do it. But Your Rom can not share file via Bluetooth....
joedeng said:
Today i have test, it can not share file via bluetooth...Stock ROm can do it. But Your Rom can not share file via Bluetooth....
Click to expand...
Click to collapse
From your device to another one or
from another one to your one or
in both direction?
Call for enhancements for sediROM v2
My idea for the upcoming version v2 is:
Keep as close as possible to Stock, fix known issues, remove bloatware and enhance it by features coming from apps - and not by re-compiling sensitive things like framework etc. The only reason for touching system components would be if that would fix something but not to add features into it. An example is the Quick settings bar which is not workin as expected in LiteROM. There are apps out there (e.g. a well configured Widgetsoid bar or one of the others) who can do the same but they do not touch system files. the sames goes to Bluetooth which seems to not working (as joedeng reported) like expected but it do work in Stock.
One another very important thing to mention:
I do not want to be a full-feature-blown-containing-everything-what-is-available-ROM!
upcoming v2 features/enhancements need to fulfill at least one of those:
Fixing a (real) bug or serious problem
Performance optimization
Battery optimization
System optimization or stability
So I hope you got the idea
So as I'm currently developing both directions it would be possible to hear your thoughts about that way.
This is your chance to be part of sediROM v2
So: If you have features you want to have or if know about issues within ICS STOCK Rom let me know!
Send me your link v2 in my box...Whay u don't post link down in top? I think your rom it good...

[REVIEW] V6 Supercharger on Galaxy Y

Hi all,
I'd like to share my experience with V6 SuperCharger script by zeppelinrox [V6U9RC13] on my Galaxy Y
For those who wonder what V6 SuperCharger is I'd say it's a very long shell script (about 11.000 lines of code) that aims to optimize some system parameters and system/apps files in order to boost the phone performance.
Official thread of V6 SuperCharger is here along with the official downloads:
http://forum.xda-developers.com/showthread.php?t=991276
To execute the V6 SuperCharger main script any terminal emulator is suitable, but it's advised to install and use SManager app, available at Google Play store.
So, here is how my story begin.
I ran the script but the SManager paired with the Galaxy Y small screen, doesn't make it quick to go through all the Driver Options without having to tediously use the super small full keyboard, and having hard time to hit the proper keys.
I'm used to use the numeric pad, bigger buttons, but unfortunately on SManager numeric pad only can input number, not letters, and V6 SuperCharger doesn't usually accept numbers as answers to the many options.
So I decided to make a "quick" modification to the script on-the-fly, seeking all the 11 thousands lines for the options answers like y, Y, n, N, a, A etc... and adding a 1, 2, 3,4 at convenience.
After that, going through the Driver Options has been as nice as a breeze, using only the numeric pad to answer to all the options
Good right? no, not much...
Somehow the script didn't work at all... the Driver options were set but the boot script were not made, and all the main menu options were actually inactive....
Well... I thought it was a problem with my own phone configuration but I finally found out, after many hours of debugging, that zeppelinrox had hidden in the code a check that automatically and silently disable almost all the script functions if the script is been modified in a way that there are more o less lines than the original script.
Ok, found the problem, fixed, now everything run properly...
The scripts makes and installs its boot scripts and the tweaks are applied at everyboot... fine!
I then tried the zipalign function.
Zipaligning the apps packages (apk files) provide quicker access to their contents by system and apps... sounds good... isn't it?
Well... the 1st run of the Zipaligning wasn't a good one.... the script found something like 8 thousands apk files to check for zip alignment... and that was very weird as I don't have more than 200 apk in my phone.
Plus the process to check and eventually zipalign each apk was dramatically slow... something like 8-10 seconds per package (that is about 20 hours needed to process 8000 apk ).
Something was wrong somewhere... and I found it!
In the script the command used to find all the APKs doesn't work properly on the Galaxy Y stock rom... problably because of some simlinks that makes like a loop between folders.
Anyway the problem has been recognized too by another developer, Black Dog http://forum.xda-developers.com/showthread.php?p=42884332 , who actually fixed it in upd9 RC12, but the latest V6 script, upd9 RC13, from zeppelinrox, unfortunately didn't kept the "fix"... so, after I stumble on the issue, I had to find the source of the problem and make the fix myself
I just actually found the command used by Black Dog script to seek the APK and copied to the latest RC13 script by zeppelinrox.
Fine... let's try the Zipaligning again...
Ahh... this time the script found 187 apk to check for zipalignment... sounds nice.
But hey!... still processing each apk takes many seconds... and seems that ALL the apks aren't zipaligned... is that possibile?
No, something was wrong again.
And more I was sure it was wrong because repeating the zipalignment didn't report any of the previous zipaligned apk as already aligned, but instead, they were processed and zipaligned again
I then tried the zipalign command manually on terminal to check it's behaviour on any of the supposed not aligned apk.
Weird enough... the zipalign executable, that I installed with the SuperCharger_Starter_Kit_RC12.zip provided by zeppelinrox in it's official download page http://forum.xda-developers.com/showpost.php?p=18703418&postcount=5021 , when executed it simply didn't do anything... just few seconds of "nothing" and then... nothing!
No output of any kind in the terminal screen.
I then got a zipalign executable from another package (Adrenaline Engine, or Universal v.3.1... very same executable there) and copied to my phone and tried and this time... yeah... that's it! I got output!
Code:
# zipalign
Zip alignment utility
Usage: zipalign [-f] [-v] <align> infile.zip outfile.zip
zipalign -c [-v] <align> infile.zip
#
Tried again the so called "Wheel Alignment" (the zipalign task) and this time, finally, everything worked as supposed.
Found 187 APKs, 10 were not aligned and so they been aligned.
Repeated the process... 187 APKs found, 0 not aligned
I guess that the zipalign executable provided in SuperCharger_Starter_Kit_RC12.zip is been compiled to run on KitKat 4.4 and somehow it broken the backward compatibility with earlier version of Android like the one running on Galaxy Y (GingerBread 2.3.6).
Hope that sharing my own experience in here will help someone :angel:
Hi, so it is better to use RC12Fix over RC13 because of the zipalign function? Should I downgrade from 13 to 12Fix?
Fix align, Wheel align, and Fix emmisions on RC13 always has error on my galaxy y. But I am 100% supercharge.
If Im staying at Rc13, I have to manually zipalign my apks? and fix permission on cwm right? For it to work..
When I try the zipalign command. Nothing happens.
#zipalign
(wait for 5 seconds then goes back nothing)
#
Hi Klmiciano,
yes, the Wheel alignment (ZipAlin APKs), Fix emissions (Fix Force Close Errors) and Fix Alignment (which is just the execution in sequence of both Wheel alignment and Fix emissions) options are not involved with the system parameters optimization done by the script to achieve the "supercharge", so no wonder you still can get 100% supercharged.
Actually the "Fix emissions" option is just a set of commands that automatically scan all the system and try to fix any files and folder permissions (write, read, modify permissions) inconsistency.
Fixing of permission is an utility task provided also by other common apps, like, for example, "Nandroid Manager", which in my opinion everyone should have it installed along with "Online Nandroid Backup", obviously for backup purpose.
Fixing permissions (called Fix Emission in Supercharge) isn't really a task that has to be done on a regular schedule; it is a "fix", so it's meant to be executed when there's a problem (an app that keeps Force Closeing, after an update, or backup restore).
ZipAligning too isn't much important. Almost all apps available are already Zipaligned and even if you might have one app not aligned among one hundreds Apps installed, that won't problably affect your phone performances in a way that can be recognized also because is only the App that comes with a "not aligned" APK file that is affected, not the whole system.
Anyway, if you like to have the Wheel Alignment to run properly you need to replace the zipalign executable (which is located in /system/xbin/zipalign ); using RC12Fix won't work either because the issue is caused by the Zipalign executable version installed with the SuperCharger_Starter_Kit_RC12.zip provided by zeppelinrox in it's official download page.
It's not a script issue, it's a zipalign executable issue.
So, if you care to have Wheel Alignment to run properly you need to replace the /system/xbin/zipalign with zipalign executable from another package (Adrenaline Engine, or Universal v.3.1... very same executable there).

cve-2016-0728 for Android

I've seen a lot of people asking about this in various threads, so I decided to release a version modded to run under Android. First things first:
1. This is not a support thread. I'm not even providing compiled binaries. I am providing code that will compile under CyanogenMod and should work once compiled.
2. I will answer legitimate questions about compiling or use, but not generic "will this work on xyz phone". I expect posts to state what attempts you have already made and where you got stuck. All other requests will be mocked mercilessly.
MODS TAKE NOTE: I already have two suspensions for mocking n00bs.
What is CVE-2016-0728? It is an overflow bug in the Sysv IPC interface. You can read the technical write-up here http://perception-point.io/2016/01/14/analysis-and-exploitation-of-a-linux-kernel-vulnerability-cve-2016-0728/
What does it do for you? It allows a userspace program to grab a root token, and execute an arbitrary command. In the example code provided, it opens a root shell. This will provide temporary root on your phone.
Why a special version for Android? Two reasons: 1st, Android's Bionic lacks Keyutils needed to compile this successfully. You can cross-compile it using regular tools, but the provided code will compile under Android (using the NDK or CyanogenMod). 2nd, my makefile uses static linking to avoid problems with missing symbols. On my test device, a dynamically linked compiled version failed to find some libc symbols.
How do I patch my device to avoid the same problem: Here is the upstream fix: https://github.com/torvalds/linux/commit/23567fd052a9abb6d67fe8e7a9ccdd9800a540f2
How do I use it?
1. This exploit only works under kernel version 3.8 or higher on kernels with Sysv enabled. The execution may also be blocked by selinux. Google recently removed Sysv from the recommended Android kernel configs, and Linux has a patch for this problem, so expect devices to begin patching against this. Note this excludes the vast majority of older Android devices on kernel versions 3.4 and earlier.
2. I will assume you already know how to set up your build environment and sync CyanogenMod. Breakfast a device with a similar or the same processor and sync it. For example, my test device is arm64, so I breakfasted h815, LG G4, and then modified this line in the make file to say "generic" instead of cortex-a53. The resulting binary should work on any arm64 device.
3. Grab the exploit code (download zip) and place in your device folder (G4-common in our example).
4. "mka rootz"
5. The resulting binary is quite large (300 kb) due to static linking. You can pare it down by using dynamic linking if you think your device has compatible libc.
6. The exploit takes some time to run (6 hours plus on a phone). Due to it's nature it is reported to only have a 1 in 3 chance of success (you have to intentionally overflow the keyring while other processes are also using the keyring, so there is another chance a different process could cause it to overflow before you do).
7. Most modern Android devices do not let you execute arbitrary code from user accessible locations anymore. If you are attempting to root a device with this, you have to place the binary in a location that will let you execute it. This location or availability of it may vary by device. "/data/local/tmp" may be available. There are various programs that install command line tools in a location a non-root user can access them as well. You can use Better Terminal Emulator Pro for instance. It lets you open up a shell on your device, and it has a bin directory at "/data/data/com.magicandroidapps.bettertermpro/bin" you can copy the executable to. Make sure you chmod 777 the executable after copying it. Better Term Pro also comes with busybox, so you can potentially remount your system r/w after getting temporary root for more permanent root
8. Usage is something like "./rootz PP1" where PP1 is the name of the key you want to use. That's name should work for you.
9. Wait 6 hours and enjoy
Phones known to not be affected (I am only listing phones that meet the basic critieria, ie kernel version 3.8 and up. Also only stock firmwares. So your crappy Galaxy S III is not going on this list. And neither is your already rooted phone):
1. BlackBerry Priv (/proc/keys node missing)
2. LG G4 (/proc/keys node missing)
Phones known to be affected
1. NONE. (It appears very few devices ship with CONFIG_KEYS on Android OEM builds, although CyanogenMod has it turned on.)
If the /proc/keys is missing this exploit will fail, yes?
[email protected]:/data/local/tmp $ ./rootz PP1
uid=2000, euid=2000
msgget: Function not implemented
I do have /proc/keys kernel version 3.18 6.01 marshmellow
Guess I lack SysV.... I have /proc/keys in the filesystem, but the actual file is empty when I cat it.
I have /proc/sysvipc present on this device.
I don't think this exploit can actually work for android. It requires the adresses of symbols (like commit_creds). These adresses can only be taken from /proc/kallsyms but if you are not a root user the output will be 0's.
Also many devices luck SysV IPC. Though we can still replace msgget with sendmmsg or something equivalent and then bypass ASLR. I saw you have written a fucntion get_symbols but it actually return something like: 000000000.
rm
rm
symbols
First sorry for my bad writing!
I also see only 0x000... in /proc/kallsyms
Could we extract the adresses of symbols directly from a kernel image an then use that list instead /proc/kallsyms?
Cynob

Categories

Resources