Active Topics

 


Reply
Thread Tools
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#1
EDIT: finished flash automation and rootstrapping, to get devmode+openssh+pubkeys+no-swipe-tutorial+no-timelang-prompt out of the box when flashing.


EDIT:
here is a list of the mildly interesting things that i auto-configure:
  • packages: repos, repo gpg keys, pkgs installed from repos, my own local repo of manually downloaded debs
    when i install a package, i never install it on the phone; instead, i add it to this list and run my installer
  • contacts
    backup taken nightly with vcard-exporter
  • SMS: last 30 days of sms, plus last 3 messages for each contact within last year
    backup taken nightly with smsbackuprestore, organized into my human-readable private git repo by contact
  • wifi networks: synced with the networks on my laptop
  • call log: past 30 days
    backup taken nightly with callbackuprestore
  • DCIM
    backup taken nightly into my pix storage, where an automated process converts the entire repo incrementally to 854x480 pix. that entire library is re-synced back to my n9. i purge the high-res images on the phone that are more than a month old after performing the backup-convert-resync
  • Music
    on my laptop, i maintain a transcoded mirror of my flac library in high quality oggs. the mirror also contains music i store on my laptop as oggs and mp3s. the flac=>ogg mirror is built into my eccentric music player, klomp
  • homescreen: three bg images, launcher button positions and folders
    launcher buttons are configured from a text file in my repo; i move things in there instead of on the screen
  • network: ssh keys, usb address
  • mydocs {backed up nightly, skipping DCIM and Music. also, formats to ext4.}
  • GPS: drive/cities initialized to blank, no maps cached, favorites/home restored, supl => google
    backed up nightly
  • keyboard: swype config {no popup, my nightly backed up dictionary}, terminal virtual keyboard toolbar
  • sysconfigs:
    status menu brightness widget+toggles
    status bar battery% + battery-bar + netspeed
    led notifications
    no ALS
    no tracker crawling
    forced-reboot from restart loops limit 3=>75 {necessary for installing many apps at once that restart mthome, etc}
  • appconfigs:
    speakertoggle {rotate calls to speaker when away from ear}
    n9bm {volume buttons}
    lpsmagic {display bat%+mAh+date+music info on lowpower screen}
    qmlmozbrowser {coderus' ipclite firefox overlay ui}
    qtbutton {for restart button launcher, klomp music player controls}


so i reset my devices often. i have nice automated scripts for restoring the state of the device without human intervention, but first i need ssh access. this is the most human-time-consuming part of the process, by far. {around 6min}

the current steps i use are:
1) plug in phone, run flash script for fw/emmc/kernel
2) on phone, settings->security->devmode
3) accept install and wait for rebot
4) open terminal, devel-su, rootme, passwd user
5) (re)plug in phone, sync-and-connect
6) run automated installer {set up usb networking, generate ssh key, sync our pub keys, set hostname, change usb network address, auto-sync-and-connect, re-establish usb network, then run all my configs}


i am looking to remove steps. some vague ideas i have:
-installing some bootloader that will let me modify the filesystem before firstboot over usb networking, without touching the physical phone. i would then automate flashing the phone+bootloader, mounting the home partition, and copying my pub key to authkeys.
{i only want to do this if it doesnt significantly affect bootspeed}

-compiling a hack into the kernel to somehow or other dangerously circumvent ssh password authentication
{reflashing the kernel would be necessary after sticking my pubkey in}
__________________
~ teleshoes ~

Last edited by wolke; 2013-08-26 at 19:41.
 
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#2
You could maybe do something like this;
  • perform a back-to-back flashing, first normal mode and then open mode without device booting in between. Use ubiboot-02 kernel as open mode kernel.
  • when the device boots up from the flashing, if the cable is connected all the time it will automatically enter ubiboot maintanance console, when all your partitions are exported to the host.
  • run your scripts whatsoever, to set up things on the device partitions. (install ssh keys, passwords, etc...)
  • reboot and the device is accessible
 

The Following User Says Thank You to juiceme For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#3
thanks for the reply! thats just what i was hoping existed.
does ubiboot-02 boot significantly slower than the normal openmode kernel?
__________________
~ teleshoes ~
 
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#4
Originally Posted by wolke View Post
thanks for the reply! thats just what i was hoping existed.
does ubiboot-02 boot significantly slower than the normal openmode kernel?
When you boot it up to the maintanance console, it is very fast, it's like booting Moslo kernel, because there are no extra services & stuff. It compares to booting a desktop linux to single-user mode.
 

The Following User Says Thank You to juiceme For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#5
Originally Posted by juiceme View Post
When you boot it up to the maintanance console, it is very fast, it's like booting Moslo kernel, because there are no extra services & stuff. It compares to booting a desktop linux to single-user mode.
no, i mean for regular boot. i dont wanna slow down normal booting, which is what i do 99% of the time, just to speed up flashing, which i do only 1% of the time.
__________________
~ teleshoes ~
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#6
oh wait! you mean load a custom kernel without flashing it?
__________________
~ teleshoes ~
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#7
BRILLIANT, thats obviously what i should do. thanks!
__________________
~ teleshoes ~
 
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#8
Yes, you can load it up to maintanance mode without flashing it.
I guess that's what you wanted, to get access to partitions without going thru the hassle of installing developer mode in between.

After the operation, as final step you can flash normal open mode kernel.

Or, other way to do it, (how I would do it if I needed to) is I'd flash the ubiboot kernel as the real kernel, and along with twiddling the filesystem I'd install the 2nd stage kernels and ubiboot menus there.

Then I'd not have to flash a kernel, I'd just use ubiboot to load up my kernels and OS'es.
 

The Following User Says Thank You to juiceme For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#9
ill consider doing that, as mer/jolla get closer to being viable operating systems.
__________________
~ teleshoes ~
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#10
the general idea of what i do is to make sure my phone is both easy to tweak and extremely well-backed-up. i maintain a git repo that has both tools for backup/restore and the configs, in human readable fashion, and i run the backups routinely.

say i have a config i want to change {e.g.: change the CSS for the home screen, or install a package, or tweak the swap, or add an mt-toggle, etc}. instead of using the ui to update the phone, i update a text file in my repo, and run a tool that i make for setting that specific thing based on the text file. if the change is to something that ive never done before, the first thing i do is write such a tool.
if, instead of a config, i have data that i want to maintain across flashes {e.g.: text messages, or pictures, or the call log, etc}, i figure out how to read the database from the phone to a human-readable text file, and rebuild that db from the text file.
generally speaking, it is either already human readable, or someone will have already figured out this specific thing.
in some cases, its too hard to reverse engineer the database, and in those cases i settle for copying it whole hog {e.g.: swype dictionary}.
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 18:22.