Powered By Blogger

Sonntag, 28. Juli 2013

FirmwareFlash with ODIN for SGY+SGY-Duos(Samsung)


Rom Porting,the easy and lazy Way!!!!!

Have tested many times and it have ever worked,but its recomned to read and follow the Guide.
-----------------------------------------------------------------------------------------------------------
 Things Needed-Winrar/7zip,Notepad++,a Base Rom and the Rom you will Port
----------------------------------
The best is to use Roms from same Manufacturer with same screen resolution and You can use this Method to port roms From armv6 to armv7 devices but I dont know about the method used to port roms from armv7 to armv6 devices..

What is base Rom:
The ROM which is Developed For your Mobile..
What is Port Rom:
The Rom Which you want to port to your Device.
STEP1;
Take any clean CM9, AOSP, CM7, CM10 ROM which is running on your device as Base ROM.

STEP2:
Extract it Using Winrar.

STEP3:
Take the ROM you want to port. This Port ROM. Extract it also using Winrar.

STEP4:
Delete app, Framework, Fonts and Media folder in System Folder of Base ROM.

STEP5:
Now copy app, Framework, Fonts and Media folder in System Folder from Port rom to base rom system folder.

STEP6:
Now open etc folder in both the ROMs folder.

STEP7:
In etc folder of base ROM open permissions folder and copy all the permissions files in Port rom to your base ROM folder except platform and handheld_hardware .And Then open init.d Folder in Base ROM and Delete Every thing except banner and then copy all the files inside init.d folder of port ROM to Base ROM.

STEP8:
Now open buid.prop file using Notepad++ and make changes to these of Base Rom as you wish.

ro.build.id=
ro.build.display.id=
ro.build.date=
ro.modversion=

STEP9:
In build.prop file change these to same as Port Rom build.prop values.
ro.config.ringtone=
ro.config.notification_sound=
ro.config.alarm_alert=

Also Copy anything you Find Extra in ADDITIONAL BUILD PROPERTIES related to theme..

STEP10:
COPY THE set_perm Lines in META-INF/com/google/android/updater-script From Port to Base ROM After Deleting set_perm lines in Base ROM's Updater-Script.

STEP11:
If You find any extra file or folder in system folder of PORT rom than copy them to your base rom system folder.

STEP12:
Last Step to ZIP THE FOLDERS IN ONE..
SELECT META-INF, system, boot.img(if it is having), data(if it is having).
Right Click and Select Add to Archive..
Select Zip..
Type the Name.
Click OK..

IF YOU ARE HAVING BOOTLOOP THEN COPY THESE LIB FILES TO BASE ROM FROM PORT ROM:
libandroid_runtime.so
libandroid_servers.so
libmedia_jni.so
IF YOUR BASE ROM HAS ISSUES LIKE CAMERA ISSUE THAN YOUR PORTED ROM TOO WILL HAVE ISSUES.

NOW ZIP YOUR ROM AND POST IT BUT DON'T FORGET TO GIVE CREDITS TO THE DEVELOPER OF PORT ROM..
------------------------------------------------------------------------------------------------------------

Just a basic background on how to theme your ROMS

As the title says a BasicGuide for theme Roms,easy and fast,dont forget the thanx for the real RomDev.!!!
------------------------------------------------------------------------------------------------------------
NOTE:Its recomned to use a Deodexed Rom!!!
-------------------------------------------------
I just made it easy for easy understanding and for the newbies.

Tried so many times and tested

I've already tried editing the systemUI.apk of different ROMs.

Here's what I did :

FIRST : Download 7zip to open the archived apk. - that's free.

Extracting first the Zip File..
(make sure you copy the original before extracting it for back up)

1. Download the ROM.zip and extract it to your PC.
2. Go to \system\app\SystemUI.apk\res\drawable-ldpi\
3. View the PNG files you wanted to change and make sure to remember its' file name.
4. After editing/changing the file/image you wanted, you can save it anywhere from your PC, let's say on your Desktop.
- Make sure that the file name still remains as is..
---------------------------------------------------
*After you're done editing, updating the PNG files you wish to change, follow this steps to update the zip file :

