[How-To] Enable Hardware LED and Camera flash - XPERIA X10 Android Development

As more and more people are interested to port roms from other phones to our x10, these 2 features are usually missing and need some modifications to work properly.
Here is a simple guide to enable these 2 features on our x10
Pre-Requisite
1. You need to know how to use apktool or any tool that can decompile/compile apks.
2. You need to know how to use smali/baksmali tool
This is not a tutorial of how to use apktool or smali tool. Please google for the above for downloads and tutorials
Credits to Z&J for their great FreeX10 rom that provides a base for reference.
Enable Hardware LED
You need to modify framework-res.apk (in /system/framework folder)
1. backup the original framework-res.apk
2. use apktool to decode framework-res.apk to a folder
syntax:
Code:
apktool d framework-res.apk
This should create a folder "framework-res" in the current folder
3. use a text editor (eg notepad++) to open the file <foldername>/res/values/array.xml
look for something similar to below:
Code:
<integer-array name="config_autoBrightnessLevels">
<item>200</item>
<item>400</item>
<item>1000</item>
<item>3000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>25</item>
<item>55</item>
<item>70</item>
<item>70</item>
<item>250</item>
</integer-array>
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>255</item>
<item>255</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>
<integer-array name="config_autoBrightnessKeyboardBacklightValues">
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>
and replace it with:
Code:
<array name="config_autoBrightnessLevels" />
<array name="config_autoBrightnessLcdBacklightValues" />
<array name="config_autoBrightnessButtonBacklightValues" />
<array name="config_autoBrightnessKeyboardBacklightValues" />
4. open the file <foldername>/res/values/bools.xml
looks for the line:
Code:
<bool name="config_automatic_brightness_available">true</bool>
and change the word "true" to "false"
5. compile the apk
syntax:
Code:
apktool b <foldername>
6. replace the resources.arsc in original framework-res.apk with the one in <foldername>/build/apk folder
Note: I use TotalCommander as it has 2 pane windows and can open apk file as folder but there should be many guides in the App & Theme section
that teach you how to replace resources file in framework-res.apk
7. replace the framework-res.apk in /system/framework folder
8. reboot
Enable Camera Flash Light
You need to modify services.jar (in /system/framework folder)
1. backup the original services.jar
2. use winrar to extract classes.dex from services.jar
3. use smali/baksmali tool to decode classes.dex to a folder
syntax:
Code:
java -jar baksmali.jar -o <foldername>/ classes.dex
4. use a text editor (eg notepad++) to open the file <foldername>/com/android/server/LightsService.smali
5. look for lines that contain this (there should be 5 of them):
Code:
"/sys/class/leds/spotlight/brightness"
or
"/sys/class/leds/flashlight/brightness"
and replace it with:
Code:
"/sys/class/leds/lv5219lg:fled/spotlight_enable"
6. use smali/baksmali tool to compile classes.dex
syntax:
Code:
java -Xmx512M -jar smali.jar <foldername>/ -o classes.dex
7. replace classes.dex in services.jar with the new classes.dex using winrar
8. replace the services.jar in /system/framework folder
9. reboot
10. test it with switchpro or LED Light (from market) or vignette (provided camera works)
Notes:
1. If booting fails that'd mean something wrong in compiling / packing the apk. please replace the original file
2. The method may not apply to every rom. Do it at your own risk.
Pls hit "Thanks" if it helps you

This guide was so badly needed,
awesome job bro.... Thumbs up to this awesome guide

@cobrato
thank you for this!!!
it will help many ppl who r porting ROMs
@all
u can find the above mentioned tools in most android kitchens [email protected]
some useful links:
one of the best kitchens available: dsixda's HTC Android Kitchen
for smali/baksmali tool http://code.google.com/p/smali/
EASYapkTOOLcompilerDECOMPILER

can this be used to turn of the keyboard lights?

can someone make a xrec zip for this?

Would a flashable zip be possible?
sent from my gingerbread powered c64 with NO wlod

chiefy009 said:
Would a flashable zip be possible?
sent from my gingerbread powered c64 with NO wlod
Click to expand...
Click to collapse
Of course it will be possible. But it will be rom secific.
Sent from my X10project using XDA Premium App

Ask for patch in TripNreaver Miui 1.0.6
Hi,
Im dumb in commandline, so i ask for someone please to help me in make this patch.
Im ataching the framework_res.apk and services.jar from tripmiui 1.0.6.
http://www.megaupload.com/?d=GK7UQZF0
thanks in advance.

Has anybody checked if this works?
Cobrato appreciate that someone took out a patch for 1.0.63 tripmiui?

