CyanogenMod9 and AOKP for TF101G (NEW BUILD) - Eee Pad Transformer General

Working now. Check my rom

You mean you want to try if you can activate the 3G module?

I flashed it but it doesn't work. There isn't even the mobile data option. You know where you can change APNs etc.
I couldn't grab the adb output though. Adb doesn't see my TF I'll try again in the evening.
Sent from my Galaxy Nexus using XDA

Nebucatnetzer said:
I flashed it but it doesn't work. There isn't even the mobile data option. You know where you can change APNs etc.
I couldn't grab the adb output though. Adb doesn't see my TF I'll try again in the evening.
Sent from my Galaxy Nexus using XDA
Click to expand...
Click to collapse
You can also put "ls /dev" in Terminal Emulator and give me the output

Nebucatnetzer said:
I flashed it but it doesn't work. There isn't even the mobile data option. You know where you can change APNs etc.
I couldn't grab the adb output though. Adb doesn't see my TF I'll try again in the evening.
Sent from my Galaxy Nexus using XDA
Click to expand...
Click to collapse
1. Make sure you have usb debugging enabled on the transformer (this is often not the case on new installs)
2. try the naked drivers
Naked drivers: http://forum.xda-developers.com/showthread.php?t=1379875

You can also put "ls /dev" in Terminal Emulator and give me the output
Click to expand...
Click to collapse
Here you go.
Code:
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ ls /dev
accelirq
alarm
android_adb
ashmem
asusec
battery
binder
block
bus
compassirq
console
cpu_dma_latency
cpuctl
device-mapper
dsp_fm34
full
fuse
graphics
i2c-0
i2c-1
i2c-2
i2c-3
i2c-4
input
kmsg
knvmap
lightsensor
log
maXTouch
maXTouch_messages
max_online_cpus
mem
mi1040
mpu
mpuirq
mtp_usb
nct1008
network_latency
network_throughput
null
nvhdcp1
nvhost-ctrl
nvhost-display
nvhost-dsi
nvhost-gr2d
nvhost-gr3d
nvhost-isp
nvhost-mpe
nvhost-vi
nvmap
ov5640
port
ppp
ptmx
pts
random
rfkill
rtc0
snd
socket
tegra-crypto
tegra_avp
tegra_camera
tegra_dc0
tegra_dc1
tegra_mediaserver
tegra_rpc
tegra_sema
timerirq
touch_debug
touchpanel
tps6586x
tty
ttyHS1
ttyHS2
ttyHS3
ttyS0
ttyS1
ttyS2
ttyS3
ttyUSB0
ttyUSB1
ttyUSB2
ttyUSB3
ttyUSB4
ttyUSB5
tun
uinput
urandom
usb
usb_accessory
vga_arbiter
wm8903
xt_qtaguid
zero
[email protected]:/ $

do you have a public source tree for your work ?

Nebucatnetzer said:
Here you go.
Code:
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ ls /dev
accelirq
alarm
android_adb
ashmem
asusec
battery
binder
block
bus
compassirq
console
cpu_dma_latency
cpuctl
device-mapper
dsp_fm34
full
fuse
graphics
i2c-0
i2c-1
i2c-2
i2c-3
i2c-4
input
kmsg
knvmap
lightsensor
log
maXTouch
maXTouch_messages
max_online_cpus
mem
mi1040
mpu
mpuirq
mtp_usb
nct1008
network_latency
network_throughput
null
nvhdcp1
nvhost-ctrl
nvhost-display
nvhost-dsi
nvhost-gr2d
nvhost-gr3d
nvhost-isp
nvhost-mpe
nvhost-vi
nvmap
ov5640
port
ppp
ptmx
pts
random
rfkill
rtc0
snd
socket
tegra-crypto
tegra_avp
tegra_camera
tegra_dc0
tegra_dc1
tegra_mediaserver
tegra_rpc
tegra_sema
timerirq
touch_debug
touchpanel
tps6586x
tty
ttyHS1
ttyHS2
ttyHS3
ttyS0
ttyS1
ttyS2
ttyS3
ttyUSB0
ttyUSB1
ttyUSB2
ttyUSB3
ttyUSB4
ttyUSB5
tun
uinput
urandom
usb
usb_accessory
vga_arbiter
wm8903
xt_qtaguid
zero
[email protected]:/ $
Click to expand...
Click to collapse
Many thanks for that, now I can see kernel supports it, so it should be possible to integrate 3G
I'll fix the build later

Cool looking forward to this. Maybe it stops my TF from rebooting when it's unconnected to a power source.
Sent from my Galaxy Nexus using XDA

new build on the first post

still no public source ?

rhaaa said:
still no public source ?
Click to expand...
Click to collapse
I'll provide it when everything is working

It doesn't work. I can't save any APNs because there is no save button.
And if I want to choose the network operator it fails at the search.
Do you need any specific logs?

Nebucatnetzer said:
It doesn't work. I can't save any APNs because there is no save button.
And if I want to choose the network operator it fails at the search.
Do you need any specific logs?
Click to expand...
Click to collapse
A logcat would be nice, when you try to search for networks

