This is going to be patently obvious to anybody familiar with Android, but I just started poking around and it wasn't clear to me how to do it. I figured I'd post it here if anybody else is in the same boat
1) Download CyanogenMod - build probably doesn't matter much, I used the I9000 ROM from this thread (n.b. - if you know of a trusted source to get current dropbear binaries, you don't need to download the huge CM zip, but I didn't see any floating around)
2) Extract the zip. You only need two files:
Code:
system/xbin/dropbear
and
Code:
system/xbin/dropbearkey
3) Navigate to the directory that contains those files using your favorite shell.
4) Push these to your device. This requires ADB (which is included in the Android SDK) in your path, it requires that your phone is rooted, and it requires that /system is mounted rw:
Code:
adb push dropbear /system/xbin/
adb push dropbearkey /system/xbin/
5) Run the following from 'adb shell' or a root terminal on your phone:
Code:
mkdir /data/dropbear; mkdir /data/dropbear/.ssh
(aside - why is there no -p option to my mkdir? weird)
6) From here, you can follow the instructions on the CM wiki and you're good to go!
I'm pleased to tell everyone Bluetooth finally works!!! I can't take any credit other than putting together the instructions to get it working and digging all over the interwebs so have a look below!!!!!!!:
Also note, this may work on other Linux setups using the Transformer and possibly other devices using similar instructions and files.
OP for Tubutnu by x3maniac
1. Go to this site and download the gz file. This contains a few missing files we need and it's compile for ARMHF. http://forum.xda-developers.com/showthread.php?t=1476835
2. Extract the contents of the gz to /usr/sbin
3. Go to this site. Copy the code in the box and make a new file called bsp-tf101. Save the file to /etc/init.d. http://forum.xda-developers.com/showpost.php?p=21388706&postcount=1456
4. In Android (or mount the Android file system if it isn't already) copy the file /data/misc/bluetooth/bcm4329.hcd to /lib/firmware. If the file with CAPITAL letters exists like this already in /lib/firmware: BCM4329.hcd you are to delete it or CUT it from that directory (many XDA posts say to get rid of that file. We want to use the lower case file.
5. In Android (or mount the Android file system if it isn't already) copy the file /data/misc/bluetooth/mac.txt to /lib/firmware/brcm.
6. Now, edit /etc/init.d/bsp-tf101. Go to the line that starts with /usr/sbin/brcm_patchram_plus and REMOVE --bd_addr and whatever MAC address is in the file. We are doing this because when you run the service, the MAC will be read from /lib/firmware/brcm/mac.txt.
7. In terminal type "service bsp-tf101 start" NO QUOTES.
8. After the terminal says Done Setting Line Discipline, open your Bluetooth Manager application from Preferences in Lubuntu.
9. Happy scanning and pairing! I successfully connected my GS3 and saw other devices nearby.
Addendum for Bluetooth in Raring
1. Create a file called "tfbatch" or whatever name you want, it does not matter. Save it in your home directory for the moment. Edit your file with nano /home/username/tfbatch with the following lines in it below.
#! /bin/shrfkill unblock 0/usr/sbin/brcm_patchram_plus --enable_hci --baudrate 3000000 --patchram /lib/firmware/bcm4329.hcd /dev/ttyHS2chmod /dev/nv* /dev/tegra_*exit
2. Now copy "tfbatch" or whatever you named it to /usr/bin. You can do (without quotes) "cp /home/username/tfbatch /usr/bin"
3. sudo nano /etc/rc.local
4. Type tfbatch in this file before the line that says exit 0. I'm not sure if you need a space in between tfbatch and exit 0 but put one there just in case.
5. If you haven't done so already, from terminal do the following for these files:
sudo chmod 777 /usr/bin/tfbatchsudo chmod 777 /lib/firmware/bcm4329.hcdsudo chmod 777 /usr/sbin/brcm_patchram_plussudo chmod 777 /usr/sbin/brcm_patchram_plus.c
6. Please note, I understand the security risks of 777 for these files but if you are worried then you must choose something different. Maybe 644 but I don't know for sure. We are doing 777 for some files becacuse of permission denied errors. If you find a better method I'll update my post.
7. Reboot and Profit. (I was perfectly able to use PAN for Bluetooth tethering without installing anything extra using Raring and GNOME-CORE. However, I did not get Bluetooth headsets to work yet so if someone else wants to help out then that's great too.
Hi!
First of all thank you, that worked perfectly for me.
I just had to chmod bcm4329.hcd and brcm_patchram_plus's files.
For those who have the same "problem" just type this once you placed all the files in good folders.
Code:
sudo chmod 777 /lib/firmware/bcm4329.hcd
Code:
sudo chmod 777 /etc/init.d/bsp-tf101
And do the same for all files you extracted from brcm.tar.gz
Not sure if chmod all of these files is useful but that's what I've done and it worked.
Hope it'll help.
147keul said:
Hi!
First of all thank you, that worked perfectly for me.
I just had to chmod bcm4329.hcd and brcm_patchram_plus's files.
For those who have the same "problem" just type this once you placed all the files in good folders.
Code:
sudo chmod 777 /lib/firmware/bcm4329.hcd
Code:
sudo chmod 777 /etc/init.d/bsp-tf101
And do the same for all files you extracted from brcm.tar.gz
Not sure if chmod all of these files is useful but that's what I've done and it worked.
Hope it'll help.
Click to expand...
Click to collapse
I have been problems getting this to work on Raring 13.04 build from X3. Are you using Raring by chance or one of the other versions by X3?
I've not been using yet Raring method, I used the one click method with 2.6.36 kernel.
Gonna take a look in a few with raring, I'll tell you if I manage to make it work.
147keul said:
I've not been using yet Raring method, I used the one click method with 2.6.36 kernel.
Gonna take a look in a few with raring, I'll tell you if I manage to make it work.
Click to expand...
Click to collapse
I got it to work a little bit ago and tethering for Bluetooth internet. Good call with chmod it worked like a champ. Thanks!
When using your Bluetooth tethering, you can also use Conky to display the IP address. You can edit the file by sudo nano /etc/conky/conky.conf. Go to the line that is displaying ${addr wlan0}. Copy that whole line below and replace wlan0 with bnep0. Bnep0 is the adapter interface that has the BT tether IP address.
Has anyone seen this? Ubuntu Developer Preview for Galaxy Nexus, Nexus 4 Arrives Feb. 21
"Our platform supports a wide range of screen sizes and resolutions. Developers who have experience bringing up phone environments will find it relatively easy to port Ubuntu to current handsets"
"For developers, contributors and partners, there is now a coherent experience that warrants attention. The cleanest, most stylish mobile interface around."
Click to expand...
Click to collapse
I don't have the files starting from step 4 (folder is empty). I'm guessing it's because I installed another ROM (EOS JB MR1 4.2 from http://forum.xda-developers.com/showthread.php?t=2063406). Would anyone happen to know where else I can obtain the files needed starting from step 4? Thanks!
Treizy said:
I don't have the files starting from step 4 (folder is empty). I'm guessing it's because I installed another ROM (EOS JB MR1 4.2 from http://forum.xda-developers.com/showthread.php?t=2063406). Would anyone happen to know where else I can obtain the files needed starting from step 4? Thanks!
Click to expand...
Click to collapse
Search android from terminal:
Find / | grep bcm4329.hcd
If you get nothing I'll try to upload later.
TomTcom said:
Search android from terminal:
Find / | grep bcm4329.hcd
If you get nothing I'll try to upload later.
Click to expand...
Click to collapse
Thanks! Found that file in /system/etc/firmware.
I wasn't able to find the mac.txt file but I know my bluetooth mac address. Is that the only thing that I need to include in that file?
Treizy said:
Thanks! Found that file in /system/etc/firmware.
I wasn't able to find the mac.txt file but I know my bluetooth mac address. Is that the only thing that I need to include in that file?
Click to expand...
Click to collapse
Yes, that's the only thing you need to put in. Strange you can't find needed files in right places, have you tried with a "root explorer"? Try to download it, and normally you should find mac.txt.
Trying this again with the raring build and still running into problems.
When I try to start the service, i get the following error:
Code:
$ sudo service bsp-tf101 start
* Starting Bluetooth Support Deamon...
* Setting correct permissions on nvtegra device nodes...
/etc/init.d/bsp-tf101: 23: /etc/init.d/bsp-tf101: /usr/sbin/brcm_patchram_plus: Permission denied
I did run the following commands before hand:
sudo apt-get install rfkill (I didn't have this installed before and it was giving an error)
sudo chmod 777 /lib/firmware/bcm4329.hcd
sudo chmod 777 /etc/init.d/bsp-tf101
sudo chmod -R 777 /usr/sbin/brcm_patchram_plus
Any idea why it still says permission denied?
Thanks!
Treizy said:
Trying this again with the raring build and still running into problems.
When I try to start the service, i get the following error:
Code:
$ sudo service bsp-tf101 start
* Starting Bluetooth Support Deamon...
* Setting correct permissions on nvtegra device nodes...
/etc/init.d/bsp-tf101: 23: /etc/init.d/bsp-tf101: /usr/sbin/brcm_patchram_plus: Permission denied
I did run the following commands before hand:
sudo apt-get install rfkill (I didn't have this installed before and it was giving an error)
sudo chmod 777 /lib/firmware/bcm4329.hcd
sudo chmod 777 /etc/init.d/bsp-tf101
sudo chmod -R 777 /usr/sbin/brcm_patchram_plus
Any idea why it still says permission denied?
Thanks!
Click to expand...
Click to collapse
Try also chmod 777 the brcm_patchram_plus.c file as well.
Also, I need to update my guide. I don't run it as a service but rather a batch file launched from rc.local so everything is executed as root. I'll have to update the guide to include Raring. So that could be part of the problem as well.
TomTcom said:
Try also chmod 777 the brcm_patchram_plus.c file as well.
Also, I need to update my guide. I don't run it as a service but rather a batch file launched from rc.local so everything is executed as root. I'll have to update the guide to include Raring. So that could be part of the problem as well.
Click to expand...
Click to collapse
So if I add these commands to the rc.local file in /etc it should work?
Code:
sudo chmod 777 /lib/firmware/bcm4329.hcd
sudo chmod 777 /etc/init.d/bsp-tf101
sudo chmod -R 777 /usr/sbin/brcm_patchram_plus
sudo service bsp-tf101 start
Or do I need to do something else?
Treizy said:
So if I add these commands to the rc.local file in /etc it should work?
Code:
sudo chmod 777 /lib/firmware/bcm4329.hcd
sudo chmod 777 /etc/init.d/bsp-tf101
sudo chmod -R 777 /usr/sbin/brcm_patchram_plus
sudo service bsp-tf101 start
Or do I need to do something else?
Click to expand...
Click to collapse
No don't do that. I'll try and post what you need to do later tonight.
Treizy said:
So if I add these commands to the rc.local file in /etc it should work?
Code:
sudo chmod 777 /lib/firmware/bcm4329.hcd
sudo chmod 777 /etc/init.d/bsp-tf101
sudo chmod -R 777 /usr/sbin/brcm_patchram_plus
sudo service bsp-tf101 start
Or do I need to do something else?
Click to expand...
Click to collapse
I have updated my guide. See the OP for the Addendum for Raring installation. The file you create will be ran before the GUI loads with root permissions from rc.local.
Let me know if this worked.
TomTcom said:
I have updated my guide. See the OP for the Addendum for Raring installation. The file you create will be ran before the GUI loads with root permissions from rc.local.
Let me know if this worked.
Click to expand...
Click to collapse
Nope
When I try to turn bluetooth on, nothing happens. It will switch back to off when i close the settings popup.
Treizy said:
Nope
When I try to turn bluetooth on, nothing happens. It will switch back to off when i close the settings popup.
Click to expand...
Click to collapse
Hmmm...if you followed the guide you shouldn't have to turn it on. The batch is executed on boot from RC.local. Try and give me some more details.
TomTcom said:
Hmmm...if you followed the guide you shouldn't have to turn it on. The batch is executed on boot from RC.local. Try and give me some more details.
Click to expand...
Click to collapse
Maybe I messed up. For step 1, the files you are asking us to download are the ones in post #10 correct (brcm.tar.gz)? Also, I don't have this mac.txt file anywhere so I created my own and just put my mac address in it (hopefully the correct one). Lastly, i dont have this file for this step:
sudo chmod 777 /usr/sbin/brcm_patchram_plus.c
but instead i have it in this location:
/usr/sbin/brcm_patchram_plus/brcm_patchram_plus.c
Treizy said:
Maybe I messed up. For step 1, the files you are asking us to download are the ones in post #10 correct (brcm.tar.gz)? Also, I don't have this mac.txt file anywhere so I created my own and just put my mac address in it (hopefully the correct one). Lastly, i dont have this file for this step:
sudo chmod 777 /usr/sbin/brcm_patchram_plus.c
but instead i have it in this location:
/usr/sbin/brcm_patchram_plus/brcm_patchram_plus.c
Click to expand...
Click to collapse
I think you might have files in the wrong location, there should be no brcm_patchram_plus directory. Try to extract the zip again and make sure they are all in /usr/sbin only.
If you didn't have mac.txt from Android, you can just make it like you did and make sure it is in /lib/firmware/brcm.
This is a guide to build CyanogenMOD 10.2 (Android 4.3) for the HTC One. This guide is for OS X Mountain Lion (10.8.X).
[size=+1]Pre Requirements:[/size]
1) go to App Store on your OS X and Download Xcode 4. Once that is installed, open Xcode and go to preferences. There you find a tab “DOWNLOADS”, open it and there you can find “Command line tools” and next to it click INSTALL. It will take a few minutes to download and install
2) Make sure you have the android-sdk downloaded and setup adb and fastboot, so they work. It is recommended to place the android-sdk to /usr/local/
[size=+1]Initializing the build environment[/size]
First we need to set up our OS X to be able to build Android. This needs some extra things compared to for example, building in Linux, but the main stuff is pretty much the same. So let’s get started then, shall we?
Open up Terminal and type
Code:
java
If you don’t have java installed you will get a prompt to install it.
Next we will install homebrew (you can also use macports if you like)
Code:
ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)
Now make sure android-sdk and homebrew are in $PATH
Code:
touch ~/.bash_profile && echo "PATH=/usr/local/bin:/usr/local/sbin:$PATH:/usr/local/android-sdk/tools:/usr/local/android-sdk/platform-tools" >> ~/.bash_profile
I also recommend to add this edit to the .bash_profile file:
Code:
nano –w ~/.bash_profile
Code:
export BUILD_MAC_SDK_EXPERIMENTAL=1
Now run this and see if you need to update anything.
Code:
brew doctor
If you do (and you probably will once a day) type:
Code:
brew update
Now we need to get our dev packages
Code:
brew install git coreutils findutils gnu-sed gnupg pngcrush repo
Once that is done, run
Code:
brew outdated
if it shows anything, run
Code:
brew upgrade
Now run this the correct a few symlinks [Not sure if these are needed anymore]:
Code:
ln -s /usr/local/bin/gfind /usr/local/bin/find && ln -s /usr/local/bin/gsed /usr/local/bin/sed
Now to create our case sensitive image for our CM work [NOTE: the 60g can be changed to anything. It only takes up what it needs but I used 60GB]:
Code:
hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 60g -volname "android" -attach ~/Desktop/Android
Now to create our working directory
Code:
cd /Volumes/Android && mkdir cm10.2 && cd cm10.2
[size=+1]Getting the source[/size]
Now to initialize the git and to download it
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
Download the sources:
Code:
repo sync
Wait until it is finished. It will take a long time, depending on your internet connection.
[size=+1]Obtain the device build files and proprietary files:[/size]
To do this we will use CyanogenMods "tool" called roomservice. Roomservice is replacing the old local_manifest.xml file. Just run the code below to create the file directly into the folder.
Code:
nano -w /Volumes/android/cm10.2/.repo/local_manifests/roomservice.xml
Paste the following lines into the file:
Code:
<manifest>
<project name="TheMuppets/proprietary_vendor_htc.git" path="vendor/htc" remote="github" revision="cm-10.2"/>
</manifest>
It seems that nowadays you only need to have the TheMuppets repo there, the roomservice process takes care of the rest and downloads the needed mako bits automatically. And actually it doesn't matter what you name the xml file under the local_manifests directory. The process loads every xml file from there in a alphabetical order. If you still have that local_manifest.xml file in your .repo directory, i suggest you remove that, because at that case that file will be read first and after that all the other from the local_manifests folder
Save the file. And rerun the code:
Code:
repo sync
Download the necessary pre-builts:
Code:
/Volumes/android/cm10.2/vendor/cm/get-prebuilts
That is all. The sources are now ready.
[size=+1]Building CyanogenMOD[/size]
If you build now, you're probably gonna get kernel build errors regarding the missing elf.h header (this error might be device specific). Fortunately, we already have this file downloaded, so we only need to copy it to /usr/local/include:
Code:
cp /Volumes/android/cm10.2/external/elfutils/libelf/elf.h /usr/local/include
FINALLY, we are ready to build:
Code:
cd /Volumes/android/cm10.2 && source build/envsetup.sh && brunch m7ul
The upper command will start the build for the international version for the HTC One (m7ul). Just change the m7ul part to the right codename (check it from f.ex www.get.cm webpage).
Then we just let the Mac do the rest. Remember that it will take a while to do the build, and meantime you Macs fans will scream for mercy while CM punishes your system ☺
After the build is finished successfully you can find your newly created flashable zip by typing:
Code:
cd $out
Look for .zip file with a tag UNOFFICIAL
Happy building!
donk
I just might give this a try. Thanks for the tutorial!
Sent from my One using Tapatalk 4
inffy said:
Hey there!
Only Thing that comes to mind is that you forgot to get the prebuilts. Or you flashed incompatible kernel
Click to expand...
Click to collapse
Not that I'm aware of, but I must've messed something up. I nuked it all and started over.
It works fine now (and more importantly I got myself a new "theme aware" aapt that doesn't think that drawable-xxhdpi is an invalid folder name )
Thanks again for a nice guide.
i can add packages of apk github
help
thanks
packhex said:
i can add packages of apk github
help
thanks
Click to expand...
Click to collapse
What do you mean, sry
Strange error
I get this error when I try to save the manifests xml file.
[ Error writing /Volumes/android/cm10.2/.repo/local_manifests/roomservice.xml: ]
Please help me figure this out...
Okay, I figured I hade the wrong directory..
now when I try to brunch, I get this error:
Don't have a product spec for: 'cm_m7ul'
Do you have the right repo manifest?
Please help!
I am attempting to build CM and have been setting everything up following the basic build guides on the wiki.
I have already synced with the Repo using the following command.
Code:
Repo sync -c
I did this becuase I not only what to save space but plan on only building CM12. Now on the next part of the guide the step reads as so; “Get prebuilt apps (CM11 and below)”
During this step it asks you to change directories which I did. Then it saysy to enter the following command.
Code:
$ ./get-prebuilts
However this yeilds
Code:
bash: ./get-prebuilts: No such file or directory
Why is this happening?
Is it ok because I only synced the repo with the -c flag or should this never happen?
How can I fix it? Searching through the forums shows me nothing other then files may be missing and most of those problems are because they failed to sync with the repo. I did sync and it completed.
How should I proceed?
hi.
so we now have android in windows phone.there's a tutorial on how to copy files from that android and to that android os but i think you're phone needs to be unlocked (interop).and if you're phone is locked you can do it (i've been away from these kind of things for a long time.correct me if i'm wrong)
i used adb before and knew there was some kind of command to check the folders and files in the phone.so i took my chances and i tried them.
here is the code:
1-
Code:
adb shell
2-result will be something like
Code:
/system/bin/sh: No controlling tty: open /dev/tty: No such file or directory
/system/bin/sh: warning: won't have full job control
[email protected]:/ $
3-type this
Code:
ls
it will gives you a list of all folders in the phone (in android os in windows phone in this case)
4-the main folder is "mnt" so type this code
Code:
cd mnt
5- you can still type
Code:
ls
but it'll take a lot of times to find folders so i'll just give it to you guys.these are the command you need to enter and press enter.(each line must be typed separately)
Code:
cd shell
Code:
cd emulated
Code:
cd 0
6-in here is you type
Code:
ls
you can see that you have Pictured,Music and things like this.so if you want to create a folder in your android just type
Code:
mkdir YourFolder
7-after you created your folder enter
Code:
exit
to exit the shell and now you can "push" and "pull" commands.here's how push command work
Code:
adb push Path\To\Your\File.txt mnt\shell\emulated\0\YourFolder
i like to put my files that i want to push in the same folder that i have adb.exe so i just need to type the file name and extension.
8-after that you can install an android file manager to manage your files.
i haven't tested "pull" command but it'll work.i just need to test it.
so sorry if you guys knew this method , i just wanted to share it with you.
this method is really good for phone like 920 and for apps and games that has .obb data files (like Fallout Shelter )
Really appreciate you for this tutorial and helping nature,but we had a ""shortcut ""way using file Explorer
http://forum.xda-developers.com/win...utorial-how-to-copy-files-android-to-t3178808