How to root manually/without Windows - Optimus V Android Development

There is already an excellent write-up on how to use SuperOneClick to root your Optimus V.
Unfortunately, you may not have a Windows machine available to run the util, or your PC hates the LG drivers, or you may wish to control how you go about rooting your device.
Hence this short write-up which, obviously, relies on pieces I got from that other write-up.
I. Rooting your device
1. You still need ADB!
2. Download the LG Optimus V Tools package from http://nexus.zteo.com/projects/tools/
3. Unzip it
4. Command-line:
Code:
adb push psneuter /data/local/tmp/
adb push su /data/local/tmp/
adb shell
cd /data/local/tmp
chmod 777 psneuter
chmod 777 su
./psneuter
5. You should be kicked out of the shell
6. Command-line:
Code:
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
cat /data/local/tmp/su > /system/bin/su
mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system
(Oh look you are root!)
That's it. You now have permanent root access.
After rebooting your phone, adb should be back to logging you in as a regular user but typing "su" will do the trick.
Note: I realize that the version of SuperUser.apk that comes with SuperOneClick might be re-usable here. I haven't had any success with it but you may.
II. Flashing a new ROM
1. After rooting your device, obviously...
2. Get an image for the ROM you wish to flash...
Currently, my favourite one is a fairly recent version of Zefie's CM7.
You can find it by googling "update-cm-7-04282011-NIGHTLY-thunderc-Xionia-signed.zip" -- I will refer to it, below, as <your_rom_zip_file>
3. Get a minimum Google Apps package for flashing as well.
Here, I would google "gapps-gb-20110325-signed.zip" -- I will refer to it, below, as <your_gapps_zip_file>
3. Command-line:
Code:
adb push flash_recovery /data/local/tmp/
adb push recovery.img /sdcard/
adb push Debug-FormatSYSTEM.zip /sdcard/
adb push <your_rom_zip_file> /sdcard/
adb push <your_gapps_zip_file> /sdcard/
adb shell
su
chmod 777 /data/local/tmp/flash_recovery
/data/local/tmp/flash_recovery /sdcard/recovery.img
reboot recovery
4. In recovery: Flash Debug-FormatSYSTEM.zip
5. In recovery: Wipe cache and dalvik-cache
6. In recovery: Flash <your_rom_zip_file> -- this will take a while
7. Do not reboot!
8. In recovery: Flash <your_gapps_zip_file>
9. Now, reboot.
10. Let your phone think about life for a few minutes
11. Select "Skip" when your phone asks you to create/enter your account info
12. Launch the market; now, enter your main account information

Hey first of all let me tell you that I appreciate this guide. Now my problem is that I am such a noob that I may be doing this wrong.I download the file to my optimus.Then in an explorer I extract it, correct? After that once I put in the first line of command on terminal emulator I get an error that says "adb: permission denied". Please help this guide is my last resort.Whatever I do I can not root through windows.It would be nice if you could explain in more detail every step. Thanks!

help
can u please add a little more detail thank u very much appreciated.

SouthParkFan15:
adb is a tool that you run on your computer; it is available for Windows, Mac OS X and Linux. It is part of the Google SDK.
thizizjohnny:
Could you give me a little more detail regarding what detail you are interested in?

How do I unzip?.. is extract the same thing? I'm running Linux mint 10. How do I get adb? Excuse my noobness.
Sent from my VM670 using XDA App

Oh and one last thing.. does this work on android version 2.2.1?
Sent from my VM670 using XDA App

Yes this works with 2.2.1.
On Linux Mint, you can use the package manager or the unzip command in a terminal window.
apk:
Download the SDK at http://developer.android.com/sdk/index.html
Install it, then run "android" and select "Install platform tools"

I finally got adb on my system, but when I type in "adb devices" nothing comes up and when I do any command that involves the phone i get "error:device not found".Yes I have usb debugging on and yes I have all the right drivers installed and yes I have tried rebooting a million times, and no my computer has never recognized my phone the way it should.Let me also point out that though pdanet or droid explorer they can't find my device. Help please I'm desperate!

Oh, my. Sorry to read that.
Problem is, in 2.2.x, the exploits that give you root access rely on ADB itself so you couldn't be more out of luck.
On second thought...this may seem a bit weird but there may be a way. I have to think about it. It would involve using a file manager that agrees to "see" /data/local/tmp, running psneuter from there and keeping our fingers crossed. I'll keep you updated.

