answered
2014-06-10 22:38:09 +0200
How to connect to internet from your mobile in Recovery mode
(for (un)installing packages with zypper for example)
If the installation of some patched package or whatever bricked your phone, before reseting it to factory settings maybe you would like to try to reinstalling the official package and then maybe unbrick it. It worked for me after installing a patched lipstick (needed in the past for patchmanager) after update 1.0.7.16 (Saapunki).
NEEDS:
- As Douglas Adams said: DON'T PANIC. Maybe you can repair it without losing anything. I am not responsible for making more damage to your device, I'm just trying to help. If you decide to follow this guide is your responsibility. Don't complain if it explodes and burns your dog.
- A computer with GNU/Linux (Windows and MacOS should work too) and (obviously) an USB port.
- Software for converting your PC in a router (for GNU/Linux iptables is included with the kernel).
- Knowing to use the GNU/Linux terminal.
LET'S GO:
As described above enter
Recovery mode ---> Shell
As described above chroot to Sailfish filesystem:
mkdir /mnt/rootfs
mount /dev/mmcblk0p28 /mnt/rootfs
chroot /mnt/rootfs
(Then I mounted proc sysfs and /dev/pts but probably not needed):
mount /proc
mount /sys
mount /dev/pts
Do in the computer:
Then, to get Internet in the Jolla in Recovery mode in my GNU/Linux I activated package forwarding and a rule of iptables to route the packages received on the computer to Internet (so I converted my computer in a router. There is software to make this also on Windows and maybe on MacOS).
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Again in SailfishOS:
Add in sailfish almost one nameserver (DNS) to /etc/resolv.conf because if not, it can't resolve repo names to IPs (I wrote the Google one in this example, add wich you want, you can add more than one repeating the command with another one):
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
Tell Sailfish that net packages for Internet must go through the computer (which we previously had converted in a router. In this example I assumed that Sailfish IP is 10.42.66.66 and computer IP is 10.42.66.67):
route add default gw 10.42.66.67
Profit! All is ready, you are in your SailfishOS filesystem and you have Internet connection.
In my case, I installed normal lipstick-qt5 so it removes patched one, with: zypper in -f lipstick-qt5
After finishing:
If you mounted sysfs proc and /dev/pts from the chroot, umount them:
umount /proc
umount /sys
umount /dev/pts
Exit from the chroot:
exit
Here I couldn't umount /mnt/rootfs because /sbin/busybox-static and other processes were using it (info got by "lsof /mnt/rootfs" command). I done "killall -15 busybox-static" and telnet recovery mode closed ( I made a stupid killall) and phone rebooted. So maybe you just need to...
Exit the shell and reboot the phone (yes, "exit" command again):
exit
Write 2 and press enter to get option 2 (Reboot) of the recovery menu.
Pray to Saint Ignucius
Hope yours now works!!! Mine did without having to reset it :)
This was originally written at http://talk.maemo.org/showthread.php?p=1428999#post1428999
Microsoft is to operating systems and security what McDonald's to gourmet food and healthy nutrition.
(Javier Ortega Conde (Malkavian))
where i can find the sailfish driver for windows 7 home premium ? i'm unable to install RNDIS driver
redge73 ( 2014-02-01 01:54:59 +0200 )editPlease read the below instructions carefully: FIRST you have to put the phone in recovery mode, THEN connect it to PC and after that install RNDIS driver.
t0mps0 ( 2014-02-01 02:03:17 +0200 )editis already in recovery mode aka fastboot but the unkwown driver is not listed at all, i have Sailfish as unknown and RNDIS fail missing part inf. maybe is Windows 7 Home premium limit the usage of RNDIS driver ?
redge73 ( 2014-02-01 03:01:56 +0200 )editre-tag: added
foss4ever ( 2014-02-01 15:52:44 +0200 )editrecovery-mode
andfactory-reset
what do you do if you have a mac?
wisdomlight ( 2014-02-01 17:46:02 +0200 )edit