(Guide) Setting USB Debugging on by Defualt - Vibrant Android Development

To make USB Debugging work permanently after each factory reset, add these command line in the build.prop
ro.secure=0
ro.debuggable=1
persist.service.adb.enable=1
Enjoy,
~Eugenee

Nice find.

This is already setup in the kernel I'm about to release. Working on WiFi tether that is the last issue at this point.
Race issue init etc taken care of. Rotation WiFi BT everything works as it should.
PM when you can Eugene

Related

Change baudrate of ttyMSM0 without stty or busybox?

Hi !
Since I'm a new member I cannot post in Dev but anyway this is my problem :
I'm plugging an Arduino in the Serial port of the phone (/dev/ttyMSM0) that was enabled by modifying the kernel (.config) to disable to FIQ debugger and so on as well documented on the web...
I fix the permission either in init.mahimahi.rc or when building AOSP to 777 to be able to use the Serial with my apk without having to Su them.
I have a problem concerning the speed of the serial port itself. In all the config files I found in the MSM/Kernel or in AOSP source, speed is set to 115200 by default but it is actually 9600 when the phone is operating.
I can change the speed by using busybox and stty -F but I would rather not use that.
I'm looking for a way to set the speed at low-level, when building kernel and/or AOSP. I tried to figure out which file was involved in the creation/definition of /dev/ttyMSM0 but there is just to many of them and it doesnt seem to work.
Any ideas?

[Q] USB Tethering Ubuntu

Hi,
Has anyone succeeded in getting USB tethering to work with Ubuntu? I have :
Ubuntu 11.10
Samsung Galaxy S 2.3.5, kernel speedmod k16-11
USB tethering works a treat under windows, once I install the samsung drivers, but I can't get usb0 to appear when I type "ifconfig". "lsusb" does however list the samsung phone.
Any ideas, other than using easy tether ?
Thanks
Hi mmlbbntr,
I have got Ubuntu 11.10 on MacBookPro. I had problems to connect to School WLAN, so I do USB Tethering and it was successful.
But I use Teamhacksung ICS on my SGS ;-)
// Don't forget to Thanks
Have You tried
ifconfig -a
?
It should list Your usb0 ethernet.
If it is right there You should try
ifconfig usb0 up
and
dhcpcd usb0
If there is no usb0, maybe
ifconfig usb0 plumb
will help.
There is a bug with gingerbread where USB tethering is broken on linux. It worked well on Froyo and it also works well on CM9
there is a workarround however, but it is much less clean
http://technomagus.wordpress.com/mobile/tethering/samsung-galaxy-s-i9000-as-3g-modem/
Yeah ifconfig doesn't list any usb connection. I'll try "ifconfig -a" though, not sure what the difference is. If that fails I'll try "ifconfig usb0 plumb", no idea what that does either, but worth a shot.
Thanks for the tips, I'll keep you posted tonight.
robert-km said:
Have You tried
ifconfig -a
?
It should list Your usb0 ethernet.
If it is right there You should try
ifconfig usb0 up
and
dhcpcd usb0
If there is no usb0, maybe
ifconfig usb0 plumb
will help.
Click to expand...
Click to collapse
Oh wow, I hadn't seen your post. Thanks for the info. Guess all I can do is wait for a stable release of CM9 and upgrade...
zorxd said:
There is a bug with gingerbread where USB tethering is broken on linux. It worked well on Froyo and it also works well on CM9
there is a workarround however, but it is much less clean
http://technomagus.wordpress.com/mobile/tethering/samsung-galaxy-s-i9000-as-3g-modem/
Click to expand...
Click to collapse
I'm using Arch with ICS on galaxy S, so I didn't know about this bug.
ifconfig -a lists every lan devices, not only UP state.
plumb as far as i remember works only on solaris, so You sould not need this command, sorry for making mess.
zorxd said:
There is a bug with gingerbread where USB tethering is broken on linux. It worked well on Froyo and it also works well on CM9
there is a workarround however, but it is much less clean
http://technomagus.wordpress.com/mobile/tethering/samsung-galaxy-s-i9000-as-3g-modem/
Click to expand...
Click to collapse
No mention anywhere of 2.3.6. I wonder if USB tethering bug is fixed. Has anyone tried?
I'd rather not install ICS until a stable release is out TBH...

