[Zenfone 5 Q&A, Help & Troubleshooting] amm8990:
Hello,

I have Zenfone 5 t00j phone (stock Kitkat, rooted, twrp 3.0.M5 installed) and I wanted to modify some parameters of ramdisk *.rc to make phone to turn on whenever is connected to the charger. I followed the instruction https://android.stackexchange.com/q...ower-on-android-when-the-charger-is-connected and here http://ajparag.blogspot.com/2017/12/auto-boot-start-or-power-on-android.html

To do so, I need to unpack the boot.img, repack it back and flash it. And there I had some issues and need your help.

Since, I use stock kitkat rom, i have downloaded https://dlcdnets.asus.com/pub/ASUS/ZenFone/A500CG/UL-ASUS_T00F-TW-2.22.40.540-user.zip and I found boot.img inside. Then I used https://github.com/shakalaca/ZenFone-boot-tools to unpack the boot.img

./unpack_intel boot.img bzImage ramdisk.cpio.gz

when I tried

gzip -d ramdisk.cpio.gz

I got an error

gzip: ramdisk.cpio.gz: not in gzip format

In alternative, I have also tried Boot.img tools [unpack, repack, ramdisk https://xdaforums.com/showthread.php?t=2319018 and got also errors

~/Downloads/zenfone/bootimg_tools_7.8.13$ ./boot_info boot.img
PAGE SIZE: 1
BASE ADDRESS: 0x00000000
RAMDISK ADDRESS: 0x00000000
CMDLINE: ''

~/Downloads/zenfone/bootimg_tools_7.8.13$ ./unpack boot.img
Boot = boot.img
./unpack: line 11: umkbootimg: command not found
mv: cannot stat 'initramfs.cpio.gz': No such file or directory
mv: cannot stat 'zImage': No such file or directory
./unpack: line 19: unpack_ramdisk: command not found

I don't understand why it does not work?

p.s.

Also, I didn't manage to find the boot.img partition on my phone, even though I have twrp and when the partitions are listed for backup I have "System", "Cache", "Config", "Data" and "System Image".

Partition Logs:
/system | /dev/block/mmcblk0p9 | Size: 1259MB Used: 1172MB Free: 87MB Backup Size: 1172MB
Flags: Can_Be_Mounted Can_Be_Wiped Can_Be_Backed_Up Wipe_Available_in_GUI IsPresent
Primary_Block_Device: /dev/block/mmcblk0p9
Display_Name: System
Storage_Name: System
Backup_Path: /system
Backup_Name: system
Backup_Display_Name: System
Storage_Path: /system
Current_File_System: ext4
Fstab_File_System: ext4
Backup_Method: files
Mount_Options: noatime

/cache | /dev/block/mmcblk0p6 | Size: 495MB Used: 0MB Free: 495MB Backup Size: 0MB
Flags: Can_Be_Mounted Can_Be_Wiped Can_Be_Backed_Up Wipe_During_Factory_Reset Wipe_Available_in_GUI IsPresent
Primary_Block_Device: /dev/block/mmcblk0p6
Display_Name: Cache
Storage_Name: Cache
Backup_Path: /cache
Backup_Name: cache
Backup_Display_Name: Cache
Storage_Path: /cache
Current_File_System: ext4
Fstab_File_System: ext4
Backup_Method: files
Mount_Options: noatime,nosuid,nodev

/config | /dev/block/mmcblk0p5 | Size: 27MB Used: 14MB Free: 13MB Backup Size: 14MB
Flags: Can_Be_Mounted Can_Be_Wiped Can_Be_Backed_Up IsPresent
Primary_Block_Device: /dev/block/mmcblk0p5
Display_Name: Config
Storage_Name: Config
Backup_Path: /config
Backup_Name: config
Backup_Display_Name: Config
Storage_Path: /config
Current_File_System: ext4
Fstab_File_System: ext4
Backup_Method: files
Mount_Options: noatime,nosuid,nodev

/data | /dev/block/mmcblk0p10 | Size: 12435MB Used: 3790MB Free: 3839MB Backup Size: 3790MB
Flags: Can_Be_Mounted Can_Be_Wiped Can_Be_Backed_Up Wipe_During_Factory_Reset Wipe_Available_in_GUI IsPresent Has_Data_Media Can_Encrypt_Backup Use_Userdata_Encryption Is_Storage Is_Settings_Storage
Symlink_Path: /data/media/0
Symlink_Mount_Point: /sdcard
Primary_Block_Device: /dev/block/mmcblk0p10
Crypto_Key_Location: /factory/userdata_footer
Display_Name: Data
Storage_Name: Internal Storage
Backup_Path: /data
Backup_Name: data
Backup_Display_Name: Data
Storage_Path: /data/media/0
Current_File_System: ext4
Fstab_File_System: ext4
Backup_Method: files
Mount_Options: noatime,nosuid,nodev
MTP_Storage_ID: 65537

/factory | /dev/block/mmcblk0p3 | Size: 27MB Used: 1MB Free: 25MB Backup Size: 1MB
Flags: Can_Be_Mounted Can_Be_Wiped IsPresent
Primary_Block_Device: /dev/block/mmcblk0p3
Display_Name: Factory
Storage_Name: Factory
Backup_Path: /factory
Backup_Name: factory
Backup_Display_Name: Factory
Storage_Path: /factory
Current_File_System: ext4
Fstab_File_System: ext4
Backup_Method: files
Mount_Options: noatime,nosuid,nodev

/misc | /dev/block/mmcblk0p4 | Size: 8MB
Flags: IsPresent
Primary_Block_Device: /dev/block/mmcblk0p4
Display_Name: misc
Storage_Name: misc
Backup_Path: /misc
Backup_Name: misc
Backup_Display_Name: misc
Storage_Path: /misc
Current_File_System: emmc
Fstab_File_System: emmc
Backup_Method: dd
Mount_Options: defaults

/usb-otg | | Size: 0MB Used: 0MB Free: 0MB Backup Size: 0MB
Flags: Can_Be_Mounted Can_Be_Wiped Wipe_Available_in_GUI Removable Is_Storage
Primary_Block_Device: /dev/block/sda1
Display_Name: USB OTG
Storage_Name: USB OTG
Backup_Path: /usb-otg
Backup_Name: usb-otg
Backup_Display_Name: USB OTG
Storage_Path: /usb-otg
Current_File_System: vfat
Fstab_File_System: vfat
Backup_Method: files
Mount_Options: defaults
MTP_Storage_ID: 65538

/external_sd | | Size: 0MB Used: 0MB Free: 0MB Backup Size: 0MB
Flags: Can_Be_Mounted Can_Be_Wiped Wipe_Available_in_GUI Removable Is_Storage
Primary_Block_Device: /dev/block/mmcblk1p1
Display_Name: MicroSD
Storage_Name: MicroSD
Backup_Path: /external_sd
Backup_Name: external_sd
Backup_Display_Name: MicroSD
Storage_Path: /external_sd
Current_File_System: vfat
Fstab_File_System: vfat
Backup_Method: files
Mount_Options: defaults
MTP_Storage_ID: 65539

/system_image | /dev/block/mmcblk0p9 | Size: 1300MB
Flags: Can_Be_Backed_Up IsPresent Can_Flash_Img
Primary_Block_Device: /dev/block/mmcblk0p9
Display_Name: System Image
Storage_Name: system_image
Backup_Path: /system_image
Backup_Name: system_image
Backup_Display_Name: System Image
Storage_Path: /system_image
Current_File_System: emmc
Fstab_File_System: emmc
Backup_Method: dd
Mount_Options: defaults