Nexus One Todo sobre la pda de Google que fabrica HTC

Respuesta
 
Herramientas
  #1  
Viejo 22/06/10, 15:33:47
Array

[xs_avatar]
anormal anormal no está en línea
Miembro del foro
 
Fecha de registro: jun 2010
Mensajes: 114

Renombrar ficheros APK automaticamente

buenas, soy nuevo en el foro, he estado leyendo hace días y descargado packs de apps de aquí de blackdroid, taringa, etc...

mi nexus tiene apena una semana y ya está completito

la idea es si hay algún programa, para Windows, que le pases un directorio con muchos ficheros .apk y el les cambie el nombre y los deje por ejemplo en este formato:

com.rerware.android.MyBackupPro.v2.4.0.apk

me parece ideal para tener las apps ordenadas y no tener ficheros repetidos, borrar versiones viejas, etc...

sería muy fácil de hacer, si no está hecho me apunto a hacerlo si alguien me pasa información de como funciona el fichero AndroidManifest.xml

saludos!
Responder Con Cita


  #2  
Viejo 25/06/10, 15:57:51
Array

[xs_avatar]
anormal anormal no está en línea
Miembro del foro
 
Fecha de registro: jun 2010
Mensajes: 114

Buenas, me autorespondo

Usando una aplicación llamada apktool 0.2 y ejecutando esto:

aapt.exe d xmltree "Touiteur Premium (1.20).apk" AndroidManifest.xml

puedo obtener esto:


 Cita:
N: android=http://schemas.android.com/apk/res/android
E: manifest (line=2)
A: android:versionCode(0x0101021b)=(type 0x10)0x20
A: android:versionName(0x0101021c)="1.20" (Raw: "1.20")
A: package="com.levelup.touiteur" (Raw: "com.levelup.touiteur")
E: application (line=5)
A: android:label(0x01010001)=@0x7f0a0000
A: android:icon(0x01010002)=@0x7f020021
A: android:name(0x01010003)="com.levelup.touiteur.Tou iteur" (Raw: "com.levelup.touiteur.Touiteur")
A: android:debuggable(0x0101000f)=(type 0x12)0x0
E: activity (line=7)
A: android:theme(0x01010000)=@0x7f0b0001
A: android:label(0x01010001)=@0x7f0a0000
A: android:name(0x01010003)=".TouiteurMain" (Raw: ".TouiteurMain")
A: android:launchMode(0x0101001d)=(type 0x10)0x2
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: intent-filter (line=9)
E: action (line=10)
A: android:name(0x01010003)="android.intent.action.MA IN" (Raw: "android.intent.action.MAIN")
E: category (line=11)
A: android:name(0x01010003)="android.intent.category. LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
E: activity (line=14)
A: android:label(0x01010001)=@0x7f0a006e
A: android:icon(0x01010002)=@0x7f020031
A: android:name(0x01010003)="TouiteurAddAccount" (Raw: "TouiteurAddAccount")
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: activity (line=16)
A: android:theme(0x01010000)=@0x103000b
A: android:label(0x01010001)=@0x7f0a0083
A: android:icon(0x01010002)=@0x7f020031
A: android:name(0x01010003)="TouiteurEditAccount" (Raw: "TouiteurEditAccount")
A: android:screenOrientation(0x0101001e)=(type 0x10)0x1
E: activity (line=19)
A: android:label(0x01010001)=@0x7f0a0087
A: android:name(0x01010003)="TouiteurPreferences" (Raw: "TouiteurPreferences")
E: activity (line=20)
A: android:label(0x01010001)=@0x7f0a007b
A: android:name(0x01010003)="TouiteurAccounts" (Raw: "TouiteurAccounts")
E: activity (line=21)
A: android:label(0x01010001)=@0x7f0a0100
A: android:name(0x01010003)="TouiteurWidgetsHelp" (Raw: "TouiteurWidgetsHelp")
A: android:screenOrientation(0x0101001e)=(type 0x10)0x1
E: intent-filter (line=22)
E: action (line=23)
A: android:name(0x01010003)="android.appwidget.action .APPWIDGET_CONFIGURE" (Raw: "android.appwidget.action.APPWIDGET_CONFIGURE" )
E: activity (line=26)
A: android:label(0x01010001)=@0x7f0a007b
A: android:name(0x01010003)="TouiteurWizard" (Raw: "TouiteurWizard")
A: android:screenOrientation(0x0101001e)=(type 0x10)0x1
E: intent-filter (line=28)
E: action (line=29)
A: android:name(0x01010003)="android.intent.action.VI EW" (Raw: "android.intent.action.VIEW")
E: category (line=30)
A: android:name(0x01010003)="android.intent.category. DEFAULT" (Raw: "android.intent.category.DEFAULT")
E: category (line=31)
A: android:name(0x01010003)="android.intent.category. BROWSABLE" (Raw: "android.intent.category.BROWSABLE")
E: data (line=32)
A: android:scheme(0x01010027)="touiteur" (Raw: "touiteur")
A: android:host(0x01010028)="callback.oauth" (Raw: "callback.oauth")
E: activity (line=35)
A: android:label(0x01010001)="About Touiteur" (Raw: "About Touiteur")
A: android:name(0x01010003)="TouiteurAbout" (Raw: "TouiteurAbout")
A: android:screenOrientation(0x0101001e)=(type 0x10)0x1
E: activity (line=37)
A: android:theme(0x01010000)=@0x103000b
A: android:name(0x01010003)="TouiteurViewLinks" (Raw: "TouiteurViewLinks")
E: activity (line=38)
A: android:label(0x01010001)=@0x7f0a0061
A: android:name(0x01010003)="TouiteurProfile" (Raw: "TouiteurProfile")
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: activity (line=39)
A: android:theme(0x01010000)=@0x103000b
A: android:label(0x01010001)=@0x7f0a00e8
A: android:name(0x01010003)="TouiteurSelectColor" (Raw: "TouiteurSelectColor")
A: android:screenOrientation(0x0101001e)=(type 0x10)0x1
E: activity (line=42)
A: android:theme(0x01010000)=@0x103000b
A: android:label(0x01010001)=@0x7f0a00e8
A: android:name(0x01010003)="TouiteurSelectBarColor" (Raw: "TouiteurSelectBarColor")
A: android:screenOrientation(0x0101001e)=(type 0x10)0x1
E: activity (line=45)
A: android:theme(0x01010000)=@0x103000b
A: android:label(0x01010001)=@0x7f0a00ea
A: android:name(0x01010003)="TouiteurClearCache" (Raw: "TouiteurClearCache")
A: android:screenOrientation(0x0101001e)=(type 0x10)0x1
E: activity (line=48)
A: android:label(0x01010001)="CuiCui Browser" (Raw: "CuiCui Browser")
A: android:name(0x01010003)="TouiteurBrowser" (Raw: "TouiteurBrowser")
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: activity (line=50)
A: android:label(0x01010001)=@0x7f0a004b
A: android:name(0x01010003)="TouiteurTweetPhotoList" (Raw: "TouiteurTweetPhotoList")
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: service (line=52)
A: android:name(0x01010003)="TouiteurService" (Raw: "TouiteurService")
E: receiver (line=53)
A: android:name(0x01010003)="TouiteurReceiver" (Raw: "TouiteurReceiver")
E: receiver (line=54)
A: android:name(0x01010003)="TouiteurIntentReceiver" (Raw: "TouiteurIntentReceiver")
E: intent-filter (line=55)
E: action (line=56)
A: android:name(0x01010003)="com.levelup.touiteur.int ent.action.CLEAR_CACHE" (Raw: "com.levelup.touiteur.intent.action.CLEAR_CACH E")
E: receiver (line=59)
A: android:name(0x01010003)="TouiteurBootReceiver" (Raw: "TouiteurBootReceiver")
E: intent-filter (line=60)
E: action (line=61)
A: android:name(0x01010003)="android.intent.action.BO OT_COMPLETED" (Raw: "android.intent.action.BOOT_COMPLETED")
E: activity (line=64)
A: android:label(0x01010001)=@0x7f0a0000
A: android:icon(0x01010002)=@0x7f020023
A: android:name(0x01010003)="LocaleSettings" (Raw: "LocaleSettings")
E: intent-filter (line=70)
E: action (line=71)
A: android:name(0x01010003)="com.twofortyfouram.local e.intent.action.EDIT_SETTING" (Raw: "com.twofortyfouram.locale.intent.action.EDIT_SETT ING")
E: receiver (line=75)
A: android:label(0x01010001)="Touiteur 4x1" (Raw: "Touiteur 4x1")
A: android:name(0x01010003)=".TouiteurSmallWidget" (Raw: ".TouiteurSmallWidget")
E: intent-filter (line=77)
E: action (line=78)
A: android:name(0x01010003)="android.appwidget.action .APPWIDGET_UPDATE" (Raw: "android.appwidget.action.APPWIDGET_UPDATE")
E: action (line=79)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.TOUITEUR_LEFTBUTTON" (Raw: "com.levelup.touiteur.action.TOUITEUR_LEFTBUTT ON")
E: action (line=80)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.TOUITEUR_MIDDLEBUTTON" (Raw: "com.levelup.touiteur.action.TOUITEUR_MIDDLEBUTTON ")
E: action (line=81)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.TOUITEUR_OPENBUTTON" (Raw: "com.levelup.touiteur.action.TOUITEUR_OPENBUTT ON")
E: action (line=82)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.REFRESH" (Raw: "com.levelup.touiteur.action.REFRESH")
E: action (line=83)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.UPDATEWIDGETS" (Raw: "com.levelup.touiteur.action.UPDATEWIDGETS")
E: meta-data (line=85)
A: android:name(0x01010003)="android.appwidget.provid er" (Raw: "android.appwidget.provider")
A: android:resource(0x01010025)=@0x7f050004
E: receiver (line=89)
A: android:label(0x01010001)="Touiteur 4x2" (Raw: "Touiteur 4x2")
A: android:name(0x01010003)=".TouiteurNormalWidget" (Raw: ".TouiteurNormalWidget")
E: intent-filter (line=91)
E: action (line=92)
A: android:name(0x01010003)="android.appwidget.action .APPWIDGET_UPDATE" (Raw: "android.appwidget.action.APPWIDGET_UPDATE")
E: action (line=93)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.TOUITEUR_LEFTBUTTON" (Raw: "com.levelup.touiteur.action.TOUITEUR_LEFTBUTT ON")
E: action (line=94)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.TOUITEUR_MIDDLEBUTTON" (Raw: "com.levelup.touiteur.action.TOUITEUR_MIDDLEBUTTON ")
E: action (line=95)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.TOUITEUR_OPENBUTTON" (Raw: "com.levelup.touiteur.action.TOUITEUR_OPENBUTT ON")
E: action (line=96)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.REFRESH" (Raw: "com.levelup.touiteur.action.REFRESH")
E: action (line=97)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.UPDATEWIDGETS" (Raw: "com.levelup.touiteur.action.UPDATEWIDGETS")
E: meta-data (line=99)
A: android:name(0x01010003)="android.appwidget.provid er" (Raw: "android.appwidget.provider")
A: android:resource(0x01010025)=@0x7f050001
E: receiver (line=103)
A: android:label(0x01010001)="Touiteur 4x3" (Raw: "Touiteur 4x3")
A: android:name(0x01010003)=".TouiteurBigWidget" (Raw: ".TouiteurBigWidget")
E: intent-filter (line=105)
E: action (line=106)
A: android:name(0x01010003)="android.appwidget.action .APPWIDGET_UPDATE" (Raw: "android.appwidget.action.APPWIDGET_UPDATE")
E: action (line=107)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.TOUITEUR_LEFTBUTTON" (Raw: "com.levelup.touiteur.action.TOUITEUR_LEFTBUTT ON")
E: action (line=108)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.TOUITEUR_MIDDLEBUTTON" (Raw: "com.levelup.touiteur.action.TOUITEUR_MIDDLEBUTTON ")
E: action (line=109)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.TOUITEUR_OPENBUTTON" (Raw: "com.levelup.touiteur.action.TOUITEUR_OPENBUTT ON")
E: action (line=110)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.REFRESH" (Raw: "com.levelup.touiteur.action.REFRESH")
E: action (line=111)
A: android:name(0x01010003)="com.levelup.touiteur.act ion.UPDATEWIDGETS" (Raw: "com.levelup.touiteur.action.UPDATEWIDGETS")
E: meta-data (line=113)
A: android:name(0x01010003)="android.appwidget.provid er" (Raw: "android.appwidget.provider")
A: android:resource(0x01010025)=@0x7f050000
E: activity (line=117)
A: android:theme(0x01010000)=@0x1030010
A: android:label(0x01010001)=@0x7f0a0000
A: android:icon(0x01010002)=@0x7f020021
A: android:name(0x01010003)="TouiteurWidgetNewTweet" (Raw: "TouiteurWidgetNewTweet")
A: android:taskAffinity(0x01010012)=":TouiteurWidgetA ctivity" (Raw: ":TouiteurWidgetActivity")
A: android:excludeFromRecents(0x01010017)=(type 0x12)0xffffffff
A: android:launchMode(0x0101001d)=(type 0x10)0x2
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: intent-filter (line=121)
E: action (line=122)
A: android:name(0x01010003)="android.intent.action.MA IN" (Raw: "android.intent.action.MAIN")
E: action (line=123)
A: android:name(0x01010003)="android.intent.action.SE ND" (Raw: "android.intent.action.SEND")
E: category (line=124)
A: android:name(0x01010003)="android.intent.category. DEFAULT" (Raw: "android.intent.category.DEFAULT")
E: data (line=125)
A: android:mimeType(0x01010026)="text/plain" (Raw: "text/plain")
E: data (line=126)
A: android:mimeType(0x01010026)="image/*" (Raw: "image/*")
E: uses-permission (line=134)
A: android:name(0x01010003)="android.permission.INTER NET" (Raw: "android.permission.INTERNET")
E: uses-permission (line=135)
A: android:name(0x01010003)="android.permission.ACCES S_COARSE_LOCATION" (Raw: "android.permission.ACCESS_COARSE_LOCATION")
E: uses-sdk (line=137)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x3
E: uses-sdk (line=138)
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x6
E: supports-screens (line=140)
A: android:anyDensity(0x0101026c)=(type 0x12)0xffffffff
A: android:smallScreens(0x01010284)=(type 0x12)0xffffffff
A: android:normalScreens(0x01010285)=(type 0x12)0xffffffff
A: android:largeScreens(0x01010286)=(type 0x12)0xffffffff
E: uses-permission (line=144)
A: android:name(0x01010003)="android.permission.WRITE _EXTERNAL_STORAGE" (Raw: "android.permission.WRITE_EXTERNAL_STORAGE")
E: uses-permission (line=145)
A: android:name(0x01010003)="android.permission.WAKE_ LOCK" (Raw: "android.permission.WAKE_LOCK")
E: uses-permission (line=146)
A: android:name(0x01010003)="android.permission.VIBRA TE" (Raw: "android.permission.VIBRATE")
E: uses-permission (line=147)
A: android:name(0x01010003)="android.permission.FLASH LIGHT" (Raw: "android.permission.FLASHLIGHT")
E: uses-permission (line=148)
A: android:name(0x01010003)="android.permission.RECEI VE_BOOT_COMPLETED" (Raw: "android.permission.RECEIVE_BOOT_COMPLETED")
E: uses-permission (line=151)
A: android:name(0x01010003)="android.permission.ACCES S_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE")
Con lo que el trabajo está medio hecho, ya puedo obtener el nombre oficial y versión de esta aplicación. Ahora solo queda hacer una pequeña app que use esa información para dar un poco de forma a los archivos.