ricardopvz said:
A logcat would be nice, when you try to search for networks
Click to expand...
Click to collapse
Et voilà
10 char

Related

G1 on linux gentoo

Hi,all.
my system:
uname -a
Linux localhost 2.6.28-gentoo-r1
Click to expand...
Click to collapse
when my g-phone is connected
I get the message from dmesg
dmesg
[ 4648.550324] usb 2-6: New USB device found, idVendor=0bb4, idProduct=0c02
[ 4648.550326] usb 2-6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4648.550328] usb 2-6: Product: Android Phone
[ 4648.550330] usb 2-6: Manufacturer: HTC
[ 4648.550331] usb 2-6: SerialNumber: HT848GZ72398
[ 4648.550336] hub 2-0:1.0: state 7 ports 10 chg 0000 evt 0040
Click to expand...
Click to collapse
then on g1 screen i choose "mount sd-card"
but KDE4.2.0 does not detect flash-card.
On windowsXP g1 as flashcard is working normally.
Ubuntu 8.04 \8.10 working norm too.
I think that the case in the kernel.
anyone can help with kernel .config?
You'd probably get better help on this from a Gentoo user forum, especially since you say it works fine under Kubuntu (as it does for me as well.)
I'd imagine it's a matter of hal configuration rather than the kernel. Search (on Google) for tips on enabling hal polling in Gentoo.
Do you have usb_storage loaded or enabled in your kernel? I don't see anything in your dmesg output about assigning your G1 to a device (/dev/sd#). Also - make sure you check the dmesg output AFTER you enable mounting the drive on the G1 - it won't present a USB storage device to gentoo until after this happens, so there might be additional output. If you do get additional output please post it here.
Do other USB drives work?
Try:
zcat /proc/config.gz | grep CONFIG_USB_STORAGE
If that doesn't work, try:
zcat /usr/src/linux/.config | grep CONFIG_USB_STORAGE
Make sure CONFIG_USB_STORAGE is set to "y" or "m". If not you'll need to rebuild your kernel. I'm sure a default kernel is going to include it - if you don't have it on then you most likely already know how to fix that.
I have to confess that I don't really use kde automounting much - I prefer the command line (especially since half the time I have more than one kde session open and I get all kinds of issues with dialog boxes opening up on a session I'm not looking at when I add a new device).
is hald service started?
Code:
/etc/init.d/hald status
if not, start it.
Code:
/etc/init.d/hald start
I have gentoo, and mounts fine (i use gnome).
For more help go to gentoo forums
rich0
zcat /proc/config.gz | grep CONFIG_USB_STORAGE
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
Click to expand...
Click to collapse
enlightener
/etc/init.d/hald status
* status: started
Click to expand...
Click to collapse
Do other USB drives work?
yes,it work for my psp and flash-disks

[SCRIPT] Command Line Bandwidth Test (speedtest)

