【remount issue on android 7.0】观书散遗帙,探古穷至妙。这篇文章主要讲述remount issue on android 7.0相关的知识,希望能为你提供帮助。
http://blog.chinaunix.net/uid-23141914-id-5754416.html
最近在新版本的android 7.0上,发现filesystem的remount老是报“
Device or resource busy”的错误。
最终发现,android 7.0上,从原来的toolbox切换到toybox。
- :/ $ ls -al /system/bin/mount
- lrwxr-xr-x 1 root shell 6 2016-09-02 16:23 /system/bin/mount -> toybox
- // For remount we need _last_ match (in case of overmounts), so traverse
- // in reverse order. (Yes I‘m using remount as a boolean for a bit here,
- // the double cast is to get gcc to shut up about it.)
- remount = (void *)(long)comma_scan(opts, "remount", 1);
- if (((toys.optflags & FLAG_a) & & !access("/proc/mounts", R_OK)) || remount) {
- mm = dlist_terminate(mtl = mtl2 = xgetmountlist(0));
- if (remount) remount = mm;
- }
- // check all instances of opt and "no"opt in optlist, return true if opt
- // found and last instance wasn‘t no. If clean, remove each instance from list.
- int comma_scan(char *optlist, char *opt, int clean)
- {
- int optlen = strlen(opt), len, no, got = 0;
- if (optlist) for (; ; ) {
- char *s = comma_iterate(& optlist, & len);
- if (!s) break;
- no = 2*(*s == ‘n‘ & & s[1] == ‘o‘);
- if (optlen == len-no & & !strncmp(opt, s+no, optlen)) {
- got = !no;
- if (clean & & optlist) memmove(s, optlist, strlen(optlist)+1);
- }
- }
- return got;
- }
把命令重新改为 mount -t vfat -o rw,remount /firmware 就好了。
关于remount的说明在help里面根本没有,真是坑!
推荐阅读
- Mac androidStudio cannot resolve corresponding JNI function
- Android RxVolley = Volley + RxJava + OkHttp
- Web App 分层架构(基于 Vue+Router+Vuex)
- spring配置文件ApplicationContext.xml里面class等没有提示功能
- AndroidStudio2.2 cMake方式创建jni工程
- Android签名机制---签名过程
- 在安卓手机上通过虚拟机运行Windows XP
- Android零基础入门第74节(Activity启动和关闭)
- Android入门