On Device Debug!IDA+GDB trace automagic.apk in s1[success!] - Sony Tablet S

Update:yes i did it,only need is ida 6.1!(no sdk,no ndk,no jre...)
jump to HOW-TO at post #5
##################################################
Does Anybody try debug on sony tablet?
we have many unknow for the system,
eg how update file encrypt(aes key for info.xml in libautomagic_library.so),
eg,how to decode rom file(in recovery)
why not to use programer ways,debug it!
gcc a gdb-server for our device,then remote debug with ida pro
it's should be best way to learn system.
Any body try this before?static decompare is not enough!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

just know that ida 6.x include a android_server for remote debug!
my ver is 5.5,too old
will get new version and try....
by the way,find a thread about debug andriod so file with ida
http://forum.xda-developers.com/showpost.php?p=12853986&postcount=19

seems debug andriod by ida is easy to start:
1,make adb work
2,push file android_server to device(include in ida 6.1)
Code:
adb push android_server /data/local/tmp/
3,change file attrib and run it
Code:
adb shell
chmod 755 android_server
su
./android_server
here will display
Code:
IDA Android 32-bit remote debug server(ST) v1.14. Hex-Rays (c) 2004-2011
Listening on port #23946...
4,open another adb to forward network package
Code:
adb forward tcp:23946 tcp:23946
5,open ida pro on pc,debug--attach--remote android
host=loacalhost
now display
Code:
=========================================================
[1] Accepting connection from localhost(127.0.0.1)...
just test my work pc and a android phone,succeed link and attach to sh
will try on my tablet this night...
############################################################
now i'am on sony tablet s:laugh:
##########################################################
can't attached to target app!
Could not set the shlib bpt, shared object events will not be handled
B0001000: loaded /system/bin/linker
8000: process /system/bin/app_process has started (pid=4473)
Debugger: attached to process /system/bin/app_process (pid=4473)
##########################################################
http://www.woodmann.com/forum/archive/index.php/t-14714.html
The IDA 6.1 server (android_server) has problems with the Android 2.3.7 linker (system/bin/linker) so it could only hook to the Android Virtual Machine itself (Zygote) not to the linux native code thus the native code continued to run and didn't halt. Responsible for that is 'system/bin/app_process'. I replaced the binary with an Android 2.2 (Froyo) release and it worked properly then. The only downside is there is no debugger yet that provides hardware breakpoints so you cannot break at data access. You can create memory watches and break regularly to pinpoint the responsible code though.
############################################################
update 2012-12-18 17:29
so,ida 6.1 debug server not fit our 3.x/4.x os.
i need find a new version(6.3?) or use gdb server
arm version gdb server include in android ndk....

niceeeeeeeee keep on good work !

haha,goood lucking:victory:
sony update app stop at MY brekpoint!!!!
here is how:
1,push both ida debug server(android_server) and gdbserver to sony tablets
2,run android_server first,forward port 23946 to pc(android_server can't change port)
3,ida attach to app com.sony.autoupdate.ui(android debuger & port 23946)
4,attach will log some error,ingore it(and breakpoint will not stop)
5,find our target (libautomagic_library.so),in my case it at address 0x81000000
6,deattach(ida android debugger not kill target app)
7,pull libautomagic_library.so,load at base 0x81000000.set some break point
(eg,com_sony_automagic_downloader_jni_amclCheckUpdate 0x8100DD54)
8,run gdbserver,set port and target pid,forward the port
pid can get by commod "ps" in adb shell
gdb can set any port,i use 1111
9,ida attach,use remote gbd debugger and port 1111
10,let app go,check update now
if you are lucky,ida will stop at address 0x8100DD54
only don't stop tool long,in the time i write ,os kill update app for time out
this is gdb debug server in android ndk r8c
View attachment gdbserver.7z

ok,we know file info.xm is encrypt with aes 128(eaid:ENC0003)
View attachment 25_info.7z
so i set 2 break point in function "amclAesDecrypt"
as image 1
stop at break 1,
R0 is address of crypt,first 16 byte of info.xml,0x0DE80978...
R1 is output buffer,fill with 0
R2 is 3,for(eaid)
R3 is 0x10,for key/clip length
stop at break 2
R0 is return error code,0 for no error
R8 is input data(another debug,address changed)
R9 is plain,first 16 byte of xml:victory::victory:
but i still not know,where is the key:silly:
will continue tomorrow
first part of info.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<InformationFile Version="1.0" LastUpdate="2012-12-10T04:36:03Z" Noop="false">
<Extensions>
<Extension Key="ExtensionKey" Value="ExtensionValue" />
</Extensions>
<ControlConditions DefaultVariance="0" DefaultServiceStatus="open">
<ControlCondition Model="nbx03_024" Variance="0" ServiceStatus="open" />
</ControlConditions>
<ApplyConditions>
<ApplyCondition ApplyOrder="1" Force="false">
<Rules>
<Rule Type="System" Key="FirmwareVersion" Value="121116084" Operator="LessThan" />
</Rules>
<Distributions>
<Distribution ID="UpdateImageFull121116084" Version="121116084" URI="http://info.update.sony.net/ST005/nbx03_024/contents/0012/signed-nbx03_024-ota-121116084.zip" MAC="2284bf08dc9c535c1614721413f5785c56fe9369" Size="232604812" Type="" InstallType="binary" InstallParams="" />
</Distributions>
<Descriptions DefaultLang="Chinese(Simplified)">
<Description Lang="Chinese(Simplified)" Title="Sony Product Update">
<![CDATA[<displayVersion>121116084</displayVersion>
<full>true</full>
<wifionly>false</wifionly>
<battery>30</battery>
<url>http://service.sony.com.cn/st/Importance/52022.htm</url>
<desc>
2nd part not decrypt...
last part
Code:
res removed]
- Removes Favorite application
- Removes DLNA application
* You will still be able to access DLNA enabled devices within WALKMAN, Album and Movies
- Removes Throw feature within Gallery application
* You can throw photo/video using Album application
- Removes current Video Player and Music Player's apps/widgets placed on Home screen
* To be replaced by Movies and Walkman
*1 Sony Tablet(TM) S only
</desc>]]>
</Description>
</Descriptions>
</ApplyCondition>
</ApplyConditions>
</InformationFile>

whoa ! great work

Now that ida has android what exactly does it include and what can you do? can you veiw. .so libraries in reasdable form?
Sent from my Sony Tablet S using xda app-developers app

psxpetey said:
Now that ida has android what exactly does it include and what can you do? can you veiw. .so libraries in reasdable form?
Click to expand...
Click to collapse
what kind of reasdable?
in arm platform,it can only decode to asm code(win-tel can decode to c code)
it can show code in graphic view,and youc can ref to the string and variable name.
for automagic.so,ida can get most function name
show relationship of functions
xref from
xref to
when stop at breakpoint,you can see the registers value
Note:
step over of debug not works,you can use some breakpoint
when debug,you can see asm code only if the idb load base is same with inside tablet.

