[q] obtaining prop files, binaries<help> - Android Q&A, Help & Troubleshooting

well the net is jam packed with tuts and how tos on setting up build environments, and building/ compiling or just plain cooking roms/ kernels.
and everyone is different in its own way, but everyone of them is the same when it comes to putting in device prop files,binaries.
a little vague, and assumes you have them. lol
so i have a sudo supported device, lgp505. i am trying to obtain prop files for it so i can build GB. i do not have an extract-files.sh that works, i have ics,jb prop files and the extract script from that git tries to cd to a folder that is not there.
how do i go about getting GB prop files. what files do i need, and how do i get them and the .mk files into source in order to compile?
thanks abunch.

Related

Help with Audio Mod... [Need help from an Android Dev]

Ok, basically my linux knowledge is very limited and i need help modifying a file that gets written on boot (i don't know if this would even work, so if someone could answer that it would be very much appreciated).
The file i'm looking to change is '/sys/module/q6audio/parameters/speaker_max_gain'. In the latest 2.1 build this file is set to '602', which i think explains the slight volume increase from 1.6 (it was set to '600', but located in 'sys/module/msm8k_cad_volume/parameters/handset_max_gain' instead)
So, does anyone know how to alter this file? I know it gets re-written every time you boot the phone, but i can't find where it's being written from. Is it a kernel thing or am I completely wasting my time with this?
Cheers
UPDATE - Thanks to @VogelDerNacht, i've tried a few things like trying to change the value in the init.rc (echo "value" > sys/module/q6audio/parameters/speaker_max_gain) which didn't work, and i then tried to use a sysctl.conf in /system/etc/ to do the same thing, which also didn't work (don't think the kernel supports this), so now i'm pretty stuck
It seems like i may have to wait for the kernel source to be release now ><
how about creating a simple shell script and having it execute as a service from one of the init scripts ?
its possible the sys entry is not created until later in the boot sequence
DJ_Steve said:
how about creating a simple shell script and having it execute as a service from one of the init scripts ?
its possible the sys entry is not created until later in the boot sequence
Click to expand...
Click to collapse
could you give me an example please? i'm pretty new to all this linux stuff
The problem seems to be that when i add the line in to the init.rc (or any of the init files) it gets overridden by something else (probably the kernel) and i can't get it to apply my changes. I can change it fine whilst the phone is running, but that doesn't do anything because i think these files only get read from once when the phone boots.
I could be completely wrong though, like i said, my linux knowledge is pretty bad ><
First you need to confirm that entry boosts what you want
DJ_Steve said:
First you need to confirm that entry boosts what you want
Click to expand...
Click to collapse
That's the problem. I think it reads from the file only once when the phone boots but i don't know, that's why i want to change it on boot to see if it works
their should be a simple script (.sh extension) in /system/etc that you may be able to edit to add echo *your value > sys path to end of
DJ_Steve said:
their should be a simple script (.sh extension) in /system/etc that you may be able to edit to add echo *your value > sys path to end of
Click to expand...
Click to collapse
Tried that. Tired editing the init.rc, that didn't help. I tried adding a sysctl.conf but i don't think the kernel supports it. I tried editing every .sh file i could find but it looks like the kernel just overwrites everything
ok if you fancy a hand trying to get the volume to boost drop me a pm as i woudln mind being a tester ffor playing with werid options (and since iport android anyway i know my way around

[Q] Making / editing custom ROM's using Linux

I'm looking for a little bit of help with understanding something.
My ideal place to get to is to eventually provide the community here with custom roms and mods which everyone can enjoy on their devices, just like what all the greats devs do here day in day out.... but before I get there, I'm on a path of discovery. At the minute, I want to take a XDA dev's already pre worked ROM, go in to it and change a few things up.... edit the apps, maybe play with a few apks, change the ringtones etc, and then resign the ROM and flash it to my device.
I've been reading some great tutorials such as http://forum.xda-developers.com/showthread.php?t=1801690 and http://forum.xda-developers.com/showthread.php?t=1843506 which I am finding very helpful, however....
They seem to be geared towards someone working on a windows machine. I dont want to do it in Windows, I want to do it in Linux... I dont wish to use "CygWin" and I would rather do it manually than use a kitchen - I could easily follow these guides in Windows and achieve my stated aim of a slightly modified custom ROM, however, the overall goal here is to acquire knowledge, and enjoy the process as it goes along.
Now, my current understanding under Linux (Mint 13) is that I can download a recovery flashable Zip, go in to it, and just change up some of the files as I desire.... but then I get confused when it comes to repackaging the ROM prior to flashing it to my device. How would I go about doing this?
As a side note, when it seems that all development for these devices is done under Linux / Mac... why do all the newb guides steer you to Windows?
Are you asking how to rezip or how to recompile?
If you're asking about zipping up the folder, go here:
http://forum.xda-developers.com/showthread.php?t=1499885
If you're asking about recompiling, it should state how to do so on the page you got the apktool from.
Hi, thanks for your reply. I guess for now what I am asking is how to get the ROM back to a flashable zip file.
The I believe is that you need to have the ROM signed. The windows tutorials point you to a batch file script that does the signing and creates you an "update.zip" file. What id the alternative to this under linux?
Also, in the post you just provided a link to, someone says that you must also edit an update script to reflect the changes you made, such as any apks removed or added etc, where would I find this?
You need signapk.jar which I believe is included in the android sdk if not just Google and you can find it, once you have that you need a key to sign with, again Google for a testkey.
Then in your terminal you would run:
Code:
java -jar signapk.jar certificate.pem key.pk8 your-update.zip your-signed-update.zip
Sent from my PACman GT-I9100 using xda premium
Excellent, thank you very much.. will play with this later

[Q] Recompile system app from java files

Hello XDA-Members,
I want to add some function to my system music player app. So I decompiled the classes.dex with dex2jar, copied the source code and add the code for my functions. Now my problem is that I do not know how to recompile the app. I can't compile it with Eclipse because it uses some system namespaces (in Eclipse it is an error so I can't compile) How can I recompile the app? I only have the *.java files.
Or can't I use the java files and have to edit the smali files? Of course that's much harder...
Greetings Cilenco
Do you mean this music player? https://github.com/android/platform_packages_apps_music or the google play music one? If you mean the first one, try to edit the original source as it's provided by google and if you don't manage to compile it, send it to me and I'll give it a shot At the moment, I'm building PA so my linux system is busy, but if it's done I'll try to get your files compiled
If the second is the case, one problem is that google play music is not open source (afaik) and java files sometimes aren't decompiled right. Anyway, if you sent me the java files I could try to compile them as well
Sorry that I didn't named the app. I have a custom ROM and it is the music app from Sony Ericsson. Here is the apk:
http://goo.gl/GwdqYU
David:D said:
If you don't manage to compile it, send it to me and I'll give it a shot
Click to expand...
Click to collapse
What would be your way to compile the source files? Is there a way to compile the java files with Eclipse although the app uses system resources and libraries? Of course I can get all resources, the manifest and so on from apktool. I mean if you can get it work I want to learn it too. I think this is a very exciting piece of coding / reverse engineering. I'm able to decompile system apps, change their resources and so on but I do not know how to compile them from java source.
I'm building some ROMs on my PC so if the app uses some system resources and libraries, they should exist in this build environment I would basically try to put your files as an additional package in my build environment.
Ah okay I believe I understand: To build an system apk from java code I have to build the whole ROM again? Is the flashable zip enough to compile the apk? Probably not, right? I use a custom ROM from the forum here so I think I don't get the source. Or can I use the source from the sony developer site?
Is there any tutorial or guide how I can do this? Maybe I want to do this with more apps so it would be great if I can do it for my own and do not have to ask you all the time
p.s maybe we should write PNs then we don't spam the forum and we can write on German
Ok, I had a look at the apk and it seems like it's not correctly decompiled. I could easily import it to eclipse but the problem is, that some types aren't named correctly. That caused about 3000 errors No system files are missing, it's just not possible to completely decompile it. Maybe some parts of it are obfuscated (one problem was, that there was a com.scalado.a package and a com.scalado.a type etc.)
At least, I wasn't able to completely decompile it... I used dex2jar to convert it to a jar file, then I decompiled the class files using jd-gui and got the resources + androidmanifest.xml from apkool. How did you decompile it?
Probably, you'll have to edit the smali code...
Or maybe it's possible to just compile the files you need. Maybe it's enough to place the jar-file in the classpath so you don't have to decompile all dependencies. What files did you edit?
Hi,
Could anyone help me with my problem?
I'd be eternally thankfull
See: http://forum.xda-developers.com/showthread.php?p=48976088#post48976088