NOTE : You can apply transparency by editing the PNG file to photoshop by reducing the opacity of the image
------------------------------------------------------
1. Go to the original ZIP file of ROM.Zip from your PC
2. Right Click the folder and select 7 ZIP -->> open archive
3. Close all of windows/Browers (or minimize)
4. Go to \system\app\SystemUI.apk\res\drawable-ldpi\ and it will open a new window of 7zip showing the files inside the zip.
5. Now, given your edited PNG files or downloaded png files (assuming that files are located in your desktop). - Click and simply DRAG the file(s) from your desktop to \system\app\SystemUI.apk\res\drawable-ldpi\ .
6. It will ask you to confirm the action for it will replace the existing PNG file that you're trying to change.
7. Make sure that the file name of the one you edited/downloaded are THE SAME. -
8. After dragging and replacing the files you wanted, then you're good to go!
9. Close the 7zip window and that's it!.

You can now install the .zip by copying the UPDATED zip file to your SD Card.
(Note: Make sure to copy the updated one, not the backed up one)

Install the zip file from the original thread's instructions and reboot twice.

After that, you have now a customized systemUI.apk.
-----------------------------------------------------------------------------------------------------------
For those who do not want to reinstall the whole package.. follow these steps:
-------------------------------------------------------------------------------
1. I assumed that you have the zip file of your ROM.
2. Extract it and go to \system\app\
3. Separate the SystemUi.apk - put it on your desktop. create a back up,
Right Click SystemUi.apk and select 7 ZIP -->> extract here - just to view the files you wanted to change.
Just go the folder and search for the PNG files.

4. Right Click SystemUi.apk and select 7 ZIP -->> open archive.
5. Go to \res\drawable-ldpi\
6. Click and simply DRAG the PNG file(s) from your desktop to \res\drawable-ldpi\
7. It will ask you to confirm the action for it will replace the existing PNG file that you're trying to change.
8. Make sure that the file name of the one you edited/downloaded are THE SAME. -
9. After dragging and replacing the files you wanted, then you're good to go!
-----------------------------------
APPLYING :
--------------
1. Download and install rootexplorer.apk
2. Download the png files you wanted to update.
3. Copy and paste the NEW SystemUi.apk that you have updated/Edited to your SD card.
4. Open root explorer in your galaxy y then go and tap MOUNT R/W.
5. Go to \SDCard and go to new SystemUI.apk that you have updated.
6. Long press the file and select copy
7. Press back and go to \system\app - tap MOUNT R/W at the top.
8. Paste the new SystemUI.apk from there.
(Note : You will encounter a lot of force closes for the exixsting systemui is currently being used by your phone. - just ignore it a lot and scroll down to look for the new SystemUI.apk.
9. Once you get there, long press on it and select permissions:
from the pop up, make the checked one like this :  ------------------    in letters: rw-r-r--
                                                                            [   x   ]   x  ]       ]     with Terminal Emulator: chmod 655
                                                                            [   x   ]       ]       ]
                                                                            [   x   ]       ]       ]
                                                                             -----------------

  ----------------------------------------------------------------------------------------------------------   After encountering a lot of force closes,(no panic)reboot the phone and that's it!