Alright thanks cyansmoke! Keep me informed.

I ran all of the steps for rooting and I didn't get one error. It didn't seem to work though. When I launch adb again after rebooting my phone I get permission denied when I try to run su.
Here is the cap from my command line. I have no idea why it didn't take.
C:\phone\LGOptimusVTools>adb shell
$ cd /data/local/tmp
cd /data/local/tmp
$ chmod 777 psneuter
chmod 777 psneuter
$ chmod 777 su
chmod 777 su
$ ./psneuter
./psneuter
property service neutered.
killing adbd. (should restart in a second or two)
C:\phone\LGOptimusVTools>adb shell
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
# cat /data/local/tmp/su > /system/bin/su
cat /data/local/tmp/su > /system/bin/su
# mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system
mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system
# exit
exit
C:\phone\LGOptimusVTools>adb shell
$ su
su
su: permission denied
$

It's possible that you have another su in your path that takes precedence.
Please try typing:
/system/bin/su

Hey, do you know if there is a way to upgrade my device to froyo 2.2.2? It's currently 2.2.1 and whenever I go to update system it says something like "Your system is up to date".Incase you have forgotten I have the optimus v that can't establish connections with the computer.So what I could do?I'm thinking that If I do that then maybe it could fix all of my problems (or some of them).Thanks

