How to create custom build.prop file to custom directory in aosp? - Android Software/Hacking General [Developers Only]

Hi all,
I am working on aosp and have two questions about build.prop.
1) Normally, build.prop file is located to /system directory. I'd like to create custom build.prop file and save it to different directory. For example, I have tvconfig directory and want to create it in here. Could I read properties from /tvconfing/build.prop via SystemProperties?
2) Could I use different name for prop file except build.prop for example mycustom.prop
thanks in advance

batuhanavl said:
Hi all,
I am working on aosp and have two questions about build.prop.
1) Normally, build.prop file is located to /system directory. I'd like to create custom build.prop file and save it to different directory. For example, I have tvconfig directory and want to create it in here. Could I read properties from /tvconfing/build.prop via SystemProperties?
2) Could I use different name for prop file except build.prop for example mycustom.prop
thanks in advance
Click to expand...
Click to collapse
Not sure if it would work, but one idea to try is creating a symlink from the file you want, to the build.prop file. If it works, you could also rename the file. Just an idea? I use this technique for the hosts file myself. see the code in https://forum.xda-developers.com/an...osts-diamondjohn-host-builder-script-t3872728
The next choice would be a magisk module.

I need help with a Custom recovery for Fero Royale LTE

MICHAEL(SMHOS.ORG) said:
You can't really do that but you can make custom Changes or specs to the build.prop,like improve Speed or So, increased or reduced screen size fake android version etc
Click to expand...
Click to collapse
I understand that I can't move build.prop file to different directory except /system directory. Well! Can I do that create mycustom.prop file in different directory and read any property from it via SystemProperties?

Related

How to make a CWM file

Hello, I have searched everywhere and cant find the answer to my question. I wanted to replace a file using CWM .zip how in the heck do I do that? Most of all I just wanted to learn how to do it as well...
Thanks,
Chad
Well to begin with you can take an existing zip with the file path you need, delete everything in the folders not touching the META-inf folder at all, those are the install instructions, and put the file you want to flash in the correct folder. I think thats how everyone starts out.
studacris said:
Well to begin with you can take an existing zip with the file path you need, delete everything in the folders not touching the META-inf folder at all, those are the install instructions, and put the file you want to flash in the correct folder. I think thats how everyone starts out.
Click to expand...
Click to collapse
but your update-script has to match what you are flashing via cwm. if you take a rom zip and just pop in a few files in place of the whole rom structures, your flash will fail because your update-script is looking for specific structures.
Oxicottin said:
Hello, I have searched everywhere and cant find the answer to my question. I wanted to replace a file using CWM .zip how in the heck do I do that? Most of all I just wanted to learn how to do it as well...
Thanks,
Chad
Click to expand...
Click to collapse
One way would be to use: Update Zip creator/modifier (Requires Windows)
yeah it would be bad mojo if you used a wipe rom zips META INFO to make an update zip.....
Thanks a million everyone......
Sorry for being late to the party again.. Here goes my attempt at an explanation though:
Essentially, a CWM flashable zip is just a zip file with the file system replicated in it. So for example, if you wanted to add swype, and you know Swype.apk would regularly go in /system/app, then you would create a blank folder called 'system', and another folder inside system called 'app', and put your Swype.apk inside that. (/system/app/Swype.apk)
After that, all that's left is to build an update script. So, from your root directory (where your system folder is), you would make another directory called META-INF, with a folder inside called 'com', another one inside that called 'google', and finally one called 'android' inside that (/META-INF/com/google/android), you put a text file in there called 'update-script' that tells recovery what you want to do (in this case, copy swype over to the corresponding directory on the file system).
http://forum.xda-developers.com/showthread.php?t=641223
^There's a guide for how to make those. You can also pick apart any rom you find in the dev section and check out the update script for reference.
After that, it's just a matter of zipping up all the contents in your root directory, then signing the zip with testsign.jar
modest_mandroid said:
Sorry for being late to the party again.. Here goes my attempt at an explanation though:
Essentially, a CWM flashable zip is just a zip file with the file system replicated in it. So for example, if you wanted to add swype, and you know Swype.apk would regularly go in /system/app, then you would create a blank folder called 'system', and another folder inside system called 'app', and put your Swype.apk inside that. (/system/app/Swype.apk)
After that, all that's left is to build an update script. So, from your root directory (where your system folder is), you would make another directory called META-INF, with a folder inside called 'com', another one inside that called 'google', and finally one called 'android' inside that (/META-INF/com/google/android), you put a text file in there called 'update-script' that tells recovery what you want to do (in this case, copy swype over to the corresponding directory on the file system).
http://forum.xda-developers.com/showthread.php?t=641223
^There's a guide for how to make those. You can also pick apart any rom you find in the dev section and check out the update script for reference.
After that, it's just a matter of zipping up all the contents in your root directory, then signing the zip with testsign.jar
Click to expand...
Click to collapse
Is there a way from the CWM interface to do the same with a backup you create? I noticed backups are not in the same format, they are usually .img, .tar, and an md5 file?

