1. Are you ready for the Galaxy S20? Here is everything we know so far!

[MetroPCS] To DEVs: No more zeroing data & Hands on fastboot!

Discussion in 'Android Devices' started by ccaapton, Nov 4, 2014.

  1. ccaapton

    ccaapton Newbie
    Thread Starter

    Hi guys. As for now booting into recovery directly will cause data partition zeroed. Now I figured out a (very twisted) hack to get it around:
    1. Interchange the partition name of partition 7 and partiton 17 using parted.
    Now old boot is new recovery, old recovery is new boot
    2. Cold start will always enter recovery. By rebooting into "recovery", we can get into normal mode. Now no matter how messed-up the norm mode is, zeroing of data will never be triggered.
    3. When flashing a zip containing a kernel, the installscript will ask to write the kernel file into "/dev/block/platform/msm_sdcc.1/by-name/boot". There are two ways to solve this:
    a). Adjust install script to point to "by-name/recovery"
    b). CWM/TWRP modify the softlink "by-name/boot", and redirect it into mmcblk0p7, the real boot partition.
    4. Cold start will be longer and more troublesome, but we can modify CWM/TWRP to reboot automatically into normal mode unless the user intervened. Something like hroark13's homebutton trick can do it.

    Extra finding: enter fastboot
    I made a mistake of interchanging 7<->1 instead of 7<->17 at the first time, and fastboot magically showed up when I tried to boot into recovery.
    So I did more research, and discovered that: as long as aboot can not find a partition called "recovery", or was feed in a wrong format, it will go into fastboot. So the easiest way is to rename "recovery" into something else, and change it back when we are done with fastboot.

    I tried boot an normal kernel without loking patch, using "fastboot boot", and it will boot:D:D:D.
    Now with fastboot, developing and test will be much easier and in more rapid pace. And these hack may work more lg/other devices rather than F6. I think it will be awesome.

    Do you guys think it is worth implementing on our ROMs?
     


    mussio likes this.

    1. Download the Forums for Android™ app!


      Download

       
  2. ccaapton

    ccaapton Newbie
    Thread Starter

    @Hroark13 @Viperdink

    Thanks for the heads-up from viperdink, I learned that many other phones have the same behavior regarding fastboot, such as kyocera hydro, and Hroark13 used the wiping-recovery method to provide fastboot for that phone. Now wiping is unnecessary, you just need to rename it via parted.

    As for the partition renaming trick, I think it might have a lot of potential usage. For example: multi-booting of different ROMs. We can use the recovery mode to change the partition names on the fly, thus select which partition share be the system/data for the next reboot. So recovery mode basically become a multi-boot selector. On the other hand. ROM developers don't need any coding adjustment on their end for the co-existence.

    I also think there should be something like syslinux/grub2 for android, so kernels and ramdisks does not need to be wrapped into partitions anymore, and could be combined/selected in a more flexible way. We could even archive netboot/nfsroot, so deploy a ROM for testing would just take a reboot, nothing more.
     
  3. hroark13

    hroark13 Android Expert
    Recognized Developer

    fyi

    on my cm11 and KK

    I provided a way to boot into recovery with out zeroing out data

    just hold the home button

    only my 2 roms, and roms based on my 2 roms have this, but it can be implemented on other roms
     
    viperdink likes this.

LG Optimus F6 Forum

The LG Optimus F6 release date was September 2013. Features and Specs include a 4.5" inch screen, 5MP camera, 1GB RAM, Snapdragon 400 processor, and 2460mAh battery.

September 2013
Release Date
0
Reviews
Loading...
Similar Threads - MetroPCS DEVs more
  1. Punbas
    Replies:
    0
    Views:
    299
  2. Papamalo
    Replies:
    4
    Views:
    763
  3. xarzu
    Replies:
    5
    Views:
    1,588
  4. Resid Seyidli
    Replies:
    1
    Views:
    6,887
  5. ramennoodels
    Replies:
    2
    Views:
    3,606
  6. AppleUser
    Replies:
    7
    Views:
    4,457
  7. tenn1440
    Replies:
    0
    Views:
    1,697
  8. killallpokemons
    Replies:
    1
    Views:
    699
  9. Logic2Paradigm
    Replies:
    3
    Views:
    1,262
  10. PhoenixDoe
    Replies:
    5
    Views:
    2,939

Share This Page

Loading...