Reply
Thread Tools
Posts: 25 | Thanked: 99 times | Joined on Apr 2013
#241
Originally Posted by javispedro View Post
The stock kernel image, cmdline and initramfs are stored in /boot/boot.img (this is in mkbootimg format). There are several (Android) programs around to "unmkbootimg" this and get the raw kernel images et all.
I dared to unlock my bootloader again by restoring my saved mmcblk0p17. To verify that it works, I tried to boot the unmodified /boot/boot.img image by copying it over to my computer and then issue a fastboot sequence. However, that does not seem to work for me. The phone resets and I see the charging screen only.

However, the boot-telnet-initrd.img provided by djselbeck works fine.

What is going on here? Isn't the original image supposed to work over fastboot?
 

The Following User Says Thank You to Raim For This Useful Post:
Posts: 25 | Thanked: 99 times | Joined on Apr 2013
#242
Originally Posted by Raim View Post
The phone resets and I see the charging screen only.
And right after I posted this I found out that it actually did work – I just wasn't aware of it. :-)

When the charging screen comes up, I need to press the power button long enough once to actually boot up the system.
 

The Following User Says Thank You to Raim For This Useful Post:
Guest | Posts: n/a | Thanked: 0 times | Joined on
#243
Though having an overview of the partition layout on Jolla device will help. So, I compiled parted for Sailfish (it is on my openrepos)

Code:
┌(nemo@localhost)─(✗)─(08:31 PMMon Jan 06)
└─(/)─(46 files, 164Kb)─> sudo parted
GNU Parted 3.1
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                                
Model: MMC MAG2GC (sd/mmc)
Disk /dev/mmcblk0: 15.6GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name        Flags
 1      17.4kB  4194kB  4177kB                  emgdload
 2      33.6MB  67.1MB  33.6MB                  QOTP
 3      67.1MB  71.3MB  4194kB                  Qfa
 4      71.3MB  75.5MB  4194kB                  Qcfg
 5      75.5MB  79.7MB  4194kB                  Qdlog
 6      79.7MB  81.8MB  2097kB                  Qvariables
 7      81.8MB  83.9MB  2097kB                  Qlogfilter
 8      101MB   105MB   4194kB                  fsg
 9      134MB   185MB   50.3MB  ext4            Qglog
10      185MB   189MB   4194kB                  modemst1
11      189MB   193MB   4194kB                  modemst2
12      193MB   195MB   2097kB                  sbl1
13      195MB   197MB   2097kB                  sbl2
14      197MB   199MB   2097kB                  sbl3
15      199MB   201MB   2097kB                  tz
16      201MB   203MB   2097kB                  rpm
17      203MB   206MB   2097kB                  aboot
18      206MB   273MB   67.1MB  fat16           modem
19      273MB   281MB   8389kB  ext4            drm
20      281MB   294MB   12.6MB                  boot
21      294MB   306MB   12.6MB                  recovery
22      306MB   315MB   8389kB                  pad1
23      315MB   323MB   8389kB                  misc
24      323MB   856MB   533MB   linux-swap(v1)  swap
25      856MB   864MB   8389kB  ext4            persist
26      864MB   864MB   8192B                   ssd
27      864MB   872MB   8389kB                  security
28      872MB   15.6GB  14.8GB                  sailfish

(parted)
 

The Following 11 Users Say Thank You to For This Useful Post:
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#244
scary:
* lots of gibberish
* "drm"
* "security"
* why does this need to get done by a community member (kudos nieldk!)? Basically doing RE. Shouldn't such elementary fundamental stuff - including proper comments on purpose of each partition - be in the "Jolla 101" wikipage published by Jolla even before 1st device shipped? Dang, where's that URL to this wikipage? I seem to have lost it...¡
__________________
Maemo Community Council member [2012-10, 2013-05, 2013-11, 2014-06 terms]
Hildon Foundation Council inaugural member.
MCe.V. foundation member

EX Hildon Foundation approved
Maemo Administration Coordinator (stepped down due to bullying 2014-04-05)
aka "techstaff" - the guys who keep your infra running - Devotion to Duty http://xkcd.com/705/

IRC(freenode): DocScrutinizer*
First USB hostmode fanatic, father of H-E-N
 

