Tagged: hack RSS

  • bigonazzi 21:43 on 6 September 2009 Permalink | Replica
    Tags: 10.6, 64, 64bit, android, ddms, hack, , java 1.6, jvm, , sdk, snow leopard   

    Android: ddms on Snow Leopard 

    This weekend I got over my fear to update to the latest big cat: Snow Leopard. I have to say that almost everything worked smoothly. It feels like a new clean system, even tough I merely run the upgrade!

    Anyway, thanks to the new 64-bit JVM and carbon being 32-bit only, ddms tool from the Android SDK stubbornly refused to start even after half an hour of tweaking the java params. :(

    So I decided to go the hacky way (follow at your own risk):

    1. download the cocoa 64 bit version of SWT SWT (update: corrected the link)
    2. download the cocoa 64 bit versions of libswt-cocoa-3610.jnilib (download) and  libswt-pi-cocoa-3610.jnilib (download)  from  the swt 3.6M1 branch
    3. now go inside the android sdk folder and inside the tools > lib folder substitute swt.jar, libswt-carbon-3236.jnilib and libswt-pi-carbon-3236.jnilib with the corresponding version you just downloaded, having care to rename the new ones to match the old filenames

    Et voila, ddms running in 64 bit on Snow Leopard! Enjoy! ;)

    dArio

    Android ddms cocoa 64 bit

    Android ddms cocoa 64 bit, seeing is believing

    UPDATE: The new 1.6 r1 SDK is out and is using cocoa swt, but it is still trying to use the 1.5 JVM which is not working for me. :( The solution is pretty simple:

    Edit the ddms script (in /sdk-path/tools/), find the following lines:

    if [ `uname` = "Darwin" ]; then
    os_opts="-XstartOnFirstThread"
    #because Java 1.6 is 64 bits only and SWT doesn't support this, we force the usage of java 1.5
    java_cmd="/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java"
    else

    and substitute with:

    if [ `uname` = "Darwin" ]; then
    os_opts="-XstartOnFirstThread -d64"
    #because Java 1.6 is 64 bits only and SWT doesn't support this, we force the usage of java 1.5
    # java_cmd="/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java"
    java_cmd="java"
    else

    This way we use the default JVM (specified trough the Java Preferences.app) forcing the use of the 64bit version, with the -d64 (remove it to use the default or use -d32 to force 32bit)

    now export a shell variable (I do it in ~/.profile, but you can put anywhere you please) to tell ddms where to find your custom swt.jar lib. Using bash:

    export ANDROID_SWT="/path-to-custom-swt.jar/"

    Of course the architecture of your swt must match the architecture of the JVM you are using. Currently I’m using the 64 bit 1.6 JVM with the 3.6M1 swt jar (get it here).

     
  • bigonazzi 12:57 on 12 November 2008 Permalink | Replica
    Tags: binary, call forwarding, hack, , , iphone 2.2, plist   

    iPhone – Call forwarding off 

    Tutti i telefoni che ho avuto hanno la cattiva abitudine di annoiarmi con un simpatico messaggio che ti avverte che la tua chiamata potrebbe essere rediretta (“Call forwarding”). Con l’iphone il pop-up, per quanto scenografico, rompe ancora di +, perche’, rimanendo a video, lo si deve cliccare ogni volta che si vuole fare qualcosa durante una chiamata.

    Per fortuna si puo’ eliminarlo con un po’ di ssh e olio di gomito:

    trovate la destinazione del symlink /var/mobile/Library/Preferences/com.apple.carrier.plist ( nel mio caso /System/Library/Carrier Bundles/Unknown.bundle/carrier.plist ) e cambiate la chiave ShowCallForwarding in false.

    Facile no!! ;)

    dArio

    Update: dimenticavo, ho adattato la “ricetta” alla versione corrente del firmware, 2.1. Se avete un fw precedente al 1.1.4 molto probabilmente troverete il link in /var/root/… perche’ dalla versione 1.1.4 in poi apple ha deciso di cambiare l’utente con cui eseguire la maggior parte dei servizi.

    Per la cronaca la password di root dell’iphone e’ “alpine” e quella dell’utente mobile e’ “dottie”. Visto che la conoscono tutti cambiatela al piu’ presto o ricordatevi sempre di spengere il servizio SSH!! ;)

    Update 2: dopo aver aggiornato alla versione 2.2 ho provato ad modificare nuovamente il file plist. Purtroppo mi sono ritrovato con l’applicazione del telefono nn funzionante. Probabilmente è stato modicato il tipo di encoding. Proverò ad editare a mano il file (avevo usato plisteditor).

    Update 3: dopo aver riconvertito il plist in binario tutto funziona correttamente! E’ sufficiente un semplice comando da terminale (ammettendo che il file carrier.plist si trovi nella directory corrente): plutil -convert binary1 carrier.plist

     
c
scrivi un nuovo post
j
post successivo/commento successivo
k
post precedente/commento precedente
r
rispondi
e
modifica
o
mostra/nascondi commenti
t
torna a inizio pagina
l
go to login
h
show/hide help
esc
Annulla