Since so many fight about whether the application speed tests are correct, I made a simple script that will test your speeds for you with no bs (with just 33 lines of code) and display the average speed for you in MB/s Mb/s and kB/s. It will let you choose 1 of 5 locations within the US and UK to test your speed against. The files are hosted by my vps hosting provider to test their data center speeds so they are pretty fast as well as provide a decent set of locations as well as keep me from paying for the bandwith . These are 100MB files so it'll give your connection some time to average out the speed. To run it just do the following:
NOTE: THIS TAKES AN AVERAGE OF YOUR SPEED, NOT THE PEAK SPEED. If it seems like it's slower than you think, it's because it's taking how long it took to download and the file size.
1) Download the script
2) Move it to a directory you can execute it from, such as /data/local/tmp by a file explorer or by the terminal.
3) gain super user privileges on the terminal (type "su" without quotes)
4) go to the directory you put the file and modify the permissions so you can run it:
Code:
cd /data/local/tmp
chown root speedtest.sh
chmod 755 speedtest.sh
5) run the file, picking a data center as an argument like so
atlanta, georgia:
Code:
./speedtest.sh a
dallas, texas:
Code:
./speedtest.sh d
fremont, california:
Code:
./speedtest.sh f
newark, new jersey:
Code:
./speedtest.sh n
london, england:
Code:
./speedtest.sh l
If you don't enter any letter after the script name, it defaults to dallas, since it's geographically in the center of the US.
Questions/Comments/Feedback, feel free to let me know. It's just a simple script, nothing impressive, but it does the job.
Currently it is only taking the integer values for the data output, because busybox doesn't include bc to do the floating point (decimal) math easily. I can pipe it through awk, but have not gotten to that yet.
Thanks for this! I'm going to give it a run this afternoon.
FYI: in step 5 you wrote speedtweak.sh not speedtest.sh. Just so ya know. Thanks again.
Sent from my HTC Thunderbolt
Changing servers can be considered a tweak.
JBO1018 said:
Thanks for this! I'm going to give it a run this afternoon.
FYI: in step 5 you wrote speedtweak.sh not speedtest.sh. Just so ya know. Thanks again.
Sent from my HTC Thunderbolt
Click to expand...
Click to collapse
Thanks for pointing out the typos. I shouldn't write out directions when I'm half asleep.
If anyone had any other high performance server locations with static IPs, I will add them to the script.
The current ones are at least likely to be of similar performance, just farther from you, so they could be slower from too many network hops. Busybox includes traceroute, so if you wanted, you could type the IP for the server in with that and find out which is closest to you by network hops (which may not be the same as actual physical distance).
# su
#chown root speedtest.sh
# chmod 755 speedtest.sh
# ./speedtest.sh
Connecting to 69.164.200.100 (69.164.200.100:80)
testfile 100% |***********| 100M 0:00:00 ETA
./speedtest.sh: arithmetic expression: syntax error: "( / 1048576) / "
#
Thats what I got when I ran it, but it could be my fault. When I clicked the d/l link it just took me to a page of text so I copy/pasted it to a blank txt file and renamed it. So not sure if I did that right lol.
Sent from my HTC Thunderbolt
JBO1018 said:
# su
#chown root speedtest.sh
# chmod 755 speedtest.sh
# ./speedtest.sh
Connecting to 69.164.200.100 (69.164.200.100:80)
testfile 100% |***********| 100M 0:00:00 ETA
./speedtest.sh: arithmetic expression: syntax error: "( / 1048576) / "
#
Thats what I got when I ran it, but it could be my fault. When I clicked the d/l link it just took me to a page of text so I copy/pasted it to a blank txt file and renamed it. So not sure if I did that right lol.
Sent from my HTC Thunderbolt
Click to expand...
Click to collapse
Cant say for sure, but looks like it's missing a ) or something. Check to see if it copy and pasted okay.
Might try this as well so it will display all output:
sh -x speedtest.sh
And give me the output if you can.
yareally said:
Cant say for sure, but looks like it's missing a ) or something. Check to see if it copy and pasted okay.
Might try this as well so it will display all output:
sh -x speedtest.sh
And give me the output if you can.
Click to expand...
Click to collapse
This is what I get when I run that:
export PATH=/data/local/bin:$PATH
# export PATH=/data/local/bin:$PATH
# su
# cd /data/local/tmp
# ls
speedtest.sh
testfile
# rm testfile
# sh -x speedtest.sh
+ URL=http://69.164.200.100/100MB-dallas.bin
+ date +%s
+ BEFORE_TIME=1314065975
+ wget -O testfile http://69.164.200.100/100MB-dallas.bin
Connecting to 69.164.200.100 (69.164.200.100:80)
testfile 100% |***********| 100M 0:00:00 ETA
+ date +%s
+ ls -l -a testfile
+ awk { print $5}
speedtest.sh: arithmetic expression: syntax error: "( / 1048576) / "
#
Sent from my HTC Thunderbolt
I think it's crapping out on line 24:
MB_FILE_SIZE=$((($FILE_SIZE / 1048576) / $TOTAL_TIME))
see if your lines in it match the following exactly:
FILE_SIZE=`ls -l -a testfile | awk '{ print $5}'`
TOTAL_TIME=$(($AFTER_TIME - $BEFORE_TIME))
MB_FILE_SIZE=$((($FILE_SIZE / 1048576) / $TOTAL_TIME))
kB_FILE_SIZE=$((($FILE_SIZE / 1024) / $TOTAL_TIME))
Mb_FILE_SIZE=$(((($FILE_SIZE / 1048576) * 8) / $TOTAL_TIME))
echo "Average download Speeds:"
echo "$MB_FILE_SIZE MB/s"
echo "$kB_FILE_SIZE kB/s"
echo "$Mb_FILE_SIZE Mb/s"
rm -f testfile
Also, if you downloaded it to a windows pc and then put it on your phone, it might have made something go screwy due to the line endings. Windows does \n\r and linux does \n. I'll attach the download to the top posting if that helps and redownload it. If it's the line endings, you typically cant see those without a text editor that shows them.
I am getting a similar error
Sent from my Thunderbolt
Hmm. What folder are you guys trying it in offhand?
Certain places might need you to mount your /system in rw mode, but /data/local/tmp doesn't. That error just seems like it's not downloading the file and saving it, thus when it tries to use the filesize in the equations after to determine how long it takes, it divides by zero, because the file didnt exist.
Anyways, try mounting your system in rw and see if that works with:
mount -o remount,rw -t ext3 /dev/block/mtdblock5 /system
and to unmount:
mount -o remount,ro -t ext3 /dev/block/mtdblock5 /system
I'll add some debugging statements to the script so you guys can tell me a bit more details as well if things still don't work. It works on my end, but adding some stuff might help us to figure out why it isn't on your end.
got the same error as everyone else.
I'm running it from /data/local/tmp but I went ahead and tried it after running remount but still got the same results. It does go through the whole process of d/ling the file and everything but as soon as the d/l finishes is when it gives the syntax error. Also after its done there is another file in tmp called test file. I am using the pre-made file you put up later. Because I do think the txt editor on my phone I used to make the file was screwing up the line formatting.
Edit: BTW the test file that ends up in tmp is the full 100 MB.
Sent from my HTC Thunderbolt
The problem is your awk statement is grabbing the date field instead of the file size. For me it is the forth column instead of the fifth. Not sure why your phone is different then ours, but maybe it is the rom?
Sent from my Thunderbolt
./speedtest.sh f
Connecting to 64.71.152.17 (64.71.152.17:80)
testfile 100% |***********| 100M 0:00:00 ETA
Average download Speeds:
1 MB/s
1896 kB/s
14 Mb/s
Seemed to work fine after I changed the 5 to a 4 on the line I mentioned above.
Sent from my Thunderbolt
skaforey said:
./speedtest.sh f
Connecting to 64.71.152.17 (64.71.152.17:80)
testfile 100% |***********| 100M 0:00:00 ETA
Average download Speeds:
1 MB/s
1896 kB/s
14 Mb/s
Seemed to work fine after I changed the 5 to a 4 on the line I mentioned above.
Sent from my Thunderbolt
Click to expand...
Click to collapse
very weird. I'm running cyanogen mod 7. Probably the reason though. I wouldnt have evend had to use awk if busybox had a stat -c option. Stupid busybox, lol.
Glad it worked for you though.
What roms are you guys running offhand? That would be useful for me to try to make a workaround for.
Changing the 5 to a 4 worked for me too. Thanks
Sent from my HTC Thunderbolt
I think an easier fix would be to check if field 5 has a dash, and if it does, use 4 instead.
Sent from my Thunderbolt
skaforey said:
I think an easier fix would be to check if field 5 has a dash, and if it does, use 4 instead.
Sent from my Thunderbolt
Click to expand...
Click to collapse
Good idea