Well I need to add a couple things to a function in a. .so library but using 5.5 I cant figure out how. What im trying to do is add an fwrite() and fopen() to an uncompress fucntion so I can dump some unencrpted data because the original files are encrypted.
Sent from my Sony Tablet S using xda app-developers app

woow,inline patch apps!
i just a begainer of ida,trace is already hard work…

Doesn't work here. I tried on CM10 and 10.1 using built-in gdbserver and the one from NDK r8d. IDA just connects to the Java VM. The native code still runs unaffected. CM7/2.3.7 runs fine.

<robin> said:
haha,goood lucking:victory:
sony update app stop at MY brekpoint!!!!
here is how:
1,push both ida debug server(android_server) and gdbserver to sony tablets
2,run android_server first,forward port 23946 to pc(android_server can't change port)
View attachment 1612963
3,ida attach to app com.sony.autoupdate.ui(android debuger & port 23946)
View attachment 1612962
4,attach will log some error,ingore it(and breakpoint will not stop)
5,find our target (libautomagic_library.so),in my case it at address 0x81000000
View attachment 1612965
6,deattach(ida android debugger not kill target app)
7,pull libautomagic_library.so,load at base 0x81000000.set some break point
(eg,com_sony_automagic_downloader_jni_amclCheckUpdate 0x8100DD54)
View attachment 1612966
8,run gdbserver,set port and target pid,forward the port
pid can get by commod "ps" in adb shell
gdb can set any port,i use 1111
View attachment 1612968
9,ida attach,use remote gbd debugger and port 1111
View attachment 1612967
10,let app go,check update now
if you are lucky,ida will stop at address 0x8100DD54
only don't stop tool long,in the time i write ,os kill update app for time out
this is gdb debug server in android ndk r8c
View attachment 1575726
Click to expand...
Click to collapse
5) how i can find it? if i scroll (not so easy) i can find the same library at 3 address, what's the correct one? i think none, i think there is an other way to get the correct base offset (something like "info sharedlibrary" with command line but in IDA)?
EDIT: using command line gdb and info sharedlibrary i get the correct offset
7) how i can change the base offset where to load my library, there is a command or what?
EDIT: load new file, than check, manual load and set the correct offest, right?
also, i'm trying to debug liboemcamera.so, and i'm using mm-qcamera-daemon binary to debug it, but when i start gdbserver, suddenly mm-qcamera-daemon stop it by itself, and if i attach debug with IDA and resume it, it will say "running", but it stay freezed, how i can solve this problem?

pirlano said:
5) how i can find it? if i scroll (not so easy) i can find the same library at 3 address, what's the correct one? i think none, i think there is an other way to get the correct base offset (something like "info sharedlibrary" with command line but in IDA)?
EDIT: using command line gdb and info sharedlibrary i get the correct offset
7) how i can change the base offset where to load my library, there is a command or what?
EDIT: load new file, than check, manual load and set the correct offest, right?
also, i'm trying to debug liboemcamera.so, and i'm using mm-qcamera-daemon binary to debug it, but when i start gdbserver, suddenly mm-qcamera-daemon stop it by itself, and if i attach debug with IDA and resume it, it will say "running", but it stay freezed, how i can solve this problem?
Click to expand...
Click to collapse
o...something long time ago,did i realy do all this?
5>i think there is a windows called Modules in ida,it show library path/base and size
7>yes,you are right,manual load and set base
may be i done all this in 3.2.1,so if you tab is 4.0.3,
you need new gdb server for new ndk
does ida have new version?:silly:

<robin> said:
o...something long time ago,did i realy do all this?
5>i think there is a windows called Modules in ida,it show library path/base and size
7>yes,you are right,manual load and set base
may be i done all this in 3.2.1,so if you tab is 4.0.3,
you need new gdb server for new ndk
does ida have new version?:silly:
Click to expand...
Click to collapse
yes i'm using new gdb server from latest ndk
no new version for IDA
i obtain different addresses, maybe because of ASLR, this is the command to disable it:
"echo 0 > /proc/sys/kernel/randomize_va_space"
trying now if something change
EDIT: nice! with ASLR off, libraries will be loaded always at the same address
btw, solved freeze, by attaching debug and writing "cont" command on gdb in less than 1 second
but now i have ptrace: I/O error.
cannot trace, or execute instruction step by step because it will cause this error

Any solution for CM11/4.4.2 yet?

Related

Nandroid and Ubuntu 10.10 working off SD

