Install self-signed certificate on Android TV - Nexus Player Q&A, Help & Troubleshooting

Hey.
Anyone installed self-signed certificate on Android TV?
There is no option for that in the setting menu.
I tried doing this with ADB but the result is:
CertInstaller: Failed to read certificate: java.io.FileNotFoundException: /sdcard/Download/certificate.cer (Permission denied)
Help?
Thanks

Sure. I install the certificate on a phone and use an app to move it to system. Then I can check /system/etc/security/cacerts for the newest file and transfer it to the Android TV device.
Move Certs! | F-Droid - Free and Open Source Android App Repository
Resolve certificates warnings
f-droid.org

Related

[TUT] OpenVPN (TAP Device) with Android 2.2 (FroYo) [24.08.2010]

Hello folks
I need a OpenVPN connection to my Server and as like (nearly) evertime nobody has a solution or the same problems.
Or I get answers like "It works for me" or "I don't know" or other less helpful hints.
So I want discribe you how I solved this Problem
I use the [BUILD][21.08.2010][Xcelsior's Android FroYo V1.00a][Kernel: htc-msm-2.6.32 #82] ROM with the [Kernel][Latest GIT][Overclocking][Undervolting][Extbatts] [email protected] #56 (r6) Kernel.
1. Copy your OpenVPN config (incl. certificates) to a folder called "openvpn" into the root of your SD Card.
- Please change the extension of your config file to "conf"
2. Make a link from "/bin" to "/system/xbin/bb"
- With adb:
Code:
adb shell ln -s /bin /system/xbin/bb
- Or from Terminal:
Code:
ln -s /bin /system/xbin/bb
3. Install "OpenVPN Installer" from market.
- Run it
- OpenVPN directory "/system/bin"
- ifconfig/route directory "/system/xbin/bb"
4. Install "OpenVPN Settings" from market.
5. Open OpenVPN Settings:
- Then you should see your config.
- Tap and hold your config and then select "Preferences"
- Check "Use VPN DNS Server" (optional)
- Enter a VPN DNS Server (optional)
- "Script Security Level" -> "Build-in + scripts"
- Go back to the main OpenVPN Settings screen
6. Open the menu (press the windows button on your phone)
- Select "Advanced"
- Check "Load tun kernel module"
- Tap on "TUN module settings"
- "Load module using" -> insmod
- "Path to tun module" -> /system/lib/modules/tun.ko
- leave the rest as default
- If you can't see your config, change the "Path to configurations" to /mnt/sdcard/openvpn
7. Open "OpenVPN Settings" and enable OpenVPN (if it is not yet enabled) and then tap on your config (sometimes twice )
8. Enjoy
My Configs:
Server Config (Windows, bridged):
Code:
dev tap
dev-node Chris
proto tcp-server
port 443
server-bridge 192.168.1.1 255.255.255.0 192.168.1.3 192.168.1.99
tls-server
dh dh384.pem
ca ca.crt
cert server.crt
key server.key
status Chris.log
ping 15
ping-restart 60
push "ping 15"
push "ping-restart 60"
push "redirect-gateway def1"
push "dhcp-option DNS 192.168.1.1"
comp-lzo
verb 3
script-security 2
Client Config (Android 2.2):
Code:
remote little.britain.usa 443 #address changed :D
client
proto tcp
tls-client
ca ca.crt
cert Chris.crt
key Chris.key
http-proxy star.trek.ds9 80 #address changed :D
http-proxy-retry
http-proxy-option AGENT HTC_Touch_HD_T8282 Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11)
dev tap
dev-node /dev/tun
resolv-retry infinite
persist-key
persist-tun
script-security 2
verb 3
log status.log
comp-lzo
The http-proxy* commands only for those who have to tunnel through a proxy.
And now... Try it and let me know if it works for you, too
I've noticed, that OpenVPN needs a lot of energy.
Maybe the ecryption is the reason. No... That was not the reason...
Hello, thnx for the useful information.
I'm trying this on SE X10 with Donut, apparently it doesn't have /system/xbin/bb
How do I proceed then?
Where shall I set the link to?
aldoyh said:
Hello, thnx for the useful information.
I'm trying this on SE X10 with Donut, apparently it doesn't have /system/xbin/bb
How do I proceed then?
Where shall I set the link to?
Click to expand...
Click to collapse
The folder "/system/xbin/bb" does not exist. Only "/system/xbin".
I you run the command "ln -s /bin /system/xbin/bb" it will be created.
Like a shortcut to a folder in windows
Hi
I have recently bought a VPN service to change my IP to USA.
I connect to it using openvpn-2.1.3 client in my laptop (windows 7).
But I don't know how to connect my htc desire using openvpn!
They only provide me an application which downloads the settings and starts the openvpn itself. I know nothing about its configuration. I only provide a user-name and password and Vola!
here is the link to that application:
www(dot)speedex(dot)info(dot)tm/SPEEDEXVPN.exe
I would appreciate it if you can help me making the config file for desire.
and here is the config in openvpn client in my laptop:
Code:
client
dev tun
proto udp
remote-random
remote 216.155.148.9 1194
remote 216.155.148.9 5000
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
tls-auth ta.key 1
comp-lzo
auth-user-pass
verb 3
I'm looking forward to hear from you guys
and I'm currently using modaco custom ROMs r9 with openvpn option
Hi
Did you try to follow my tutorial?
Your config seems to be ok...
maybe you can add "script-security 2" to your config... It is necessary in the new openvpn versions
But don't forget to copy the certificates to the openvpn folder on your SD card, too
the reason that I want to use openvpn is to access Android market and facebook in my phone. So, I couldn't install "OpenVPN Installer" (but I think modaco r9 already has it and it says "includes the OpenVPN binary, settings application and tunnel module.") and I can't tap and hold my config in openvpn setting program.
And one more thing, I don't know if there is any certificate?! I couldn't find any certificate in here:
C:\Program Files\OpenVPN
and I don't know how this speedex program configures my openvpn!
AND, I don't know where I should provide the user-name and password?
I couldn't use the market without OpenVPN, too.
But I connect via WLAN to download the necessary applications and then all works fine
The certificates are in "config" in the OpenVPN Folder and there should be your config file, too.
I tried the "ln -s /bin /system/xbin/bb" command using Terminal directly on my Froyo Galaxy S i9000 and got an error: Link failed, permission denied...
What can I do to make it work?
Hi,
Maybe you should type "su" (for admin rights) before starting to link the "bin" folder.
I'll hope this will solve your problem.
Crusoe86 said:
Hi,
Maybe you should type "su" (for admin rights) before starting to link the "bin" folder.
I'll hope this will solve your problem.
Click to expand...
Click to collapse
I just noticed there is no root on my phone... I will try to figure out how to do that soon as I just bought it 2 days ago in HK but already had JP2 firmware on it.
Thanks for your fast reply!
What does any of this have to do with android development. And how is your phone not rooted?
Sent from my HTC HD2 using XDA App
chrisgto4 said:
What does any of this have to do with android development.
Click to expand...
Click to collapse
Do you mean my tutorial?
chrisgto4 said:
And how is your phone not rooted?
Sent from my HTC HD2 using XDA App
Click to expand...
Click to collapse
Maybe he means, that he/she has no su access
I rooted my phone after installing JPA and got the tun.ko from http://forum.xda-developers.com/showthread.php?t=793712&highlight=tun.ko but now I get following error:
Linux ifconfig failed: could not excecute external program
I have not found a solution to it yet... anyone?
stassano said:
I rooted my phone after installing JPA and got the tun.ko from http://forum.xda-developers.com/showthread.php?t=793712&highlight=tun.ko but now I get following error:
Linux ifconfig failed: could not excecute external program
I have not found a solution to it yet... anyone?
Click to expand...
Click to collapse
First you should install only the right modules for your Kernel.
Mostly you can download the modules together with the kernel.
Your error message could be a sign of missing busybox.
Hello Guys,
I tried to start the conf with su but at Get Config -> I become an Error Message
FATAL: Cannot allocate TUN/TAP dev dynamically
Anyone knows this Error?
greetz
Crusoe86 said:
First you should install only the right modules for your Kernel.
Mostly you can download the modules together with the kernel.
Your error message could be a sign of missing busybox.
Click to expand...
Click to collapse
busybox is installed properly, I checked it through titanium backup: root access => OK (BusyBox 1.17.1 from system)
so it should be the wrong modules I downloaded... just for my info... what modules do I need exactly? is tun.ko enough or should I add more?
stassano said:
busybox is installed properly, I checked it through titanium backup: root access => OK (BusyBox 1.17.1 from system)
so it should be the wrong modules I downloaded... just for my info... what modules do I need exactly? is tun.ko enough or should I add more?
Click to expand...
Click to collapse
Yeah tun.ko should be eaugh...
But you should install "OpenVPN Installer" from market and set the right directory to Busybox. you can set a shortcut from your busybox installation (in my case "/bin") to /system/xbin/bb (that should be available in the "OpenVPN Installer" Setup process).
You should also check if you have already a folder "bb" in "xbin" and delete it if it contains a file called "placeholder". Then all should be fine if your config is correct
mschoenknecht said:
Hello Guys,
I tried to start the conf with su but at Get Config -> I become an Error Message
FATAL: Cannot allocate TUN/TAP dev dynamically
Anyone knows this Error?
greetz
Click to expand...
Click to collapse
Check you busybox installation
Take a look in my last post
Which one is the right install dir of busybox? i can choose /bin/ and /system/xbin/
My phone is rooted BusyBox v. 1.17.1 but my VPN could not execute external program!
mschoenknecht said:
Which one is the right install dir of busybox? i can choose /bin/ and /system/xbin/
My phone is rooted BusyBox v. 1.17.1 but my VPN could not execute external program!
Click to expand...
Click to collapse
It's working...
What I've done: ?!
1. Copy my Config and Certifikates on my SDCARD
2. ln -s /bin/route /system/xbin/route
3. ln -s /bin/ifconfig /system/xbin/ifconfig
4. OpenVPN Installer -> /system/xbin
5. OpenVPN Settings -> insmod -> /system/lib/modules/tun.ko
6. The Connection is successfully establish but there is still an error when i type route (Terminal) the route which normally its pushed isn't there!
any idea??? thx a lot for ur help
Tue Oct 26 18:24:58 2010 us=37445 PUSH: Received control message: 'PUSH_REPLY,route 192.168.12.0 255.255.255.0 vpn_gateway,route 192.168.18.0 255.255.255.0 vpn_gateway,route 10.40.7.1,ping 10,ping-restart 120,ifconfig 10.40.7.6 10.40.7.5'
Tue Oct 26 18:24:58 2010 us=37811 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:1: route (2.1.1)
Tue Oct 26 18:24:58 2010 us=38146 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:2: route (2.1.1)
Tue Oct 26 18:24:58 2010 us=38391 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:3: route (2.1.1)
Tue Oct 26 18:24:58 2010 us=38726 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:6: ifconfig (2.1.1)
Tue Oct 26 18:24:58 2010 us=38940 OPTIONS IMPORT: timers and/or timeouts modified
Tue Oct 26 18:24:58 2010 us=50292 TUN/TAP device tun1 opened
Tue Oct 26 18:24:58 2010 us=50628 TUN/TAP TX queue length set to 100
Tue Oct 26 18:24:58 2010 us=51147 Initialization Sequence Completed
greez