Hello, i keep breaking my device...:-( stuck in step 6...

Thanks cobrato , can you make this work in a flashable zip format so we can install it directly to the phone with the no hassle of typing.

flashable zip will be really greatfull...

For flashable zip you'll need to do it for each rom and that's not the purpose of this thread

For those who are interested. Applied to Trip's MIUI 1.07 using this tutorial. (Great COBS! Easy to follow!)
framework - http://dl.dropbox.com/u/11996466/framework-res.apk
Services.jar - http://dl.dropbox.com/u/11996466/services.jar
It works for me!

armic said:
For those who are interested. Applied to Trip's MIUI 1.07 using this tutorial. (Great COBS! Easy to follow!)
framework - http://dl.dropbox.com/u/11996466/framework-res.apk
Services.jar - http://dl.dropbox.com/u/11996466/services.jar
It works for me!
Click to expand...
Click to collapse
Are those the files needed for trips 1.07?
Sent from my X10i TripNMiUI using XDA App

kylec said:
Are those the files needed for trips 1.07?
Sent from my X10i TripNMiUI using XDA App
Click to expand...
Click to collapse
try Trips' without this and observe if there are hardware led and flash using vig.

armic said:
For those who are interested. Applied to Trip's MIUI 1.07 using this tutorial. (Great COBS! Easy to follow!)
framework - http://dl.dropbox.com/u/11996466/framework-res.apk
Services.jar - http://dl.dropbox.com/u/11996466/services.jar
It works for me!
Click to expand...
Click to collapse
hey, great job.
which permissions need to be set for framework-res.apk to work?

can it use for enable flash light for video recording in cm 6.1.3 ?

pedrocel85 said:
hey, great job.
which permissions need to be set for framework-res.apk to work?
Click to expand...
Click to collapse
Both
X X -
X - -
X - -
Sent from my X10i TripNMiUI using XDA Premium App

farzin_silver said:
can it use for enable flash light for video recording in cm 6.1.3 ?
Click to expand...
Click to collapse
As COB said, we need to do it on every ROM separately.
Sent from my X10i TripNMiUI using XDA Premium App

Related

[TIP] Lower Autobacklight Brightness to minimum

Found it here:
http://forum.xda-developers.com/showthread.php?t=1034743
Sucessfully made it working an my Evo3D.
Should save a lot of battery..
I've used apktool instead of apk manager, doesnt work for me with apk manager.
How to deal with apktool?:
http://forum.xda-developers.com/showthread.php?t=1225558
- Take the steps 1 - 5 (pull the framework-res instead of SystemUI.apk)
- go to the decompiled folder->res->values: array.xml
and edit the valus as described here:
steps 13-15:
http://forum.xda-developers.com/showthread.php?t=1034743
you could just take values of the attached array.xml file.
...on GSM Leedroid I got bootloops when I was using values under 20...
Then take the steps 7 to the end from here:
http://forum.xda-developers.com/showthread.php?t=1225558
use framework-res instead of SystemUI
AND drag&drop the ressources.arsc from new compiled to original framework-res.apk with 7zip.
Turge said:
That worked perfectly. Here's what I did:
Pulled the framework: adb pull /system/framework/framework-res.apk
Pulled the resources: adb pull /system/framework/com.htc.resources.apk
Decompiled the framework-res APK: apktool d framework-res.apk
Edited arrays.xml with the new values
Recompiled the APK: apktool b framework-res framework-res-new.apk
Dragged and dropped resource.arsc from framework-res-new.apk to framework-res.apk
Pushed the modified APK: adb push framework-res.apk /system/framework/
Set the permissions - omitted this step since it has enough permission
Rebooted
I'll need to tweak the settings since it's a little low atm..
Click to expand...
Click to collapse
gl
Awesome sauce!
I used this to mod - http://forum.xda-developers.com/showthread.php?t=1193149
I'm a tiny bit surprised this hasn't gotten more responses with how much people ***** about the auto-brightness. lol
I just did this, waiting for phone to reboot. should it be smoking?....
kidding. anyways, I dropped the 1st half of the values, added more steps to make transitions a little smoother. *cross fingers and wafts smoke away from face*
Or you could skip all that bull**** and just use root explorer and goto
/sys/devices/platform/leds-pm8050/leds/button-backlight/currents. Open currents in text editor and change value 20 to value 2. It will lower them by more than half. Don't forget to save before you exit.
mattfmartin said:
Or you could skip all that bull**** and just use root explorer and goto
/sys/devices/platform/leds-pm8050/leds/button-backlight/currents. Open currents in text editor and change value 20 to value 2. It will lower them by more than half. Don't forget to save before you exit.
Click to expand...
Click to collapse
OK.... I see several references to LED and buttons and such.. you sure this has to do.with the autobrightness of the screen?..
Sent from my PG86100 using Tapatalk
felacio said:
OK.... I see several references to LED and buttons and such.. you sure this has to do.with the autobrightness of the screen?..
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
Nope it doesn't. Read to fÄst. Thought it was another bright capacitive led thread.
Did you managed to get it working felacio? Which rm you are using? If you want I can do it for you..
Sent from my HTC EVO 3D X515m using XDA Premium App
j4n87 said:
Did you managed to get it working felacio? Which rm you are using? If you want I can do it for you..
Click to expand...
Click to collapse
Oh yeah. The sensor is very crude. The other values I added are ignored. It was set for 11 and 41 lux values. I changed the 41 to 31. The phone ignores the 31 value and changes the brightness at 41 still. So. With that in mind. I need to find a brighter brightness for the lowest value because it won't trigger in soft lit conditions. But its just a tad too dark for those soft lit situations. So.....
Anyways. Yeah! It worked. Just gotta work with my values. Lol.
Sent from my PG86100 using Tapatalk
oh, okay..yeah also noticed that the sensivity is a bit slow.
But still better than the standard configuration
felacio said:
Oh yeah. The sensor is very crude. The other values I added are ignored. It was set for 11 and 41 lux values. I changed the 41 to 31. The phone ignores the 31 value and changes the brightness at 41 still. So. With that in mind. I need to find a brighter brightness for the lowest value because it won't trigger in soft lit conditions. But its just a tad too dark for those soft lit situations. So.....
Anyways. Yeah! It worked. Just gotta work with my values. Lol.
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
So what's the exact procedure for this?
1. Use APK Tool to decompile the framework-res APK (apktool d framework-res.apk)
2. Edit arrays.xml with the values
3. Recompile the APK (apktool b framework-res framework-res.apk)
4. Push the APK to /system/framework/
5. Set the permissions
6. Reboot
I obviously screwed up a step because my boot animation kept looping until I pushed the original APK and rebooted. The new APK is also almost half the size as the original...
Turge said:
So what's the exact procedure for this?
1. Use APK Tool to decompile the framework-res APK (apktool d framework-res.apk)
2. Edit arrays.xml with the values
3. Recompile the APK (apktool b framework-res framework-res.apk)
4. Push the APK to /system/framework/
5. Set the permissions
6. Reboot
I obviously screwed up a step because my boot animation kept looping until I pushed the original APK and rebooted. The new APK is also almost half the size as the original...
Click to expand...
Click to collapse
updated op with step 7-end.
j4n87 said:
updated op with step 7-end.
Click to expand...
Click to collapse
Ahh.. this is probably what I was looking for: drag&drop the ressources.arsc from new compiled to original framework-res.apk with 7zip.
Thanks, I'll try it after lunch using WinRAR.
you're welcome
j4n87 said:
you're welcome
Click to expand...
Click to collapse
That worked perfectly. Here's what I did:
Pulled the framework: adb pull /system/framework/framework-res.apk
Pulled the resources: adb pull /system/framework/com.htc.resources.apk
Decompiled the framework-res APK: apktool d framework-res.apk
Edited arrays.xml with the new values
Recompiled the APK: apktool b framework-res framework-res-new.apk
Dragged and dropped resource.arsc from framework-res-new.apk to framework-res.apk
Pushed the modified APK: adb push framework-res.apk /system/framework/
Set the permissions - omitted this step since it has enough permission
Rebooted
I'll need to tweak the settings since it's a little low atm..
Turge said:
That worked perfectly. Here's what I did:
Pulled the framework: adb pull /system/framework/framework-res.apk
Pulled the resources: adb pull /system/framework/com.htc.resources.apk
Decompiled the framework-res APK: apktool d framework-res.apk
Edited arrays.xml with the new values
Recompiled the APK: apktool b framework-res framework-res-new.apk
Dragged and dropped resource.arsc from framework-res-new.apk to framework-res.apk
Pushed the modified APK: adb push framework-res.apk /system/framework/
Set the permissions - omitted this step since it has enough permission
Rebooted
I'll need to tweak the settings since it's a little low atm..
Click to expand...
Click to collapse
yeah, thats the right way
..will add this to the OP
j4n87 said:
yeah, thats the right way
..will add this to the OP
Click to expand...
Click to collapse
Cool.
By the way, you can see the settings used via "adb shell" using the command: logcat | grep lcdValue
D/PowerManagerService( 245): New lightsensor value:90, lcdValue:60
D/PowerManagerService( 245): New lightsensor value:10, lcdValue:20
D/PowerManagerService( 245): New lightsensor value:10, lcdValue:20
D/PowerManagerService( 245): New lightsensor value:160, lcdValue:80
D/PowerManagerService( 245): New lightsensor value:90, lcdValue:60
D/PowerManagerService( 245): New lightsensor value:90, lcdValue:60
D/PowerManagerService( 245): New lightsensor value:90, lcdValue:60
D/PowerManagerService( 245): New lightsensor value:160, lcdValue:80
D/PowerManagerService( 245): New lightsensor value:40, lcdValue:40
Is it safe to assume that this method will work on Sensation?
KrisHilbun said:
Is it safe to assume that this method will work on Sensation?
Click to expand...
Click to collapse
Yep. I did if for a friends sensation. Same process.
Doesn't work
Hi,
I tried doing this and followed the exact steps (used the values from the other posting) and when the phone finishes rebooting, the screen stays in the dimmest value rather then adjusting by itself when I set it to auto brightness.
The only different thing I did was instead of using ADB, I used root explorer to pull out framework-res and com.htc into my SD card then moved that to my apktool folder to extract. Then used root explorer to copy it back into system/framework and applied the same permissions as it was before.
Any ideas?
I jumped to a new rom and ran also to issues. My phone was in a bootloop after editing the array xml. Got a "devide by zero fatal exception" - found out, that the lowest value I can us is 21 - the array.xml in the thread i linked is starting with 5 i think.
My current array.xml:
Code:
</integer-array>
<integer-array name="config_autoBrightnessLevels">
<item>11</item>
<item>41</item>
<item>91</item>
<item>161</item>
<item>226</item>
<item>321</item>
<item>641</item>
<item>1281</item>
<item>2601</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>21</item>
<item>21</item>
<item>41</item>
<item>72</item>
<item>110</item>
<item>145</item>
<item>186</item>
<item>208</item>
<item>231</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValuesUp">
<item>21</item>
<item>41</item>
<item>88</item>
<item>145</item>
<item>145</item>
<item>145</item>
<item>186</item>
<item>208</item>
<item>231</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValuesDown">
<item>21</item>
<item>41</item>
<item>88</item>
<item>145</item>
<item>145</item>
<item>186</item>
<item>208</item>
<item>231</item>
<item>255</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>255</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>
<integer-array name="config_autoBrightnessKeyboardBacklightValues">
<item>255</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>
..are you also sure, that you have all object tags opend/close correctly?
Sometimes I copied too much/less from one to other xml and also got faulty behaviour.

[All In One Guide for Dummies] Porting ROMs/Building CM7 from Source/Themes |80% Done

Here you have it people , I may be wrong at some places so please excuse me
Requirements :
winzip
any file explorer on your desktop
2 ROMs ( one of X10 and other )
Suggestions :
Use ROMs from Phones like NexusOne , HTC Desire
all phones with QSD8250 and Adreno 200
Method:
Just do these changes to the files and have a Port which boots up
Delete :
/data folder
boot.img
/system/etc/firmware
/system/etc/init.d
Copy & Paste :
in /system/bin -
akmd2
am
bmgr
chargemon
charger
fix_permissions
hci_qcomm_init
hci_attach
ime
input
monkey
pm
port-bridge
qumxd
rild
updatemiscta
wlanmac
wlantool
ramdisk.tar/.gz
/system/etc :
replace all files in -
bluetooth
dhcpcd
wifi
firmware
copy the files -
apns-conf.xml
dbus.conf
DualMicControl
gps.conf
hosts
init* files
media-profiles.xml
resolv.conf
sensors.conf
sysctl.conf
vold.fstab
/system/lib folder :
delete and replace all files in:
/system/lib/modules
/system/lib/hw
copy the following files
in /system/lib/egl :
All EXCEPT libGLES_android.so
copy & replace these files :
libauth.so
libcm.so
libdiag.so
libdbus.so
libdss.so
libdsm.so
libgsl.so
libgstk_exp.so
libmiscta.so
libmmgsdilib.so
libmmipl.so
libmmjpeg.so
libnv.so
liboem_rapi.so
liboemcamera.so
liboncrpc.so
libpbmlib.so
libqmi.so
libqueue.so
libril.so
libril-qc-1.so
libuim.so
libwms.so
libwmsts.so
/system/usr/keychars -
es209ra_keypad.kcm
and delete the original file (example : passion_keypad.kcm OR bravo_keypad.kcm)
/system/usr/keylayout -
es209ra*.kl
do the same as with.kcm
Replace :-
Build.prop
META-INF folder
Cautions :-
Use the same version of android to port
You will need to change the build.prop to whatever you desire
You may need to edit the update-script
Porting gets over here !!!!!
WAIT I'll Complete it later
Many People want to know this right ?
Bro , Dude , Buddy , friend , mate WHICH FILES ARE FOR WHAT ??
what does akmd2 do ? what is it for ????
Here , I will try to provide you as many answers as I can :-
# Prebuilt kl keymaps
/system/usr/keylayout/es209ra_keypad.kl
/system/usr/keylayout/es209ra_handset.kl
/system/usr/keychars/es209ra_keypad.kcm.bin
## RIL related stuff [Responsible For GSM/DATA and Sim card]
/system/lib/libril.so
/system/bin/port-bridge
/system/bin/qmuxd
/system/lib/libauth.so
/system/lib/libcm.so
/system/lib/libdiag.so
/system/lib/libdll.so
/system/lib/libdsm.so
/system/lib/libdss.so
/system/lib/libgsdi_exp.so
/system/lib/libgstk_exp.so
/system/lib/libmmgsdilib.so
/system/lib/libnv.so
/system/lib/liboem_rapi.so
/system/lib/liboncrpc.so
/system/lib/libpbmlib.so
/system/lib/libqmi.so
/system/lib/libqueue.so
/system/lib/libuim.so
/system/lib/libril-qc-1.so
/system/lib/libwms.so
/system/lib/libwmsts.so
## Camera proprietaries
/system/lib/liboemcamera.so
/system/lib/libmmjpeg.so
/system/lib/libmmipl.so
/system/lib/libcamera.so
/system/lib/libopencore_common.so
## FIRMWARE
/system/etc/firmware/yamato_pfp.fw
/system/etc/firmware/yamato_pm4.fw
/system/etc/firmware/camfirm.bin
## ATHEROS WIFI [ WIFI modules for X10 ]
/system/lib/modules/athwlan.bin.z77
/system/lib/modules/data.patch.hw2_0.bin
/system/bin/wlan_mac
/system/bin/wlan_tool
## BT proprietary [ Bluetooth for X10 ]
/system/bin/hci_qcomm_init
/system/bin/hciattach
## Adreno 200 files [ Responsible for display i.e. the GPU ]
/system/lib/libgsl.so
/system/lib/egl/libGLESv1_CM_adreno200.so
/system/lib/egl/libq3dtools_adreno200.so
/system/lib/egl/libEGL_adreno200.so
/system/lib/egl/libGLESv2_adreno200.so
## Other libraries and proprietary binaries
/system/etc/vold.fstab [ SD Card ]
/system/etc/sensors.conf [Proximity sensors , etc]
/system/bin/akmd2
#offline charger
/system/bin/chargemon
/system/bin/updatemiscta
/system/lib/libmiscta.so
#hw [The lights between the HOME , Menu and back button ]
/system/lib/hw/copybit.qsd8k.so
/system/lib/hw/sensors.default.so
HOW TO MAKE THEMES
There are 2 types of themes you can make :-
1.Involving systemUI.apk and framework-res.apk
2.Involving the T-mobile Theme engine
I will begin with LEVEL (1)
There are two ways of doing this as well
1.Classic Way
2.The spaarc's cheap way (I use this one )
CLASSIC WAY
Requirements :-
1.A cool head
2.Apk Manager 4.4 (OR any APK editor , etc )
3.Original Framework-res.apk and SystemUI.apk
4.Themed Framework-res.apk and SystemUI.apk
OR
4.Many .PNG Images , In order to theme
Method :-
1.Use apk manager to decompile the original AND Themed apk's(i.e If you have a themed one)
2.ONLY Replace files found in /res/drawable-hdpi folder
3.ReCompile
4.Just replace Using RootExplorer or make a update.zip
Spaarc's Cheap Way
This is top secret , but i will tell it you
Requirements :-
1.Computer
2.7-zip
3.Original Framework-res.apk and SystemUI.apk
4.Themed Framework-res.apk and SystemUI.apk
OR
4.Many .PNG Images , In order to theme
Method :-
1.Use 7-zip to extract the apk
2.Replace files
3.Repack as zip using 7-zip again
4.Rename to ".apk"
5.Replace and Enjoy
T-MOBILE THEME CHOOSER
Follow this AWESOME guide
I don't have the time or patience of rewritting it in my cheeky tongue
Here , this completes your themeing guide
If you have any questions just Drop me a PM
HOW TO COMPILE CM7 ROMS FROM SOURCE
I have written this guide only for linux Users
Bibliography -
1.source.android.com
2.wiki.cyanogenmod.com
The guide starts here :-
Install the ADB
Install the Android SDK.
2.Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit systems:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.
NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
This will get you all the resources you need to build your CyanogenMod ROM
3.Create the Directories
You will need to set up some directories in your build environment.
To create them:
mkdir -p ~/bin
mkdir -p ~/android/system
4.Install the Repository
Enter the following to download make executable the "repo" binary:
curl https://github.com/spaarc/tools_repo/repo > ~/bin/repo "OR" curl https://github.com/spaarc/tools_repo/blob/master/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j16
5.Copy proprietary files
NOTE: This only needs done the first time you build.
You will need to have a Xperia X10 with a working copy of CyanogenMod install and ADB working on the computer. This script will copy the proprietary files from the device.
Connect the device to the computer and ensure that ADB is working properly.
cd ~/android/system/device/SEMC/es209ra/
./extract-files.sh
NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.
6.Download RomManager
NOTE: This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.
Download RomManager which is needed by the build:
~/android/system/vendor/cyanogen/get-rommanager
7.Building CyanogenMod
Check for updates
First, check for updates in the source:
cd ~/android/system/
repo sync
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the Xperia X10
. build/envsetup.sh && brunch es209ra
Install
Copy your .zip file from ~/android/system/out/target/product/es209ra/update.cm-XXXXX-signed.zip to the root of the SD card.
Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.
Flash both of these .zip files from recovery.
reserved 4
reserved last
Awesome my friend, keep it up, good to see another dude, which are trying to help our X10 community .
Thnx a lot Spaarc bro.... u r gr8 coz u help
Sent from my X10i using XDA App
thanks sparc that will help people like me who wants to develop and play with android and with the xperia
That is nothing ,
The first post is incomplete
I also have to write how to compile Aosp ROM s
Which files are for what , which you r porting
I also have to write how to code those sources which u can see at github ...
There is a lot , how to make themes ...
sent from my Android powered smart phone
spaarc said:
That is nothing ,
The first post is incomplete
I also have to write how to compile Aosp ROM s
Which files are for what , which you r porting
I also have to write how to code those sources which u can see at github ...
There is a lot , how to make themes ...
sent from my Android powered smart phone
Click to expand...
Click to collapse
Why dont you type it up on notepad or ms word so you dont have to keep stopping and people than going it is only half complete and crap like that. If you type it all up in notepad then you can just copy/paste here and then it will all me done.
Just saying what I would do and just trying to help
Sent from my X10i using xda premium
I don't have time to do it that's why ...
I'll complete it in this week
I don't care what people say
sent from my Android powered smart phone
wow..nice tutorial man!!
thanx!
Main part of the guide is over
approx 2/3 left
Really really exhausted , TC and bring me new ROMS
Thanks can u do like a guide of porting roms from the phones with different gpu/cpu?
Paji tussi great hoo!!
Sent from my X10i using xda premium
#offline charger
/system/bin/chargemon
/system/bin/updatemiscta
/system/lib/libmiscta.so
Click to expand...
Click to collapse
is that all for offline charging?
i am working on integrating offline charger in main kernel ramdisk... so that it will be independent of all things in /system
If I can't do it how could I teach you ?
It is next to impossible
Bit still editing the init.rc in ramdisk should do the trick
sent from my Android powered smart phone
spaarc said:
If I can't do it how could I teach you ?
It is next to impossible
Bit still editing the init.rc in ramdisk should do the trick
sent from my Android powered smart phone
Click to expand...
Click to collapse
that and hex editing the files involved
Mate i need help have done this method with x10 2.3.3 and arc 2.3.4 and only copied the files u have said and i have UB with DK v5 the phone just reboots and reboots while on DK logo...
Shouldn't their be files from permissions folder?
sahibunlimited said:
Mate i need help have done this method with x10 2.3.3 and arc 2.3.4 and only copied the files u have said and i have UB with DK v5 the phone just reboots and reboots while on DK logo...
Shouldn't their be files from permissions folder?
Click to expand...
Click to collapse
No nothing more ,
Did you copy the ramdisk ?
Send me a logcat
sent from my Android powered smart phone

[GUIDE][UPDATED] Port Jelly Bean transitions animations for Gingerbread

1) First of all, you need to download and install APK MANAGER:
http://forum.xda-developers.com/showthread.php?t=695701
2) Extract with WinRAR, from the ROM you want to modify, the file framework-res.apk, that you can find in the directory \System\framework\.
3) Go to the apk manager folder and place the framework-res.apk file in the folder "place-apk-here-for-modding".
4) In the apk manager folder, double click on the file "Script". A cmd window will open.
5) Where it says "Please make your decision", write "22" (Set current project) and enter. Then enter "1" (to choose the first apk) and enter. Then enter "9" (Decompile apk) and enter.
The script will decompile the framework-res.apk.
6) Now go to your apk manager folder, go to projects\framework-res\res\anim\.
In this folder there are the animations of your rom. They consist in some .xml files decompiled.
7) Download this: http://www.mediafire.com/?9pf469gjjtpz9qf
8) Copy the files from the folder "anim" of the zip downloaded into the anim folder and you are asked to replace the files; choose yes.
9) Now go to your apk manager folder, go to projects\framework-res\res\values\. Edit the file integers.xml.
Modify the values in those lines:
Code:
<integer name="config_shortAnimTime">150</integer>
<integer name="config_mediumAnimTime">300</integer>
<integer name="config_longAnimTime">400</integer>
to:
Code:
<integer name="config_shortAnimTime">200</integer>
<integer name="config_mediumAnimTime">400</integer>
<integer name="config_longAnimTime">500</integer>
and add these just below:
Code:
<integer name="config_activityShortDur">150</integer>
<integer name="config_activityDefaultDur">220</integer>
Save.
10) Return to Script. Enter "11" (Compile apk) and enter.
The script will rebuild the framework-res.apk.
11) You are asked if this is a system application. Enter "n" and enter.
12) Go to the folder "place-apk-here-for-modding" delete the file "unsignedframework-res.apk", click with the right mouse button on "framework-res.apk" and select "7zip > Open file", delete the folder "res" and "resource.arsc", go to the folder "projects\framework-res\build\apk\" select the folder "res" and the "resource.arsc", drag to zip and close.
13) Ready, now just replace.
P.S.: If you think that this post can help or interest people of other forums (with other devices), please share this post and also give credit to me!
Video demonstration:
http://www.youtube.com/watch?v=6Jy13o4miME
Nice guide
nice tuts,, will try it soon.
Could someone please upload it for the latest CM nightly? I really want to try it, but I'm not at home. So if someone happens to do it, please upload.
Nice guide
Insert witty sentence here
https://dl.dropbox.com/u/1664131/framework-res.apk for latest CM 7.2 nightly 20120923. Works great, thanks for the guide .
Holy fing sht! This is great! Thank you very much.
Videodemonstration add in OP
Some moderator can move this topic to this area http://forum.xda-developers.com/forumdisplay.php?f=565
I think that is the most appropriate place!
tried on CMX. works great. thanks bud.
Very nice guide....i wl try it today.....
Sent from my GT-S6102 using Tapatalk 2
Is it compatible to a framework with transparency?
I've tried it with Hyperion and nothing happened!
ErvinJohnEstrera said:
Is it compatible to a framework with transparency?
I've tried it with Hyperion and nothing happened!
Click to expand...
Click to collapse
Yes
Send me your framework-res and I can do for you
I tried with a framework tha hve the 14 toggles in status bar and the phone cant boot....
I have the reflash the rom :thumbup:
Sent from my GT-S5830 using Tapatalk 2
DaNiElCoRe said:
I tried with a framework tha hve the 14 toggles in status bar and the phone cant boot....
I have the reflash the rom :thumbup:
Sent from my GT-S5830 using Tapatalk 2
Click to expand...
Click to collapse
I am 15 and toogles in statusbar works perfectly, must have done something wrong.
Dinhodroid said:
I am 15 and toogles in statusbar works perfectly, must have done something wrong.
Click to expand...
Click to collapse
I will try again and comment the results.
Sent from my GT-S5830 using Tapatalk 2
nice..definitely going to try it
nice guide! i'll try it.. thanks!
This mod work in a stock rom because dont work for me in ktm stock.
Sent from my GT-S5830 using Tapatalk 2
Dinhodroid said:
1) First of all, you need to download and install APK MANAGER:
http://forum.xda-developers.com/showthread.php?t=695701
2) Extract with WinRAR, from the ROM you want to modify, the file framework-res.apk, that you can find in the directory \System\framework\.
3) Go to the apk manager folder and place the framework-res.apk file in the folder "place-apk-here-for-modding".
4) In the apk manager folder, double click on the file "Script". A cmd window will open.
5) Where it says "Please make your decision", write "22" (Set current project) and enter. Then enter "1" (to choose the first apk) and enter. Then enter "9" (Decompile apk) and enter.
The script will decompile the framework-res.apk.
6) Now go to your apk manager folder, go to projects\framework-res\res\anim\.
In this folder there are the animations of your rom. They consist in some .xml files decompiled.
7) Download this: http://www.mediafire.com/?3iinoup1n6jxpu2
8) Copy the files from the folder "anim" of the zip downloaded into the anim folder and you are asked to replace the files; choose yes.
9) Now go to your apk manager folder, go to projects\framework-res\res\values\. Edit the file integers.xml.
Modify the values in those lines:
Code:
<integer name="config_shortAnimTime">150</integer>
<integer name="config_mediumAnimTime">300</integer>
<integer name="config_longAnimTime">400</integer>
to:
Code:
<integer name="config_shortAnimTime">200</integer>
<integer name="config_mediumAnimTime">400</integer>
<integer name="config_longAnimTime">500</integer>
and add these just below:
Code:
<integer name="config_activityShortDur">150</integer>
<integer name="config_activityDefaultDur">220</integer>
Save.
10) Return to Script. Enter "11" (Compile apk) and enter.
The script will rebuild the framework-res.apk.
11) You are asked if this is a system application. Enter "n" and enter.
12) Go to the folder "place-apk-here-for-modding" delete the file "unsignedframework-res.apk", click with the right mouse button on "framework-res.apk" and select "7zip > Open file", delete the folder "res" and "resource.arsc", go to the folder "projects\framework-res\build\apk\" select the folder "res" and the "resource.arsc", drag to zip and close.
13) Ready, now just replace.
P.S.: If you think that this post can help or interest people of other forums (with other devices), please share this post and also give credit to me!
Video demonstration:
http://www.youtube.com/watch?v=43_weDoZHtc&feature=youtu.be
Click to expand...
Click to collapse
Can u give your aapt.exe .. I failed to compiled my framework-res.apk .. i feel the problem was the aapt.exe