Saludos
Responder Con Cita
  #3  
Viejo 08/08/10, 19:53:26
Array

[xs_avatar]
bitozoid bitozoid no está en línea
Usuario novato en la web
 
Fecha de registro: ago 2010
Mensajes: 1
Modelo de smartphone: Nexus One

No lo he probado demasiado pero a mí me parece que rula. Te lo detallo por pasos.

2. Te creas un directorio de trabajo. Al mío lo he llamado 'apps'. Mira que soy original.
3. Dentro te creas dos subdirectorios: 'pre' y 'post'. En 'pre' metes todos tus apks sin renombrar.
4. Te bajas el SDK de Android y con él el 'SDK Platform Android 2.2', que trae la herramienta aapt.
5. En el directorio de trabajo, creas este script. Yo lo he llamado rename_apk.sh:
Código:
#!/bin/bash

TARGETDIR=/home/bitozoid/Desktop/apps
TARGETPRE="$TARGETDIR/pre"
TARGETPOST="$TARGETDIR/post"
AAPT=/home/bitozoid/Desktop/android-sdk-linux_86/platforms/android-8/tools/aapt

pushd "$TARGETPRE"

for i in *.apk; do
    echo Procesando "$i"...
    name=`$AAPT d xmltree "$i" AndroidManifest.xml | grep "package=" | head -1 | cut -d'"' -f 2`
    echo "   Nombre:" $name
    version=`$AAPT d xmltree "$i" AndroidManifest.xml | grep versionName | head -1 | cut -d'"' -f 2`
    echo "   Version:" $version
    mv -v "$i" "$TARGETPOST/$name-$version-${i/\.apk/}.apk"
done
6. Modificas las variables de entorno del script, editándolo directamente en el fichero. En particular, modifica TARGETDIR y AAPT.
7. Ejecuta el script. Debes darle permisos de ejecución primero. Desde el directorio de trabajo y con una terminal, lo puedes hacer con
Código:
$ chmod +x rename_apk.sh
$ ./rename_apk.sh
Ya está.

PD: Olvidé el primer paso:
1. Instálate un GNU/Linux. Mejor Gentoo. Quizá consigas hacer que rule en Windows con msys. No lo he probado.
Responder Con Cita
Respuesta

Estás aquí
Regresar   Portal | Indice > Otras marcas y modelos de smartphones de venta en España > HTC > Otros modelos antiguos de HTC > Nexus One



Hora actual: 05:22:58 (GMT +1)



User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2026 DragonByte Technologies Ltd.

Contactar por correo / Contact by mail / 邮件联系 /