Benutzer-Werkzeuge

Webseiten-Werkzeuge


wiki:jolla

Dies ist eine alte Version des Dokuments!


Jolla Phone

Jolla Phone aus Finnland mit Sailfish OS

Software- /Paketverwaltung

Weitere Hilfen anzeigen zu pkcon. Ausführlichere Hilfe als pkcon -h

pkcon --filter x

Nach search kommt zunächst ein Themen-Gebiet nach was genau gesucht werden soll, search [name|details|group|file] [data]

pkcon search name play

System Infos

/ # fdisk -l

Disk /dev/mmcblk0: 15.6 GB, 15634268160 bytes
256 heads, 63 sectors/track, 1893 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1               1      266306  2147483647+ ee EFI GPT

Disk /dev/mmcblk1: 31.4 GB, 31486640128 bytes
255 heads, 63 sectors/track, 3828 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk1p1               1        3829    30744576   c Win95 FAT32 (LBA)
/ # cat /proc/cpu
cpu/     cpuinfo
/ # cat /proc/cpuinfo 
Processor       : ARMv7 Processor rev 4 (v7l)
processor       : 0
BogoMIPS        : 13.53

processor       : 1
BogoMIPS        : 13.53

Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 
CPU implementer : 0x51
CPU architecture: 7
CPU variant     : 0x1
CPU part        : 0x04d
CPU revision    : 4

Hardware        : QCT MSM8930 CDP
Revision        : 300000
Serial          : 0000000000000000

SSH Verbindung per USB

SSH Aktivieren wie immer:

  1. Enable Developer Mode,
  2. Generate or write password
  3. ssh using the password

Sonst verbinde ich mich per WLAN aber als das Phone probleme machte (nach dem anstecken des Netzteils war nur die blaue LED zu sehen) und anscheinend nicht mehr richtig gestartet ist konnte man sich weiterhin per USB verbinden. Zunächst auf dem Desktop PC die IP-Adressen anzeigen lassen:

ip a

Es wurde mir neben den anderen Netzwerkkarten ein USB Gerät angezeigt:

5: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether b6:dd:92:43:ff:81 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.3/24 brd 192.168.2.255 scope global noprefixroute dynamic usb0
       valid_lft 1847sec preferred_lft 1847sec
    inet6 fe80::24fa:4fe7:ff3a:b83/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Die angezeigt IP auf dem USB Gerät usb0: ist nur die dem Desktop PC zugeordnete. Verbinden konnte man sich nämlich nun per SSH über folgende IP:

ssh nemo@192.168.2.15

Von hier konnte ich nun Daten per scp auf meinen direkt verbundenen Desktop PC sichern. Ausserdem konnten Kommandos zum Reparieren/warten des BTRFS Dateisystems verwendet werden:

btrfs balance start /

Nach einer Weile stellte ich fest, das er auf doppel tippen auf das Display endlich reagierte und er 32% Akkufüllstand angezeigt hatte. Nur per Netzteil hatte er periodisch neugestartet und jeweils 1x gepiept.

Zugriff auf den internen Speicher

Im Jolla Recovery Menü Punkt 4) Shell auswählen. Um auf eine Speicherkarte zuzugreifen:

mkdir /mnt/sdcard 
mount /dev/mmcblk1p1 /mnt/sdcard

Um auf den internen Flash-Speicher zuzugreifen:

mkdir /mnt/rootfs 
mount /dev/mmcblk0p28 /mnt/rootfs 

Mit chroot kann man direkt auf dem System arbeiten:

chroot /mnt/rootfs

Hier kann man nun alle Operationen ausführen die man mag, z.B. eine Sicherung Wiederherstellen oder ein btrfs Filesystem check.

Fehler- Meldungen/Behebung

CSD Tool

Vom Terminal mit den Kommando csd gestartet, liefert das csd Tool Informationen und Fehler über die Hardware. Dabei wird die Hardware komplett durch getestet.

BTRFS Befehle

Der btrfs Befehl unterstützt eine vielzahl von Optionen und Parametern btrfs –help gibt weitere Auskunft. Im folgenden werden Informationen über das Dateisystem angezeigt, mit den zweiten Kommando wird die Belegung des Filesystems angezeigt. Die Abkürzungen fi stehen für Filesystem und df steht für Diskfree.

btrfs fi show
btrfs fi df /

Auflistung der BTRFS typischen Subvolumes:

btrfs sub list /

BTRFS File-System Wartung

Balance chunks across the devices

btrfs balance start [options] <path>

File-System check

