Showing posts with label Superuser. Show all posts
Showing posts with label Superuser. Show all posts

02 May, 2014

And to indicate in terminal prompt if I am a root user

Sample of BASH through a shell in GNOME. Scree...
Sample of BASH through a shell in GNOME. Screenshot taken in Arch Linux (Photo credit: Wikipedia)
02-May-2014


I would have to say that knowing that I am a root user, or that I activated my being a root user, at least in the prompt, to be a big help. Fortunately, somebody has already thought of this, and has also done it, and has shared it.

So either you are the root user, or you can switch between a normal user and a root user, it would be very beneficial to know when a user mode or privelege is active and available.

That being said, I searched the web, and I found one that worked.

It is editing .bashrc and appending these:

# Turn the prompt symbol red if the user is root
if [ $(id -u) -eq 0 ];
then # you are root, make the prompt red
    PS1="[\e[01;34m\u @ \h\e[00m]----[\e[01;34m$(pwd)\e[00m]\n\e[01;31m#\e[00m "
else
    PS1="[\e[01;34m\u @ \h\e[00m]----[\e[01;34m$(pwd)\e[00m]\n$ "
fi

So the .bashrc could be in your /home/username directory.

Or when you invoke superuser by sudo -i (or sudo su), it would be in /root directory.

By employing this, I am able to know when I am a normal user, and when I am a super user. It may be what you need, for all I know. Try it!

Here's the reference: Changing behavior of bash prompt when functioning as root

Till then!


Enhanced by Zemanta

28 March, 2013

GT-9103: SD Card Is Damaged!

Image representing Android as depicted in Crun...
Image via CrunchBase
28-Mar-13


I have a few items to write on, but I believe this one is quite urgent.

Two weeks ago, I sort of “tampered” once again my already-quiet Samsung Galaxy R. I searched for the latest Android custom ROM, which is 4.2.2. I found the one that is offered by Paranoid Android. I actually managed to flash that one properly, both the kernel and the Google Apps. These are the files: i9103-3.00-16FEB2013-192725.zip and gapps-full-4.2-20130308.zip. These are coming from Paranoid Android.

Of course, things don’t end there.

When I was installing those root apps, I came to the SuperUser app, and to my mistake, I selected the wrong option, when I was offered something like “usually for HTC phone”, and that broke my phone’s SD card.

A lot of apps don’t work after that: Camera, Wallpaper Changer, etc. I found that many things are so much dependent on the internal SD card. Anyway, I already have the other phone, my GT-I3100, so the impact isn’t that much.

Still, I can’t rest assured. I’m not convinced that nothing can be done with the “broken” SD card. Nonetheless, I am one step short of bringing that old phone, although unused, to Samsung Service Center.

I did try and try and try to re-flash the ROM, so that by any chance, re-installing SuperUser app, if I tap the ‘correct’ button, the SD card may get fixed all by itself.

Furthermore, within the last week, I noticed that my phone is showing some “inversion” in the display, like the upper diagonal half (top left to bottom right) getting inverted. The time showing 10:50 is upside down. Imagine that!

Bad becoming worse. Really no fix, I thought. I searched the web for help on the ‘Damaged SD Card’, and although it was consistently mentioned in the articles that I found not to do format, I still tapped on the ‘Format’ button in the suggested fix by the apps that identified the SD card as damaged. I was wondering, the one who developed the App isn’t the one who wrote the articles…?

Then my insatiable curiosity got me.

I said, there could be something offered by CM, the same 4.2.2 kernel, for my GT-i9103. So yesterday, I searched the web. Something came up. There were 2, actually. There was the kernel alone, cm-10-20121223-UNOFFICIAL-i9103.zip, and the pair: I9103DXLP6_I9103OLBLP6_XSP.zip and gapps-jb-20121011-signed.zip. Looking at the dates, I said, these are earlier released than the one from Paranoid Android. So I was asking myself, “Why didn’t I see these first?”

Anyway, I went to download the files, not knowing whether I should do flash using the standalone kernel, or the pair.

