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

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

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
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值