Original thread (Thanks Martin Rhodes):
http://forum.xda-developers.com/showthread.php?t=962023 (Join up original file parts with 7zip)
Instructions
Here are direct links to complete .img file and .sh file to be placed into ubuntu folder on root of SD card (Thanks Infinimint)
http://infinimod.com/projects/fire314/ubuntu-for-android/ubuntu.img
http://infinimod.com/projects/fire314/ubuntu-for-android/ubuntu.sh
Ingredients
ubuntu.img + ubuntu.sh (to be placed in a new folder named ubuntu on the root of your SD card)
Better Terminal Emulator (or other terminal emulator) + AndroidVNC (or other VNC client) from the market
To automate one click startup process via Better Terminal Emulator:
Preferences>Initial command:
Code:
export PATH=/data/local/bin:$PATH:.
su
cd sdcard/ubuntu
sh ubuntu.sh
Or type this for each new session in any terminal emulator:
Code:
su
cd sdcard/ubuntu
sh ubuntu.sh
It says .img loading for a bit. Seems like its not doing anything...it wont confirm when its loaded (about a minute in reality)...
Then I left Terminal running in background while it said it was still loading the img (but don't let it close via task killer or otherwise), held down the hardware menu or home button to switch programs for a bit and connected in via VNC (AndroidVNC)...
address: localhost, port: 5900, and password: ubuntu ... then hit connect (login details will be saved for next time)...
its working fine software keyboard etc and at good speed. In menu options select 24bit colour, local mouse, 1:1 scaling and Touchpad only to make navigating menus much easier.
Normal phone and Android functions should be fine.
Included applications include Firefox, Thunderbird, Openoffice.org suite, GIMP Image Editor, Emacs Text Editor (geared towards programming), C and C++ build-essential, Java JDK, Python, TeXlive and TeXmaker LaTeX editor, Transmission BitTorrent Client, eVince PDF Viewer, File Manager, Terminal, Image Viewer, Leafpad Text Editor, Synaptic Package Manager and Ubuntu Software Center with all repositories enabled, SSH server, Gnash (GNU flash player for Firefox) among others.
Short press hardware menu key to get mouse options etc and longpress to bring up software keyboard (using Android VNC).
Type exit in android terminal emulator to shut down the ubuntu image.
I am using the Hyperdroid Rom off NAND, overclocked at 1.2ghz and a 16GB class 6 microsd (although it should be independent to all this... worth mentioning)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
GIMP
Here is Open Office 3.2 on the HD2 using Smart Keyboard Pro from the market.
Edit 1. I Can use my bluetooth keyboard using this nandroid rom to edit open office etc
Edit 2. I can make full screen editing on my PC monitor/TV through connecting it via USB.
HD2 USB connected to a r3610 hanging behind a 42" HDTV connected through HDMI. Using my desktop keyboard and mouse. The Mouse scroll button and right click work just as they would on desktop!
Connect via usb to PC and enable usb debugging on your phone, needs android sdk installed on PC, then you run from pc command line
Code:
adb forward tcp:5900 tcp:5900
and you should be able to create a vnc conection from your pc (recommend TightVNC) to:
Code:
127.0.0.1:5900 [U]or type[/U] localhost:5900
and use password ubuntu displayed on your monitor or TV. Wireless solution.
In fact, you can use the same method to mirror the Android system using 'Droid VNC' server from the market.
Edit 3. Can also just connect straight to the device via VNC over WIFI but its slightly slower.
Type ifconfig into lxde terminal to find WIFI address, use your desktop VNC viewer (recommend TightVNC) and password ubuntu to log in.
Edit 4. Bluetooth mouse control with cursor now works as well (but its a bit jerky), works much better with 'Remote VNC Pro' from the market selecting use external mouse.
Edit 5. Can only seem to pair bluetooth mouse and keyboard input simultaneously using BlueInput.
Edit 6. To fit whole ubuntu display area onto HD2 screen (as above) or to otherwise change screen res via LXDE terminal:
Code:
export USER=root
vncserver -geometry 800x480
Restart AndroidVNC but connect to port 5901. You can automate this process by adding it to the end of the Better Terminal Emulator Initial Command script i.e
Code:
export PATH=/data/local/bin:$PATH:.
su
cd sdcard/ubuntu
sh ubuntu.sh
export USER=root
vncserver -geometry 800x480
Just remember to connect on port 5901 instead of 5900 using VNC subsequently.
Sound Great!!!!!!!!!! Be partient \m/ Rock On!!!!!!
does usb host works?
I haven't got USB host cables etc. I am just using localhost VNC or a Java based screen mirroring app over USB.
Was alot of fun today adding effects to my photos using GIMP and creating a presentation and exporting it to PDF, all on the train! Its like a UMPC now.
do you have sound? have you tried playing some video, or youtube? how's the performance in comparison with ubuntu v0.3 running from haret?
I made an usb hub for using since i've downloaded v0.3, will try this evening to see if it works with this build.
Sound is not possible in VNC chroots as of yet. The android YouTube or music player app is only a hardware click away though. Media is well served by android anyway IMO.
WIFI is shared with the android system but theres no cellular 3G connection (I wonder if a 3G unrestrictor application could work at some point though). Could use your 3G sim in a separate phone for MIFI/WIFI routering too.
Its never going to be preferable to a native port but its almost instant in responsiveness once apps have opened. It is very quick (on my device at least).
how long to boot img?
i use android 2.2
cpu overclock 1.2
.....why doesn't it boot to VNC??
sry for my bad english
Well, I gave this a try. I guess I'm doing something wrong. It ran through all of the commands without any pause... (which seemed odd) ... and I couldn't connect through VNC. Any way to troubleshoot this?
Edit: Changed to TyphooN CyanogenMod 7 rom and it worked fine. Thanks for the link
Danation said:
Well, I gave this a try. I guess I'm doing something wrong. It ran through all of the commands without any pause... (which seemed odd) ... and I couldn't connect through VNC. Any way to troubleshoot this?
Edit: Changed to TyphooN CyanogenMod 7 rom and it worked fine. Thanks for the link
Click to expand...
Click to collapse
i did id but when use moliza
can you use keyboard
i did id but when use moliza
can you use keyboard
Click to expand...
Click to collapse
Longpress the hardware menu (windows) button to use your android software keyboard. Or use a bluetooth keyboard if your ROM supports it.
had anybody success downsizing the img with uec-resize-image, i dont need 3.5GB...
edit: 2G is to small, choosed 2500M, worked fine
I will test this soon, I hope this will work great.
i used the ubuntu.img from this thread
made:
e2fsck -f ubuntu.img
uec-resize-img ubuntu.img 2500M (2G is too small)
put it in the root folder of the sd card
used the deboot from http://forum.xda-developers.com/showthread.php?t=1029390
and put in the root of the sdcard
and changed the section
losetup /dev/block/loop5 /sdcard/debian.img
to
losetup /dev/block/loop5 /sdcard/ubuntu.img
works really fine.
creates a debian folder but that could be also changed in the deboot file
and you can call the deboot file however you want, even bootubuntu.
really great thanks.
other links, that helped me:
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
http://forum.xda-developers.com/showthread.php?t=962023&highlight=uec-resize-image
http://forum.xda-developers.com/showthread.php?t=1029390
http://forum.xda-developers.com/archive/index.php/t-744236.html
H'm worked once. But now I get invalid argument when it comes to mounting the loop
I've tried to boot ubuntu from better terminal emulator pro, but it wont...
I've only this message:
*WARNING: If you have more than 255 apps installed on the SDCard, then mounting apps on the SDCard associate with an encrypted loop device, and there are only.
You have to go to Setting -> Manage Applications -> On SDCard, and move some a.
Please wait while booting ubuntu.img.. This can take some time...*
Does anyone can explain me why ubuntu dont boot after waiting for 30 min?
EDIT: It work now, it just don't say if the loading is OK. So I was waiting for nothing...
Links not working!! it says Time Out!
GuimbardePower said:
I've tried to boot ubuntu from better terminal emulator pro, but it wont...
I've only this message:
*WARNING: If you have more than 255 apps installed on the SDCard, then mounting apps on the SDCard associate with an encrypted loop device, and there are only.
You have to go to Setting -> Manage Applications -> On SDCard, and move some a.
Please wait while booting ubuntu.img.. This can take some time...*
Does anyone can explain me why ubuntu dont boot after waiting for 30 min?
EDIT: It work now, it just don't say if the loading is OK. So I was waiting for nothing...
Click to expand...
Click to collapse
For me the same first, but then I understood the way. I get the 800x480 res .. Great work, thanks. Now I'd like only know how to try ,if possible, the KDE desktop (I don't remember the way to launch it). A great BRAVO for your WORK.
how to run a usb host?
I'm having trouble downloading from the links in the top post - it's going very slow. Any chance of a torrent link?
works ok. only problem is that it is a bit slow. plus usb keyboard and mouse doesnt work. can you help me on that ?
Cool but what about Ubuntu 11.04?

[DEV] BACKTRACK 5 on Xperia X10 chroot

