Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,782,554 Members 36,279 Now Online
XDA Developers Android and Mobile Development Forum

[DEV][WIP] Wanna learn to dev correctly?

Tip us?
 
lithid-cm
Old
(Last edited by lithid-cm; 22nd September 2011 at 07:36 PM.)
#1  
lithid-cm's Avatar
Recognized Developer - OP
Thanks Meter 2,965
Posts: 3,177
Join Date: Jul 2010
Location: Cleveland
Default [DEV][WIP] Wanna learn to dev correctly?

Recently there has been some issues with people thinking they are developing when they are not. Now this isn't here to call out anyone. I am here for one simple reason. To teach people how to develop on android correctly. This is an initial post to stir up some interest.

Simply I wanted to try and setup a google+ webchat with questions or comments. How-tos. This can all be done through a google+ chat. If anyone is interested just hit me up on google+ and watch out for the invites it will be in about 2 weeks.

I will be updating this OP with tons of android tips and tricks I have picked up. Currently finshing the first draft in a few minutes.

Thanks!

============

Installing the android sdk and getting adb working.
NOTE: You will need to install java before this will work correctly.

Code:
wget http://dl.google.com/android/android-sdk_r12-linux_x86.tgz
tar xvf android-sdk_r12-linux_x86.tgz

mkdir $HOME/.sdk
mv android-sdk-linux_x86/ $HOME/.sdk/android-sdk/

echo "
#Android Paths
export PATH='$HOME/.sdk/android-sdk/tools/:$HOME/.sdk/android-sdk/platform-tools/:${PATH}'

#Adb Alias
alias start-adb='sudo $HOME/.sdk/android-sdk/platform-tools/./adb start-server'
alias kill-adb='sudo $HOME/.sdk/android-sdk/platform-tools/./adb kill-server'
" >> ~/.bashrc

rm android-sdk_r12-linux_x86.tgz
Now simply type in your terminal:
Code:
source ~/.bashrc
or restart your terminal session.
then type:
Code:
android

Quote:
Choosy moms choose JIF, the others JFIO
Twitter | Google Plus | Scripts | Github | AOSCompiler

The Following 78 Users Say Thank You to lithid-cm For This Useful Post: [ Click to Expand ]
 
lithid-cm
Old
(Last edited by lithid-cm; 24th September 2011 at 03:44 PM.)
#2  
lithid-cm's Avatar
Recognized Developer - OP
Thanks Meter 2,965
Posts: 3,177
Join Date: Jul 2010
Location: Cleveland
Default Working with Sense

Installing apktool
Apktool - http://code.google.com/p/android-apktool/
All apktool credits go to the apktool devs, I just use the tool!

NOTE: Install sdk using my sdk install guide in post 1.
Code:
wget http://android-apktool.googlecode.com/files/apktool1.4.1.tar.bz2
wget http://android-apktool.googlecode.com/files/apktool-install-linux-r04-brut1.tar.bz2
tar -jxvf apktool-install-linux-r04-brut1.tar.bz2
tar -jxvf apktool1.4.1.tar.bz2
mv apktool $HOME/.sdk/android-sdk/platform-tools
mv aapt $HOME/.sdk/android-sdk/platform-tools
mv apktool.jar $HOME/.sdk/android-sdk/platform-tools
rm apktool-install-linux-r04-brut1.tar.bz2
rm apktool1.4.1.tar.bz2
Now if your sdk is setup like mine and you placed it in this folding after following my sdk guide. apktool should now be installed on your system.

