postmarketOS

nexus 5

nexu5 刷入最新固件、android系统

步骤0. 使用旧的 platform-tools_r27:

mkdir ~/nexus5; cd ~/nexus5;

#https://android.googlesource.com/platform/tools/google_prebuilts/studio/sdk/remote/+/a66136ae1bfeb1b08a42319158a7652938c648d3
#此页面有:dl.google.com/android/repository/platform-tools_r27.0.1-linux.zip, 此即旧platform-tools_r27下载地址,注意不是该文本的跳转链接

wget dl.google.com/android/repository/platform-tools_r27.0.1-linux.zip
unzip platform-tools_r27.0.1-linux.zip -d .
file `pwd`/platform-tools/fastboot 
#/home/z/nexus5/platform-tools/fastboot: ELF 64-bit LSB shared object
export PATH=`pwd`/platform-tools/:$PATH
which fastboot
#/home/z/nexus5/platform-tools//fastboot

步骤1. nexus5刷入最新固件、android系统 :

#https://zhuanlan.zhihu.com/p/529627165
wget https://dl.google.com/dl/android/aosp/hammerhead-m4b30z-factory-625c027b.zip
unzip  hammerhead-m4b30z-factory-625c027b.zip -d   .
cd hammerhead-m4b30z
pwd #/home/z/nexus5/hammerhead-m4b30z
./flash-all.sh

#注意不要使用ota包. 必须使用factory包

报错解决e1: flash-all.sh中刷android系统报错 Snapshot cancel …

报错详细:

#flash-all.sh中刷android系统步骤 “ fastboot -w update image-hammerhead-m4b30z.zip “ 报错如下:
#Snapshot cancel                                    FAILED (remote: 'unknown command')

解决办法: “步骤0. 使用旧的 platform-tools_r27”

其他说明

flash-all.sh中的内容

#flash-all.sh中的内容

#{刷入固件
fastboot flash bootloader bootloader-hammerhead-hhz20h.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-hammerhead-m8974a-2.0.50.2.30.img
fastboot reboot-bootloader
#}

#{刷入android系统
sleep 5
fastboot -w update image-hammerhead-m4b30z.zip
#}

factory包内容


#wget https://dl.google.com/dl/android/aosp/hammerhead-m4b30z-factory-625c027b.zip
#unzip  hammerhead-m4b30z-factory-625c027b.zip -d   .
pwd #/home/z/nexus5/hammerhead-m4b30z

ls -lh 
总计 595M

#固件
-rw-r----- 1 z z 3.1M 128  2016 bootloader-hammerhead-hhz20h.img
-rw-r----- 1 z z  45M 128  2016 radio-hammerhead-m8974a-2.0.50.2.30.img

#android系统:
-rw-r----- 1 z z 548M 128  2016 image-hammerhead-m4b30z.zip

#脚本:
-rw-r----- 1 z z  974 128  2016 flash-all.bat
-rwxr-x--x 1 z z  845 128  2016 flash-all.sh
-rwxr-x--x 1 z z  798 128  2016 flash-base.sh

nexu5 刷入postmarketOS系统

报错解决

data too big 报错解决

报错data too big 在此步骤:pmbootstrap flasher flash_rootfs --partition userdata

解决: “nexu5 刷入最新固件、android系统”

空间没用上问题解决

userdata 32GB空间没用上 , 问题描述,
问题解决 : 参考本文的“pmaports代码仓库不同分支试错”

nexu5 刷入postmarketOS系统 主步骤

#以下全程插入usb线
fastboot devices 
fastboot getvar all
fastboot erase  userdata
fastboot erase  system
fastboot erase  cache

pmbootstrap init
pmbootstrap install

pmbootstrap flasher flash_rootfs --partition userdata
pmbootstrap flasher flash_kernel
fastboot reboot  #启动完最终停在postmarketOS界面不动,但实际上此时Linux已经正常启动了
ssh z@172.16.42.1  #usb线插好,即可ssh连接Linux

LG nexus 5 安装好 postmarketOS ,

  • htop命令输出:
    在这里插入图片描述

  • uname输出

 uname -a
#Linux lg-hammerhead 6.3.0-postmarketos-qcom-msm8974 #1 SMP PREEMPT Wed May  3 14:38:30 UTC 2023 armv7l Linux

#LG nexus 5 的确是 armv7

连接wifi

sudo nmtui

其他

sudo apk add htop
sudo apk add curl

关闭防火墙

sudo rc-update del nftables
#sudo rc-update nftables stop
sudo reboot

docker安装

sudo apk upgrade
sudo apk update
sudo apk add docker
sudo addgroup z  docker
  • 文件 /etc/docker/daemon.json 内容如下:
{
  "iptables": false
}

sudo rc-update add docker boot
sudo service docker start
sudo service docker status 

lash参考

按这里 Modem 操作,居然说没有modem. 但是nexus5 声称sms是work的,TODO, 有可能是因为没有插手机SIM卡