I don't think that it will help you no.
OK it's taking longer than I thought because my wife's LGV, after I restored it to stock, decided that it would not allow psneuter anymore.
Thus, I will need you to run these commands for me and let me know how that went:
1. First, copy psneuter to the root of your SD Card.
2. Then, download Terminal Emulator from the market
3. Run Terminal Emulator, type:
Code:
cp /sdcard/psneuter /data/local/tmp/
chmod 777 /data/local/tmp/psneuter
/data/local/tmp/psneuter
Now, if we are lucky, you should get kicked out of the terminal app (I know it's weird but there is a claim that it goes through adb(!))
Restart the terminal emulator. If we are double-lucky, your prompt should have changed from '$' to '#'
Fingers crossed. Still surprised to hear that terminal emulator would go through adb. No, let me rephrase that: I am moderately surprised, in fact, considering the limitations put on non-rooted apps.

After I put psneuter on the root of my sdcard.I go to terminal emulator and put in the first code and it says "cp: permission denied".Any suggestions?

SouthParkFan15 said:
After I put psneuter on the root of my sdcard.I go to terminal emulator and put in the first code and it says "cp: permission denied".Any suggestions?
Click to expand...
Click to collapse
Ah, my bad, no "cp" by default.
New instructions:
Code:
cat /sdcard/psneuter > /data/local/tmp/
chmod 777 /data/local/tmp/psneuter
/data/local/tmp/psneuter

After I put in the first code I get an error message saying "cannot create /data/local/tmp/: is a directory".

*facepalm*
Of course I should have written:
Code:
cat /sdcard/psneuter > /data/local/tmp/psneuter

I put in "cat /sdcard/psneuter > /data/local/tmp/psneuter" and I get an error message saying "cannot create /data/local/tmp/psneuter: directory nonexistent".

Any suggestions?

Related

[HOWTO] manual rooting of Galaxy Tab (EURO)

This howto is for those people who are unable to root their Galaxy Tab using any of the automated procedures and do not suffer from CLPS (command-line-phobia-syndrome).
My story: After upgrading my EURO (GSM) Galaxy Tab to JM6 my persistent efforts to root the device using either the z4root or SuperOnClick methods have all been unsuccessful. z4root (v1.3.0) kept crashing at different stages, apparently depending on which and how many background apps were running. With SuperOneClick I never managed to get beyond the "changing permissions" stage.
Since both methods are basically wrappers of the rageagainstthecage application, I tried to perform the rooting procedure manually. Guess what, that worked without any problem and it is pretty easy to do.
The basic steps of the rooting process are:
1) use rageagainstthecage to get a temporary root shell
2) use the temporary root shell to copy three files to the read-only system partition the device
While I find the outlined procedure straightforward, you may not. Anyhow, try this at your own risk.
==== Prerequisites ====
I used Ubuntu 10.10 for this, but it should work on any other distro and on Windows just as well. Whatever OS you use, you need a working adb connection to your Galaxy Tab. Odin or Kies are of no use here.
You need the following binaries
* su
* busybox
* Superuser.apk
* rageagainstthecage
To get the all required files, simply download "SuperOneClickv1.5.5-ShortFuse.zip". That's what I used.
Get it here: http://forum.xda-developers.com/showthread.php?t=803682
Extract the contents of the ZIP, open a command-prompt on your computer and change to the directory where the extracted files are located.
Some advice if shell commands are not your regular cup of tea.
The following instructions show the shell commands. Some are executed on the host computer. Others are executed on the Galaxy Tab. You can differentiate between the two easily: All commands which start with "> " need to be executed in a shell on the host computer. Commands which are prefixed with "$ " are executed on the Galaxy Tab. In both case the ">" and the "$" must not be typed. If you copy+paste from this howto, make sure only to copy the commands and leave out the prompt.
==== Step 1: getting a temporary root shell ====
Copy the rageagainstthecage exploit to a temporary directory.
Code:
> adb push rageagainstthecage /data/local/tmp
263 KB/s (5392 bytes in 0.020s)
Change the file permissions and execute the exploit.
Code:
> adb shell
$ cd /data/local/tmp
$ chmod 777 rageagainstthecage
$ ./rageagainstthecage
[*] CVE-2010-EASY Android local root exploit (C) 2010 by 743C
(other output truncated)
Your shell session will be terminated which will throw you back to the regular command prompt of your host computer.
==== Step 2: restart adb server ====
Now stop and restart the adb server process.
Code:
> adb kill-server
> adb start-server
* daemon not running. starting it now *
* daemon started successfully *
Now reconnect to the Galaxy Tab again. Notice the '#' prompt. This means you have a temporary root shell now. We use this to execute some privileged commands which make the rooting permanent.
==== Step 3: making it permanent ====
First, make the system partition writeable. We need this to be able to copy su, busybox and Superuser.apk to the required locations. Then exit the android shell again.
Code:
> adb shell
# mount -o remount,rw -t rfs /dev/block/stl9 /system
# exit
Now we push busybox and su via adb. Then we install Superuser.apk.
Code:
> adb push busybox /system/bin
> adb push su /system/bin
> adb install Superuser.apk
The final steps are to change the file permissions for su and busybox and then remount the system partition as read-only again.
Code:
> adb shell
# chmod 4755 /system/bin/busybox
# chmod 4755 /system/bin/su
# mount -o remount,ro -t rfs /dev/block/stl9 /system
# exit
That should be all. Try a reboot and some apps which require root, like Titanium Backup. The Superuser.apk should popup a dialog requesting permission.
Hope this helps. Happy rooting.
[update]
This process worked for JMA and JMD as well.
"adb install" Superuser.apk instead of "adb push"
[/update]
It will help me !
Merci ;-)
Fantastic! This is just what I was looking for, thank you! I feel dumb now, because I started a thread of my own right as you posted this. You must just type faster than me
I ran a quick test, and it all looks good. One quick question actually. Why do you mount like this:
Code:
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
When most instructions for the Galaxy Tab have you doing something like this:
Code:
# mount -o remount,rw -t rfs /dev/block/stl9 /system
I'm not saying it is wrong, in fact, it actually worked for me. I'm just curious as to why it works like that? My understanding of mounting partitions and such in Linux is a little bit weak, so I like to indulge my curiousity by bugging fine people like yourself
Anyway, thanks again, this did exactly what I needed it to. Well done, I appreciate it.
DavidThompson256 said:
One quick question actually. Why do you mount like this:
Code:
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
When most instructions for the Galaxy Tab have you doing something like this:
Code:
# mount -o remount,rw -t rfs /dev/block/stl9 /system
I'm not saying it is wrong, in fact, it actually worked for me. I'm just curious as to why it works like that? My understanding of mounting partitions and such in Linux is a little bit weak, so I like to indulge my curiousity by bugging fine people like yourself
Click to expand...
Click to collapse
Thanks for pointing that out! Actually both the filesystem type and blockdevice name were totally wrong. Apparently the mount command ignores both parameters - at least when they are wrong.
I just verified this as self-punishment for not paying attention:
Code:
# mount
(...)
/dev/block/stl9 /system rfs ro,relatime,vfat,log_off,check=no,gid/uid/rwx,iocharset=utf8 0 0
(...)
/system is mounted read-only to /dev/block/stl9. This is the normal state of things.
Now I remount this without the fstype parameter and using a wrong blockdevice name:
Code:
# mount -o remount,rw /dev/block/xyz /system
# mount
(...)
/dev/block/stl9 /system rfs rw,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
(...)
Surprise, this actually remounts /system in read-write mode. This is why my original howto worked despite using the wrong parameters.
Thanks again. I corrected the HOWTO.
It works for me, but i get now error message: The application calendar save (proces com.android.providers.calendar) is unexpecly stopt. Try again. Forced closing
I had this also with SuperOneClick.
When i want to start the calender in the applications i get it also.
The application wil not run anymore.
How can i resolved this.
Thnx
leonreijnders said:
It works for me, but i get now error message: The application calendar save (proces com.android.providers.calendar) is unexpecly stopt. Try again. Forced closing
I had this also with SuperOneClick.
When i want to start the calender in the applications i get it also.
The application wil not run anymore.
How can i resolved this.
Thnx
Click to expand...
Click to collapse
That is strange. The result of the rooting process is just adding three files to the system partition. I find it hard to believe that this could lead to the problem you describe. However, while experimenting with z4root I had the the effect that there were many rageagainstthecage processes running in the background and the Galaxy Tab slowed down considerably. Perhaps there is something similar going on.
Have you tried rebooting after completing the rooting process?
Try shutting down the Tab completely.After rebooting get a shell on the Tab with "adb shell" and execute "ps". That shows the process list. If that looks normal, I would try a factory reset of the device. Which ROM version are you running?
BlackLevel: Thank you soooooooooo much... I don't get how to hit the Thanks Meter thing, but here is the old fashioned way. I used a MacBook to accomplish your perfect, step by step rooting of an AT&T Galaxy Tab i987. It helps that I'm more comfortable at the command line than with most GUI systems.
I could put this into a bash script, but that could be dangerous. People really need to look at whats happening with 'adb' and have some idea of what adb is for. I did renamed your 'adbmac' to 'adb', then I could cut and paste from your instructions except for adding ./ before the adb... ie. ./adb shell
Again, wonderful work at pulling this all together in one place.
Jeff
This guide worked perfectly! I love a nice quiet clean root and it doesn't get any better than this. You my friend deserve a cookie!
Hi Guys,
I flashed to JMA, rooted it with One Click Root, and everxthing seemdet to be okay, but activating OCLF failed....is there anybody with the same problem?
Jan
Thanks a lot !. It's clean and doesn't need a kies ...
Just a question : after reboot I have to use "su" after "adb shell" to become root.
Is there any way to be root directly after adb shell ?
And thanks again ...
Mike
mbaroukh said:
Just a question : after reboot I have to use "su" after "adb shell" to become root.
Is there any way to be root directly after adb shell ?
Click to expand...
Click to collapse
The reason is that "/sbin/adbd" (the adb daemon) is running as the shell user. It would need to run as root user instead. This requires changes to the initial ram disk where adbd the relevant settings are stored.
Dealing with "insufficient permissions for device"
Thanks, this worked for me.
One small thing: running from a Linux sustem (Ubuntu 9.04), to overcome a "insufficient permissions for device" problem, I had to put my Ubuntu terminal session into su mode and restart the ADB server -- cf. groups.google.com /group/android-discuss/browse_thread/thread/f85a795644e65b59?pli=1 :
[[
adb kill-server
sudo adb start-server
adb devices
]]
gklyne said:
One small thing: running from a Linux sustem (Ubuntu 9.04), to overcome a "insufficient permissions for device" problem, I had to put my Ubuntu terminal session into su mode and restart the ADB server -- cf. groups.google.com /group/android-discuss/browse_thread/thread/f85a795644e65b59?pli=1 :
[[
adb kill-server
sudo adb start-server
adb devices
]]
Click to expand...
Click to collapse
Thanks for the feedback. On my Ubuntu 10.10 adb runs under my regular user-id (1000) and I do not have to use sudo or run the local adb server as root. That might be due to the way the udev rules are set up. Mine are rather unrestrictive and look like this:
Code:
$ cat /etc/udev/rules.d/51-android.rules
SUBSYSTEMS=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEMS=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
How do yours look like?
Which is the more simple method for root of galaxy tab euro ?are there ?
the incredible said:
Which is the more simple method for root of galaxy tab euro ?are there ?
Click to expand...
Click to collapse
Try z4root or SuperOneClick. Both methods are wrappers of the rageagainstthecage exploit and try to automate the manual process outlined here.
This thread should be a sticky. Worked like a charm.
z4root is very simple method..thanks.
thanks to Germany...
I agree, this thread should be sticky. Finaly some sense in android devel section...
Thank you very much for your guide!
I followed all the instructions in your guide, everything seems fine until I try to push the busybox and su to my Galaxy Tab.
blacklevel said:
Now we push busybox and su via adb. Then we install Superuser.apk.
Code:
> adb push busybox /system/bin
> adb push su /system/bin
> adb install Superuser.apk
[/update]
Click to expand...
Click to collapse
I received an error: "failed to copy 'busybox' to '/system/bin/busybox' : No space left on device\"
the same error for the 'su' too
(No space left on device) is impossible, my tab is brand new sealed when i got it.
I have been trying the z4root and SuperOneClick procedure to root this tab but are all unsuccessful.
I am not sure if it is because of my tab needed a "NAND unlock" (I cannot find any guide about the NAND unlock) because I received this message when I tried to install busybox from the market.
Please help! My tab is carrier locked to Bell Canada, I really wanna to unlock it and root it~
Thanks!
gummo6869 said:
I received an error: "failed to copy 'busybox' to '/system/bin/busybox' : No space left on device\"
the same error for the 'su' too,
Click to expand...
Click to collapse
The `no space left on device` message indicates that the /system partition is still read-only. That means the mount command in step 3 was unsuccessful. Did you get any error message when you executed it?

