How Can I modify an APK in Stock ROM (Fastboot) and Flash It? - Xiaomi Redmi Note 5A Questions & Answers

Hi everyone!
I need to edit an APK in stock ROM (system.img) of my device. I have unpacked system.img and repacked with some programs on Windows. But When I unpack and repack the system.img file and change it with original system.img file (even though I didn't change any APK or anything), I can flash it through fastboot or port 9008 successfully. BUT When I try to start my phone, It stuck on MI Logo screen.
So There is no problem with flash any rom. But I want to unpack rom and edit an APK then repack it. This is my issue. How can I do it? I think there is a problem on unpack/repack step. I'll be glad if anyone can help me about it.
Thanks in advance!
p.s. I can't flash a recovery rom because of I can't run phone.

Related

How to Flash Kernel Modules?

Hi, sorry this is a really basic question but I can't find a proper answer.
How do I flash the modules for a kernel? I found the modules folder inside the zip but there are lots of files in it, how do I flash them to my phone?
Also the flashing tools provided with some roms never work for me, fastboot always says something like "....fastboot-windows isn't a recognised internal command..." but I have no problem flashing the boot.img manually through fastboot. Is the flasher tool needed to flash the kernel modules?
Any advice will be much appreciated, I'm trying to get CM9 Domination working but it just boot loops, I assume because I'm not flashing the kernel modules.
Thanks.
How to flash kernels.
first off, there should be two parts to the kernel that you have, first the module, that should be in a .zip format, and also a .img file that should be "kernel-11".img or boot.img or something or other. First you need to open fastboot, and in Command prompt with the ".img" file inside your adb.exe/fastboot.exe/adbwinapi.dll folder that contains these, forward CMD to this folder, , type "fastboot erase cache", then "fastboot flash boot "kernel-11.img" or whatever your .img filename is, then after this is complete you need to reboot recovery, then go to install zip from SD, of which you needed to place the module on your sd card, then simply flash the file and you should have installed your kernel!
^Remember to Hit thanks! ^^
Also, in regards to the error, i dont think your using the folder that you need to be in, What you should do is create a folder somewhere that is convenient for you that you can easily access and remember the address, then add the files fastboot.exe, adbwinapi.dll and adb.exe to, which are all located in your android-sdk/platform-tools/!
Thanks smithr179, I thought I'd have to flash through fastboot or adb, no wonder I couldn't figure it out! Recovery sounds much easier, thanks
The modules in the file I have for the stock kernel are in a normal folder (not a .zip) but they are inside a larger zip folder containing the boot.img, meta inf and system folders. Do I just flash the whole .zip file or should the modules be in a zip of their own?
I'm trying hard to get to grips with all this lol Many thanks for your help
NB. I just tried flashing the whole zip file with everything in it and it worked! Modules were flashed as well as the boot.img. Thanks for all your assistance, much appreciated

Idol tools Suite for 4.7 [6039] version 21-11-2016

Hi!
I update the Idol suite for 4.7 6039 phone version, it is a Windows tools ( sorry).
Log:
It use ADB tools
Can unlock bootloader
Flash TWRP 3.0.0-0 for Idol 4.7
Backup yur phone ROM (need root)
Can boot in bootloader mode
Can reboot from bootloader mode
Can boot in to recovery
Can simply reboot the phone
Can extract the files from a ext4 image, like system.img
Can flash a single image
Can pull to edite the build.prop file and create a flash zip for it
Can boot in to twrp 3.0.0-0 with out flashing ( useful to recover the phone)
Can pull the apks from system and create a flash zip ( If you want to change something in apps or change a pp for another than you want to flash it again )
Can edite the apk files and create a flash zip
Can create a new Splash image and a zip to flash it
It have idol drivers for windows
NOTE:
Some tools are not mine, I simply put everything together in one place!​
I am not responsible for any damage they may cause to your device.
Use it at your responsability​
Extract the folder from zip in to descktop and execute the Idol_Suite_V3.exe file.
​
New_Idol_4.7_Suite.zip
Any issue please tell me!
Enjoy it!
The tool is update:
Now you can modify boot and recovery to.
thank you dude.
You can upload the file again
Thanks!!!
Hi Persona78, first can i say what a fantastic job you have done, most of my research on the idol 3 4.7 points back to you, hats off sir!
I'm still having a problem and i'm really at a loss here after about a week of no returns.
adb refuses to recognise my 6039y when in bootloader so i cannot flash recovery, or ROM, or any command. I have all drivers installed correctly, vendor id of 0x1bbb is set in a.ini file in adb_usb.ini, i keep search for different approaches but turning up nothing!
Are there anything to suggest? I would be most appreciative!
Thanks, Marlin

Unable to succesfully Unpack Boot image and ramdisk and then repack

I have a boot.img file that i can use to root my Samsung J2 SM-J260F - if I flash this with Odin everything is Ok. Now I want to edit a file in the ramdisk of the boot.img to make the phone boot on power. However simply unpacking the Boot.img and unzipping the ramdisk then repacking fails - even when i do not edit anything in the ramdisk. When the repacked boot.img is flashed with Odin the device gets into a boot loop.
I am using the Carliv Image Kitchen for Androidv1.3 tool to do the packing and unpacking.
Is there some specific aspect of the Samsung boot.img such as a signature that is causing this to fail?
Progress update
The only unpacking tool that seemed to correctly repack the image was MTK_Extractor_V2.63 - all of the other (many) utilities I tried did not seem to repack the ramdisk correctly and caused the phone to boot into the recovery screen.
Changing the init.rc and init_samsungexynos7570.rc files as follows finally led to success.
In file init.rc
delete everything under "on charger" then add back setprop sys.powerctl reboot
Under "service lpm /system/bin/lpm"
delete class sec-charger critical and replace with trigger late-init
In file init_samsungexynos7570.rc
delete everything under "on property:ro.bootmode=charger"
AndyJN said:
I have a boot.img file that i can use to root my Samsung J2 SM-J260F - if I flash this with Odin everything is Ok. Now I want to edit a file in the ramdisk of the boot.img to make the phone boot on power. However simply unpacking the Boot.img and unzipping the ramdisk then repacking fails - even when i do not edit anything in the ramdisk. When the repacked boot.img is flashed with Odin the device gets into a boot loop.
I am using the Carliv Image Kitchen for Androidv1.3 tool to do the packing and unpacking.
Is there some specific aspect of the Samsung boot.img such as a signature that is causing this to fail?
Click to expand...
Click to collapse
Did you unlocked the bootloader?
Also i would recommend you to use a custom recovery like TWRP to flash boot.img
AndyJN said:
I have a boot.img file that i can use to root my Samsung J2 SM-J260F - if I flash this with Odin everything is Ok. Now I want to edit a file in the ramdisk of the boot.img to make the phone boot on power. However simply unpacking the Boot.img and unzipping the ramdisk then repacking fails - even when i do not edit anything in the ramdisk. When the repacked boot.img is flashed with Odin the device gets into a boot loop.
I am using the Carliv Image Kitchen for Androidv1.3 tool to do the packing and unpacking.
Is there some specific aspect of the Samsung boot.img such as a signature that is causing this to fail?
Click to expand...
Click to collapse
TBM 13 said:
Did you unlocked the bootloader?
Also i would recommend you to use a custom recovery like TWRP to flash boot.img
Click to expand...
Click to collapse
Which.... does not exist. J2 Core doesnt get the same love.
I recommend Android Image Kitchen (AIK) by Osmosis. Havent failed me once in my case.
Prove N. said:
Which.... does not exist. J2 Core doesnt get the same love.
Click to expand...
Click to collapse
I'm sorry, my bad.
has anyone tried to port the 9 pie firmware from J260A to other J260F/M/G?

Question Please I need a boot.img from 12.5.6.0. RKHEUXM Global necessarily

I need a boot.img necessarily from 12.5.6.0.RKHEUXM GLOBAL.
Nowhere is this version of ROM in FastBoot format to download.
I need extract boot.img to magisk root.
I have an installed version of 12.5.6.0.
But I mistake I flash boot.img from version 12.5.3.0. , and now I have a broken system, it's not sound,wi-fi, etc.
Thanks very much
Hi. I used the boot.img from the 12.5.6 "Stable Beta" released a few weeks ago. I read somehere, here, that it is the same built as the one released over OTA a couple of days ago. And so far it's working fine. I have wifi and sound.
It is a recovery file, but you can unzip it and then use a payload dumper tool to extract the boot.img.
The recovery: https://xiaomifirmwareupdater.com/miui/alioth/stable beta/V12.5.6.0.RKHEUXM/
And this tool on my Mac: https://github.com/ssut/payload-dumper-go/releases/tag/1.0.0
kurtschmeichel said:
Hi. I used the boot.img from the 12.5.6 "Stable Beta" released a few weeks ago. I read somehere, here, that it is the same built as the one released over OTA a couple of days ago. And so far it's working fine. I have wifi and sound.
It is a recovery file, but you can unzip it and then use a payload dumper tool to extract the boot.img.
The recovery: https://xiaomifirmwareupdater.com/miui/alioth/stable beta/V12.5.6.0.RKHEUXM/
And this tool on my Mac: https://github.com/ssut/payload-dumper-go/releases/tag/1.0.0
Click to expand...
Click to collapse
If I may go off-topic for a question, recovery files are to be flashed in recovery? fastboot files in fastboot mode? hope you can help enlighten me.
I dont need recovery type rom , there is not after unzip the boot. img.
I need fastboot type rom, there is boot. img after unzip.
Thanks
I must flash boot.img over magisk, not twrp!
Please read my previous post again.
You can get a boot.img from the recovery file!
kurtschmeichel said:
Please read my previous post again.
You can get a boot.img from the recovery file!
Click to expand...
Click to collapse
Thanks very much I'll try it.
So far I have tried to extract boot.img from China V12.5.6.0.RKHCNXM Fastboot TYPE, I flashed it via magisk and everything works fine.
If everything works OK, then it's fine
When the official 12.5.6.0.RKHEUXM is published, you can still patch and flash its boot.img again, in order to be sure you have the right one. I will do it.
Or just wait for the Android 12 update.
kurtschmeichel said:
If everything works OK, then it's fine
When the official 12.5.6.0.RKHEUXM is published, you can still patch and flash its boot.img again, in order to be sure you have the right one. I will do it.
Or just wait for the Android 12 update.
Click to expand...
Click to collapse
;-)
To complete this thread, here is how I extracted the boot.img from the recovery file:
- Download the recovery file from here: https://xiaomifirmwareupdater.com/miui/alioth/stable beta/V12.5.6.0.RKHEUXM/
- Unzip it, you will find a payload.bin file inside.
- Download this command line tool for your platform, I used it on my Mac: https://github.com/ssut/payload-dumper-go/releases
- Unpack it and put the binary inside the folder of the unpacked recovery, next to the payload.bin file
- Run the command : ./payload-dumper-go payload.bin
- Let it do its thing and you will find a series of .img files, one will be boot.img
Credits: https://forum.xda-developers.com/t/tool-a-quick-android-ota-payload-dumper.4173271/

Question Can someone upload the boot.img from V13.0.5.0.SKOEUXM - cant boot to recovery anymore

Hey guys can someone please upload the boot.img from the FW V13.0.5.0.SKOEUXM?
I did a big mistake and thought that android 12 can boot in twrp (recovery). Flashed a wrong boot.img and cant get my phone working now. Only Fastboot is working - the normal Recovery didnt boot so i cant even install the Update through the orignal system recovery.
Cause theres only a Recovery zip of it online i cant use the MiFlash Tool, since a downgrade to Android 11 isnt possible
thanks a lot!
You can download the OTA zip file from Xiaomi firmware updater or by using the app MiuiDownloader from Playstore
Unzip, you will find payload.bin inside - use the PC tool (there is a thread on XDA) Payload_Dumper to dump boot.img and other images
Anyway, here is the link to the boot-stock-lisa_EEA_V13.0.5.0.SKOEUXM_12.0.img
I had extracted and renamed (name does not matter):
File on MEGA
mega.nz
oh god! thank you very much!
will test it in few minutes
edit: It worked instantly! you made my day
Can someone please upload the boot.img from V13.0.2.0(SKOMIXM) to root?

Categories

Resources