I decided to use the pair, but to be sure, in case something doesn’t work, I also copied the standalone zip file. True enough, there was an error thrown out with the pair, the main zip file. I proceeded to install the Google Apps from the zip file despite the fact that the main file didn’t install properly, and then after reboot, the phone was in a boot loop.

I now tried to install the standalone file, and it worked! Still, first reboot resulted to a boot loop.

I did another flash, and this time, using the standalone kernel file, and this went through without a problem, and the reboot also went through nicely, and when the phone came up, I entered all the necessary credentials, and the apps were installed back automatically.

But Play Store app was missing, and though I can search and “install” it using the browser, the app doesn’t show in the Apps list. It is nowhere to be found. So I thought, can I bring it up using the other half of the pair, just the Google Apps file?

And that I did. I flashed the GApps file, and after reboot, the Google Apps were in.

And guess what? The main reason for my posting this article is to say that after flashing the CM 4.2.2 kernel for my GT-i9103, the SD Card came back to life!

Also, the other reason why I would be more comfortable running CM codes is that there is a regular update, which I download and install now and then, sometimes every night (NIGHTLY builds). That is what I do with the GT-P3100 phone.

So now I have a CM custom Android 4.2.2 ROM running, with the Google Apps in, and the SD Card fully functional once again!

Hope this short post will be of help to somebody as well.

Till then!
Enhanced by Zemanta

04 February, 2013

Rooting GT-I9103 on ICS Android 4.0.4

English: Android Market on Samsung Galaxy S.
English: Android Market on Samsung Galaxy S. (Photo credit: Wikipedia)
04-Feb-2013

Sometime back in December 2012, after my Samsung Galaxy R phone lapsed on its 1-year warranty, my phone just hanged. If I recall correctly, my 3-year old girl was playing with it, and when I found it, it was already off – kids usually drain out the battery – so I didn’t think that there was a problem at all.

When I tried to turn it on, to check if the battery is dead, it turned on, but it stayed at the Samsung logo – it was stuck there, even after waiting for a considerable amount of time (5 minutes, I would say, is already a long time if we are talking of a normal phone, whatever brand that may be). I did what would be normally done: took out the battery, waited a couple of seconds (although recommended is 15 seconds), then put it back in and pressed the power button on, and voila! Still the same: stuck at the logo.

By then I knew that something else happened. Something has gone wrong.

“That was a rooted phone,” I thought to myself... now what?

I tried to go back to rooting the phone and searching for the same kernel that I used before, which are still in my laptop, did it many times, not once, but many times, and every time, it is a failure.

I then went to search in the web for possible solutions, or at the least, a newer version of the kernel, each time typing the phone model GT-I9103 as the selective search string.

I found several, tried again, failed, tried again, failed... many times... until one came out nice and completed the whole process of installing a kernel.

When the phone was finally working (again), I checked everything, still intact, but I noticed that something else is different – and that was when I found out that the kernel that revived my phone was ICS, Android 4.0. The original OS was Gingerbread, Android 2.3. I said, “What a jump!”

I was almost very happy, except that when I checked through my phone, I found that the root privilege was gone! “Should be easy,” I said, so I went right away to rooting my “upgraded” device. Easier said than done, and no matter what I did, I can’t root my upgraded phone. And after trying out so many times, I gave up. I settled with having just “an upgraded, albeit un-rooted,” phone.

Of course, a lot of those apps that I installed before which required root access don’t work anymore, so while the phone was working, it was not as before, it was not as when I had it rooted, and I have the complete control over it. Blast it!

With unsettled mind over my un-rooted phone, I have inside of me a resolve to look out for other means, other ways, other newer releases, someday, somehow, something that will give me back root access to my phone.

Yesterday, that day came!

In my random search, I chanced upon a page that tells about installing CWMR version xxx.xxx, followed by many other articles. I checked on that one, looked through the procedure, and I found that it is very identical to what I have been referencing before, but just that the version of code it is using is newer (supposedly newer). Basically, I found page for the exact search string I used: “root GT-I9103 ICS”.

Having found that, there is also the article on installing CWMR on GT-I9103.

These 2 I tried, and at first shot, I hit the mark. I rooted the phone running on Ice Cream Sandwich OS. But wait, there is more.