补充

步骤"pmbootstrap init" 中 用户界面 user interface 选 fbkeyboard 很保险

参考:

  1. Home Assistant on old Smartphone (Nexus5) with PostmarketOS and Docker
  2. Alpine Linux 安装 Docker

oneplus 6

build img : 用v22.12 的 sxmo-de-sway

按住音量大,再按电源 进入fastboot

参考: https://wiki.postmarketos.org/wiki/OnePlus_6_(oneplus-enchilada)

#OnePlus 6 : enchilada
#OnePlus6T : fajita 
fastboot oem unlock
pmbootstrap init
pmbootstrap install

fastboot set_active b
fastboot erase dtbo
pmbootstrap flasher flash_rootfs --partition userdata
pmbootstrap flasher flash_kernel
fastboot reboot
ssh z@172.16.42.1

最终用的: 7e7224f4c16dc646b779271e6cd548840ab8c356(v22.12) 的 sxmo-de-sway

pmaports代码仓库不同分支试错

~/.local/var/pmbootstrap/cache_git/pmaports/.git/config : https://gitlab.com/postmarketOS/pmaports.git

  • f7e12b210dd6bba0f964a63db53afbc265a5384a : 磁盘空间45G, 貌似等一会儿crash了? 此提交在nexus5上好用?

  • 7c03891fab8f5be997038dcbe840624e3252f1a3 : 磁盘空间45G, 黑屏

  • eca86adbf38bea4f885222496375d1391f71e228 (master), 18c04de3f8d03f31332c5ea0e6ff123b0a59445f(v23.06) : 磁盘空间几百MB, 屏亮

  • 7e7224f4c16dc646b779271e6cd548840ab8c356(v22.12) : 磁盘空间45G, 屏亮

    fbkeyboard|console: 电源键不熄屏
    lxqt: 电源键不熄屏, GUI界面正常
    sxmo-de-sway: 电源键熄屏, GUI界面正常(触摸屏本身就坏了,不太确定)

  • cat /proc/cpuinfo : 确实是8核cpu

twrp

#https://eu.dl.twrp.me/enchilada/#google_vignette
wget https://eu.dl.twrp.me/enchilada/twrp-3.7.0_11-0-enchilada.img
fastboot getvar current-slot
#current-slot: a
fastboot flash boot_a twrp-3.7.0_11-0-enchilada.img  #失败,并没有进入twrp
fastboot boot  twrp-3.7.0_11-0-enchilada.img  #估计是自动进入了一加手机的自动恢复

重来 用现成img

##https://images.postmarketos.org/bpo/v23.06/oneplus-enchilada/gnome-mobile/20230821-2134/
##https://www.cnblogs.com/hupo376787/p/16461892.html
fastboot set_active b
fastboot erase dtbo
fastboot flash boot 20230821-2209-postmarketOS-v23.06-sxmo-de-sway-1.14.0-oneplus-enchilada-boot.img
fastboot flash userdata 20230821-2209-postmarketOS-v23.06-sxmo-de-sway-1.14.0-oneplus-enchilada.img
fastboot reboot
#ssh z@172.16.42.1 #sshd默认关闭的 :  https://builds.sr.ht/~postmarketos/job/1045030

安装gcc

   sudo apk add gcc
   sudo apk add g++
   sudo apk add make
   sudo apk add gdb

gcc -dumpmachine
#aarch64-alpine-linux-musl
g++ -dumpmachine
#aarch64-alpine-linux-musl

安装numpy

注意: 直接安装 Miniconda3-py310_23.1.0-1-Linux-aarch64.sh 不成功, 说是有docker image可以用。但不想用docker,所以单独安装

sudo apk add python3-dev
pip install numpy
#  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a0/41  /8f53eff8e969dd8576ddfb45e7ed315407d27c7518ae49418be8ed532b07/numpy-1.25.2.tar.gz (10.8 MB)
#有需要编译的

安装jupyter

报错解决1. linux/version.h: No such file or directory

jupyter中的依赖psutil安装时报错: linux/version.h: No such file or directory, 解决:

sudo apk add linux-headers
#(1/1) Installing linux-headers (5.19.5-r0)

报错解决2. 报错 ffi.h: No such file or directory

报错 ffi.h: No such file or directory, 完整报错:

gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -g -O2 -Os -g -O2 -Os -g -O2 -DTHREAD_STACK_SIZE=0x100000 -fPIC -DFFI_BUILDING=1 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.10 -c c/_cffi_backend.c -o build/temp.linux-aarch64-cpython-310/c/_cffi_backend.o
      c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
         15 | #include <ffi.h>
            |          ^~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1

解决:


sudo apk search libffi 
#libffi-3.4.4-r0
#libffi-doc-3.4.4-r0
#libffi-dbg-3.4.4-r0
#libffi-dev-3.4.4-r0

sudo apk add  libffi libffi-dev

安装jupyter

pip install jupyter

