Provide ADB pmbootstrap adb_dd_flash_rescue.img, adb_inspect_phone init_adb_project
Hello I started OrangePI 4G-IOT phone project in http://ns2.eerin.fi/ and find that pmbootstrap don't use adb posibilities at all.
Is there posibilities to implement some adb based commands in to pmbootstrap?
Like: pmbootstrap adb_inspect_phone
- Do adb push phone_inspect.sh then adb shell phone_inspect.sh then adb pull phone_data.log
- results may vary depend is phone rooted or not
- then analyze phone_data.log and print report and give answer if phone match known projects or/and how close it is usable porojects. Especially if /proc/kconfig.gz was availabe tell how usable kernel is for PmOS.
- May ask to use git repo to store phone data to public / use git repo to find similiar phone projects?
- pmbootstrap init_adb_project
- new or known project based phone_data.log / kconfig.gz (use git repo to add known patches?)
- use adb and pull all needed firmware files modem & etc inits, rescue / boot.img kernels
- Put extracted files to project chroot correct places
- if sdcard is availabe ask if want use F2FS and drop fdisk to partition sdcard-mbr.bin & other needed init questions
- if phone rescue partition is big enough then may add some rescue/install system to initrd? (mgetty to all finded serial ports and try init wlan +telnet/ssh, usb and start adb daemon?)
Then use alredy implemented pmbootstrap install to generate suitable boot.img and root-fs.img (posible u-boot/boot-part img) (I assume if sd-card is availabe it is good to partition small vfat partition to begin for uenv.txt & kernels if u-boot someday come availabe?)
- pmbootstrap adb_dd_flash_rescue
- phone must be rooted, use adb push and adb shell dd to flash phone rescue partition with generated boot.img. May fallback to cat if dd is not availabe but ask firts..
- In first use time it take backup from orginal rescue-partition and store it to phone & computer. So it it is posible to flash orginal rescue.bin back.
- pmbootstrap adb_dd_flash_sdcard
- use adb push sdcard-mbr.bin to phone and adb dd to put it to sdcard. Posible reboot phone to activate new mbr?
- use adb push & dd to put boot_fs.bin in sdcard
- use adb push & dd to put root-fs.bin to sdcard may use partial method if image is big.
This allow many new phones to used with android kernel and it is more fun to compile new kernels natively in phone and use kexec to test them..