[CM9.0.0][Siyah v4.1rc1+] Prolific/FTDI Serial Terminal HowTo

[CM9.0.0][Siyah v4.1rc1+] Prolific/FTDI Serial Terminal HowTo
Hi everybody out there!
I just finally managed to use my Galaxy S2 as a serial terminal for my newly bought cubox (google for solid-run)
and as I found very little information on how to achieve that, I thought about telling the word to other folks like me.
As I am definitely not experienced with compiling kernels and stuff, I used a precompiled kernel and rom:
Siyah Kernel: Siyah-s2-v4.1rc1-CWM.zip
Cyanogenmod: cm-9.0.0-galaxys2.zip
I also installed Busybox from BusyBox Pro by Stephen (Stericson) which contains the tool microcom
Now I use Irssi Connectbot, open a session and enter the following commands:
For becoming root: su
Needed first: insmod /lib/modules/usbserial.ko
If I want the Prolific Adapter: insmod /lib/modules/pl2303.ko
If I want the FTDI Adapter: insmod /lib/modules/ftdi_sio.ko
Now I check, if the modules have been loaded: lsmod
That gives me the following:
dhd 399255 0 - Live 0xbf04e000
ftdi_sio 27902 0 - Live 0xbf044000
pl2303 11895 0 - Live 0xbf03e000
usbserial 24441 2 ftdi_sio,pl2303, Live 0xbf034000
j4fs 68207 1 - Live 0xbf00a000 (P)
Si4709_driver 24227 0 - Live 0xbf000000
ftdi_sio ... Live ... <- FTDI Module loaded
pl2303 ... Live ... <- Prolific Module loaded
Now I plug my Usb2Microusb cable into my device and my OTG Adapter and finally into my Galaxy S2
Because me OTG Adapter was a very cheap one,
I need to check if it is actually connected:
dmesg | grep usb
...
<6>[53402.191025] usb 2-1: Manufacturer: Prolific Technology Inc.
<6>[53402.237498] usb 2-1: pl2303 converter now attached to ttyUSB0
I now have a ttyUSB0 in /dev , which I can use with microcom:
microcom -s 115200 /dev/ttyUSB0
et voilà, im using a serial terminal connection to my device.
When I'm finished, I close microcom with Ctrl-x.
( I actually need to push the onscreen Ctrl in Connectbot and then press x on my touchscreen keyboard)
Now I unplug the OTG Adapter and unload the loaded modules with rmmod:
rmod pl2303
rmmod ftdi_sio
rmmod usbserial
Thats all. No more Bulky Laptops for Serial connections in cramped places!
PS: Thats my 1st post on this site and about my 10th post in forums in my lifetime.
So yeah, Im a "noob" in forumposting and a not so perfect english speaker.
Please feel free to correct and guide me
Thanks for the post. You can also create a script for faster execution.
Does it necessary to unload the modules after use?
Sent from my GT-I9100 using xda app-developers app
What do I have to do to get this working on rooted Xperia Z? I do not see any /lib folder in root.

[Q] Sorry, your device does not have a back facing camera