Build.prop

Can anybody please (that are running a default Sensation ROM) copy and paste their build.prop? I need it so I can edit the settings to get apps in the marketplace. Thanks!
N4rbs said:
Can anybody please (that are running a default Sensation ROM) copy and paste their build.prop? I need it so I can edit the settings to get apps in the marketplace. Thanks!
Click to expand...
Click to collapse
You can download whatever ROM you need the build.prop file from to your computer and open the zip file to drill down to the /system/build.prop file.

[Q] Simlink entire folder and giving permisions?

Hi
I want to include many applications in a rom I've created. The problem is that many of these apps wont work unless I extract the *.so files from inside the lib directory of the apk and copy those libraries to my rom (/system/lib) and give correct permissions (0-0-644).
Because these lib files are too big and taking large space from the system partition, I want to place them all in /data/data/lib directory and simlink this directory to /system/lib.
Can someone please provide the correct lines of code for the updeter-script to do that? How do I simlink entire directory? And how do I give correct permissions? Do I give permissions to the original directory (/data/data/lib) before simlinking, or do I give permissions to the virtual linked directory (/system/lib) after simlinking?
Thanks

[HELP] I need build.prop

I have a broken build.prop for my S6: can someone be so generous to send me this file from G920FXXU1AOE3_G920FITV1AODQ_G920FXXU1AOE3_HOME ? I'm not able to extract following this tutorial http://forum.xda-developers.com/showthread.php?t=2294909 (ext2explore wasn't able to open the system.img)
Use a root enabled file explorer like Root Explorer or ES File Explorer to open the rom.zip you are running. Go to /system and extract build.prop, then go to the folder where the file was extracted to (I use Root Explorer which extracts to /sdcard0/storage/SpeedSoftware/Extracted). Copy the extracted build.prop to your phone's /system and overwrite the existing build.prop. Make sure the permissions are rw-r--r-- and reboot.
Protip: After flashing a new rom, backup the original build.prop before making any changes or flashing any mods. Save it as "build.prop.original". That way, you will always have a backup copy of the original file. Some file explorers (like Root Explorer) will automatically backup files when you edit them, but they append ".bak" to the existing file. So if you edit build.prop more than once, your original "build.prop.bak" is overwritten, and the backup is no longer the original file. However, if you save the original as "build.prop.original", it never gets overwritten.
It works! Thank you!
Inviato dal mio SM-G925T utilizzando Tapatalk

help edit android file

Hello, I am trying to modify my cell phone "samsung galaxy s6" with android 11 "lineage 19.1 unofficial", twrp and magisk installed, the root is working, I have modified several files with a magisk module that I am doing, the file that I want to modify is "/sys /kernel/debug/sched_features" but I can't. It has permissions of 666 and it is the root owner. Is there any way to edit it? . i was thinking of editing twrp backup but i dont know how to unpack the *.win file
You have root in TWRP, so what's the problem?
twrp does not save changes
kuroro82 said:
twrp does not save changes
Click to expand...
Click to collapse
What are you doing?
I create a backup with zip I open it in notepad++ without decompressing it I edit it I give it save the 7zip it asks me if I want to update the file I put it if I put it on the cell phone and flash it I restart the cell I check the changes and nothing happens
You can change the contents of the file directly in the TWRP terminal while keeping the ownership of the file (chown) and its permissions (chmod)?
kuroro82 said:
I create a backup with zip I open it in notepad++ without decompressing it I edit it I give it save the 7zip it asks me if I want to update the file I put it if I put it on the cell phone and flash it I restart the cell I check the changes and nothing happens
Click to expand...
Click to collapse
Make sure the partition where the mentioned file should be copied onto is mounted as RW.

Categories

Resources