fastboot 烧入 img---fastboot配置(解决fastboot no permissions 错误)

来源:互联网 发布:淘宝微淘如何发买家秀 编辑:程序博客网 时间:2024/04/30 22:32

fastboot文件

1.编译后得android源码会在目录:andsource2/out/host/linux-x86/bin产生fastboot文件

添加到环境变量

1.使用vim进入环境变量配置文件:.bashrc

vim ~/.bashrc

2.添加fastboot得环境变量

PATH=$PATH:~/andsource2/out/host/linux-x86/bin
3.保存后,source ~/.bashrc

修改权限

1.fastboot -l devices

出现no permissions         fastboot usb:2-1.x(x是版本,没关系,反正就是没有权限)


2.增加权限将fastboot的所有者属性改成root:

a. which fastboot(命令找到fastboot所在的目录;)

which fastboot
/home/likewise-open/xxxxx/andsource2/out/host/linux-x86/bin/fastboot

b. 然后进入此目录;

c. 再用命令chown改其属性:

sudo chown root:root fastboot

sudo chown root:root fastboot
xxxxxubtpc:~/andsource2/out/host/linux-x86/bin$ ls -l fastboot
-rwxrwxrwx 1 root root 599112 Jun  1 20:13 fastboot


3. 将其权限更改一下:

sudo chmod +s fastboot

sudo chmod +s fastboot
xxxxubtpc:~/andsource2/out/host/linux-x86/bin$ ls -l fastboot
-rwsrwsrwx 1 root root 599112 Jun  1 20:13 fastboot


至此fastboot配置完成,可以进行烧入相应得img文件了。
-------------------------------------------------------------------------------------------------------------------------------

烧入img


fastboot flash cache andsource2/out/target/product/xxxxxxxxxxxxxxx/cache.img
sending 'cache' (5348 KB)...
OKAY [  0.251s]
writing 'cache'...
OKAY [  1.079s]
finished. total time: 1.341s


0 0
原创粉丝点击