The Following 8 Users Say Thank You to joerg_rw For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#245
Originally Posted by joerg_rw View Post
scary:
* lots of gibberish
* "drm"
* "security"
* why does this need to get done by a community member (kudos nieldk!)? Basically doing RE. Shouldn't such elementary fundamental stuff - including proper comments on purpose of each partition - be in the "Jolla 101" wikipage published by Jolla even before 1st device shipped? Dang, where's that URL to this wikipage? I seem to have lost it...¡
That crap is due to the Qualcomm chipset. The thing is built so that it needs all that hooba to boot up & work. Sad really
 

The Following 8 Users Say Thank You to juiceme For This Useful Post:
Guest | Posts: n/a | Thanked: 0 times | Joined on
#246
My next try :
Like, I believe Joerg_rw also found, is the 'secret mode' when pressing vol-up on power-on.
I believe this may be an entrance to a quick-recovery.

What I want to try (once I get around to buying a 16G SDcard)
This requires an unlocked bootloader.

insert 16Gb SD card
fastboot -i 0x2931 boot boot-telnet-initrd.img
telnet 192.168.42.17
dd if=/dev/mmcblk0 of=/dev/mmcblk1

power off
power-on - holding vol-up

And see if this will start a flash from SD card, now containing a proper partition layout, like the device.
Possibly, if it work, it is also doable to just create the partition layout on the SD card, and dd mmcblk0p17 to mmcblk1p17
 

The Following 7 Users Say Thank You to For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#247
What I was thinking the other day was a bit of similar thing that you have in mind;

I suppose it's possible to create a recovery kernel that actually swaps the mmcblk0 and mmcblk1 devices in the device so that if you have a copy of the filesystem on your external SD card you caould run the device fully on that.
 

The Following 3 Users Say Thank You to juiceme For This Useful Post:
Posts: 25 | Thanked: 99 times | Joined on Apr 2013
#248
I took an image of the entire /dev/mmcblk0 from the "fastboot rescue mode". This way I can view the partition layout with parted or gdisk on my computer without risking any damage by accidental modifications.

Not sure if there is anything useful in this, at least some of these have names that may reveal their function. I guess all those "Q*" partitions are something internal from Qualcomm and probably uninteresting. The bootloader chain would be "rpm" -> "sbl1" -> "sbl2" -> "sbl3" -> "aboot" according to some sources on other Qualcomm-based Android phones that turned up on a quick web search (sbl = secondary bootloader).

"persist" is mounted on /persist and appears to contain WLAN driver configuration, including MAC addresses. "drm" is mounted on /drm and it's currently empty despite the standard lost+found directory. No idea about "security" and some of the others, though.

I don't think these partitions are scary, this is just the way it is set up by Qualcomm as vendor. In defense of Jolla, what would be the purpose of documenting this publicly? I would even expect that the documentation provided by Qualcomm is under a NDA…
 

The Following 9 Users Say Thank You to Raim For This Useful Post:
Posts: 25 | Thanked: 99 times | Joined on Apr 2013
#249
Originally Posted by juiceme View Post
I suppose it's possible to create a recovery kernel that actually swaps the mmcblk0 and mmcblk1 devices in the device so that if you have a copy of the filesystem on your external SD card you caould run the device fully on that.
If you want to experiment with a different OS, you could just boot from fastboot with "root=/dev/mmcblk1pX" as kernel argument and run from the SD card.

For a clone of the "sailfish" partition, it would probably be a good idea to change the partition UUID to something different and change /etc/fstab accordingly to avoid mounting home or swap from the internal storage. Probably needs some more changes in /lib/systemd/system/*.mount for things like /firmware or /var/systemlog.
 

The Following 6 Users Say Thank You to Raim For This Useful Post:
Posts: 1,298 | Thanked: 2,277 times | Joined on May 2011
#250
That list of partitions aren't necessarily all used (like drm and etc.), but are probably required for Qualcomm SoCs. Pretty weird layout if you ask me. Jolla should document that stuff in some hardware docs section. That would be community friendly. Unless Qualcomm forbids them to do it. No idea.

Last edited by shmerl; 2014-01-07 at 07:21.
 

The Following 4 Users Say Thank You to shmerl For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 17:17.