Hello,
I've followed this tutorial (https://forum.xda-developers.com/t/...r-img-and-flashing-our-modifications.4196625/) to extract system.img from super.img and edit it. So far, I was able to extract system.img from super.img and mount it to a folder in fedora. The problem is I cannot modify the files, I tried all ways I could think about but had no luck as the source is write-protected, so it only mounted it as read-only. I tried to copy all the files to different folder using rsync, but the system.img file is getting bigger than original and when I make it to super.img with lpmake, the phone doesn't work and stuck in bootloop. Does anyone has any idea about this?
Thank you
Related
I wanted to add some extra steps to my init.rc file but was unsuccessful. I was hoping someone could explain what I'm doing wrong or advise if there is a better way to do this.
I started by creating a new backup image using clockworkmod and then copied the boot.img file over to my host. I then used the steps as described in the thread "HOWTO: Unpack, Edit, and Re-Pack Boot Images" to unpack the contents and get the init.rc file. After adding the additional steps at the end, I packaged the boot.img file back up using mkbootfs and mkbootimg and then pushed the file to my sdcard. However, when I try to use "flash_image" to flash the new boot.img, I always get the error "error scanning partition". I don't think the problem is with the new boot.img file because I get the same error if I try to flash the original boot.img or even some non-existing file.
I also tried to simply replace the original boot.img file in my clockworkmod back up directory and do a standard restore, but that doesn't get past the "Viewsonic" logo screen. I assume that is because of some checksum issue.
Can anyone see my error or suggest and alternate method?
Thanks in advance
I have bricked my kyobo ereader (gingerbread 2.3.5) but still have fastboot and limited adb (no shell commands since there is no valid system) access on the device.
I have various update.zips for the device but unfortunately these are installable only on a working system (via settings->privacy->updates) and I know of no way of installing the update.zip since there does not appear to be any custom recovery for this ebook reader and booting into recovery does not install the update.zip on the sdcard.
The update.zip for the Kyobo ereader contains boot.img, recovery.img and a system folder containing files and directories for the system partition (an example of an official update.zip is available from m.kyobobook.co.kr/mirasol/update.zip )
I have extracted the system folder on a ubuntu system and need to prepare a system.img file which may be flashed using fastboot. I have also changed owner of the extracted files to root:root and chmod 777 on all the executables in the extracted system folders. A complication is that I only have the windows qualcomm hsusb drivers for fastboot or adb to connect to a pc, so I must use a windows 7 notebook to flash the device (possibly precluding pushing the system folder files to the device since they don't have permission and owner settings in windows)
I have tried various tools to make a system.img including the native linux mkcramfs and tools suggested by various google searches such as mkfs.yaffs2.x86 and make_ext4fs. All these tools could prepare a system.img but unfortunately they have different sizes and I am not sure which img is the correct one. I have tried to flash the various system.img using both fastboot flash system system.img and also by adding the system.img to the update.zip (together with placeholders for the required android-info.txt but in all cases they do not any files onto the sytem partition (although fastboot does send the system.img successfully to the device and writes the 120~180MB img files in about 50-70seconds. I have tried using both the official boot.img and the rooted boot.img. I noticed that the device reboots twice after such flashing which may be because there is some protection from the official recovery.img which checks the system partition an erases it if it does not match.
My first 2 questions are general and the third is specific to my situation:
1. What is the correct tool to generate an android system.img file from the extracted update.zip's system folder on a linux system?
2. Any suggestions on how to flash an update.zip using fastboot or adb?
3. Are there any generic recovery.img which I could try to flash over the official recovery partition on the kyobo mirasol ereader?
Any suggestions anyone?
i need to figure out How to differentiate between Sparse Img and raw img because i want to mount a raw img so that i can edit the apks and jar files in it.
i have a file named system.img but whenever i am trying to mount it using the command "sudo mount -t ext4 -a loop system.img outout/" i am unable to get the apks and jars to edit.
i also want to know how to make a binary file executable.
in short i want to get the system folder which contains the framework,apks,media,bin,xbin,usr,etc...folders and i am a noob in ubuntu. I have the rom inside which is the system.img but i dont know how to extract the system.img and weather the system.img is in a raw stste ot sparse state and i have all the binaries in that same folder such as simg2img,img2simg,make_ext4fs,etc.... but i dont know how to use the binaries.
i am using a VirtualBox with windows 10 as host and Ubuntu 16.04 as guest.
So can anyone help me with this.
Need some help. I'm trying to do this thing. Repack boot.img (unpack image, unpack ram archive, modify it, add my files to image, pack ram, pack boot.img). Flash my own repacked boot.img with heimdall to device, everything was okay, i can see files on my device after reboot. But when I try to start my file /my_bin it write 'Permission denied', same thing when I try to read it with cat (for example, cat /my_bin). Rights for file are 755 (rwxr-xr-x), everybody can run it. If i understand correctly SELinux configuration restrict my access to this files. I'm trying to copy /my_bin file in init.rc to different folder, but this doesn't help. Can i modify SELinux context from init.rc or modify it when repacking boot.img (i'm think contexts are in file_contexts.bin, but i don't know yet how to modify this binary file). Or something else?
Nobody?
I have converted sparsechunks to a single system.img. Then extracted that system.img and modified it. Now how to convert the folder to system.img again? I have tried mtk extractor which actually failed but didn't show any log.