[Q] Proper way to remove a package from source?

Hello all,
I am working on a custom CyanogenMod ROM (10.2) for my own use. I've managed to accomplish most of my goals. One thing remains: removing packages that I don't want/need from the build. Technically, I am able to do so already by modifying the Android.mk file of the package so that it produces errors during the build procedure, skips building the package, but doesn't stop the entire build process. However, that is just a lousy hack.
Can anyone point me to the correct .mk/.sh/.whatever files in the repository I would need to edit (there are probably several) so that I can skip building the packages I don't want included in my ROM? I want to avoid using a "kitchen" if I can. I won't actually learn anything if I use a kitchen.
Files to look at
After laboriously looking through the repository, I came accross several files/directories you may need to look through/edit to remove packages from the build:
This directory (replace cm102 with your path to your Cyanogen repo):
/cm102/vendor/cm/config
This file:
/cm102/android/cm-10.2-M1.xml (<- This is a long file, dig through it. I edited this to help me remove some prepackaged live wallpapers, but there is a lot more in here.)
Device specific CM makefile that may specify additional packages to include (replace the all caps with whatever seems logical in your directory at each step):
/cm102/device/YOUR_MANUFACTURER/CODENAME-COMMON/CODENAME-COMMON.mk

How To Know Which Files Are Required In Device Tree?

