[LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flashing

goater1220

Well-known member
Dec 13, 2010
60
4
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

actually now Im gettingall this.....mike@ubuntu:~$ cd
mike@ubuntu:~$ adb devices
List of devices attached
0146910907013016 device

mike@ubuntu:~$
 

ohiomoto

Well-known member
Oct 31, 2011
705
111
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

Sound like you might be having some Linux noob issues, but that's ok. I think what might be happening is that you need to be in the directory you are going to run the command from. So, if you want to run adb (before step 4) you need to "cd" to the directory it's located in. Once there, you type "./" + the command to run that program. I suspect that you might not have been in the correct directory to run the command. That's pretty common when we first start using the command line terminal.

If you followed the steps correctly from 4 down and it doesn't work, there could be a a couple things you need to do. The first is to make sure that you paste the correct location into the bashrc file. For me it was this:
Code:
	# Android tools
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools

You might want to try this:
Code:
	# Android tools
export PATH=${PATH}:/home/mike/android-sdk-linux/tools
export PATH=${PATH}:/home/mike/android-sdk-linux/platform-tools
 

goater1220

Well-known member
Dec 13, 2010
60
4
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

I didnt use those commands you gave me to get that... LOL I really dont know what Im doing on linux I just downloaded ubuntu 11.10 to run along side windows so I can maybe learn how to use ubuntu. If I take it right I guess adb is reading my phone? I really appreciate all the help but when you do have time would you be able to tell me or point me in the right direction on how I put files on my phone, since Im use to using windows and putting files on my device that way. Thanks again!!!!

If you think it would be easier to talk on gtalk let me know.
 

ohiomoto

Well-known member
Oct 31, 2011
705
111
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

To see the directories on your phone:
Code:
adb shell
To put files on you phone you need to be in the directory of your computer where the file is stored or use the path to get to it. One trick to help find file paths is to type the first letter or two of a directory or file and then double tap the tab key. It will either finish the directory of file name or show you all the names that match what you started. Then you simply add the correct letter or letters and tab again to finish adding the path.
Code:
adb push file.zip /sdcard/file_on_the_phone.zip
Where "file.zip" is the file you want to put on the phone and "/sdcard/file.zip" is the location and name you will store the file as on your phone. You can name it anything you want.
 
Last edited:
  • Like
Reactions: goater1220

goater1220

Well-known member
Dec 13, 2010
60
4
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

First i want to thank you for all the help!!!! I tried downloading something just to see if I could put it on my phone and of course being a noob it didnt work. I used the commands you gave and yes I typed in the name of the file instead of file.zip, and this is what I got Android Debug Bridge version 1.0.29

-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices.

device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.

adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)

adb restore <file> - restore device contents from the <file> backup archive

adb help - show this help message
adb version - show version num

scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns

adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:

- If <directory> is not specified, both /system and /data partitions will be updated.

- If it is "system" or "data", only the corresponding partition
is updated.

environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
1|root@android:/ #

Any ideas on what I did wrong?
 

ohiomoto

Well-known member
Oct 31, 2011
705
111
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

You got a list of working adb commands. So Linux knows you are trying to use adb, but it didn't recognize the command and it's telling you what you can do with adb.

Code:
adb push <local> <remote> - copy file/dir to device

This is telling you how to do a valid adb push command. It's telling you that you need to give it a local file, a space and then a remote file.

Without seeing the actual command, I can't tell you what you did wrong.
 
  • Like
Reactions: goater1220

sk8pimpin417

New member
Mar 6, 2012
2
0
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

Bravo my friend as I read I felt like I was getting in a car with a solid stand up bro code gentelmen. Ladies would never think like that,,ha
;)
 

Jubakuba

Well-known member
Sep 12, 2012
123
0
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

Just reinstalled ubuntu for a few days ago...and followed your guide for teh lulz.
Awesome stuff man.
I, unfortunately, got lucky. Didn't have to set up any udev rules.
I would have liked to cross check all that.

Good stuff, kind sir.
 

ohiomoto

Well-known member
Oct 31, 2011
705
111
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

Thanks. Funny thing is, I was going to update this guide because I just put an SSD in my laptop and re-installed myself. I used a script dmmarck posted and it took care of everything. You can find it HERE. It was much easier! LOL
 

Jubakuba

Well-known member
Sep 12, 2012
123
0
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

Thanks. Funny thing is, I was going to update this guide because I just put an SSD in my laptop and re-installed myself. I used a script dmmarck posted and it took care of everything. You can find it HERE. It was much easier! LOL

