System folder explained. - Android Q&A, Help & Troubleshooting

I'm wondering what every folder contains in the system folder of a Custom/ROM. Can some please explain this to me. By system folders i mean:
app
bin
(csc)
etc
fonts
framework
lib
media
T9DB
tts
usr
vsc
xbin
Thanks.

system folder +1
I would like to add my interest to this thread. I know this is kind of a noob question, but short of perusing through the android documentation for hours, and buying an embedded Linux book, it would be nice to know. I would like to make a new port of ICS, and I cannot get proprietary drivers for some of the stuff in my device. It would be nice to export the closed binaries and then deploy them in my new port.
Alternately, if someone could point me to a better thread that would be helpful also. I have the repository for the Linux kernel, and the android one installed already, and I have been looking around for documentation, off and on, for weeks..................
The internet just has too much information on it :fingers-crossed:

You might look around for some tutorials on the "linux file system", since android mirrors much of it.

/system/app are system apps (the apk files)
/system/media has bootanimation, ringtones, notification tones, camera shutter sound, stock keyboard sounds, lock/unlock sounds, etc.
Other file I really don't know, but google is definitely your friend
Sent from my MB508 using xda premium

Related

[HELP][Q] CM7 Rom missing folders and files

Edited: I have figuered all out and have no more problem with missing folders and files. Thank you to the allmighty XDA search button, mother Google and one person who gave me some cool tips.
Hello, dear developers.
I have compiled CM7 from sources using Noejn's howto everything went fine I assume but after compilation is complete I am missing some folders and files in system folder of compiled files.
List of My files in system:
Code:
app
bin
etc
lib
usr
build.prop
I assume it should be like this:
Code:
app
bin
etc
fonts
framework
lib
media
tts
usr
xbin
build.prop
So the main thing is missing is framework folder with all files. I checked Noejn's Void for how the files should be or look like and found that my compilation is missing them.
How to add all those folders and files to complete rom to work? May the compilation went wrong or something? Maybe they are feched manually from sources or compiled separately from main building process?
dr.notor said:
You obviously need to state exactly the steps you have done so far. Otherwise, your guess is as good as mine.
Click to expand...
Click to collapse
I did everything exacly as writen in Noejn's HowTo.
1. Used Linux
2. Made Folders
3. Downloaded Sources
4. Instaled Java
5. Downloaded and extracted proprietay files to /vendor/lge
6. Built using terminal commands
7. Went to /out/target/product/thunderg/
8. Looked inside system folder... OMG some files are missing.
Click to expand...
Click to collapse
nikoltu said:
How to add all those folders and files to complete rom to work? May the compilation went wrong or something?
Click to expand...
Click to collapse
You obviously need to state exactly the steps you have done so far. Otherwise, your guess is as good as mine.

[Dev]Files of interest in the system