(Force Closes are normal, DON't PANIC - logically, you are currently using your systemUI.apk so just ignore it

NOTE : You can also apply the same steps in editing system files apps, just edit the .png files and locate it using 7zip(when you already opened it). Have a little LOGIC on how to edit system app background - same process. just different apk files and directory
------------------------------------------------------------------------------------------------------------                                                   more to come

Build.prop Tweaking,a lil Guide

This Guide is for explaining and guiding to tweak the build.prop a lil bit(root needed),only with RootExplorer.
------------------------------------------------------------------------------------------------------------
How to:
--------
1, Open "Root Explorer" and click the R/W
2, Go to /system/build.prop.
3,backup yout current build.prop.
4, Long-presson Build.Prop and you’ll see a pop up.
5, Text Editor.
6, Type in those few line of words below into the last line of the text then save.
7,reboot and enjoy
--------------------
Data Tweaks Increase download/upload/3G speeds
----------------------------------------------------
ro.ril.hsxpa=1
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=0
ro.ril.hsdpa.category=8 (or 10,12,14) Still looking for more of these though.
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
----------------------------
POWER SAVES
------------------
Allows the phone to sleep better
ro.ril.disable.power.collapse=1

Saves power when phone is sleep
pm.sleep_mode=1

Allows your wifi to scan less, saving more battery
wifi.supplicant_scan_interval=150 or 180 (your choice)

Helps Scrolling Responsiveness
windowsmgr.max_events_per_sec=150

Increase overal touch responsivenss
Debug.performance.tuning=1
Video.accelerate.hw=1
---------------------------------------
SYSTEM TWEAKS
---------------------
Forces your home launcher into memory
ro.HOME_APP_ADJ=1

Change the Dalvik VM heap size
dalvik.vm.heapsize=64m can use 24, 32 is default, 48, 64

To disable usb debugging popup
persist.adb.notify=0

Fix some application issues
ro.kernel.android.checkjni=0

Render UI with GPU
debug.sf.hw=1

These lines forces GPU&CPU to render graphics
debug.composition.type=gpu
debug.composition.type=cpu
------------------------------------------------------------------------------------------------------------
                                                              more is coming

Guide and Info about Governor and Io Sheduler Settings

Here is a Guide that explain how which Governor+IO Sheduler how work and which are the best settings!!!
------------------------------------------------------------------------------------------------------------
-------------------------------------------CPU Governors:------------------------------------------------
                                                                ------------------
1.OnDemand Governor:

This governor has a hair trigger for boosting clockspeed to the maximum speed set by the user. If the CPU load placed by the user abates, the OnDemand governor will slowly step back down through the kernel's frequency steppings until it settles at the lowest possible frequency, or the user executes another task to demand a ramp.

OnDemand has excellent interface fluidity because of its high-frequency bias, but it can also have a relatively negative effect on battery life versus other governors. OnDemand is commonly chosen by smartphone manufacturers because it is well-tested, reliable, and virtually guarantees the smoothest possible performance for the phone. This is so because users are vastly more likely to bitch about performance than they are the few hours of extra battery life another governor could have granted them.

This final fact is important to know before you read about the Interactive governor: OnDemand scales its clockspeed in a work queue context. In other words, once the task that triggered the clockspeed ramp is finished, OnDemand will attempt to move the clockspeed back to minimum. If the user executes another task that triggers OnDemand's ramp, the clockspeed will bounce from minimum to maximum. This can happen especially frequently if the user is multi-tasking. This, too, has negative implications for battery life.
----------------------------
2: Performance Governor:

This locks the phone's CPU at maximum frequency. While this may sound like an ugly idea, there is growing evidence to suggest that running a phone at its maximum frequency at all times will allow a faster race-to-idle. Race-to-idle is the process by which a phone completes a given task, such as syncing email, and returns the CPU to the extremely efficient low-power state. This still requires extensive testing, and a kernel that properly implements a given CPU's C-states (low power states).
----------------------------------
3: Powersave Governor:

The opposite of the Performance governor, the Powersave governor locks the CPU frequency at the lowest frequency set by the user.
---------------------------------
4:Conservative Governor:

This biases the phone to prefer the lowest possible clockspeed as often as possible. In other words, a larger and more persistent load must be placed on the CPU before the conservative governor will be prompted to raise the CPU clockspeed. Depending on how the developer has implemented this governor, and the minimum clockspeed chosen by the user, the conservative governor can introduce choppy performance. On the other hand, it can be good for battery life.
-----------------------
5: Userspace Governor:

This governor, exceptionally rare for the world of mobile devices, allows any program executed by the user to set the CPU's operating frequency. This governor is more common amongst servers or desktop PCs where an application (like a power profile app) needs privileges to set the CPU clockspeed.
-----------------------
6: Min Max

well this governor makes use of only min & maximum frequency based on workload... no intermediate frequencies are used.
------------------------
7: Interactive Governor:

Much like the OnDemand governor, the Interactive governor dynamically scales CPU clockspeed in response to the workload placed on the CPU by the user. This is where the similarities end. Interactive is significantly more responsive than OnDemand, because it's faster at scaling to maximum frequency.
------------------------
8: InteractiveX Governor:

InteractiveX governor is based heavily on the Interactive governor, enhanced with tuned timer parameters to better balance battery vs. performance. The InteractiveX governor's defining feature, however, is that it locks the CPU frequency to the user's lowest defined speed when the screen is off.
------------------------
9: Lagfree:

Lagfree is similar to ondemand. Main difference is it's optimization to become more battery friendly. Frequency is gracefully decreased and increased, unlike ondemand which jumps to 100% too often. Lagfree does not skip any frequency step while scaling up or down. Remember that if there's a requirement for sudden burst of power, lagfree can not satisfy that since it has to raise cpu through each higher frequency step from current. Some users report that video playback using lagfree stutters a little.
--------------------------
10: SmartassV2:

Version 2 of the original smartass governor from Erasmux. Another favorite for many a people. The governor aim for an "ideal frequency", and ramp up more aggressively towards this freq and less aggressive after. It uses different ideal frequencies for screen on and screen off, namely awake_ideal_freq and sleep_ideal_freq.
---------------------------
11: Smartass

Is based on the concept of the interactive governor.
I have always agreed that in theory the way interactive works – by taking over the idle loop – is very attractive. I have never managed to tweak it so it would behave decently in real life. Smartass is a complete rewrite of the code plus more. I think its a success. Performance is on par with the “old” minmax and I think smartass is a bit more responsive. Battery life is hard to quantify precisely but it does spend much more time at the lower frequencies
----------------------------
12: Scary

A new governor wrote based on conservative with some smartass features, it scales accordingly to conservatives laws. So it will start from the bottom, take a load sample, if it's above the upthreshold, ramp up only one speed at a time, and ramp down one at a time. It will automatically cap the off screen speeds to 245Mhz, and if your min freq is higher than 245mhz, it will reset the min to 120mhz while screen is off and restore it upon screen awakening, and still scale accordingly to conservatives laws. So it spends most of its time at lower frequencies. The goal of this is to get the best battery life with decent performance.
----------------------------
13: Brazilianwax:

Similar to smartassV2. More aggressive ramping, so more performance, less battery
-----------------------------
14: SavagedZen:

Another smartassV2 based governor. Achieves good balance between performance & battery as compared to brazilianwax.
--------------------------------
15: Lazy:

This governor from Ezekeel is basically an ondemand with an additional parameter min_time_state to specify the minimum time CPU stays on a frequency before scaling up/down. The Idea here is to eliminate any instabilities caused by fast frequency switching by ondemand. Lazy governor polls more often than ondemand, but changes frequency only after completing min_time_state on a step overriding sampling interval. Lazy also has a screenoff_maxfreq parameter which when enabled will cause the governor to always select the maximum frequency while the screen is off.
--------------------------------
18: Lionheart:

Lionheart is a conservative-based governor which is based on samsung's update3 source.
The tunables (such as the thresholds and sampling rate) were changed so the governor behaves more like the performance one, at the cost of battery as the scaling is very aggressive.
------------------------------------------------------------------------------------------------------------
--------------------------------------------I/O Schedulers:-------------------------------------------------
                                                                  ----------------
1) Noop
---------
Inserts all the incoming I/O requests to a First In First Out queue and implements request merging. Best used with storage devices that does not depend on mechanical movement to access data (yes, like our flash drives). Advantage here is that flash drives does not require reordering of multiple I/O requests unlike in normal hard drives.

