User:Halamix2/test: Difference between revisions
Appearance
m Remove broken redirect |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Getting stuff from stock Android = | |||
Or what info I had to check before porting, examples from [[HMD Global Nokia 1 Plus (nokia-ant)]] | |||
== Prerequisites == | |||
* If bootloader can be unlocked and unlocking it | |||
== Android apks == | |||
Find an app that can print some data bout your device (RAM, resolution etc.) I've used Device Info HW+. That way I was able to determne that my phone should have hardware acceleration for MP3, GMS audio and following video formats: AVC, H264, HEVC, MPEG2, MPEG4, VPX, VP9, VC1, XVID; and it has hardware acceleration for AVC, H263, MPEG4 encoding. | |||
== Boot options == | |||
Sanity check if bootloader injects any cmdline boot params | |||
<syntaxhighlight lang="shell-session"> | |||
// to compare with boot.img/kernel compile options if nothing gets added by the boot process | |||
$ adb shell cat /proc/cmdline | |||
// if the file is unavailable (newer Androids) you can make full bugrepots, which takes several minutes, and it should contain current cmdline | |||
$ adb bugreport | |||
// default kernels options were | |||
// console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O | |||
// default boot.img options were | |||
// bootopt=64S3,32S1,32S1 buildvariant=user | |||
// final cmdline | |||
// androidboot.atm=disabled | |||
// androidboot.boot_devices=bootdevice,soc/11230000.mmc,11230000.mmc | |||
// androidboot.bootreason=lk_crash | |||
// androidboot.colorver=L | |||
// androidboot.device=ANT | |||
// androidboot.dtb_idx=0 | |||
// androidboot.dtbo_idx=0 | |||
// androidboot.fac=0 | |||
// androidboot.hardware=mt6739 | |||
// androidboot.hwmodel=ANT | |||
// androidboot.meta_log_disable=0 | |||
// androidboot.remote_lock=noactive | |||
// androidboot.securityfused=true | |||
// androidboot.serialno=XXX | |||
// androidboot.sim_card_slot=0 | |||
// androidboot.simslot=2 | |||
// androidboot.skuid=600E0 | |||
// androidboot.vbmeta.avb_version=1.1 | |||
// androidboot.vbmeta.device_state=unlocked | |||
// androidboot.vbmeta.device=PARTUUID=bece74c8-d8e2-4863-9bfe-5b0b66bb920f | |||
// androidboot.verifiedbootstate=orange | |||
// androidboot.veritymode.managed=yes | |||
// androidboot.veritymode=enforcing | |||
// bootopt=64S3,32S1,32S1 | |||
// buildvariant=user | |||
// cgroup.memory=nosocket,nokmem | |||
// console=tty0 | |||
// console=ttyMT0,921600n1 | |||
// ddr_vendor=0x1 | |||
// emmc_total_size=0x1d2880000 | |||
// emmc_user_size=0x1d2000000 | |||
// fih_hwid=0x034 | |||
// fih_skuid=600E0 | |||
// firmware_class.path=/vendor/firmware | |||
// gpt=1 | |||
// has_battery_removed=0 | |||
// loop.max_part=7 | |||
// maxcpus=8 | |||
// memory_type=0x203 | |||
// mtk_printk_ctrl.disable_uart=1 | |||
// page_owner=on | |||
// ramoops.console_size=0x40000 | |||
// ramoops.mem_address=0x44410000 | |||
// ramoops.mem_size=0xe0000 | |||
// ramoops.pmsg_size=0x10000 | |||
// ramtest_result=0x0 | |||
// ro.boot.fdp.uid=XXX | |||
// root=/dev/ram | |||
// slub_debug=OFZPU | |||
// swiotlb=noforce | |||
// usb2jtag_mode=0 | |||
// vmalloc=400M | |||
</syntaxhighlight> | |||
== boot experiment == | |||
<syntaxhighlight lang=shell> | |||
avbtool add_hash_footer --partition_name boot --image boot_footer.img --dynamic_partition_size | |||
# add flags for good measure, but they might be unnecessary | |||
fastboot flash --disable-verity --disable-verification boot boot_footer.img | |||
</syntaxhighlight> |
Latest revision as of 19:46, 18 February 2025
Getting stuff from stock Android
Or what info I had to check before porting, examples from HMD Global Nokia 1 Plus (nokia-ant)
Prerequisites
- If bootloader can be unlocked and unlocking it
Android apks
Find an app that can print some data bout your device (RAM, resolution etc.) I've used Device Info HW+. That way I was able to determne that my phone should have hardware acceleration for MP3, GMS audio and following video formats: AVC, H264, HEVC, MPEG2, MPEG4, VPX, VP9, VC1, XVID; and it has hardware acceleration for AVC, H263, MPEG4 encoding.
Boot options
Sanity check if bootloader injects any cmdline boot params
// to compare with boot.img/kernel compile options if nothing gets added by the boot process
$ adb shell cat /proc/cmdline
// if the file is unavailable (newer Androids) you can make full bugrepots, which takes several minutes, and it should contain current cmdline
$ adb bugreport
// default kernels options were
// console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O
// default boot.img options were
// bootopt=64S3,32S1,32S1 buildvariant=user
// final cmdline
// androidboot.atm=disabled
// androidboot.boot_devices=bootdevice,soc/11230000.mmc,11230000.mmc
// androidboot.bootreason=lk_crash
// androidboot.colorver=L
// androidboot.device=ANT
// androidboot.dtb_idx=0
// androidboot.dtbo_idx=0
// androidboot.fac=0
// androidboot.hardware=mt6739
// androidboot.hwmodel=ANT
// androidboot.meta_log_disable=0
// androidboot.remote_lock=noactive
// androidboot.securityfused=true
// androidboot.serialno=XXX
// androidboot.sim_card_slot=0
// androidboot.simslot=2
// androidboot.skuid=600E0
// androidboot.vbmeta.avb_version=1.1
// androidboot.vbmeta.device_state=unlocked
// androidboot.vbmeta.device=PARTUUID=bece74c8-d8e2-4863-9bfe-5b0b66bb920f
// androidboot.verifiedbootstate=orange
// androidboot.veritymode.managed=yes
// androidboot.veritymode=enforcing
// bootopt=64S3,32S1,32S1
// buildvariant=user
// cgroup.memory=nosocket,nokmem
// console=tty0
// console=ttyMT0,921600n1
// ddr_vendor=0x1
// emmc_total_size=0x1d2880000
// emmc_user_size=0x1d2000000
// fih_hwid=0x034
// fih_skuid=600E0
// firmware_class.path=/vendor/firmware
// gpt=1
// has_battery_removed=0
// loop.max_part=7
// maxcpus=8
// memory_type=0x203
// mtk_printk_ctrl.disable_uart=1
// page_owner=on
// ramoops.console_size=0x40000
// ramoops.mem_address=0x44410000
// ramoops.mem_size=0xe0000
// ramoops.pmsg_size=0x10000
// ramtest_result=0x0
// ro.boot.fdp.uid=XXX
// root=/dev/ram
// slub_debug=OFZPU
// swiotlb=noforce
// usb2jtag_mode=0
// vmalloc=400M
boot experiment
avbtool add_hash_footer --partition_name boot --image boot_footer.img --dynamic_partition_size
# add flags for good measure, but they might be unnecessary
fastboot flash --disable-verity --disable-verification boot boot_footer.img