EVO3d ubuntu 11.04 setup - HTC EVO 3D

If you are having troubles getting your ubuntu 11.04 to recognize your Evo3d here is what I did to get ADB working on mine:
I am assuming you have adb setup.
1. Plug your EVO3d into your pc as charge only
2. in terminal type
lsusb
3. You should see something like this:
Bus 001 Device 007: ID 0bb4:0cba High Tech Computer Corp
that is your evo3D(verify the eight digit id is the same before doing step 6 if it is not change to match your evo3d vendor id)
sudo gedit /etc/udev/rules.d/99-android.rules
4. Enter your ubuntu password if prompted
5. This should have brought up a new gedit file with 99-android.rules as
the title
6. copy and paste this into that gedit document:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4:0cba", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"
and save the new document.
7. make the new document executable:
sudo chmod a+rx /etc/udev/rules.d/99-android.rules
8. then restart dev environment:
sudo restart udev
9. open terminal and enter
adb devices
10. your evo 3d should be setup
Hopefully this helps anyone having the same issues I was having.

If someone tries this please let me know if i need to change anything.
Sent from my PG86100 using XDA Premium App

I am currently running the same setup. I will try soon and report back. Thank you!
Sent from my PG86100 using XDA Premium App

MiSfit211 said:
If someone tries this please let me know if i need to change anything.
Sent from my PG86100 using XDA Premium App
Click to expand...
Click to collapse
That will work. It's exactly what I had to do about 5 days ago to get ADB to work with my 3D. Prior to doing that, i would just get "List of Devices attatched : ??????????? NO permissions". I did a bit of googling and found the steps you just posted. Definitely would've saved me some searching if this was up last week This should help out anyone with the same problem, because it definitely works. Nice write up.

working perfect, thank you very much for the guide.

The only thing I had to do in addition was restart the adb server (since it was already running)
$ ./adb kill-server
$ ./adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
HT16MHX28070 device
(Also, the chmod to executable won't hurt anything but isn't necessary)
Thanks for the post!

thanks buddy. this couldnt have been any more helpful. it worked like a charm. this was very easy to follow. I am new to linux and appreciate the effort that you put in to explain getting this to work.

I used this thread and it works perfectly.
XDA/showthread.php?p=11823740#post11823740

MiSfit211 said:
If you are having troubles getting your ubuntu 11.04 to recognize your Evo3d here is what I did to get ADB working on mine:
I am assuming you have adb setup.
1. Plug your EVO3d into your pc as charge only
2. in terminal type
lsusb
3. You should see something like this:
Bus 001 Device 007: ID 0bb4:0cba High Tech Computer Corp
that is your evo3D(verify the eight digit id is the same before doing step 6 if it is not change to match your evo3d vendor id)
sudo gedit /etc/udev/rules.d/99-android.rules
4. Enter your ubuntu password if prompted
5. This should have brought up a new gedit file with 99-android.rules as
the title
6. copy and paste this into that gedit document:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4:0cba", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"
and save the new document.
7. make the new document executable:
sudo chmod a+rx /etc/udev/rules.d/99-android.rules
8. then restart dev environment:
sudo restart udev
9. open terminal and enter
adb devices
10. your evo 3d should be setup
Hopefully this helps anyone having the same issues I was having.
Click to expand...
Click to collapse
great post.just a heads up, you shouldn't have to do this on 11.10 though. after a fresh install of 11.10 and android-sdk all seems to be working without doing this.

Related

[Tool] ADB browser V0.34 for Linux and Windows

Hi
ADBBrowser is a GUI based file browser for Android devices. It will run on most Linux and Windows systems. Originally written for my Sony X10i, But should work on ALL android phones. Adbbrowser requires Android STK to be installed.
Get latest Adbbrowser
Regards
Balsat
works on ubuntu 10.10 x64, cheers
Hi,
Is there any way to get adb working from the terminal in linux ?
I am trying to experiment with my phone, but I can not get adb to detect my phone. I am using the following code inside 50-android.rules, but it does not work!
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", MODE="0666", OWNER="pavan"
However, replacing 0fce with the appropriate code for a Samsung Nexus S seems to work, so I do not think there is a problem with the installation.
Am I missing something ? Is trying to get the X10 to work with adb in Linux futile ? (I am asking because I have not any pages talking about this).
Thanks,
Pavan
while having the rules for it set is definitely the better choice, you can also just escalate the adb server to root-rights, which will allow it without problem.
Code:
adb kill-server
sudo adb devices
HI,
Thanks for the response! I have tried the following and it still does not work.
Neither does the adb browser.
trying to use adb
Code:
$ sudo lsusb -v | grep idVendor
idVendor 0x1d6b Linux Foundation
idVendor 0x1d6b Linux Foundation
idVendor 0x8087 Intel Corp.
idVendor 0x8087 Intel Corp.
idVendor 0x0b05 ASUSTek Computer, Inc.
idVendor 0x04f2 Chicony Electronics Co., Ltd
idVendor 0x0fce Sony Ericsson Mobile Communications AB
$ adb kill-server
$ sudo adb kill-server
$ sudo adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
Trying to use adbbrowse
Code:
$ ./adbbrowse
[WARNING] Out of OEM specific VK codes, changing to unassigned
[WARNING] Out of unassigned VK codes, assigning $FF
TApplication.HandleException Access violation
Stack trace:
$00000000004D7A2C
$00000000004D7DD6
$00000000004D7F08
$00000000004C76F9
$00000000004C9F41
$00000000004D27FF
The browser window opens and the left pane says device NOT connected.
The phone says it is connected in USB debugging mode.
I am using freeX10 beta 2. (baseband: 2.0.46, kernel 2.6.29)
I am using 64 bit (Arch) Linux if that would help.
pavanky: there is nice program called qtAdb in AUR, works for me in my archbang
tr0llica said:
pavanky: there is nice program called qtAdb in AUR, works for me in my archbang
Click to expand...
Click to collapse
Does this work with X10 ?
The adb on my machine already works with Nexus S, but not with X10.
I will be giving it a try and provide an update once I go home.
Thanks for the information though!
----
I just checked out QtAdb
It does not detect the phone either!
pavanky: do you have usb debugging enabled? what rom are you running?
pavanky said:
The browser window opens and the left pane says device NOT connected.
The phone says it is connected in USB debugging mode.
I am using freeX10 beta 2. (baseband: 2.0.46, kernel 2.6.29)
I am using 64 bit (Arch) Linux if that would help.
Click to expand...
Click to collapse
Sorry if this was not clearer. But I think this is the information you are asking for ?
pavanky: oh ok, sorry, do you have openjdk or properiaty sun java? if you have openjdk you should try jre/jdk
pavanky said:
HI,
The browser window opens and the left pane says device NOT connected.
The phone says it is connected in USB debugging mode.
I am using freeX10 beta 2. (baseband: 2.0.46, kernel 2.6.29)
I am using 64 bit (Arch) Linux if that would help.
Click to expand...
Click to collapse
adb kill-server
sudo adb start-server
balsat said:
adb kill-server
sudo adb start-server
Click to expand...
Click to collapse
Same as
Code:
adb kill-server
sudo adb start-server
does not work
tr0llica said:
pavanky: oh ok, sorry, do you have openjdk or properiaty sun java? if you have openjdk you should try jre/jdk
Click to expand...
Click to collapse
I have the proprietary version. I can not understand why one phone works while the other doesn't.
Hi all,
Thanks for the help! I uninstalled android-sdk provided by the user repo and installed from the android installer. Everything works perfectly!
I'm gonna try this. Should work fine, I've run adb perfectly on both my Ubuntu machines. It's easier to use than in windows, in fact.
sent from my FreeX10 Froyo beta using XDA App
Now Windows 32 bit is supported!
balsat said:
Now Windows 32 bit is supported!
Click to expand...
Click to collapse
Hi Balsat, can you share the sources?
Thanks

[Guide] In-Depth Compiling using Ubuntu 12.10