/ # btrfs check --repair /dev/mmcblk0p28
enabling repair mode
Checking filesystem on /dev/mmcblk0p28
UUID: 4b9a7c4f-83c2-49be-b2b7-6fe67cc12eae
checking extents
bad key ordering 10 11
bad block 113246208
incorrect offsets 3626 3634
bad block 128888832
owner ref check failed [113246208 4096]
repair deleting extent record: key 113246208 168 4096
adding new tree backref on start 113246208 len 4096 parent 258 root 258
owner ref check failed [128888832 4096]
repair deleting extent record: key 128888832 168 4096
adding new tree backref on start 128888832 len 4096 parent 1 root 1
Backref 145121280 parent 2 root 2 not found in extent tree
Backref 145121280 root 2 not referenced back 0x9cea8
Incorrect global backref count on 145121280 found 1 wanted 0
backpointer mismatch on [145121280 4096]
Backref 145125376 parent 2 root 2 not found in extent tree
Backref 145125376 root 2 not referenced back 0xc10b8
Incorrect global backref count on 145125376 found 1 wanted 0
backpointer mismatch on [145125376 4096]
Backref 145129472 parent 2 root 2 not found in extent tree
Backref 145129472 root 2 not referenced back 0xc8010
Incorrect global backref count on 145129472 found 1 wanted 0
backpointer mismatch on [145129472 4096]
Backref 145133568 parent 2 root 2 not found in extent tree
Backref 145133568 root 2 not referenced back 0xc1308
Incorrect global backref count on 145133568 found 1 wanted 0
backpointer mismatch on [145133568 4096]
Backref 145137664 parent 2 root 2 not found in extent tree
Backref 145137664 root 2 not referenced back 0xcaba0
Incorrect global backref count on 145137664 found 1 wanted 0
backpointer mismatch on [145137664 4096]
Backref 145149952 parent 2 root 2 not found in extent tree
Backref 145149952 root 2 not referenced back 0xc11e0
Incorrect global backref count on 145149952 found 1 wanted 0
backpointer mismatch on [145149952 4096]
repaired damaged extent references
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
parent transid verify failed on 93466624 wanted 2251799813685274 found 26
Ignoring transid failure
root 258 inode 44871 errors 0
        unresolved ref dir 35822 index 8796093022215 namelen 4 name 4668 filetype 2 error 40
root 258 inode 44875 errors 2001
        unresolved ref dir 44800 index 7 namelen 8 name 3238.png filetype 1 error 0
root 258 inode 56618 errors 200
root 258 inode 56619 errors 0
        unresolved ref dir 56618 index 2 namelen 51 name ea09c86e51a9d6484642de52bbd851cfffa39ba1nemo180x180 filetype 1 error 2
root 258 inode 56722 errors 0
        unresolved ref dir 56618 index 4 namelen 51 name ea09c86e51a9d6484642de52bbd851cfffa39ba1nemo234x374 filetype 1 error 2
incorrect offsets 3626 3634
found 5935336472 bytes used err is 1
total csum bytes: 10523076
total tree bytes: 74870784
total fs tree bytes: 55795712
total extent tree bytes: 4431872
btree space waste bytes: 20293835
file data blocks allocated: 10993205248
 referenced 10911858688
Btrfs v0.20-rc1
/ # 

btrfs restore

to save data to the SD card (which should be at least 16GB in size):

mkdir -p /mnt/sd
mount /dev/mmcblk1p1 /mnt/sd/
btrfs restore -i -v /dev/mmcblk0p28 /mnt/sd/

Phone Reset Menü

  1. shut down
  2. hold volume down
  3. press power on
  4. plug the usb

Um in das Recover/Rest Menü zu gelangen muss das Jolla zunächst ausgeschaltet werden. Anschließend muss die Tastenkombination Lautstärke-Taste nach unten und die Power-Taste gedrückt werden bis das Phone eine Reaktion zeigt, wie z.B. Vibrieren, Leuchten der LED oder Display.

Das der Recovery Modus aktiv ist erkennt man daran das auf dem Display das Jolla Logo angezeigt wird. Am PC kann nun über die Konsole die verfügbaren Netzwerkkarten angezeigt werden.

Das Jolla nun per USB mit dem PC verbinden. Es wird nun eine Netzwerkkarte erzeugt welche man sich mit /sbin/ifconfig -a anzeigen lassen kann. Oft ist es die 2. Karte, bei systemd kann die bezeichnung der Netzwerkkarte anders als ethx sein. Ist der neuen NIC noch keine IP zugewiesen worden, muss der neuen Karte mit dhcpd ethx eine IP zugewiesen werden.

  
ip a

Im nächsten Schritt verbindet man sich per telnet mit der IP-Adresse 10.42.66.66