I have just bought nexus 4 and I cannot switch to back camera.
Switch button is missing and when I try to switch to panorama mode there is a message:
"Sorry, your device does not have a back facing camera"
I have flashed google 4.2.2 and 4.3 factory images without luck.
Could anyone post the output of
adb shell ls /dev
please?
Mine is:
Code:
1|[email protected]:/ $ ls /dev
__properties__
alarm
android_adb
android_mbim
android_rndis_qc
apr_apps2
ashmem
bcm2079x-i2c
binder
block
bus
ccid_bulk
ccid_ctrl
console
cpu_dma_latency
cpuctl
device-mapper
diag
dsp_debug
efs_hsic_bridge
full
fuse
gemini0
genlock
graphics
gss
hsicctl0
hsicctl1
hsicctl2
hsicctl3
hw_random
i2c-0
i2c-3
i2c-4
input
ion
keychord
kgsl-3d0
kmem
kmsg
log
loop-control
mdm
media0
media1
mem
msm_aac
msm_aac_in
msm_acdb
msm_amrnb
msm_amrnb_in
msm_amrwb
msm_amrwb_in
msm_amrwbplus
msm_camera
msm_dsps
msm_evrc
msm_evrc_in
msm_mp3
msm_multi_aac
msm_qcelp
msm_qcelp_in
msm_rotator
msm_rtac
msm_sps
msm_vidc_dec
msm_vidc_dec_sec
msm_vidc_enc
msm_vidc_enc_sec
msm_vidc_reg
msm_wma
msm_wmapro
mtp_usb
network_latency
network_throughput
nmea
null
ppp
ptmx
pts
qmi0
qmi1
qmi2
qseecom
ramdump_dsps
ramdump_gss
ramdump_lpass
ramdump_riva
ramdump_smem-dsps
ramdump_smem-gss
random
rfkill
rmnet_mux_ctrl
rtc0
smd1
smd11
smd2
smd21
smd22
smd27
smd3
smd36
smd4
smd5
smd6
smd7
smd_cxm_qmi
smd_pkt_loopback
smd_sns_adsp
smd_sns_dsps
smdcnt_rev0
smdcnt_rev1
smdcnt_rev2
smdcnt_rev3
smdcnt_rev4
smdcnt_rev5
smdcnt_rev6
smdcnt_rev7
smdcnt_rev8
smdcntl0
smdcntl1
smdcntl2
smdcntl3
smdcntl4
smdcntl5
smdcntl6
smdcntl7
smdcntl8
smem_log
snd
socket
tgt
tty
tty0
tty1
tty10
tty11
tty12
tty13
tty14
tty15
tty16
tty17
tty18
tty19
tty2
tty20
tty21
tty22
tty23
tty24
tty25
tty26
tty27
tty28
tty29
tty3
tty30
tty31
tty32
tty33
tty34
tty35
tty36
tty37
tty38
tty39
tty4
tty40
tty41
tty42
tty43
tty44
tty45
tty46
tty47
tty48
tty49
tty5
tty50
tty51
tty52
tty53
tty54
tty55
tty56
tty57
tty58
tty59
tty6
tty60
tty61
tty62
tty63
tty7
tty8
tty9
ttyHSL0
tun
uhid
uinput
urandom
usb_accessory
usf1
v4l-subdev0
v4l-subdev1
v4l-subdev2
v4l-subdev3
v4l-subdev4
v4l-subdev5
v4l-subdev6
v4l-subdev7
v4l-subdev8
v4l-subdev9
vcs
vcs1
vcsa
vcsa1
video0
video1
video100
wcnss_wlan
xt_qtaguid
zero
[email protected]:/ $
Here is my dmesg output. I am running stock 4.3 rom.
I have the same issue with stock 4.2.2.
Could anyone help me, please?
Code:
pastebin.com/wcwms4qH
return it.
Yep. Just return it.
Thank you for your comments.
Actually I have bought it on an auction, however I have contacted seller and he has agreed to send me a new one.
theanacrusis said:
Thank you for your comments.
Actually I have bought it on an auction, however I have contacted seller and he has agreed to send me a new one.
Click to expand...
Click to collapse
Yeah, they must have opened it up.
Sent from my Nexus 4 using Tapatalk 4

[HOWTO] Add /etc/init.d support and enable OTG on boot [ROOT REQUIRED]