[Q] Debug cert / My own cert will not let me grant SMS_SEND

Hi,
I wouldn't create this thread if i'm not REALLY REALLY DESPERATE..
Basically i'm writing a very simple app (a game) that sends SMS to a particular number every time a button is pressed. But the thing is I get SecurityException although I already requested it in the Manifest file. Signing with the debug keystore nor my own publisher keystore won't grant the permission.
The message from SecurityException is "Users 10036 does not have android.permission.SEND_SMS.ID = 0"
Here's my setup:
Win 7 64-bit
JDK 1.6.0_25 64-bit
Android SDK Revision 10
Eclipse Version: 3.7.0 Build id: I20110310-1119 64-bit
ADT 10.0.1
My entire project source file is available as an attachment to this post.
PLEEEEEAZZEEE... Someone save my arrrrseeee...
You need to use <uses-permission> and not <permission> in your AndroidManifest.xml.
<permission> declares a new permission, while <uses-permission> means that your application requires a certain permission.
More about <uses-permission>: http://developer.android.com/guide/topics/manifest/uses-permission-element.html
// A
I love you!!!!!
Thank you sooooooo muchhhh!!!!!!!

[Q] Setting up IntelliJ

Haya guys, I have had to start using IntelliJ to make my apps because Eclipse has been giving me the good old "R cannot be resolved to a variable" error (of witch I have done all fixes for and I still keep getting it) and I could no longer test my code using it. So i found on the internet a post suggesting to use IntelliJ, I have set it up as best as poss how ever when i click the run button, i get the following errors:
Compilation completed with 15 errors and 0 warnings
invalid resource directory name: C:\Program Files\Android\android-sdk-windows/add-ons
invalid resource directory name: C:\Program Files\Android\android-sdk-windows/docs
ect ect ect
I think i see the prob its using a "/" and not a "\" (running windows). Any I else use this program, and would be kind enough to tell me how to fix it?
(or if any knows as to why Eclipse gives that error)