[BOOT ANIMATION] VERIZON DROID RAZR HD AND SONY XPERIA with sound

Here we go cool Boot-Animation from MOTOROLA RAZR HD and SONY XPERIA Z with sound.
Download link in attachment :
For MOTOROLA : Motorola_DROID_HD.zip
For XPERIA : bootanimation.zip
HOW TO :
1- Extract Motorola_DROID_HD.zip to SYSTEM>MEDIA (using root explorer)
2- FIX PERMISSIONS to rw-r--r-- as shown in ATTACHED THUMBNAIL
3- Rename Stock Bootanimation.zip to Bootanimation.zip.bak(for backup)
Enjoy and hit thanx if you like it :thumbup::thumbup:
Nice very nice
Any idea is a possibility to put time on the middle of the bar up ?
monkteo said:
Nice very nice
Any idea is a possibility to put time on the middle of the bar up ?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2085367
Check this thread or you can use this method
1. Extract apktool to a new folder.
2. Copy framework-res.apk and SystemUI.apk from your phone or from cm10 zip to your apktool folder.
3. Create a backup file of your original SystemUI.apk, name it whatever you want (preferably, backup.apk)
4. open cmd and go to your apktool folder.
5. Set up your framework:
6. Now Decompile SystemUI.apk:
Code:
java -jar apktool.jar d SystemUI.apk
7. In explorer, open your apktool folder and look for this path: /SystemUI/res/layout/
8. Open with notepad++ status_bar.xml and edit the following code like this : set gravity center
Code:
<LinearLayout android:gravity="center" android rientation="horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent"> <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
11. Once it is done building you need to open the backup apk you made at the beginning with Winzip, Winrar, 7zip or your prefered compress tool. Also open New_SystemUI.apk with Winzip, Winrar, 7zip or your prefered compress tool. From inside the New_SystemUI.apk drag resources.arsc and classes.dex to the root of backup.apk and it will replace resources.arsc that is in the apk. You are almost done. From inside New_SystemUI.apk drag the res folder into the backup apk.
12. Copy this modified backup file to Zipalign folder and run the ZipAlign executable. Then run the .bat file. You will find your zipaligned file on the "ZipAlignedApps" folder.
13. Copy the file to your phone.
14. Using Root Explorer, copy your new SystemUI.apk to /system/app, and set 644 permissions ((rw-r--r--) or (tick Read: owner, group, others / Write: owner)
15. Reboot your phone and Enjoy!!!
Source : http://forum.xda-developers.com/showthread.php?t=1864647
Sent from my XT910 using xda premium
Thank you.. I was searching for RAZR HD boot screen..
Sent from my XT910 using xda app-developers app
Thanks. This animation is really cool!
RAZR HD bootanimation for XT910
Hey guys, I resized the images of the Razr HD bootanimation from 720x720 to 540x540 for our XT910.
The one in the OP gets cropped on the sides. Enjoy!
Dropbox:https://www.dropbox.com/s/xy1apxmsziz8qag/bootanimation.zip
Does the sound work on your devices? I've tried everything, searched everywhere and can't find why my device doesn't play the sound. I have changed the permissions...
dinosz1000 said:
Does the sound work on your devices? I've tried everything, searched everywhere and can't find why my device doesn't play the sound. I have changed the permissions...
Click to expand...
Click to collapse
Make sure that your phone is not on silent mode or on vibration mode
pritkudale said:
Make sure that your phone is not on silent mode or on vibration mode
Click to expand...
Click to collapse
It isn't... always on loud, checked permissions, checked the file is in the right place, the line in desc.txt (in the bootanimation.zip) is there for the sound file... nothing... i'm running custom rom aopk r12.
EDIT: Just tried it on stock rom and works perfectly so it has something to do with the custom rom...
Can I disable the sound by deleting it's file?
tomsoyar said:
Can I disable the sound by deleting it's file?
Click to expand...
Click to collapse
Yes, you can.
tomsoyar said:
Can I disable the sound by deleting it's file?
Click to expand...
Click to collapse
yes u can
Sent from my XT910 using xda premium

Apktool fix for windows PC

We all suffer a lot for apktool error.....
This is so annoying isn't it !!:crying::crying::crying:
Most of us canrt recompile successfully
I am going to give the fix for this:cyclops::cyclops::cyclops:
Download this apktool in attachment
Now extract is to your windows pc C;//users/(your name)/apktool
Now download JDK from java.com and remove all java softs you used before!!!:silly:
Now take these from your ROMS system/framework framework-res.apk,semcgenericuxpres.apk and mediatek-res.apk(if you have ).
Copy jre(whole folder) from programme files java to C;//users/user/apktool
THen open control panel > java > go to java tab > now click view > then click find > now take it to the apktool folder and then click next and minimize it dont maximize.
Not open command promt from the apktool folder and type apktool if framework-res.apk , apktool if semcgenericuxpres.apk and all other frameworks you have :laugh::laugh::laugh::laugh:
Code:
apktool if framework-res.apk
You have to chose chose frameworks with your brain :good::good::good::good:
Now take any thing from that rom like settings.apk
To decompile type apktool d settings.apk
Code:
apktool d settings.apk
Then do your works and then to recompile type
Code:
apktool b settings
The command for signing is given in the apktool use that for signing the apk :victory::victory::victory::victory:
You are done ! Any problem comment here !!!!:fingers-crossed::fingers-crossed::fingers-crossed:
Yasinarefin said:
We all suffer a lot for apktool error.....
This is so annoying isn't it !!:crying::crying::crying:
Most of us canrt recompile successfully
I am going to give the fix for this:cyclops::cyclops::cyclops:
Download this apktool in attachment
Now extract is to your windows pc C;//users/(your name)/apktool
Now download JDK from java.com and remove all java softs you used before!!!:silly:
Now take these from your ROMS system/framework framework-res.apk,semcgenericuxpres.apk and mediatek-res.apk(if you have ).
Copy jre(whole folder) from programme files java to C;//users/user/apktool
THen open control panel > java > go to java tab > now click view > then click find > now take it to the apktool folder and then click next and minimize it dont maximize.
Not open command promt from the apktool folder and type apktool if framework-res.apk , apktool if semcgenericuxpres.apk and all other frameworks you have :laugh::laugh::laugh::laugh:
Code:
apktool if framework-res.apk
You have to chose chose frameworks with your brain :good::good::good::good:
Now take any thing from that rom like settings.apk
To decompile type apktool d settings.apk
Code:
apktool d settings.apk
Then do your works and then to recompile type
Code:
apktool b settings
The command for signing is given in the apktool use that for signing the apk :victory::victory::victory::victory:
You are done ! Any problem comment here !!!!:fingers-crossed::fingers-crossed::fingers-crossed:
Click to expand...
Click to collapse
No idea what issues your having as many of us here have no issues with apktool
zelendel said:
No idea what issues your having as many of us here have no issues with apktool
Click to expand...
Click to collapse
Use the Bangladeshi phones like symphony walton ! Then you will understand !
Yasinarefin said:
Use the Bangladeshi phones like symphony walton ! Then you will understand !
Click to expand...
Click to collapse
Not likely as there is no access to those devices in most places in the world. I also searched for the device and it seems like it is a china based import which now makes sense.,

Categories

Resources