Alright, just got my hands on a system dump courtesy of loglud so I will be posting files (text files will include content that peaked my interest) here so me and other devs can see what we are able to toy with.
systemdump download link: http://dl.dropbox.com/u/15069134/SystemDump.zip
Current list:
/system/media/bnapps_icons\ <-- we can mod the app icons that come with the device so we can make it less-sucky.
/system/etc/bluetooth/blacklist.conf <-- referencing the bluetooth chip meaning we just have to find a way to activate it
/system/app/settings.apk <-- anyone think they can actually replace this with another gingerbread apk or decompile and discover if there is a custom intent? Warning: It does NOT work at all. I suggest against swapping the apk's out as it causes a force close.
/system/bin/bootanimation *Was told where it searches for bootanimations first so goto this thread for a new bootanimation: http://forum.xda-developers.com/showthread.php?t=1361735
Indirect said:
Alright, just got my hands on a system dump courtesy of loglud so I will be posting files (text files will include content that peaked my interest) here so me and other devs can see what we are able to toy with.
Current list:
/system/media/bnapps_icons\ <-- we can mod the app icons that come with the device so we can make it less-sucky.
/system/etc/bluetooth/blacklist.conf <-- referencing the bluetooth chip meaning we just have to find a way to activate it
/system/app/settings.apk <-- anyone think they can actually replace this with another gingerbread apk or decompile and discover if there is a custom intent?
Click to expand...
Click to collapse
Nice finds. Bluetooth will be intesting to test (about to do it right now).
As you know the Nook has a heavily modified framework, so I don't know if the stock settings app will work (but I'm about to find out and probably fark up my tablet).
Let me know how it goes anlog.
Indirect said:
/system/app/settings.apk <-- anyone think they can actually replace this with another gingerbread apk or decompile and discover if there is a custom intent?
Click to expand...
Click to collapse
Hmm . . . let me get a hold of it and I'll look at it tomorrow, I've already taken the rest of the week off (Diablo III beta key came in tonight).
You may not need to change out the settings.apk but just add another one to it.
I decided to hold off on swapping the settings.apk. Losing access to the real settings app with all of the Nook options might not be a good idea.
The main reason I wanted a full settings menu was to be able to get into the accounts sync settings, but I found an app to launch it.
Warning: It does NOT work at all. I suggest against swapping the apk's out as it causes a force close.
Indirect said:
A
/system/bin/bootanimation <-- It's not a .zip or anything, just a file...anyone know how we can edit this?
Click to expand...
Click to collapse
It's a binary file. This app executes bootanimation resources.
Example: on T-Mobile MyTouch 4G resources are in /system/customize//resource/htc_bootanimation.zip
You should search for bootanimation.zip and you can edit this archive
Indirect said:
Warning: It does NOT work at all. I suggest against swapping the apk's out as it causes a force close.
Click to expand...
Click to collapse
I read note, if you want edit system apps like Settings.apk you should sign them by personal keys only...
I was looking through and couldnt find a bootanimation.zip in the system so I'm checking the data folders now.
edit: What the hell, still can't find it.
Indirect said:
I was looking through and couldnt find a bootanimation.zip in the system so I'm checking the data folders now.
edit: What the hell, still can't find it.
Click to expand...
Click to collapse
I was using Absolite system to see if I could replace the bootanimation because I couldn't find it either. I did manage to make it go away and just had the splash screen. I'll look into this further today as well. I'm starting to get ideas as to which files you can and can't replace right now. Some will force an immediate reboot and get stuck in a boot loop. I also am trying to find what triggers and handles the home button menu, I am sure it is in the framework. I have framework.jar and services.jar decompiled and going through those as well. Reviewing logcats to see what I can track down. I have some other interesting stuff going as well
romified said:
I was using Absolite system to see if I could replace the bootanimation because I couldn't find it either.
Click to expand...
Click to collapse
Hmmm... Usually bootanimation is in /data/local/ or /system/media. May be it has different name?
/system/bin/bootanimation is the program that actually displays the bootanimation.
Normally it plays the contents of /system/media/bootanimation.zip, but it can also be hardcoded to play a fixed animation or designed to play a completely different format. (Such as on Samsung devices, where it only plays Samsung's QMG format until you replace the program.)
conundrum768 said:
I've already taken the rest of the week off (Diablo III beta key came in tonight).
Click to expand...
Click to collapse
conundrum768
Don't take this the wrong way, but I really hate you right now!
I tried getting in on the Diablo III beta, no luck!
Here is a file of some interest, it it looks to be encrypted because it would be of interest.
/system/recovery-from-boot.p
.p files are encrypted .m files. Not sure if anything exists out there to crack into that one, but I am sure it would tell some very interesting information and possibly allow hi-jacking the factory restore process?
Anyone familiar with .p files (pcode files) ?
---------- Post added at 12:20 PM ---------- Previous post was at 12:08 PM ----------
Also of interest are some .xem3 files under /system/lib/ducati
base_image_app_m3.xem3 --- 57 mb
base_image_sys_m3.xem3 --- 1.5 mb
I think could be system image files possibly from the little bit of research I have done. Due to the size of one of these (57 mb) and the name of the file, I was thinking maybe this is where the restore was getting it's base image from, but until I dig further I am not sure of that. The size of the file is what got my attention, much larger than other files in lib. That's half the size of CM7 in just one file.
Edit: These now look to be possibly drivers/firmware/images for Ducati and/or Pandaboard ? That's a large driver file....
The .p file is very much of interest I would think.
conundrum768 said:
Hmm . . . let me get a hold of it and I'll look at it tomorrow, I've already taken the rest of the week off (Diablo III beta key came in tonight).
Click to expand...
Click to collapse
It looks like the normal XML files are not controlling the layout and it is done through the smali files to get the custom actions and layout. A separate app to access development may be best for now, as we have been doing.
Unless someone edits the smali files of course, that's possible but will prove tedious and time consuming unless you have a lot of experience with these.
If you review the logcats from going into settings, you will see which smali files are involved.
I have almost a full system dump on an ftp so ill see about letting it be accessed.
Sent by breaking the sound barrier
Please upload full system dump from Nook Tablet
Please upload full system dump from Nook Tablet
How-to
1. Get root
2. Run terminal (enter su if symbol $ -> it will be changed to #)
3. Execute command mount
4. From list of partitions search for /system
Code:
Example: /dev/block/mmcblk0p27 /system ext4 ro,relatime
5. Dump it to sdcard with command dd
Code:
Example: dd if=/dev/block/mmcblk0p27 of=/sdcard/system.img
It dumps only system image not personal data...
I'll just upload a .zip to dropbox.
Is there a sanim.zip anywhere? If so, that's the bootani. If not, ill sink back to silence lol
Sent from my Samsung Legendary 4G, a Universe UTES phone, running "two.three.five"
I looked through and there are only a few .zip files but none of them actually contained a bootanimation. It really is annoying lol. This device is such a bastardized version of android, I can't wait to get past the bootloader. lol.

[Q] Converting Android Manifest.xml To readable, and vice-versa

Well, I was going to put an app up on the market for a seminar , [and yes, i did use that Google app Builder], so when i tried to upload it, it told me that some value in the AndroidManifest.xml had to be a 32-bit integer.
So, I opened up that apk, viewed the manifest.xml file, but it just looks like a load of gibberish to me -__-
Now, I'm a bit new to all of this, considering that 11th grade's keeping me a wee bit occupied, so I guess I'll need some help with this.
[And note: Umm. Do not flame me for coming up with this, I'm not blaming google's app builder, or anything like that, anyway]
I've come across a couple of things like apktool, but each time i run it, it tells me that there's a file in jre7 that cannot be opened, apparently. Touche :|
It's an old question, so I guess you don't care too much about the answer by now, but to help others with a similar query, there are 2 ways to read the AndroidManifest file if you have the apk file.
1) If you extract the apk to a PC, you can use the apktool or similar to get a text version of the AndroidManifest.xml file
2) Alternatively if you have the apk already installed on an Android device you can use something like App Detective (https://play.google.com/store/apps/details?id=com.zmarties.detective) to view the AndroidManifest.xml directly on the device, even for paid apps that you can't extract from the device. (Full disclosure, I wrote App Detective).

[Q] Samsung AllShare

Hey there, if I'm retarded and don't know how to search properly, flame away, but I found nothing. I really like having the allshare feature to stream to my Samsung TVs and Bluray players, but all the non-original roms have removed the allshare application. Does anyone have some insight for me?
flatlandju said:
Hey there, if I'm retarded and don't know how to search properly, flame away, but I found nothing. I really like having the allshare feature to stream to my Samsung TVs and Bluray players, but all the non-original roms have removed the allshare application. Does anyone have some insight for me?
Click to expand...
Click to collapse
Custom roms remove lots of stuff,no worries because you can always download a rom that you know has what you need and extract stuff.I'm pretty sure you are looking for this Dlna.apk for allshare.I extracted it out of the newest n7000 note stock dodexed-rooted rom.You will have to put it in system/app file and set correct permissions.There is a lot of info on how to do this in the forums if you don't know how.
technut said:
Custom roms remove lots of stuff,no worries because you can always download a rom that you know has what you need and extract stuff.I'm pretty sure you are looking for this Dlna.apk for allshare.I extracted it out of the newest n7000 note stock dodexed-rooted rom.You will have to put it in system/app file and set correct permissions.There is a lot of info on how to do this in the forums if you don't know how.
Click to expand...
Click to collapse
It still doesn't seem to want to let me install it no matter what I do or where I place the APK. I must be missing something.
Are you using tw rom or aosp rom. the stock dlna is for tw only. there are other apps that work like twonky.
flatlandju said:
It still doesn't seem to want to let me install it no matter what I do or where I place the APK. I must be missing something.
Click to expand...
Click to collapse
To install .apk's you need a file manager like esf file explorer and set the permissions in the settings of the app to:root explorer/up to root/mount file system as writable(this is how you are allowed to change permissions of .apk's) then it's a matter of moving the .apk file into the system/app folder and changing the properties of the .apk to rw-r--r--(see attached).That .apk might rely on .lib files or other files to run,I'm not sure,I looked for any lib files that looked like they might of belonged with that .apk but I couldn't find any.Anything really beyond this I am not advanced enough to help out getting it to run on your rom but many here are though.If you are on an ICS rom it will run on it though if you get the correct files and permissions.Good luck.
technut said:
To install .apk's you need a file manager like esf file explorer and set the permissions in the settings of the app to:root explorer/up to root/mount file system as writable(this is how you are allowed to change permissions of .apk's) then it's a matter of moving the .apk file into the system/app folder and changing the properties of the .apk to rw-r--r--(see attached).That .apk might rely on .lib files or other files to run,I'm not sure,I looked for any lib files that looked like they might of belonged with that .apk but I couldn't find any.Anything really beyond this I am not advanced enough to help out getting it to run on your rom but many here are though.If you are on an ICS rom it will run on it though if you get the correct files and permissions.Good luck.
Click to expand...
Click to collapse
Thank you all so much for the replies, I never knew how well one would be treated on here! I still haven't gotten it to work, probably due to being on the new PA cm10 release, but you guys are great regardless