Advantages:
Serves I/O requests with least number of cpu cycles. (Battery friendly?)
Best for flash drives since there is no seeking penalty.
Good throughput on db systems.

Disadvantages:
Reduction in number of cpu cycles used is proportional to drop in performance.
------------------------------
2) Deadline
------------
Goal is to minimize I/O latency or starvation of a request. The same is achieved by round robin policy to be fair among multiple I/O requests. Five queues are aggressively used to reorder incoming requests.

Advantages:
Nearly a real time scheduler.
Excels in reducing latency of any given single I/O.
Best scheduler for database access and queries.
Bandwidth requirement of a process - what percentage of CPU it needs, is easily calculated.
Like noop, a good scheduler for solid state/flash drives.

Disadvantages:
When system is overloaded, set of processes that may miss deadline is largely unpredictable.
------------------------------
3) CFQ
--------
Completely Fair Queuing scheduler maintains a scalable per-process I/O queue and attempts to distribute the available I/O bandwidth equally among all I/O requests. Each per-process queue contains synchronous requests from processes. Time slice allocated for each queue depends on the priority of the 'parent' process. V2 of CFQ has some fixes which solves process' i/o starvation and some small backward seeks in the hope of improving responsiveness.

Advantages:
Considered to deliver a balanced i/o performance.
Easiest to tune.
Excels on multiprocessor systems.
Best database system performance after deadline.

Disadvantages:
Some users report media scanning takes longest to complete using CFQ. This could be because of the property that since the bandwidth is equally distributed to all i/o operations during boot-up, media scanning is not given any special priority.
Jitter (worst-case-delay) exhibited can sometimes be high, because of the number of tasks competing for the disk.
---------------------------------
5) SIO
--------
Simple I/O scheduler aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority quesues concepts, but only basic merging. Sio is a mix between noop & deadline. No reordering or sorting of requests.