Using the apktool (quick overview)
You can simply do the "apktool if" to your framework resources. This is sense below.
Code:
apktool if framework-res.apk
apktool if com.htc.resources.apk
then decompile:
Code:
apktool d framework-res.apk
compile:
Code:
apktool b framework-res
batch decompile:
Code:
for x in $(ls |grep '.apk' |sort); do apktool d $x; echo Decompiled $x; done
batch compile:
Code:
for x in $(ls |grep -v '.apk' |sort); do apktool d $x; echo Compiled $x; done
Languages to look for when removing system languages from apks:
Code:
values-ar values-ar-rEG values-ar-rIL values-bg values-bg-rBG values-br values-ca-rES values-cs values-cs-rCZ values-da values-da-rDK values-de values-de-rAT values-de-rCH values-de-rDE values-de-rLI values-el values-el-rGR values-en-rAU values-en-rCA values-en-rGB values-en-rIE values-en-rIN values-en-rNZ values-en-rSG values-en-rUS values-en-rZA values-es values-es-rES values-es-rUS values-fi values-fi-rFI values-fr values-fr-rBE values-fr-rCA values-fr-rCH values-fr-rFR values-he-rIL values-hi-rIN values-hr values-hr-rHR values-hu values-hu-rHU values-id-rID values-it values-it-rCH values-it-rIT values-ja values-ja-rJP values-ko values-ko-rKR values-lt-rLT values-lv-rLV values-mcc204 values-mcc204-cs values-mcc204-da values-mcc204-de values-mcc204-el values-mcc204-es values-mcc204-es-rUS values-mcc204-fr values-mcc204-it values-mcc204-ja values-mcc204-ko values-mcc204-nl values-mcc204-pl values-mcc204-pt values-mcc204-pt-rPT values-mcc204-ru values-mcc204-sv values-mcc204-tr values-mcc204-zh-rCN values-mcc204-zh-rTW values-mcc230 values-mcc230-cs values-mcc230-da values-mcc230-de values-mcc230-el values-mcc230-es values-mcc230-es-rUS values-mcc230-fr values-mcc230-it values-mcc230-ja values-mcc230-ko values-mcc230-nl values-mcc230-pl values-mcc230-pt values-mcc230-pt-rPT values-mcc230-ru values-mcc230-sv values-mcc230-tr values-mcc230-zh-rCN values-mcc230-zh-rTW values-mcc232 values-mcc232-cs values-mcc232-da values-mcc232-de values-mcc232-el values-mcc232-es values-mcc232-es-rUS values-mcc232-fr values-mcc232-it values-mcc232-ja values-mcc232-ko values-mcc232-nl values-mcc232-pl values-mcc232-pt values-mcc232-pt-rPT values-mcc232-ru values-mcc232-sv values-mcc232-tr values-mcc232-zh-rCN values-mcc232-zh-rTW values-mcc234 values-mcc234-cs values-mcc234-da values-mcc234-de values-mcc234-el values-mcc234-es values-mcc234-es-rUS values-mcc234-fr values-mcc234-it values-mcc234-ja values-mcc234-ko values-mcc234-nl values-mcc234-pl values-mcc234-pt values-mcc234-pt-rPT values-mcc234-ru values-mcc234-sv values-mcc234-tr values-mcc234-zh-rCN values-mcc234-zh-rTW values-mcc260 values-mcc260-cs values-mcc260-da values-mcc260-de values-mcc260-el values-mcc260-es values-mcc260-es-rUS values-mcc260-fr values-mcc260-it values-mcc260-ja values-mcc260-ko values-mcc260-nl values-mcc260-pl values-mcc260-pt values-mcc260-pt-rPT values-mcc260-ru values-mcc260-sv values-mcc260-tr values-mcc260-zh-rCN values-mcc260-zh-rTW values-mcc262 values-mcc262-cs values-mcc262-da values-mcc262-de values-mcc262-el values-mcc262-es values-mcc262-es-rUS values-mcc262-fr values-mcc262-it values-mcc262-ja values-mcc262-ko values-mcc262-nl values-mcc262-pl values-mcc262-pt values-mcc262-pt-rPT values-mcc262-ru values-mcc262-sv values-mcc262-tr values-mcc262-zh-rCN values-mcc262-zh-rTW values-nb values-nb-rNO values-nl values-nl-rBE values-nl-rNL values-pl values-pl-rPL values-pt values-pt-rBR values-pt-rPT values-ro values-ro-rRO values-ru values-ru-rRU values-sk values-sk-rSK values-sl values-sl-rSI values-sr values-sr-rRS values-sv values-sv-rSE values-th values-th-rTH values-tl-rPH values-tr values-tr-rTR values-uk-rUA values-vi values-vi-rVN values-zh-rCN values-zh-rHK values-zh-rTW values-zh-rTW-hdpi values-cs-nokeys values-da-nokeys values-de-nokeys values-el-nokeys values-es-nokeys values-es-rUS-nokeys values-fr-nokeys values-it-nokeys values-ja-nokeys values-ko-nokeys values-nb-nokeys values-nl-nokeys values-pl-nokeys values-pt-nokeys values-pt-rPT-nokeys values-ru-nokeys values-sv-nokeys values-tr-nokeys values-zh-rCN-nokeys values-zh-rTW-nokeys values-lt values-ca values-uk values-lv values-tl values-in values-iw values-ms values-no values-rm values-fa values-sw values-zh-rMO values-mcc262-sk values-mcc262-tl values-mcc234-hr values-mcc234-hu values-mcc262-fi values-mcc234-tl values-mcc234-sr values-mcc234-lv values-mcc262-lv values-mcc234-bg values-mcc234-en-rGB values-mcc234-sl values-mcc262-nb values-mcc234-uk values-mcc262-en-rGB values-mcc262-vi values-mcc234-nb values-mcc262-uk values-mcc262-lt values-mcc262-sr values-mcc262-ar values-mcc262-bg values-mcc234-sk values-mcc262-ca values-mcc262-ro values-mcc234-vi values-mcc262-th values-mcc234-ar values-mcc234-ca values-mcc262-hu values-mcc234-fi values-mcc234-lt values-mcc262-hr values-mcc262-sl values-mcc234-th values-mcc234-ro values-mcc206-de values-mcc228-de values-mcc262-fa values-mcc295-de values-mcc262-rm values-mcc270-de values-mcc262-in values-mcc262-iw values-zh-rHK-land-hdpi values-zh-rCN-land-hdpi values-zh-rHK-hdpi values-zh-rTW-land-hdpi values-mcc214 values-mcc311 values-mcc310 values-mcc466 values-mcc310-mnc220 values-mcc310-mnc200 values-mcc310-mnc270 values-mcc890-mnc126 values-mcc214-mnc1 values-mcc310-mnc800 values-mcc234-mnc15-gb values-mcc310-mnc490 values-mcc204-mnc4 values-mcc310-mnc260 values-mcc250-mnc1 values-mcc204-mnc4-nl values-mcc214-mnc1-es values-mcc310-mnc230 values-mcc310-mnc26 values-mcc310-mnc210 values-mcc310-mnc330 values-mcc234-mnc15 values-mcc310-mnc170 values-mcc310-mnc280 values-mcc310-mnc290 values-mcc310-mnc660 values-mcc310-mnc160 values-mcc262-mnc2-de values-mcc310-mnc240 values-mcc310-mnc580 values-mcc310-mnc310 values-mcc310-mnc250 values-mcc262-mnc2 values-en-rSA values-mcc238-mnc6 values-mcc235-mnc94 values-mcc505-mnc6 values-mcc240-mnc2 values-mcc505-mnc3 values-zh-rCN-hdpi values-mcc234-mnc20 values-mcc272-mnc5 values-mcc232-mnc10 values-en-rUA values-en-rRU values-en-rUA-hdpi values-en-rRU-hdpi values-es-rMX values-zh-rCN-normal-port values-zh-rCN-normal-land values-ur values-ja-rEN values-et values-is values-nn values-tr-800x480 values-zz-rZZ values-mcc466-zz-rZZ values-mcc230-zz-rZZ values-mcc234-zz-rZZ values-mcc214-zz-rZZ values-mcc204-zz-rZZ values-mcc232-zz-rZZ values-mcc262-zz-rZZ values-mcc260-zz-rZZ values-en values-zh-rTW-finger values-de-keysexposed values-ru-keysexposed values-ja-finger values-zh-rTW-keyshidden values-de-keyshidden values-fr-keyshidden values-it-keysexposed values-ru-finger values-ja-keyshidden values-nl-finger values-pl-finger values-fr-finger values-de-finger values-ko-finger values-zh-rCN-keysexposed values-nl-keyshidden values-es-keyshidden values-ru-keyshidden values-zh-rCN-keyshidden values-cs-keysexposed values-cs-finger values-es-finger values-cs-keyshidden values-fr-keysexposed values-nl-keysexposed values-zh-rTW-keysexposed values-it-keyshidden values-it-finger values-pl-keyshidden values-ja-keysexposed values-pl-keysexposed values-ko-keyshidden values-es-keysexposed values-zh-rCN-finger values-ko-keysexposed values-zh values-he values-es-rCR values-es-rCL values-eu values-es-rSV values-es-rNI values-ln values-es-rAR values-gl values-es-rPY values-es-rBO values-es-rPE values-es-rVE values-hi values-mo
Dsixda Android Kitchen:
Dsixda Android Kitchen - https://github.com/dsixda/Android-Kitchen
Again all credit goes to the developers of this kitchen. I only simply use it!