[Q] Simple Root for EB13

Is there a simple, non-CWM flashing one-click root for stock EB13 Epics (I just want to tether to my rooted nook)?
I ask because a few months back I rooted my DI18 Epic with a "One Click Root" and, for some reason, all my apps became unlinked from the android market, and nothing I did worked to restore their connections. After a few hours of panic, I unrooted using the accompanying "One Click Unrooter," and the problem went away.
Then, I noticed my bluetooth was't working. I took it to the Sprint store, they ordered me a replacement phone, and then wouldn't exchange it because CWM was on my current phone. I got them to exchange it eventually, but I felt like a complete dumbass for not knowing it didn't come off in the one-click-unrooting process.
So, is there a way to just get root? And then is there a simple way to get rid of it (uninstall SU and such as well) in case I have to exchange the hardware?
I've read a lot of stuff about flashing stock with Odin, but all the dl links for Odin are 404'd, and I'd rather not have to go back to fresh stock every time I need to take my phone in. What's your advice?
SuperOneClick v1.7 worked for me.
Trickee360 said:
Is there a simple, non-CWM flashing one-click root for stock EB13 Epics (I just want to tether to my rooted nook)?
Click to expand...
Click to collapse
I don't know about "one-click", z4root might work, but there's anecdotal reports of it not working on Android 2.2.1. The one-click w/CWM redirector is the easiest way to root and definitely recommended if you want to do anything more advanced (ROMs, etc.). You can always return to stock everything with Odin.
That said, if all you want is root and nothing more, the manual version is relatively simple. It's really just three steps:
Use an exploit (rageagainstthecage-arm5.bin) to get "temporary root" (an ADB root shell).
Install Superuser's su binary to /system/xbin with the appropriate permissions (root.shell 4755).
Sideload Superuser.apk as a regular program, or download it from the market.
In which case "unrooting" is trivial. Just delete /system/xbin/su with root-explorer or something, and after remove Superuser via "Manage applications".
A while back I wrote up semi-detailed directions for doing this. They should work on EB13 with some modification. Here's some notes for EB13:
"rageagainstthecage-arm5.bin", "su", and "Superuser.apk" are all included in the one click package, that's the easiest place to get them.
Actually running "rageagainstthecage-arm5.bin" is the trickest part. There's a few ways to do it, and due to the nature of the exploit, sometimes only one or two of them will work for anyone. You can tell it works if on the next run of "adb shell" you get a "#" prompt instead of "$". Try these three ways in order until one of them works:
Code:
adb push rageagainstthecage-arm5.bin /data/local/tmp
adb shell chmod 755 /data/local/tmp/rageagainstthecage-arm5.bin
adb shell /data/local/tmp/rageagainstthecage-arm5.bin
Code:
adb push rageagainstthecage-arm5.bin /data/local/tmp
adb shell chmod 755 /data/local/tmp/rageagainstthecage-arm5.bin
adb shell (press return, and type below at the "$" prompt):
/data/local/tmp/rageagainstthecage-arm5.bin
Code:
adb push rageagainstthecage-arm5.bin /data/local/tmp
adb push root.sh /data/local/tmp
adb shell chmod 755 /data/local/tmp/rageagainstthecage-arm5.bin
adb shell chmod 755 /data/local/tmp/root.sh
adb shell /data/local/tmp/root.sh
With the last method's root.sh from the one-click package.
Once you have root, and have verified such by getting a "#" prompt with "adb shell", then run:
Code:
adb shell rm /data/local/tmp/rageagainstthecage-arm5.bin
adb shell rm /data/local/tmp/root.sh
adb shell mount -wo remount /dev/block/stl9 /system
adb push su /system/xbin
adb shell chmod 4755 /system/xbin/su
adb shell mount -ro remount /dev/block/stl9 /system
adb install Superuser.apk
If you do nothing more, OTA updates should apply just fine. The only caveat is that /system/xbin/su will lose the appropraite permissions, so Superuser will no longer work. To restore it, do the same steps above to regain "temporary root", then run:
Code:
adb shell rm /data/local/tmp/rageagainstthecage-arm5.bin
adb shell rm /data/local/tmp/root.sh
adb shell mount -wo remount /dev/block/stl9 /system
adb shell chmod 4755 /system/xbin/su
adb shell mount -ro remount /dev/block/stl9 /system
You shouldn't have to push a new "su" binary since it's already there, and similarly, you don't need to reinstall Superuser.