Advantages:
Simple, so reliable.
Minimized starvation of requests.

Disadvantages:
Slow random-read speeds on flash drives, compared to other schedulers.
Sequential-read speeds on flash drives also not so good.
---------------------------
6) V(R)
---------
Unlike other schedulers, synchronous and asynchronous requests are not treated separately, instead a deadline is imposed for fairness. The next request to be served is based on it's distance from last request.

Advantages:
May be best for benchmarking because at the peak of it's 'form' VR performs best.

Disadvantages:
Performance fluctuation results in below-average performance at times.
Least reliable/most unstable.
------------------------------------------------------------------------------------------------------------
                                                      more to come
                                                      --------------














Montag, 8. Juli 2013

A GUIDE ABOUT BUILDPROP+INIT.D(KERNEL)TWEAKS!!!!

Build.prop
(edit your /system/build.prop with a file manager with root access)

Careful for already existing settings. In this case, just change the values.

1. Force launcher into memory
Code:
ro.HOME_APP_ADJ=1
2. Raise JPG quality to 100%
Code:
ro.media.enc.jpeg.quality=100
3. VM Heapsize; higher the RAM, higher the hp can be
Code:
dalvik.vm.heapsize=48m
4. Render UI with GPU
Code:
debug.sf.hw=1
5. Decrease dialing out delay
Code:
ro.telephony.call_ring.delay=0
6. Helps scrolling responsiveness
Code:
windowsmgr.max_events_per_sec=150
7. Save battery
Code:
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
8. Disable debugging notify icon on statusbar
Code:
persist.adb.notify=0
9. Increase overall touch responsiveness
Code:
debug.performance.tuning=1
video.accelerate.hw=1
10. Raise photo and video recording quality
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
11. Signal (3G) tweaks
Code:
ro.ril.hsxpa=2
ro.ril.gprsclass=10
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=5
12. Net speed tweaks
Code:
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
13. Disable blackscreen issue after a call
Code:
ro.lge.proximity.delay=25
mot.proximity.delay=25
14. Fix some application issues
Code:
ro.kernel.android.checkjni=0
15. Phone will not wake up from hitting the volume rocker
Code:
ro.config.hwfeature_wakeupkey=0
16. Force button lights on when screen is on
Code:
ro.mot.buttonlight.timeout=0
17. Disable boot animation for faster boot
Code:
debug.sf.nobootanimation=1
18. Miscellaneous flags
Code:
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
19. Specifics to some LG devices
Code:
persist.service.pcsync.enable=0
persist.service.lgospd.enable=0
user.feature.flex=true
user.feature.lgdrm=false
user.feature.lgresource=false
user.feature.lgpoweroff=false
user.feature.ls_event=false
user.feature.ls_normal=false
user.feature.sui=false

Init.d
(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)

1. strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
2. internet speed tweaks
Code:
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;
3. vm management tweaks
Code:
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
4. misc kernel tweaks
Code:
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;
5. battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
6. EXT4 tweaks (greatly increase I/O)
(needs /system, /cache, /data partitions formatted to EXT4)

a) removes journalism
Code:
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
b) perfect mount options
Code:
busybox mount -o remount,noatime,noauto_da_alloc,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
7. Flags blocks as non-rotational and increases cache size
Code:
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
8. microSD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
9. Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
9. Remove logger
Code:
rm /dev/log/main
10. Ondemand governor tweaks
Code:
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
11. Auto change governor and I/O Scheduler

a) I/O Scheduler (Best: MTD devices - VR; EMMC devices - SIO) - needs kernel with these
Code:
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
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
12. Auto-zipalign on boot
(needs zipalign bin)
Code:
http://forum.xda-developers.com/showthread.php?t=860586
13. Loopy Smoothness tweak
Code:
http://forum.xda-developers.com/show....php?t=1137554
http://forum.xda-developers.com/show....php?t=1205744
14. Move dalvik-cache to cache partition (if it's big enough) to free up data partition space
Code:
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 80000 ]
then
echo "Large cache detected, moving dalvik-cache to /cache"
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi

busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache

# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
else
echo "Small cache detected, dalvik-cache will remain on /data"
fi
15. Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
16. OOM groupings and priorities tweaks - SuperCharger
Code:
http://forum.xda-developers.com/showthread.php?t=991276

