[Q] Simlink entire folder and giving permisions? - Android Software/Hacking General [Developers Only]

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

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?

[Q] apk file parsing

Each and every android application is bundled as an apk file. When an apk file is installed different entites (files) of the application are stored in different parts of the system.
How can i find out where all the files of a particular application are stored inside the android file system? Is it the right way to parse apk file and find the places where all the parts of the app are stored?? Any ideas?
The apps .apk file should be in /data/app while the apps personal space with settings,configs etc. are in /data/data/packetname/
If it is preset to install to sdcard there is also /sdcard/Android/data
For files that get created on the /sdcard, there is no way of tracking/knowing what belongs to what app.

Solution: Shared Library Crash With Terminal

I was getting something like this error after compiling and integrating Term.apk and it's dependent libjackpal-androidterm3.so file in several 2.3 and newer ROMs:
UnsatisfiedLinkError: Cannot load library: reloc_library : unknown reloc type
It turns out that the libjackpal-androidterm3.so file in the apk was not the correct file to copy to /system/lib. I checked the source directory and in the /obj directory there was another libjackpal-androidterm3.so file that was much larger. I copied it to /system/lib and terminal works great. The file does get compiled during ndk-build; it is not pre-included with the source.
Usually I am able to copy library files directly from the apks. This apk was different for some reason. Anyway, I hope this helps someone.

apk permissions

hi all, I know that for showing apk permissions I need to use aapt d permissions /path/to/com.your.package.apk
is there a way of having this command run through a folder with 100 apk files and dumping into a text file the name of the apk and its rights so one text file will give me all the apks and their rights in thant folder instead of having to check each apk separately.
john

How to create custom build.prop file to custom directory in aosp?

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?

Categories

Resources