Y'all know by now; I'm a "manual" sorta' guy =]
Toolkits and the like rub me the wrong way.
 

Inamur Rahman

New member
May 4, 2013
1
0
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

My problem is that I can not find 99-android.rules when i do
ls /etc/udev/rules.d/
51-flashtool.rules 70-persistent-cd.rules 70-persistent-net.rules READM
can you tell me where i am wrong or what to do now.
Thanks
 

ohiomoto

Well-known member
Oct 31, 2011
705
111
0
Visit site
Re: [LINUX GUIDE for NOOBS] Rooting, Unlocking, Locking and Flash

My problem is that I can not find 99-android.rules when i do
ls /etc/udev/rules.d/
51-flashtool.rules 70-persistent-cd.rules 70-persistent-net.rules READM
can you tell me where i am wrong or what to do now.
Thanks
You can't find them because they don't exits yet and you will have to create them. Read this section again"

3) Setting up uDev rules (if needed)
This shouldn't be too difficult. First make sure you don't already have android.rules set up.
Command:
ls /etc/udev/rules.d/


If you find something with "android.rules" you should probably rename it with the mv command. For example I'll just add .bak to mine:
Command:
mv /etc/udev/rules.d/91-android.rules /etc/udev/rules.d/91-android.rules.bak


This next command will create a new android.rules file. If your Linux distro doesn't have gedit, you can try leafpad (in Lubuntu) or use nano, vim, etc:
Command:
sudo gedit ~/etc/udev/rules.d/99-android.rules


Now paste the following into the file:
Copy and paste:
#Acer SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666" #Dell SUBSYSTEM=="usb", SYSFS{idVendor}=="413c", MODE="0666" #Foxconn SUBSYSTEM=="usb", SYSFS{idVendor}=="0489", MODE="0666" #Garmin-Asus SUBSYSTEM=="usb", SYSFS{idVendor}=="091E", MODE="0666" #Google SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666" #HTC SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" #Huawei SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666" #Kyocera SUBSYSTEM=="usb", SYSFS{idVendor}=="0482", MODE="0666" #LG SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666" #Motorola SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666" #Nvidia SUBSYSTEM=="usb", SYSFS{idVendor}=="0955", MODE="0666" #Pantech SUBSYSTEM=="usb", SYSFS{idVendor}=="10A9", MODE="0666" #Samsung SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666" #Sharp SUBSYSTEM=="usb", SYSFS{idVendor}=="04dd", MODE="0666" #Sony Ericsson SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", MODE="0666" #ZTE SUBSYSTEM=="usb", SYSFS{idVendor}=="19D2", MODE="0666"


Save the file and close your editor. Now lets change permissions for android.rules:
Command:
ls /etc/udev/rules.d/sudo chmod a+r /etc/udev/rules.d/99-android.rules
 

klezmer-bassman

New member
Sep 25, 2013
2
0
0
Visit site
There must be the way to solve this on Linux

Hello,
I'm linux user - maybe not so experienced like you but I can't say I'm a linux noob. My device: LG L9 (P760)
Now I know I've done very stupid thing: having CWM recovery installed with stock V20e I accepted update to V20i by OTA...
The result: CWM bootloop - it looks like I can do some things on CWM recovery but when I try to reboot to normal OS mode, it always boots to CWM recovery mode.
The device is visible by the computer (with 'adb devices'). I've tried 'adb reboot bootloader','adb reboot fastboot' but still the same - it reboots into CWM recovery mode.
I believe the solution would be to go into the fastboot mode, then I could reinstall the CWM recovery and probably repair this. But I can't do this. When I'm trying with 'fastboot flash recovery' it shows 'waiting for device'. Everything worked before (I've unlocked bootloader, rooted and flashing CWM recovery) until this update.
I've found some tutorials with LG tools for Windows - I've tried - it doesn't work for me in spite of drivers installed.
I believe there must be the way to solve this on Linux - how do you think?
Could you help me?
 

ohiomoto

Well-known member
Oct 31, 2011
705
111
0
Visit site
I think you just need to update your android SDK. This is probably a driver issue. Once you get fastboot working you should be able to fix it. You might want to head over to rootzwiki or xdadevelopers. They should prove more helpful than me. :)
 

Trending Posts

Forum statistics

Threads
943,138
Messages
6,917,466
Members
3,158,836
Latest member
Robbyworkman1995