GPS.conf
(create or edit your /system/etc/gps.conf with a file manager with root access)

For improving GPS lock time and signal.

a) European NTP server (replace for america or asia in your case)
Code:
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
b) SE supl for A-GPS (better than Nokia's or Google's)
Code:
SUPL_HOST=supl.sonyericsson.com
SUPL_PORT=7275

Other tweaks or guidelines

1. Patch your hosts file for blocking Ads
(please think before doing this; many developers are supported through this way)
Code:
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
2. Use CyanogenMOD's APN list file - it's one of the most complete.
Code:
It's located in /system/etc/apns-conf.xml
3. Use UOT kitchen for basic theming on your device.
Code:
http://uot.dakra.lt/
4. Use Google's dns servers
Code:
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/.
5. Update Superuser and su binary to latest version (3.0 beta)
Code:
http://goo-inside.me/superuser/
6. Disable sync feature in sqlite
(author: ownhere - needs a source for your device so you can compile the /system/lib/libsqlite.so)
Code:
Patch file here: http://forum.xda-developers.com/showthread.php?t=903507
7. Do not use task killers.

Freitag, 5. Juli 2013

Terminal Emulator-Commandlist for Android

Android Shell Command Reference
---------------------------------
The Android Shell
A "shell" is a program that listens to keyboard input from a user and performs actions as directed by the user. Android devices come with a simple shell program. This shell program is mostly undocumented. Since many people are curious about it I thought I'd write up some documentation for it.

Currently this documentation is incomplete, sorry!
-------------
Common problems
---------------
The built-in shell has very limited error handling. When you type a command name incorrectly it will say "permission denied", even though the real problem is that it couldn't find the command:
--------------------------------------------------------
$ dir
dir: permission denied  <---- this is a misleading error message, should say 'dir: not found'
$ ls
... listing of current directory
--------------------------------------------------------
The PATH variable
-----------------
The Android shell will run any program it finds in its PATH. The PATH is a colon (':') seperated list of directories. You can find out what your shell's PATH is set to by using the built-in echo command:
--------------------------------------------------------
$ echo $PATH
/data/local/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
Depending upon your shell, you may see a different result.
--------------------------------------------------------
Built in Commands
-----------------
Every shell has a few built-in commands. Some common built-in commands are:
---------------------------------------------------------
echo -- prints text to stdout.
set -- sets shell variables
export -- makes shell variables available to command-line programs
cd -- change the current directory.
pwd -- print name of the current directory.
---------------------------------------------------------
Commands
--------
To find out what commands you have available to you, use the "ls" command on each of the directories in the PATH variable.
---------
Finding documentation for the Android commands.
-----------------------------------------------
Many of the Android commands are based on standard Linux (or bsd) commands. If you're curious about a command, you can sometimes learn how it works by using the "man" command on a desktop Linux or OSX (Apple Macintosh) computer. The Linux or OSX version of the command may be different in details, but much of the documentation will still apply to the Android version of the command.
---------------------------------------------------------
Another source of documentation for people without a Linux or OSX machine handy is to use a web browser and use a web search engine to search for the text: "man Linux command-name".
---------------------------------------------------------
List of commands
----------------
The following is a list of the commands that are present on a Nexus S phone running an Android 2.3.3 "user-debug" build. Many of these commands are not present on a "user" phone. (They are missing from a "user" phone because they are specific to developing or debugging the Android operating system.)
--------------------------------------------------------
$ ls /data/local/bin
/data/local/bin: No such file or directory
Notice that by default there is no /data/local/bin directory. You can create this directory using the "mkdir" command if you like.
--------------------------------------------------------
$ ls /sbin
opendir failed, Permission denied
The /sbin directory exists, but you don't have permission to access it. You need root access. If you have a developer phone, or otherwise have root access to your phone you can see what's in this directory.
--------------------------------------------------------
$ su
# ls /sbin
ueventd
adbd
# exit
$
--------------------------------------------------------
Notice that the shell prompt changes from a '$' to a '#' to indicate that you have root access.
--------------------------------------------------------
Notice also that neither of the /sbin commands are useful to the shell -- the adb and ueventd files are 'daemon' programs used to implement the Android Debugger "adb" program that is used by developers.
--------------------------------------------------------
$ ls /vendor/bin
gpsd
pvrsrvinit
---------------------------------------------------------
Vendor/bin is where device vendors can put device-specific executables. These files are from a Nexus S.
------------------------------------------------------
$ ls /system/sbin
/system/sbin: No such file or directory
------------------------------------------------------
This directory does not exist on a Nexus S.
-------------------------------------------
$ ls /system/bin
am
----------------------------------------------------------
am is the Android Activity Manager. It's used to start and stop Android activities (e.g. applications) from the command line. Type am by itself to get a list of options.
-------------------------------------------------------
amix
aplay
-----------------------------------------------
Command line audio file player.
------------------------------
app_process
applypatch
----------------------------------------------------
Used to apply patches to android files.
----------------------------------------
arec
-----------------------------------------------------
Command line audio recorder.
------------------------------------------------------
audioloop
bluetoothd
--------------------
BlueTooth daemon
---------------------------
bmgr
Backup manager - type command by itself to get documentation.
--------------------------------------
bootanimation
----------------------
Draws the boot animation. You may have to reset your phone to get out of this.
----------------------------------
brcm_patchram_plus
bugreport
cat
----------------------------
Copy the contents of a file to standard output.
------------------------------------------
chmod
---------------------------------
Change the mode of a file (e.g. whether it can be read or written.)
----------------------------------
chown
--------------
Change the owner of a file.
---------------------------
cmp
---------------
Compare two files byte-by-byte
--------------------------
dalvikvm
-------------------
The dalvik virtual machine. (Used to run Android applications.)
-------------------------
date
Prints the current date and time
----------------------------
dbus-daemon
dd
-------------------------
Convert and copy a file. By default copies standard in to standard out.
----------------------
debuggerd
dexopt
df
----------------------------------
Shows how much space is free on different file systems on your device.
---------------------------------
dhcpcd
dmesg
dnsmasq
dumpstate
dumpsys
dvz
fsck_msdos
gdbserver
getevent
getprop
gzip
hciattach
hd
id
ifconfig
Shows the current configuration of network interfaces (IP, MAC address etc)
---------------------------------------
iftop
Shows the current processes using the network interfaces (top, but for networks)
------------------------------------
ime
input
insmod
installd
ioctl
ionice
iptables
Manage the firewall
---------------------------------
keystore
keystore_cli
kill
Send signals to processes.
-----------------------------------
linker
ln
Used to set up a file system link.
----------------------------------
log
logcat
Prints the Android runtime log.
------------------------------------
logwrapper
ls
Lists files.
-------------------------------------
lsmod
lsof
make_ext4fs
mediaserver
mkdir
Make a directory.
-----------------------------------------
monkey
A program that sends random events, used to test applications. (Like having a monkey playing with the device.)
-------------------------------------------
mount
mtpd
mv
Move a file from one directory to another. (Only on the same file system. Use "cat a > b" to copy a file between file systems.
--------------------------------------------
nandread
ndc
netcfg
netd
netstat
newfs_msdos
notify
omx_tests
pand
ping
pm
pppd
printenv
ps
List active processes.
-----------------------------------
qemu-props
qemud
racoon
radiooptions
reboot
Reboot the device.
----------------------------------------------
record
renice
rild
rm
Remove a file.
-----------------------------------------
rmdir
Remove a directory.
----------------------------------------------
rmmod
route
rtp_test
run-as
schedtest
schedtop
sdcard
sdptool
sendevent
service
servicemanager
setconsole
setprop
setup_fs
sh
showlease
sleep
smd
stagefright
start
Starts the Android runtime.
-------------------------------------
stop
Stops the Android runtime.
------------------------------------------
surfaceflinger
svc
sync
system_server
tc
testid3
toolbox
top
Shows which processes are currently using the most CPU time.
------------------------------------------
umount
uptime
Prints how long your device has been running since it was last booted.
----------------------------------------
vdc
vmstat
vold
watchprops
wipe
wpa_cli
wpa_supplicant
-------------------------------------------------
$ ls /system/xbin
add-property-tag
btool
check-lost+found
dexdump
dhdutil
hcidump
latencytop
librank
opcontrol
oprofiled
procmem
procrank
rawbu
scp
Secure copy program. (Used to copy files over the network.)
----------------------------------------------
showmap
showslab
sqlite3
Used to administer SQLite databases.
------------------------------------------
strace
System trace command - use to see what system calls a program makes.
-----------------------------------------
su
Start a shell with root privileges.

thats all for now,lol!!!!!!