My initial version of ICS is 4.0.2. When I was done with the rooting, and also installing the new version of CMWR, I found that the ICS version is 4.0.4. Wow!

What more could I ask for? After rooting my Galaxy R phone, I also got an upgraded version of ICS.

I’m back!

And here are the pages that I referenced in my latest rooting adventure:
How To Root Galaxy R I9103 on Android 4.0.4 ICS
How To Install CWM Recovery v6.0.1.5 Touch on I9103 Galaxy R

As for this page, beware, not that it doesn’t work, but it is not in English! Bummer! Good thing I backed up my phone and it was a very simple recovery method of restoring the phone.
How To Install Android 4.1.2 Jelly Bean on I9103 Galaxy R

Till then!
Enhanced by Zemanta

16 January, 2012

Root-ing my Samsung Galary R

Español: Samsung Galaxy R (i9103)Image via WikipediaiPhone 4's Retina Display v.s. iPhone 3GImage by Yutaka Tsutano via FlickrEnglish: Android smartphone Samsung GT-i9000 G...Image via WikipediaAndroid_marketImage by benmarvin via FlickrEnglish: Android Market on Samsung Galaxy S.Image via WikipediaImage representing iPhone as depicted in Crunc...Image via CrunchBase16-Jan-2012

I did it last week.

I mean, I've not been doing anything with the iPhone 4 when my wife got hers, since I'm not really enamored with the iPhone, even when it was only 3, then 3S. And when my wife got hers, it was already 4, and I was simply ignoring that small device which has captivated millions (is my estimate correct?) all over the world. And it still does, but I will never be in the statistics.

You see, when I got my Samsung Galary R over a month ago, I felt it was a very good deal, unit price promo-ed at only $11 at the least plan that will have data access, not to mention that the SGR was already a dual-core device, albeit a toned-down version of the Samsung Galaxy S II.

Anyway, I was immediately introduced to the already huge world of android freebies, primarily through the Android Market, and then to the all-free spree being done in all of the major android sites - always. And this is something that I enjoyed on what the web has to offer - freebies!

Anyway, I also immediately found that many of the stronger apps out there (and yet still  free) are requiring the device to be 'rooted' - a limitless, all-access, superuser account category - that would be able to control the device from the very core.

Then I found that to root a device, it will void the warranty, and that the process of rooting, if done wrongly, may render the device unusable, 'bricked' so they say, ending up simply as a beautifully-formed glass and metal (and plastic) artwork.

Furthermore, it is a cat-and-mouse chase: while you may succeed rooting your device, phone manufacturers will eventually release a firmware update, which will unroot your device and clear any superuser accounts, and reinstate the device to its unrooted state. So hackers (developers to be precise) who are not content with that will again try to develop rooting methods and programs that will again be able to 'root' the device even with the latest firmware. Then manufacturers will release a firware update... it just never ends!

So I had my hesitation... take note, I had...

But the best of me yielded to the 'risk-taking', and on the 12th of January, I did my first rooting business - and I succeeded.

What made it all too easy is that I found several articles that offered help by laying down the process step-by-step, so I was fully familiar with that I should be doing, but finally, I found that I only have to click a button, and wait, and watch, and it's done. Is it too good to be true?

Well, it was. I used SuperOneClick. With all the hesitation in my mind, my finger steely clicked the mouse button, and I waited, and I watched, and it was a success! SU was created, and I had superuser access to the rooted device! That finally gave me the privilege to install those free apps that will help me take control of my small device from the very core.

So that's it. My small, yet very fruitful, new adventure: rooting my android device. And I showed my phone to my wife, and she wanted an exchange...

See, not everyone who gets the iPhone are really iPhone fanatics. My wife is one who would prefer the 'better' deal. She thinks the iPhone is outdated. I think all the more that it is outdated. It is like the IBM story, closed, proprietary, unaccommodating. Then PC came. Android has come, but devices will still be rooted. The limits and boundaries may be set and defined, but there are many who just can't be boxed and enclosed.

Android is freedom, and the exercise of freedom makes android users freer.

Till then!


Enhanced by Zemanta