[NEED HELP] How to edit the GSI or .img Files for Fixing Bugs - Treble-Enabled Device Questions and Answers

Okay,
I've taken Erfan's GSI file to make it bugless for our Device..
When I went to edit and modify that img file (A GSI File),It behaved pretty well..
Then, When I've Repacked the image file and Went to flash the file(Ofcoused,Flashed Successfully) , It behaved an odd way!,Well It booted to the Bootloader after showing the Logo...(In just 3 seconds)
I would like to ask you guys, Where did this go wrong
I would be thankful to you
Yours Obediently,
Shravan Vadeghar

Man ... Do patch with files ... if you make zip , you can flash zip with files to repleace incorrect files to correct files ...

That was my patch for build.prop . You must modify the meta-inf to working correct , and repleace/delete build.prop in my zip This zip is only sample , and is only for twrp .

I was talking about the .img file

I unpacked with AutoTool and repacked. And my device goes to bootloader too. I guess some repack tools have problems. Or maybe we are doing something wrong with file_contexts.
Edit: I think problem is with file permissions. Make all folders chmod 755 and make files and apk and such chmod 644. Best of luck.

Related

help with flashable zips for a rom im maken

im trying to make my own rom trying to try new this out and i was going around taken lil apps tht other roms hads like hulu, mastermind mirror, ect and i dont think i zip it correctly cause when i check the inside of the zip folder the other file is still not zip and i am sure that is a problem right ??? ps im using cwm 3.0 is tht a problem ?
i use this meth...
ok, here it goes.
first, figure out where you want to push your file. i'd reccomend pushing manually in recovery to make sure the file itself works. then, using a tool like 7zip (pc) or betterzip (mac) create a file structure that matches the one on the phone. for example, if you wanted a boot animation to be put in system/customize/resource, make a folder system, customize in that, resource in that, and the bootanimation.zip inside that. now you have the main part. next, make a folder in the root of the zip called META-INF (caps counts) inside that, com, inside that, google, and inside that, android. thats /META-INF/com/google/android/. inside android, you need to place in an update-script. i'd reccomend taking one from another zip and just editing it becasue i still have not figured out a way to make that type of file (unix exec) from scratch. open it up in a .txt editor like notepad++ (pc) or coda (mac) and write your script. here is the baisic script for copying the directory system on the zip to system on the phone (like flashing a boot animation).
copy_dir PACKAGE:system SYSTEM:
CAPS COUNT AND MAKE SURE YOU HAVE AN ENTER AT THE END. IF YOU DO NOT HAVE AN ENTER AT THE END (TO MAKE IT TWO LINES INSTEAD OF ONE, LIKE ISSUEING A COMMAND) THEN IT WILL NOT WORK AT ALL ( E:SYNTAX ERROR IN UPDATE-SCRIPT IS THE ERROR YOU WILL GET)
so put this file into the folder android, and zip it. make sure it is in store only, compatibility mode, if you have such options. then, use an auto signer (or just say zip is not signed and make sure to put sig verification off) to sign the zip. flash, and watch your work magically appear.
the update-script i showed is written in amend. i have no idea how to write in edify bcuz it is much more complicated with the binary and stuff. so dont flash with cwm 3.0+.
i only have 1 thing to say first switch to amon ra amon ra is 1000 times better than clockwordmod
how do i switch?? lol also what if i unroot my phone would tht be a problem?
Jcki4 said:
how do i switch?? lol also what if i unroot my phone would tht be a problem?
Click to expand...
Click to collapse
go here and download the PC36IMG.zip and follow the directions
http://forum.xda-developers.com/showthread.php?t=705026.
as for setting up a rom unzip one to see how it's set up, i have changed a few things in some and zipped it back up and signed it but never built one, sorry couldnt be more help

[NST] HELP IN PATCHING framework.jar