[Q] Convert ADB to Terminal Emulator code

Hey all,
Just wondering what the conversion code for Terminal Emulator would be in order to perform an ADB code, i have tried to convert the code myself below and want to be sure it is ok.
Basic objective is to copy the file gps.conf from /sdcard/code/ to /system/etc/ directly using Terminal Emulator on my Desire HD (Froyo 2.2 firmware 1.32....)
CMD prompt:
adb push psneuter /data/local/tmp
adb push misc_version /data/local/tmp
adb shell chmod 777 /data/local/tmp/psneuter
adb shell chmod 777 /data/local/tmp/misc_version
adb shell /data/local/tmp/psneuter
adb shell
mount -o remount,rw /dev/block/mmcblk0p25 /system
exit
adb push gps.conf /system/etc/gps.conf
adb shell
mount -o remount,ro /dev/block/mmcblk0p25 /system
exit
TEmu:
chdir /sdcard/code
cp psneuter /data/local/tmp
cp misc_version /data/local/tmp
chmod 777 /data/local/tmp/psneuter
chmod 777 /data/local/tmp/misc_version
chdir /data/local/tmp/psneuter
mount -o remount,rw /dev/block/mmcblk0p25 /system
cp /sdcard/code/gps.conf /system/etc/
mount -o remount,ro /dev/block/mmcblk0p25 /system
NOTE: that when i tried cp psneuter /data/local/tmp or even cp psneuter /sdcard it says cp: permission denied
Cheers
if all you want to do is copy the file...then whats the point of all of that??!!
im guessing that your not rooted, since your doing some code from the downgrade thread that gives temp root.
But the whole point of that code is to get temp root for FW greater than 1.32.
Since you want 1.32, use a program called Visionary+ and click temproot is you want temporary root. (Visionary+ only works till 1.32 FW)
And you wont be able to copy to a file to the system partition if your not in root mode.
So in the terminal, type
>su
first thing, then carry on.
If you get a # instead of the $ then your in root mode, if not (or if a message appears) then you dont have permission to go into root mode(or your not rooted).
---and i dont think theres any point of the chdir command.
::::::::::But if you want to use that code, then it'll work if you type 'su' first.