Hi! I am trying to build a device tree for my device. I am wondering which files are required in a device tree. I know you need certain files that are mandatory, like BoardConfig.mk, system.prop etc. but how do I know which other files and folders I need. For example, the 1+1 device tree has audio, bluetooth, gps, camera and other folders, but certain device trees don't have a GPS folder. It varies between device. So, how do I know which files are needed in my device tree? Thanks
Looking forward to see answer to this. I also need to know this
NateDev473 said:
Hi! I am trying to build a device tree for my device. I am wondering which files are required in a device tree. I know you need certain files that are mandatory, like BoardConfig.mk, system.prop etc. but how do I know which other files and folders I need. For example, the 1+1 device tree has audio, bluetooth, gps, camera and other folders, but certain device trees don't have a GPS folder. It varies between device. So, how do I know which files are needed in my device tree? Thanks
Click to expand...
Click to collapse
I would start by checking out this guide for some better information about the required files and what is involved https://docs.omnirom.org/Porting_Omni_To_Your_Device. But I personally before I even started would find a device as close to yours as possible and look at its device tree and the files it has. What device are you building for?
shimp208 said:
I would start by checking out this guide for some better information about the required files and what is involved https://docs.omnirom.org/Porting_Omni_To_Your_Device. But I personally before I even started would find a device as close to yours as possible and look at its device tree and the files it has. What device are you building for?
Click to expand...
Click to collapse
I am porting for the BLU Energy X 2, and as a reference, I am using the device tree from the Infinix Hot 2. They are very similar.
NateDev473 said:
I am porting for the BLU Energy X 2, and as a reference, I am using the device tree from the Infinix Hot 2. They are very similar.
Click to expand...
Click to collapse
Since you found a starting point setup your device tree similar to the device tree of the Hot 2 you found.
shimp208 said:
Since you found a starting point setup your device tree similar to the device tree of the Hot 2 you found.
Click to expand...
Click to collapse
OK, I will do that and see how everything goes.
NateDev473 said:
OK, I will do that and see how everything goes.
Click to expand...
Click to collapse
Great! Best of luck let me know if you still have questions!
OK, so I've completed all the files and folders from the Infinix device tree, but I still am wondering a couple things. Since the Infinix device tree didn't have files like proprietary-files.txt, do I need that in my device tree, as mentioned by some guides? Also, since I'm making the vendor files as well, do I put all the lib files from my device, or just the files that are in the Infinix vendor files? I am also facing an error that says: No rule to make target device/.../kernel. Sorry for all the questions, I'm a bit of a noob Thanks!
NateDev473 said:
OK, so I've completed all the files and folders from the Infinix device tree, but I still am wondering a couple things. Since the Infinix device tree didn't have files like proprietary-files.txt, do I need that in my device tree, as mentioned by some guides? Also, since I'm making the vendor files as well, do I put all the lib files from my device, or just the files that are in the Infinix vendor files? I am also facing an error that says: No rule to make target device/.../kernel. Sorry for all the questions, I'm a bit of a noob Thanks!
Click to expand...
Click to collapse
Where did you find the files which has to be in folders like gps, camera etc. Did you find that folders in phone or kernel source or what?
Professor Woland said:
Where did you find the files which has to be in folders like gps, camera etc. Did you find that folders in phone or kernel source or what?
Click to expand...
Click to collapse
I'm currently using the files from the Infinix Hot 2, to see which will work and which need changing. Some of the files are on the device but they're not in the kernel source code, as far as I can tell. I'm currrently using the prebuilt kernel, but I've looked at other source code.
However, I get an error when running make. It will tell me I need an audio.cpp file.
That doesn't make sense though, because that audio.cpp file isn't needed if I don't make any changes to the device tree (so the straight Infinix device tree).
EDIT: Ok, so I used just the sepolicy file, and I got a different error around 9 mins in, about a twrp.fstab, so I will work to correct that, but atleast I don't have have the audio.cpp file anymore.
EDIT: I just added the rootdir folder, and it got past that error, so I won't be posting anymore updates until I find which folder gives me the audio.cpp error, and then I will not include that folder in the build.
After that, with all the other folders in, I will built it, and flash it on my device.
OK, so in the device tree, I have included the Bluetooth folder, the rootdir folder, the sepolicy folder and the wpa_supplicant folder. For the files I have included AndroidBoard.mk, AndroidProducts.mk, BoardConfig.mk, cm.mk, device_e050u_blu.mk, kernel, system.prop, vendorsetup.sh.
I ran make, and it completed successfully. I didn't make the flashable zip however, so the images are separate, but I can flash them through adb to test. But, if I want a flashable ZIP, is there a way to turn those .img files into a zip? Will the building of the flashable zip take less time if I already have built it once? Because I don't want to have to sit through 2 and a half hours again. I am assuming that from here, I put in the other folders 1 by 1 until I find which folder gives the audio.cpp error, I remove that, and then I build the ROM again. Am I correct on this process? Because the rest of the folders are asec_helper, audio, gralloc_extra, include, libbt-vendor-mtk, libxlog and overlay. Could someone explain to me what these folders do/enable?
EDIT: I ran make bacon and I am getting an error saying:
build/core/Makefile:1498: recipe for target '/home/nate/cm12.1/out/target/product/e050u_blu/obj/PACKAGING/target_files_intermediates/cm_e050u_blu-target_files-f63afd6f51.zip' failed
make: *** [/home/nate/cm12.1/out/target/product/e050u_blu/obj/PACKAGING/target_files_intermediates/cm_e050u_blu-target_files-f63afd6f51.zip] Error 1
#### make failed to build some targets (05:53 (mm:ss)) ####
Thanks
OK, so I solved the make error, but I get error 1 when I run make bacon. It says error 1 relating to a zip file, the name of the finished zip.

Categories

Resources