There are two ways to install this kitchen.
- Download it here and unzip it - https://github.com/dsixda/Android-Ki...rchives/master
- What I do is sync with his github using git.
Note: Make sure you have git installed.
Code:
sudo apt-get install git-core
Then simply clone there repo where ever you like locally.
Code:
git clone https://github.com/dsixda/Android-Kitchen.git
Note: This method is a way to use the latest code. Use at your own risk might be bugs. Don't report issues for versions not released yet!

Quote:
Choosy moms choose JIF, the others JFIO
Twitter | Google Plus | Scripts | Github | AOSCompiler

The Following 30 Users Say Thank You to lithid-cm For This Useful Post: [ Click to Expand ]
 
lithid-cm
Old
(Last edited by lithid-cm; 22nd September 2011 at 06:18 PM.)
#3  
lithid-cm's Avatar
Recognized Developer - OP
Thanks Meter 2,965
Posts: 3,177
Join Date: Jul 2010
Location: Cleveland
Default Working with AOSP

Compiling SalvageMod

NOTE: Until kernel.org is up. This will not work at all!

Hey there, you are here because you want to be able to compile SalvageMod for your HTC Evo. There is one simple way to do so and its very easy. Here are the current versions of SalvageMod that you can compile.
Quote:
* SalvageMod1.3 (Stable)
* gingerbread (Development)
Please note that the gingerbread branch is the same as our "nightly" or unstable branch. As other releases come available this page will be updated with those branches. Now its time for the fun stuff.