[Q] how to merge JRD_custres apk´s with system apk´s?!

Hello guy´s I am a user of Alcatel OT-997D ("D"ual sim)
My problem ...
I have a extra partition called "custpack" symlinked to "system"
But is not a normal symlink
example
Code:
/custpack/JRD_custres/app/Email[B]-res[/B].apk
(contains recources and xml files)
/system/app/Email.apk
(containes only xml files)
or another example
merge SystemUI-res.apk(custpack) + SystemUI.apk(system) to SystemUI.apk (system)
How can I merge all files to one apk ?!
for example
Code:
Email.apk
?!
It is possible. But I don´t know what to do :crying:
My questions are all ignored... why ? :crying:
http://forum.xda-developers.com/showpost.php?p=40174749&postcount=538
http://forum.xda-developers.com/showpost.php?p=40174479&postcount=5258
nobody knowes something about ?
MaxAndroided said:
nobody knowes something about ?
Click to expand...
Click to collapse
We all Alcatel users have the same problem with custpack partition and files. If we want to try a different ROM, custpack partition makes it problematic. I found your question trying to get a response. So far there is a proposal by user yuweng related with scatter file when porting a ROM, you can find out more searching for this post in the MT65xx porting tutorial thread. The other thing is te Ewra Project ROM, the developers there have build a ROM for Alcatel devices with MT65xx chipsets and CWM scripts to backup and restore this custpack partition... maybe they have an answer.
Bumping this dead thread to draw attention to this.
It seems like this can simply be done by moving the actual apks to the location of the symlinked ones and remove the symlink creation from the updater-script, but I'm not sure and I think I tried it before and the screen never got past the boot-animation (but that might have been because I didn't copy the framework-res.apk, not sure). I'm currently playing around with this in the kitchen.
---------- Post added at 01:37 AM ---------- Previous post was at 12:38 AM ----------
kaiserII101 said:
Bumping this dead thread to draw attention to this.
It seems like this can simply be done by moving the actual apks to the location of the symlinked ones and remove the symlink creation from the updater-script, but I'm not sure and I think I tried it before and the screen never got past the boot-animation (but that might have been because I didn't copy the framework-res.apk, not sure). I'm currently playing around with this in the kitchen.
Click to expand...
Click to collapse
custpack/JRD_Custpack/apps/*-res.apk apps contain the apps resources i.e. the graphical png files used in the app but do not contain any code for running the application..
system/app/*.apks (deodexed) contain the code for running the application but do not contain any resources for the application.
It seems like this is an incredibly fragmented way of running the system. I believe the reason it's been done was so that manufacturers (or at least in alcatel's case) could custom theme most of the default system apps, like the phone, gallery, calendar, browser etc.
Still seems stupid.
I wonder if it's just a matter of combining the deodexed system/app/apk with the contents of the custpack/JRD_custpack/apps/*-res.apk and then resigning the apk, or if perhaps there's something in the system that hardcodes it to look in the custpack folder for certain apps (i.e. phone, browser, etc.)
MaxAndroided said:
Code:
/custpack/JRD_custres/app/Email[B]-res[/B].apk
(contains recources and xml files)
/system/app/Email.apk
(containes only xml files)
Click to expand...
Click to collapse
There are no regular way for doing what you want exactly because those resource files are not symlinked but you can try workaround with symlinking. In your example executive from /system/app/Email.apk calls for /custpack/JRD_custres/app/Email-res.apk to join resources. If you merge those two files into one, you got nothing because executive from /system/app/*.apk still search for /custpack/JRD_custres/app/*-res.apk but here is an idea what you may try:
First merge those two files into one: add resources from /custpack/JRD_custres/app/Email-res.apk into /system/app/Email.apk (decompile, join, recompile, sign, zipalign, you know the drill) and afterwards create symbolic link in /custpack/JRD_custres/Email-res.apk which points toward /system/app/Email.apk.
Code:
ln -s /system/app/Email.apk /custpack/JRD_custres/app/Email-res.apk
Possible scenario: when you start Email app, executive will search for /custpack/JRD_custres/app/Email-res.apk, which is now symbolic link and will redirect this request back to original APK (back to self) where resources are now. This should make you able to use various apps for changing themes on your ROMs or something like that.

Categories

Resources