This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def read_int_at(file, index) | |
| (file[index] << 24) | (file[index+1] << 16) | (file[index+2] << 8) | file[index+3] | |
| end | |
| def hex_int_at(file, index, pad_length=0) | |
| rv = read_int_at(file, index).to_s(16) | |
| pad = "0" * (pad_length > rv.length ? (pad_length - rv.length) : 0) | |
| "0x#{pad}#{rv}" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target_disk="`rootdev -d -s`" | |
| # Get the current sizes of ckern, croot, and stateful | |
| ckern_size="`cgpt show -i 6 -n -s -q ${target_disk}`" | |
| croot_size="`cgpt show -i 7 -n -s -q ${target_disk}`" | |
| state_size="`cgpt show -i 1 -n -s -q ${target_disk}`" | |
| #new stateful size will include all but 1 byte from rootc and kernc | |
| stateful_size=$(($state_size + $croot_size + $ckern_size - 2)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class StdlibDependencies | |
| attr_reader :dependencies, :version | |
| PATTERN = %r{^\s*require ['"]([a-zA-Z0-9/-_]+)["']\s*$} | |
| def self.[](key) | |
| versions[key] | |
| end | |
| def self.versions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'ruboto/widget' | |
| ruboto_import_widgets :LinearLayout | |
| class ActionBarActivity | |
| def onCreate(bundle) | |
| super | |
| self.content_view = | |
| linear_layout orientation: :vertical do | |
| end |
OlderNewer