"""
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting jupyter
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/83/df/0f5dd132200728a86190397e1ea87cd76244e42d39ec5e88efd25b2abd7e/jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Collecting ipykernel
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ca/ca/1089ddd8dd3ba03ea593bf20cdc2f7fe02526dcd7d966b7da47aa105e65b/ipykernel-6.25.1-py3-none-any.whl (154 kB)
Collecting jupyter-console
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ca/77/71d78d58f15c22db16328a476426f7ac4a60d3a5a7ba3b9627ee2f7903d4/jupyter_console-6.6.3-py3-none-any.whl (24 kB)
Collecting qtconsole
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/18/3b/7bdbb99256d1406ae6c8904355222c6dc010640e6be158830f48b7097b32/qtconsole-5.4.3-py3-none-any.whl (121 kB)
Collecting ipywidgets
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b8/d4/ce436660098b2f456e2b8fdf76d4f33cbc3766c874c4aa2f772c7a5e943f/ipywidgets-8.1.0-py3-none-any.whl (139 kB)
Collecting nbconvert
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/80/ed/d883918ca3777f744f3373fc63d8af47b47237ca703450a451b3e885264a/nbconvert-7.7.4-py3-none-any.whl (254 kB)
Collecting notebook
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/85/76/51777158391e1784cc5a892ff355fd0a0b0b5189aeffce9baf51f514b9a2/notebook-7.0.2-py3-none-any.whl (4.0 MB)
Requirement already satisfied: tornado>=6.1 in ./.local/lib/python3.10/site-packages (from ipykernel->jupyter) (6.3.3)
Requirement already satisfied: comm>=0.1.1 in ./.local/lib/python3.10/site-packages (from ipykernel->jupyter) (0.1.4)
Requirement already satisfied: traitlets>=5.4.0 in ./.local/lib/python3.10/site-packages (from ipykernel->jupyter) (5.9.0)
Requirement already satisfied: nest-asyncio in ./.local/lib/python3.10/site-packages (from ipykernel->jupyter) (1.5.7)
Collecting ipython>=7.23.1
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/52/d1/f70cdafba20030cbc1412d7a7d6a89c5035071835cc50e47fc5ed8da553c/ipython-8.14.0-py3-none-any.whl (798 kB)
Requirement already satisfied: debugpy>=1.6.5 in ./.local/lib/python3.10/site-packages (from ipykernel->jupyter) (1.6.7.post1)
Requirement already satisfied: psutil in ./.local/lib/python3.10/site-packages (from ipykernel->jupyter) (5.9.5)
Requirement already satisfied: packaging in /usr/lib/python3.10/site-packages (from ipykernel->jupyter) (21.3)
Requirement already satisfied: matplotlib-inline>=0.1 in ./.local/lib/python3.10/site-packages (from ipykernel->jupyter) (0.1.6)
Requirement already satisfied: pyzmq>=20 in ./.local/lib/python3.10/site-packages (from ipykernel->jupyter) (25.1.1)
Collecting jupyter-client>=6.1.12
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/29/24/0491f7837cedf39ae0f96d9b3e4db2fae31cc4dd5eac00a98ab0db996c9b/jupyter_client-8.3.0-py3-none-any.whl (103 kB)
Requirement already satisfied: jupyter-core!=5.0.*,>=4.12 in ./.local/lib/python3.10/site-packages (from ipykernel->jupyter) (5.3.1)
Requirement already satisfied: widgetsnbextension~=4.0.7 in ./.local/lib/python3.10/site-packages (from ipywidgets->jupyter) (4.0.8)
Requirement already satisfied: jupyterlab-widgets~=3.0.7 in ./.local/lib/python3.10/site-packages (from ipywidgets->jupyter) (3.0.8)
Requirement already satisfied: prompt-toolkit>=3.0.30 in ./.local/lib/python3.10/site-packages (from jupyter-console->jupyter) (3.0.39)
Requirement already satisfied: pygments in ./.local/lib/python3.10/site-packages (from jupyter-console->jupyter) (2.16.1)
Collecting beautifulsoup4
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/57/f4/a69c20ee4f660081a7dedb1ac57f29be9378e04edfcb90c526b923d4bebc/beautifulsoup4-4.12.2-py3-none-any.whl (142 kB)
Requirement already satisfied: mistune<4,>=2.0.3 in ./.local/lib/python3.10/site-packages (from nbconvert->jupyter) (3.0.1)
Requirement already satisfied: jinja2>=3.0 in ./.local/lib/python3.10/site-packages (from nbconvert->jupyter) (3.1.2)
Requirement already satisfied: markupsafe>=2.0 in ./.local/lib/python3.10/site-packages (from nbconvert->jupyter) (2.1.3)
Requirement already satisfied: bleach!=5.0.0 in ./.local/lib/python3.10/site-packages (from nbconvert->jupyter) (6.0.0)
Requirement already satisfied: jupyterlab-pygments in ./.local/lib/python3.10/site-packages (from nbconvert->jupyter) (0.2.2)
Collecting nbclient>=0.5.0
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ac/5a/d670ca51e6c3d98574b9647599821590efcd811d71f58e9c89fc59a17685/nbclient-0.8.0-py3-none-any.whl (73 kB)
Requirement already satisfied: pandocfilters>=1.4.1 in ./.local/lib/python3.10/site-packages (from nbconvert->jupyter) (1.5.0)
Collecting nbformat>=5.7
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f4/e7/ef30a90b70eba39e675689b9eaaa92530a71d7435ab8f9cae520814e0caf/nbformat-5.9.2-py3-none-any.whl (77 kB)
Requirement already satisfied: defusedxml in ./.local/lib/python3.10/site-packages (from nbconvert->jupyter) (0.7.1)
Requirement already satisfied: tinycss2 in ./.local/lib/python3.10/site-packages (from nbconvert->jupyter) (1.2.1)
Collecting notebook-shim<0.3,>=0.2
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f4/79/73250372e5bbab63018b41b02d5cc6b395655ec6c1254e477ef7c913aada/notebook_shim-0.2.3-py3-none-any.whl (13 kB)
Collecting jupyter-server<3,>=2.4.0
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/28/d9/4bf2ab8410cdc37f54aadb6cae497b9bc8ae16720d97b762b9bfb7834022/jupyter_server-2.7.2-py3-none-any.whl (375 kB)
Collecting jupyterlab-server<3,>=2.22.1
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a7/0d/6d4eab0391bd4df1c43f308368d5e177b0fa8ac632267222a23b71317091/jupyterlab_server-2.24.0-py3-none-any.whl (57 kB)
Collecting jupyterlab<5,>=4.0.2
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/71/a3/38b9d6492a393dcfdae9e82021655432a9fd6e8f4c03c30a7b55036c0d70/jupyterlab-4.0.5-py3-none-any.whl (9.2 MB)
Requirement already satisfied: ipython-genutils in ./.local/lib/python3.10/site-packages (from qtconsole->jupyter) (0.2.0)
Requirement already satisfied: qtpy>=2.0.1 in ./.local/lib/python3.10/site-packages (from qtconsole->jupyter) (2.3.1)
Requirement already satisfied: webencodings in ./.local/lib/python3.10/site-packages (from bleach!=5.0.0->nbconvert->jupyter) (0.5.1)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3.10/site-packages (from bleach!=5.0.0->nbconvert->jupyter) (1.16.0)
Requirement already satisfied: stack-data in ./.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyter) (0.6.2)
Requirement already satisfied: jedi>=0.16 in ./.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyter) (0.19.0)
Requirement already satisfied: pickleshare in ./.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyter) (0.7.5)
Requirement already satisfied: pexpect>4.3 in ./.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyter) (4.8.0)
Requirement already satisfied: decorator in ./.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyter) (5.1.1)
Requirement already satisfied: backcall in ./.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyter) (0.2.0)
Requirement already satisfied: python-dateutil>=2.8.2 in ./.local/lib/python3.10/site-packages (from jupyter-client>=6.1.12->ipykernel->jupyter) (2.8.2)
Requirement already satisfied: platformdirs>=2.5 in ./.local/lib/python3.10/site-packages (from jupyter-core!=5.0.*,>=4.12->ipykernel->jupyter) (3.10.0)
Requirement already satisfied: send2trash>=1.8.2 in ./.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->notebook->jupyter) (1.8.2)
Collecting jupyter-server-terminals
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ea/7f/36db12bdb90f5237766dcbf59892198daab7260acbcf03fc75e2a2a82672/jupyter_server_terminals-0.4.4-py3-none-any.whl (13 kB)
Collecting jupyter-events>=0.6.0
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/15/0d/3c67f6c432d8085a3cee250e1e235f27b764be90cc2d16fdcc0b1cee9572/jupyter_events-0.7.0-py3-none-any.whl (18 kB)
Requirement already satisfied: overrides in ./.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->notebook->jupyter) (7.4.0)
Requirement already satisfied: prometheus-client in ./.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->notebook->jupyter) (0.17.1)
Requirement already satisfied: websocket-client in ./.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->notebook->jupyter) (1.6.2)
Requirement already satisfied: terminado>=0.8.3 in ./.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->notebook->jupyter) (0.17.1)
Collecting anyio>=3.1.0
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/19/24/44299477fe7dcc9cb58d0a57d5a7588d6af2ff403fdd2d47a246c91a3246/anyio-3.7.1-py3-none-any.whl (80 kB)
Collecting argon2-cffi
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a4/6a/e8a041599e78b6b3752da48000b14c8d1e8a04ded09c88c714ba047f34f5/argon2_cffi-23.1.0-py3-none-any.whl (15 kB)
Requirement already satisfied: tomli in ./.local/lib/python3.10/site-packages (from jupyterlab<5,>=4.0.2->notebook->jupyter) (2.0.1)
Collecting async-lru>=1.0.0
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fa/9f/3c3503693386c4b0f245eaf5ca6198e3b28879ca0a40bde6b0e319793453/async_lru-2.0.4-py3-none-any.whl (6.1 kB)
Collecting jupyter-lsp>=2.0.0
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/8f/b6/a1571e48550855a79898f851f57e5858b00eb36b09ea3b1a8bb65c53a290/jupyter_lsp-2.2.0-py3-none-any.whl (65 kB)
Collecting jsonschema>=4.17.3
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/2b/ff/af59fd34bc4d7ac3e6e0cd1f3c10317d329b6c1aee179e8b24ad9a79fbac/jsonschema-4.19.0-py3-none-any.whl (83 kB)
Requirement already satisfied: requests>=2.28 in ./.local/lib/python3.10/site-packages (from jupyterlab-server<3,>=2.22.1->notebook->jupyter) (2.31.0)
Requirement already satisfied: babel>=2.10 in ./.local/lib/python3.10/site-packages (from jupyterlab-server<3,>=2.22.1->notebook->jupyter) (2.12.1)
Requirement already satisfied: json5>=0.9.0 in ./.local/lib/python3.10/site-packages (from jupyterlab-server<3,>=2.22.1->notebook->jupyter) (0.9.14)
Requirement already satisfied: fastjsonschema in ./.local/lib/python3.10/site-packages (from nbformat>=5.7->nbconvert->jupyter) (2.18.0)
Requirement already satisfied: wcwidth in ./.local/lib/python3.10/site-packages (from prompt-toolkit>=3.0.30->jupyter-console->jupyter) (0.2.6)
Requirement already satisfied: soupsieve>1.2 in ./.local/lib/python3.10/site-packages (from beautifulsoup4->nbconvert->jupyter) (2.4.1)
Requirement already satisfied: sniffio>=1.1 in ./.local/lib/python3.10/site-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->notebook->jupyter) (1.3.0)
Requirement already satisfied: exceptiongroup in ./.local/lib/python3.10/site-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->notebook->jupyter) (1.1.3)
Requirement already satisfied: idna>=2.8 in ./.local/lib/python3.10/site-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->notebook->jupyter) (3.4)
Requirement already satisfied: typing-extensions>=4.0.0 in ./.local/lib/python3.10/site-packages (from async-lru>=1.0.0->jupyterlab<5,>=4.0.2->notebook->jupyter) (4.7.1)
Requirement already satisfied: parso<0.9.0,>=0.8.3 in ./.local/lib/python3.10/site-packages (from jedi>=0.16->ipython>=7.23.1->ipykernel->jupyter) (0.8.3)
Requirement already satisfied: rpds-py>=0.7.1 in ./.local/lib/python3.10/site-packages (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.22.1->notebook->jupyter) (0.9.2)
Collecting jsonschema-specifications>=2023.03.6
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/1c/24/83349ac2189cc2435e84da3f69ba3c97314d3c0622628e55171c6798ed80/jsonschema_specifications-2023.7.1-py3-none-any.whl (17 kB)
Requirement already satisfied: referencing>=0.28.4 in ./.local/lib/python3.10/site-packages (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.22.1->notebook->jupyter) (0.30.2)
Requirement already satisfied: attrs>=22.2.0 in ./.local/lib/python3.10/site-packages (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.22.1->notebook->jupyter) (23.1.0)
Requirement already satisfied: rfc3986-validator>=0.1.1 in ./.local/lib/python3.10/site-packages (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->notebook->jupyter) (0.1.1)
Requirement already satisfied: pyyaml>=5.3 in ./.local/lib/python3.10/site-packages (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->notebook->jupyter) (6.0.1)
Requirement already satisfied: python-json-logger>=2.0.4 in ./.local/lib/python3.10/site-packages (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->notebook->jupyter) (2.0.7)
Requirement already satisfied: rfc3339-validator in ./.local/lib/python3.10/site-packages (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->notebook->jupyter) (0.1.4)
Requirement already satisfied: ptyprocess>=0.5 in ./.local/lib/python3.10/site-packages (from pexpect>4.3->ipython>=7.23.1->ipykernel->jupyter) (0.7.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3.10/site-packages (from requests>=2.28->jupyterlab-server<3,>=2.22.1->notebook->jupyter) (2022.12.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./.local/lib/python3.10/site-packages (from requests>=2.28->jupyterlab-server<3,>=2.22.1->notebook->jupyter) (2.0.4)
Requirement already satisfied: charset-normalizer<4,>=2 in ./.local/lib/python3.10/site-packages (from requests>=2.28->jupyterlab-server<3,>=2.22.1->notebook->jupyter) (3.2.0)
Collecting argon2-cffi-bindings
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/74/2b/73d767bfdaab25484f7e7901379d5f8793cccbb86c6e0cbc4c1b96f63896/argon2_cffi_bindings-21.2.0-cp36-abi3-musllinux_1_1_aarch64.whl (83 kB)
Requirement already satisfied: asttokens>=2.1.0 in ./.local/lib/python3.10/site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyter) (2.2.1)
Requirement already satisfied: executing>=1.2.0 in ./.local/lib/python3.10/site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyter) (1.2.0)
Requirement already satisfied: pure-eval in ./.local/lib/python3.10/site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyter) (0.2.2)
Requirement already satisfied: jsonpointer>1.13 in ./.local/lib/python3.10/site-packages (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.22.1->notebook->jupyter) (2.4)
Collecting isoduration
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7b/55/e5326141505c5d5e34c5e0935d2908a74e4561eca44108fbfb9c13d2911a/isoduration-20.11.0-py3-none-any.whl (11 kB)
Requirement already satisfied: fqdn in ./.local/lib/python3.10/site-packages (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.22.1->notebook->jupyter) (1.5.1)
Requirement already satisfied: webcolors>=1.11 in ./.local/lib/python3.10/site-packages (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.22.1->notebook->jupyter) (1.13)
Requirement already satisfied: uri-template in ./.local/lib/python3.10/site-packages (from jsonschema>=4.17.3->jupyterlab-server<3,>=2.22.1->notebook->jupyter) (1.3.0)
Collecting cffi>=1.0.1
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/2b/a8/050ab4f0c3d4c1b8aaa805f70e26e84d0e27004907c5b8ecc1d31815f92a/cffi-1.15.1.tar.gz (508 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: pycparser in ./.local/lib/python3.10/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->jupyter-server<3,>=2.4.0->notebook->jupyter) (2.21)
Collecting arrow>=0.15.0
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/67/67/4bca5a595e2f89bff271724ddb1098e6c9e16f7f3d018d120255e3c30313/arrow-1.2.3-py3-none-any.whl (66 kB)
Installing collected packages: cffi, beautifulsoup4, async-lru, anyio, jupyter-server-terminals, jupyter-client, jsonschema-specifications, arrow, argon2-cffi-bindings, jsonschema, isoduration, ipython, argon2-cffi, nbformat, ipywidgets, ipykernel, qtconsole, nbclient, jupyter-events, jupyter-console, nbconvert, jupyter-server, notebook-shim, jupyterlab-server, jupyter-lsp, jupyterlab, notebook, jupyter
  DEPRECATION: cffi is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for cffi ... done
Successfully installed anyio-3.7.1 argon2-cffi-23.1.0 argon2-cffi-bindings-21.2.0 arrow-1.2.3 async-lru-2.0.4 beautifulsoup4-4.12.2 cffi-1.15.1 ipykernel-6.25.1 ipython-8.14.0 ipywidgets-8.1.0 isoduration-20.11.0 jsonschema-4.19.0 jsonschema-specifications-2023.7.1 jupyter-1.0.0 jupyter-client-8.3.0 jupyter-console-6.6.3 jupyter-events-0.7.0 jupyter-lsp-2.2.0 jupyter-server-2.7.2 jupyter-server-terminals-0.4.4 jupyterlab-4.0.5 jupyterlab-server-2.24.0 nbclient-0.8.0 nbconvert-7.7.4 nbformat-5.9.2 notebook-7.0.2 notebook-shim-0.2.3 qtconsole-5.4.3

"""