HI EVERY BODY, I REALLY NEED HELP IN PATCHING this files to get Arabic support. I am not an expert with patching and code stuffs . Last days i was trying to root my nook. First i rooted with Slasicha but i was not able to run android market,
then restored and rooted again with minimal touch. i was afraid of it because it involves installing cwm which i don't know any thing about it, but with following steps and instructions, It worked . also Google apps and market
files that i need to try patching it
framework.jar
libwebcore.so
framework.jar takes care of shaping texts in android on all texts except Gmail and the browser, while libwebcore.so takes care of shaping texts in the default Browser and Gmail app.
This patcher will attempt to get you Arabic support in both of these files.
This should work with all Android phones sporting Android
these steps taken from here :
http://blog.devasque.com/?page_id=11
by madmack member
http://forum.xda-developers.com/member.php?u=1436971
Requirements:
Your device needs to be rooted.
Your Android version is 2.1 or newer
Your ROM needs to be deodexed. To find out if your installed ROM is deodexed, navigate to /system/framework on your phone. If you see a file called framework.odex then this patch will NOT work for you.
Your rom is not based on MIUI.
Steps to apply the patch:
Download the patch below and extract it to a folder on your computer.
Pull /system/framework/framework.jar from your phone and place it in the subfolder input that you extracted in step 1
If you’re not using a CyanogenMod ROM, then you’ll also need to pull /system/lib/libandroid_runtime.so from your phone and place it in subfolder input that you extracted in step 1
If you’re interested in getting arabic shaping in the Browser, pull file /system/lib/libwebcore.so from your phone and place it in subfolder input as well.
Double click on commands.exe. Do not close the black cmd screens that will pop up. Once the patch is done, you should get a patched framework.jar in the subfolder output
Version 0.800 provides a recovery flashable file in folder output. Place that on your sdcard, reboot into recovery and flash it. If the flashing through recovery didn’t work for some reason, you’ll need to do the following manually:
Put file output/framework.jar in your phone at /system/framework/
Put file output/libandroid_runtime.so in your phone at /system/lib/ (if this file exists, it shouldn’t if you’re arabizing CM6).
Put file output/libicuuc-arabic.so in your phone at /system/lib/ This is extremely important, failing to place this file will result in a boot loop of your deivce
If file exists: Place file output/libwebcore.so in your phone at /system/lib/
If file exists: Place file output/lib__bcore.so in your phone at /system/lib/
I’ve also included the Aljazeera fonts in fonts. You can place these in /system/fonts and reboot
Sometimes permissions and xml data doesn’t get updated correctly resulting in corrupted data entries. If you receive a bunch of Force Closes after a reboot, you’ll need to Factory Reset.
member: dark hawk, on this post
http://forum.xda-developers.com/showpost.php?p=22521341&postcount=17
said ,
dark_hawk said:
As for how to add Arabic, I'll add a guide soon, it involves patching the Framework.jar only, as I found that patching the lib files causes crashes in the anything related to the stock browser , like gmail and such. But all in all, You'll have Arabic in everything else.
Click to expand...
Click to collapse
but he did not answer, i hope he is ok
can someone help me with that a screenshot with these website :
www.ce4arab.com
www.bbc.co.uk/arabic/
, it would be a great help

[BOOT LOOP]Afternediting a config file for Bluetooth root explorer