==================== WIFI / WEP / WPA2 CRACKING Questions will not be answered ========
============== Already Stated many times monitor mode and packet injection is not working. ========
==================== POST 3 updated with some FAQ ===============================
==================== DETAILED INSTRUCTIONS UPDATED ===========================
==================== DOWNLOAD LINK UPDATED : Alternate Download Links ===============
========== PROJECT PAGE CREATE : http://hackomania.com/BT5/ ====================
Hi all,
Based on my work here DEVELOPMENT : Ubuntu Lucid CHROOT: updated script
I have been successful on Making Backtrack run on Xperia X10i.
Wanted to be the first one to report it so the thread here.
will start uploading the files once i get get all pieces together.
posting some screenshots for non believers.
Stay tuned for complete instructions on how to set up on X10i complete with custom scripts and all codes will be open sourced for your reference.
and this time it will be completely from gscript if you don't want to type commands.
Teaser screenshots for you.
Now will need support from the fellow developers in establishing what all tools are running fine and what not.
once i upload the image i will also post this on all social network so that we can gather as much support as possible.
File size : under 500 MB
======== FILE DOWNLOAD LINK================
DROPBOX links Bitlied for download count track
Alternate link from personal server.
Please do not create mirror : just want to keep a count on download's
PART 1 : Download Link : http://bit.ly/p1BT5
PART 2 : Download Link : http://bit.ly/BT5p2
PART 3 : Download Link : http://bit.ly/BT5p3
bt7z.001: http://www.mediafire.com/?x9cgxzdx84vc6uj
bt7z.002: http://www.mediafire.com/?xaoidipkg1o7vgo
bt7z.003: http://www.mediafire.com/?po3nznbxgvdipur
MD5 Sum : Thanks to DooMLorD
558ecb1f0e5feb1da86526df8761e6cc bt.7z.001
247842fd0d3ebb39454f76f4704d1537 bt.7z.002
f74d2f744434a7182b13287d9f8165e7 bt.7z.003
Bundle Link : http://bit.ly/iNHTS0 <- contains list of all 3 files in one bundle.
Note : uploading in one alternate location : mediafire will give its link soon.
======== Instructions =============
*********** ESSENTIALS ******************
Rooted Android. tested on 2.2 however should work on 2.1 and 1.6 also. (if you use custom rom's you meet the criteria)
Busybox configured (although it gets automatically configured @ rooting)
Android terminal application. (I use android terminal emulator)
Android VNC Viewer
********************************************
********** STEP's *************************
download all 3 parts of image and place them in single folder.
extract using first file and you will get following files
bt
bt.img
startbt
stopbt
installbt.sh
Copy these files on your phone under /sdcard/bt
using terminal emulator run following commands
Code:
su
cd /sdcard/bt
sh installbt.sh
Now your BT should be configured automatically.
to use your BackTrack you can use following commands.
startbt <- mounts and prepares the system for usage.
stopbt <- unmounts and free up all resources.
bt <- a command line version of BT chroot.
Inside bt shell.
ui <- will start vncserver (default password is 12345678, you can change it using vncpasswd command on bt shell)
killui <- stops the running vncserver.
Any Available VNC client can be used to connect to the BT GUI.
Nick : BackTrack (bt for short)
address : localhost
port : 5901
password : 12345678
inside vnc window select input mode (following works best for me)
Touch Mouse; D-Pad Pan
Mouse pointer control mode
TouchPad (here your screen works like a big touchpad use it to navigate mouse.)
*********** DO CHECK POST 3 after tonight ******************
Post 3 will be updated to be used as a catalogue of tips and tricks for all things related to this distro..
========= TIPS and TRICKS ==================
this section is for those who want to make simmilar image from base image on backtrack.
ohk so the basic challenge is
1) BacckTrack image is for Xoom and have following limitation w.r.t. Xperia X10.
a) File is 4.9 GB (vfat has limitation of 4 GB max)
b) vncserver resolution is 1280x800 per xoom.
2) installation script and setup script doesn't allow you to move in and out of BT.
3) it used loop2 for image mounting which conflicts with APP2SD.
so I have made following changes.
1) resized image to 3.3 GB (if space get filled we can extend image to upto 700 mb more.)
2) inserted my custom ui and killui code i use @ ubuntu.
3) provided startbt stopbt bt and installbt.sh scripts for all work.
4) changed loop no to 254 and hence this code is compatible with my ubuntu image effectively you can keep both in same sdcard...
I am attaching a log file for part 1 of the image work as this is very tricky.
The trick is if you create a new file of 3.3 GB you get limited set of inodes which get filled easily. so the command mke2fs must be supplied with inode numbers that you want to be build.
check attached txt for details.
============ SCREEN SHOTS =================
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
========= FAQ plus TIPS and TRICKS =====================
Q : Installbt.sh script not working properly i am recieving errors?
A: please cross check all steps if you have missed any.. otherwise post the output of error's in thread.
Q : sh installbt.sh works fine now i am getting errors in startbt or bt command.
A : please check following steps.
Try rebooting the device and see if startbt and then bt works. if still error post the error output on thread.
post output of following command
mount
echo $PATH
busybox
which busybox
Q: what is the use of all the files besides bt.img
A : Listed is the description of all files.
1) sh installbt.sh is to be only used once in liftime. till you flash a new rom.
2) startbt is to be used once after every reboot.
3) bt is command to be used everytime after first use of startbt to get command prompt.
4) stopbt is to be used when you want to stop the bt service which is running in the background.
4) and inside the [email protected] prompt you can use ui and killui command to start and stop the vncserver.
anantshri said:
Hi all,
Based on my work here DEVELOPMENT : Ubuntu Lucid CHROOT: updated script
I have been succefull on Making Backtrack run on Xperia X10i.
Wanted to be the first one to report it so the thread here.
will start uploading the files once i get get all pieces together.
posting some screenshots for non believers.
Stay tuned for complete instructions on how to set up on X10i complete with custom scripts and all codes will be open sourced for your reference.
and this time it will be completely from gscript if you don't want to type commands.
Teaser screenshots for you.
Now will need support from the fellow developers in establishing what all tools are running fine and what not.
once i upload the image i will also post this on all social network so that we can gather as much support as possible.
=========RESERVED for instructions =============
Click to expand...
Click to collapse
Nice work keep going.
Sent from my X10 TripNMiUI
Is it for real ?! Wow! Can't wait!!!
hoho it will be great
Brilliant work my friend!!!
Does it still require VNC server/client?
Does pen-testing work? What about arp poisoning and promiscus mode to gather data packets?
sent from FreeX10_beta4+CM6 settings
DooMLoRD said:
Brilliant work my friend!!!
Does it still require VNC server/client?
Does pen-testing work? What about arp poisoning and promiscus mode to gather data packets?
sent from FreeX10_beta4+CM6 settings
Click to expand...
Click to collapse
slow down buddy.... just got the image up and running tools still need to be tested.....
and ya it still needs vnc that's why still chroot.
OMG MAN! I remember asking backtrack in your thread long time back for WEP cracking!
You are the best man! I love your work!
Thank you for listening!
WOOOOOOOOOO.
Awesome work!
That is frigging awesome....
Sent from my X10project using XDA App
anantshri said:
============ SCREEN SHOTS =================
Click to expand...
Click to collapse
A true Hero to the open world!
Wow, nice work
Sent from my X10 TripNMiUI using XDA Premium App
What does that mean though. Like what will we need to do
Sent from my X10a using XDA Premium App
Sorry, but what is backtrack? Some sort of UI?
Mister J said:
Sorry, but what is backtrack? Some sort of UI?
Click to expand...
Click to collapse
"BackTrack is a GNU/Linux distribution distributed as a Live DVD aimed at digital forensics use and penetration testing."
Ref.: http://en.wikipedia.org/wiki/BackTrack
so its not a UI....
its a Debian based linux OS
Lion3494 said:
What does that mean though. Like what will we need to do
Sent from my X10a using XDA Premium App
Click to expand...
Click to collapse
I am just finished optimizing files and installation script ....
uploading soon...
file size : under shades on 700 MB....
P.S. : Backtrack has given a 1.1 GB file to download this is same with few simple tweaks.
tweaks and tips uploaded on first post...
How is the performance? Just two weeks left and then I'm done with my final exams, so after that I am going to learn more about all this chrooting and dualbooting stuff!
Well done mate!
Meikrekel said:
How is the performance? Just two weeks left and then I'm done with my final exams, so after that I am going to learn more about all this chrooting and dualbooting stuff!
Well done mate!
Click to expand...
Click to collapse
I need testers badly.... to my my baby will always run faster...
also one more tweak found that tmp folder contained framework.bz2 and msf3 decompressed folder deleted both freedup lots of inodes and now image size going down....
from 700mb of initial size i am down to < 500 MB
testing
ill test it for you what exactly is works /not?
wi-fi?