DISCLAIMER: I am in no way responsible for you breaking your phone or your computer. You the reader/user/dev/compiler understand that you enter into this agreement freely with no expectations that everything will work 100% of the time.
This is in no way a means of stealing people away from Shrikes guide. If you do not have ubuntu installed as a complete os/ or do not intend to maked modifications to system files etc. Then please use the guide for compiling roms using a virtual box here (CM9 The complete noobs guide to building CM9 in a virtual machine)
Still with me. COOL. So you now have either a dual boot or a fully thrashed Linux machine. I will be using my Vaio VPCF114 box with Ubuntu 12.10 to make this guide. This is also compatible with 12.04 if you have not yet upgraded. I am not sure if the same goes for Redhat/Fedora or Backtrack 5. My work here is a compilation of years of doing research and compiling my own roms.
This guide is to help people that have little knowledge of linux get a base idea of where to start to make their own roms and kernels. Part 1 will be building your box and compiling a rom. Part 2 will be how to make and grab your Kernel.
First lets get Dropbox from here DROPBOX This is good for backing up your libs and sharing files with other Devs.
What you need:
1) A Windows computer, preferably with a CPU that supports 64-bit. Your pc/laptop does no need to have 64-bit windows on it, your CPU just needs to support the hardware. I think at this day and age, almost all devs have a 64-bit box. You will need this so you can make a dual boot box.
2) Plenty of memory. I recommend at least 4GB on the host computer. You can make it work on less, but more is better.
3) At least 60GB of free hard drive space during the install, but i'm sure you already know that and have gigs upon gigs of free space. If you do not know how much space you have, go to settings>details and it will tell you. Note: The source download is approximately 8.5GB in size. You will need over 30GB free to complete a single build, and up to 100GB (or more) for a full set of builds.
4) Lastly a good book, tab, second pc, whatever because this is not a quick process. And compiling roms literally takes hours.
5) Most importantly UBUNTU 12.10. If on the off hand you do not have it, you can pick it up at Ubuntu Central
OK YOU READY. LET'S GET CRACKING. First you need to set up Java on your box. Then grab a couple of programs you will need for editing files Go to your UBUNTU SOFTWARE CENTER. In the search bar in the top right type in Java. We will be installing Java 6 Runtimes.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, go here JAVA
If the link does not work, you want accept the license agreement and download jdk-6u35-linux-x64.bin
Once it done:
chmod a+x ~/Downloads/jdk-6u35-linux-x64.bin
sudo mv ~/Downloads/jdk-6u35-linux-x64.bin /usr/lib
cd /usr/lib
sudo ./jdk-6u35-linux-x64.bin
Now lets finish the install and make it default: (Remember to enter in the lines one at a time)
sudo mv jdk1.6.0_35/ jvm/
sudo rm jdk-6u35-linux-x64.bin
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_35/jre/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_35/bin/javac 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_35/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_35/bin/javadoc 1
IF YOU HAVE MULTIPLE JAVA JDK'S INSTALLED FOR OTHER PROJECTS YOU WILL WANT TO MAKE 1.6 THE DEFAULT.
On each command you will have to select the version of java you want to use. This command is helpful if you also do other coding.
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config jar
sudo update-alternatives --config javadoc
Java 6: for Gingerbread and newer
Java 5: for Froyo and older
Note: The lunch command in the build step will ensure that the Sun JDK is used instead of any previously installed JDK.
Now what we need:
We need to open up a terminal window and download packages.
Remember you will need to input your password after each line.
sudo add-apt-repository ppa:git-core/ppa
and
sudo apt-get update
(this will download all of the Quantal updates for universe and multiverse.
Next we want to install some Libs and Binaries. (You can copy and paste this into your terminal)
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool gcc-multilib g++-multilib pngcrush
(don't worry. some of the libs my fail. This happens as google changes their sources)
Now we need to tell the computer how to "REPO", this is where you will tell it to handle the Andorid sources via the Git command.
cd ~
mkdir -p bin
export PATH=${PATH}:~/bin
Once done you can use "echo $PATH" to see all of your path directories.
sudo apt-get install curl
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
(this will get you the repo script)
Now lets give it executable permissions by using chmod
chmod a+x ~/bin/repo
Now that we can repo
Lets setup the Android SDK. (Get a beer/coffee/soda, this will take a second)
Go to http://developer.android.com/sdk/index.html And install the ADT bundle for Linux.
Install the SDK and Eclipse IDE
Unpack the ZIP file (named adt-bundle-linux.zip) and save it to an appropriate location, such as a "Development" directory in your home directory.
Open the adt-bundle-linux/eclipse/ directory and launch eclipse.
That's it! The IDE is already loaded with the Android Developer Tools plugin and the SDK is ready to go. To start developing, read Building Your First App on the developer site.
Caution: Do not move any of the files or directories from the adt-bundle-linux directory. If you move the eclipse or sdk directory, ADT will not be able to locate the SDK and you'll need to manually update the ADT preferences.
Now to just add the tools to our $Path.
gedit .bashrc
Scroll to very bottom, under last fi input
export PATH=${PATH}:~/adt-bundle-linux/sdk/tools
export PATH=${PATH}:~/adt-bundle-linux/sdk/platform-tools
That was pretty painless.
Now lets start some cool stuff.
TestSigning
Click on your desktop menu bar and go into your home folder. Press Ctrl and h together on your keyboard to show hidden folders. Anything marked with a . in front of it is hidden, we are looking for a folder name .gnome2, go into it and look for nautilus-scripts. Once inside this folder, right click on a empty space and select create document and then empty file and name it sign. Open up that empty document and copy and paste this script from dumbfaq on xda
Code:
#!/bin/bash
# Update the Loc var to where YOU stored the testsign.jar file !
SUCCESS=
Loc=~/android/source/
for arg
do
TMP=$(ls $arg | sed 's/\(.*\)\..*/\1/')
EXT=${arg##*.}
java -classpath "$Loc"testsign.jar testsign "$arg" "$arg"-signed 2> /tmp/signTmp
SUCCESS=$?
if [ $SUCCESS -eq 1 ]
then
zenity --info --title "Sign APK" --text "signing FAILED! \n`cat /tmp/signTmp`"
exit 1
fi
mv $TMP.$EXT-signed $TMP-signed.$EXT
done
zenity --info --title "Sign APK" --text "signing completed!"
Save and exit out and right click on our new script and select properties. select the permissions tab and look for a check box that says allow executing as a program. click on it and now we have a pretty little script that we can just right click on a update.zip file and sign with our test keys for flashing. You will also need the testsign.jar from the bottom of this guide.
Now lets do a couple things so that we can get our Phones Vendor ID.
Type in your terminal
lsusb
While your phone isconnected to see our vendor id and you will something like this. Note that for the Rezound our vendor id is
Bus 002 Device 003: ID 0bb4:0ccd HTC (High Tech Computer Corp.)
In this case the Vendor Id is “18d1″ and the Product ID is “4e12″. Please keep in mind that the Vendor ID for HTC changed from “0bb4″ to “18d1″. The older HTC phones like the G1 have a Vendor ID of “0bb4″.
Now that we have that, we can make our rules for for connecting to adb
sudo gedit /etc/udev/rules.d/51-android.rules
Paste
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
SUBSYSTEM==”usb”, ATTRS{idVendor}==”18d1″, SYMLINK+=”android_adb”, MODE=”0666″
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
Save and exit
Reboot your computer so that all of the changes we have made can Take effect.
OK. All setup and ready to start making a Rom with your name on it.
IF you are already running AOSP on your phone, you can back up you system now Do this by:
cd ~/
mkdir stock
cd stock
adb pull /system/ ~/stock/
This will dump your entire system directory into the stock folder. This is good so you always have a working system. Now zip the folder and tuck it away for safe keeping.
Now the MEAT AND POTATOES. Grabbing the Source. "CYANOGENMOD"
cd ~/
mkdir -p android/source
touch ~/.netrc
cd ~/android/source
sudo apt-get install git
sudo sysctl -w net.ipv4.tcp_window_scaling=0 (remvoes the overstack flow problem that causes some repo jobs to hang)
repo init -u git://github.com/Chad0989/android.git -b ics
(Note: If you want to compile a jellybean rom, just replace the ics with jellybean!)
Once you do this, it's going to ask you for your email. This is how you will log back into the repo in the future. So answer the questions correctly.
Now we will sync the Repo and set it to run.
repo sync -j4
-j# (# means twice the amount of cores in your computer) means jobs. I have an i7 processor and a pretty decent internet connection, so i'm running max jobs at once for faster sync) Be patient. It's still going to take a while to clone the directory.
Once done with the Sync we want to setup our device.
This is where we get the pre-built part of our rom.
First we will
./vendor/cm/get-prebuilts
Probably all that will be left directly after the repo will be the Terminal service for android.
Now we are about ready to compile our Rom:
cd ~/android/source
repo sync (it should only take a moment this time)
. build/envsetup.sh
make clobber
Now you can compile your rom using the brunch command (This will take about 1 to 1 1/2 hours depending on your box)
brunch vigor
Now you can go to the output box and pick up your freshly made Rom.
Reserved for Kernel
Changed Repo from CyanogenMod to Chad0989 for easier Vigor integration.
21NOV12: Change Repo from Chad0989 to Dragonstalker github.
Change Repo from DragonStalker to Chad0989 github
Modified Testsign script to reflect changed ADT Tools location.
First, looks interesting i might look into this when i boot into Ubuntu next time.
jon7701 said:
First, looks interesting i might look into this when i boot into Ubuntu next time.
Click to expand...
Click to collapse
i wanted to show people how i do my own personal roms and kernels. With this setup, you can make roms for multiple devices and also use Eclipse to make apps if thats your bag baby.
dragonstalker said:
i wanted to show people how i do my own personal roms and kernels. With this setup, you can make roms for multiple devices and also use Eclipse to make apps if thats your bag baby.
Click to expand...
Click to collapse
Nice, if i can figure out a little more about how to dev and stuff maybe ill make my own rom one day.
Wow. So going to do this right now. Thanks for your effort on this.
Sent from my ADR6425LVW using xda premium
I can't wait for the final act! I am going to try this so I can get my hands on some jelly beans.
Vedor ID
Quick question. I notice that you mention that "in this case the Vedor ID is 18d1" but in your screenshot it say 0bb4. You have some clarification after that and I'm not sure I understand it 100%. My rezound show the 0bb4 for vedor ID as well. I guess what I'm asking is if you could clarify the statement about the Vendor ID? Thanks, sorry if this is a dumb question.
Very nice guide. Extremely thorough which makes a great tutorial.
vonhinkle said:
Quick question. I notice that you mention that "in this case the Vedor ID is 18d1" but in your screenshot it say 0bb4. You have some clarification after that and I'm not sure I understand it 100%. My rezound show the 0bb4 for vedor ID as well. I guess what I'm asking is if you could clarify the statement about the Vendor ID? Thanks, sorry if this is a dumb question.
Click to expand...
Click to collapse
It shows it as 0bb4. But as for the drivers Ubuntu uses. The Vendor id for High Tech Computers is 18d1. I was using a stock rom to pull the vendor Id from and for some reason, HTC has never changed it on there.
GrayTheWolf said:
Very nice guide. Extremely thorough which makes a great tutorial.
Click to expand...
Click to collapse
I teach networking to and development to the Army. I took the same ideology into this guide. Not just tell you how to do it, but explain why it works. I will, as thing change try to keep this updated, and keep up with Shrike as he learns new things. Thank Shrike for making me realize that we didn't have a guide for people that do run Ubuntu, and need to know how to set up.
Ok the updated Guide is online. Please tell me if anything is not correct. I'm only Human. Working with Snuzzo for and Updated Kernel Optimization section and hopefully Chad with the Repo..
More to Follow .............................
I'm compiling right now. The guide was good, but there were some extra steps I had to take to get this far. My Rezound is old, so my android.rules file needed the 0bb4 id (I got rid of the ATTR{idproduct} part). Also adb wasn't connecting when using filename 51-android.rules, so I used 70-android.rules and mode 0666 instead of 0600, then adb connected. I think the 70 was the fix, but mode 0666 I found from other, older guides on setting up adb, I don't know what change that makes but it's probably unnecessary. Finally, on compile I was getting errors like bison missing and other missing also. That big line with all the installs must have not worked for all the programs, so I just installed the missing ones individually per error message. There may have been other issues that I am forgetting but nothing too hard to figure out, of course I have worked a tiny bit with Ubuntu over the past 5 years.
Still compiling, so it seems to be working. I used Chad0989's repo, and jellybean! Thanks for the guide, if I have any problems I shall post them.
drkow19 said:
I'm compiling right now. The guide was good, but there were some extra steps I had to take to get this far. My Rezound is old, so my android.rules file needed the 0bb4 id (I got rid of the ATTR{idproduct} part). Also adb wasn't connecting when using filename 51-android.rules, so I used 70-android.rules and mode 0666 instead of 0600, then adb connected. I think the 70 was the fix, but mode 0666 I found from other, older guides on setting up adb, I don't know what change that makes but it's probably unnecessary. Finally, on compile I was getting errors like bison missing and other missing also. That big line with all the installs must have not worked for all the programs, so I just installed the missing ones individually per error message. There may have been other issues that I am forgetting but nothing too hard to figure out, of course I have worked a tiny bit with Ubuntu over the past 5 years.
Still compiling, so it seems to be working. I used Chad0989's repo, and jellybean! Thanks for the guide, if I have any problems I shall post them.
Click to expand...
Click to collapse
Thanks for the headsup. Android.source.com said to change it to that. SO I will change it back.
As for the progs that did not install. Android Source pulls progs, i've just been to lazy to go over the tag and remove the ones that have been obsoleted. I will take care of that this weekend.
Schweet! I compiled my own rom! Syncing took about 30 mins, compiling also 30 mins. I have a 4.4 ghz oc'd Core i5 with 8 gig 1866 ram. Now I need to learn some simple things, like how to rename the rom package, edit the installation text, add some tweaks, etc.
What gapps do you use for CM10? I downloaded this one http://wiki.cyanogenmod.org/wiki/Latest_Version/Google_Apps for CM10, but it doesn't list xdpi, and it failed flashing. So I used this one instead http://forum.xda-developers.com/showthread.php?t=1965290 and it worked.
edit: google search seems to force close with the gapps I used.
drkow19 said:
Schweet! I compiled my own rom! Syncing took about 30 mins, compiling also 30 mins. I have a 4.4 ghz oc'd Core i5 with 8 gig 1866 ram. Now I need to learn some simple things, like how to rename the rom package, edit the installation text, add some tweaks, etc.
What gapps do you use for CM10? I downloaded this one http://wiki.cyanogenmod.org/wiki/Latest_Version/Google_Apps for CM10, but it doesn't list xdpi, and it failed flashing. So I used this one instead http://forum.xda-developers.com/showthread.php?t=1965290 and it worked.
edit: google search seems to force close with the gapps I used.
Click to expand...
Click to collapse
Note: There is a reason that me and Chad have asked not to compile CM10 roms. The code is not complete yet.
If you found gapps that work, then that's a major. Post to the thread where you found it and that it works. To rename a rom package, you can just right click>rename and name it what you want it. To rename it so it shows up inside the rom on the phone for details is different.
I would not advise it if you don't know what you are doing, but you have to edit the build.prop. As for tweaks. Depends on what tweaks you want to change. Android Developer site is where i get all my tweaks, and i get some from other devs. Glad you are joining the community.
Happy building and thanks for the contribution.
issues
dragonstalker said:
Note: There is a reason that me and Chad have asked not to compile CM10 roms. The code is not complete yet.
If you found gapps that work, then that's a major. Post to the thread where you found it and that it works. To rename a rom package, you can just right click>rename and name it what you want it. To rename it so it shows up inside the rom on the phone for details is different.
I would not advise it if you don't know what you are doing, but you have to edit the build.prop. As for tweaks. Depends on what tweaks you want to change. Android Developer site is where i get all my tweaks, and i get some from other devs. Glad you are joining the community.
Happy building and thanks for the contribution.
Click to expand...
Click to collapse
hey guys ive been compiling on 12.04 still new to this but ive set up a new enviorment useing this guide with 12.10 im getting this error though
Import includes file: /home/ken/CM10/out/target/product/i577/obj/SHARED_LIBRARIES/audio.primary.msm8660_intermediates/import_includes
make: *** No rule to make target `/home/ken/CM10/out/target/product/i577/obj/lib/libaudioalsa.so', needed by `/home/ken/CM10/out/target/product/i577/obj/SHARED_LIBRARIES/audio.primary.msm8660_intermediates/LINKED/audio.primary.msm8660.so'. Stop.
make: *** Waiting for unfinished jobs....
target StaticLib: libc_nomalloc (/home/ken/CM10/out/target/product/i577/obj/STATIC_LIBRARIES/libc_nomalloc_intermediates/libc_nomalloc.a)
any help would be appreatiated thanks
dragonstalker said:
Note: There is a reason that me and Chad have asked not to compile CM10 roms. The code is not complete yet.
If you found gapps that work, then that's a major. Post to the thread where you found it and that it works. To rename a rom package, you can just right click>rename and name it what you want it. To rename it so it shows up inside the rom on the phone for details is different.
I would not advise it if you don't know what you are doing, but you have to edit the build.prop. As for tweaks. Depends on what tweaks you want to change. Android Developer site is where i get all my tweaks, and i get some from other devs. Glad you are joining the community.
Happy building and thanks for the contribution.
Click to expand...
Click to collapse
Roger that. I will definitely try to do some build.prop tweaks, and then move on from there. Thanks again for the guide! Meanwhile I am emailing Ubuntu about their re-installer option to erase and reinstall Ubuntu, which wipes out all partitions, not just the current Ubuntu partition as I figured would happen. It wiped my main NTFS partition with all my stuff, without even a warning! Currently using Active Partition Recovery, but I fear since I compiled CM on that whole harddrive that most of the contents were probably overwritten. :crying:
drkow19 said:
Roger that. I will definitely try to do some build.prop tweaks, and then move on from there. Thanks again for the guide! Meanwhile I am emailing Ubuntu about their re-installer option to erase and reinstall Ubuntu, which wipes out all partitions, not just the current Ubuntu partition as I figured would happen. It wiped my main NTFS partition with all my stuff, without even a warning! Currently using Active Partition Recovery, but I fear since I compiled CM on that whole harddrive that most of the contents were probably overwritten. :crying:
Click to expand...
Click to collapse
Never heard of that happening before. Let me know what you find out.

HOWTO: Linux and MTP

This is a quick how to get MTP working on Linux, the guide is for distro's based on Debian (mint\debian\ubuntu) OpenSuse, Fedora AND Gentoo. If there's any missing for major distro's let me know, or add them to a separate post and i'll put them up here
***Debian based distros**
Code:
sudo apt-get install mtpfs
sudo mkdir /media/onex
sudo chmod 775 /media/onex
sudo mtpfs -o allow_other /media/onex
gedit /etc/udev/rules.d/51-android.rules
and add the following line:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
and then:
sudo service udev restart
***Arch Linux***
Code:
pacman -S libmtp
After installation, you have several mtp tools available. Upon connecting your MTP device, you use:
mtp-detect
and add the following line:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
and then reload udev rules:
udevadm control --reload
Arch Linux guide is from the ArchLinux wiki
**Redhat\Fedora16**
First of all, I using my computer with other people, who can come over the network, so the 0666 mode bits not a right choice for me. I make it all on a fedora 16, but the distro is really not important.
So the steps:
- add a user to the "disk" group (or whatever You want)
- make a mount point (the media doesn't work for me, across the init removes the content)
- add this mount point to the fstab, with some parameter
- create udevd rules
- restart udevd
- install fuse-mtpfs
- (re)login user
- try it
My common experience is that, the mtpfs is very very very very slow. Really slow, so I can use it only with CLI, any GUI has been coming back with time out
And the "code":
Code:
usermod -a -G disk $LOGINUSER
Code:
sudo mkdir /mnt/sgs2 ; sudo chgrp disk /mnt/sgs2; sudo chmod 0770 /mnt/sgs2
Code:
sudo echo "mtpfs /mnt/sgs2 fuse users,noauto 0 0" >> /etc/fstab
Code:
cat > /etc/udev/rules.d/51-android.rules <<EOF
SUBSYSTEM!="usb_device", GOTO="label_end"
ACTION!="add", GOTO="label_end"
# ATRRS{idVendor}== ertekei:
#Acer 0502
SUBSYSTEM=="usb",ATTRS{idVendor}=="0502",MODE="0660",GROUP="disk"
#ASUS 0b05
SUBSYSTEM=="usb",ATTRS{idVendor}=="0b05",MODE="0660",GROUP="disk"
#Dell 413c
SUBSYSTEM=="usb",ATTRS{idVendor}=="413c",MODE="0660",GROUP="disk"
#Foxconn 0489
SUBSYSTEM=="usb",ATTRS{idVendor}=="0489",MODE="0660",GROUP="disk"
#Fujitsu 04c5
SUBSYSTEM=="usb",ATTRS{idVendor}=="04c5",MODE="0660",GROUP="disk"
#Fujitsu Toshiba 04c5
SUBSYSTEM=="usb",ATTRS{idVendor}=="04c5",MODE="0660",GROUP="disk"
#Garmin-Asus 091e
SUBSYSTEM=="usb",ATTRS{idVendor}=="091e",MODE="0660",GROUP="disk"
#Google 18d1
SUBSYSTEM=="usb",ATTRS{idVendor}=="18d1",ATTRS{idProduct}=="4ee1",MODE="0660",GROUP="disk"
#Hisense 109b
SUBSYSTEM=="usb",ATTRS{idVendor}=="109b",MODE="0660",GROUP="disk"
#HTC 0bb4
SUBSYSTEM=="usb",ATTRS{idVendor}=="0bb4",MODE="0660",GROUP="disk"
#Huawei 12d1
SUBSYSTEM=="usb",ATTRS{idVendor}=="12d1",MODE="0660",GROUP="disk"
#K-Touch 24e3
SUBSYSTEM=="usb",ATTRS{idVendor}=="24e3",MODE="0660",GROUP="disk"
#KT Tech 2116
SUBSYSTEM=="usb",ATTRS{idVendor}=="2116",MODE="0660",GROUP="disk"
#Kyocera 0482
SUBSYSTEM=="usb",ATTRS{idVendor}=="0482",MODE="0660",GROUP="disk"
#Lenovo 17ef
SUBSYSTEM=="usb",ATTRS{idVendor}=="17ef",MODE="0660",GROUP="disk"
#LG 1004
SUBSYSTEM=="usb",ATTRS{idVendor}=="1004",MODE="0660",GROUP="disk"
#Motorola 22b8
SUBSYSTEM=="usb",ATTRS{idVendor}=="22b8",MODE="0660",GROUP="disk"
#NEC 0409
SUBSYSTEM=="usb",ATTRS{idVendor}=="0409",MODE="0660",GROUP="disk"
#Nook 2080
SUBSYSTEM=="usb",ATTRS{idVendor}=="2080",MODE="0660",GROUP="disk"
#Nvidia 0955
SUBSYSTEM=="usb",ATTRS{idVendor}=="0955",MODE="0660",GROUP="disk"
#OTGV 2257
SUBSYSTEM=="usb",ATTRS{idVendor}=="2257",MODE="0660",GROUP="disk"
#Pantech 10a9
SUBSYSTEM=="usb",ATTRS{idVendor}=="10a9",MODE="0660",GROUP="disk"
#Pegatron 1d4d
SUBSYSTEM=="usb",ATTRS{idVendor}=="1d4d",MODE="0660",GROUP="disk"
#Philips 0471
SUBSYSTEM=="usb",ATTRS{idVendor}=="0471",MODE="0660",GROUP="disk"
#PMC-Sierra 04da
SUBSYSTEM=="usb",ATTRS{idVendor}=="04da",MODE="0660",GROUP="disk"
#Qualcomm 05c6
SUBSYSTEM=="usb",ATTRS{idVendor}=="05c6",MODE="0660",GROUP="disk"
#SK Telesys 1f53
SUBSYSTEM=="usb",ATTRS{idVendor}=="1f53",MODE="0660",GROUP="disk"
#Samsung 04e8
SUBSYSTEM=="usb",ATTRS{idVendor}=="04e8",ATTRS{idProduct}=="6860",MODE="0660",GROUP="disk"
#Sharp 04dd
SUBSYSTEM=="usb",ATTRS{idVendor}=="04dd",MODE="0660",GROUP="disk"
#Sony 054c
SUBSYSTEM=="usb",ATTRS{idVendor}=="054c",MODE="0660",GROUP="disk"
#Sony Ericsson 0fce
SUBSYSTEM=="usb",ATTRS{idVendor}=="0fce",MODE="0660",GROUP="disk"
#Teleepoch 2340
SUBSYSTEM=="usb",ATTRS{idVendor}=="2340",MODE="0660",GROUP="disk"
#Toshiba 0930
SUBSYSTEM=="usb",ATTRS{idVendor}=="0930",MODE="0660",GROUP="disk"
#ZTE 19d2
SUBSYSTEM=="usb",ATTRS{idVendor}=="19d2",MODE="0660",GROUP="disk"
LABEL="label_end"
Code:
udevadm control --reload-rules
Code:
yum/apt-get/pacman/etc install mtpfs
Logout-login, for get in to the disk group, connect the device via usb, and try
Code:
mptfs
without any parameter, and it must write out some information:
Code:
[email protected]:~$ mtpfs
Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
Found 1 device(s):
Samsung: Galaxy models (MTP) (04e8:6860) @ bus 2, dev 4
Attempting to connect device
Android device detected, assigning default bug flags
Listing File Information on Device with name: (NULL)
fuse: missing mountpoint parameter
And finally mount /it must be working now with user account/:
[CODE]mount /mnt/sgs2
or dismount:
Code:
umount /mnt/sgs2
**OpenSuse 12.2**
this method will work for music and photos access only,
Code:
sudo zypper addrepo -f http://packman.inode.at/suse/12.2/ packman
sudo zypper ref (type a to always accept the packman repo)
sudo zypper in mtpfs
sudo vim /lib/udev/rules.d/69-libmtp.rules and add the following line (replace vim with gedit if you want a gui editor)
# HTC One X+
ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0dfc", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
sudo cp /lib/udev/rules.d/69-libmtp.rules /etc/udev/rules.d/.
reboot
When you plug in the phone you will see android phone icon on the desktop click on it to browse your files.
*note
disable any media players from trying to read the device...
** Gentoo **
Code:
Prerequisites
If your device is not recognized by libmtp, try upgrading to latest (or even git) version.
User needs to be in group plugdev to mount device.
MTPFS
You need to add option: user_allow_other in /etc/fuse.conf
$ mkdir ~/AndroidDevice
$ mtpfs -o allow_other ~/AndroidDevice
NOTE: this can take really long time, up to several minutes. As an indication of successful mount the mtpfs will go to background.
To unmount:
$ /usr/bin/fusermount -u ~/AndroidDevice
If mtpfs doesn't work for you try updating to latest version first.
Go-MTPFS
Seems to be more stable
$ emerge -a go
$ mkdir ~/go
$ export GOPATH=/home/$USER/go
$ go get github.com/hanwen/go-mtpfs
To mount:
$ ~/go/bin/go-mtpfs ~/AndroidDevice
To unmount:
$ /usr/bin/fusermount -u ~/AndroidDevice
Troubleshooting
Sometimes (e.g. on HTC One X) USB debugging automatically turns on when device is connected to PC. You need to turn debugging off, otherwise libmtp can't recognise device.
Make sure your Android device is not going to sleep and the screen is not getting locked. Set screen timeout to very long values, or enable in Development section flag "Do not turn off the screen".
Thanks to ihavoc and Fonya1 for the opensuse and redhat\fedora tutorials
thank you a lot for your help.
when i try to acces to the /media/onex direcory i have this :
ls: cannot access onex: Transport endpoint is not connected
After making changes reboot your session or pc and it will probably mount correctly which you've probably done by now.
Sent from my HTC One X+ using xda premium
somemadcaaant said:
After making changes reboot your session or pc and it will probably mount correctly which you've probably done by now.
Sent from my HTC One X+ using xda premium
Click to expand...
Click to collapse
excuse me to ask many question but i am really noob. when all this done what would i see in /media/onex ? actualy after mounting the folder is empty
the only thing i need to do is copy files from/to my HOX+
Can anyone please confirm if this is exclusive to the HTC One X+, or would it work for other similar HTC devices such as One X, One S etc. as well?
It still dont work, i have tryed so many things these days to mount my HTC Ox+ as a USB Mass Storage and everything failed.
I tried tou manualy mount a MTP folder on my Ubuntu like Lloir explained here.
I tried to flash a TeamWorkRecovery and a ClockWorkRecovery to access the "Mount USB" option in the menu
my Device is seen by ubuntu but i am unable to read or write anything, for example if I copy a music album, the copy operation starts, takes a very long time an then end whith an error lik "error unable to copy xxxx.mp3 file does not exist"
actualy i am almost convicted that using an MTP device as an usb mass storage under Ubuntu is purely and simply IMPOSSIBLE !
HQRaja said:
Can anyone please confirm if this is exclusive to the HTC One X+, or would it work for other similar HTC devices such as One X, One S etc. as well?
Click to expand...
Click to collapse
works for ALL MTP devices
Thanks a bunch. This should come pretty handy. =)
Lloir said:
works for ALL MTP devices
Click to expand...
Click to collapse
does it works for you ?
how do you copy your files from/to your phone ?
Waiting for Ubuntu instructions (maybe)?
followed instructions to the letter and still cant mount my htc one xL running jellybean on ubuntu
Just a quick reply since this was linked on the front page. Tried with GNex and Ubuntu 12.10 and no dice.
spdrosin said:
Waiting for Ubuntu instructions (maybe)?
Click to expand...
Click to collapse
The instructions for Ubuntu are the first ones (Debian based distros), Lloir mentioned it at the start of the OP:
Lloir said:
This is a quick how to get MTP working on Linux, the guide is for distro's based on Debian (mint\debian\ubuntu) And Archlinux i will add others soon.
Click to expand...
Click to collapse
Linux really needs to add native support for MTP already. They also should add native support for adb as well while they are at it. Its annoying to have to add entrees to udev to even to be able to access the device.
One suggestion for anyone wanting to do this with a device other than an HTC:
You'll need to change the line you add to /etc/udev/rules.d/51-android.rules based on the vendor of your phone.
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Change the code to one of the following USB vendor ids:
Code:
Acer 0502
ASUS 0b05
Dell 413c
Foxconn 0489
Fujitsu 04c5
Fujitsu Toshiba 04c5
Garmin-Asus 091e
Google 18d1
Hisense 109b
HTC 0bb4
Huawei 12d1
K-Touch 24e3
KT Tech 2116
Kyocera 0482
Lenovo 17ef
LG 1004
Motorola 22b8
NEC 0409
Nook 2080
Nvidia 0955
OTGV 2257
Pantech 10a9
Pegatron 1d4d
Philips 0471
PMC-Sierra 04da
Qualcomm 05c6
SK Telesys 1f53
Samsung 04e8
Sharp 04dd
Sony 054c
Sony Ericsson 0fce
Teleepoch 2340
Toshiba 0930
ZTE 19d2
Most up-to-date list is here: http://developer.android.com/tools/device.html
You can also have multiple vendor lines in your /etc/udev/rules.d/51-android.rules file, just put one on each line. As someone who's testing on a bunch of different devices, I simply put a line in for all of the above
If your vendor code isn't listed, enter the command "lsusb" in a terminal, and you'll see something like this:
Code:
Bus 001 Device 119: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]
Bus 001 Device 112: ID 18d1:4e42 Google Inc.
The first four hex values of the id is the vendor ID, e.g., for the Samsung it's 04e8.
cloverz7 said:
Just a quick reply since this was linked on the front page. Tried with GNex and Ubuntu 12.10 and no dice.
Click to expand...
Click to collapse
same here with GNex and ubuntu 12.04
Use Airdroid
Using Airdroid and wifi from Tethering hotspot, you can simply access your Android without USB Cable and you can use anything OS. Search on Google Play with keyword "Airdroid"
Hey I have to say first off thanks for taking the time to figure this out! My problem is I am very new to linux and ubuntu. So when I open the terminal and type all the commands after "sudo mtpfs -o allow_other /media/onex" I get the response: "Listing raw device(s) No raw devices found." So should I have the device attached when I do this? Secondly the following command opens a text window. Is this where i type "SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"? Because now I can't save the text file because I don't have root. Should I be typing literally everything in Terminal? or am I just too new and missing a step. Your help would be greatly appreciated because I would really like to learn a lot more about linux however I'm a bit cautious asking for root for things and ****ing up lol. I'm over windows and will never use a mac so I want to learn! Sorry to be an idiot and a pain just wanna learn.
Nschneider7 said:
Hey I have to say first off thanks for taking the time to figure this out! My problem is I am very new to linux and ubuntu. So when I open the terminal and type all the commands after "sudo mtpfs -o allow_other /media/onex" I get the response: "Listing raw device(s) No raw devices found." So should I have the device attached when I do this? Secondly the following command opens a text window. Is this where i type "SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"? Because now I can't save the text file because I don't have root. Should I be typing literally everything in Terminal? or am I just too new and missing a step. Your help would be greatly appreciated because I would really like to learn a lot more about linux however I'm a bit cautious asking for root for things and ****ing up lol. I'm over windows and will never use a mac so I want to learn! Sorry to be an idiot and a pain just wanna learn.
Click to expand...
Click to collapse
That "SUBSYSTEM..." line needs to be appended to the file opened in the text editor. It shouldn't be entered on the command line.
And add "sudo" to in front of that gedit line...i.e., "sudo gedit /etc/udev/rules.d/51-android.rules"
Good luck!
I prefer to use adb. If you want a GUI you can use QtADB:
http://qtadb.wordpress.com/

[GUIDE] How To Compile TWRP Recovery for QVGA And Other Unsupported Devices.

How To Compile TWRP Recovery For QVGA And Other Unsupported Devices​
Guys a humble request don't spam this thread. If you face any error reply to this thread or PM me i will help and after you build it please don't post your bugs here this thread is only for compiling and not for resolving bugs in your build. I can only help with the errors you face during compilation because i faced a lot .
I thank XDA members cybojenix, kD as i got an idea of how to make guides from them
I would also thank Dees_troy for the sources.
I have worked hard in creating this guide so when you release your build please give proper credits .
Click to expand...
Click to collapse
Minimum Requirements:-
1. RAM:- 4GB
2. HDD Space:- More than 18GB required for CM7 source code (I am going to use CM7 for this guide as CM9 is not yet supported for many devices).
3. Processor:- Equal to Core 2 Duo or Anything above it.
4. Internet Speed:- Minimum of 2 Mbps as we will be downloading files of large size.
5. Patience:- A lots of it needed to get success
Click to expand...
Click to collapse
Ok Lets Start With Step 1:- Setting Up Your Computer For Development.
Getting Linux​
Please note your PC/Laptop must satisfy the minimum requirements to continue. If it doesn't contact any person who is developing for your device to develop this.
Click to expand...
Click to collapse
For compiling you need Linux the most common and free Linux available for development is Ubuntu. Go ahead choose your version and download it.
If you wish to use Ubuntu 10.04 64-Bit for Development use this link
http://releases.ubuntu.com/lucid/ubuntu-10.04.4-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 10.10 64-Bit for Development use this link
http://releases.ubuntu.com/maverick/ubuntu-10.10-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 11.04 64-Bit for Development use this link
http://releases.ubuntu.com/natty/ubuntu-11.04-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 11.10 64-Bit for Development use this link
http://releases.ubuntu.com/oneiric/ubuntu-11.10-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 12.04 64-Bit for Development use this link
http://releases.ubuntu.com/precise/ubuntu-12.04-desktop-amd64.iso
Click to expand...
Click to collapse
After downloading install it in a Virtual Machine or dual boot it alongside another OS you are using now. If you are using a Virtual Machine make sure you allocate more than 50GB of HDD space.
So far so good now that you have Linux installed :victory: you can proceed to the next step of setting up which is followed in the second post.
Setting Up Your Laptop/PC For Development.​
Note:- You may be asked for a password when using sudo command.
Click to expand...
Click to collapse
Installing Python-2.7.5:-
First and foremost is installing Python. For those who are wondering what Python is well here is the answer Python is a language like C,C++,Java which primarily centers around Linux.
1. Open Terminal by hitting Ctrl+Alt+T.
2. Type or copy paste these codes into terminal (I prefer typing though )
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
tar -xvzf Python-2.7.5.tgz
cd Python-2.7.5
./configure --prefix=/usr/local/python2.7
make
sudo make install
sudo ln -s /usr/local/python2.7/bin/python /usr/bin/python2.7
3. Python is now installed to make sure type this code in terminal
Code:
python
and it should produce an output like this
Code:
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or " lincense" for more information.
>>>
4. If it shows something like that you are good to go.
5. Press Ctrl+D, close the terminal and proceed to install Java 6 JDK.
Installing Java 6 JDK:-
I have to thank cybojenix and kD for this part as it is theirs and i didn't write this part .
Click to expand...
Click to collapse
If you are using Ubuntu 12.04 follow these commands others skip this set of commands.
1. Download Java 6 JDK from here.
2. After Downloading copy that to the Downloads folder.
3. Open Terminal.
4. Type these commands one by one in the terminal
Code:
cd Downloads
chmod +x jdk-6u34-linux-x64.bin
sudo ./jdk-6u34-linux-x64.bin
sudo mv jdk1.6.0_34 /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_34/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_34/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_34/bin/javaws 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
If you are not using Ubuntu 12.04 follow these commands:-
1. Open terminal
2. Type these commands one by one in the Terminal.
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk
If you had done those steps correctly then you must now have Java installed.
To check and make sure it is installed type this command in terminal.
Code:
java -version
and the output should be
Code:
java version "1.6.0_34"
Java(TM) SE Runtime Environment (build 1.6.0_34-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.9-b04, mixed mode)
If the output was some thing similar you are now ready to install GNU Make.
Close the Terminal and proceed.
Installing GNU Make 3.81
Note:- Any other version of make either lower or higher won't work for compiling TWRP.
Click to expand...
Click to collapse
1. Open Terminal
2. Type these codes in terminal.
Code:
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.81
./configure
sudo make install
3. That's it now you got make installed.
To check and make sure that Make is installed type this command in Terminal.
Code:
make -v
and it shoud give the output
Code:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This Program built for x86_64-unknown-linux-gnu
If it was something smiliar to that you can close the terminal and proceed to the next step.
Ok now we got the big guns rolling it's now time for small guns without whom we can't compile yes I mean't the dependencies.
Open Terminal and apply these commands:-
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc gedit git schedtool
export USE_CCACHE=1
If you are using Ubuntu 10.10 apply this:-
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
If you are using Ubuntu 11.04 apply this:-
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
sudo apt-get install libx11-dev:i386
If you are using Ubuntu 12.04 apply this:-
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
sudo apt-get install libx11-dev:i386
sudo apt-get install libncurses5-dev:i386 libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Good now you will have dependencies installed.
It is now time for SDK and ADB which will be continued in the next post.
Installing SDK and ABD​
Installing SDK:-
1. Download Android SDK from here.
2. Extract it to your home folder.
3. Rename the folder to sdk.
4. Open the Terminal and type these commands
Code:
cd sdk/tools
./android sdk
5. A window should popup and there will will be a list of Packages.
6. Install Android SDK Tools and Android SDK Platform-Tools.
Checking ADB:-
Since you installed Android SDK Tools and Android SDK Platform-Tools ADB must now be checked and configured.
1. Enable USB Debugging in your device and connect your phone to computer.
2. Now execute these commands in Terminal
Code:
cd sdk/platform-tools
./adb devices
It should give the output as
Code:
List of devices attached 0123456789ABCDEF device-name (Note the number-letter combination may vary)
If it does give like that skip Adding Permissions.
Or if it gives the output as
Code:
List of devices attached ????????????????? no permissions
Don't worry we have add permission to your device that's it.
Adding Permissions:-
1. Open Terminal
2. Execute this command.
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
3. It should open text editor
4. Paste this line
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", MODE="0666"
5. Replace Vendor ID with your Vendor id given in the list.
For e.g if your vendor is Acer you will replace "xxxx" with "0502"
Here is a list of Vendor ID's
Code:
Acer - 0502
ASUS - 0b05
Dell - 413c
Foxconn - 0489
Fujitsu - 04c5
Fujitsu Toshiba - 04c5
Garmin-Asus - 091e
Google - 18d1
Hisense - 109b
HTC - 0bb4
Huawei - 12d1
K-Touch - 24e3
KT Tech - 2116
Kyocera - 0482
Lenovo -17ef
LG - 1004
Motorola - 22b8
MTK - 0e8d
NEC - 0409
Nook - 2080
Nvidia - 0955
OTGV - 2257
Pantech - 10a9
Pegatron - 1d4d
Philips - 0471
PMC-Sierra - 04da
Qualcomm - 05c6
SK Telesys - 1f53
Samsung - 04e8
Sharp - 04dd
Sony - 054c
Sony Ericsson - 0fce
Teleepoch - 2340
Toshiba - 0930
ZTE - 19d2
6. Save and close the editor.
7. Execute this command in Terminal.
Code:
sudo gedit /etc/udev/rules.d/99-android.rules
8. Again paste this line
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", MODE="0666"
Replace "xxxx" with Vendor ID.
9. Save it and close the file.
10. Execute these commands one by one in the Terminal
Code:
sudo chmod a+r /etc/udev/rules.d/99-android.rules
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Now RESTART your Ubuntu and type these codes in the Terminal.
Code:
cd sdk
./adb devices
You must not get the output with ???????????????? no permission still if you get it please reply below I will help.
Now we need to edit .bashrc so that we can access adb from anywhere
Execute these codes in the Terminal.
Code:
cd
sudo gedit .bashrc
It should open text editor copy paste this line at the end.
Code:
export PATH=${PATH}:~/sdk/tools
export PATH=${PATH}:~/sdk/platform-tools
Save it and close it.
Now in terminal type adb devices it should give output List of devices attached.
That's it you got Ubuntu, Python, Java 6 JDK, GNU Make-3.81, SDK and ADB ready.
Now you are ready to start development go on to the next step to download source code.
Intializing Repo And Download Source Code
Step 2:- Initializing Repository And Downloading Source Code​
Initializing Repository​
First step is to download the Repo which is essential to download the source code.
1. Open Terminal
2. Execute these commands one by one in Terminal
Code:
mkdir ~/bin
PATH=~/bin:$PATH
sudo apt-get install curl
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Downloading Source Code​
After you have initialized the repo you are set to download the source code.
1. Open Terminal
2. Execute these commands one by one in Terminal
Code:
mkdir source
cd source
repo init -u git://github.com/Cyanogenmod/android.git -b gingerbread
sudo sysctl -w net.ipv4.tcp_window_scaling=0
repo sync -jx (Replace x with a number this number corresponds to number simultaneous download you want for e.g if you give 5 it will download 5 files at once so go on increase to whatever you like but be reasonable :D)
The Source Code is around 15GB - 17GB so have patience and more importantly HDD space.
Click to expand...
Click to collapse
.
The download will take hours if you are on slow connection like it will be a 2 days is 512kbps connection so if you are planning to develop please have a good internet connection with a reasonable fast speed. Every developer recommends more than 1Mbps and sometimes 4Mbps.
After downloading is finished go to source folder you must have many folders inside them. Also make a backup of the source folder just in case as we will modifying it so if something goes wrong you don't have to re-download it all again.
Go to the next step to start the actual development.
Modding Files And Stuff
Step 3:- Modding Files And Folders To Make Your Device Supportable.​
First up is to compile a build of ClockworkMod.
Building ClockworkMod:-
1. Open Terminal
2. Type these commands one by one in Terminal
Code:
. build/envsetup.sh
lunch (it should show you list of devices select your device with their serial number select your device by typing the serial number)
make clean
make -j4 recoveryimage
If you didn't receive an error you are ready to compile TWRP for your device.
If you do receive and error reply to the post I will help you.
Modifying Files And Folder:-
The original Dees_Troy's build folder isn't gonna work as your device resolution doesn't support it. So I have patched the build folder with some extra libs added to prelink map and patched recovery folder with gui changes for smooth compilation.
If you have experience with using git you can clone the repo or you can download it directly from github.
Click to expand...
Click to collapse
If you are going to clone execute these commands in terminal. (Thanks to cybojenix for this so that there will no manual copying).
Code:
cd source
rm -rf build/
rm -rf bootable/recovery/
git clone git://github.com/chainhacker/TWRP_Build -b 2.3 build
git clone git://github.com/chainhacker/TWRP_Recovery -b 2.3 bootable/recovery
If you are going to download directly use the following link make sure you are downloading 2.3 branch and extract it.
Here is the link for the patched build folder------>TWRP_Build
Here is the link for the patched recovery folder------>TWRP_Recovery
After you have done downloading from the above two files.
Replace the contents of source/build folder with the patched one.
Similarly replace the contents of source/bootable/recovery folder with the patched one.
I have 240x320 resolution already in the patched ones but if your device is not 240x320 and also not supported by TWRP download a theme made by other members which has your device's resolution or create a theme. I didn't create the theme though I resized the images and made changes in ui.xml. If you are interested in theming follow the official TWRP theming guide in their website.
If you did find a theme or created it rename the theme folder to your device resolution folder for e.g. If your device resolution is 320x240 you would rename the folder as 320x240.
Copy the theme folder into source/bootable/recovery/gui/devices.
That's it finished the basic requirements next up is configuring BoardConfig.mk.
Editing BoardConfig.mk:-
1. Navigate to source/device/your_vendor/your_device.
your_vendor:- Vendor of your device e.g for me it is lge.
your_device:- Your device name.
Click to expand...
Click to collapse
2. Find BoardConfig.mk and open it in a text editor.
3. Come to the last and add these line
Code:
#twrp
DEVICE_RESOLUTION:= [I]your_device_resolution[/I] (e.g If your resolution is 240x320 type it)
RECOVERY_GRAPHICS_USE_LINELENGTH := true
2. Save it and close it.
Yay you have finished everything only thing left out is compiling which is carried out in the next post.
Psssst.......
After you have compiled your first successful build here are few other things that you could add to BoardConfig.mk
Note:- You can add this after finishing first successful build of recovery till then avoid these.
Click to expand...
Click to collapse
Code:
RECOVERY_SDCARD_ON_DATA := true -- this enables proper handling of /data/media on devices that have this folder for storage (most Honeycomb and devices that originally shipped with ICS like Galaxy Nexus)
BOARD_HAS_NO_REAL_SDCARD := true -- disables things like sdcard partitioning
TW_INCLUDE_DUMLOCK := true -- includes HTC Dumlock for devices that need it
TARGET_RECOVERY_GUI := true -- uses gui format instead of ui.xml
TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565" -- to change the colour
TARGET_USE_CUSTOM_LUN_FILE_PATH :=/sys/devices/platform/usb_mass_storage/lun0/file
TW_CUSTOM_POWER_BUTTON := 107 -- to get a power button on the home screen of recovery
TW_EXTERNAL_STORAGE_PATH := "/sdcard" -- default external storage path
TW_EXTERNAL_STORAGE_MOUNT_POINT := "sdcard" -- default external mount point
TW_FLASH_FROM_STORAGE := true -- enables you to flash zips form the sdcard (You don't neeed o add this it is activated by default)
TW_HAS_DOWNLOAD_MODE := false -- to enable download or more precisely enabling usb mass storage
TW_HAS_NO_RECOVERY_PARTITION := true -- do this only if you device has no partion to recovery
TW_INCLUDE_CRYPTO := false
TW_INCLUDE_JB_CRYPTO := false
TW_NEVER_UNMOUNT_SYSTEM := true -- always keeps the system mounted
TW_NO_BATT_PERCENT := false -- shows battery percentage
TW_NO_REBOOT_BOOTLOADER := true --- disables rebooting into bootloader
TW_NO_USB_STORAGE := false -- disabled usb storage
TW_SDEXT_NO_EXT4 := false
Compiling Recovery
Step 4:- Compiling Recovery​
Finally you have come to the final part of the guide which is compiling recovery.
1. Open Terminal.
2. Execute these commands in Terminal
Code:
. build/envsetup.sh
lunch (Again select your device)
make -j4 recoveryimage
.
That's it when it is finished grab recovery.img from:
out/target/product/your_product_name/recovery.img
Flash it in your device test it fix the bugs and release it.
Wait if you don't want flash and just see how it looks so that you can flash another recovery if it is not working do these
I am not resposible if your device gets bricked in fastboot mode but mostly it won't happen though
Click to expand...
Click to collapse
1. Copy the recovery.img to sdk/platform-tools
2. Boot your device into fastboot mode.
3. Open Terminal
4. Execute these commands one by one in Terminal
Code:
fastboot devices (wait for your device to show up int terminal)
fastboot boot recovery.img
You can test out all the features except flash zip, backup and restore.
Victory :victory: you have successfully compiled TWRP recovery for your device go ahead have fun and enjoy.
If you really like my work express your gratitude by pressing the Thanks button. See you soon in another thread :victory: :laugh: :fingers-crossed:
Click to expand...
Click to collapse
Reserved
reserved just in case :fingers-crossed:
Contributions
You can Contribute to this guide by suggesting improvements and stuff are welcome PM about the contribution and i will add by giving credits to the person contributed
Does it make any difference if I want to compile it for an ARMV6 device?
Gesendet von meinem Skate mit Tapatalk 4 Beta
Joe4899 said:
Does it make any difference if I want to compile it for an ARMV6 device?
Gesendet von meinem Skate mit Tapatalk 4 Beta
Click to expand...
Click to collapse
Nope it won't make any difference it is just the same even if your device is ARMv6 or ARMv7. Make sure your device is supported by CM
Chain Hacker said:
Nope it won't make any difference it is just the same even if your device is ARMv6 or ARMv7. Make sure your device is supported by CM
Click to expand...
Click to collapse
i'm wondering if it will work for Tegra's device
666satyr666 said:
i'm wondering if it will work for Tegra's device
Click to expand...
Click to collapse
Yes it will work go ahead give it a shot :good:
So that's me again :laugh: Wanted to compile TWRP 2.6.0.0 for cm10.1 so I have set up everything so far but get an error when I try to compile
build/core/base_rules.mk:130: *** external/fuse/lib: MODULE.TARGET.STATIC_LIBRARIES.libfuse already defined by bootable/recovery/fuse.
Click to expand...
Click to collapse
Seems to be really stupid, so far I understand is the libfuse defined twice in recovery and base_rules.mk so think (thought ) it's an easy part - just to remove this libfuse from one of them... But I can't find something with "libfuse", "static libraries" or anything like that in base_rules.mk
Joe4899 said:
So that's me again :laugh: Wanted to compile TWRP 2.6.0.0 for cm10.1 so I have set up everything so far but get an error when I try to compile
Seems to be really stupid, so far I understand is the libfuse defined twice in recovery and base_rules.mk so think (thought ) it's an easy part - just to remove this libfuse from one of them... But I can't find something with "libfuse", "static libraries" or anything like that in base_rules.mk
Click to expand...
Click to collapse
I have never tried compiling 2.6.0.0 because Dees_Troy is evaluating my theme for my device such that it gets official support so if you are ready to use CM7 and TWRP 2.3.3.0 you can follow my guide and i can help you with the errors but any other version please ask Dees_Troy for the solution.
How I compile twrp if my phone is not officially/unofficially supported?is it possible?
Sended from my ascend g330 using tapatalk 4 [VIP]
andrea210701 said:
How I compile twrp if my phone is not officially/unofficially supported?is it possible?
Sended from my ascend g330 using tapatalk 4 [VIP]
Click to expand...
Click to collapse
It is possible after successful build with no bugs you can contact Dees_Troy for evaluation and get official support.
Sent from my LG-P350 using Tapatalk 2
Error detected
Hi, Chain Hacker.
Does it matter how to write address after "git://"?
I mean this:
Code:
[B]repo init -u git://github.com/Cyanogenmod/android.git -b gingerbread[/B]
Should it be like this:
Code:
[B]repo init -u git://github.com/Cyanogen[COLOR="Red"]M[/COLOR]od/android.git -b gingerbread[/B]
By the way, it's a very good manual for those who are just starting to understand how to compile
maximik1980 said:
Hi, Chain Hacker.
Does it matter how to write address after "git://"?
I mean this:
Code:
[B]repo init -u git://github.com/Cyanogenmod/android.git -b gingerbread[/B]
Should it be like this:
Code:
[B]repo init -u git://github.com/Cyanogen[COLOR="Red"]M[/COLOR]od/android.git -b gingerbread[/B]
By the way, it's a very good manual for those who are just starting to understand how to compile
Click to expand...
Click to collapse
No i doesnt matter at all the only thing that is case sensitive are the words after cyanogenmod as they must be written as it is so it is your wish whether you are gonna write Cyanogenmod or CyanogenMod and by the way thanks for the complement
Sent from my LG-P350 using Tapatalk 2
TWRP Recovery size...
Hi again...
I've managed to compile a TWRP-Recovery 2.6.0.1 based on CM9 for my Huawei Ascend Y101 (8186).
But I had to change recovery partition size in BoardConfig.mk (originally it was BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00500000, I changed it to 0x00600000), because without these changes it wasn't possible to build a recovery.img ("recovery.img is too large... etc.")
When I flashed it on my device, the TWRP recovery started and worked perfectly, but I wasn't able to boot my device. But it's not a problem for me, I understand why it wasn't able to boot very good.
The question is the following: is it possible to decrease somehow the source files' sizes of TWRP recovery (maybe images, don't know...) in order to compile the recovery.img that would be less than 4.85 MB (actually it's size is 5*095*424, it's more than my recovery partition....... )
By the way, the size of a CWM-recovery (cm9) that I've compiled is 4*489*216, so it fits like a glove :good: and works fine...
Thanks in advance. I understand that you compiled a TWPR recovery based on CM7, but I don't see much differences...
maximik1980 said:
Hi again...
I've managed to compile a TWRP-Recovery 2.6.0.1 based on CM9 for my Huawei Ascend Y101 (8186).
But I had to change recovery partition size in BoardConfig.mk (originally it was BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00500000, I changed it to 0x00600000), because without these changes it wasn't possible to build a recovery.img ("recovery.img is too large... etc.")
When I flashed it on my device, the TWRP recovery started and worked perfectly, but I wasn't able to boot my device. But it's not a problem for me, I understand why it wasn't able to boot very good.
The question is the following: is it possible to decrease somehow the source files' sizes of TWRP recovery (maybe images, don't know...) in order to compile the recovery.img that would be less than 4.85 MB (actually it's size is 5*095*424, it's more than my recovery partition....... )
By the way, the size of a CWM-recovery (cm9) that I've compiled is 4*489*216, so it fits like a glove :good: and works fine...
Thanks in advance. I understand that you compiled a TWPR recovery based on CM7, but I don't see much differences...
Click to expand...
Click to collapse
The difference is no on the source dude so relax. You have to modify your kernel and change the compression method to lzma. Contact Dees_Troy for this because i dont know how to change it. You can chat with him through IRC.

[Q] [Ubuntu] adb does not recognize device

Hello everyone,
I have a short question which you might be able to answer (at least I hope so).
I just got a cheap Android phone on which I want to learn to do some Android app development. So, I want to use the "adb" tool on Ubuntu to push my app to the device.
First of all, I wanted to find out which vendor is the right one (as the phone itself does not have branding), so I ran "lsusb". The output was
Code:
Bus 001 Device 010: ID 1782:5d01 Spreadtrum Communications Inc.
Thus I figured that "1782" is the vendor ID and I created an udev-rule named "51-android.rules" which contains
Code:
"SUBSYSTEM=="usb", ATTR{idVendor}=="1782", MODE="0666"
I set file permissions with
Code:
chmod a+r /etc/udev/rules.d/51-android.rules
and restarted the udev service aswell as the adb server. But still the output of "adb devices" does not show any connected devices. What am I doing wrong?
I am running Ubuntu 13.04 with Kernel 3.8.0-34. USb debugging on the phone is enabled.
Any help would be highly appreciated,
Phil

Categories

Resources