Let's make sure we have all the needed files to compile on [http://www.ubuntu.com Ubuntu 11.04].

Use this repo for java:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
32 bit install:
Code:
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
64 bit users will need:
Code:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.4-multilib g++-4.4-multilib
Now we create a development directory, it doesn't matter what the name is or where its at. For example I always do:
Code:
mkdir -p ~/Development/SalvageMod
Now you need to install repo:
Code:
sudo bash
curl http://android.git.kernel.org/repo > /usr/bin/repo
chmod a+x /usr/bin/repo
exit
Now go into the directory you just created. This is where we will initate the repo we want to use.
* *Remember those branches from before?*
Quote:
* SalvageMod1.3 (Stable)
* gingerbread (Development)
Now initate the repo you want.
Quote:
* Development
Code:
repo init -u https://github.com/SalvageMod/salvage.git -b gingerbread
Quote:
* Stable
Code:
repo init -u https://github.com/SalvageMod/salvage.git -b SalvageMod1.3
Now sync it.
Code:
repo sync
Now it will do some things, could take a long time depending on your internet connection. Go grab a beer.

Now that it is done compiling there are only a few steps before you are on your way to a compiled SalvageMod rom.

Go into the supersonic(Htc Evo) device tree and run extract-files.sh
Code:
cd device/htc/supersonic
./extract-files.sh
Now you want to go back into the root of the build.
Code:
cd ../../..
Should look something like this:
Code:
lithid@lithid-Luigi:~/Development/SalvageMod$ ls
bionic    build  dalvik       device    frameworks  libcore   ndk       prebuilt  system
bootable  cts    development  external  hardware    Makefile  packages  sdk       vendor
Once you are here we start to get everything together. Run these commands. Then you will use make to build the rom!
Code:
. build/envsetup.sh
lunch salvage_supersonic-userdebug
time make -j$(grep -ic ^processor /proc/cpuinfo) otapackage
That is about it! After this is completed go into the following folder to get your rom!
Code:
cd out/target/product/supersonic

Quote:
Choosy moms choose JIF, the others JFIO
Twitter | Google Plus | Scripts | Github | AOSCompiler

The Following 24 Users Say Thank You to lithid-cm For This Useful Post: [ Click to Expand ]
 
Jlallman
Old
#4  
Senior Member
Thanks Meter 18
Posts: 201
Join Date: Aug 2011
well this means im getting a google +
The Following User Says Thank You to Jlallman For This Useful Post: [ Click to Expand ]
 
Beedeezy10
Old
#5  
Beedeezy10's Avatar
Senior Member
Thanks Meter 150
Posts: 650
Join Date: Jan 2010
Location: Houston
Considering that i already follow you on Google+, I would definitely want to check this out Lithid. Thanx in advance man.
The Following User Says Thank You to Beedeezy10 For This Useful Post: [ Click to Expand ]
 
taadow1030
Old
#6  
Senior Member
Thanks Meter 228
Posts: 1,231
Join Date: Nov 2010
Thanks Lithid. We appreciate all you do to help us.

Sent from my supersonic using XDA App
 
renegade37918
Old
#7  
renegade37918's Avatar
Senior Member
Thanks Meter 36
Posts: 296
Join Date: May 2011
Location: knox, tn
What's your plus lith

Sent from my PC36100 using xda premium
 
ndstrctbl
Old
#8  
Senior Member
Thanks Meter 21
Posts: 131
Join Date: Nov 2010
I have been really wanting to start without a clue as to where to begin...can I get a Google+ invite?

Sent from my supersonic using XDA App
 
Vodad
Old
(Last edited by Vodad; 22nd September 2011 at 06:11 PM.)
#9  
Junior Member
Thanks Meter 0
Posts: 8
Join Date: Jun 2009
Location: Terre Haute
Default Me too

I would love to get in on this. send me a G+ invite - jtwalker1

I will forewarn you, I have not done any coding or programming since I learned in college which was many, many moons ago (think pre WWW days)



Thanks

James
 
lithid-cm
Old
#10  
lithid-cm's Avatar
Recognized Developer - OP
Thanks Meter 2,965
Posts: 3,177
Join Date: Jul 2010
Location: Cleveland
Quote:
Originally Posted by renegade37918 View Post
What's your plus lith

Sent from my PC36100 using xda premium
Plus is in the sig man.

Quote:
Choosy moms choose JIF, the others JFIO
Twitter | Google Plus | Scripts | Github | AOSCompiler


The Following 2 Users Say Thank You to lithid-cm For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes