Monday, June 4, 2012

What is root or being rooted mean?

SkyHi @ Monday, June 04, 2012
Click the "Show" button below for a root warning / disclaimer:



Here's a few threads (and excepts from each thread) here at AF that already tackle this topic:

what is rooting?


  • Taken from the Cyanogen Wiki CyanogenMod Wiki

    Most carriers "lock" their handsets to discourage customers from taking their handset and moving to another carrier. Carriers also depend on "exclusivity" agreements to encourage users to switch to their plans so they can use a particular handset (e.g., Apple's iPhone on the AT&T network). To use the handset on another carrier's network it would be necessary to "unlock" the handset. This is done with a code based on the IMEI of the handset that can be provided by your carrier or firms on the internet that are slightly more reliable than west African ebay bidders. Unlocking is not possible with CyanogenMod or any other Android replacement. 
    Furthermore, they may impose software limitations to prevent using the handset in a manner that might undercut their voice plans (e.g., Skype, Google Voice), or putting strain on the data network (e.g., tethering, streaming video). The way to get around this is to acquire 'root' (i.e. Administrator) access on the device, so you can install/modify/fix/break anything you want.
  • Rooting directions vary from phone to phone, but a good place to start would be the Android Development forums at XDA-Developers (.com). 

    In and of itself, root only gives you access to secured parts of the phone, just like if you're using using Windows and you have to click that little Run As Administrator prompt. Basically it's a system developed a long while back that keeps the regular day to day operations from being able to have too negative an impact on the rest of the system.

    The positive thing about root is everything it then allows you to do further on down the line including custom apps, configurations and even OS'.

    Here's a nice little Wiki article that gives a little more detail: Why Root - Android Wiki
  • what is it?
    it's all kinda easy...
    imagine your fathers pc:
    you can log in as a user, your father may have allowed you to install stuff. but hey the c:/windows/ folder is locked and you can't screw up the computer.

    android works on linux.
    linux has the following system:
    user
    admin user
    super user

    as a regular android user you are an "admin user". you can install stuff, update, make the screen shiny and just work on it.

    super users can screw up the kernel, over clock the processors (and overheat them by accident), get more sound from the speakers by "over clocking" that to, replace the system with another one, etc.

    this has something to do with the security of the phone and the security of specific folders (with the most important folder called "ROOT").
    like my android milestone is protected in two ways:
    1: the phone's "bios" (protects the phone from weird changes and combines all devices in your phone to a working system)
    2: the phones ROOT (contains all info on how the phone should work)

    the bios must be cracked to make changes in the system (like ROOTing) some nerds do this and post "backups" of this system to xda-developers.
    hackers/programmers make changes to specific files to remove the lock on SU (superuser) and post these in this backups. 

    SU-acces allows you to do things that are not supposed to work like sharing your 3G-connection to wifi. this is blocked till 2.1 because phone carriers din't like that. now with the 2.2 update it becomes legal). or change the folder where your apps are installed from phone memory to the SD card(once again in the 2.2 update they fixed this).

    But, as you can think with your brains. Rooted systems can be broken by the most stupidest terminal commands (since you can just command the phone to blow itself lituraly), or even when you delete a file from the ROOT folder by accident. bricking the phone becomes very easy. that's why phone sellers won't help you as soon as they notice you were using a ROOTED phone.

    you can test if your phone is rooted by downloading a small app called "terminal emulator" and filling in the code:
    SU
    this (SuperUser) command, means that you tell the terminal that you want to start changing important stuff and you need all acces possible.

    If the system is rooted you are presented by a # after you click the Enter(return) button on your keyboard.
    if the system isn't rooted you are presented by the text "No acces" or something like it.

    Rooting is only cool for people who: build their own systems, want to be their 1G phone (very old phone) a bit faster, or just want to prank to their friends on how they ruined their phones (and how much money they have to buy a new one).

    Rooting is not cool for people who: know nothing of terminals and linux systems, are no developers for google, have brains, want to keep their phone carriers friendly,experience that in a pocket they can accidently push buttons and people who want to use their phone the best way possible (it costed manufacturers loads of time to adjust the system in such a way that the phone works the best, why would you screw that up?).

    hope this solves the big question about Rooting.

    but for those people that only read the last line:
    rooting is giving yourself acces to the folder called ROOT, where the system get's it's knowledge on how many volts it should send to the different parts of your phone, and how everything in your phone should work. a good thinking (wo)man wouln't concider rooting for even a second!
  • to get a good understanding of root, read this: What is root? -- definition by The Linux Information Project (LINFO)
  • Here's the Evo info on what root is - Quick INTRO TO ROOTING for those new to rooting
  • Generically speaking, rooting often is nothing more than hitting a known exploit where for a very brief instant, root access becomes available. These injection points are given names, like RageAgainstTheCage. During that time of root vulnerability, a system injection is made to hold the root door open until you're established as root.

    Because they're timing dependent, doing it by hand may or may not require multiple, boring iterations - hence, the methods get scripted (sometime with the necessary iterative loops) and the result are the one-click methods.

What is root?


  • Root - Wikipedia, the free encyclopedia
  • to "root" your phone essentially means to give yourself superuser access on it. This is like being the highest level of administrator for the device. This allows you to change the interface of your phone. Once your phone is "rooted" you can install custom ROMs (they look alot like themes, just google the name and you'll see plenty of examples). You can also download "rooted only" applications for use on the device.

    A "Root" in general is the most basic directory in a system. For instance the Root of your computer most likely is the "C:" drive. Their also happens to be a "Root" of your smartphone, which is what is manipulated in order to achieve a "rooted" phone and its benefits.

what is rooting


  • Android is built upon the Linux operating system, where there is a concept of an administrator user aka "root" that has full permissions to the system. When you "root" a phone, you are enabling access to the root user so you can call on that user to access protected functionality.

    As a regular user, you can request "superuser" access, which is another way of saying that you want root privileges. In a traditional Linux OS, if you log in as root, you can actually create multiple superusers, like a team of administrators, with either complete power, or some subset of power. But for the purpose of Android phones, the only superuser is root, and root always has full access to the system.

    To request superuser access, you would use a shell command called "su." In Android, the su command works in conjunction with an app called Superuser to grant the Android application(s) root access. The Superuser app is included in the rooted ROM; it's something you automatically get when you root your phone.

    Android applications with root access can do a lot more. If you ever see an app on the market that says "for rooted devices only," it means that its functionality requires root access. A normal unrooted phone would not be able to perform that functionality.
  • Quick INTRO TO ROOTING for those new to rooting

What does root or rooted mean?


  • Gaining root access is the equivalent of having admin rights on Windows. 
    If you didn't root it or purchase it from someone who stated it was rooted, then it isn't.
  • With root you are able to access and change all files on your device where as when you arent you can only access the ones the manufacturer want.
    Root is the Unix/Linux term for administrator. It gives you permissions you do not have normally with the regular user permissions
  • To answer the question is in linux you have the opportunity to gain super user access through terminal this is exactly what root does gives you permanent access to root directory of your phone meaning you can mod the phone all you want including erase the operating system and brick the phone on the bad side.
  • To clarify from above: A phone that is NOT rooted can still be modified (you can still make it LOOK different) by using applications like Launcher Pro, for example, and installing Themes. You don't need to root to do this. If your phone is NOT rooted, you can also still access files that are on the SD card and/or on the internal memory, you just can't access _all_ the files on the internal memory. This is an important distinction imho because a complete newb might misunderstand and think he/she needs to root to access any of his/her files.

    1. If you Root your phone, you will be able to access files that you are not allowed to access without root. These are usually important system files, which you don't want to touch unless you know what you are doing because you could screw up your phone.

    2. If you root your phone you can use certain apps that need to access parts of the Android system that can't be accessed without root, but these are mostly obscure (in the past you had to root to tether your phone to your computer to share your data for internet access, for example, but that is no longer necessary).

    3. Rooting lets you delete the bloatware/crapware that often now comes pre-installed by the manufacturers and carriers, and which usually can't be deleted/uninstalled without root.

    4. Rooting lets you install custom ROMs. A ROM is like installing a different version of the Android OS with some changes/tweeks to it, like changing the layout and design of the user interface (UI), or so that you can get a newer version of Android on your phone before the manufacturer releases an update (if they ever even do!).

    These are the main things accomplished by rooting, and it is important to note that if you attempt to root your phone and don't do it properly, you could "Brick" your phone, which means it becomes inoperable.
  • the others have given you good info...
    but to put it more simple...

    rooting is getting access to the ROOT directory of your internal storage. This is how you can get control of all your phone functions that the service carrier has denied you from.

To me, rooting is gaining special access to things on your phone that the carriers and manufacturers didn't intend for you to have (and they often have very good reasons for this, by the way).

To actually gain root access usually (but not always) requires uncovering some exploit that allows you to insert the su program in the /system/bin or /system/xbin directory. Additionally, you also need theSuperuser.apk (whitelist app) to be installed in the /system/app directory. The Superuser app helps you manage which apps are allowed to have root access (i.e., so that not just any app can gain special control of your device).

Additionally, rooting sometimes leads to the ability to overwrite or replace the special partitions (filesystems) on your phone such as the recovery partition so you can install a new, custom recovery that will allow you to install (flash) custom ROMs (i.e., new versions of Android).

Finally, if you do root, take a peek at this thread to help you avoid some pitfalls later on:

Rooting Best Practices

Rooting Best Practices

If you are new to rooting, you might want to be aware of some general guidelines for various root-related activities that might help you avoid some trouble along the way.

Have a fall-back / recovery plan before taking any "scary" (risky) action. In other words, know what steps you'll need to follow if you encounter a problem.

Make a backup before you alter or remove any system-related apps or settings. If you can't make a full, restorable (i.e., a Nandroid) backup, then don't make any changes--doing so without a backup is asking for bootloops or soft-brickings. 

- If your Android device does not support a custom recovery or the ability to make a full device backup (i.e., a Nandroid backup), then you should avoid making any system-related changes that could affect the ability of your device to boot (i.e., modifying or removing system apps, etc.).

Verify the integrity of any files you might flash. This means checking the file size and (MD5) checksum on the platform from which the file is being flashed. If you are flashing from your device, you should check its integrity there there's no guarantee that it matches it original source unless you verify that. If you are are flashing from a PC, you should also check the file's integrity from there, too.

- Be sure to carefully follow the ROM (or theme) dev's installation instructions. If wipes are required, be sure to not miss those steps. The sequences of steps is often very precise and following them correctly will help ensure a successful installation.

- When/if you overclock, be sure to not enable the "set on boot" option until you are sure your device is stable at the selected speed. Also, don't forget to to set a failsafe temperature profile/setting to keep your device from over-heating.

- Also, take care when first using a tool like ROM Manager. It makes doing some root operations very simple, but you might want to become with conversant with how to operate and navigate directly in ClockworkMod custom recovery. This way, you will be prepared for the possible eventuality when you really need to manually operate in ClockworkMod custom recovery. So, your first forays with flashing ROMs might be best done manually.

Let me know if you have any other things to add or expand on in the above. 

REFERENCES
http://androidforums.com/faqs/443432-what-root-being-rooted-mean.html
http://androidforums.com/faqs/450904-rooting-best-practices.html


Friday, June 1, 2012

Random Reboots. Error Codes: 1000008e, 1000000a, 0000004e

SkyHi @ Friday, June 01, 2012
To stop it rebooting, go to Control Panel>System, then click "Advanced System settings" in the left-hand pane. In the System Properties dialog, click Settings under "Startup and Recovery", and then uncheck "Automatically restart". After that it will give a Blue Screen error which is easier to troubleshoot.

Then download UBCD and burn it to CD, it has all the memory testing and disk diagnostic utilities on it plus many more besides. Run MemTest and Windows Memory Diagnostic, as well as the disk utility for your brand of hard drive (or Seatools if you aren't sure). All you have to do is to boot up with the disc in the drive, select the utility that you want to use, and it will run.

Ultimate Boot CD

Increased Transmit Power Does More Harm Than Good?

SkyHi @ Friday, June 01, 2012

Currently, I run four routers, all part of the WRT54G/GL/GS series, that allow a house to receive wireless internet.  These routers provide sufficient, although not yet ideal, coverage for the house.   Since the WRT54G/GL/GS routers are built on a Linux framework, they are easily upgraded to more powerful firmware, such as the Tomato Firmware available fromhttp://www.polarcloud.com/tomato.  Third-party firmware such as Tomato adds increased functionality to what would otherwise be considered a standard router.  One of the more interesting features that Tomato provides is the ability to increase the transmission power of the wireless signal.  The picture below shows this setting.
Tomato Transmit Power Setting
Tomato Transmit Power Setting
Recently, users had been mentioning that the Internet was unstable, with frequent reconnecting and low signal strength.  These specific users’ rooms are at the extreme ends of the house, which means that their Internet signal is the weakest.  I increased the Transmit Power of all the routers thinking this would be solution to the problem.  It was not.  As the users kept saying the Internet was unstable, I would increase the transmission power of the router.  I found that the recommended maximum transmission power level is 82 mW.
From Tomato Wikibooks : Transmit Power: Sets the transmit power in milliwatts. High settings may cause nonlinearity in the transmitter causing loss of data, interference to other users and channels, and a high “noise floor”. It may also overheat and shorten the life of the transmitter. Tomato default is 42mW, using 84mW is usually safe.
I had turned the routers up to 80 mW and the problem was still occurring.  Upon some research I found that as the Transmit power levels of the routers increased, so did the radio noise produced by the routers. I decided to turn the routers back down, to a level lower than when I first began to administer the network.  After this change, users noticed an immediate improvement in the quality of their wireless connections.  Everything was (and still is) running stable.  The users are no longer losing Internet connection and are maintaining proper network speeds.
In my personal experience, although the Transmit Power feature of the Tomato firmware may seem to be the answer to wireless coverage or wireless signal strength problems, it is not.  Not only does increasing the wireless transmission power of these routers cause more radio noise, it also reduces the life of the router.  On these routers, the settings were only at 80 mW and I was having problems.  The Tomato firmware allows a maximum setting of 250 mW.  Users with this setting will experience an unstable wireless signal, and will shorten the life of their routers.
Have you experienced any similar problems with your router?  What transmit power level are you using for your router?  What other steps have you taken to increase the signal strength of your router?  Let us know by commenting below.

REFERENCE

HTC Desire: Set static IP

SkyHi @ Friday, June 01, 2012

HTC Desire: Set static IP


  • Hit the hard menu button on your phone and then chooseSettings
  • From there, browse to the Wireless controls section and then choose Wi-Fi Settings
  • Whilst in the Wi-Fi Settings section, push the hard menu button again and select Advanced
  • Press Use static IP to put a check in the box and then enter the network settings as per your own network

Step by step to turn off email notification sound

SkyHi @ Friday, June 01, 2012
I have the HTC G2 Andriod and this thread helped me get on the right track, but I never found a complete answer to turning off the email sound notifications. Not sure why HTC hides this so well. I finally figured it out, so here it is: 

Click on your Gmail icon. 
Press "Menu" 
Select "More"
Select "Settings"
Select the email address you'd like to change (eg yourname@gmail.com)
Select "Lables to Notify"
Hit the dropdown arrow next to "Inbox"
Select "Ringtone" and then select "Silent".





REFERENCE
http://androidforums.com/droid-support-troubleshooting/16521-how-disable-gmail-notification-sound.html

Unable to enumerate USB device

SkyHi @ Friday, June 01, 2012

Some hardware just don’t work with ehci_hcd on Karmic Koala. My memory stick from transcend refused to work no matter what I did. After plugging the device nothing happened, doing dmesg showed me the following error:
Apr 18 10:59:04 dpac-laptop kernel: [73668.388060] usb 1-2: new high speed USB device using ehci_hcd and address 5
Apr 18 10:59:04 dpac-laptop kernel: [73668.473034] hub 1-0:1.0: unable to enumerate USB device on port 2
After searching a lot, I came to a conclusion that my device doesn’t work with USB 2.0. So I disabled the ehci_hcd to make it work.
Since Karmic doesn’t use ehci_hcd as a module, modprobe -r ehci_hcd no longer works. The module is compiled into kernel. To disable it execute the following commands in terminal:
1
2
cd /sys/bus/pci/drivers/ehci_hcd
ls
You will see a file with 0000:00:xx.x format. Execute the following command:
1
sudo sh -c 'echo -n "0000:00:xx.x" > unbind'
Replace the xx.x with the numbers displayed on your file. It should disable the ehci_hcd.
I plugged in my memory stick, and it worked.
Please note that you’ll have to do all this each time you restart.
UPDATE
You can now use the following script to disable ehci_hcd. It is far more simpler since it just needs you copy pasting the commands instead of a manual action. Here it goes:
1
2
cd /sys/bus/pci/drivers/ehci_hcd/
sudo sh -c 'find ./ -name "0000:00:*" -print| sed "s/\.\///">unbind'



At some moment, my USB WLAN stick stopped working, and the log was polluted by messages like:
usb 6-1: new high speed USB device using ehci_hcd and address 62
hub 6-0:1.0: unable to enumerate USB device on port 1
hub 6-0:1.0: unable to enumerate USB device on port 1
At first, I decided that the stick had broken after years of work, but out of curiousity tried to connect it to every USB port I found. It worked. The stick worked again when plugged into the keyboard, which in term was connected to the KVM.
What is funny, I did nothing, but after a few days the stick worked again correctly in its original port. I forgot about the problem. But after yet another vacations, the problem appeared again, and again disappeared in a few days.
I have no idea why.
But I finally found a solution here: [Solved] Unable to enumerate USB device (Disabling ehci_hcd). I need to disable ehci_hcd. In my case, the commands is:
# cd /sys/bus/pci/drivers/ehci_hcd
# echo -n "0000:00:1a.7" > unbind
As a side effect, I do not have USB 2.0 on this bus anymore, but it is not a problem.

24.02.2010, update

To issue the command automatically on boot, one could edit/etc/rc.local, but in my case I need to have network loaded before. The best solution (I hope) is based on advice here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/354832
You can disable this on boot by creating a /etc/udev/rules.d/disable-ehci.rules file containing:
ACTION=="add", SUBSYSTEM=="pci", DRIVER=="ehci_hcd", \
        RUN+="/bin/sh -c 'echo -n %k > %S%p/driver/unbind'"





REFERENCES
http://www.geekdevs.com/2010/04/solved-unable-to-enumerate-usb-device-disabling-ehci_hcd/
http://uucode.com/blog/2011/01/18/solved-unable-to-enumerate-usb-device-on-port-1/

Tuesday, May 29, 2012

Device: /dev/sda, 1 Currently unreadable (pending) sectors

SkyHi @ Tuesday, May 29, 2012

I sometimes get these annoying messages from smartd. They only occur with Samsung HD103SIS SATA disks. According to my google research, these messages are not harmful and a Samsung speciality. One reason for me to avoid Samsung in future. The messages should disappear after a reboot. However, since the disks are built into a RAID1 on a 24x7 server I want to avoid rebooting the server. Instead I can get rid of these messages without a reboot when overwriting the whole disk with zeros. Please click here for details.

Inhaltsverzeichnis

 [Verbergen]

Removing the disk from the array

The first step is remove the corresponding disk from the array. This is first done by failing the disk and afterwards removing it. In my case, the disk is part of three RAID1 volumes md0, md1 and md2:
mdadm --manage /dev/md0 --fail /dev/sda1
mdadm --manage /dev/md0 --remove /dev/sda1

mdadm --manage /dev/md2 --fail /dev/sda3
mdadm --manage /dev/md2 --remove /dev/sda3

mdadm --manage /dev/md1 --fail /dev/sda4
mdadm --manage /dev/md1 --remove /dev/sda4

Zeroing the disk

Since the disk is removed from the RAID it is safe now to overwrite is with zeroes. As soon as the disk is completely zeroed out, the messages disappear. In my case, the disk is 1TB:
cat /dev/zero | pv -s 1000G | dd of=/dev/sda bs=100M

Recreate partition layout

Now you have to recreate the partition layout with fdisk or cfdisk. In my case, the two RAID1 disks are identical, so I can copy the partition layout from the other disk:
sfdisk -d /dev/sdb | sfdisk /dev/sda 
sfdisk -R /dev/sda

Adding the disk to the RAID

This is simple as before:
mdadm --manage /dev/md0 --add /dev/sda1
mdadm --manage /dev/md2 --add /dev/sda3
mdadm --manage /dev/md1 --add /dev/sda4

reinstall grub

In my case I installed grub on both disks. In case of failure of a single disk, the system is always fully bootable and running.
grub-install /dev/sda
Or if you use symbolic names (like me), just reinstall on both devices:
grub-install /dev/disk/by-id/scsi-SATA_SAMSUNG_HD103SIS1VSJ1KS300499
grub-install /dev/disk/by-id/scsi-SATA_SAMSUNG_HD103SIS1VSJ1KS300505



REFERENCES
http://niki.hammler.net/wiki/Device:_/dev/sda,_1_Currently_unreadable_(pending)_sectors