ATENÇÃO: antes de continuar lendo este artigo, deixo claro que o leitor deste texto é responsável por qualquer problema que venha a acontecer com o seu aparelho, logo:
SENDO DE SUA INTEIRA RESPONSABILIDADE E RISCO A UTILIZAÇÃO DAS INSTRUÇÕES CONTIDA NESTE DOCUMENTO.
Primeiramente o requisito obrigatório são os utilitários
adb e
fastboot instalados na sua distribuição
Linux, então antes de continuar, constate as respectivas instalações.
A instalação começa com o desbloqueio do seu equipamento, plugue o cabo USB, habilite o modo desenvolvedor no seu Android, então com os binários adb e fastboot instalados, siga as instruções a abaixo com os comandos mencionados. Primeiramente crie a pasta /tmp/ubuntutouchinstall baseado o exemplo a seguir:
mkdir /tmp/ubuntutouchinstall
$ cd /tmp/ubuntutouchinstall
Agora já na pasta Ubuntu Touch recém-criada, com os comandos a seguir, efetue o download e checagem da assinatura sha256 dos arquivos de imagem do Ubuntu Touch para a instalação posterior:
wget http://cdimage.ubports.com/devices/recovery-hammerhead.img -O recovery.img && echo "91b681a3287808a79e21c2ac17f85537c6c9b23fb009b5e491c2ccf28986856c recovery.img" | sha256sum -c
$ wget http://cdimage.ubports.com/devices/boot-hammerhead.img -O boot.img && echo "3f39372bdac0a6a8bd6507683a87da16e74346152525e12d6ea46418a88c62c3 boot.img" | sha256sum -c
$ mkdir pool gpg
$ wget https://system-image.ubports.com//pool/ubports-8832267993eb0215232c953d6c5fa7f22ab2fe348b4e68946b098b6bdc19830c.tar.xz -O pool/ubports-8832267993eb0215232c953d6c5fa7f22ab2fe348b4e68946b098b6bdc19830c.tar.xz && echo "ea28cf38978a1fc1e96c51f2d986e4202b8867d3410621469ed5cbc08addca29 pool/ubports-8832267993eb0215232c953d6c5fa7f22ab2fe348b4e68946b098b6bdc19830c.tar.xz" | sha256sum -c
$ wget https://system-image.ubports.com//pool/ubports-8832267993eb0215232c953d6c5fa7f22ab2fe348b4e68946b098b6bdc19830c.tar.xz.asc -O pool/ubports-8832267993eb0215232c953d6c5fa7f22ab2fe348b4e68946b098b6bdc19830c.tar.xz.asc && echo OK
$ wget https://system-image.ubports.com//pool/device-add1def5b822ab3d83c427d6bfabb0330aef9f8f12beda00cd7ba0cd227359e4.tar.xz -O pool/device-add1def5b822ab3d83c427d6bfabb0330aef9f8f12beda00cd7ba0cd227359e4.tar.xz && echo "fa437c2b6ef63e923e9e8cd6799a950273c646af58d43df756eec8ec137a8dff pool/device-add1def5b822ab3d83c427d6bfabb0330aef9f8f12beda00cd7ba0cd227359e4.tar.xz" | sha256sum -c
$ wget https://system-image.ubports.com//pool/device-add1def5b822ab3d83c427d6bfabb0330aef9f8f12beda00cd7ba0cd227359e4.tar.xz.asc -O pool/device-add1def5b822ab3d83c427d6bfabb0330aef9f8f12beda00cd7ba0cd227359e4.tar.xz.asc && echo OK
$ wget https://system-image.ubports.com//pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz -O pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz && echo "5b6e870acf8944330acb2a9dad6f5270bd06c377603a3115f805290e989ab421 pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz" | sha256sum -c
$ wget https://system-image.ubports.com//pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz.asc -O pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz.asc && echo OK
$ wget https://system-image.ubports.com//ubports-touch/16.04/stable/hammerhead/version-8.tar.xz -O pool/version-8.tar.xz && echo "7b68df45dd80819dc78b42dc4cb21e2652cb7b24c5addbefd5e6c3e0abb3558d pool/version-8.tar.xz" | sha256sum -c
$ wget https://system-image.ubports.com//ubports-touch/16.04/stable/hammerhead/version-8.tar.xz.asc -O pool/version-8.tar.xz.asc && echo OK
$ wget https://system-image.ubports.com/gpg/image-signing.tar.xz -O gpg/image-signing.tar.xz && echo OK
$ wget https://system-image.ubports.com/gpg/image-signing.tar.xz.asc -O gpg/image-signing.tar.xz.asc && echo OK
$ wget https://system-image.ubports.com/gpg/image-master.tar.xz -O gpg/image-master.tar.xz && echo OK
$ wget https://system-image.ubports.com/gpg/image-master.tar.xz.asc -O gpg/image-master.tar.xz.asc && echo OK
Nesta etapa, com os comandos a seguir, reiniciaremos o celular para entrar no modo bootloader e desbloquearemos o equipamento:
# adb reboot-bootloader
# fastboot oem unlock
Agora limparemos a partição cache, userdata e system.
# fastboot format cache
# fastboot reboot-bootloader
# fastboot format userdata
# fastboot format system
Agora gravaremos a nova imagem de boot e recovery.
# fastboot flash recovery recovery.img
# fastboot flash boot boot.img
Crie um arquivo commandfile com o seguinte conteúdo:
format system
load_keyring image-master.tar.xz image-master.tar.xz.asc
load_keyring image-signing.tar.xz image-signing.tar.xz.asc
mount system
update ubports-8832267993eb0215232c953d6c5fa7f22ab2fe348b4e68946b098b6bdc19830c.tar.xz ubports-8832267993eb0215232c953d6c5fa7f22ab2fe348b4e68946b098b6bdc19830c.tar.xz.asc
update device-add1def5b822ab3d83c427d6bfabb0330aef9f8f12beda00cd7ba0cd227359e4.tar.xz device-add1def5b822ab3d83c427d6bfabb0330aef9f8f12beda00cd7ba0cd227359e4.tar.xz.asc
update keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz.asc
update version-8.tar.xz version-8.tar.xz.asc
unmount system
Reinicie o equipamento e entre no modo RECOVERY selecionando o botão de volume down durante o pressionamento do botão power.
Agora execute os comandos a seguir:
adb shell "mount -a" # You might see some errors from this command, that's ok.
adb shell "mkdir -p /cache/recovery"
$ adb push pool/ubports-8832267993eb0215232c953d6c5fa7f22ab2fe348b4e68946b098b6bdc19830c.tar.xz /cache/recovery/
$ adb push pool/ubports-8832267993eb0215232c953d6c5fa7f22ab2fe348b4e68946b098b6bdc19830c.tar.xz.asc /cache/recovery/
$ adb push pool/device-add1def5b822ab3d83c427d6bfabb0330aef9f8f12beda00cd7ba0cd227359e4.tar.xz /cache/recovery/
$ adb push pool/device-add1def5b822ab3d83c427d6bfabb0330aef9f8f12beda00cd7ba0cd227359e4.tar.xz.asc /cache/recovery/
$ adb push pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz /cache/recovery/
$ adb push pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz.asc /cache/recovery/
$ adb push pool/version-8.tar.xz /cache/recovery/
$ adb push pool/version-8.tar.xz.asc /cache/recovery/
$ adb push gpg/image-signing.tar.xz /cache/recovery/
$ adb push gpg/image-signing.tar.xz.asc /cache/recovery/
$ adb push gpg/image-master.tar.xz /cache/recovery/
$ adb push gpg/image-master.tar.xz.asc /cache/recovery/
$ adb push commandfile /cache/recovery/ubuntu_command
Para finalizar execute este comando e pronto:
# adb reboot recovery
A seguir um vídeo demonstrando a execução passo a passo.
Autor: Alessandro de Oliveira Faria (cabelo@opensuse.org)
Embaixador openSUSE Linux America Latina
Membro openSUSE http://pt.opensuse.org/Utilizador:Cabelo
Membro Mozillians https://mozillians.org/pt-BR/u/cabelo/
Membro Owasp http://tinyurl.com/owasp-member
Membro Area31 HackerSpace http://tinyurl.com/HackerSpace-Member
Membro FOCA Linux http://tinyurl.com/guia-foca-linux
Membro Educatux https://www.educatux.com.br/pessoas
Membro Intel Innovator https://tinyurl.com/intel-innovator
Membro OpenCV https://tinyurl.com/membro-opencv
Membro Viva O Linux https://www.vivaolinux.com.br/~cabelo