[UPDATE #1] I've added a zip file with the 2 scripts, with UNIX line endings , as suggested below by @aftvNews . Cheers.
[UPDATE #2] I've added a zip file with the 2 extra scripts to go into /etc/init.d, as requested by @Axecaster . These will need the same ownership and permissions as enableotg. They disable SELinux and set the permissions on the recovery directories. Cheers.
Having had a look around the android image on my Fire TV Stick (v1) [ FireOS 5.2.1.1 @rbox ] I found that a script, which doesn't exist, called /system/bin/factoryadb.sh was being run by /init.build.rc on boot.
I was able to create a simple script to run scripts in /etc/init.d on boot.
UPDATE (05/04/19): Now I've got root access on my FireTV Gen 2 [ FireOS 5.2.6.9 ] I can see the see these instructions will also work, although the OTG enabling is not needed
NOTE: I've only tested this on a 1st generation Fire TV Stick but may work on Fire TV boxes if they also call /system/bin/factoryadb.sh from /init.build.rc
Before you do this please make sure factoryadb.sh is NOT on your FireTV and that it is called from /init.build.rc by connecting to your FireTV via adb and running the following commands
Code:
adb shell
su
grep factoryadb /init.build.rc && ls -l /system/bin/factoryadb.sh
Hopefully this will return
Code:
service factoryadb /system/bin/factoryadb.sh
/system/bin/factoryadb.sh: No such file or directory
Now continue ...
My factoryadb.sh script
Code:
#!/system/bin/sh
#
# Execute all scripts in /etc/init.d
if [ -d /etc/init.d ]
then
for f in `ls /etc/init.d/* 2>/dev/null`
do
if [ -s ${f} ]
then
echo Executing ${f} ... >/dev/kmsg
/system/bin/sh ${f}
fi
done
fi
NOTE: Make sure this file has UNIX line endings only. Notepad++ has an option to specify UNIX line endings.
I also have a simple script to enable OTG which I called enableotg, again MUST have UNIX line endings.
Code:
#!/system/bin/sh
echo 1 > /sys/devices/platform/bcmpmu_otg_xceiv/host
Connect to the Fire TV Stick via adb and run the following commands
Code:
adb push factoryadb.sh /sdcard/
adb push enableotg /sdcard/
adb shell
su
mount -o remount,rw /system
mkdir /etc/init.d
cp /sdcard/factoryadb.sh /system/bin/
cp /sdcard/enableotg /etc/init.d/
chown 0:0 /system/bin/factoryadb.sh /etc/init.d /etc/init.d/enableotg
chmod 755 /system/bin/factoryadb.sh /etc/init.d /etc/init.d/enableotg
mount -o remount,ro /system
reboot
When the FireTV Stick has rebooted then reconnect via adb and run the following commands
Code:
adb shell
su
dmesg | grep -e factoryadb -e Executing -e bcmpmu
You should see something similar to
Code:
<6>[ 3.005279] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Probing started...
<6>[ 3.007690] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Probing successful
<3>[ 4.998016] init: Warning! Service factoryadb needs a SELinux domain defined; please fix!
<4>[ 5.573242] Executing /etc/init.d/enableotg ...
<6>[ 5.579040] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Switching to Host
All is working and OTG should be working about 5 seconds after leaving the TWRP screen and long before Android has finished booting.
If you have an ethernet dongle attached it should have an IP address before the launcher starts
NOTE: The SELinux warning can be safely ignored.
Hope this helps.
Nicely done. Clever using the missing factoryadb.sh to roll your own init.d.
Might be easier for some if you just upload/attach your factoryadb.sh and enableotg files that others can download, so there's no need to worry about proper UNIX line endings.
Worked nicely on one of my gen 1 sticks running 5.2.4.1_r2.
OTG works for USB pendrive?
AFTVnews.com said:
Nicely done. Clever using the missing factoryadb.sh to roll your own init.d.
Might be easier for some if you just upload/attach your factoryadb.sh and enableotg files that others can download, so there's no need to worry about proper UNIX line endings.
Click to expand...
Click to collapse
Doh! Completely missed the section to "Attach Files" when I was writing the post
I've now added a zip file with the 2 scripts with UNIX line endings to the post.
Cheers
Awesome job figuring out this was possible! I can confirm the init.d part works just fine on the FireTV-v1 on Rbox v5.2.4.1_r2 (didn't test OTG scripts as I already have a full USB port).
I am going to be adding in your init.d support to my Playing with Fire MOD for the next release.
Now just got to get PS3 / Xbox One controller kernel plugins compiled and working for the Gen1 devices now that init.d works. :good:
dony71 said:
OTG works for USB pendrive?
Click to expand...
Click to collapse
I tried this on fire tv stick 1, usb storage does not work.
dmesg shows my Kingston USB pendrive being recognized by kernel,
but registered driver debus_usbdev ?
So I guess kernel doesn't have USB storage driver?
----------------------------------------------------------------------------------------------------
<6>[ 7.267791] usb 3-1: new high speed USB device number 2 using dwc_otg
<6>[ 7.538024] usb 3-1: New USB device found, idVendor=0951, idProduct=1642
<6>[ 7.538116] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[ 7.538238] usb 3-1: Product: DT 101 G2
<6>[ 7.538330] usb 3-1: Manufacturer: Kingston
<6>[ 7.538482] usb 3-1: SerialNumber: 001CC0EC3509EA50B0000232
<6>[ 47.829345] usbcore: registered new interface driver dbus_usbdev
<3>[ 60.385131] init: Warning! Service adb_usb needs a SELinux domain defined; please fix!
Does this enable the use of USB storage ? as ive had this setup for over 6 months now to enable usb pheripal support on boot (with a script booter). If not i guess its still good to do away with the extra apk i had installed to enable my script at boot.
What does this actually do? My FireTV already can read from usb drives.
tdfsu said:
What does this actually do? My FireTV already can read from usb drives.
Click to expand...
Click to collapse
Seems mainly for gen 1 sticks to enable usb peripherals. Each boot requires a command to be re-run to recognize usb keyboards, mice, wired networking port, etc. Someone correct me if I'm wrong, but this configuration could in-theory assign multiple scripts to run on boot without extra apps installed.
Axecaster said:
Seems mainly for gen 1 sticks to enable usb peripherals. Each boot requires a command to be re-run to recognize usb keyboards, mice, wired networking port, etc. Someone correct me if I'm wrong, but this configuration could in-theory assign multiple scripts to run on boot without extra apps installed.
Click to expand...
Click to collapse
Yes Gen2 sticks and the main FireTV's seem to have OTG already enabled but Gen1 sticks don't.
However even though I've only specified enabling OTG in my initial post, as Axecaster mentioned I do in fact have a number of scripts in /etc/init.d that run on boot.
e.g. Set SELinux to Permissive, set full R/W access on the recovery directories, cleanup some temp files on boot etc
I'm currently checking to see if I can set a static IP on the USB Ethernet adapter I use with my Gen1 stick which will most likely result in a new script in /etc/init.d
I also need to investigate the USB storage options more though. Might be the same issue as I'm having with NFS mounts. I can mount an NFS share but currently only root can see it!
Hope this helps.
tgellen said:
Yes Gen2 sticks and the main FireTV's seem to have OTG already enabled but Gen1 sticks don't.
However even though I've only specified enabling OTG in my initial post, as Axecaster mentioned I do in fact have a number of scripts in /etc/init.d that run on boot.
e.g. Set SELinux to Permissive, set full R/W access on the recovery directories, cleanup some temp files on boot etc
I'm currently checking to see if I can set a static IP on the USB Ethernet adapter I use with my Gen1 stick which will most likely result in a new script in /etc/init.d
I also need to investigate the USB storage options more though. Might be the same issue as I'm having with NFS mounts. I can mount an NFS share but currently only root can see it!
Hope this helps.
Click to expand...
Click to collapse
Have you checked or modified your "persist-usb-config" file yet? If your's has different values than this (from a FireTV-Box) edit it to match mine and see if that helps.
Code:
[email protected]:/ # cat /data/property/persist.sys.usb.config
diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
As for your NFS shares issue you are going to need to do a Bind Mount to get non-root users able to access the directory. Im using the same bind-mount method to get a bunch of additional GApps installed on the FireTV by binding folders in /data/local/ --> /system/priv-app and using your /etc/init.d/ discovery to launch it automatically on boot.
[email protected]: # mkdir /data/local/nfs && chmod 0755 /data/local/nfs && chown 0:0 /data/local/nfs
init.d startup script:
Code:
#!/system/bin/sh
NFSPATH=/path/to/nfs
NFSDATA=/data/local/nfs
(mount -o bind $NFSPATH $NFSDATA) ; (mount -o remount nosuid,nodev,noexec,reltime,async $NFSPATH)
SimLynks said:
Have you checked or modified your "persist-usb-config" file yet? If your's has different values than this (from a FireTV-Box) edit it to match mine and see if that helps.
Click to expand...
Click to collapse
Result:
Code:
[email protected]:/ # cat /data/property/persist.sys.usb.config
[B]adb[/B][email protected]:/ #
I pulled the file, replaced "adb" with "iag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb", pushed it back and rebooted the device.
Result: ADB is disabled and otg doesn't seem to work (usb flash drive)
Enabling ADB sets the file back to "adb" and after a reboot otg is working again.
after installing xposed framework on the fire tv stick this method for otg on boot not longer works.
any solutions?
thecoonx said:
after installing xposed framework on the fire tv stick this method for otg on boot not longer works.
any solutions?
Click to expand...
Click to collapse
Hmm. I installed this method after xposed framework. As far as I'm aware, everything seems to be working.
thecoonx said:
after installing xposed framework on the fire tv stick this method for otg on boot not longer works.
any solutions?
Click to expand...
Click to collapse
Axecaster said:
Hmm. I installed this method after xposed framework. As far as I'm aware, everything seems to be working.
Click to expand...
Click to collapse
So only setup your scripts after you are done flashing a PreRooted ROM &/or SuperSU &/or XPosed Framework. So in other words only after your done messing with things that mess with /System in TWRP. Or you will have to reset them again.
SimLynks said:
Have you checked or modified your "persist-usb-config" file yet? If your's has different values than this (from a FireTV-Box) edit it to match mine and see if that helps.
Code:
[email protected]:/ # cat /data/property/persist.sys.usb.config
diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
As for your NFS shares issue you are going to need to do a Bind Mount to get non-root users able to access the directory. Im using the same bind-mount method to get a bunch of additional GApps installed on the FireTV by binding folders in /data/local/ --> /system/priv-app and using your /etc/init.d/ discovery to launch it automatically on boot.
[email protected]: # mkdir /data/local/nfs && chmod 0755 /data/local/nfs && chown 0:0 /data/local/nfs
init.d startup script:
Code:
#!/system/bin/sh
NFSPATH=/path/to/nfs
NFSDATA=/data/local/nfs
(mount -o bind $NFSPATH $NFSDATA) ; (mount -o remount nosuid,nodev,noexec,reltime,async $NFSPATH)
Click to expand...
Click to collapse
Hi SimLynks,
Thanks for your suggestion. The bind mount did make the directory available for the non-root user but unfortunately it's contents were still only visible to the root user
I'll keep on trying
Cheers.
tgellen said:
[UPDATE #1] I've added a zip file with the 2 scripts, with UNIX line endings , as suggested below by AFTVNews. Cheers.
[UPDATE #2] I've added a zip file with the 2 extra scripts to go into /etc/init.d, as requested by Axecaster. These will need the same ownership and permissions as enableotg. They disable SELinux and set the permissions on the recovery directories. Cheers.
Having had a look around the android image on my Fire TV Stick (v1) [FireOS 5.2.1.1 rbox] I found that a script, which doesn't exist, called /system/bin/factoryadb.sh was being run by /init.build.rc on boot.
I was able to create a simple script to run scripts in /etc/init.d on boot.
NOTE: I've only tested this on a 1st generation Fire TV Stick but may work on Fire TV boxes if they also call /system/bin/factoryadb.sh from /init.build.rc
Before you do this please make sure factoryadb.sh is NOT on your FireTV and that it is called from /init.build.rc by connecting to your FireTV via adb and running the following commands
Code:
adb shell
su
grep factoryadb /init.build.rc && ls -l /system/bin/factoryadb.sh
Hopefully this will return
Code:
service factoryadb /system/bin/factoryadb.sh
/system/bin/factoryadb.sh: No such file or directory
Now continue ...
My factoryadb.sh script
Code:
#!/system/bin/sh
#
# Execute all scripts in /etc/init.d
if [ -d /etc/init.d ]
then
for f in `ls /etc/init.d/* 2>/dev/null`
do
if [ -s ${f} ]
then
echo Executing ${f} ... >/dev/kmsg
/system/bin/sh ${f}
fi
done
fi
NOTE: Make sure this file has UNIX line endings only. Notepad++ has an option to specify UNIX line endings.
I also have a simple script to enable OTG which I called enableotg, again MUST have UNIX line endings.
Code:
#!/system/bin/sh
echo 1 > /sys/devices/platform/bcmpmu_otg_xceiv/host
Connect to the Fire TV Stick via adb and run the following commands
Code:
adb push factoryadb.sh /sdcard/
adb push enableotg /sdcard/
adb shell
su
mount -o remount,rw /system
mkdir /etc/init.d
cp /sdcard/factoryadb.sh /system/bin/
cp /sdcard/enableotg /etc/init.d/
chown 0:0 /system/bin/factoryadb.sh /etc/init.d /etc/init.d/enableotg
chmod 755 /system/bin/factoryadb.sh /etc/init.d /etc/init.d/enableotg
mount -o remount,ro /system
reboot
When the FireTV Stick has rebooted then reconnect via adb and run the following commands
Code:
adb shell
su
dmesg | grep -e factoryadb -e Executing -e bcmpmu
You should see something similar to
Code:
<6>[ 3.005279] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Probing started...
<6>[ 3.007690] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Probing successful
<3>[ 4.998016] init: Warning! Service factoryadb needs a SELinux domain defined; please fix!
<4>[ 5.573242] Executing /etc/init.d/enableotg ...
<6>[ 5.579040] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Switching to Host
All is working and OTG should be working about 5 seconds after leaving the TWRP screen and long before Android has finished booting.
If you have an ethernet dongle attached it should have an IP address before the launcher starts
NOTE: The SELinux warning can be safely ignored.
Hope this helps.
Click to expand...
Click to collapse
Can this be used in some way to enable otg while at the TWRP countdown bar ( as to use keyboard/mouse/airmouse within TWRP), As it's a whole lot easier to use than the ADB mouse, having to plug firestick into laptop/computer if you need to be in recovery, if it is possible it could be easier.
I use the airmouse/keyboard method myself when I go I to recovery but have to use my home made otg cable and swap over usb to computer after running the command to usb dongle for the airmouse (melee F10 pro). After the command has run while plugged into my laptop I unplug the laptop connection and plug in my dongle and I navigate TWRP with my remote.
It is any chance that we can enable OTG on no-rooted devices of firetv gen 1 ?I have firmware 5.2.6.7 so I think there is no way I can root the device. Thanks!
minute said:
It is any chance that we can enable OTG on no-rooted devices of firetv gen 1 ?I have firmware 5.2.6.7 so I think there is no way I can root the device. Thanks!
Click to expand...
Click to collapse
Sorry. Unfortunately you need root access to change the OTG value on the FireTV gen 1

Categories

Resources