An all in one collection for Galaxy S II where you can get all the information, tutorials, guides, mods, apps, tweaks, tips, tricks, DIY and many more.
Tutorials & Guides
How to build a perfect ROM
Know the Basics
Without knowing what you are getting yourself into will only make things worse even before you start off. To build a good Rom is different and to atleast build a fully functional Rom is different. So make sure you are fully aware of the technical fundamentals of building a Rom to enough extent so that you are able to fix the bugs and know what and where can things go wrong and how to solve them.
Performance, Memory, Stability and Battery
These are the four defining points which decide the pros and cons of the Rom that you develop. The Rom should be Fast, Have enough storage and program memory, should be stable and have a good battery backup. Trying to get a good balance of all these is very important. So make sure you keep all these things in mind while developing your Rom.
Be Patient and Polite
Building a good/perfect or bug free Rom wont come immediately. It’ll take many releases, experiments, testing and knowledge till you reach a nearly perfect Rom. So be patient as it sometimes takes weeks or sometimes months. Dealing with the public is not an easy job. You’ll find all sort of people of various characters. The can be nice as well as rude, but do remember that their critics are the only way you can improve. All they want from you is a good Rom, just keep this in mind and ignore the negatives.
Make it User Friendly
There are many ways in which you can make your Rom user friendly. Integrating useful apps. Prepping Eye candy themes, Important shortcuts etc.
Stay Motivated
This is the only driving force behind every Rom developer to continue doing their work with ease and success. Stay motivated and alert so that you can deliver the best with every release. Its hard sometimes but its it important.
Give Time to your Work
Most of the developers are either students or work some where and building Roms is some what like a hobby for us. Its correct that we are not supposed to spend all the time on building Roms but if we want to have a good working Rom we should manage considerable amount of time for few alternate days to work on this project.
Make it Different
You Rom characteristics should be some what different from what is already been provided by other developers. If its nothing different and Catchy then it’ll be hard to get users trying your Rom consistently. I still remember the days when i used to try alot of different Roms but still couldn’t find one that was nearly perfecting my needs. I tried alot of Roms that time.
Join Hands with another Developer
This is what i like the most. Join hands and team up with other developers and thus improve the efficiency and effectiveness of your Rom. The mind of two can bring together wonders. You can even team up with Developers of other devices and build a Rom for device that you personally do not own but you you widen your work area.
Don’t be ignorant
Make sure you are attentive and up to date with all what is discussed about your Rom, all bugs, all tests, reports, etc. so that you do not miss out on any bug possibly to be fixed for next release. If you ignore or avoid fixing the important bugs, the users will think that you are not really capable of solving them or not really interested in this Rom.
Get Testers
Testers are users who like to test the Rom and report you the bugs before you go public with the release. They are very helpful if you like to avoid the criticism after the release of the Rom as before itself you’ll be able to get rid of maximum number of Bugs and issues present in the Rom. That is where testers come in handy. Jus give a notice and many would love to try and test your Beta releases.
Keep Detailed Changelogs
Changelogs keep track of your developments over the time. They come in handy when ever you need to check for prolonged bugs. For example you may not notice it but if someone reports that he has been having an issue since your 3rd Rom release, then you can check out what all changes you made on that release and cross check whether one of those changes cause that bug.
Be Active on the Rom Page
This is the most important part of being interactive with the users cause there is alot that they want to be done in your Rom. Talk to them, answer their questions and discuss the pros and cons of the Roms with them. You can learn alot from them. Being active to the discussion will make them feel that you are eager to further develop and make this Rom improve further.
Add only Useful apps and Regularly Update them
Make sure the application you add to your Rom are useful by the people. Adding two Music Players in the Rom is not a good choice. Choose one that is best and use that only. But make sure you add one possibly best Application for all needs of the users. Keep track of all the applications that you have included in your Rom and make sure the latest versions are included. It keep the user feel updated with your Rom. Many times there are applications which are important to add but have some bug. Later these bugs are fixed in their next releases, so even you should add those updated fixed Applications. Use only Genuine Licenses and No Warez Applications. Warez is like a virus to the development of your Rom. Copyright issues and illegal use of cracked applications make pose a ban on you Roms by the Blogs and threads where you list them. Either you use development licenses to use the in your Roms or use an equally good free Application.
Good looking User Interface and Graphics
This is the major aspect that defines your Rom and makes it distinct from others. Work on that graphics that can be changed in your Rom, try different themes and skin enhancements in different aspects of os like dialer, lockscreen, fonts etc.
Keep Polls and ask Questions
Polls and asking questions from users is a very important way by which you can interact with users and get their feedback. Polls can be asking them about their preferences. Which applications they like or dislike, asking frequents questions on that changes you will be making in the Rom cause at the end of the day it is them who will be using them.
Learn from Competition
I don’t call the fellow developers a competition and usually many share their work and are supportive like i am to each other’s work. But you can learn from what is included in their Rom and if its catchy and important then you can add it to your Rom aswel. There might be many new and useful applications and features that other developers might be using and you are not even aware of that. It can be very helpful in evolving your Rom completely.
Listen and Learn from Users
Listening what a user has to say about their experiences on using your Rom is very important. They might have something very important to share from their experiences which you can incorporate in your Rom. It really helps in fixing bugs and improving your Rom further.
In the end you are the Decision Maker
Its you who has to take the decisions in the end. There will be many people wanting you to do this or that and add this or remove that but in the end you have to keep an unbiased judgment on all the requests, ideas and suggestions and bring forward the changes that you feel the masses are going to appreciate. And for that you will need to take care of all the above mentioned points in mind.
Give Credits
Not to forget that 70%-80% of your work is inspired from that of other developers. And it wonk charge you anything to be humbly give credit or some appreciation to the help you have got from other developers in terms of guides, tips, tricks, applications, UI Enhancements, etc. It just shows your character as a person as well.
What are Stock Roms and Custom Roms?
What is a Rom?
ROM – Read Only Memory is that memory which stores the system files of your Device. Those files which make up the basic Operating System, be is Windows Mobile Phone OS, Android, Symbian, Windows OS, etc. Every electronic device has a Read only Memory which stores the basic programming of the functions that the Electronic equipment is to perform. ROM in terms of our Android Devices the basic set of programming applications and files of functions which your device performs Out of the Box. Without a Rom no electronic device exists.
What are Stock ROMs?
Those ROMs which come pre installed are called Stock ROMs. Stock ROMs are the ones that come Box packed with your Device preinstalled. These are official Software that are provided by the Manufacturer or the OEM.
Is it possible to Edit/Customize/Alter Stock ROMs?
Yes it is. For a lot of Operating Systems be it Windows Mobile Phone OS, Android, Symbian, etc, it is possible to Customize these stock ROMs and install them to our devices.
What are Custom ROMs?
They are Custom ROMs are based on Stock ROMs but customized by the user in terms of additions in applications, improvements, removal of unnecessary application, etc. A customized ROM may be an minor improvement to Stock Rom or can even be a complete makeover of Stock Rom even changing the drivers of the Rom with that of other compatible devices providing better performance.
Why do we need Custom Rom?
Customization is making things personal. That is one main reason why we customize a Stock Rom. A stock Rom no matter what will have a lot of unnecessary applications, files, images, settings that are pre set by the Manufactures but are not at all important to us and uses a lot of space for no reason. No matter what there has to be one or the other Bug in a Stock Rom. To get rid of these issues we customize a stock ROM by either adding useful applications, settings, removed crap, fixing bugs and on getting a Top Notch easy to use and completely customized Device.
What about the warranty?
This is decision that you need to make personally. Yes, Custom ROMs will take away your precious warranty. But that to only if your device stops working while you are using Custom Rom on your device and you have to take it to the company. If you want you can revert back to Stock ROMs and then take your device to the Service Center and they won’t even know about it. But you need to consider reverting back to Original Stock Rom.
su
Also referred to as substitute user - a command for changing the account in the current terminal (usually black screen with blinking cursor). Default account is root account. So if you insert into terminal 'su' and hit enter, you will become root user.
root
Root alias superuser or poweruser is special user account for system administration. Similar to windows having its administrator account, unix-like systems have a root account. With this, you can do anything and if you run a command to delete the whole system, unix will just do it! No asking, no confirming. So, watch your steps!
rooting
Rooting is just enabling power of root for applications and other purposes.
Superuser app
After rooting is done, you will see a new app called superuser in app drawer. This app can delegate applications to use su (root) feature. When an app asks this from first use, a popup window will appear asking if the application should be allowed to use root permission.
sh, bash
is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems. So simply, it is some interface, which can execute command(s), which you have entered. Many shells exist, but in scope of android you can (as far as I know) use only sh (standard - Bourne-shell) or bash (compiled in BusyBox or separately on XDA). Both are basically same, but bash has much more features and it is more comfortable.
user/root shell
How do I know if I'm root or normal user? It's simple. Root's shell is ended with # (usually it's shell looks like "bash-3.2# _") and user's ends with $ (usually bash-3.2$ _). In terminal emulator you also can have only [path]($|#) (for root for example "/etc # _")
BusyBox
also called "The Swiss Army Knife of Embedded Linux" is a tool which brings into Android basic tools known from unix system, but is much more smaller than standard tools is. But this "packing" has limited functions in comparison to standard tools in unix-system (missing special modes of tool, color output and so on). Many application use this. For example busybox grep (filtering of text) is needed for application called Market enabler.
BusyBox commands
list of commands is really wide, so it's not possible explain all, so I pickup only top few. (hint: if you want what some command do, just search on google for "man <command_name>" for example man mv or enter command here
cd - change directory - same like in windows. You can switch directory. example: cd /sdcard
ls - list of files in actual directory (have few switches like for example: ls -l /sdcard/*.png (detailed listing)
cat - print file into standard output (like more in windows) Example: cat /sdcard/data.txt
vi - editing of file. But on limited phone keyboard (no keyboard) it is little harder Read more about vi
cp - copy of one or more file. Example: cp /sdcard/bike.jpg /sdcard/media/bike-wallpaper.jpg
mv - moving/rename files, Example: mv /sdcard/bike.jpg /sdcard/media/renamed-moved-bike.jpg
rm - delete file (rm -R for recursive, or for delete whole folder), Example: rm -R /sdcard/wallpaper-bad/*
find - search for files, Example find / -name "best-chopper-ever.avi"
mkdir - make directory - creates directory, Example: mkdir mynewdir
chmod - changes access of files
less - similar like cat, but you can scroll in it and it doesn't produce any output. Example: less /sdcard/funnytext.txt
For BusyBox's tool help, just enter BusyBox <command_name> -h.
ADB (shell)
ADB - Android Debug Bridge is a versatile tool that lets you manage the state of an emulator instance or Android-powered device. It is a client-server program that includes three components:
* A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
* A server, which runs as a background process on your development machine. The server manages communication between the client and the adb daemon running on an emulator or device.
* A daemon, which runs as a background process on each emulator or device instance.
Generally, it can be compared with standard cmd prompt in windows (you can write commands which will be executed locally, for example in Terminal Emulator) or it can be just like SSH in unix-like system (you connect to terminal through adb client (in Android SDK) and commands will be run remotely.
Android SDK
Android software development kit is a complex set of tools for developing apps on Android. It includes a fully usable emulator of Android OS on your PC, where you can do everything. You can install/delete apps, browse web page in embedded web browser, play games or make your own application in Eclipse (widely used IDE for development). Of course, with emulator you can use also GPS or camera.
Android SDK tools
* Fully emulated Android device
* Android Development Tools Plugin (Eclipse IDE)
* Android Virtual Devices (AVDs)
* Hierarchy Viewer
* layoutopt
* Draw 9-patch
* Dalvik Debug Monitor Service (ddms)
* Android Debug Bridge (adb)
* Android Asset Packaging Tool (aapt)
* Android Interface Description Language (aidl)
* sqlite3
* Traceview
* mksdcard
* dx
* UI/Application Exerciser Monkey
* monkeyrunner
* Android
* zipalign
Tools for work with Android adb shell
You have two ways to connect into ADB service - locally and remotely.
Locally - for local access you will need some application which can connect to local adb shell.
Terminal Emulator (free) - probably most commonly used app from market, which works and looks like standard unix shell.
ConnectBot (free) - same as Terminal Emulator, but it can be also used for connecting via SSH or telnet
Remotely- For remote connection you need phone configuration adjustment:
Home desktop -> [menu button] -> Settings -> Applications -> Development -> USB debugging [ON].
Also you need connect your phone via USB (or finds on market some widget/app, witch enable using ADB also via wi-fi)
adb tool from Android SDK
After downloading Android SDK, extract the archive anywhere (in example I extracted it in c:/AndroidSDK). Then follow instructions on developer.android.com for installation of SDK Platform-tools (contains adb). After installation click on start menu and in Run... (in Windows7 in search bar) enter 'cmd' and press Ok or [enter]. Then write in cmd line:
Quote:
cd c:\AndroidSDK\android-sdk-windows\tools [enter]
now you can enter following command to connect to phone's adb shell if you don't have more connected device (virtual or real-one)
Quote:
adb shell
If you have more then one, you need explicitly say which one should be used for connection. So list connected devices with
Quote:
adb devices
which shows you serial number of connected devices. Than use
Quote:
adb -s <serial-number> shell
3. Custom recovery
* What is custom recovery
* Tools which custom recovery provide - NAND backup/restore, formatting of SDcard, partitioning (ext1,ext2, ext3), wiping, flashing of Custom ROM, ...
* Is it safe to install? - potential problems, backup/restore of original recovery
* How this whole thing works - installation description (not how-to install, just explanation of what is done during installation)
What is custom recovery
Recovery is an image (binary data) stored in internal memory. This image contains something like a "program" or "tool", which can boot-up independently from the Android system. This tool is part of phone system, and in PC terminology recovery can by compared to BIOS with some added features. This recovery state can be reached on all phones, but if you don't have a custom recovery, it will do a so-called HW reset and automatically restart itself into standard boot mode.
Tools which custom recovery provides
* USB-MS Toggle :mounts sdcard as mass storage
It just mounts your phone as USB-mass storage (USB disk) so you can access it through your PC
* Backup/Restore:
Absolutely GREAT feature. With NAND you can copy an image of your actual system (phone's memory). It means that you can backup the whole system with all configuration, customization, wallpapers, system's tweaks... just everything. This image will be written to your SD card which you are then free to copy around and back up on your computer
* Flash Zip From Sdcard
This tool is designed for installation of custom ROMs or tweaks. If you are instructed to install via custom recovery, then you should use this menu. Never unzip the file because it contains meta-information about itself with some validate-checks so if you edit it, or unpack and pack back, it won't work. And remember to place the file in the root (main folder) of your sdcard.
* Wipe Menu:
Wipe data/factory reset: wipes data & cache
- wipes user data (contacts, apps, configuration, ...) and cache (caches of applications)
Wipe cache
- wipes cache only
Wipe Dalvik cache : Wipes Dalvik cache in all possible locations if moved by apps2sd
- wipes Dalvik cache
Wipe SD:ext : Wipes Apps2sd ext partition
- if you used Partition SDcard option, you can wipe it here
Wipe Battery Stats (remember to fully charge your phone before doing this)
- If you think, that your battery life is too short, you can try delete battery stats. Than let phone fully charge. (more)
Wipe rotate settings
- wipe sensor settings (acceleration, ...)
Wipe .android secure : Wipes froyo native .android_secure on sdcard
- wipe information about moved apps
* Partition Sdcard:
Partition SD: Partitions sdcard for apps2sd (this formats card so all data will be lost)
- will create ext2 partition (you will be asked for size of ext2 and cache)
Repair Sd:ext
SD:ext2 to ext3 : converts apps2sd ext2 partition to ext3 (requires kernel support for ext3)
SD:ext3 to ext4 : same as above but ext3 to ext4 (requires kernel support for ext4)
ext2 - file system for the Linux kernel (no journal, fast but not recovery of I/O error)
ext3 - file system for the Linux kernel (journal, slower than ext2 because of journal, but provides recovery on I/O error)
ext4 - file system for the Linux kernel (journal, enhanced version of ext3)
* Mounts:
Gui automatically mounts folders
png-optimized -
png files takes less memory, are loads faster
JIT -
just-in-time compilation also known as dynamic translation, is a method to improve the runtime performance of computer programs, but it takes some time to convert into it on start.
HW:acceleration -
using of HW acceleration for rendering GUI. Increases battery consumption.
VM.Heap Size -
maximum memory an application can consume
stagefright -
In Android 2.2 new media framework that supports local file playback and HTTP progressive streaming
Deodex
Advantages or disadvantages
- Odexed ROMs are slightly faster, deodexed ROMs are slightly slower
+ You can make custom themes for your ROM
+ Performance los is negligible.
Requirements:
Download XUltimate
Busybox installed
Root
1. Connect phone to computer
2. Start xUltimate, we will now get the required files from our phone to deodex and zipalign it which we will describe in the 3rd step.
3. On the main menu of xUltimate, choose option 5 (Pull and deodex all). Everything will be done for you here. Don't worry. You will see all your finished files in the folders 'done_app' and 'done_frame' which are located in the installation directory of xUltimate.
4. move folders 'done_app' and 'done_frame' folders to your sdcard, you can find these folders in the directory of xUltimate as described in the previous step.
5. Make sure the sdcard is not mounted to pc anymore
6. Open Windows Command Prompt and type the following commands.
adb shell
su
stop
mount -o remount,rw /dev/block/stl12 /system
rm /system/app/*.odex
rm /system/framework/*.odex
busybox cp /sdcard/done_app/* /system/app/
busybox cp /sdcard/done_frame/* /system/framework/
chmod 644 /system/app/*
chmod 644 /system/framework/*
mount -o remount,ro /dev/block/stl12 /system
sync
reboot recovery
7. Now data and cache reset in the recovery menu...
8. reboot
If one of the commands, for example 'cp' is not found, try putting busybox in front of the command:
eg: busybox cp /sdcard/done_frame/* /system/framework/
--------------------------------------------------------------------------------------------------
[How To] Setup ADB for Windows/ Mac
For Windows
Want to set up ADB or Android Debugging Bridge on your PC, here is a quick guide for you. This tutorial does not need large download or full Android SDK installation. You will just have to download a small compressed file, which is all that you require.
STEP 1: First download this file called ADBUNZIPTOCDRIVE.zip, just click on the link, download will start automatically.
STEP 2: Now download PdaNet for driver installation. It comes with drivers from all major manufacturers, so this is all you need. Install PDAnet after downloading.
STEP 3: Now extract the zip file that we downloaded in the first step to C drive and name the extracted folder ADB.
STEP 4: Now we will go to the desktop and right click to make a new shortcut.
STEP 5: Point the shortcut to ADB folder that we created in step 3, and name the shortcut ADB or whatever you want.
STEP 6: Now right click on that shortcut and go to properties and change START IN field to c:\adb.
STEP 7: Click Apply or OK and you are done. Click on ADB shortcut on the desktop and you are good to go.
Here is list of ADB commands that might be useful for you in the future.
adb devices – list all connected devices
adb push <local> <remote> – copy file/dir to device
adb pull <remote> [<local>] – copy file/dir from device
adb sync [ <directory> ] – copy host->device only if changed
adb shell – run remote shell interactively
adb shell <command> – run remote shell command
adb emu <command> – run emulator console command
adb logcat [ <filter-spec> ] – View device log
adb forward <local> <remote> – forward socket connections forward specs are one of: tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp – list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> – push this package file to the device and install it
adb uninstall [-k] <package> – remove this app package from the device (‘-k’ means keep the data and cache directories)
adb bugreport – return all information from the device
that should be included in a bug report.
adb help – show this help message
adb version – show version num
adb wait-for-device – block until device is online
adb start-server – ensure that there is a server running
adb kill-server – kill the server if it is running
adb get-state – prints: offline | bootloader | device
adb get-serialno – prints: <serial-number>
adb status-window – continuously print device status for a specified device
adb remount – remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] – reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader – reboots the device into the bootloader
adb root – restarts the adbd daemon with root permissions
adb usb – restarts the adbd daemon listening on USB
adb tcpip <port> – restarts the adbd daemon listening on TCP on the specified port
:: build.prop tweaks ::
Experimental / Not Tested
##Date format
ro.com.android.dateformat=MM-dd-yyyy
ro.com.google.locationfeatures=1
ro.setupwizard.mode=DISABLED
keyguard.no_require_sim=true
ro.com.android.dataroaming=true
# Default network type.
ro.telephony.default_network=8
##8 => CDMA/EVDO/LTE auto mode preferred. (I don't know what should be the value for our Galaxy 3)
#proximit sensor disable touch distance
mot.proximity.distance=60
Working
##Makes phone boot rapidly fast
persist.sys.shutdown.mode=hibernate
##Force launcher into memory
ro.HOME_APP_ADJ=1
## Raise JPG quality to 100%
ro.media.enc.jpeg.quality=100
##VM Heapsize; 178MB RAM = 32 is better
dalvik.vm.heapsize=48m
##Render UI with GPU
debug.sf.hw=1
##Decrease dialing out delay
ro.telephony.call_ring.delay=0
##Helps scrolling responsiveness
windowsmgr.max_events_per_sec=150
##Save battery
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
##Disable debugging notify icon on statusbar
persist.adb.notify=0
##Increase overall touch responsiveness
debug.performance.tuning=1
video.accelerate.hw=1
##Raise photo and video recording quality (2.3 ROM only)
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
# Photo and video recording quality tweak (2.2 Rom only)
ro.media.dec.jpeg.memcap=10000000
ro.media.enc.hprof.vid.bps=1000000
##Signal (3G) tweaks
ro.ril.hsxpa=2
ro.ril.gprsclass=12
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=6
ro.ril.def.agps.feature=1
ro.ril.enable.sdr=1
ro.ril.enable.gea3=1
ro.ril.enable.fd.plmn.prefix=23402,23410,23411
ro.ril.enable.a52=1
ro.ril.enable.a53=1
ro.ril.enable.dtm=1
##Net speed tweaks
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
##Disable blackscreen issue after a call
ro.lge.proximity.delay=25
mot.proximity.delay=25
##Fix some application issues
ro.kernel.android.checkjni=0
##Phone will not wake up from hitting the volume rocker
ro.config.hwfeature_wakeupkey=0
##Force button lights on when screen is on
ro.mot.buttonlight.timeout=0
##Disable boot animation for faster boot
debug.sf.nobootanimation=1
# Enable Stagefright helps stream Video and Music Faster
media.stagefright.enable-player=true
media.stagefright.enable-meta=true
media.stagefright.enable-scan=true
media.stagefright.enable-http=true
# Enable display Dithering
persist.sys.use_dithering=1
# Enable purgeable assets
persist.sys.purgeable_assets=1
# For SD storage insert notification sound
persist.service.mount.playsnd=0
##Miscellaneous flags
ro.config.hw_menu_unlockscreen=false
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
Click to expand...
Click to collapse
init.d scripts
(needs ROM with init.d access and busybox, open empty file, insert header #!/system/bin/sh and put these there, save in /system/etc/init.d and name it something like 77tweaks)
Code:
##internet speed tweaks
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
##vm management tweaks
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
##misc kernel tweaks
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
##battery tweaks
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
##EXT4 tweaks (greatly increase I/O)
(needs /system, /cache, /data partitions formatted to EXT4)
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
##perfect mount options
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /system
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /data
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /cache
##Flags blocks as non-rotational and increases cache size
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
##microSD card speed tweak
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
##Defrags database files
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
##Remove logger
rm /dev/log/main
##Ondemand governor tweaks
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
##Auto change governor and I/O Scheduler
a) I/O Scheduler (Best: MTD devices - VR; EMMC devices - SIO) - needs kernel with these
echo "vr" > /sys/block/mmcblk0/queue/scheduler
or
echo "sio" > /sys/block/mmcblk0/queue/scheduler
b) Governor (Best: Minmax > SavagedZen > Smoothass > Smartass > Interactive) - needs kernel with these
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
##Block Ads with Hosts regularly updated in Sekhy ROM
Patch your hosts file for blocking Ads
(please think before doing this; many developers are supported through this way)
You can use AdFree application for this or changing manually your hosts file.
Here are some databases:
http://www.mvps.org/winhelp2002/hosts.txt
http://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts
##Use Google's dns servers
Create an empty file, name it resolv.conf and put there these 2 lines:
nameserver 8.8.8.8
nameserver 8.8.4.4
Save to /system/etc/.
Update Superuser and su binary to latest version
http://goo-inside.me/superuser/
I think many of you were familiar with QTADB. It is easy to manage your phone with it. But geeks who are interested doing the stuff in different ways try some of these:
Go to command command prompt where your ADB installed. (assuming you are familiar installing adb before doing these)
To install ADB download these and extract to any of the desired drive. Say D:\ or E:\ etc.
code to delete unwanted apps:
adb shell
su
mount -o remount,rw /dev/block/stl9 /system
rm /system/app/nameofapk.apk
Click to expand...
Click to collapse
code to add apps and stuff:
adb shell
su
mount -o remount,rw /dev/block/stl9 /system
exit
exit
adb push nameofapk.apk /system/app/
Click to expand...
Click to collapse
Tips & Tricks
Taking Screenshots
Taking screenshots on Android devices is a pain, but on the Galaxy S2, you can simply hold down the home button and then briefly press the power key to take a screenshot. You can then see your screenshots in the Gallery.
Adjusting Brightness with Notification Bar
The notification bar can serve as a brightness scroll on the Galaxy S 2, if you are not using the automatic brightness option. Just hit the notification bar, hold for a second and swipe left to decrese and right to increase the brightness.
Browser Text Wrapping
Out of the box the Galaxy S2 doesn’t automatically reflow the text in the webpage if you zoom in. But if you just goto settings and check the ‘auto-fit pages’ option, all is well again.
Changing User Agent
The SGS2 browser lets you change the user-agent without needing an extra app, just type ‘about:useragent’ in browser's location bar and you can choose between the iPhone, Nexus One, Desktop, Galaxy S or even enter a custom string.
Test Mode
Dialing *#0*# in the dialer enters the LCD test mode, useful if you are looking for for dead pixels, debugging sensors and other hardware parts of your SGS2.
Search Key
Although SGS2 like the SGS doesn’t have a dedicated search key that all other Android devices have, but if you long press menu, it launch the search screen, anywhere you'd need it.
Video Screen Lock
Pressing the power button while video player is playing locks the screen, now you can hold the device any way you like, no more accidental presses will happen. To unlock, just press the power button again.
Customizing App Launcher Bar
If you would like to change applications shortcuts in bottom application launcher bar, press the Applications button, then Menu -> Edit. You can then rearrange those shortcuts or replace them with other applications or remove them completely. There's limita of maximum 3 shortcuts and the Home button will always be there.
Changing USB to File Transfer Mode
When you connect USB cable, SGS2 mounts it's file system read-only and transfering files between PC and handset is possible with Kies only. To change this behavior to normal read-write USB file transfer mode, go to Settings -> Applications -> Development and enable USB debugging.
User interface
Scrolling:
- Use two fingers to scroll until fingers are released.
- Use three fingers to scroll fast until top/bottom.
Phone wake up: Via home or power.
Hold menu: Quick access Android search.
Dobule click home: Quick access voice commands.
Screenshot: Press home and power simultaneously. Screenshots are saved in /sdcard/ScreenCapture/
Home screen
Multiple home screens: Touch the dots to switch directly to a screen or hold and drag left/right to scroll very fast.
Changing shortcuts at the bottom: Click „Applications“ (bottom right), then menu, click „Edit“: Now change the three (left) icons via drag & drop. Afterwards click menu and choose „Save..“.
Quick brightness change: Hold the notification bar (on the top) and drag left/right to modify brightness (if not set to auto).
Pinch home screen to view all home screens and add/delete them.
Pinch application screen to view all application screens and reoder them.
Set background image for lock screen: When changing your desktop background image, there are two buttons, choose the right one (smaller area) and save. Now you‘ll be asked to use this image for the lockscreen too.
Android Apps
E-Mail: Pinch in the overview list to fold/unfold by date.
E-Mail: Click longer on a date (either the sent date or a date in the email text): Create a new calendar event for this date.
Contacts: Drag left over a contact to send SMS, drag right to call
Keypad: Use the letters on number keys to type a name, the triangle on the right shows how many matching contacts are found, clicking on it reveals them.
Camera: Change shortcut buttons by clicking menu, “Edit”, then modify shortcut buttons via drag&drop.
Camera: Pinch to zoom in/out.
Browser: Pinch to view all tabs/windows.
Browser: Go to “about:debug” via address bar. Now you have additional options when pressing the menu (at the bottom)
Browser: Go to “about:useragent” via address bar. Now you can modify the user agent string.
Video player: Drag left/right to Fast forward/Rewind
Video player: Power locks/unlocks the screen
Calendar: Pinch in month view to get an overview, swipe left/right to change the year.
Easter egg from Google: Go to preferences, about phone, click some times on “Android Version” (try multiple times)
[DIY] Do it yourself guides:
Reset Galaxy S II
Warning: All your data including contacts, messages will be lost!
Hard Reset:
Press and Hold Volume Up + Home button.
Keep pressing these two and press Power button for 2-3 seconds.
Release only power button. But keep pressing Volume UP + Home buttons.
Now, with Volume down, select wipe data/facotory reset (3rd)
Press Power
Useful Codes:
*#0*# LCD Screen test
*#06# Show IMEI Number
*#2222# HW Version
*#1234# Phone info
*#34971539# Camera Firmware
*#9900# Sysdump (Logfiles etc.)
*#0228# Battery diagnostics
*#7284# Phone utility
*#7353# Function testing
*#9090# Service Mode
*#*#197328640#*#* Service Mode Menu
*2767*3855# Factory Reset
Complete Codes Collections for SGS II and should work with other Samsung droids many of them.
Warning: Please use with caution
1 #*#8377466# S/W Version & H/W Version.
2 #*0227# GPRS Switch.
3 #*0277# GPRS Switch.
4 #*2027# GPRS Switch.
5 #*2077# GPRS Switch.
6 #*2252# Current CAL.
7 #*2255# Call Failed.
8 #*2256# Calibration info? (For CMD set DEBUGAUTONOMY in cihard.opt)
9 #*22671# AMR REC START.
10 #*22672# Stop AMR REC. (File name: /a/multimedia/ sounds/voice list/ENGMODE.amr)
11 #*22673# Pause REC.
12 #*22674# Resume REC.
13 #*22675# AMR Playback.
14 #*22676# AMR Stop Play.
15 #*22677# Pause Play.
16 #*22678# Resume Play.
17 #*22679# AMR Get Time.
18 #*2286# Databattery.
19 #*2337# Permanent Registration Beep.
20 #*2351# Blinks 1347E201 in RED.
21 #*2474# Charging Duration.
22 #*2527# GPRS switching set to (Class 4, 8, 9, 10)
23 #*2558# Time ON.
24 #*2562# Restarts Phone.
25 #*2565# No Blocking? General Defense.
26 #*2677# Same as 4700.
27 #*2679# Copycat feature Activa/ Deactivate.
28 #*2775# Switch to 2 inner speaker.
29 #*2787# CRTP ON/OFF.
30 #*2834# Audio Path. (Handsfree)
31 #*2836# AVDDSS Management Activate/ Deactivate.
32 #*2886# AutoAnswer ON/OFF.
33 #*3270# DCS Support Activate/ Deactivate.
34 #*3273# EGPRS multislot. (Class 4, 8, 9, 10)
35 #*3282# Data Activate/Deactivate.
36 #*3353# General Defense, Code Erased.
37 #*3370# Same as 4700.
38 #*3476# EGSM Activate/Deactivate .
39 #*3676# FORMAT FLASH VOLUME!!!
40 #*3725# B4 last off.
41 #*3728# Time 2 Decod.
42 #*3737# L1 AFC.
43 #*3757# DSL UART speed set to. (LOW, HIGH)
44 #*3837# Phone Hangs on White screen.
45 #*3838# Blinks 3D030300 in RED.
46 #*3838# Blinks 3D030300 in RED.
47 #*3849# Restarts Phone.
48 #*3851# Restarts Phone.
49 #*3876# Restarts Phone.
50 #*3877# Dump of SPY trace.
51 #*3888# BLUETOOTH Test mode.
52 #*3940# External looptest 9600 bps.
53 #*3941# External looptest 115200 bps
54 #*4263# Handsfree mode Activate/ Deactivate.
55 #*4472# Hysteresis of serving cell: 3 dB
56 #*4700# Please use function 2637.
57 #*4760# GSM Activate/Deactivate.
58 #*4773# Incremental Redundancy.
59 #*4864# White Screen.
60 #*5133# L1 HO Data.
61 #*5171# L1P1.
62 #*5172# L1P2.
63 #*5173# L1P3.
64 #*5176# L1 Sleep.
65 #*5187# L1C2 G trace Activate/ Deactivate.
66 #*5376# DELETE ALL SMS!!!!.
67 #*5737425# JAVA Mode.
68 #*6833# New uplink establishment Activate/Deactivate .
69 #*6837# Official Software Version: (0003000016000702)
70 #*7200# Tone Generator Mute.
71 #*7222# Operation Typ: (Class C GSM)
72 #*7224# !!! ERROR !!!
73 #*7252# Operation Typ: (Class B GPRS)
74 #*7271# CMD: (Not Available)
75 #*7274# CMD: (Not Available)
76 #*7284# L1 HO Data.
77 #*7287# GPRS Attached.
78 #*7288# GPRS Detached/Attached .
79 #*7326# Accessory.
80 #*7337# Restarts Phone. (Resets Wap Settings)
81 #*7352# BVMC Reg value (LOW_SWTOFF, NOMINAL_SWTOFF)
82 #*7372# Resetting the time to DPB variables.
83 #*7462# SIM Phase.
84 #*7524# KCGPRS: (FF FF FF FF FF FF FF FF 07)
85 #*7562# LOCI GPRS: (FF FF FF FF FF FF FF FF FF FF FF FE FF 01)
86 #*7666# White Screen.
87 #*7683# Sleep variable.
88 #*7693# Sleep Deactivate/Activate .
89 #*7722# RLC bitmap compression Activate/Deactivate .
90 #*77261# PCM Rec Req.
91 #*77262# Stop PCM Rec.
92 #*77263# PCM Playback.
93 #*77264# PCM Stop Play.
94 #*7728# RSAV.
95 #*7732# Packet flow context bit Activate/Deactivate .
96 #*7752# 8 PSK uplink capability bit.
97 #*7785# Reset wakeup & RTK timer cariables/variables.
98 #*7828# Task screen.
99 #*7878# FirstStartup. (0 NO, 1 YES)
100 #*7983# Voltage/Freq.
101 #*7986# Voltage.
102 #*8370# Tfs4.0 Test 0.
103 #*8371# Tfs4.0 Test 1.
104 #*8372# Tfs4.0 Test 2.
105 #*8373# Tfs4.0 Test 3.
106 #*8374# Tfs4.0 Test 4.
107 #*8375# Tfs4.0 Test 5.
108 #*8376# Tfs4.0 Test 6.
109 #*8377# Tfs4.0 Test 7.
110 #*8378# Tfs4.0 Test 8.
111 #*8379# Tfs4.0 Test 9.
112 #*8465# Time in L1.
113 #*8466# Old Time.
114 #*8724# Switches USBACM to Generator mode.
115 #*8725# Switches USBACM to Loop-back mode.
116 #*8726# Switches USBACM to Normal.
117 #*8727# Switches USBACM to Slink mode.
118 #*9270# Force WBS.
119 #7263867# RAM Dump. (On or Off)
120 *#*#4636#*#* Access Phone/Battery/Usage Stat/WiFi Info
121 *#0*# Access Sensor/LCD Screen Test/ Vibration/ Camera/ Speaker etc test
122 *#0011# ServiceMode/Debug /Basic
123 *#06# IMEI Number.
124 *#1234# Firmware Version.
125 *#2222# H/W Version.
126 *#2255# Call List.
127 *#232337# Bluetooth MAC Adress.
128 *#4777*8665# GPSR Tool.
129 *#5282837# Java Version.
130 *#8999*327# EEP Menu.
131 *#8999*364# Watchdog ON/OFF.
132 *#8999*377# Error Menu.
133 *#8999*427# WATCHDOG signal route setup.
134 *#8999*523# LCD Brightness.
135 *#8999*667# Debug Mode.
136 *#8999*8376263# All Versions Together.
137 *#8999*8378# Test Menu.
138 *#92782# PhoneModel. (Wap)
139 *2767*226372# E2P Camera Reset. (deletes photos)
140 *2767*2878# E2P Custom Reset.
141 *2767*3855# E2P Full Reset.
142 *2767*688# Reset Mobile TV.
143 *2767*927# E2P Wap Reset.
Useful Links
-Debrand & Rebrand back to O2 for Samsung Galaxy S2
-Permanently Fix SGS2 Echo and Digital Noise Reduction/Cancellation Problems
-Back up your data before moving to a new rom
-Recover your IMEI in 9 steps.
-Battery Saving Tips Collection
Mods:
-add customizable 14 statusbar toggle buttons for samsung ROM
-Long press volume buttons to skip songs.
-Manually Deodex and Odex back
-Learn to make your own 'eye-candy' mods [Easy Steps]
Tools:
-EFS Pro v1.2.6 - Advanced '/efs' Backup and Restore!
Patches:
-Add native android SIP stack for Wifi AND 3G calls
-Extended Power Menu with no header (reboot / download / recovery)
Speechless lol. Well done though.
looks like an iphone but powered by android baby!!!!
This should be a sticky thread
androidkid311 said:
Speechless lol. Well done though.
looks like an iphone but powered by android baby!!!!
Click to expand...
Click to collapse
Thanks for feedback. Can you explain what iphone thing you have mentioned?
anshmiester78900 said:
This should be a sticky thread
Click to expand...
Click to collapse
Thanks feedback like these will encourage me to do more.
Bloody hell. Made good reading while I was having a dump.: D I say sticky time. I mean sticky thread
Sent from my ICS blood mode S2
sekhargreen said:
Thanks for feedback. Can you explain what iphone thing you have mentioned?
Click to expand...
Click to collapse
Think that is his signature.
Nice posts! But you STILL didn't explain how to make the godamn ROM. All I saw was how ROM makers should be bla bla. I didn't see anywhere how to make the godamn .zip file.
That is awesome. Please continue.
Such efforts must be awarded.
Nice one mate!
This was really a good read
nice ****load of tweaks, but they are useless if you dont define and explain what each of them do.
good work though, keep it up!
even the real bible don't have this much reservations in this forum ...
and waiting for it...
Awesome thread mate... defo sticky material!
Fantastic post
This should be a sticky thread. Helped me with a lot of those... Thank you
Thank you for for this great and nice job/sharing, it's good to know even more about the stuffs that what we are dealing with..!
Best regards!
Fail to understand what is the point of this thread. Lots of preaching and shallow stuff. Sorry.
Related
I wrote this to help when I'm flashing roms and thought I'd share. Let me know what you think - comments, suggestions, fixes.
This is a batch file that gives a menu to perform the following functions:
Code:
echo [1] Edit user.conf
echo [2] Swap status
echo [3] Turn Swap On
echo [4] Turn Swap Off
echo [5] Set swappiness
echo [6] Memory Status
echo [7] Partition SD Card
echo [8] Mount SDCARD in recovery
echo [9] Unmount SDCARD in recovery
echo [10] Repair EXT partition
echo [11] Erase EXT partition
echo [12] Backup EXT partition
echo [13] Restore EXT partition
echo [14] Push lockscreen image
echo [15] Reboot device to recovery
echo [16] Reboot device
echo [17] Wipe device <--- May be buggy
echo [99] Exit
Partitioning is done by using 51dusty's sdparted.
v1.1
Added Repair EXT partition
Added Wipe device (may be buggy)
Extract config.bat to your adb directory (containing adb.exe and AdbWinApi.dll) and run it.
If you aren't familiar with adb, check this thread here.
phillip_hooper said:
I wrote this to help when I'm flashing roms and thought I'd share. Let me know what you think - comments, suggestions, fixes.
This is a batch file that gives a menu to perform the following functions:
Code:
[1] Edit user.conf
[2] Swap status
[3] Turn Swap On
[4] Turn Swap Off
[5] Set swappiness
[6] Memory Status
[7] Partition SD Card
[8] Mount SDCARD in recovery
[9] Unmount SDCARD in recovery
[10] Erase EXT partition
[11] Backup EXT partition
[12] Restore EXT partition
[13] Push lockscreen image
[14] Reboot device to recovery
[15] Reboot device
Partitioning is done by using 51dusty's sdparted.
Extract config.bat to your adb directory (containing adb.exe and AdbWinApi.dll) and run it.
Click to expand...
Click to collapse
Hi Phillip, this looks like it has some promise. Can you give some more specifics (commands) for the noobs (like once you open ADB, what then?), or, does a menu come up? I am at adb remount/successful. now what? Thanks.
wbexpress said:
Hi Phillip, this looks like it has some promise. Can you give some more specifics (commands) for the noobs (like once you open ADB, what then?), or, does a menu come up? I am at adb remount/successful. now what? Thanks.
Click to expand...
Click to collapse
All you have to do is run config.bat, don't run adb. Type the number of what you want it to do.
Here's some more explanation of what this does, minus the obvious ones.
[1] Edit user.conf
This will automatically pull the user.conf file and open an editor, then automatically put it back on your phone after you make your changes and save.
[2] Swap status
[3] Turn Swap On
[4] Turn Swap Off
[5] Set swappiness
This asks for a value then sets the swappiness to that value.
[6] Memory Status
This shows how much RAM and swap is available and how much is in use.
[7] Partition SD Card
This asks what filesystem you want (EXT2, EXT3, EXT4) on your SDcard, and how big you want the swap partition to be, then formats the card have a FAT32, EXT?, and Swap partition.
[8] Mount SDCARD in recovery
This gives your SDCARD a drive letter in windows while the phone is in recovery mode.
[9] Unmount SDCARD in recovery
[10] Erase EXT partition
[11] Backup EXT partition
This copies the files in your EXT partition to a folder on your computer.
[12] Restore EXT partition
[13] Push lockscreen image
This takes a picture you put in the same folder as config.bat and makes it the background image of your lockscreen.
[14] Reboot device to recovery
[15] Reboot device
phillip_hooper said:
All you have to do is run config.bat, don't run adb. Type the number of what you want it to do.
Here's some more explanation of what this does, minus the obvious ones.
[1] Edit user.conf
This will automatically pull the user.conf file and open an editor, then automatically put it back on your phone after you make your changes and save.
[2] Swap status
[3] Turn Swap On
[4] Turn Swap Off
[5] Set swappiness
This asks for a value then sets the swappiness to that value.
[6] Memory Status
This shows how much RAM and swap is available and how much is in use.
[7] Partition SD Card
This asks what filesystem you want (EXT2, EXT3, EXT4) on your SDcard, and how big you want the swap partition to be, then formats the card have a FAT32, EXT?, and Swap partition.
[8] Mount SDCARD in recovery
This gives your SDCARD a drive letter in windows while the phone is in recovery mode.
[9] Unmount SDCARD in recovery
[10] Erase EXT partition
[11] Backup EXT partition
This copies the files in your EXT partition to a folder on your computer.
[12] Restore EXT partition
[13] Push lockscreen image
This takes a picture you put in the same folder as config.bat and makes it the background image of your lockscreen.
[14] Reboot device to recovery
[15] Reboot device
Click to expand...
Click to collapse
Yeah, this is gonna be sweet when I get some time to play around with it. If I have ?'s would you prefer PM's or in open forum?
This looks awesome. Do you have to already have apps2sd on your mt3g for use of step 7? Or is this just an easier way to do so?
wbexpress said:
Yeah, this is gonna be sweet when I get some time to play around with it. If I have ?'s would you prefer PM's or in open forum?
Click to expand...
Click to collapse
Feel free to post in the thread.
rizoh66 said:
This looks awesome. Do you have to already have apps2sd on your mt3g for use of step 7? Or is this just an easier way to do so?
Click to expand...
Click to collapse
7 is to create partitions on the card, then if you flash a rom that uses apps2sd it'll use that ext partition. It uses sdparted to create the partitions, which I think has become standard on most roms. If you flash a rom without it, you can put it on there using the link the first post.
CPU status readings
Hi Phillip, I'm having a lot of fun with your configurator. I would like to ask your opinions on some things related to CPU speed. To that end, I have enclosed the user.conf text I ran, below. The first question is, though: do you have an opinion as to whether the Overclock Widget app causes any potential conflicts or issues? If so, I will get rid of it. My sense from communicating with Mike Taylor on the JACxROM thread is that the ROM more or less sets the CPU automatically. Next, as I understand it, if sacrificing a bit of battery life is acceptable, then the minimum frequency can be set higher, and in one of his last posts he recommended 245760. From what I am attaching below, I am not savvy enough to know exactly what I've got going here. The terms "scaling min freq" and "default" are a little bit beyond me. Bottom line: is the lowest setting currently 128000 or 245760, and is there really any harm in having it set to this level or even higher? I'm almost always plugged into some power source, so battery life does not concern me. Finally, please explain what this means at the bottom of the reading: "percent cpu usage before going up a speed step". Thanks...
# General parameters
general{
apps2sd=1 # this is useless here, require a modified a2sd script
CONF_FILE="/system/bin/user.conf" #location of user.conf
media2sd=1 # moves the medias to sd if /system/sd/media exists
permission_fix=0 # perform permission fix at start up (this parameter sets to 0 after script is executed)
odex_auto=0 # perform auto create or del odex for applications installed or removed within 3 days
odex_apk=0 # creates odex for apk that does not have odex yet (this parameter sets to 0 after script is executed)
odex_all=0 # creates odexes for all apks (this parameter sets to 0 after script is executed)
}
#compcache related parameters
compcache{
compcache_en=1 # enable(1) or disable(0) compcache
cc_disksize=32 # Ram swap disksize - any number between 1 to 95 should work; default is 1/4 of the RAM (24)
cc_memlimit=16 # Limit the memory usage for backing swap (cc .5x known issue-defaults to 15% of total RAM)
cc_backingswap_en=1 # enable(1) or disable(0) backing swap
cc_backingswap=/dev/block/mmcblk0p3 # pointing to the backingswap partition device, swap
cc_swappiness=28 # default 60
}
#create swap file for compcache or linux swap
swap_file{
swap_file_en=0 # set to 1 to create swap file
# set to 0 to del the swap file
linux_swap_file_size=32 # swap file size in MB
linux_swap_file=/system/sd/swap.file # pointing to the swap file location ( must be /system/sd/)
}
#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=0 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p3 # swap partition device
swappiness=30 # default 60
}
#virtual memory
sys_vm{
sys_vm_en=1 # enable(1) or disable(0) virtual memory configurations
page_cluster=0 # default 3, (0 since CM3.9.6+)
laptop_mode=0 # default 0
dirty_expire_centisecs=3000 # default 3000
dirty_writeback_centisecs=500 # default 500
dirty_background_ratio=5 # default 5
dirty_ratio=10 # default 10
}
#cpu clock
proc_cpu{
proc_cpu_en=1 # enable(1) or disable(0) user cpu configurations
# freqency options
# 19200
# 122880
# 128000
# 245760
# 384000
# 528000
scaling_min_freq=128000 # default 245760
scaling_max_freq=528000 # default 528000
sampling_rate=2000000 # default 2000000 depending on kernel version
powersave_bias=0 # default 0, (200 since CM3.9.6+ )
up_threshold=45 # default 40, percent cpu usage before going up a speed step
}
# custom shell commands, these commands run last
custom_shells{
#echo "Hello!!!" # example
#echo "You can create your own cmmands here" # example
}
I'm glad you're getting use out of it. I've never used the overclock widget, as you said, you don't really need it because the rom does it for you. I set the minimum cpu to 384000 and up threshold to 30 and it stays speedy.
The up threshold - the percent cpu usage before going up a step means how much of the cpu do you want to get used before it speeds the cpu up. I set this at 30. I really don't know if these settings do any damage, but it runs fast. I'm sure the battery takes a hit, but my phone stays plugged in a lot.
For the user.conf file I make these changes:
compcache_en=0
cc_backingswap_en=0
linux_swap_en=1
swappiness=40
scaling_min_freq= 384000
up_threshold=30
phillip_hooper said:
I'm glad you're getting use out of it. I've never used the overclock widget, as you said, you don't really need it because the rom does it for you. I set the minimum cpu to 384000 and up threshold to 30 and it stays speedy.
The up threshold - the percent cpu usage before going up a step means how much of the cpu do you want to get used before it speeds the cpu up. I set this at 30. I really don't know if these settings do any damage, but it runs fast. I'm sure the battery takes a hit, but my phone stays plugged in a lot.
For the user.conf file I make these changes:
compcache_en=0
cc_backingswap_en=0
linux_swap_en=1
swappiness=40
scaling_min_freq= 384000
up_threshold=30
Click to expand...
Click to collapse
Sorry, I think I'm doing something wrong. I just changed those values, hit "enter", x'ed out of the cmd screen, reopened, entered "1", but the values did not change. Is there a final step I am missing? Do I need to click "save" in the drop down of the cmd screen instead of "enter" on the keyboard?
wbexpress said:
Sorry, I think I'm doing something wrong. I just changed those values, hit "enter", x'ed out of the cmd screen, reopened, entered "1", but the values did not change. Is there a final step I am missing? Do I need to click "save" in the drop down of the cmd screen instead of "enter" on the keyboard?
Click to expand...
Click to collapse
I see what happened. You edited the temp file that gets put on your computer and saved it, but closed the command window before it was put back on your phone. After saving your edits, you have to choose 'exit' from the file menu. That'll exit the editor, then put the changed file onto your phone and return you to the menu.
After editing:
alt+f (file menu)
s (save)
alt+f (file menu)
x (exit)
phillip_hooper said:
I see what happened. You edited the temp file that gets put on your computer and saved it, but closed the command window before it was put back on your phone. After saving your edits, you have to choose 'exit' from the file menu. That'll exit the editor, then put the changed file onto your phone and return you to the menu.
After editing:
alt+f (file menu)
s (save)
alt+f (file menu)
x (exit)
Click to expand...
Click to collapse
OK, that was beyond easy. Thanx again. One last question (for now): I know even less about the whole compcache/linux swap thing than I do about CPU settings. However, I think I get it that you either use one or the other, and in post #9 I'm assuming you're using the linux swap and not compcache. Can you explain why you chose one over the other? I know there's all sorts of debates, just wanted to hear your thoughts on the subject.
wbexpress said:
OK, that was beyond easy. Thanx again. One last question (for now): I know even less about the whole compcache/linux swap thing than I do about CPU settings. However, I think I get it that you either use one or the other, and in post #9 I'm assuming you're using the linux swap and not compcache. Can you explain why you chose one over the other? I know there's all sorts of debates, just wanted to hear your thoughts on the subject.
Click to expand...
Click to collapse
I use linux swap because I'm running jacxheroski 2.1 (I tried 2.2a/b/r4 and it was too buggy and rebooted) and compcache doesn't work on the MyTouch on 2.1. I really don't know anything about how each works and how they are different, I just know linux swap works for me.
phillip_hooper said:
I use linux swap because I'm running jacxheroski 2.1 (I tried 2.2a/b/r4 and it was too buggy and rebooted) and compcache doesn't work on the MyTouch on 2.1. I really don't know anything about how each works and how they are different, I just know linux swap works for me.
Click to expand...
Click to collapse
Good enough. Yup, I'm gathering as I read more, "to each his own". Mike recommended the settings he put into the JACxROM, so I'll go with the master's recommendations. Thanks again.
new info
Hi Phillip, long story shorter, Mike changed some things up on the earlier JACxROM version, and based on what he said and what I'm attaching, it appears linux swap vs. compcache is the way to go on that one. He recommends a 64 MB swap partition. I am not able to tell what size it is. Can you? Your configurator is really fun but still a bit beyond me...
# User.conf by miketaylor00
# General parameters
general{
apps2sd=0 # this is useless here, require a modified a2sd script
media2sd=1 # moves the medias to sd if /system/sd/media exists
}
#compcache related parameters
compcache{
compcache_en=0 # enable(1) or disable(0) compcache
cc_disksize=32 # Ram swap disksize - any number between 1 to 95 should work
cc_memlimit=18 # Limite the memory usage when backing swap is used
cc_backingswap_en=0 # enable or disable backing swap
cc_backingswap=/dev/block/mmcblk0p3 # pointing to the backingswap partition device
cc_swappiness=28 # default 60
}
#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=1 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p3 # swap partition device
swappiness=30 # default 60
}
#virtual memory
sys_vm{
sys_vm_en=1 #enable(1) or disable(0) virtual memory configurations
page_cluster=3 # default 0
laptop_mode=0 # default 0
dirty_expire_centisecs=3000 # default 3000
dirty_writeback_centisecs=500 # default 500
dirty_background_ratio=5 # default 5
dirty_ratio=10 # default 10
}
#cpu clock
proc_cpu{
proc_cpu_en=1 #enable(1) or disable(0) user cpu configurations
# freqency options
# 19200
# 122880
# 128000
# 245760
# 384000
# 528000
scaling_min_freq=192000 # default 245760
scaling_max_freq=528000 # default 528000
sampling_rate=2000000 #default 200000 depending on kernel version
powersave_bias=0 # default 0, CM3.9.6 default uses 200
up_threshold=45 # default 40, percent cpu usage before going up a speed step
}
wbexpress said:
Hi Phillip, long story shorter, Mike changed some things up on the earlier JACxROM version, and based on what he said and what I'm attaching, it appears linux swap vs. compcache is the way to go on that one. He recommends a 64 MB swap partition. I am not able to tell what size it is. Can you? Your configurator is really fun but still a bit beyond me...
Click to expand...
Click to collapse
Using swap automatically uses the full swap partition (whatever size you set when you formatted the SD card).
Use "[6] Memory Status" from the menu.
Your total swap size will be across from "Swap:" under "total" heres mine (62676):
Code:
total used free shared buffers
Mem: 97852 96120 1732 0 620
Swap: 62676 25528 37148
Total: 160528 121648 38880
any chance of this being converted to linux-friendly ?!
I might be able to do the work to convert the script to linux-friendly, if mr hooper would allow it!
crizznaig said:
any chance of this being converted to linux-friendly ?!
I might be able to do the work to convert the script to linux-friendly, if mr hooper would allow it!
Click to expand...
Click to collapse
That'd be awesome. I don't use linux, but if you want to knock that out, feel free. I'll add it to the first post.
Hi, I'm new to Android.
I installed the SDK, and put your script in ../android/tools
Yes, I put ../android/tools in my path (winxp).
I'm running Cyanogenmod 4.1.999
when I run your script, it says 'Device state is unknown'.
I can mount my sdcard as a removable drive when I connect it via usb to my computer. Did I not install something that I needed to?
Also, does anyone know where Cyanogen put the user.conf in his mod?
Thanks in advance and sorry for my noobitude.
olorin12 said:
Hi, I'm new to Android.
I installed the SDK, and put your script in ../android/tools
Yes, I put ../android/tools in my path (winxp).
I'm running Cyanogenmod 4.1.999
when I run your script, it says 'Device state is unknown'.
I can mount my sdcard as a removable drive when I connect it via usb to my computer. Did I not install something that I needed to?
Also, does anyone know where Cyanogen put the user.conf in his mod?
Thanks in advance and sorry for my noobitude.
Click to expand...
Click to collapse
If you are in recovery mode it should say device is unknown. This is normal. If the phone is booted and shows unknown then you'll want to be sure you installed the usb_drivers from the sdk properly.
Thanks, that worked.
I have 2 computers, drivers would not update on one, but the were able to install on the other. Can't figure out why.
I'm using cyanogenmod 4.1.999, and it says that I don't have a user.conf, and it also says 'system/bin/swap not found'.
This is what it shows when I press 6 (memory status):
total used free shared buffers
Mem: 98140 96300 1840 0 432
Swap: 96812 24520 72292
Total: 194952 120820 74132
Device is booted.
Is it normal for that much memory to be used (I have the 192mb Mytouch)?
P.S., thanks for the Configurator app!
Here it is the gstreamer for your rooted android phones. I have made two flashable zip files:
gstreamer-0.10_gingerbread.signed.zip for android 2.3 (gingerbread)
gstreamer-0.10_24-11-10.signed.zip for android 2.1 and 2.2 (eclair, froyo)
I strongly suggest you take a backup of system partition before you flash as it contains third party shared objects like glib and oil.
For your convenience I have included a init script at /etc/init.d/99rtpstream which will launch either "/system/sd/rtpstream.sh" (eclair and froyo) or "/sd-ext/rtpstream.sh" (gingerbread) if they exists at boot time.
Gstreamer is a very flexible multimedia frameworks and it supports windows, OpenBSD and Linux. More information can be found in http://gstreamer.freedesktop.org.
This build is targeted at audio processing as I could not get the videooutput (surfaceflingersink) working. Patches are welcome please see the bottom of the post for sources.
Turns your mobile into wifi speakers
At home I have a htpc which plays videos on the TV. However occasionally I would like to use my android mobile as wifi speakers with a pair of headphones so I will not disturb others. This setup also give me the freedom to roam around the whole house whilst listening to favorite music/radio or just anything being played on the htpc. I found it rather convenient to listening to online radios.
Step 1 On your android mobile
Login to your mobile either via adb or ssh and run the following commands in sequence:
Code:
export GST_PLUGIN_PATH=/system/plugins
export GST_REGISTRY_UPDATE=1
export GST_REGISTRY=/system/sd/gst-reg.bin
AUDIO_CAPS="application/x-rtp, media=(string)audio, clock-rate=(int)90000, encoding-name=(string)MPA, channels=(int)2,rate=(int)44100, payload=(int)96, endianness=(int)1234"
gst-launch-0.10 udpsrc buffer-size=4096 port=6500 ! $AUDIO_CAPS ! rtpmpadepay ! mad ! audioconvert ! audioflingersink sync=false latency-time=100 blocksize=16384
Replace "/system/sd/" by the correct place where your sd card is being mounted, for aoss build this is likely to be "/sd-ext/".
Step 2 On your pc
Here are instructions for windows and linux only, for other platforms please refer for online help to setup correct source and parameters.
{windows}
Install gstreamer 0.10.7 from http://code.google.com/p/ossbuild/downloads/detail?name=GStreamer-WinBuilds-GPL-x86-Beta03-0.10.7.msi
and run the following command from the console
Code:
cd "C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.7\bin
gst-launch.exe directsoundsrc blocksize=4096 ! audioconvert ! lamemp3enc target=1 cbr=true bitrate=128 ! rtpmpapay ! udpsink port=6500 host=ANDROID_PHONE_IP
Replace ANDROID_PHONE_IP by the ip address of your android mobile
{Linux}
Code:
gst-launch-0.10 pulsesrc device=output.monitor ! "audio/x-raw-int,channels=2,rate=44100" ! audioconvert ! lamemp3enc target=1 cbr=true bitrate=128 ! rtpmpapay ! udpsink port=6500 host=ANDROID_PHONE_IP
Replace "ANDROID_PHONE_IP" by the ip address of your android mobile and replace "output.monitor" by the name of your default pulseaudio output monitor device.
Automate the process
If you are happy with the whole thing, I would suggest put the script from Step 1 into /etc/init.d/ so it will start automatically at boot time. However you will not be able to start/stop gstreamer easily without touching the adb or ssh console. I ended up adding a loop to check a particular file on sdcard with the following script (save it to /etc/init.d/ as 99rtpstream.sh and make it executable)
Code:
#!/system/bin/sh
export GST_PLUGIN_PATH=/system/plugins
export GST_REGISTRY_UPDATE=1
export GST_REGISTRY=/system/sd/gst-reg.bin
AUDIO_CAPS="application/x-rtp, media=(string)audio, clock-rate=(int)90000, encoding-name=(string)MPA, channels=(int)2,rate=(int)44100, payload=(int)96, endianness=(int)1234"
killall gst-launch-0.10 > /dev/null 2>&1
while [ "$test" = "" ]; do
if [ -f /system/sd/rtpstream.nostart ]; then
sleep 5
else
gst-launch-0.10 udpsrc buffer-size=4096 port=6500 ! $AUDIO_CAPS ! rtpmpadepay ! mad ! audioconvert ! audioflingersink sync=false latency-time=100 blocksize=16384
sleep 5
fi
done
Replace "/system/sd/" by the correct place where your sd card is being mounted, for aoss build this is likely to be "/sd-ext/".
Basically it will not start gstreamer if there is a file called rtpstream.nostart on sd card.
I have also created 2 scripts on sdcard that can be used with gscript lite so I can start/stop gstreamer from gscript without touching adb or console.
start script (save it to sdcard as rtpstream-start.sh and make it executable)
Code:
#!/system/bin/sh
rm /system/sd/rtpstream.nostart
Replace "/system/sd/" by the correct place where your sd card is being mounted, for aoss build this is likely to be "/sd-ext/".
stop script (save it to sdcard as rtpstream-stop.sh and make it executable)
Code:
#!/system/bin/sh
busybox ps | grep gst-launch | grep -v grep | awk '{print $1}' | xargs kill
touch /system/sd/rtpstream.nostart
Replace "/system/sd/" by the correct place where your sd card is being mounted, for aoss build this is likely to be "/sd-ext/".
In gscript you can create 2 scripts with root permission and one to use the start script and the other to use stop script.
Other considerations
Streaming realtime udp over wifi when screen is switched off proved to be problematic (voice chopping) under android as most of the factory wifi driver is too aggressive on power saving. The solution is to change the default power saving mode to something like PM_FAST for some broadcom chips. This will involve recompiling the kernel. If you are using wildfire/buzz you can try my customised kernel from here http://forum.xda-developers.com/showthread.php?t=967746.
Sources
Most of the gestreamer sources including dependency libs come from http://github.com/prajnashi/ and it was ported for andriod 1.5 and as such the gstreamer android plugin is not working at all and I had to resort to this http://github.com/jahrome/. Unfortunately I could not get the video sink (surfaceflingersink) working, patches are welcome.
[size=+1]Introduction[/size]
What is GenTop2?
GenTop2 is a full-fledged Gentoo Linux able to replace the original Motorola Webtop. It is faster, fully-customizable and gives you the power of a complete Linux system on a mobile phone. It is a peek into the future of mobile computing!
Thanks goes to kholk, who did the original GenTop, otherwise I would have long given up.
Why use Gentoo Linux as WebTop?
Programs are fully optimized for the ARMv7a CPU contained in the Atrix.
Thus the whole system is faster and more responsive.
No shackles put around the WebTop by Motorola.
You can install any program (which compiles on ARM).
All software (except X11) is fully up-to-date.
You remember old times with desktop computers having far slower CPUs and less RAM than your phone and you wonder what you can do with this pocket computer.
Why NOT use Gentoo Linux as WebTop?
Gentoo is huge because it must install all development files.
The system and all programs must be compiled on the phone. How crazy is that?
Firefox could not be built. But, there is a smaller replacement.
Why bother using a phone, when you already have a notebook?
Working and Installed Applications
X11 via WebTop or HDMI (with hdmi-hack)
Xfce4 with thunar file manager
midori web browser with Flash player
claws-mail client
audacious
evince (pdf viewer)
ssh daemon
rxvt terminal
aiw Android In-A-Window!
Sound output via Android media system.
All are very light-weight Linux applications perfect for a small system.
Not Working:
webtop-panel (system status bar on top)
non-flash video playback ?
Installable as binary packages:
firefox (renamed to Aurora due to trademark stuff), approx 30 MB.
thunderbird (renamed to Earlybird due to trademark stuff), approx 44 MB.
libreoffice, approx 250 MB.
abiword, pidgin, emacs, texlive,
and many more, drop a note for more wishes here. However KDE is just too large.
[size=+1]Installation Instructions[/size]
Prerequisites:
Motorola Atrix
[size=+2][highlight]BACKUP.[/highlight] This will break your device![/size]
Okay hopefully it won't. A full restore will of course overwrite the webtop.
root privileges.
unlocking is not necessary.
adb and Linux knowledge.
webtop2sd is not supported (!)
CM7 is NOT supported
GenTop2 Space Requirements, Disk Speeds and a Note About WebTop2SD
Gentoo is very large because packages contain all development files. This cannot easily be changed, therefore one must work around the space limitation of the /osh partition in some way.
I did some "disk" performance measurements using bonnie++ (see [1] for full info). Here the through-put results in short: /data (ext3) 20,800 KB/s read and 6,200 KB/s write, /sdcard (fat32) 21,500 KB/s read and 8,000 KB/s write, /sdcard-ext (ext3) 12,300 KB/s read and 4,200 KB/s write, /sdcard/loopback.img (ext3) 16,150 KB/s read and 4,400 KB/s write.
One way to go would be to require webtop2sd, however, GenTop2 does not support webtop2sd because the read/write speed of the internal sdcard is much faster than on the external sdcard. Thus I tried to install as much on the /osh partition as possible and move directories onto other partitions as necessary, leaving symlinks behind. WebTop2SD also requires dpkg for some reason, which Gentoo does not have.
Therefore, it's pretty unavoidable that you do some space management yourself.
I have decided to utilize the /preinstall partition for /var. I'm not fully sure that this partition is unused on every Atrix released, but I guess in most cases it contains only provider specific bloatware that people don't want anyhow. On my Atrix it contained some car racing game, which I find hilarious to play on a mobile phone.
Anyway, the /preinstall partition is 300 MB and perfect for /var if reformatted to support many small files. The /var/db/pkg/ directory contains lots and lots of small files describing the installed packages. See the installation instruction for the mkfs line.
I also decided to require some extra ext3 partition for further program, data and portage files. It is needed anyhow to install further programs, which is what most people want to do. The /data partition would be the obvious choice and for that reason the first GenTop2 put files in /data/osh/. However, /home/ is also on /data by default and it gets pretty annoying when your home directory is full.
The only alternative to /data is either a partition on an external sd-card or a loopback mounted file-partition on /sdcard/, both are not as fast as /data (/cache cannot be used as it must be wipeable). So there really isn't much choice left except for external storage.
The main GenTop2 tarball puts 630 MB in /osh (leaving 145 MB free) and 178 MB in /preinstall (with 150 MB free), which must be mkfs formatted.
The portage GenTop2 tarball puts 1460 MB into /mnt/gentoo/ of which 475 MB are data files from /osh/usr/ and 810 MB are the portage tree.
[size=+1]Steps to install GenTop2:[/size]
There are some complications involved when using faux123's kernel, because it only contains ext4 filesystem modules and explicit mounting of ext3 will fail. The ext4 module will however mount ext3 filesystem without problems.
use adb shell and get root:
Code:
$ su
# cd /osh
# mv etc etcx
# reboot
Reboot. The above will disable the webtop.
Download http://kristallsturm.de/GenTop2/GenTop2-20120509.tar.gz (275MB) and put it onto /sdcard via USB or adb push.
use adb shell to overwrite the existing WebTop:
Code:
(first we delete /osh)
# cd /
# ls bin
bin: No such file or directory
(this tests whether the old webtop is disabled)
# rm -r osh/*
# ls osh
(should be empty)
(next we disable and reformat /preinstall)
# mount -o remount,rw /dev/block/mmcblk0p12 /system
# mv /system/bin/load_pia.sh /system/bin/load_pia.sh.disabled
# umount /preinstall
(depending on your ROM this might fail. ignore this problem if the following format works)
# mke2fs -m 0 -i 2048 -j /dev/block/mmcblk0p17
# mount -t ext3 /dev/block/mmcblk0p17 /preinstall
(for faux kernel: replace ext3 -> ext4 in above line)
(now we unpack the main tarball)
# df
(/osh and /preinstall should be almost empty)
# cd /
# tar xvzf /sdcard/GenTop2-20120509.tar.gz
# sync
(begin extra for faux kernel: we change ext3 -> ext4)
# sed -i s/ext3/ext4/ /osh/ubuntu.sh
(end extra for faux kernel)
# sync
# reboot
Once rebooted you will get an X11 login on the HDMI connection or you can access the phone via ssh.
Account Passwords:
root / atrix
adas / atrix
To make GenTop2 more useful and to compile/install further packages you currently must have an external sd-card (or someone must devise a method to use a loopback device).
I have partitioned my external sdcard using a desktop computer into the following two partitions:
/dev/block/mmcblk1p1 (remainder)
/dev/block/mmcblk1p2 (4.0 GB, formatted ext3)
Advanced: (Actually most of this stuff is advanced.) You can also use the new GenTop to partition the external sd-card. Open a terminal, and use something along the lines of:
Code:
# fdisk /dev/block/mmcblk1
(partition it, see further description of fdisk on the net)
# mkfs.ext3 -m0 /dev/block/mmcblk1p2
The boot-up script /osh/ubuntu.sh will mount /dev/block/mmcblk1p2 to /mnt/gentoo. This place is referenced by /usr/portage, /var/tmp and /preinstall/usr and will enable emerge if you install the second GenTop2-portage-20120509.tar.bz2 tarball.
Download http://kristallsturm.de/GenTop2/GenTop2-20120509-portage.tar.bz2 (124MB) to /sdcard/ using any method.
Use adb shell or a terminal on the desktop
Code:
$ su
# cd /
# tar xvjf /sdcard/GenTop2-20120509-portage.tar.bz2
Note: If you trust your network connection, you can also download and unpack simultaneously (without saving) it using:
Code:
$ su
# cd /
# wget -O - http://kristallsturm.de/GenTop2/GenTop2-20120509-portage.tar.bz2 | tar xvj
[size=+1]Installing further software[/size]
How do I install applications in Gentoo?
- Read http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
- Read http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3
I have set up a portage overlay "atrix-overlay" which unmasks many packages and includes some custom patches required for compilation on arm. It is included in the main tarball and automatically synced alongside "emerge --sync". Most updates will now be performed via this overlay.
See https://github.com/gendol/atrix-overlay for details.
Furthermore, for large binary packages like firefox, thunderbird and libreoffice I have set up a binary package repository with the same USE flags as the atrix-overlay. These are built using cross-compilation on my desktop computer.
See http://kristallsturm.de/GenTop2/packages/
To force installation from binary packages use emerge -G <package>. See the list of "Installable as binary packages" above.
[size=+1]Miscellaneous Questions[/size]
Why no thumb instructions?
- I did a speed test of cryptography functions and thumb instructions were approximately 10% slower than usual ARM code.
Where was GenTop2 compiled?
- Most of the system was fully compiled on my own Atrix. Larger binary packages are compiled on my desktop using cross-compiling.
Why is X11 not up-to-date?
- The only xorg driver I could get working is the one on the original Webtop, and that requires an older version of X11.
Why is udevd not running?
- If you look at logcat there are lots of the following messages, some of which are due to udevd. Disabling udevd reduces (but does not eliminate) these messages and probably also some unnecessary background process that draws battery.
NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UDEV_LOG' not found
NetlinkListener: ignoring non-kernel netlink multicast message
NetlinkListener: ignoring non-kernel netlink multicast message
[size=+1]Reinstalling the old WebTop[/size]
Some people on the forums struggled to reinstall the old webtop for some reason. It shouldn't be that difficult and I created a tarball of the original Webtop WT-1.2.0-133_38. These instructions were not tested by me:
Download http://kristallsturm.de/GenTop2/WT-1.2.0-133_38.tar.gz to /sdcard/ using any method.
Use adb shell or a terminal to disable mounting of webtop:
Code:
$ su
# cd /osh
# mv etc etcx
# reboot
Use adb shell to unpack original tarball into /osh:
Code:
# cd /
# ls bin
bin: No such file or directory
(this tests whether the webtop is disabled)
# rm -r osh/*
# ls osh
(empty)
# cd /
# /sdcard/WT-1.2.0-133_38.tar.gz
# sync
# reboot
[size=+1]Downloads[/size]
http://kristallsturm.de/GenTop2/GenTop2-20120509.tar.gz (275MB main tarball)
http://kristallsturm.de/GenTop2/GenTop2-20120509-filelist.txt (Filelist of tarball for your reference)
http://kristallsturm.de/GenTop2/GenTop2-20120509-portage.tar.bz2 (124MB portage tree for /mnt/gentoo/, see above)
http://kristallsturm.de/GenTop2/GenTop2-20120509-portage-filelist.txt (Filelist of tarball for your reference)
Old Downloads
http://kristallsturm.de/GenTop2/GenTop2-20120428.tar.gz (369MB main tarball)
http://kristallsturm.de/GenTop2/GenTop2-20120428-filelist.txt (Filelist of tarball for your reference)
http://kristallsturm.de/GenTop2/GenTop2-20120428-portage.tar.bz2 (44MB portage tree for /mnt/gentoo/, see above)
http://kristallsturm.de/GenTop2/GenTop2-20120424.tar.gz (364MB main tarball)
http://kristallsturm.de/GenTop2/GenTop2-20120424-filelist.txt (Filelist of tarball for your reference)
http://kristallsturm.de/GenTop2/GenTop2-20120424-portage.tar.bz2 (44MB portage tree for /mnt/gentoo/, see above)
Changelog
From 20120428 to 20120509:
Added atrix-overlay for pulling in updates using layman.
Reorganized /etc/portage/ to symlink into atrix-overlay files.
Removed mplayer from default install.
Added xarchiver, leafpad and some customization for the terminal.
Reorganized directory structure to use /preinstall.
From 20120424 to 20120428:
Readded resolutions to xorg.conf like in original webtop. Nevertheless you can switch using Xfce's settings dialogs.
Installed Flash: copied libflashplayer.so and emerges nss nspr.
Readded lots of the original .desktop files and corresponding icons. These launch Android apps.
[1] http://kristallsturm.de/GenTop2/docs/atrix-bonnie.html
It is a good job. I try this. Thank you.
This is a very agressive aproach. /osh dose have some Moto magic sauce in it. How well can you drive the screnn with a stock X system? Most of the cutesy features from WT I can live w/o, but the "phone"app really is usefull. Seams like this would be worth the effort to figure out.
If I was using a less "pure" setup (spinning up X and the phone app in Motos osh) then bringimng up the desktop in Gentoo, how would that compare to oither the same concept with other distros?
Please post on. I think this is the first time somebidy has run a non /osh X. Would love to see if it really can be done.
exwannabe said:
This is a very agressive aproach. /osh dose have some Moto magic sauce in it. How well can you drive the screnn with a stock X system? Most of the cutesy features from WT I can live w/o, but the "phone"app really is usefull. Seams like this would be worth the effort to figure out.
Click to expand...
Click to collapse
Thanks for pointing that out. Yes, the approach is radical, but not as aggressive as you may think. All the "magic sauce" in /osh lives in /osr/usr/local/ and all of that is retained. The only problem is that some dynamic link libraries are missing, but most of these problems can be fixed.
They actually had to be fixed because the GenTop2 does need to send some magic signals to Moto's PortalApp/DockService to work correctly. This is done using the /usr/local/bin/rmtest tool via the "fbcp" instance of dbus.
Other than /osh/usr/local/, /osh is really just Debian.
With the phone app, you mean the green phone button? I just tested that, it can be added. The phone button is nothing but a .desktop mime file, which calls one of the magic apps /usr/local/bin/androidlauncher. And it popups up in the aiw display.
I even tested the HD Media Center laucher and that too worked without problems. That really should be included in the next GenTop2 tarball.
exwannabe said:
If I was using a less "pure" setup (spinning up X and the phone app in Motos osh) then bringimng up the desktop in Gentoo, how would that compare to oither the same concept with other distros?
Please post on. I think this is the first time somebidy has run a non /osh X. Would love to see if it really can be done.
Click to expand...
Click to collapse
I guess I don't understand what you mean with a non /osh X. GenTop2 does run X11 and you really need to replace the system libaries to get a well-working Gentoo.
Greetings,
Gendol
Great job! Does this work with cm rom's aswell or only with blur based ones? As another fact, we could use distcc or crosscompile distcc to compile most of the stuff, actually even a crosscompile binhost would be doable for several packages. One more thing, we could probably use an .img file on the internal sdcard partition, that would be ext3/4 formatted instead of using the external sdcard (but probably its better and safer to sue the external card, due to the flash wear)
edit: so i tried it on my atrix with nottachtrix rom installed, it starts fine and seems to work rather well, i only saw two to me rather annoying bugs:
1. somehow the X server thinks that my tv (1080p lg) has a virtual size of 1366x768 and will not allow to use the 1920x1080 resolutions that are in the TV's EDID and that the system puts into the xorg.conf file aswell as it shows in the Xorg.0.log
2. the atrix's screen stays on all the time in the "normal mode" and if one uses the mouse on the gentop its moving and functioning on the atrix's screen aswell (ie you can launch apps by accident with the mouse in android)
I do not know if these are issues with nottachtrix or something else, but for me on the "normal webtop" 1080p worked on this same TV.
here the xorg log: http://dl.dropbox.com/u/24268926/Xorg.0.log
Really nice, installing it right now!
Does flash work on Midori?
I don't know about CM7, you'll have to try to replace the Linux system like moto does it.
The X11 screen size defaults to WebTop resolution 1366x768, but you can change that to 1920x1080 by editing /etc/X11/xorg.conf. The first thing to try is to comment out all Modelines and let EDID detection do the work. But for that a monitor must be present, so you need to Zap (Ctrl+Alt+Bckspace) your X, and that brings up the dual input problem.
I also use nottach's ROM. The dual input problem happens when something in motorola's magic communication goes wrong. I have not been able to figure out how in particular moto disables input on the touchscreen. For me it works most of the time. I also have all the Modelines in xorg.conf enabled, because they fit my monitor.
I didnt really focus on Flash, yet. But as it works on the original Webtop, you should just be able to copy the plugin files.
Gendol
Can't get Midori working .. Got network (via ping), but no web browsing
EDIT: Solved by disabling proxy settings inside Midori
i haven't run gentoo in over 10 years but this is tempting!!!!!
Hello! I am a bit newbie in linux and i have 2 questions
1) Could someon please tell me how to install GenTop2-portage-20120424.tar.bz2 tarball?
2) Is there any way to install synaptic so i can install other linux apps?
snik38 said:
Hello! I am a bit newbie in linux and i have 2 questions
1) Could someon please tell me how to install GenTop2-portage-20120424.tar.bz2 tarball?
2) Is there any way to install synaptic so i can install other linux apps?
Click to expand...
Click to collapse
1) use ADB and first post
2) Gentoo Portage - it's command line but very easy
Hmm, anyone using this with webtop over HDMI? I get the login screen, but the webtop touchpad thingie doesn't come up so it's impossible for me to log in.
nalorite said:
Hmm, anyone using this with webtop over HDMI? I get the login screen, but the webtop touchpad thingie doesn't come up so it's impossible for me to log in.
Click to expand...
Click to collapse
you need to use a hd dock, lapdock or a modded powered usb hub with mouse + kb
Vazay said:
1) use ADB and first post
2) Gentoo Portage - it's command line but very easy
Click to expand...
Click to collapse
1) After the reboot i used
adb shell
# tar xvzf /sdcard/GenTop2-portage-20120424.tar.bz2
but it gave me an error, am i using the correct command or i should use something else?
Yes. The touchpad thingy is also an open end. I have no idea why it doesnt come up. The GenTop2 tries to do everything in the same way as the original one, but for some reason that doesnt appear.
I guess the touchpad is some Android program part of DockService or PortalApp, which drive the Webtop switch. But I havent debugged how to activate it.
@snik38
To extract a .tar.bz2 you use tar xvjf ...
Gendol
three items one that caused some grief, but other than that this has lots of cool potential!
I have a stock rom with root.
1. resolution was pretty screwed up. I did try to adjust the resolution, but it was locked into one setting.
2. flash isnt installed on the browser so many websites where disabled.
3. I could not get AIW to start.
I see you answered #1 in a previous post. But I think all three of those items are minimum requirements to replace webtop. BTW great job again! Its seemed much faster than the webtop app.
2. Try to copy the flashplugin from original webtop(not sure if it works with midori)
3. aiw works fine try to reboot the phone
Took me a while to get this all running, but it's great now it is. Have this over Nottachtrix 1.3.1. Everything installed and works fine!
Cheers!
When my phone turns on and gets to the preparing sd, it takes forever. Does this happen to anyone else?
anyone tried to emerge chrome/chromium?
Hello everybody,
I thought that ICS was a little bit slow on my SGS+ so I tried to tweak it.
This is when I came across the option compcache in the settings -> performance menu.
Only I found this option isn't w orking yet in arco's alpha 3 build, or isn't working anymore.
Either way I found out that zram0 is present on the device, so I created a little script with which you can set-up Zram.
Just put it somewhere you can browse to with Terminal Emulator.
Also make sure it's permissions are set to rwx-r-x-r-x.
After you set the permissions right, just execute with: ./zram start
Or if you want to stop the swapping again just give in ./zram stop
This is the code for the script:
#!/system/bin/sh
#
# Zram manager
# koudumrulez{at}gmail.com (PsychoGame)
case "$1" in
start)
echo 3 > /proc/sys/vm/drop_caches
echo 30 > /proc/sys/vm/swappiness
# get the amount of memory in the machine
mem_total_kb=$(grep MemTotal /proc/meminfo | grep -E -o '[[:digit:]]+')
mem_total=$((0,25 * mem_total_kb * 1024))
# initialize the devices
echo $((mem_total)) > /sys/block/zram0/disksize
# Creating swap filesystem
mkswap /dev/block/zram0
# Switch the swap on
swapon /dev/block/zram0
;;
stop)
# Switching off swap
swapoff /dev/block/zram0
;;
*)
echo "Usage: $0 {start|stop}"
esac
exit 0
You can just call the file zram, and then copy it on you're device for example you're SD.
I only used this script on ALPHA3 build. Maybe it works on others as well, but that's at you're own responsibility.
Greetings Psycho Game
Here I'am again.
There's been a little error from my side.
If you put this file on you're SD-Card you can't set the permissions right.
What I did was putting the file in /system/bin, so the full path would be /system/bin/zram.
I did this with ES File Manager, but you're free to use whatever file manager you like.
After this make sure the permissions are set to rwx-r-x-r-x in the file manager, or in the terminal you can do a "chmod 755 /system/bin/zram" without quotes.
The zram is now useable through executing the command: "/system/bin/zram start or stop".
You can also choose to mount the zram automatically with booting.
In this case you have to make a file called userinit.sh in the folder "/data/local/"
This file needs the following content:
#!/system/bin/sh
/system/bin/zram start
I also set the permissions of this file to 755 with "chmod 755 /data/local/userinit.sh" but I'm not sure if this is neccesary. Anyway it works.
Hopefully somebody can use this script as well. If you do, please leave a comment. Also if you have questions feel free to ask. I will keep an eye on this post.
And the question if this will work on Alpha 4, yes it does.
Greetings,
Psycho Game
Hi Psycho,
thanks for your effort.
I also saw that zRam is indeed not working on the latest Alpha 6 (i use the Galxy W / i8150 Build).
I had a look at your script and some other sources and enabled zRam on my deivce for testing purposes.
My conclucsion so far is, that there seems so be some major problem of interference with an other memory management policy.
Independent from the Size and Swapiness configuration - there is something going wrong hier i think
I watched the systems memory stats through proc/meminfo and free. Once the system is out of fresh memory, it begins swapping. zRam swap then getfs filled up quickly. Now the system gets extremely slow, i also had two restarts (likely in cause of some kernel panics from acute memory problems).
Will be difficult to track down the problem, my guessings so far:
- Interference with LMK, as it only indirectly knows about zRam
- Some kind of io block size might have been set to a bad value for the zram device
- CPU-load through compression simply much to high (unlikely, but have not checked it yet)
.. and plenty other possibilites
ATM, its definitely only a huge decrease in performance for me. What was your experience?
From the technical specs, i guess zRam should behave much better, so i really guess theres going something wrong.
Guess i found a possible reason for the bad performance.
I will write more details when i have the time to.
Just tried the above script on CM9 (build 0814) for Galaxy Exhibit 4G (a sister phone of Galaxy W as I understand it). I ran the script in the Terminal. Initially the performance became very bad after a period of time (especially after opened many apps). It almost looked like zRam made it worse once it got used for some storage amount. However, after I changed mem_total_kb from MemTotal to MemFree, and removed 0,15 for mem_total, the horrible slow down seemed to disappeared (even after I opened 5 apps at the same time).
any further refinements of this script?
Skinny MIUI is all about preserving the good; Working premium drivers for Camera, CPU control, Notification LEDs, Bluetooth, FM Radio etc. while resolving what is bad in the stock offering.
All deletions assume the user has absolutely no interest in being part of the Xiaomi ecosphere. Leave now if that is not you.
This guide applies to MIUI stable versions 7.1.1 thru to 7.2.5 only. Developer, Beta or Eng versions are not good candidates.
STAGE 1:
Boot.img mods: (this is not creating a custom kernel!!!)
The stock boot.img is unpacked, init.d support added and many entries that are not relevant to our hardware removed.
Disabling lines trying to load non-existent services from init.rc, init.mt6795.rc and ueventd.rc etc. stops a bit of churning on each and every boot and frees up a bit of RAM.
There are intentionally no other tweaks contained within the boot.img. All tweaks are done in init.d scripts accessible outside the boot.img.
Note: This boot image made from 7.1.4 will work back to ver 7.1.1 and forward to 7.2.50 / 6.3.31 and is superior to the stock boot images contained in those ROMs.
At this point you can flash the modified boot.img to your phone if you already have a stock MIUI 7.1.1 to 7.2.50 installation that you are going to keep.
If you are going to do a clean install, replace the boot.img in your ROM zip file with this modified one. (backup the original first)
The boot.img is found here: (Now links to folder with all versions available)
https://drive.google.com/folderview?id=0BwdRTuyj12_yRk9Kcm1pZkxuZzg&usp=sharing
STAGE 2:
Full install:
I recommend you install my TWRP 3.02-2 version from here:
https://drive.google.com/open?id=0BwdRTuyj12_yWWp0SUpGV1pzT1k
Before installing your chosen ROM:
Check that the updater script found: \META-INF\com\google\android\updater-script is not going to install Preloader, Uboot (lk), Recovery or logo partitions. If so, edit the updater-script to prevent this happening. This is to reduce the risk of a soft-brick or being locked out of your phone.
Do a factory reset in TWRP (wipe Data, Dalvik, Cache) before installing any ROM.
Install your chosen ROM. Trying to slim down the ROM before install is an arduous affair which tends to end in bootloops so we leave the original ROM alone in this respect..
Do the install without connecting to mobile or WiFi networks and just skip at screens prompting for network connectivity and creating accounts.
Reboot into TWRP once finished with the initial Setup to avoid Recovery from being deleted on first boot.
Install an updated SuperSU zip package from TWRP recovery - V2.46 to 2.71 work equally well.
Do not install a root package other than SuperSU - most online ones are malware!
Update the outdated and incomplete Busybox installation. I have created a TWRP flashable zip to upgrade to the latest version 1.25.0. This is the second edition which has better binaries and no longer creates symlinks to busybox commands.
https://drive.google.com/open?id=0BwdRTuyj12_yd0s1QmNLRzdveFk
Now install a root capable filemanager (Root Explorer or Total Commander recommended). Open it and gain root permissions. Open /etc/perfservscntbl.txt in a text editor and edit as follows:
Code:
CMD_SET_CPU_FREQ, SCN_APP_TOUCH, 403000
CMD_SET_CPU_CORE, SCN_APP_TOUCH, 1
This will lower the number of cores used and the frequency at which it runs when a screen touch is detected (referred to as Touch Boost) Changes are activated on reboot.
Now create a file named 01_tweaks in the /etc/init.d folder. Change the permission of the file to 0755
Tips on creating scripts:
The EOL(end-of-line) characters must be in Unix format - not Windows. Make sure you are using a text editor that saves in Unix format.
Note also that many script files need a blank line at the end to work correctly. Get in the habit of always doing this whether needed or not.
Any line starting with a # character and anything after a # character on a line is not processed and is referred to as "commented out"
Script files must start with the header #!/system/bin/sh as the first line.
Init.d scripts are processed in alpha-numeric filename order hence the common usage of 01_xxx, 02_xxx format for names.
Copy these lines into the 01_tweaks file: Note: Different values for 2.2GHz cpu and freq limited operation.
Code:
#!/system/bin/sh
### Tweak Interactive CPU Governor
echo 806000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "90 403000:80 806000:85 1326000:90 1625000:95 1950000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 32000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 15000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
### Tweak IO Scheduler
echo deadline > /sys/block/mmcblk0/queue/scheduler ### choose between cfq, bfq or deadline
### Enable this line if using cfq or bfq scheduler only
# echo 0 > /sys/block/mmcblk0/queue/iosched/slice_idle
echo 256 > /sys/block/mmcblk0/queue/read_ahead_kb
### Enable zram swap
# echo 1073741824 > /sys/block/zram0/disksize ### 536870912 = 512MB 1073741824 = 1GB
# /system/bin/tiny_mkswap /dev/block/zram0
# /system/bin/tiny_swapon /dev/block/zram0
### Tweak Entropy to avoid regular depletion of available pool
echo 512 > /proc/sys/kernel/random/read_wakeup_threshold
echo 1024 > /proc/sys/kernel/random/write_wakeup_threshold
#Tweak for wifi router connection issues
#echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
### FSTRIM: Enable once after installation is finalized and then monthly ##### needs an updated busybox installation to work
# busybox fstrim /data
# busybox fstrim /cache
# busybox fstrim /system
Options: Add / replace lines to do the following:
1. freq limit a 2GHz cpu to 1781MHz (recommended setting)
echo "90 403000:80 806000:85 1326000:90 1625000:95 1781000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 1781000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1781000 > /proc/cpufreq/cpufreq_limited_max_freq_by_user
2. Full speed 2.2GHz cpu
echo "90 403000:80 806000:85 1326000:90 1664000:95 2158000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
3. freq limit a 2.2GHz cpu to 1885MHz (recommended setting)
echo "90 403000:80 806000:85 1326000:90 1664000:95 1885000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 1885000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1885000 > /proc/cpufreq/cpufreq_limited_max_freq_by_user
4. Add a limit to the maximum number of cpu cores allowed to come online (for possible battery saving maybe...)
#Limit max cpu cores available (range 2 - 8)
echo 4 > /proc/hps/num_limit_low_batt
echo 4 > /proc/hps/num_limit_power_serv
echo 4 > /proc/hps/num_limit_thermal
echo 4 > /proc/hps/num_limit_ultra_power_saving
Edit /system/build.prop. Change the line: ro.sf.lcd_density from the default 480 to a value between 400 (everything smaller, more on screen) to 520 (everything larger, less on screen) to suit your taste and eyesight. You can test this out first by issuing the wm density command in a terminal app. e.g wm density 440 will immediately change the density to 440dpi, wm density reset will put it back to whatever the build.prop setting is. Adjust the text size in Settings in conjunction with this to get the best result.
At this point you have a functional set of tweaks that are all tested and proven to provide a battery and performance improvement. There are a lot of detrimental or placebo tweaks out there so be a little bit discerning in what else you add to these tweaks - sometimes less is more. Now is not the time to load up those tweaks!
Do a TWRP backup of System, Data, Boot and NVram partition now to save your efforts up to this point.
STAGE 3:
Now its time to get Skinny: You will need an app that can uninstall and freeze system apps. I use SD Maids App Control feature for this purpose.
Warning: If you intend to use app lock, you will unfortunately need to keep some fingerprint service files. See the post below and a few before it to understand the problem. Thanks to @DarthJabba9 for his work.
I believe that app lock also disables MIUI Optimization if enabled.
http://forum.xda-developers.com/showpost.php?p=67242356&postcount=583
First phase is to get rid of the obvious bloat apps and Xiaomi in-house apps....these in the list below are safe to remove.
Tick off what you have removed and reboot each 10 or so deletions and backup, don't try to delete everything in one hit as you will end up stuck at boot.
WARNING: This removes some functionality that may be useful to some users. You either want the function or you don't - it is your finger pressing the buttons!
Some people may choose to keep the MIUI Home Launcher interface. In this case, keep MIUI Wallpaper as well.
Must keep these - Do not delete:
Updater - disable autostarts, do not freeze
Theme Manager - disable autostarts
Security (com.miui.securitycenter) - leave as-is
FwkPlugin
Network Assistant app
MiuiSDK - disable autostarts
AuthManager
Webview (update via Playstore once install finished)
Xiaomi service framework - disable autostarts, freeze app
Definitely O.K to delete list:
Wallpaper Apps:
Android Live Wallpapers
Black Hole
Bubbles
com.android.wallpaper.holospiral
Live Wallpaper Picker
Music Visualization Wallpapers
Phase Beam
Photo Screensavers
*Miui MiWallpaper * keep if also keeping MIUI Home Launcher.
Xiaomi/MTK Apps:
Analytics
Assistant
Back up Home screen layout (cloud backup)
Backup - delete if you don't use it (use TWRP instead)
Battery Warning - deleting this does not affect battery charging or display
Battery Saver - deleting this improves battery life
Blocklist (AntiSpam) - delete if you don't use it
com.miui.mipub
File Explorer - delete (you should already have a root capable file browser)
Find device - use the generic Google version if you really must, not the Xiaomi one supplied.
FingerprintService
FPCSensorTestTool
FTPreCheck
FWUpgrade
gallery (com.mfashiongallery.emag daily wallpapers)
Games
Home screen
JeejenMIUIContainer
com.securitycore.miui_t (Tencent virus scanner plugin to Security Center)
KLO Bug report
LocationEM2
Metok
MI Account
Mi Cloud
Mi Credit
Mi Drop
Mi Home
MI Service Security Framework
Mi VIP
Mi Voice
Mi Wallet
Miravision
MTKAndroidSuiteDaemon
MtkFloatMenu
MTKLogger
Music
MusicFx
Notes - if you don't use it, delete it.
PowerKeeper (Battery Saver) - deleting this improves battery life
Report Bug
Security service plugin (not securitycenter app)
SystemAd
System Launcher (Miui Home) replace with an alternative Launcher, allow autostart in Security first then delete. ADW Launcher recommended for lightweight and simple functionality (set to 4x6 looks good).
Traffic Control
Uniplay
UpgradeSys
VCalendar
Video
Voice Unlock
VoiceAssist
Weather
Weather provider
Whetstone delete app and delete folder /etc/WhetstonePermission ****Whetstone is linked with several other apps to make it hard to get rid of. It may cause some temporary FC issues - these will pass.
Xiaomi Assistant
Yellow Pages
com.jeejen.knowledge
com.jeejen.store
com.ximalaya.ting.android
com.xiaomi pass
com.xiaomi.o2o
com.xiaomi.jr
Cheetah Mobile CleanMaster SDK + Cleaner - delete
NetworkLocation (com.baidu.map.location) delete app, delete folder: /system/vendor/operator and delete corpses
Android/Google Apps:
Browser - suggest replace with Polarity Browser - minimal permissions required, Ad Blocking, lightweight and fast
Documents
Google Keyboard - replace with something lighter - Hackers Keyboard v1.38.2 recommended
Google Pinyin input
Google Feedback
Google partnersetup
HTML Viewer
Email
Mail
Pico TTS
Print Spooler
com.android.browser.provider
PacProcessor
Note: If you have apps reappear as if by magic, they are being reconstructed from cached information. SD Maid has an excellent "Corpse Finder" function that will delete the orphaned files and prevent this happening. Clear corpses after each reboot.
Second phase is to toggle off the autostarts (receivers) on the apps that do not need to start by default. This is not the same as freezing an app. Some apps will still start by themselves - do not worry too much about this.
Atci_service
Backup
Blocklist
com.mediatek.batterywarning
Download Manager
Google Contacts Sync
Google One Time Init
MIUI SDK (don't freeze)
MTK NLP Service
Notes
One Time Init
Sim Toolkit
Themes (Theme Manager)
Updater
Xiaomi service framework (should also be frozen)
Third phase is to clean up left behind folders and files
/data/miui/app/customized/ remove any app folders that you have uninstalled
/data/miui/app/noncustomized/ remove any app folders that you have uninstalled
delete folder /data/miui/mms
delete folder /data/miui/gallery
delete contents of /data/miui/cust
delete folder /etc/jeejen
delete etc/voicecommand and etc/voiceextension folders if you have removed voice related apps
delete /system/tts folder if you have removed Pico TTS
delete folder /system/etc/radv
/etc/fake_cdrom_install.iso - delete file
/etc/IAmCdRom.iso - delete file
/system/addon.d delete folder
/system/app/jjcontainer/ - delete folder
/system/app/jjhome/ - delete folder
/system/app/jjknowledge/ - delete folder
/system/app/jjstore/ - delete folder
Libs you can remove:
/vendor/lib
libfingerprint_tac.so
libfpcalgorithm.so
/vendor/lib64
libcom_fingerprints_productiontestmanager.so
libcom_fingerprints_sensor.so
libfingerprint_tac.so
/system/lib
libcaFingerPrintShared.so
libcom_fingerprints_service.so
libfamily_jni.so
libjeejenAisound.so
libjeejenmsc.so
libMiraVision_jni.so (if deleted MiraVision App)
libpatcher_game_jni
libvoicerecognition.so (if voice recognition apps deleted)
libvoicerecognition_jni.so (if voice recognition apps deleted)
libweibosdkcore.so
libwhetstone_jni.so (if deleted Whetstone App)
libwhetstone_sdk.so (if deleted Whetstone App)
libxiaomimediaplayer.so (if xiaomi media player deleted)
libxiaomimediaplayerwrapper.so (if xiaomi media player deleted)
/system/lib64
libairtunes_jni.so
libairtunes.so
libBankCardRecognizer.so
libcaFingerPrintShared.so
libcom_fingerprints_service.so
libduokantext.so
libjni_latinimegoogle.so (if deleted Google keyboard)
libjni_pacprocessor.so (if deleted PacProcessor)
libMiraVision_jni.so (if deleted MiraVision App)
libpatcher_game_jni.so
libttspico.so
libweibosdkcore.so
libwhetstone_jni.so (if deleted Whetstone App)
libwhetstone_sdk.so (if deleted Whetstone App)
libxmpass_sdk_patcher.so
xmpass_libweibosdkcore.so
Establish network connectivity.
If Gapps is required but not installed, download open_gapps-arm64-5.0-pico version. You can install individual extra Google apps at any stage later on.
Go through all MIUI Settings and turn off everything you do not need running.
Install your favorite media player, web browser etc. to replace the deleted original apps.
Can replace Calendar and Messenger with Google Calendar and Google Messenger to remove some more Xiaomi dependencies. Contacts & Dialer are much harder to replace - True Phone is the only viable option.
To further limit Xiaomi unsolicited communications, rename (or delete) /system/xbin/tunman to tunmanbak. (This is a tunneling protocol driver that Xiaomi uses without your knowledge or permission).
The startup is disabled in the boot.img but it can still be started after boot unless renamed.
To skinny the Themes footprint:
Go to /system/media/theme/
Delete elder-default folder if no use.
Delete entire contents of miui_mod_icons folder
Delete items in /system/media/theme/default/ that are not going to be used.
Delete items in /system/media/lockscreen/ and /system/media/wallpaper/ that are not going to be used.
Now install your favorite app for monitoring CPU parameters and make sure that on idle, there is only one cpu core running and it sits predominantly on 403MHz. It will jump a little bit but that is normal with the inevitable background activities. Increase the timer_rate if you want more stability at idle rather than cranking up the load figures too far. Up to 50000 or down to 30000 is O.K (remember we are talking microseconds here so 50000 = 50mS)
Congratulations! You now you have a "Super Skinny" MIUI installation. Do a backup now!!!!
Now you will feel the AOSP shining through - and still you have working everything!
This post will list useful tools and items that need further investigation.
Apps for finding and disabling things:
Wakelock Detector-Root - monitor and records wakelock activity
GSAM - monitors what apps / services are consuming battery
Disable Service - disable services started on an app by app basis
SD Maid, Titanium Backup - Freeze / remove apps, toggle autostarts (receivers)
Modify your quick start grid size:
https://drive.google.com/file/d/0BwdRTuyj12_yYlphU3A0UWprcXc/view?usp=sharing
Modify MIUI Homescreen grid:
https://mega.nz/#F!yJdkxbBa!WSIqrhwUQwD7qjzxOuo1Yw
Issues:
Find a way to completely disable XMPush service with and without Xiaomi services framework installed.
Xiaomi Services Framework causes Sim connectivity issues if deleted - do not delete. There will always be one XMPush instance running.
Find out what is causing Audio On wakelock reported by GSAM
Quote: Originally Posted by DarthJabba9
With regard to the "Audio On" wakelock (aka AudioMix Wakelock) reported bt GSAM, I found this somewhere in this forum: "The nexus 6 had the same wakelock and most of us got rid of it by unchecking "use NuPlayer" in developer options". I have now unchecked that option, and will see over the next day or so whether it resolves the problem. This appears to be the fix
What triggers no sim / no service errors
Removing Xiaomi Services Framework is the culprit
Why do some files / folders not show up in root filemanagers?
MIUI locks the files / folders to prevent them being used or shown.
Why does zram not work anymore?
Rename tiny_mkswap, tiny_swapon, tiny_swapoff to teeny_mkswap, teeny_swapon, teeny_swapoff
Make sure owner is root shell and permissions are 0755 for all 3 files.
edit the init.d script to reflect the change in filenames. Now it will work again!
Example full Skinny ROM based on MR7.2.30 ID:
This is how my phone is set up, it has 100% functionality, zero FCs and zero battery drain on idle. The init.d settings are exactly as provided. Compare the directory listings to your own to see what is deleted.
The other major variation to this is for people who want to keep MIUI Launcher (and MIUI Wallpaper), everything else should remain the same. This cost you a bit more RAM usage and slightly more cpu activity (less battery) but is still impressive compared to stock.
/system/app
ApplicationsProvider
AtciService
AutoDialer
BSPTelephonyDevTool
Bluetooth
CaptivePortalLogin
CertInstaller
DeskClock
DownloadProviderUi
DrmProvider
EngineerMode
EngineerModeSim
FM
GoogleCalendarSyncAdapter
GoogleContactsSyncAdapter
KeyChain
MTKThermalManager
MiuiCompass
NetworkAssistant2
NlpService
Omacp
PackageInstaller
Provision
SuperSU
SystemHelper
ThemeManager
Updater
UserDictionaryProvider
WebViewGoogle
XiaomiServiceFramework
YGPS
cit
mcRegistry
miui
miuisystem
/system/priv-app
AuthManager
BackupRestoreConfirmation
BarcodeScanner
CDS_INFO
CalendarProvider
ContactsProvider
DefaultContainerService
DownloadProvider
ExternalStorageProvider
FusedLocation
GoogleBackupTransport
GoogleLoginService
GoogleOneTimeInitializer
GoogleServicesFramework
InCallUI
InputDevices
ManagedProvisioning
MediaProvider
MiuiCamera
MiuiGallery
MiuiKeyguard
MiuiSystemUI
MmsService
OneTimeInitializer
Phonesky
PrebuiltGmsCore
ProxyHandler
SecurityCenter
Settings
SettingsProvider
SharedStorageBackup
Shell
Stk1
TeleService
Telecom
TelephonyProvider
VpnDialogs
WallpaperCropper
com.ghisler.android.TotalCommander ### Total Commander installed as system app
com.hb.dialer.free ### True Phone replacement for Xiaomi Contacts & Dialer
org.adw.launcher ### ADW Launcher installed as system app
Other base apps in /data/app:
com.google.android.apps.messaging ### replacement Google Messenger
com.google.android.calendar ### replacement Google Calendar
com.duokan.phone.remotecontroller ### stock IR remote controller app
pcr.browser.polarity ### Polarity Browser
com.grarak.kerneladiutor ### Kernel Adiutor * disable autostarts*
org.pocketworkstation.pckeyboard ### Hackerskeyboard-v1.38.2 replaces Google keyboard
jackpal.androidterm ### Android Terminal
Thanks a bunch for the info. This is exactly what I'm looking for (my slimming down attempts always resulted in bootloops, so I've been playing it pretty safe so far).
Is this something you repeat every time an update is being pushed to your RN2?
@elaurens By doing this you are forgoing the use of OTA Updates which will unravel everything you have achieved.
I had to go through quite a few bootloops before creating the "safe lists" - I suffer so you can all benefit.
If you are starting with 7.1.4 everything is perfect and needs no more updating
Keep your eye out for additions to these lists as I discover or remember them
I have tried this:
http://forum.xda-developers.com/red...d-enable-clearmotion-miui-based-roms-t3278552
to enable ClearMotion and can vouch for it being safe - as in no malware and no breaking things. It adds the following to Build.prop and puts some hacked drivers in /system/lib.
persist.sys.display.clearMotion=1
persist.clearMotion.fblevel.nrm=255
persist.clearMotion.fblevel.bdr=255
ro.mtk_clearmotion_support=1
ro.mtk_slow_motion_support=1
ro.mtk_16x_slowmotion_support=1
Is this a worthwhile thing to do? There are no negatives in doing so as far as I can see but I don't really have anything that can give this a proper workout.
Can anyone see a difference in video playback? (Must have hardware acceleration selected) I won't recommend this if there is no perceivable gain.
most of the stuff works fine, everything checks out, It's not really anything new, but i find it well written, and it's not just a "placebo build.prop tweaks edit" which is a +. its a smart thing to have it all in a single thread.
however there're some issues with init.d script. even if you get init working, sometimes it just simply wont apply any of the tweaks. interestingly enough, i forced it to create a new text file on every boot, and that works. not really sure whats causing this prob.
anyways, by some magic I eventually made it apply the script, not really sure if it was cause of the rom change, or just pure luck lol
@sikica133 and anyone else having init.d problems:
init.d problems are usually one of the following:
1. incorrect folder permissions.
2. incorrect file permissions
3. No line feed at the end of the file (blank line)
4. incomplete or missing Busybox install
5. missing header in the text
6. Loosing SU privileges
Check init.d folder has 0755 permissions
Check file has at least 0644 permissions
Check and/or insert a line feed at the end of the file
Install busybox on rails, run the cleanup and busybox install, uninstall busybox on rails after this (this gives you an up-to-date and more complete busybox installation)
First line of file must be exactly #!/system/bin/sh
Reinstall a fresh version of SuperSu through TWRP
I sometimes get caught out myself by editing a file on the PC and transferring it back without fixing permissions afterwards:silly:
I have the ultimate build.prop tweak that I will share with you all now, stand back, it is very powerful
persist.sys.use_qualcomm_performance_features_instead=1
nah, i was testing it with a updater-script doing 0755 on all scripts. busybox should be fine cause other scripts did their job. dunno, could be some funny issue on my end. works now, i was just wtf, everything works, this doesnt. no idea what was going one tbh, but it works
could be incompatibility with bbox and the script itself? im running it without feedline atm, and it applies it all. same script i used before when it didnt do anything.
MIUI 7.1.4 and I assume all other versions has a very old and incomplete version of busybox installed (I think it was v1.20?).
It does not have fstrim command (plus a few others) included which is why I recommend updating.
I tried init.d and 01_tweaks script (whith correct permissions).
The system is more time in 806 Mhz., deep sleep not works properly.
I use Stable 7.1.1 .
Deleting script, deep sleep works fine.
Need I install or update busybox for resolve my issue?
@Xabadou This script is the starting point. If you do not "skinny down" MIUI, there are so many things running in the background that you will find it difficult to sit on idle frequency.
How far into skinnying down have you gone?
Also, if you have a 2.2GHz cpu, the 2nd line below frequencies in bold must be modified to valid frequency for that cpu.
If you are not going to skinny down to a great extent, then it helps to bump some of the load settings up a touch.
These are the original lines:
echo 80 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 90 403000:70 806000:81 1183000:84 1326000:87 1469000:90 1625000:93 1781000:96 1950000:99 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
# for 2.2GHz cpu: echo 90 403000:70 806000:81 1183000:84 1326000:87 1482000:90 1664000:93 1885000:96 2158000:99 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
Modify to:
echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 95 403000:75 806000:81 1183000:84 1326000:87 1469000:90 1625000:93 1781000:96 1950000:99 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
This is enough to get it to sit on 403MHz idle in most cases. If you go higher, you will start compromising smoothness. There are no problems at all with entering deep sleep.
If you are still having problems, you have an app running that is badly behaved - identify it and deal with it.
Refer back post #10, I mention why you should upgrade busybox.
I am running my phone beyond Super Skinny and loving it. Super stable and battery friendly while still being a performance beast. You should notice even at the point of trimming down to Skinny, this phone really starts to liven up.
jajk said:
I am running my phone beyond Super Skinny and loving it. Super stable and battery friendly while still being a performance beast. You should notice even at the point of trimming down to Skinny, this phone really starts to liven up.
Click to expand...
Click to collapse
Do you have a list of the apks (and directories) that you deleted in order to get the skinny ROM? Such a list would be useful for writing a script to automate the task.
P.S.: you might have noticed that I am a script fanatic - I generally find that it is less error-prone to automate such tasks with a script - and you only need to get the script right once.
I use stable 7.1.1 by xiaomi.eu whith your modded kernel and a lot of apps frozen (App Quarantine).
Modified kernel works very good.
Just now I have updated busybox.
I have 2.0 ghz version.
I will try again the script.
Clear Motion mod works fine in MIUI roms but you must use MX Player for play videos.
---------- Post added at 01:20 PM ---------- Previous post was at 01:11 PM ----------
persist.sys.use_qualcomm_performance_features_inst ead=1
Works qualcomm tweaks whith mediatek processors?
@DarthJabba9 The lists ares already mentioned - 1 to get to skinny, 1 to get to super skinny but if you do this in a script on a live system you will likely end up in a bootloop because there are too many odex and cache entries orphaned for Android to handle in one hit. If you intend to apply a script to the ROM files before installation, that is a different story. It takes a bit of effort to figure out how and where MIUI is loading a lot of its components from but is doable.
Why I have not offered a complete ready to go package? It is too easy for users to do it themselves and add their preferences along the way. For those that have actually followed through with the process, I can guarantee that they will instantly loose interest in any other custom ROM.
@Xabadou Thanks for the clarification on ClearMotion. I run VLC set to hardware acceleration and can't see the split screen test mode. Video looks fine regardless, so really hard to tell if anything has changed.
Do the apps that you quarantine stay not running? I had problems with quite a few apps running regardless of being frozen or not so had to uninstall.
You, along with everyone else are not running a modified kernel - the kernel remains intact since we do not decompile and recompile or compile it from source.
The "persist.sys.use_qualcomm_performance_features_instead=1" tweak is a sarcastic dig at the many tweak offerings that do absolutely nothing:silly:
You asked the question showing you were not ready to accept this at face value:good:
If there is no evidence of a tweak doing something positive, don't blindly use it!!!
This is a customized boot image that provides init.d support and has unnecessary entries removed. No tweaks are embedded.
It is built on 7.1.4 and can be used on stock 7.1.1 to 7.1.4.
https://drive.google.com/file/d/0BwdRTuyj12_yR3phb0Zxd05UQjQ/view?usp=sharing
credits to @DarthJabba9 for the alternate init.d support method adopted in this image. It circumvents using busybox run-parts method that appears to have some bugs.
jajk said:
@DarthJabba9 The lists ares already mentioned - 1 to get to skinny, 1 to get to super skinny but if you do this in a script on a live system you will likely end up in a bootloop because there are too many odex and cache entries orphaned for Android to handle in one hit. If you intend to apply a script to the ROM files before installation, that is a different story. It takes a bit of effort to figure out how and where MIUI is loading a lot of its components from but is doable.
Why I have not offered a complete ready to go package? It is too easy for users to do it themselves and add their preferences along the way.
Click to expand...
Click to collapse
Fair enough ...
jajk said:
I will share my custom Super Skinny MIUI boot.img based on MIUI7.1.4 since it is now stable ... It is unpacked and repacked using AndroidMasterChef (downloaded from Needrom). I do not have problems unpacking and repacking again. If you try to unpack and have problems, use the same tool.
Click to expand...
Click to collapse
Thanks for the image. It cannot be unpacked with standard linux tools, but it unpacks ok with AndroidMasterChef.