[HOWTO] (Manually) Rooting the Kindle Fire 2 with a Mac

Firstly, Merry Christmas!
Note: This worked on version 10.2.4
I received a Kindle Fire 2 today and since then I've been trying to get it rooted, now that I have I though I'd share it here for other people who might be in the same situation.
This is really just a remixing of the tool made by Bin4ry (http://forum.xda-developers.com/show....php?t=1886460) but I couldn't get the script to run on my Mac...
Step 0 - Preparing
You must enable ADB and Unknown App sources from Settings.
Settings > More > Security > Enable ADB
Settings > More > Device > Allow Installation of Applications
Step 1 is to get that tool from here. and extract it somewhere you'll remember.
Step 2 (you can skip this if you already have the android SDK platform-tools in your PATH)
If you don't have the android SDK or adb installed just add the 'stuff' folder from the tool to your path.
In terminal run
Code:
export PATH=$PATH:/path/to/extracted/tool/stuff/
Step 3 - Push the required files
It's probably easiest if you change into the stuff folder first...
Code:
cd /Users/x/Downloads/Root_with_Restore_by_Bin4ry_v18.7z\ Folder/stuff
Then run the following...
Code:
adb push busybox /data/local/tmp/.
adb push su /data/local/tmp/.
adb push Superuser.apk /data/local/tmp/.
adb push ric /data/local/tmp/ric
Then you need to run an adb shell to set some permissions
Code:
adb shell
(you should get a prompt like [email protected]:/)
Run
Code:
chmod 755 /data/local/tmp/busybox
exit
Step 4 - Rooting
This requires another terminal window. Check that you can run adb from there as well (running adb should print the usage information)
In the first window run:
Code:
adb shell "while ! ln -s /data/local.prop /data/data/com.android.settings/a/file99; do :; done" > /dev/null
In the other run
Code:
adb restore fakebackup.ab
You should get a prompt on your Kindle, hit the restore my data button. As you do so the command in the first window should stop (or a few seconds later - if it doesn't stop it and re-run both commands again.)
You can now close the second window!
Run
Code:
adb reboot
, your Kindle should reboot though the screen will be blinking repeatedly (flashing between the lockscreen and the boot animation) don't worry about that as it will be fixed in a sec.
Step 5 - Cleaning Up
Run
Code:
adb shell
If all was successful you should see the prompt change to [email protected]:/
If it did, continue otherwise go back to step 4.
Run these
Code:
/data/local/tmp/busybox mount -o remount,rw /system
/data/local/tmp/busybox mv /data/local/tmp/su /system/xbin/su
/data/local/tmp/busybox mv /data/local/tmp/ric /system/bin/ric
chmod 755 /system/bin/ric
/data/local/tmp/busybox mv /data/local/tmp/su /system/xbin/su
/data/local/tmp/busybox mv /data/local/tmp/Superuser.apk /system/app/Superuser.apk
/data/local/tmp/busybox cp /data/local/tmp/busybox /system/xbin/busybox
chown 0.0 /system/xbin/su && chmod 06755 /system/xbin/su
chmod 655 /system/app/Superuser.apk
chmod 755 /system/xbin/busybox
rm /data/local.prop
reboot
Your Kindle will restart and SuperSU will be available under Apps, your now free to do as you please, though you could follow with Step 3 on this thread to get Google Apps etc working.
Update: a short guide to installing the Play store can be found here.
This worked almost perfect for me but I couldn't get it to run adb commands from the stuff folder so I dumped its contents (minus the adb stuff) into the platform-tools in the android SDK and from then on everything went great. Thanks so much.
didthis work for 10.2.4 users out there
does this work for 10.2.4
worked!
Great work, congratulations and thanks! I'd like to make some comments tho regarding some typos and suggestions.
1.- I'd suggest to install the android SDK as, in fact, adb commands didn't work from the stuff folder. Add a line to .bash_profile with the export PATH command to make permanent access to the adb shell.
2.- Push files from the Root_with_Restore_by_Bin4ry_v18 folder, not the .7z file.
3.- The command is, e.g., adb push busybox /data/local/tmp/ instead of adb push busybox /data/local/tmp/.
4.- In Step 5 the command /data/local/tmp/busybox mv /data/local/tmp/su /system/xbin/su is twice so you'll get an error the second time you execute it.
Also congratulations for instructions on how to install PlayStore - here pay attention to the names playstore.apk and servicesframework.apk which in fact are plstore3.10.10.apk and GoogleServicesFramework.apk respectively -
Once again thanks for your work.
gorganzolia said:
does this work for 10.2.4
Click to expand...
Click to collapse
Yes this worked for 10.2.4
10.2.6
Does this work with 10.2.6?
it worked
Tried it this morning on 10.2.6 and it worked woohoo now how do you stop it from automatically updating
Found out how to stop those automatic updates here http://forum.xda-developers.com/showthread.php?t=2086450

[Q] Linux user with some questions about root methods.

Okay folks, I am a rooting newb where it comes to this wonderous device known as the Optimus G, and I need some questions answered.
First lemme fill you all in on some details where the computer I might be using to root my Optimus G is concerned. I run Zorin OS 6.1 64bit Core edition (yes, Linux) and that obviously that begs my first question, of any of the rooting methods mentioned in the development part of this forum, are there any that will work with Linux? And if so which ones or is there some kind of special magic I'll need to cast or some kind of coding wizardry level I'll have to obtain in order to be able to root my Optimus G?
Second, to fill you in on the phone, yes I have updated to ZV9 so if that borks me if you could please let me know?
Third, and Fourth actually are my concerns over being able to fix whatever possible brick type damage might be done. 3)How stable are the root/unlock methods, meaning there would be no way to reverse them? Of course I mean outside of accepting an OTA update which I already know better than to do on a custom ROM (had a Samsung Epic 4g before this so yeah I know how that goes.)
and 4)Is there an LGNPST (sp?) version for Linux or will I have to figure out a wa to maybe run it on WINE or something along those lines?
I'd ask about ROMS but I know everybody has an opinion of their own and I don't so much mind the stock one, though I might get the debloated version and see what else I can do with that.
Thanks in advance everybody for any help you all can give.
1) You can root through linux, although I don't know about which distros. I did it on ubuntu, using one of the links in the link in my sig.
2) AFAIK, you have to be on zv7/8 to root or unlock. You will have to use LGNPST to go back to one of those, and as far as I've ever heard that is a windows program only.
3) Both the root and unlock methods are reversible through whatever program you use to do it.
4) ???
You forgot profit!!!!
Sent from my LG-LS970 using xda premium
As long as you can attain a root shell and install ADB aka Android SDK, and as long as after that you can run ADB shell and then receive a prompt from your device you should be able to push the necessary files and then run the exploit and install the superuser binary there should be no issues. I actually took the windows root method, and used the commands in my Debian box and it worked very well. The only thing that I would be concerned with is weather not you can get a root shell in your specific version once that is attained, run ADB start-server as root then finish.
Basically I took this root method, and modded the script to fit linux.
(as noted from my post on the last page of that thread)
Preparation
ADB can be found either from the android sdk(tools only) or from the 'stuff' folder, in the archive below (i ran the one from the sdk)
Download this zip file, and extract the 'stuff' folder to a newly created 'root' folder on your Desktop
Open a terminal and cd to ~/Desktop/root
My adb location is coded into my $PATH variable so when I issue adb, it runs ~/android-sdk-linux/platform-tools/adb but you can either set up an alias (to the one included which would be alias adb=~/Desktop/root/stuff/adb if you follow the below extraction procedures or the one from the sdk which could be anywhere)
Before running the root I ran:
Code:
su -
adb start-server
exit
Then to test whether or not I had the correct version of adb, I ran:
Code:
adb shell
You should see your prompt change to that of the phone. if it displays any type of error message, please check your version of adb. to exit this prompt and continue with the root, simply type exit and press enter.
ROOT:
Paste the following into your terminal (which should now be in the ~/Desktop/root directory)
Code:
adb "wait-for-device"
adb push stuff/busybox /data/local/tmp/.
adb push stuff/su /data/local/tmp/.
adb push stuff/Superuser.apk /data/local/tmp/.
adb shell chmod 755 /data/local/tmp/busybox
adb restore stuff/fakebackup.ab
echo 'Select "Restore my data" on your phone!'
adb shell "while ! ln -s /data/local.prop /data/data/com.android.settings/a/file99; do :; done" > /dev/null
echo "Your phone will now reboot twice, DO NOT DISCONNECT USB!"
adb reboot
adb "wait-for-device"
adb shell "/data/local/tmp/busybox mount -o remount,rw /system && /data/local/tmp/busybox mv /data/local/tmp/su /system/xbin/su && /data/local/tmp/busybox mv /data/local/tmp/Superuser.apk /system/app/Superuser.apk && /data/local/tmp/busybox cp /data/local/tmp/busybox /system/xbin/busybox && chown 0.0 /system/xbin/su && chmod 06755 /system/xbin/su && chmod 655 /system/app/Superuser.apk && chmod 755 /system/xbin/busybox && rm /data/local.prop && reboot"
echo "Rooting Complete!"
echo "SuperSU should now be available in your applications drawer!"
Assimilated using the interface that interacts with the advanced internet.

Categories

Resources