启动jupyter


jupyter-notebook --help-all   | grep -A 5 -B 5  -n localhost
820---ServerApp.ip=<Unicode>
821-    The IP address the Jupyter server will listen on.
822:    Default: 'localhost'

ip address
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 02:00:6f:c8:2a:61 brd ff:ff:ff:ff:ff:ff
    inet 10.0.4.102/24 




oneplus-enchilada:~$  mkdir jupyter_home ; cd jupyter_home/


jupyter-notebook --ServerApp.ip=0.0.0.0
#http://10.0.4.102:8888/tree?token=a64a4677d7fc685531f348599f0d460e0e33056279328623

!uname -a
#Linux oneplus-enchilada 6.3.2-sdm845 #1-postmarketos-qcom-sdm845 SMP PREEMPT Tue May 16 09:19:52 UTC  aarch64 GNU/Linux

import numpy
z=numpy.zeros_like((3,4))
type(z)
#numpy.ndarray


小米note顶配版

高通紧急模式刷机(9008模式): 最终失败

mi-note-pro-leo-china-fastboot-recovery-rom

参考1

qualcomm-hs-usb-qdloader-9008

  1. 按住 音量-, 再按 开机键, 进入fastboot模式,此时oem没有解锁

  2. 下载并安装 高通9008驱动 qualcomm-hs-usb-qdloader-9008/QDLoaderHS_USB_Driver_64bit_Setup.exe

  3. fastboot模式下 进入 高通9008模式fastboot oem edl