telnet 10.42.66.66

Es sollte nun folgendes Menü erscheinen:

-----------------------------
     Jolla Recovery v0.3.1      
-----------------------------
Welcome to the recovery tool!
The available options are:
1) Reset device to factory state
2) Reboot device
3) Bootloader unlock [Current state: locked]
4) Shell
5) Try btrfs recovery if your device is in bootloop
6) Exit
Type the number of the desired action and press [Enter]:
5

Hier kann man zunächt durch Drücken von 5 probieren, das BTRFS Dateisystem Wiederherstellen. Sollte das nicht zum Erfolg führen, hilft nur noch die Werkseinstellungen durch drücken von 1 wiederherzustellen. Achtung :!: alles wird gelöscht!!

1

ALL DATA WILL BE ERASED! Clears everything from the device and reverts the 
software back to factory state. This means LOSING EVERYTHING you have added to 
the device (e.g. updates, apps, accounts, contacts, photos and other media). 
Are you really SURE? [y/N] y[CLEANUP] Starting cleanup!
[CLEANUP] Umounting top volume...
[CLEANUP] Deleting /mnt
[CLEANUP] Cleanup done.
Mounting /dev/mmcblk0p28 on /mnt
sh: unlock: unknown operand
[OK] No lockcode has been set. Proceeding...
sh: unlock: unknown operand
sh: shell: unknown operand
[OK] Factory snapshots found.
Resetting procedure started!
Backing up current root and home subvolumes. If the backup fails, the old data will be deleted to let the recovery process continue.
[Done]
Restoring factory subvolumes...
Create a snapshot of '/mnt/factory-@' in '/mnt/@'
Create a snapshot of '/mnt/factory-@home' in '/mnt/@home'
[Done]
FSSync '/mnt'
Checking swap subvolume
Create subvolume '/mnt/@swap'
[DONE] Swap is ok.
Running flashing scripts from recovered snapshot ...
Running /var/lib/platform-updates/flash-bootimg-sbj.sh ... 
1754+0 records in
1754+0 records out
7184384 bytes (7.2 MB) copied, 0.352816 s, 20.4 MB/s
[OK]
Running /var/lib/platform-updates/flash-persist.sh ... 
2048+0 records in
2048+0 records out
8388608 bytes (8.4 MB) copied, 0.343202 s, 24.4 MB/s
[OK]
Running /var/lib/platform-updates/flash-platform-images-sbj.sh ... 
23+1 records in
23+1 records out
96464 bytes (96 kB) copied, 0.00732489 s, 13.2 MB/s
30+1 records in
30+1 records out
124588 bytes (125 kB) copied, 0.00863726 s, 14.4 MB/s
88+1 records in
88+1 records out
364360 bytes (364 kB) copied, 0.0189532 s, 19.2 MB/s
47+1 records in
47+1 records out
194360 bytes (194 kB) copied, 0.0125134 s, 15.5 MB/s
31+1 records in
31+1 records out
129180 bytes (129 kB) copied, 0.00891195 s, 14.5 MB/s
483+1 records in
483+1 records out
1980704 bytes (2.0 MB) copied, 0.0898825 s, 22.0 MB/s
11360+1 records in
11360+1 records out
46532096 bytes (47 MB) copied, 1.89181 s, 24.6 MB/s
2048+0 records in
2048+0 records out
8388608 bytes (8.4 MB) copied, 0.305021 s, 27.5 MB/s
[OK]
Running /var/lib/platform-updates/flash-recoveryimg-sbj.sh ... 
2359+0 records in
2359+0 records out
9662464 bytes (9.7 MB) copied, 0.51671 s, 18.7 MB/s
[OK]
[DONE] flashing script succeeded.
Deleting old subvolumes
Delete subvolume '/mnt/rec-20140718_173358_@home'
Delete subvolume '/mnt/rec-20140718_173358_@'
Recovery procedure terminated SUCCESSFULLY! Now cleaning up...
[CLEANUP] Starting cleanup!
[CLEANUP] Umounting top volume...
[CLEANUP] Umounting /mnt

Zeit gesteuertes Ausführen von Programmen

Unter Sailfish OS wird Zeitgesteuerte ausführen von Programmen nicht mit Cron vorgenommen sondern über Timer welche von systemd ausgeführt werden.

Dazu muss eine timer Datei im Pfad /lib/systemd/system/ angelegt werden, welche auf .timer endet.

/lib/systemd/system/btrfs-balancer.timer
wiki/jolla.1587296163.txt.gz · Zuletzt geändert: 2020/04/19 13:36 von pulsar