APK Manager 4.0 for Mac OSX (64-bit)

EDIT: How and why did this post end up in Atrix Q&A? That is entirely unrelated. If a mod sees this, please return this thread to it's original location at Moto Xoom Development.
After waiting for way too long to have apk manager working on OSX, (so i can do my themeing natively instead of GFX in OSX and compiling in windows/linux) I have decided to port it myself. This has only been tested on an intel-based core 2 duo mac running snow leopard 10.6.8.
Credit for original APK Manger (windows) goes to: Daneshm90
Credit for linux port which this is based off goes to: farmatito
Update: This has been superseded by one of the most excellent rewrites of an application which I have had the pleasure to use. You my find s0niqu3's great work here: http://forum.xda-developers.com/showthread.php?t=1285130
---------
And one more thing: Shout out to Team EOS!
Awesome!!!!!!!!!!!!!!!!!!!!!!!! +9999999999
What are the capabilities of this and his can i use it?
Never messed with a apk manager before but would like to
crackmulah said:
What are the capabilities of this and his can i use it?
Never messed with a apk manager before but would like to
Click to expand...
Click to collapse
Apk Manager is an "automated" environment for apktool and a couple other utilities. Together, it allows you to extract/zip/sign/decompile/recompile and otherwise change apk files. It is most widely used to change strings (sections of text) and graphics within popular apks such as framework-res.apk and SystemUI.apk (for theme development) or adobe's flash apk (for hulu support).
Wouldn't run out the box. Had to add my adb to path (might be easier just including adb in the "other" folder, as adb is resource-independent and nothing has to be installed for adb to work on a mac [Just download and run]).
The other is "sox". Seems to be a open-source command line audio converter, right? Not part of the standard OSX install. The apkmanger should either disable any sox related (It already does on reading the script), in which case it should be removed as a hard error, or include it in the other folder.
MAD Industries said:
After waiting for way too long to have apk manager working on OSX, (so i can do my themeing natively instead of GFX in OSX and compiling in windows/linux) I have decided to port it myself. This has only been tested on an intel-based core 2 duo mac running snow leopard 10.6.8.
Click to expand...
Click to collapse
Hey,
First, to the OP, Thanks for this!!!!
I had been casually working on my own port from the windows version, but now there's really no need. I've tested briefly on OSX 10.7.1, mid-2009 c2d macbook pro, 64-bit, and it seems to work great so far.
chaostic_2k1 said:
Wouldn't run out the box. Had to add my adb to path (might be easier just including adb in the "other" folder, as adb is resource-independent and nothing has to be installed for adb to work on a mac [Just download and run]).
The other is "sox". Seems to be a open-source command line audio converter, right? Not part of the standard OSX install. The apkmanger should either disable any sox related (It already does on reading the script), in which case it should be removed as a hard error, or include it in the other folder.
Click to expand...
Click to collapse
For the adb error, uhm, really? Anyone that's going to be using this should have the knowledge/ability to add adb to their path. And yeah, I know, it sounds like you were just trying to give the OP a pointer to make it idiot proof, but this really seems like the bare minimum knowledge requirement that someone should have if they're going to use a tool like this.
For anyone that doesn't know, here's one easy way (on osx there are about a million ways to add to $PATH) to add adb to your $PATH:
edit your bash profile file (create a new file if it doesn't exist yet) here: ~/.bash_profile
Add the following:
Code:
export PATH=/path/to/your/sdk/tools:$PATH
export PATH=/path/to/your/sdk/platform-tools:$PATH
(Technically only the second one is necessary for adb to function, I recommend adding them both for quick ddms access too.)
The sox issue on the other hand I can understand, since its not included with OSX. But it is simple enough to install SOX with all dependencies using macports or homebrew. If you plan on doing anything at all with android development, hacking, modding, etc., on OSX, using one of these tools is absolutely essential. I personally use homebrew, because its immensely faster than macports on my laptop, and homebrew will use OSX's default x11, python, etc. binaries, whereas macports will compile its own second copy of x11, python, etc..
for macports:
Code:
POSIXLY_CORRECT=1 sudo port install sox
for homebrew:
Code:
brew install sox
Anyway, hopefully someone finds this useful, else I'll just come back and delete the post in a few days.
Cheers
chaostic_2k1 said:
Wouldn't run out the box. Had to add my adb to path (might be easier just including adb in the "other" folder, as adb is resource-independent and nothing has to be installed for adb to work on a mac [Just download and run]).
The other is "sox". Seems to be a open-source command line audio converter, right? Not part of the standard OSX install. The apkmanger should either disable any sox related (It already does on reading the script), in which case it should be removed as a hard error, or include it in the other folder.
Click to expand...
Click to collapse
Though it is very easy to install/add adb to path, I agree that it wouldn't hurt to throw it in the other folder just in case.
As far as sox goes, i don't know many who are using apk manager for ogg files. Those who are I figured would speak up when the time came and I would work with them to come to some sort of solution. Are you getting errors from sox missing? If so, you are absolutely right that the errors should be fixed. I did take steps to disable it from the script. If i missed something, feel free to post a log and I will take care of it.
Just went through the whole installation, from installing ADB with it's own path to setting up SOX with homebrew and I gotta say, I'm a noob but I got it all done within a six pack! lol Thanks for the port mang! I can finally put away the PC to modify apk's!
All I did to "fix" it was change
Code:
# Test for needed programs and warn if missing
ERROR="0"
for PROGRAM in "optipng" "7za" "java" "sudo" "aapt" "sox" "adb"
to
Code:
# Test for needed programs and warn if missing
ERROR="0"
for PROGRAM in "optipng" "7za" "java" "sudo" "aapt" [COLOR="Red"]#[/COLOR]"sox" "adb"
Since sox isn't supported in the mac port yet (the options are not in the menu), no need to throw a fatal error, or require someone to install sox. You might just want to comment out "sox" in that line and leave adb uncommented though, since the adb commands are enabled.
As for adding adb to the package, well, it's a convenience thing. APKmanager should be a one stop shop for working with apks like that, and having adb added would help with that. I personally don't like mucking about too much with installing packages on my laptop, so I keep adb in my Applications folder, and just cd to it. And I manually run many things. I wouldn't be using APKmanager to install or pull apks anyway.
Hi again,
For anyone else that's doing their smali hacking on mac, I was seriously annoyed by the lack of syntax highlighting in my two favorite editors, Coda and SubEthaEdit, so I made my own syntax mode for them.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The screenshot is from subethaedit (notice it supports code-folding at the ".method" level, ) and is somewhat outdated, I fixed the mode already to properly hightlight all variables after parameters.
My thread for the mode on XDA is here: http://forum.xda-developers.com/showthread.php?t=1257025
or you can head straight to my blog to download them here: http://wp.me/p1JZM0-O
Cheers,
Hi again,
So I started hacking your APK manager for mac today to hopefully bring it closer in-line with the windows branch.
And first thing was simply verifying that optimize png and ogg work if you install optipng and sox, and yes, they both do. So in addition to my tip above to install sox, also install optipng:
Macports:
Code:
POSIXLY_CORRECT=1 sudo port install optipng
Homebrew:
Code:
brew install optipng
Then go into the script.sh and uncomment the relevant lines that call those functions (menu lines 2, 14, 16 and answers for opt, bopt and ogg) and comment out the removal/error lines instead.
So far I've done the easy steps, added user selectable compression level, max java heap size, batch signing support, and added the z/p/zp options for batch optimizing.
I'll try to get this all finished this weekend so somebody else can test it too, and I'll try to include at least the 64-bit optipng binary I compiled, and possibly 64-bit sox and all its dependencies too.
Cheers,
hi, i've tried this (decompile and compile Browser.apk):
http://forum.xda-developers.com/showpost.php?p=17682521&postcount=19
any ideas?
thx
maile76 said:
hi, i've tried this (decompile and compile Browser.apk):
http://forum.xda-developers.com/showpost.php?p=17682521&postcount=19
any ideas?
thx
Click to expand...
Click to collapse
Hi,
I've spent the past few days greatly improving the Mac version of APK manager. Well, really its almost a complete re-write. I've added 32-bit/64-bit all-in-one support, re-enabled old disabled features, added project support, system apk "keep" folder options, error checking, debug info, etc., etc., etc.
Really, after writing ~600+ lines of code, I can't even remember every change I've made at this point.
Anyway, I'm still testing and tweaking it multiple times a day, so I'm not really ready to release it here to the masses at XDA, but if you visit my blog, you'll find a current download link.
Until further notice though, I ask is that you please, PLEASE, don't link directly to the download, and please don't re-distribute here. If you want someone else to download my version, please just link them to this post.
I'm not trying to drive clicks or anything like that, I just don't want a billion questions about how to use my mod right now when its not finished, and is likely to change every few hours anyway.
Cheers,
Hey again,
So I'm finally happy enough with my version of APK Manager for OS X, that I released it here on XDA: http://forum.xda-developers.com/showthread.php?t=1285130
I've brought it completely up to date with the windows feature set, and exceeded it in many, MANY ways.
Cheers everyone

I cannot get ADB working PLEASE HELP

I am hoping someone on here can help me. I am seriously at wits end here. Since the upgrade of jdk to version 7 I cannot for the life of me get adb or Eclipse to work. I have tried uninstalling reinstalling multiple times. I have searched Google high and low for my errors and none of the solutions solve it. I tried using the 32 bit of jdk, still doesn't work.
I am using Windows 7 64 bit professional. I have unzipped android-sdk_r17-windows to C:\android-sdk-windows. I have installed java multiple locations updating my system variable every time. I have Eclipse in C:\Eclipse.
Here is a list of everything I tried:
1- When I tried to install SDK Tools via the exe file it gave me an error when checking for java
$(^ Name) has stopped working
I googled it couldn't find anything understandable or related to SDK.
With using the zip, it does not give me the platform-tools folder. In the adb has moved.txt file it says to run AVD Manager and SDK Manager. However when I do so all that happens is a quick flash of the command prompt then nothing.
So after researching that a bit I ran from the command prompt the following:
Code:
>CD android-sdk-windows
>CD tools
>android
Error message:
find_java.exe has stopped working.
This must be the $(^Name) error I was getting earlier.
Uninstalling 32 bit Java
2 - This time I installed Java into the default directory of C:\Program Files (x86)\Java\jdk1.7.0_03\ and C:\Program Files (x86)\Java\jre7\
SAME THING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Uninstalling 32 bit java...
3 - Installing 64 bit java again... in default location
I did not install javaFX this time idk if it makes a difference
SAME THING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I am going to try to restart my pc now..... MAYBE JUST MAYBE that'll work....
Nope...
Now when I type the command lines I get this:
Code:
C:\>cd android-sdk-windows
C:\android-sdk-windows>cd tools
C:\android-sdk-windows\tools>android
Error: Unable to access jarfile lib\archquery.jar
Invalid path
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
ERROR: SWT folder '' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platfo
rm.
My path variable is:
C:\instantclient_11_1;C:\Program Files\Java\jre7\bin;C:\windows\system32;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live; C:\Program Files (x86)\QuickTime\QTSystem\; %SystemRoot%\system32;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Calibre2\;
Instant client is for another program I use. The others were in there probably added by installing them.
Any help or suggestions that I did not do I am open to. I am in no way shape a newbie I have been theming and using ADB for 2 years. This damn update is just killing me. (I am also about to have my BS in IT so that pisses me off even more I should know this stuff!!!!!)
I know at one time Java 7 was not supported for android development, jou had to use java 6, IDK it that is still the case or not though
I think it got it working somewhat...
It is the android.bat file it is written incorrectly
Code:
rem Set SWT.Jar path based on current architecture (x86 or x86_64)
for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a
was changed to:
Code:
rem Set SWT.Jar path based on current architecture (x86 or x86_64)
for /f %%a in ('%java_exe% -jar [B]C:\android-sdk-windows\tools\[/B]lib\archquery.jar') do set swt_path=lib\%%a
But now I can't get it to connect to google using http or https
Its probably the firewall here, I am going to install it all tonight on my laptop. Then copy it all and paste it here 2morrow...
I did reinstall jre6 but I'm not sure if that makes a difference or not.
I use JRE 7 and working, but I have 32-bit Win7. The problem is, the path not set correctly.
I found this by Google, try it:
Code:
5. Add the ANDROID_SWT user variables:
5.1. Open start menu, enter sysdm.cpl into the text field and press enter.
5.2. In the opened window, select Advanced System Settings on the left.
5.3. Select Environment variables in the lower right corner.
5.4. Press the New button under the User variables windows (the top one).
5.5. Enter ANDROID_SWT in the variable name field and the path to the swt 64-bit SWT file into the variable value field. For example C:\Users\<YOUR USERNAME HERE>\android-sdk-windows\tools\lib\x86_64.
5.6. Press OK in all the windows to close them.
Source:
http://www.herikstad.net/2011/01/step-by-step-developing-android-apps-on.html
Crap I had done that like 50 times and put it in the System variables... wonder if it makes a difference.
Did you manage to get a fix for it?
Im having the same problem.
Thanks
rachelm920 said:
Crap I had done that like 50 times and put it in the System variables... wonder if it makes a difference.
Click to expand...
Click to collapse
If your still having trouble PM me. I never got thr whole Android SDK installed. I am having the identical problem you are. I tried everything I could find. Just like you. I think its just a compatibility problem with Win 7 x64. I did however set up adb to work properly. I can send you the folder with nec files. Let me know if this would help you at all.
rachelm920 said:
Crap I had done that like 50 times and put it in the System variables... wonder if it makes a difference.
Click to expand...
Click to collapse
Hello!
I actually managed to get around it. Install the 32-bit version of JDK and then download the SDK set up file (as in save it to disk). Go to where it in and open it in compatibility mode- for me i set it to Windows XP and ran the set up.
Everything installed fine and ADB works as well.
Hope that helps
I can get adb to run if I cd to the platform-tools folder in the command prompt. I know that is the path issue but I have it in there...
I downloaded all the files needed on another Windows 7 x64 machine then copied and pasted them into the folders on this machine... however when I try to create a project in Eclipse it tells me there's no SDK target, although when I open SDK Manager it tells me everything is installed.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I've been using the other PC for saving my .9 files from Eclipse then copying them back over to this machine to install. I know it sounds silly but that's the only way I got it to work.
shaz0316 said:
Hello!
I actually managed to get around it. Install the 32-bit version of JDK and then download the SDK set up file (as in save it to disk). Go to where it in and open it in compatibility mode- for me i set it to Windows XP and ran the set up.
Everything installed fine and ADB works as well.
Hope that helps
Click to expand...
Click to collapse
I wanted to add that I was having this same problem and installing in Windows XP compatibility mode also seems to have solved it for me. I think it is a problem with Windows 7 x64.
FIXED!!!!!!!!
Found the fix!!!
Delete following registry key:
HKEY_LOCAL_MACHINE\Software\JavaSoft (not in Wow6432Node)
This will work even if you install both 32bit and 64bit Java SE JDKs!
Cheers to following link:
http://stackoverflow.com/questions/...ill-not-install-crashes-when-checking-for-jdk
cheers

[Guide]TAKING A LOGCAT[ & using a ADB,DDMS]

Intro : Just made this guide for A110 section...so just wanted to share it to A116 section,...Hope this ain't a problem for you guys.
HOW TO USE ADB , DDMS & TAKING AN LOGCAT ..etc​
WHAT IS ADB???​
EXPLANATION ​
Whenever you create an android app or when you develop an Rom , it is important that you must deliver GOOD QUALITY APP or ROM , that are rid of Bugs ..Eventually you might come across a situation when your APP or ROM isn't working or it is bricking the device or some things are not working .These situation can be tackled only with a proper debugging tools ..So ADB ( android debug bridge) is a powerful Debugging tool and a tool which allows us to step through each line of code and examine the value of each variable.It offers us some of the powerful tools ..Debugging is not a big deal for the people who come from a JAVA programming background .Dalvik VM in android supports java debug wire protocol to attach to the device over ADB
Click to expand...
Click to collapse
ADB​ADB or ANDROID DEBUG BRIDGE is a command-line utility that is often used to communicate over the debug channel with a connected phone or virtual device (emulator). ADB can control your device over USB from a computer, copy files back and forth, install and uninstall apps, run shell commands, and more...
Click to expand...
Click to collapse
Click to expand...
Click to collapse
SETTING UP ADB :- ​
1) Install Java JDK :-​Before installing the Android SDK, you’ll have to install Oracle’s Java development kit. You can download it from here...(click me !!)
Even if you already have the Java runtime (JRE) installed, you’ll need to install the JDK as well.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
After installing Java JDK , you can now download the Android SDK from Google .
NOTE:- If you see a any type of Java-related error during installation, then download and install the x86 version of the JDK, not the x64 one ..
Click to expand...
Click to collapse
2) Installing android SDK:-​Download Android SDK from here...(click me !!!)
After clicking on "DOWNLOAD FOR OTHER PLATFORMS" , you will get an extended menu ..
After downloading the .exe file , then Double click on the .exe file and install it in C:\ Drive or on whichever drive you wanna install .
Click to expand...
Click to collapse
Click to expand...
Click to collapse
3) Android SDK Setup
Click to expand...
Click to collapse
Once the Android SDK is downloaded and installed, launch the SDK Manager application from your Start menu.
Enable the Android SDK tools and SDK Platform-tools checkbox and click the Install button. This downloads and installs the platform-tools package, which contains ADB and other utilities.
After installing these packages , Go to the place where you installed ANDROID SDK . IN MY CASE , IT IS :-
Code:
C:\Program files(x86)l\Android\android-sdk\platform-tools
If you used a different install location, you’ll find ADB in the platform-tools directory,inside your ANDROID-SDK directory .
Browse to platform tools and hold Shift and right-click inside it, and select Open command window here...
Click to expand...
Click to collapse
​
NOW YOU WILL SEE THIS :-
Note :- To use ADB with your Android device
USB Debugging must be turned ON in the device for ADB . Developer options is hidden in Android 4.2 and
above.To see it Hit Build number 10 times in
About Phone/Tablet reveals the menu
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Click to expand...
Click to collapse
2)You must install your device drivers :- Individual OEM USB drivers for windows are available for each manufacturer and are listed in the official document ..
After you have downloaded you device drivers, then we have to install on our pc. for that :-
a) connect the device to the computer
b) right click on MY COMPUTER and click manage
c) go to devices > other devices and right click on device and select update driver software.
d) you should see an option to " BROWSE MY COMPUTER FOR DRIVER SOFTWARE" , which you nedd to click on and point to the location of your device driver installation file..​
Click to expand...
Click to collapse
Click to expand...
Click to collapse
​
To test whether ADB is working properly, connect your Android device to your computer using a USB cable and run the following command:
Code:
adb devices
Now it will show the devices connected
Now you have sucessfully installed ADB and now we are good to go further..​
WHAT IS A LOGCAT :-​
Logcat is the command to view the internal logs of the Android system. Viewing logs is often the best way to diagnose a problem, and is required for many issues. This way you'll find out what apps are doing in the background without you noticing.
TAKING AN LOGCAT :-
Now type this in the terminal
Code:
adb logcat -v long > logcat.txt
or
Code:
Code:
adb logcat > logcat.txt
you shall have a log file called name of logcat.txt inside your ADB folder.
SOME OF THE USEFULL ADB COMMANDS :-
Code:
adb install C:\package.apk
– Installs the package located at C:\package.apk on your computer on your device.
EG -adb install G:\xda.apk
Click to expand...
Click to collapse
Code:
adb uninstall package.name
– Uninstalls the package with package.name from your device.
EG :- you’d use the name com.quoordy.xdadevelopers to uninstall the Xda developers app.
Click to expand...
Click to collapse
Code:
adb push C:\file /sdcard/file
– Pushes a file from your computer to your device. the command here pushes the file located at C:\file on your computer to /sdcard/file on your device .
EG :-adb push G:\system\framework\framework-res.apk /system/framework
Click to expand...
Click to collapse
Code:
adb pull /sdcard/file C:\file
– Pulls a file from your device to your computer – works like adb push, but in reverse. EG :-adb pull /system/app G:\rom\system\app\
Click to expand...
Click to collapse
Code:
adb logcat
– View your Android device’s log. Can be useful for debugging apps.
Click to expand...
Click to collapse
Code:
adb shell
– Gives you an interactive Linux command-line shell on your device.
Click to expand...
Click to collapse
Code:
adb shell command
– Runs the specified shell command on your device.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Click to expand...
Click to collapse
The Dalvik Debug Monitor Service (DDMS) as it is known is one of the application debugging tools that must be a part of every ANDROID app developers's toolkit..This is very very useful to the app developers.Its is a very powerful debugging tool environment and offers various unparalleled debugging features like heap information , logcat monitoring , file manager.It is available by default in ECLIPSE IDE environment or even in the ANDROID SDK.It works on top of ADB for device communication..
DDMS can be stated as a standalone application as part of ANDROID DEVICE MONITOR.The Android Device Monitor is a standalone which can be used in case you do not use the eclipse development environment , though the integration with Eclipse is something that other IDE'S could be envious of.​
HOW TO USE DDMS ??
1)AS EXPLAINED IN THE ABOVE POST , INSTALL ANDROID SDK....AFTER YOU HAVE INSTALLED PLATFORM-TOOLS & SDK TOOLS..NOW GO TO ANDROID FOLDER AND OPEN TOOLS
2)NOW RUN MONITOR.bat AS ADMINISTRATOR
3)NOW ANDROID DEBUG MONITOR WILL APPEAR ..
Now let's learn about its components and it's use's
DDMS VIEW COMPONENT'S :-​
DDMS offers a set of view components , each of which show relevant information related to the connected Emulator.
DEVICES :-
The device panel shows the details of each process that are running in the connected device.There are various operations that can be performed from this panel.
Each of the icons present in this panel performs the functions as follow's :
Debug Process Icon :- It show's the state of connection of the debugger.
Update Heap :-Clicking on this enables Heap information for the process so that we do not have to do memory deallocation manually.
Dump HPROF :- Generates a Heap Dump , useful for tracing memory leaks in your app.
Cause GC :-Invokes the Garbage collector to collect heap data.
Update thread :-Show's the information about the running thread in the thread tad for selected process
Start Method Profiling :- Tracks the metric's related a method. It collects information like the amount of time taken to execute a method,number of calls.
Stop Process :-Stops the currently selected process.
Screen Capture :- Takes a screenshot of whatever is displayed on the screen.
Reset ADB :- Ast he name suggets,it resets ADB.
THREAD'S :-​The thread tab on the right of devices view shows informatiom related to the thread for each process selected in the devices view.The information shown can described as follows.
ID :- A unique ID assigned to each thread dby Dalvik V,, which are only odd numbers that start from 3 .
Tid :-The linux thread associated with each thread , ehich matches the process ID for each main thread in a process.
Status :- Status of the thread in VM , out of daemons are marked with an asterix.other values can be among running?sleeping/init/starting.
HEAP​ :-
the heap view show a information and statistics about memory heap .To view heap usage,follow these below steps
From the devices view,select the process for heap usage which has to be examined.
click on update heap
From heap Tab , select Cause GC to enable collecting heap data
Everytime you need to update your heap statistics.This will show you the amount of memory allocated to each
ALLOCATION TRACKER​The allocation Tracker show a real time information about allocation happening in the application over a certain period of time.To enable allocation Tracking.
[*]select the process to be tracked from device panel
[*]click on start tracking from allocation tracker tab.
[*]perform any actions on the devices or emulator that you want to be tracked.
[*]click on Get Allocations objects, since tracking was enabled .
NETWORK STATISTICS​ ;-
The network tab allows you to track and optimize the amount of network data your app is using.It even allows you to tag network sockets so that you can differentiate between types of data .It will indicate the speed and amount of data received /transmitted ..
EMULATOR CONTROL :-​One problem with testing Android devices using an emulator or developer device is the fact that it is unable to examine the performance of the app in the reak world conditions . like call or SMS is received/sent or when a particular location is reached.To be specific the emulator Tab allows you to to emulate the following real world conditions :
Telephony Status :- the following options are available to set the status of phones network.
Voice :- unregistered,home,roaming,searching,denied.
Data :- unregistered,home,roaming,searching,denied.
Speed :- Full,GSM,HSCSD,GPRS,EDGE,UMTS,HSDPA.
Latency :- GPRS,UMTS
Telephony Actions :- Telephony actions allow you to spoof the network.
Location Settings ;- Emulator control allows you to sppof the location
FILE EXPLORER :-​As the name says it lets you view the directory and file structure if the device and lso easily copy files to and from the emulator so as to enable easy data transfer in a manner similiar to ADB or ADB pull command.
SYSTEM INFORMATION :-​As the name says , it give's us the particular information about the GPU load , CPU load....
DDMS HAS ALSO AN INBUILT LOGCAT VIEWER :-​
​
​
CREDITS ;-
Google for everything
paxChristos for an command line
iamareebjamal for helping me :silly:
DO PRESS THANKS BUTTON IF I HELPED ​​

Categories

Resources