USB Ethernet for N7100

I'm trying to get USB Ethernet support enabled on the Omni ROM for N7100 (specifically the AX8817X one). I'll explain the steps I went through
cd kernel/samsung/smdk4412/
make custom_n7100_defconfig
make menuconfig
This bring up the GUI module thing (ncurses required).
Then I navigate to:
Device Driver -> Network Device Support -> USB Network Adapters -> Multipurpose USB Networking Framework
In here I then enabled the AX8817X support with 'M' to make a dynamic module. I am only doing this so I can see if it appears as a .ko afterwards.
After this I try to build using both 'brunch n7100' and 'lunch aosp_arm-eng'.
However the build always falls over. For brunch it tells me to recompile using make mrproper, which also falls over. Lunch says something about no target. Got any ideas how to get this working, if its possible at all?
Thanks a lot.
If you wanna lunch a device, you do something like lunch omni_n7100-userdebug
Build log please.
Sent from my GT-N7100 using Tapatalk
kaleb500 said:
I'm trying to get USB Ethernet support enabled on the Omni ROM for N7100 (specifically the AX8817X one). I'll explain the steps I went through
cd kernel/samsung/smdk4412/
make custom_n7100_defconfig
make menuconfig
This bring up the GUI module thing (ncurses required).
Then I navigate to:
Device Driver -> Network Device Support -> USB Network Adapters -> Multipurpose USB Networking Framework
In here I then enabled the AX8817X support with 'M' to make a dynamic module. I am only doing this so I can see if it appears as a .ko afterwards.
After this I try to build using both 'brunch n7100' and 'lunch aosp_arm-eng'.
However the build always falls over. For brunch it tells me to recompile using make mrproper, which also falls over. Lunch says something about no target. Got any ideas how to get this working, if its possible at all?
Thanks a lot.
Click to expand...
Click to collapse
You need to:
Copy the .config from menuconfig over to arch/arm/configs/custom_n7000_defconfig
export ARCH=arm
make mrproper (might need to set the toolchain path to the Android toolchain by setting CROSS_COMPILE properly)
Then go to the top level and brunch
Entropy512 said:
You need to:
Copy the .config from menuconfig over to arch/arm/configs/custom_n7000_defconfig
export ARCH=arm
make mrproper (might need to set the toolchain path to the Android toolchain by setting CROSS_COMPILE properly)
Then go to the top level and brunch
Click to expand...
Click to collapse
Thanks for the responses. Based on your advice I performed the following steps:
1. Copy .config to arch/arm/configs/custom_n7100_defconfig (replacing the one that was already there).
2. Delete .config, no longer needed after copy.
3. Went to top level then:
. build/envsetup
brunch n7100
This built OK and 'asix.ko' has appeared in the modules area. So its looking pretty good.
I can't test it on the phone until tomorrow. I will report back
OK the dynamic module didn't work properly. So we tried compiling as a static module instead. This does require the make mrproper step, otherwise it falls over. Process as follows:
make clean
cd kernel/samsung/smdk4412/
make custom_n7100_defconfig
make menuconfig
This bring up the GUI module thing (ncurses required).
Then I navigate to:
Device Driver -> Network Device Support -> USB Network Adapters -> Multipurpose USB Networking Framework
In here I then enabled the AX8817X support with 'Y' to make a static module. Save the config then copy to the correct area:
cp .config arch/arm/configs/custom_n7100_defconfig
sudo rm .config*
The default CROSS_COMPILE value in the makefile is wrong so I change it from:
CROSS_COMPILE ?= ../../../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
to:
CROSS_COMPILE ?= ../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.4.3/bin/arm-eabi-
After this run mrporper:
make mrproper
Then navigate to the top and run brunch:
cd ../../../
. build/envsetup,sh
brunch n7100
This builds OK. When installed on the phone I then plug a USB device in and run a terminal application called 'Terminal IDE' and issue:
su
ifup eth0
This actually brings the interface up, and it is visible when I do an ifconfig (I tried this without the device plugged in as a sanity check and it didn't work). It then complains that the following file is missing:
/etc/network/interfaces
In the terminal app i remount the drive to make it writable using the steps shown here:
http://ckirbach.wordpress.com/2012/11/27/how-to-remount-system-as-read-write-in-android/
I then manually create the file and populate as follows:
auto eth0
iface eth0 inet dhcp
This prevent the same error occurring. How now it complains it can't find the following:
/etc/network/if-up.d
/var/run/ifstate
I could continue with the process of adding these files manually. But perhaps there is another kernel module I need to add? Its kind of looks like the device driver and the device itself are working fine, but the kernel is missing the files it needs? Any ideas appreciated.
Thanks
p.s. Deleted the interfaces file for the moment
OK I got it working eventually. Tried a different USB device then in terminal:
su
netcfg eth0 up
netcfg eth0 dhcp
It then enumerated correctly
The device was a Mb rather than a Gb that I tried previously. Perhaps that is why it didn't work. Perhaps there is a Gb option the kernel config somewhere?
Thanks for the help anyway. Learnt alot.

[Q] How to completely disable Reverse USB Tethering ?

Hi , I tried this method :
http://forum.xda-developers.com/showthread.php?t=2287494
to enable reverse tethering, I wasn't successful though even there were no errors, I only tried these codes :
su
netcfg rndis0 dhcp
busybox ifconfig
but since then MyPhoneExplorer and other softwares won't let me connect my phone via USB TILL I enable usb tethering option :silly: even though USB Debugging is always on..........
Is there a way I can reset / undo those codes so I could connect to myphoneexplorer easily again ?
Thanks

broken screen enable usb debugging

yes it's another one of these threads ^^
I think my best shot at accessing my phone, especially getting at my 2fa keys, would be to use something like vyzor.
I used this just last week so I thought I would have usb debugging enabled, but somehow when I connect my phone it is not listed under adb devices.
Unlocking my phone via a usb keyboard makes it show up in the explorer, but its still stuck in charge only mode.
I tried following this guide https://gist.github.com/varhub/7b9555cdd1e5ad785ffde2300fcfd0bd to enable usb debugging
(In recovery mode my phone is accessible via adb)
and also tried to put these values
Code:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
into: /system/etc/prop.default
also created them as files in /data/property with the associated value (e.g. echo -n '1' > /data/property/persist.service.adb.enable)
set them via setprop (e.g. setprop persist.service.adb.enable 1 and later setprop persist.service.adb.enable true)
Before that I mounted system and data via:
Code:
twrp mount /system
twrp mount /data
mount -o rw,remount /data
mount -o rw,remount /system
But none of this worked and I also don't get how this would work without me needing to enter my pin? (I can decrypt via twrp decrypt, but I don't need to to set these values?)
Also in general lets say usb debugging is enabled, do I need to enter my pin before it will show up under adb devices
And if I don't set the adb_keys and have not yet trusted the RSA key it would show under adb devices as unauthorized?
My rom is iirc this:
[ROM][UNOFFICIAL][11.0][raphael] LineageOS 18.1
@abhishek987 any chance of a Xmas present this year? :giggle:
forum.xda-developers.com
With twrp and magisk installed.
Currently I am trying to enable file transfer via the usb keyboard by trying stuff out, taking screenshots during it and then rebooting into recovery to download those screenshots. (are there any keyboard shortcuts that would e.g. allow me taking a screenshot, or accessing search in the settings?)
Since I use the kiss launcher I can start apps by just typing the app name after unlocking. That way I managed to start a http server via termux, but termux doesn't seem to have access to any interesting files.
I also have nextcloud with instaupload enabled for my camera, which I could make it upload my Screenshots so I wouldn't need to reboot everytime ^^
Seems like this phone does not support hdmi out
Actually managed to turn on usb debugging this way. Was a bit easier cos my tv apparently through the app let me check my screenshots lol.
Is there any command or anything i can do to check that the RSA key is now permanently being accepted?
seems like a system restart resets usb debugging

Categories

Resources