{"id":274643,"date":"2023-06-10T04:03:30","date_gmt":"2023-06-09T20:03:30","guid":{"rendered":"https:\/\/lrxjmw.cn\/hmnjsjhlwzdy.html"},"modified":"2023-06-10T04:03:30","modified_gmt":"2023-06-09T20:03:30","slug":"hmnjsjhlwzdy","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/hmnjsjhlwzdy.html","title":{"rendered":"\u7ea2\u7c73note\u65e7\u624b\u673a\u548cLinuxdeploy\u6211\u5728\u5927\u4e00\u4e70\u7684\u624b\u673a"},"content":{"rendered":"

\u5173\u4e8e\u65e7\u624b\u673a\u548cLinux<\/a>deploy<\/p>\n

\u6211\u5728\u5927\u4e00\u4e70\u7684\u65e7\u624b\u673a\u2014\u2014\u7ea2\u7c73note1\u8054\u901a\u63d0\u9ad8\u7248\u672c\uff0c\u603b\u7b97\u5149\u8363\u9000\u5f79\u4e86\u3002\u624b\u673a\u5176\u5b9e\u5f88\u8001\uff0c\u4f462G\u7684\u663e\u5b58\u548c\u80fd\u591f\u6b63\u5e38\u4f7f\u7528\u7684CPU\uff0c\u5176\u5b9e\u4e0d\u80fd100\u5757\u94b1\u56de\u6536\u5b9e\u60e0\u4e86\u7f51\u5e97\uff0c\u6240\u4ee5\u6211\u5c31\u5f00\u59cb\u4e86\u6539\u5efa\u5c0f\u7c73note\u65e7\u624b\u673a\u8ba1\u5212\u3002<\/p>\n

\u81f3\u4e8e\u4e3a\u4f55\u9009\u62e9linuxdeploy\uff0c\u662f\u5728\u6211\u5bf9\u6bd4\u4e86\u4e3b\u6d41\u7684\u89e3\u51b3\u65b9\u6848\u4ee5\u540e\u4f5c\u51fa\u7684\u51b3\u5b9a\u3002<\/p>\n

Android\u624b\u673a\u8fd0\u884cLinux\u7cfb\u7edf<\/a>\u4e3b\u6d41\u65b9\u6848\u4e3a\uff1a<\/p>\n

\u624b\u673a\u65e0root\uff0c\u4f7f\u7528termux\uff1b\u624b\u673aroot\uff0c\u4f7f\u7528Linuxdeploy\u6216\u5219termux\uff1b<\/p>\n

\u56e0\u4e3a\u624b\u673a\u4e0d\u518d\u51c6\u5907\u4f7f\u7528\uff0c\u6240\u4ee5root\u4e5f\u6ca1\u6709\u54ea\u4e9b\u95ee\u9898\uff0c\u5e76\u4e14\u4f1a\u66f4\u4fbf\u6377\u7684\u64cd\u4f5clinux\u7cfb\u7edf\uff0c\u4e0d\u4f1a\u51fa\u73b0\u6743\u9650\u95ee\u9898\u3002\u6240\u4ee5\u6211\u9009\u62e9\u4e86root+linuxdeploy\u3002<\/p>\n

\u5173\u4e8e\u5c0f\u7c73note\u624b\u673aroot<\/p>\n

\u5c0f\u7c73note\u7684\u673a\u578b\u662f\u9b45\u65cfgucci\uff0c\u8fd9\u4e00\u90e8\u4efd\u6bd4\u8f83\u590d\u6742\uff0c\u6700\u4e3b\u8981\u7684\u5c31\u662f\u5237\u4e86\u4e00\u4e2aMIUI\u7684\u5f00\u53d1\u7248\uff0c\u5177\u6709root\u6743\u9650\u3002\u5176\u4f59\u4ee5\u540e\u518d\u8865\u5145\u2026<\/p>\n

\u5173\u4e8eBusybox<\/p>\n

BusyBox\u662f\u4e00\u4e2a\u96c6\u6210\u4e86\u4e09\u767e\u591a\u4e2a\u6700\u5e38\u7528Linux\u547d\u4ee4<\/a>\u548c\u5de5\u5177\u7684\u8f6f\u4ef6\u3002\u8fd9\u662f\u767e\u5ea6\u767e\u79d1\u4e0a\u7684\u8bdd\uff0c\u76ee\u524d\u7684\u63a5\u89e6\u6765\u770b\uff0cBusybox\u662f\u4e00\u4e2alinux\u7684\u51fd\u6570\u5e93\uff0c\u4e0a\u9762\u6709\u597d\u591aAndroid\u672c\u8eab\u6ca1\u6709\u7684\uff0c\u4f46linux\u987b\u8981\u7684\u5de5\u5177\u548c\u51fd\u6570\u3002<\/p>\n

\u4ece\u767e\u5ea6\u5e94\u7528\u6216\u5219\u5176\u4ed6\u9014\u5f84\u4e0b\u8f7dBusybox\u7684apk\uff0c\u76f4\u63a5\u5b89\u88c5\uff0c\u4e4b\u540e\u6253\u5f00\u8be5app\uff0c\u70b9\u51fbinstall\u5373\u53eflinux\u57f9\u8bad\u673a\u6784\uff0c\u8be5app\u987b\u8981root\u3002<\/p>\n

\u5b89\u88c5linuxdeploy<\/p>\n

\u4e0b\u8f7dlinuxdeploy\u7684apk\uff08\u6211\u662f\u4ece\u767e\u5ea6\u5e94\u7528\uff09\uff0c\u5b89\u88c5\u4ee5\u540e\u6388\u6743root\u3002\u7136\u540e\u6253\u5f00linuxdeploy\u7684\u754c\u9762\u5927\u7ea6\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n

android\u624b\u673a\u5237linux\u7cfb\u7edf\u4e0b\u8f7d\u5b98\u7f51_\u600e\u4e48\u5728\u4e09\u661f\u5b98\u7f51\u4e0b\u8f7d\u624b\u673a\u7cfb\u7edf_android\u624b\u673a\u5237linux<\/p>\n

\u70b9\u51fb\u4e0b\u8fb9\u7684\u90a3\u79cd\u4e0b\u8f7d\u7684\u6309\u952e\uff0c\u7136\u540e\u6b65\u5165\u914d\u7f6e\uff0c\u6211\u7684\u5177\u4f53\u914d\u7f6e\u662f\uff1a<\/p>\n

\u5bf9\uff0c\u6ca1\u9519\uff0c\u6211\u5b89\u88c5\u7684\u662fdebian\u7cfb\u7edf\uff0c\u4f46\u662f\u5b89\u88c5\u4e86\u684c\u9762\u7248\u672c\u3002<\/p>\n

\u5176\u4e2d\uff0c\u4e00\u5b9a\u8981\u5bb9\u8bb8ssh\u542f\u52a8\uff08\u52fe\u9009\uff09\uff0c\u6211\u7684\u76ee\u5f55\u662f\u81ea\u5b9a\u7684\/data\/local\/linux\uff1b\u4e00\u5b9a\u8981\u5728\u76f8\u5e94\u76ee\u5f55\u4e0b\u521b\u5efa\u597d\u6587\u4ef6\u5939\uff0c\u4e0d\u7136\u8fd8\u4f1a\u51fa\u73b0\u5206\u533a\u9519\u8bef\u3002<\/p>\n

\u7528\u6237\u540d\u548c\u5bc6\u7801\u81ea\u5df1\u8bbe\u7f6e\u5427\uff0c\u522b\u76f4\u63a5\u6284\u4e86\uff0c\u5176\u5b9e\u76f4\u63a5\u6284\u4e5f\u884c\u3002\u3002\u3002<\/p>\n

\u4e4b\u540e\u70b9\u51fb\u6700\u4e0a\u65b9\u7684\u5b89\u88c5\u3002\u7b49\u5f85\u5b89\u88c5\uff0c\u901a\u5e38\u6765\u8bf4\uff0c\u7b49\u5f85\u90fd\u4f1a\u597d\uff0c\u5176\u5b9e\u4e5f\u6709\u53ef\u80fd\u4f1a\u78b0\u5230\u5751\uff0c\u53ef\u4ee5\u5728\u4e0b\u65b9\u7559\u8a00\u3002<\/p>\n

\u5b89\u88c5connctBot<\/p>\n

\u5176\u5b9e\uff0c\u4f60\u6709\u5176\u4ed6\u7684ssh\u8054\u63a5\u5f62\u5f0f\u4e5f\u53ef\u4ee5\uff0c\u6211\u9009\u62e9\u4e86\u4e00\u4e2a\u514d\u8d39\u7684ssh\u8054\u63a5\u5e94\u7528\uff0c\u4e5f\u662f\u5728\u767e\u5ea6\u5e94\u7528\u4e2d\u4e0b\u7684apk\u3002<\/p>\n

\u5b89\u88c5\u6210\u529f\u540e\u914d\u7f6e\uff1a<\/p>\n

\u867d\u7136\u6700\u4e3b\u8981\u7684\u5c31\u662f\uff08\u7528\u6237\u540d@\u4e3b\u673a\u540d:\u7aef\u53e3\uff09\uff0c\u4e3b\u673a\u540d\u901a\u5e38\u662flocalhost\uff0c\u7aef\u53e3\u662f22\uff1b\u5176\u4ed6\u7684\u81ea\u5df1\u770b\u7740\u586b\u5427\u3002<\/p>\n

\u7136\u540e\u5c31\u53ef\u4ee5\u8f93\u5165\u8bbe\u5b9a\u597d\u7684linux\u5bc6\u7801\uff0c\u5c31\u53ef\u4ee5\u6109\u5feb\u5730\u6253\u95f9Linux\u4e86\u3002<\/p>\n

\u5176\u5b9e\u4f60\u8981\u4f7f\u7528\u56fe\u5f62\u754c\u9762\u7684\u8bdd\uff0c\u5c31\u4e0b\u8f7d\u4e00\u4e2aVNCViewer\uff08\u624b\u673a\u3001\u7535\u8111\u90fd\u884c\uff09\uff0c\u7aef\u53e3\u662f5900<\/p>\n

\u5c40\u57df\u7f51\u5185\u63a7\u5236Linux<\/p>\n

\u5047\u5982\u60f3\u8981\u5728\u7b14\u8bb0\u672c\u4e0a\u76f4\u63a5\u63a7\u5236\u624b\u673a\u7aef\u7684linux\u65f6\uff0c\u53ef\u4ee5\u5728\u7b14\u8bb0\u672c\u4e0a\u4e0b\u8f7dputty\u548cVNCViewer\uff0c\u53ef\u4ee5\u5206\u522b\u7528\u547d\u4ee4\u884c\u548c\u56fe\u5f62\u754c\u9762\u63a7\u5236Linux\u3002<\/p>\n

\u8981\u5728\u5c40\u57df\u7f51\u5916\u63a7\u5236linux\u7684\u8bdd\uff0c\u987b\u8981\u5916\u7f51\u7a7f\u900f\uff0c\u53ef\u4ee5\u7f51\u4e0a\u67e5\u627e\u76f8\u5173\u8d44\u6599\u3002<\/p>\n

\u800c\u60f3\u8981\u7684\u5c40\u57df\u7f51\u4e2d\u63a7\u5236linux\u7684\u8bdd\uff0c\u9996\u5148\u8981\u4fdd\u8bc1\u7b14\u8bb0\u672c\u548c\u624b\u673a\u5728\u540c\u4e00\u4e2a\u5c40\u57df\u7f51\u4e2d\uff08\u53ef\u4ee5\u5728\u540c\u4e00\u4e2awifi\u4e0b\uff0c\u4e5f\u53ef\u4ee5\u6253\u5f00\u624b\u673a\u70ed\u70b9\uff0c\u8ba9\u7b14\u8bb0\u672c\u8fde\u4e0a\uff09\u3002<\/p>\n

\u73b0\u4eca\u624b\u673a\u7aef\u6253\u5f00connectBox\uff0c\u767b\u9646linux\uff0c\u67e5\u770b\u624b\u673a\u5728\u5c40\u57df\u7f51\u4e2d\u7684ip\uff1a<\/p>\n

\n

ifconfig\n<\/code><\/pre>\n<\/p>\n

\u8fd9\u662f\u8f93\u51fa\uff1a<\/p>\n

\u5176\u4e2d\u4ee5192.168\u5f00\u5934\u7684ipandroid\u624b\u673a\u5237linux\u7cfb\u7edf\u4e0b\u8f7d\u5b98\u7f51<\/strong>\uff0c\u5f88\u6709\u53ef\u80fd\u662f\u8be5\u624b\u673a\u7684\u5916\u7f51ip\uff0c\u53ef\u4ee5\u8bd5\u8bd5\uff0c\u901a\u5e38\u662f\uff08wlan0\uff09\u3002<\/p>\n

\u4f8b\u5982\u6211\u5982\u4eca\u662f192.168.43.171\uff0c\u5728\u7b14\u8bb0\u672c\u7684putty\u4e2d\u8f93\u5165\uff1a<\/p>\n

\u6210\u529f\uff1a<\/p>\n

\u800c\u5728VNCViewer\uff08\u7b14\u8bb0\u672c\uff09\u4e2d\u8f93\u5165\u4e00\u6837\u7684ip\uff0c\u5219\u4f1a\u51fa\u73b0\uff1a<\/p>\n

\u6210\u529f\uff01<\/p>\n

\u5173\u4e8epython\u7684pip\u6e90\u95ee\u9898<\/p>\n

\u6211\u4f7f\u7528\u7684debian\u81ea\u5e26apt-get\uff0c\u540c\u65f6\u81ea\u5e26python2.7\uff0c\u56e0\u4e3a\u5c1d\u8bd5\u4e86\u597d\u591a\u6b21\u53ea\u80fd\u5b89\u88c5python3.2\uff0c\u9042\u820d\u5f03python3\u7cfb\u5217\uff0c\u4e13\u5fc3python2.7\u3002<\/p>\n

\u9996\u5148\u662f\u5b89\u88c5pip\uff1a<\/p>\n

\n

sudo apt-get install python-pip\n<\/code><\/pre>\n<\/p>\n

\u5b89\u88c5\u6210\u529f\u540e\u53ef\u4ee5\u7528pip\u5b89\u88c5\u5404\u7c7bpackageandroid\u624b\u673a\u5237linux\u7cfb\u7edf\u4e0b\u8f7d\u5b98\u7f51<\/strong>\uff0c\u4f8b\u5982\uff1arequests\uff0clxml\u7b49\u3002\u4e0b\u8fb9\u4ee5requests\u4e3a\u4f8b\uff1a<\/p>\n

\n

sudo pip install requests\n<\/code><\/pre>\n<\/p>\n

\u4f46\u662f\u5728\u6211\u7684\u7cfb\u7edf\u4e0a\u51fa\u73b0\u4e86\uff1aCannotfetchindexbaseURL\u9519\u8bef\u63d0\u793a\u3002<\/p>\n

\u8fd9\u65f6\u4faf\u6211\u7684\u89e3\u51b3\u65b9\u6cd5\u662f\u66f4\u6539\u6e90\uff1a<\/p>\n

\n

 sudo pip install requests -i http:\/\/pypi.douban.com\/simple\n<\/code><\/pre>\n<\/p>\n

\u6216\u5219<\/p>\n

\n

sudo pip install requests -i http:\/\/pypi.douban.com\/simple --trusted-host pypi.douban.com\n<\/code><\/pre>\n<\/p>\n

\u5173\u4e8eVNCViewer\u672a\u80fd\u767b\u5165\u7684\u95ee\u9898<\/p>\n

\u6211\u4e8e2019\u5e742\u67082\u65e5\u91cd\u65b0\u5b89\u88c5\u4e86\u7cfb\u7edf\uff0c\u76ee\u524d\u6765\u770b\u5927\u673a\u7387\u662f\u5bc6\u7801\u7684\u95ee\u9898\uff0c\u800c\u4e0d\u662f\u6ca1\u6709\u5f00\u542fvncserver\uff0c\u6240\u4ee5\u4f60\u4eec\u53ef\u4ee5\u76f4\u63a5\u770b\u89e3\u51b3\u65b9\u5f0f2\uff1b<\/p>\n

\u8fd9\u4e2a\u65f6\u4faf\u6709\u4e24\u79cd\u53ef\u80fd\uff1a<\/p>\n

\u6ca1\u6709\u5f00\u542fvncserver\uff08\u6211\u4fdd\u6301\u6000\u7591\uff1f\u4f60\u4eec\u53ef\u4ee5\u5148\u5c1d\u8bd52\uff09vnc\u7684password\u8f93\u5165\u9519\u8bef\u3002<\/p>\n

\u89e3\u51b31\u7684\u95ee\u9898\u53ef\u4ee5\u53c2\u8003\uff1a<\/p>\n

\u90a3\u4f4d\u5927\u9cc4\u7684\u535a\u5ba2\uff0c\u6211\u53c2\u8003\u4e86\uff0c\u4f46\u6ca1\u6709\u771f\u6b63\u89e3\u51b3linux\u7a7a\u95f4\uff0c\u4f46\u81f3\u4e8e\u5b83\u5bf9\u6211\u540e\u7eed\u7684\u6210\u529f\u662f\u5426\u6709\u94fa\u57ab\uff0c\u8fd9\u786e\u5b9e\u4e0d\u6653\u5f97\u4e86\uff0c\u4f60\u4eec\u53ef\u4ee5\u5148\u67e5\u770b2\u7684\u95ee\u9898\u89e3\u51b3\u3002<\/p>\n

\u5982\u679c\u6253\u5f00\u4e86\u591a\u4e2avncserver\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a<\/p>\n

\n

vncserver -kill :1\n<\/code><\/pre>\n<\/p>\n

android\u624b\u673a\u5237linux_\u600e\u4e48\u5728\u4e09\u661f\u5b98\u7f51\u4e0b\u8f7d\u624b\u673a\u7cfb\u7edf_android\u624b\u673a\u5237linux\u7cfb\u7edf\u4e0b\u8f7d\u5b98\u7f51<\/p>\n

\u5173\u63891\u53f7vncserver\u3002<\/p>\n

\u89e3\u51b32\u7684\u95ee\u9898\u53ef\u4ee5\u901a\u8fc7\u91cd\u8bbevnc\u7684password\uff1a<\/p>\n

\n

cd \/root\/.vnc\/\nrm -rf passwd\n<\/code><\/pre>\n<\/p>\n

\u4e4b\u540e\u5b83\u8fd8\u4f1a\u8ba9\u4f60\u91cd\u8bbepassword\u3002<\/p>\n

\u5018\u82e5\u51fa\u73b0\u8be5\u6587\u4ef6\u4e0d\u5b58\u5728\u8fd9\u6837\u7684\u9519\u8bef\uff0c\u76f4\u63a5\u8f93\u5165\uff1a<\/p>\n

\n

vncpasswd\n<\/code><\/pre>\n<\/p>\n

\u90fd\u4f1a\u51fa\u73b0\u8f93\u5165\u5bc6\u7801\u548c\u9a8c\u8bc1\u5bc6\u7801\u3002<\/p>\n

\u5c55\u793a\u4e00\u4e0b\u6211\u7684\u5c0f\u6210\u679c\uff1a<\/p>\n

\u7136\u540e\u6211\u53c8\u91cd\u65b0\u5b89\u88c5\u4e86\u7cfb\u7edf\uff0c\u4e4b\u524d\u7684\u7cfb\u7edf\u662fdebian\u7684wheezy\uff0c\u8fd9\u4e2a\u7248\u672c\u7684debian\u641e\u5f97\u6211\u5fc3\u529b\u6194\u60b4\uff0c\u6ca1\u6709apt\u6ca1\u6709\uff0cpython3\uff0c\u540e\u6765\u5b89\u88c5\u4e86python3\u4f46\u53ea\u80fd\u662fpython3.2\uff0c\u771f\u7684\u70b8\u3002<\/p>\n

\u540e\u6765\u7684\u7248\u672c\u662fubuntu\u7684trusty\uff0c\u8fd9\u4e2a\u7248\u672c\u81ea\u5e26\u4e86apt\u4ee5\u53capython3\uff0c\u8fd8\u6709\u4e00\u4e9b\u5176\u4ed6\u7684\u4e1c\u897f\uff0c\u7b80\u76f4\u751c\u6ecb\u6ecb\u3002<\/p>\n

\u8fd9\u662f\u6211\u6700\u540e\u7684\u5c0f\u6210\u679c\uff0c\u52a0\u4e2a\u84dd\u7259\u9f20\u6807\u7b80\u76f4\u751c\u6ecb\u6ecb\uff1a<\/p>\n

\u6700\u540e\uff0c\u5f3a\u70c8\u63a8\u8350\u5728linuxdeploy\u4e2d\u5e38\u5f00\u7740\u5c4f\u5e55\uff0c\u5f00\u7740\u5c4f\u5e55\u548c\u5173\u6389\u5c4f\u5e55\u7684\u8fd0\u884c\u901f\u7387\uff0c\u7b80\u76f4\u662f\u5929\u58e4\u4e4b\u522b\uff0c\u751a\u81f3\u67095~10\u500d\u7684\u5dee\u522b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5f53\u7136\u4f60\u8981\u4f7f\u7528\u56fe\u5f62\u754c\u9762\u7684\u8bdd\uff0c\u5c31\u4e0b\u8f7d\u4e00\u4e2aVNCViewer\uff08\u624b\u673a\u3001\u7535\u8111\u90fd\u884c\uff09\uff0c\u7aef\u53e3\u662f5900\u5982\u679c\u60f3\u8981\u5728\u7535\u8111\u4e0a\u76f4\u63a5\u63a7\u5236\u624b\u673a\u7aef\u7684linux\u65f6\uff0c\u53ef\u4ee5\u5728\u7535\u8111\u4e0a\u4e0b\u8f7dputty\u548cVNCViewer\uff0c\u53ef\u4ee5\u5206\u522b\u7528\u547d\u4ee4\u884c\u548c\u56fe\u5f62\u754c\u9762\u63a7\u5236Linux\u3002\u73b0\u5728\u624b\u673a\u7aef\u6253\u5f00connectBox\uff0c\u767b\u5f55linux\uff0c\u67e5\u770b\u624b\u673a\u5728\u5c40\u57df\u7f51\u4e2d\u7684ip\uff1a<\/p>\n","protected":false},"author":1,"featured_media":274644,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-274643","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/274643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=274643"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/274643\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/274644"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=274643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=274643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=274643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}