[Resolved]
Hi, I try to root my LG Eve with Wiki, I follow all steps but when I lauch "adb shell", the terminal returns me "error: insufficient permissions for device".
The step Module Test -> Stability Test -> Enable Root Permission seems not working...
Any idea? Thanks
PS Sorry for my english...
Click to expand...
Click to collapse
[Resolved]
i Have the same problem!
vinzqc said:
[Resolved]
[Resolved]
Click to expand...
Click to collapse
Maybe the resolution could be shared?
The adb server needs to start as root to get full access to the USB device.
Code:
adb kill-server
sudo adb start-server
adb devices
adb shell
did you check your udev rules? if you set this up you don't need to run adb server as root.
http://developer.android.com/guide/developing/device.html
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
be sure to change group to "users" or your group name (type id -a)!
adb do not need as root in my phone with official rom, but it is needed in cm72
Related
I have the Android ADK installed and I have adb. I don't seem to have the privledges to use it though. If I try and use it normally I get
Code:
[email protected]:~$ adb devices
List of devices attached
???????????? no permissions
I can only get it to work if I start adb as the admin. Then I can use it as a normal user.
Also, I don't seem to have fastboot. Where do I get it?
On some Linux systems, starting adb as root is the easiest way to go about things. Some systems require setting up udev rules to give normal users permissions to run adb. Still others, simply changing the permissions on adb itself and putting it somewhere in the path will work. Running it as root isn't recommended, but it does work.
As for fastboot, Google have stopped pre-compiling it and distributing it with the SDK. You can either compile the emulator to get it or download a pre-compiled binary from HTC's support website.
beartard said:
On some Linux systems, starting adb as root is the easiest way to go about things. Some systems require setting up udev rules to give normal users permissions to run adb. Still others, simply changing the permissions on adb itself and putting it somewhere in the path will work. Running it as root isn't recommended, but it does work.
As for fastboot, Google have stopped pre-compiling it and distributing it with the SDK. You can either compile the emulator to get it or download a pre-compiled binary from HTC's support website.
Click to expand...
Click to collapse
Ok I guess it's just easier to start it as root. Fastboot on the other hand wont work. After I use the command
Code:
adb reboot bootloader
my phone reboots into recovery and has FASTBOOT USB on the screen. When I type
Code:
fastboot devices
it just goes to the command line again and doesn't show anything. When I try and type $ fastboot reboot I get
Code:
< waiting for device >
Any ideas why it's not working?
I'm probably sharing my ignorance here, but did you run fastboot after starting adb as root? You might have to run it as root as well. Also, try unplugging your phone and re-plugging it before running the command.
beartard said:
I'm probably sharing my ignorance here, but did you run fastboot after starting adb as root? You might have to run it as root as well. Also, try unplugging your phone and re-plugging it before running the command.
Click to expand...
Click to collapse
Ok, now I feel really dumb. I guess I didn't run fastboot as root before. I could have sworen I did. Well now it seems to all be working, as long as I am root. I wish I could do it with out having to be root.
Thanks beartard
No problem. In case you're interested in how to do it The Right Way™ here's a post I found on the Google support forums for Android. The author had a Motorola CLIQ. The vendor id for the Slide is 0bb4.
I found this info to be helpful, although there was not much explanation behind it, and in the end things still did not work for me. after a number of hours of debugging (which was kind of fun!) i finally got things working, and wanted to document it here in case others have the same issues. also documented is *how to debug* your stuff, which may be as valuable as the fix!
disclaimer:
i still dont really understand udev very well, so if someone who does can clarify my observations, that would be cool.
my environment:
ubuntu 10.04, device is a motorola cliq.
adb version 1.0.26
eclipse version 3.5.2 (galileo)
the problem:
persistent issues with adb devices returning:
List of devices attached
???????????? no permissions
rat holes i went down:
a) first, be sure that when you write your android-specific rules in /etc/udev/rules.d that you ensure that you name the file with a name that ends in .rules, or else the udev daemon wont read it.
b) Ubuntu 10.04 uses a new version of udev, so some of the documentation you find on the web is out of date.
c) The phone looks like a disk drive to the OS, which caused me some wierdness. more later.
some basics:
a) the udev infrastructure is what the OS uses to dynamically map, present, and control USB devices. you will need to tell udev what to do with your android phone when the phone is in application debug mode (that is why you need the /etc/udev/rules.d/50-android.rules file.
b) the adb (android debug bridge) is the daemon (using network sockets) that allows the IDE to talk to the device. when you run commands like 'adb devices' the command looks for a running daemon, and if one is not running it starts one and then communicates with it.
c) the "no permissions" error message indicates that the adb daemon cannot get the right permissions to access the device as the user that it is running as. normally the IDE starts the daemon as the user you are logged in as. unless the phone device appears in the udev infrastructure with the correct permissions to be accessed as the user you are logged in as, it wont work.
steps:
1) plug your phone into the usb bus on your system. does not need to be in application debug mode yet...
2) verify that you can see the phone by using 'lsusb', e.g.:
$ lsusb
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 044: ID 22b8:2d66 Motorola PCS
Bus 002 Device 004: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
Bus 002 Device 003: ID 10d5:0001 Uni Class Technology Co., Ltd
...
the line "ID 22b8:2d66 Motorola PCS" is my phone. the rest is other stuff on the usb busses. ignore it.
3) the 4 digit value 22b8 is the Vendor ID of my phone. yours may be different. whatever it is, this is the value you need to use in your udev rule.
4) the Bus number and Device number are useful. you can see what permissions your device is getting at any time by doing
$ ls -l /dev/bus/usb/<busnumber> where <busnumber> is the Bus number above (002 in this case).
the permissions of the device will be the permissions of the file numbered with the Device number above. in my case it was device 044, so the full file path is /dev/bus/usb/002/044
! note - this device number will change when you plug/unplug or enable/disable debug on your device.
5) you can now get *alot* of info on this device now by using 'udevadm info', but you need to use the bus and device info above (remember yours may be different and change). you can use either udev info command --query=all or --attribute-walk, e.g.:
$ udevadm info --query=all --name=/dev/bus/usb/002/044
or
$ udevadm info --attribute-walk --name=/dev/bus/usb/002/044
note that the attribute-walk walks up the bus. the first entry printed should be the lowest device on the chain, which is your phone. in my case some of the lines looked like:
looking at device '/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2.4':
KERNEL=="2-2.4"
SUBSYSTEM=="usb"
DRIVER=="usb"
ATTR{configuration}=="Motorola Config 42"
...
ATTR{idVendor}=="22b8"
...
ATTR{busnum}=="2"
ATTR{devnum}=="44"
ATTR{version}==" 2.00"
ATTR{maxchild}=="0"
ATTR{quirks}=="0x0"
ATTR{authorized}=="1"
ATTR{manufacturer}=="Motorola "
ATTR{product}=="MB200"
ATTR{serial}=="<serialnumber>"
...
where the <serialnumber> is the serial number of my phone, which will show up in the adb devices list when this all works. recognize the items that you will need for the .rules file are there.
6) now, lets write the .rules file. you have two choices. either get the permissions of the phone as it shows up changed to 0666 (rw for all users, including the world) or change the ownership to be your user. i prefer the latter. seems cleaner to me, so i will use this approach for the rest of the info.
7) find out who you are. use the id command, e.g.:
$ id
uid=1000(<your username>) gid=1000(<your group name>) groups=...
where the uid and gid for you are indicated. for now lets use both as 'juser' for the example.
8) now lets create the .rules file. the number at the beginning of the file name is the order that it will be loaded by the udev infrastructure. it may be important. all the examples showed a number of 50, but there are a bunch of things being loaded in /lib/udev/rules.d/ as well. i prefer to make my file name 99-android.rules to force it to load very late in the process. this keeps other later things from clobbering my permissions as they load.
for example, if you use the ATTR{idVendor} attribute in .rules as oppose to SYSFS{idVendor}, then when other later rules load they could over write the permissions you set in your .rules file.
9) you have to use root or sudo to create the file in /etc/udev/rules.d. create /etc/udev/rules.d/99-android.rules and put in a line like:
SUBSYSTEM=="usb", SYSFS{idVendor}=="<Vendor ID>", OWNER="<your username>" GROUP="<your group name>"
and save it.
the SYSFS{idVendor} value needs to match your device id, and the OWNER and GROUP are from step 7 above.
for this example lets use
SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", OWNER="juser" GROUP="juser"
if you just want to set the permissions use:
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
10) now, when you connect the device (try the application debug mode) you should be able to see that the device appears with the correct user permissions. e.g.(using this example's bus, device, and uid/gid values):
$ ls -l /dev/bus/usb/002
crw-rw-r-- 1 root root 189, 128 2010-10-09 20:02 001
...
crw-rw-r-- 1 root root 189, 131 2010-10-09 20:02 004
crw-rw-r-- 1 juser juser 189, 173 2010-10-10 11:29 044
this is very good, 'cause now adb running as you will be able to read and write the device.
11) if you did not get here, then you have udev issues. dont bother beating on adb, the problem is in udev. your best bet is to go into /etc/udev and edit udev.conf, to change the line
udev_log="err" to udev_log="debug" to see what is going on. then you can follow what udev is doing by opening a terminal window and following /var/log/syslog with:
# tail -f /var/log/syslog
you may need to restart udev, which you can do by doing:
$ sudo /etc/init.d/udev restart
from another terminal window.
this output is very verbose, but you should look to see that your .rules file is being loaded. if not, then that is the issue to fix.
12) if all is ok, and the device has the right permissions, when you put it into application debug mode you should be able to simply start the adb server with:
$ adb devices
and see your device by serial number
List of devices attached
<serialnumber> device
13) if you have problems with adb, here are a few things to check.
a) make sure you see that adb is running, and owned by you by looking for it with ps, e.g.:
$ ps aux |grep adb
you should see a line like:
juser <pid> 0.0 0.1 28160 728 pts/4 Sl 10:18 0:01 adb fork-server server
where juser should be your user id, and <pid> is the process ID.
b) if adb is running as root, you may need to use 'sudo killall adb' to kill it off and then as your user run 'adb devices', which should start the server as you.
c) if you still have problems you can run strace on the server and it's child processes with:
$ strace -f ./tools/adb server
note that the output is very verbose, but look thru there for some kind of permissions problem. lots of 'file not founds' are ok, but as the daemon starts and tries to bind to the device, you may find a permission problem.
hope this helps. sorry to be long winded.
jerichod.
Click to expand...
Click to collapse
this is the image in fastboot mode. I have linux, ubuntu 12.04. anyone have a solution? thanks
what did you even type as the command?
pialletti said:
this is the image in fastboot mode. I have linux, ubuntu 12.04. anyone have a solution? thanks
Click to expand...
Click to collapse
whats your error?
simms22 said:
whats your error?
Click to expand...
Click to collapse
its at the bottom of the image. fastboot command read error.
Zepius said:
its at the bottom of the image. fastboot command read error.
Click to expand...
Click to collapse
ahh, thanks. i must be blind this morning.
ciao. puoi trovare soluzione?: O
I think you've gotta learn your english if you want successful help. What did you input as a fastboot command? e.g."./fastboot XXX"?
bodh said:
I think you've gotta learn your english if you want successful help. What did you input as a fastboot command? e.g."./fastboot XXX"?
Click to expand...
Click to collapse
you're right. My English sucks. but picture speaks for itself. when I connect phone in fastboot mod, I get the page. error. I use Ubunto on the PC. I ask for help. thanks: O
pialletti said:
you're right. My English sucks. but picture speaks for itself. when I connect phone in fastboot mod, I get the page. error. I use Ubunto on the PC. I ask for help. thanks: O
Click to expand...
Click to collapse
You still never gave us the command you typed in terminal
Sent from my Galaxy Nexus using Tapatalk 2
zepius said:
you still never gave us the command you typed in terminal
sent from my galaxy nexus using tapatalk 2
Click to expand...
Click to collapse
hello. Command not typed. Only phone connected to pc in mod fastboot. Other users. Same problem. Fai tour in internet. Enter command and fastboot error.thanks
A couple questions...Has fastboot worked in the past or are you just setting it up? does adb work? I googled if drivers need to be set up for linux. It seems "you need to give your phone permission".
Some of what i've found: "Once downloaded [fastboot] to your desktop, right click and select Properties.
Navigate to the Permissions tab and configure the following option: Execute: [√] Allow executing file as program" - from http://forum.xda-developers.com/showthread.php?t=537508
or http://rootzwiki.com/topic/20770-gu...-adb-and-fastboot-in-linux-ubuntu-and-mint12/ - start reading at "But i doubt it."
or PERHAPS THE BEST RESOURCE: http://developer.android.com/tools/device.html Step 3, third subpoint:
" If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux:
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for Samsung. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules
When plugged in over USB, can verify that your device is connected by executing adb devices from your SDK platform-tools/ directory. If connected, you'll see the device name listed as a "device."
I hope this helps!
bodh said:
A couple questions...Has fastboot worked in the past or are you just setting it up? does adb work? I googled if drivers need to be set up for linux. It seems "you need to give your phone permission".
Some of what i've found: "Once downloaded [fastboot] to your desktop, right click and select Properties.
Navigate to the Permissions tab and configure the following option: Execute: [√] Allow executing file as program" - from http://forum.xda-developers.com/showthread.php?t=537508
or http://rootzwiki.com/topic/20770-gu...-adb-and-fastboot-in-linux-ubuntu-and-mint12/ - start reading at "But i doubt it."
or PERHAPS THE BEST RESOURCE: http://developer.android.com/tools/device.html Step 3, third subpoint:
" If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux:
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for Samsung. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules
When plugged in over USB, can verify that your device is connected by executing adb devices from your SDK platform-tools/ directory. If connected, you'll see the device name listed as a "device."
I hope this helps!
Click to expand...
Click to collapse
thanks response. very kind. I'm not very practical, try I hope to do well. My phone had no the system. problems usb. thing will happen.
Hi friends,
a short tutorial for rooting Ventos 10.1 from simple user Linux Ubuntu, when ADB doesn't recognise the device using Root_with_Restore_by_Bin4ry_v33 from this thread.
Disclaimer: The following rooting guides take software from third-party sources and are not products of danjde. I cannot be held responsible for any effects on your device resulting from this rooting guides. Please attempt only after reading through and understanding the guide(s) and proceed with caution.
ATTENTION: TABLET BATTERY MUST BE CHARGED!!
ALL FROM LINUX CONSOLE/TERMINAL WITHOUT EXTERNAL APPLICATIONS
1) edit from super user editor and add the correct USB Ids to /var/lib/usbutils/usb.ids:
2207 RocketChip
now lsusb should show the device properly
lsusb
Bus 001 Device 012: ID 2207:0010 RocketChip
2) add udev rule in /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="2207", MODE="0666", GROUP="plugdev"
3) restart udev service
service udev reload
4) optionally add vendor id in ~/.android/adb_usb.ini or in the same adb location
0x2207
5) extract the content of Root_with_Restore_by_Bin4ry_v33 and give executions permission to all fro semplicity (compessing whith zip have lost attributes)
chmod -R 755 "extracted-folder"
6) cd into the utility "Root_with_Restore_by_Bin4ry" directory
cd stuff
7) restart adb server
./adb kill-server
./adb start-server
8) connect Ventos and enable usb debugging.
9) now adb devices shows the device.
./adb devices
224DDD88E8722FA848300A20B9F8XXXX device
10) run as normal user
./RunMe.sh
[IMPORTANT: if you obtain on 64bit linux machine: "/stuff/adb: error while loading shared libraries: libncurses.so.5..."
install lib32ncurses5: apt-get install lib32ncurses5 and try again]
11) select normal mode
12) wait until 5 minus
finish!
tested :good:
Dear Danjde,
I habe a Trekstor Surftab Ventos 10.1 that I would like To root.
It appears, however, hat there exist At least 2 Version oft the tablet.
In Android settings it is called ST10216-2A.
Can you confirm your Version?
Also, is it possible To root the device fron a local shell via the same commands AS in the *.SH file?
Thank you so much!
Andreas
Hi der.einstein,
I confirm that two are the ventos 10.1 versions,
mine is the second, and from my research the method shown applies to both models.
For the second question the answer is: no
ciao!
Hello
Need help to write an APP.APK that I can write. When this APP.APK is installed in device
When its executed i expect it to send the adb root command root to the device.
Currently iI plug device to a PC then type
adb root
adb remount
how can I achieve the same from an APP.APK ?
I probably have to bypass the security...please send your comments with details and source code and examples
thanks team
The purpose of this is to use my phone via scrcpy for my sms verification and stuff.
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Any workaround? thanks
I'm using OrangeFox recovery.
VanGreat said:
The purpose of this is to use my phone via scrcpy for my sms verification and stuff.
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Any workaround? thanks
I'm using OrangeFox recovery.
Click to expand...
Click to collapse
Orange Fox has enabled ADB by default. Your screen is broken? How do you know OF has been booted?
VanGreat said:
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Click to expand...
Click to collapse
How did you edit these files? Did you un-/repack the recovery.img inside the downloaded zip?
The prop.default in your ramdisk.img shows:
ro.adb.secure=0
persist.sys.usb.config=adb
Everything seems to be correctly from device's site. No need to edit sth.
No. Somehow I need to access to adb on OS and those settings has been disabled on new rom. As I said i need to access to my sms app
You'd like to patch the setting files via recovery to gain access with ADB in system? USB-debugging is toggled off? Are there already the adb_keys of your PC in /data/misc/adb to allow access?
Yes I need to enable usb debugging through recovery.
I think i have to enable adb first before authorizing my device on /data/misc/adb
We do both via OF:
First you should find the needed setting file and check its permissions for restoring it correctly afterwards (assuming you're already in the device's shell by entering 'adb shell'):
Code:
ls -al /data/system/users/0/settings_global.xml
Note the permissions.
Then leave the device's shell and pull the file:
Code:
exit
adb pull /data/system/users/0/settings_global.xml
Open setting_global.xml with an editor and set the line
Code:
package="com.android.settings" defaultValue="0" defaultSysSet="true" /> <setting id="7676" name="adb_enabled"
to value=1
Push the file back:
Code:
adb push settings_global.xml /data/system/users/0
and check the permissions:
Code:
ls -al /data/system/users/0/settings_global.xml
Authorizing:
On your PC search for
Code:
C:\Users\<USER>\.android\adbkey.pub
copy that file into your ADB folder. Then push it to:
Code:
adb push adbkey.pub /data/misc/adb_keys
and set the permissions:
Code:
adb shell chmod 0640 /data/misc/adb_keys
adb shell chown system:shell /data/misc/adb_keys
okay i'm now on your authorizing part, it now says something but it still says unauthorized on "adb devices"
what i actually did was to flash aosp rom and edit build.prop there and set the adb variables
USB debugging seems to be active. But I don't know why it says unauthorized. Maybe there is another setting related to ADB in settings_global.xml that needs to be activated for Xiaomi devices like yours.
VanGreat said:
what i actually did was to flash aosp rom and edit build.prop there and set the adb variables
Click to expand...
Click to collapse
Do not edit any file but the setting file. You must not change the props.
something wrong with /data encryption. I for sure pushed the adb_keys on /data/misc/adb but when I rebooted at the recovery or system it goes back nothing.
some say this was aosp system as they won't allow /data modification?
Are you able to open /data in OF and do you see the folders/files in there? With the correct names?
If yes, you don't have any problems with encryption
WoKoschekk said:
Are you able to open /data in OF and do you see the folders/files in there? With the correct names?
Click to expand...
Click to collapse
i only saw recovery folder. also gave me "cant mount /data (invalid argument)" when i try to mount it first.
VanGreat said:
i only saw recovery folder. also gave me "cant mount /data (invalid argument)" when i try to mount it first.
Click to expand...
Click to collapse
Then you have no chance to activate ADB and get access to your SMS.
assuming encryption is healthy in boot mode, you can enable usb-debugging and authorize RSA key from either /system or boot, no access to /data needed.
this is for custom ROM by modifying /system
[OTA] ADB-Enabler - Flashable UPDATE.ZIP File
This tool is not meant to be used on Android devices with dm-verify or Android Verify Boot (AVB) enabled Every Android device has a stock recovery installed. That default recovery typically at least offers you the 4 options reboot system now...
forum.xda-developers.com
this is for stock ROM by modifying boot
Accessing my phone with a dead screen
So my phone screen connector was liquid damaged. No touch or display. It's an Essential Phone which supports HDMI output, however I can't unlock it because I don't see the lock screen on the monitor I just see a lock icon. I have...
forum.xda-developers.com
take note (on stock MIUI only) scrcpy won't work on xiaomi devices, com.miui.securitycenter prevents that. unless you have bonded mi account, you can't enable USB debugging (Security settings) in developer options.