在这里插入图片描述

  1. 下载、解压、运行XiaoMiFlash.exe: mi-note-pro-leo-china-fastboot-recovery-rom/MiFlash20220507.zip/XiaoMiFlash.exe

若 点击加载设备 后 报错 找不到路径*/log/*, 则在解压路径 E:\xiaomi_note_leo\MiFlash20220507下新建目录 log,再次打开XiaoMiFlash.exe 即可

9008刷机最终失败,报错:

COM6        System.Exception: configure failed!!!
在 XiaoMiFlash.code.bl.SerialPortDevice.ConfigureDDR(Int32 intSectorSize, Int32 buffer_sectors, String ddrType, Int32 m_iSkipStorageInit)

twrp卡刷:刷机成功

参考: 小米手机刷 TWRP 方法(解决卡米问题)

1. 小米bootload解锁

下载bootload解锁工具: miflash_unlock_7.6.727.43.zip
登录手机号(验证码或密码),以解锁。不要用其他方式登录,否则1004报错。

2. fastboot下刷入TWRP

音量- 、 电源 进入 fastboot, 刷入twrp: fastboot flash recovery TWRP-20171031-3.1.1.0-leo.img

小米note顶配版leo, twrp下载,搜索leo

fastboot reboot

3. twrp下刷入zip包

下载:

  • 下载miui_MINotePro_V9.2.3.0.NXHCNEK_1deef92a66_7.0.zip,

  • 下载Magisk

步骤:

  1. 音量+ 、 电源, 进入twrp,允许修改System分区

  2. 此时电脑上可以看到手机存库空间,

  3. 将Magisk .zip 复制到 手机存储卡根目录, twrp下 安装 该zip

此步骤剔除了小米启动时验证完整性,没有这一步 启动后 停在 “mi” 界面,俗称 “卡米”?

  1. 将刷机包miui_MINotePro_V9.2.3.0.NXHCNEK_1deef92a66_7.0.zip复制到手机存储卡根目录 , twrp 下 安装,选 该zip,…, 重启 , 漫长等待 后 进入android系统。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/90567.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

浅谈泛在电力物联网发展形态与技术挑战

安科瑞 华楠 摘 要&#xff1a;泛在电力物联网是当前智能电网发展的一个方向。首先&#xff0c;总结了泛在电力物联网的主要作用和价值体现&#xff1b;其次&#xff0c;从智能电网各个环节概述了物联网技术在电力领域的已有研究和应用基础&#xff1b;进而&#xff0c;构思并…

最新绕过目标域名CDN进行信息收集技术

绕过目标域名CDN进行信息收集 1&#xff0e;CDN简介及工作流程 CDN&#xff08;Content Delivery Network&#xff0c;内容分发网络&#xff09;的目的是通过在现有的网络架构中增加一层新的Cache&#xff08;缓存&#xff09;层&#xff0c;将网站的内容发布到最接近用户的网…

【C++杂货铺】探索vector的底层实现

文章目录 一、STL1.1 什么是STL?1.2 STL的版本1.3 STL的六大组件 二、vector的介绍及使用2.1 vector的介绍2.2 vector的使用2.2.1 vector的定义2.2.2 vector iterator2.2.3 vector空间增长问题2.2.4 vector增删查改 2.3 vector\<char\> 可以替代 string 嘛&#xff1f; …

数据库连接池druid 的jar包官网下载-最新版下载

进入官网Central Repository: com/alibaba/druid 往下滑 找到最新版点击进入 找到该jar包 点击即可下载

家长如何将ChatGPT成为家庭日常活动的得力助手

人工智能已经在许多领域发挥作用&#xff0c;如播放音乐、关闭灯光和帮助我们更安全地驾驶。那么&#xff0c;在养育孩子方面呢&#xff1f; 使用像ChatGPT这样的应用&#xff0c;家长们可以更好地完成任务&#xff0c;但同时也要了解其中存在的风险。 许多家长表示&#xff…

Java 中使用 ES 高级客户端库 RestHighLevelClient 清理百万级规模历史数据

&#x1f389;工作中遇到这样一个需求场景&#xff1a;由于ES数据库中历史数据过多&#xff0c;占用太多的磁盘空间&#xff0c;需要定期地进行清理&#xff0c;在一定程度上可以释放磁盘空间&#xff0c;减轻磁盘空间压力。 &#x1f388;在经过调研之后发现&#xff0c;某服务…

Python学习笔记_实战篇(二)_django多条件筛选搜索

多条件搜索在很多网站上都有用到&#xff0c;比如京东&#xff0c;淘宝&#xff0c;51cto&#xff0c;等等好多购物教育网站上都有&#xff0c;当然网上也有很多开源的比楼主写的好的多了去了&#xff0c;仅供参考&#xff0c;哈哈 先来一张效果图吧&#xff0c;不然幻想不出来…

【C++】—— c++11新的类功能

目录 &#xff08;一&#xff09;默认成员函数 1、 移动构造函数 2、代码辅助理解 3、移动赋值运算符重载 &#xff08;二&#xff09;default关键字 &#xff08;三&#xff09;delete关键字 &#xff08;四&#xff09;委托构造函数 1、优势 2、缺点 总结 &#x…

基于开源IM即时通讯框架MobileIMSDK:RainbowChat-iOS端v7.0版已发布

关于MobileIMSDK MobileIMSDK 是一套专门为移动端开发的开源IM即时通讯框架&#xff0c;超轻量级、高度提炼&#xff0c;一套API优雅支持 UDP 、TCP 、WebSocket 三种协议&#xff0c;支持 iOS、Android、H5、标准Java、小程序、Uniapp&#xff0c;服务端基于Netty编写。 工程…

Multisim软件安装包分享(附安装教程)

目录 一、软件简介 二、软件下载 一、软件简介 Multisim软件是一款电路仿真和设计软件&#xff0c;由美国国家仪器公司&#xff08;National Instruments&#xff09;开发。它提供了一个交互式的图形界面&#xff0c;使用户能够轻松地构建和仿真电路。以下是Multisim软件的详…

攻防世界-embarrass

原题 解题思路 搜索flag&#xff0c;结果搜不到。 换到kali里看。

【多模态】26、视觉-文本多模态任务超详细介绍 「CLIP/LSeg/ViLD/GLIP/ALBEF/BLIP/CoCa/BEIT」

文章目录 准备知识一、CLIP&#xff1a;不同模态简单对比的方法更适合于图文检索1.1 CLIP 在分割上的改进工作1.1.1 LSeg1.1.2 Group ViT 1.2 CLIP 在目标检测上的改进工作1.2.1 ViLD1.2.2 GLIPv11.2.3 GLIPv2 二、ViLT/ALBEF &#xff1a;多模态融合在 VQA/VR 任务中更重要三、…

mysql 命令行 执行sql文件

方法1 source source file.sql; file.sql : 绝对路径或 相对路径。 方法2 mysql -u xxx -p < file.sql 方法3 MySQLImport 工具 mysqlimport [options] database file_name 其中&#xff0c;database为要导入数据的数据库名&#xff0c;file_name为要导入的SQL文件名。还可以…

后端开发有哪几种语言? - 易智编译EaseEditing

后端开发是构建应用程序的一部分&#xff0c;负责处理服务器端的逻辑、数据库交互和数据处理。有许多编程语言可用于后端开发&#xff0c;以下是一些常见的后端开发语言&#xff1a; Java&#xff1a; Java是一种广泛使用的面向对象编程语言&#xff0c;具有强大的跨平台能力。…

(纯c)数据结构之------>链表(详解)

目录 一. 链表的定义 1.链表的结构. 2.为啥要存在链表及链表的优势. 二. 无头单向链表的常用接口 1.头插\尾插 2.头删\尾删 3.销毁链表/打印链表 4.在pos位置后插入一个值 5.消除pos位置后的值 6.查找链表中的值并且返回它的地址 7.创建一个动态开辟的结点 三.顺序表与链表…

MySQL事务的隔离级别

前置阅读 快速搭建 Linux 学习平台 一、事务的特性 对于事务&#xff0c;我觉得有一句英文描述的非常贴切&#xff1a;All or not, now or never. 事务 &#xff08;Transaction&#xff09;可以说是关系型数据库最重要的特性了。SQL 事务就是一个或者多个 SQL 语句的集合&a…

响应式布局bootstrap使用

响应式布局 学习目标 能够说出响应式原理 能够使媒体查询完成响应式导航 能够使用Bootstrap的栅格系统 能够使用bootstrap的响应式工具 1.响应式原理 1.1响应式开发原理 就是使用媒体查询针对不同宽度的设备进行布局和样式的设置,从而适配不同设备的目的 1.2响应式布局容器…

顺序表之初

欢迎来到我的&#xff1a;世界 希望作者的文章对你有所帮助&#xff0c;有不足的地方还请指正&#xff0c;大家一起学习交流 ! 目录 线性表简介顺序表定义动态顺序表的初始化尾插头插Cheak 判断是否增容尾删&#xff1a;头删&#xff1a;打印在pos位置前插入x删除pos位置的值查…

centos7搭建apache作为文件站后,其他人无法访问解决办法

在公司内网的一个虚拟机上搭建了httpsd服务&#xff0c;准备作为内部小伙伴们的文件站&#xff0c;但是搭建好之后发现别的小伙伴是无法访问我机器的。 于是寻找一下原因&#xff0c;排查步骤如下&#xff1a; 1.netstat -lnp 和 ps aux 先看下端口和 服务情况 发现均正常 2.…

Linux(基础篇一)

Linux基础篇 Linux基础篇一1. Linux文件系统与目录结构1.1 Linux文件系统1.2 Linux目录结构 2. VI/VIM编辑器2.1 vi/vim是什么2.2 模式间的转换2.3 一般模式2.4 插入模式2.4.1 进入编辑模式2.4.2 退出编辑模式 2.5 命令模式 3. 网络配置3.1 网络连接模式3.2 修改静态ip3.3 配置…