[Q] Trying to generate key hash for Android Facebook with keytool

I'm still quite new to android development, but can't get the following lines of working.
I would like to create an app which can communicate with Facebook. To get some feeling with this i would like to get the standard example to work.
Which I've got uptill now:
Eclipse (Version: Helios Service Release 2) installed:
Android SDK
Facebook library.
I'm following this page: http://developers.facebook.com/docs/guides/mobile/
Where is stated that i've got to run the following lines of code:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore
| openssl sha1 -binary
| openssl base64
I found out that keytool is located in the jdk\bin folder, so in my cmd under windows 7 I go to that path but there wasn't a debug.keystore so i've signed my app so far. This works, but then it doens't recognize openssl.
Is this another program which I have to install?
Is there an easy way to run commands like above inside eclipse?
Thank you for your help!

Invite who one interest to configure/use samba server with LineageOS

I have extracted samba binary from NSTV 2019 Pro v9.0.0 rom and run it on my LineageOS 17...
The binary run and ready to serve request but I couldn't authenticate a user on it
I tried to configure smb.conf backend but not success
Can anyone contribute to make it work please?
Did you check from where the binary takes it's config file ? You must use a directory of some sort that conforms to samba (plain file or database).
If it wasn't patched, you could pass an arbitrary path as argument when starting the binary.
You could also try https://play.google.com/store/apps/details?id=com.icecoldapps.serversultimate&hl=fr&gl=US
You can also do it the other way and make the shield TV connect to an SMB share, check https://github.com/dnfm/shield_samba_rw_mounter

Categories

Resources