I edited a configuration file for Bluetooth(main.conf) in which i changed the device discoverable for value to be 0 (by default 120). then i left the folder as is (r/w) mode and saves and rebooted.
rescue mode is available(volume up - home -power)
boot loops continously
Kies not recognising when connecting when the device is turned off
there is a backup of the file at the same folder..
if you can provide me too ..how do i upload to my phone.
need help ASAP.
try installing firmware with odin
Other better ideas!
I am pretty sure that this matter was triggered because of that tweak..(editing of the file). I hope that restoring the original file would help.
Do you know about adb...?
Also i forgot where the actual bluetooth configurations file was in the root folder structure
adb will not work on device in recovery/download mode
to use adb mobile needs to be running
you can flash cwm in your mobile then upload the file and send me the link i will make a flashable zip and upload it then you can flash it
adb is running...just
Adb is running (while the phone keeps on showing boot animation-samsung logo-bootanimation-samsung logo-bootanima....) but it seems that it has permissions issues..i unrooted my phone before using adb .
i can access adb shell and list root directories but cannot enter further directories such as data\ permission denied
I donot have the file that i changed and quiet cannot remember it..
Check on your mobile and see for
data/misc/bluetoothd/
if it has files such as music.conf,main.conf etc etc..then this is the needed folder..
can you create a update.zip
like i used for rooting/ unrooting .that doesnt need CWM
that empties the directory ,because it has some backup files .bak created by root explorer
loads files from your mobile
i am currently unrooted ..do i need root?
actually adb works during splashscreen
get the original file and push it through the system, set permission and it should work
if all else fails,..... odin
download update.zip from http://dl.xda-developers.com/attach...5498d4d803e6a/4fcc0dd2/7/6/3/0/8/8/update.zip and place it in the root of your sdcard
go to recovery flash it you will get root then you can use adb
if it is not flashing first flash cwm through Odin then flash this update.zip through cwm
The file you sent is invalid. corrupt..?
what does this do..exactly.
i already have a update.zip and update-unroot.zip to root unroot my device
so
do i need root permission to use adb..because commands like
adb root gives"error not available in production devices"
&
adb shell
$ su
etc are showing permission denied.
if you have the original files on your galaxy y.. can you make update.zip with the above instruction
if adb works..i dont exactly remember the file path that i changed..so using the hints above please can you send me the file path
My aim here is to use odin or factory reset only at the last.
just root the device by flashing the root.zip in recovery and then use
adb shell
su
and it will work
No still get permission denied.... like always.
cd data
ls
open directory failed, Permission denied.
1. flash cwm recovery through odin
2. then upload the original file
3. I will create a update.zip and will upload it
4. you will need to flash it in cwm recovery
i will flash CWM using cwm.zip
i dont have the original file as i could not pull through adb..i hope your file may work
Finally i remembered the directory
/etc/bluetooth
the file i modified was main.conf however whole folder can be replaced from your mobile's or original one.
Thanks
y2k2r2d2 said:
i will flash CWM using cwm.zip
i dont have the original file as i could not pull through adb..i hope your file may work
Finally i remembered the directory
/etc/bluetooth
the file i modified was main.conf however whole folder can be replaced from your mobile's or original one.
Thanks
Click to expand...
Click to collapse
http://db.tt/2NStXBF8
flash it in recovery but it may not work as I don't have galaxy y I have a different mobile
it didnt allow installation both through cwm and recovery mode
& now
i messed up with CWM
backup-restore feature
create backup
edited the system.tar
put the original file
calculated md5 for new system,tar
edited the nandroid.md5 with appropriate editor and filled with the new calculated md5 of system.tar
advance restoore....select system files...
md5 check pass
restore fail
now boot stuck at initial screen
pretty sure even wipe data wont work
So i Had to resort to ODIN..Thanks for your time mate...
humm
I also think Odin is the last choice

Flashing is not working (at all)

Been busy for a week now to create my own custom rom. I got the advise to build the ROM i want by edited the ROM i have now on the phone by edited it all on the phone. Then i did the "dd" command to extract the rom to a system.img file. Created a META-INF folder with a updater-script where the locations are defined like how the structure is on my phone. Zipped the META-INF folder incl. the system.img to get it ready to flash.
But when i try to flash that it keeps saying ERROR: 6 in WTRP.
Because flashing any other custom rom is workng, i am doing something wrong here, but i really don't know it anymore because i have run all out of options.
Anyone a tip which i could do?

Can't seem to patch stock rom using magisk v23, do I have the right file? What am I doing wrong?

I'm new to rooting and I'm trying to root a Pixel 3a XL I've just inherited. Following steps from a tutorial, I've unlocked the bootloader and installed Magisk v23.0 on the phone, and I copied on the internal storage all the files from the zip file I downloaded from Google that are supposed to be the stock ROM for my build #. There are 2 .img files in there: bootloader-bonito-b4s4-0.3-7062600.img and radio-bonito-g670-00105-210113-b-7078968.img (there are a few scripts and another zip file in there too). The first one seems to be the boot file (Ramdisk is YES in Magisk), but when I try patching it (Magisk Install > Select and Patch a File > I choose the file via my file manager), I get the following error messages: 'Unsupported/Unknown image format' 'Installation failed'. The same thing happens if I try the other image file.
I obviously don't want to trial and error too much patching a rom that I'm going to flash my phone with. Any idea what I'm doing wrong there? Thank you!
EDIT: I had also done a checksum of the archive I downloaded from Google and it all lined up, so that shouldn't be the issue.
you need to patch the kernel. inside the zip is a second zip. in there is a file boot.img. that is the kernel. extract and copy it to your phone, then you can patch it, copy it back to your fastboot capable machine, and flash
ei: boot.img within a .zip within a .zip
hp420 said:
you need to patch the kernel. inside the zip is a second zip. in there is a file boot.img. that is the kernel. extract and copy it to your phone, then you can patch it, copy it back to your fastboot capable machine, and flash
ei: boot.img within a .zip within a .zip
Click to expand...
Click to collapse
It worked, thank you so much!

Categories

Resources