Instaliranje android aplikacija na SD karticu po default-u

 

 

Počev  od verzije 2.2 android-a (Froyo) Google uvodi mogućnost da se aplikacije instaliraju i „pomere“ na SD karticu. Što se tiče pomeranja postoje razne aplikacije (APP2SD) na marketu, ali da biste mogli da ih pomerite sa memorije telefona moraju da podržavaju tu opciju.

Sa druge strane postoji način da sve aplikacije instalirate na SD karticu po default-u uz pomoć Android SDK-a. Uprkos tome da se instaliraju na SD karticu direktno, aplikacije će zauzimati i malo mesta na memoriji telefona u zavisnosti od veličine aplikacije. Widget-e nemojte instalirati na SD karticu jer neće raditi!

 

Pa da počnemo, prvo što će vam trebati jeste instaliran Android SDK koji možete skinuti ovde, a upustvo za instalaciju možete videti ovde. Upustvo sam uradio konkretno na Ubuntu tako da će slike biti u skladu sa tim, ali ću detaljno objasniti šta treba da se uradi u Windows-u.

 

Kada završite instalaciju, na telefonu je potrebno da namestite USB debugging tako što ćete otvoriti i čekirati USB debugging preko Settings > Applications > Development > USB debugging.

Povežite telefon preko USB-a, Charge Only. Ubuntu nije tražio naravno dodatne drajvere ali ako Windows traži instalirajte ih iz android-sdk/usb_driver foldera. Sledeći korak je otvaranje komand promta Ubuntu Terminal, u Windows-u  Start > Run > cmd. Pomoću cd naredbe pređite u adresa_instaliranog_andorid_sdk/tools(ili platform-tools u zavisnosti od verzije SDK-a) kao što je prikazano na sledećoj slici:

 

 

Zatim ide naredba sudo ./adb devices na Ubuntu(adb devices Windows) . Rezultat bi trebalo da bude serijski broj koji počinje sa slovom „H“ kao što je prikazano na slici:

 

 

Posle toga treba da otvorimo shell da bi izvršili komandu na telefonu, za to se koristi naredba ./adb shell Ubuntu ( adb shell Windows). Slika:

 

 

I konačno naredba kojom definišemo da sve dalje instalacije idu direktno na SD karticu telefona pm setInstallLocation 2 (isto i za Ubuntu i za Windows) i exit naredba posle toga.

 

 

To je sve. Posle ovoga možete čak da pomerite sve aplikacije, koje ranije niste mogli, na SD karticu, i instalacija svih narednih ide pravo tamo. Jedino što nećete moći da pomerite jesu aplikacije Facebook, Gmail, Flash, Youtube, Market, Google Search. Ali to nije moguće čak ni sa root-ovanim telefonom.

 

Ako budete želeli da se instalacija aplikacija vrati na memoriju telefona sve je isto samo se umesto naredbe pm setInstallLocation 2 koristi pm setInstallLocation 0 . Dobra strana ovoga jeste više mesta na memoriji telefona, loša strana jeste što telefonu treba više vremena da učita SD karticu kao fleš memoriju na kompjuteru. Takođe, vreme potrebno da aplikacije koje su na SD kartici postanu dostupne za otvaranje i korišćenje se povećava kad se upali telefon. Telefon na kome je sve ovo urađeno je HTC Desire.

 

 

 

69 CommentsLeave a comment

      • Sad sam upravo video da su promenili lokaciju u najnovijem izdanju SDK-a i da se adb nalazi sad u platform-tools folderu. Verovatno si zbog ovoga imao problema. Hvala na komentaru, update-ovao sam post. Pozdrav :-)

    • Sad sam upravo video da su promenili lokaciju u najnovijem izdanju SDK-a i da se adb nalazi sad u platform-tools folderu. Verovatno si zbog ovoga imao problema. Hvala na komentaru, update-ovao sam post. Pozdrav :-)

  • Ima lakse resenje. Sa Android marketa se skine Astro File manager. Na karticu se ubaci apk, preko citaca kartica ili ako se telefon poveze, pa se vidi kartica kao drajv. Preko Astro File managera se ode na karticu startuje apk i instalira.

    • Hm, da ali ovako svaka aplikacija koja se instalira sa marketa ide direktno na SD karticu po default-u i jos mogu da se posle prebace neke aplikacije koji pre ovoga nisu mogle. Pozdrav 😉

  • pozdrav, imam problem, kada ukucam adb devices pise samo List of devices attached ali nema nista dalje tj nema nikakvog ser broja ni na H ni na S. usb debugging mi je stikliran! Tel je LG optimus Hub

        • Meni se to desavalo samo sa linux-om kada ne izvrsim naredbu kao root sa sudo. Ali posto si probao na dva os-a izgleda da je do telefona. Jel mozes da postavis screenshot (xp ili win7) ?

          • Inace probao sam i sa samsung galaxy y na oba OS i isti slucaj! Jel moze umesto slike ovako:

            Microsoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.C:Documents and SettingsIvan Pantelic>cd..C:Documents and Settings>cd..C:>cd Program FilesC:Program Files>cd AndroidC:Program FilesAndroid>cd android-sdkC:Program FilesAndroidandroid-sdk>cd platform-toolsC:Program FilesAndroidandroid-sdkplatform-tools>adb devicesList of devices attachedC:Program FilesAndroidandroid-sdkplatform-tools>adb devicesList of devices attachedC:Program FilesAndroidandroid-sdkplatform-tools>

          • Ne vredi isto bude, a nemam nikakvu slicnu aplikaciju! Nema veze, hvala puno u svakom slucaju

          • Sad sam vec gotovo siguran da nemas neki drajver koji ti treba, probaj da instaliras drajver za lg optimus hub e510: http://www.lge.com/rs/download/mobilni-telefoni-download/LG-E510-PCsync.zip

  • sve sam uradio do : 

     

    C:Program FilesAndroidandroid-sdktools>adb shell
    Windows

    Windows: permission denied

    Šta sada ?

  • Moze li ovaj postupak i na samsung galaxy s+ (i9001)? Na njemu je android 2.3.6, imam sd karticu od 16 GB ali vece aplikacije kao sto su igrice  instalaira na internu memoriju telofona.

  • vidim da se pominju neki drajveri pa me zanima gde da nadjem drajvere, nisam dobio nikakav CD uz telefon, sta da radim?

  • uradio sam ovu stvar,ali nisam bas siguran da hoce sve da instalra na memorijsku,instalirao sam 6 aplikacija i dve su ostale na memoriji telefona,jel kad se ovo uradi mora bas svaku aplikaciju da instalira na memorijsku karticu ili ne?

  • ja sam uradio ovo na telefonu,ali meni nece svaku aplikaciju na posalje na memorijsku,one sto su vec bile pre ove radnje su i ostale na memoriji telefona,a kada sam instalirao jos 7 aplikacija 3 su octale na memoriji telefona,sta to znaci?

  • Pozdrav! … ja kad sam skinuo sdk prepravio sam ime foldera u android a u toj fascikli imam foldere sdk i eclipse…i sad kad krenem po postupcima i kucam cd android nece…i onda idem cd desktop, pa tek onda idem cd android..jel moze tako?? …i kad kucam cd tools isto nece nego idem cd pa sdk,pa onda kucam cd tools…i sad kad to uradim napisem adb devices i pise mi kao da te komande nema ili tako nesto …a pre toga sam isto radio i ukucam adb devices i izadje ono kao demon not running pa ispod pise demon started …a nema nigde koda na H ..??? i samo do ovde mi je uspelo jednom ak kad sam radio drugi put nece da mi izadje demon kad ukucam adb devices…jel moze neka sad pomoc …….IMAM Telenor One touch…ili Alcatel one touch 990 i android mi je 2.3.4 ….. i jel treba da stisnem na telefonu instaliraj ili samo da ostavim onako
    ?????????????????????????????????????? :)

      • Pa valjda imaju drajveri u telefonu,pita me kada ga povezem sa kompom kako hocu da ga povezem i ima opcija LG softer,ja mislim da je to to,a debuting mi je ukljucen..ne razumem zato nece da ga prepoznam

      • Namestio sam da mi aplikacije idu direktno na karticu..pocnu da se skidaju,skinu se i kada pocne da ih instalira,telefon mi izbacuje gresku nedovoljno memorije i aplikacija nece da se instalira,zasto sad to

      • Sve sam uradio kako treba,ali sad kada hocu da instaliram aplikaciju,tel mi izbacuje gresku da nemam dovoljno memorije zasto sad to kad imam sd od 16 gb

  • nece da mi instalira aplikacije na karticu,telefon mi izbacuje gresku GRESKA NEMA DOVOLJNO MEMORIJE

  • na komandu „sudo ./adb devices“ dobijem poruku:
    „List of devices attached

    ???????????? no permissions“

    Koristim Mint 13(Maya)

  • Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:Documents and SettingsVEJSILS>cd..

    C:Documents and Settings>cd..

    C:>cd Program FilesAndroidadt-bundle-windows-x86-20131030sdkplatform-tools

    C:Program FilesAndroidadt-bundle-windows-x86-20131030sdkplatform-tools>adb
    devices
    List of devices attached
    59EQR84TDQZSGE5T device

    C:Program FilesAndroidadt-bundle-windows-x86-20131030sdkplatform-tools>adb
    shell pm setInstallLocation 2
    Error: unknown command ‘setInstallLocation’
    usage: pm list packages [-f] [-d] [-e] [-s] [-3] [-i] [-u] [FILTER]
    pm list permission-groups
    pm list permissions [-g] [-f] [-d] [-u] [GROUP]
    pm list instrumentation [-f] [TARGET-PACKAGE]
    pm list features
    pm list libraries
    pm path PACKAGE
    pm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f]
    [–algo –key –iv ]
    PATH
    pm uninstall [-k] PACKAGE
    pm clear PACKAGE
    pm enable PACKAGE_OR_COMPONENT
    pm disable PACKAGE_OR_COMPONENT
    pm disable-user PACKAGE_OR_COMPONENT
    pm grant PACKAGE PERMISSION
    pm revoke PACKAGE PERMISSION
    pm set-install-location [0/auto] [1/internal] [2/external]
    pm get-install-location
    pm set-permission-enforced PERMISSION [true|false]

    pm list packages: prints all packages, optionally only
    those whose package name contains the text in FILTER. Options:
    -f: see their associated file.
    -d: filter to only show disbled packages.
    -e: filter to only show enabled packages.
    -s: filter to only show system packages.
    -3: filter to only show third party packages.
    -i: see the installer for the packages.
    -u: also include uninstalled packages.

    pm list permission-groups: prints all known permission groups.

    pm list permissions: prints all known permissions, optionally only
    those in GROUP. Options:
    -g: organize by group.
    -f: print all information.
    -s: short summary.
    -d: only list dangerous permissions.
    -u: list only the permissions users will see.

    pm list instrumentation: use to list all test packages; optionally
    supply to list the test packages for a particular
    application. Options:
    -f: list the .apk file for the test package.

    pm list features: prints all features of the system.

    pm path: print the path to the .apk of the given PACKAGE.

    pm install: installs a package to the system. Options:
    -l: install the package with FORWARD_LOCK.
    -r: reinstall an exisiting app, keeping its data.
    -t: allow test .apks to be installed.
    -i: specify the installer package name.
    -s: install package on sdcard.
    -f: install package on internal flash.

    pm uninstall: removes a package from the system. Options:
    -k: keep the data and cache directories around after package removal.

    pm clear: deletes all data associated with a package.

    pm enable, disable, disable-user: these commands change the enabled state
    of a given package or component (written as „package/class“).

    pm grant, revoke: these commands either grant or revoke permissions
    to applications. Only optional permissions the application has
    declared can be granted or revoked.

    pm get-install-location: returns the current install location.
    0 [auto]: Let system decide the best location
    1 [internal]: Install on internal device storage
    2 [external]: Install on external media

    pm set-install-location: changes the default install location.
    NOTE: this is only intended for debugging; using this can cause
    applications to break and other undersireable behavior.
    0 [auto]: Let system decide the best location
    1 [internal]: Install on internal device storage
    2 [external]: Install on external media

    C:Program FilesAndroidadt-bundle-windows-x86-20131030sdkplatform-tools>adb
    shell pm setInstallLocation 2
    Error: unknown command ‘setInstallLocation’
    usage: pm list packages [-f] [-d] [-e] [-s] [-3] [-i] [-u] [FILTER]
    pm list permission-groups
    pm list permissions [-g] [-f] [-d] [-u] [GROUP]
    pm list instrumentation [-f] [TARGET-PACKAGE]
    pm list features
    pm list libraries
    pm path PACKAGE
    pm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f]
    [–algo –key –iv ]
    PATH
    pm uninstall [-k] PACKAGE
    pm clear PACKAGE
    pm enable PACKAGE_OR_COMPONENT
    pm disable PACKAGE_OR_COMPONENT
    pm disable-user PACKAGE_OR_COMPONENT
    pm grant PACKAGE PERMISSION
    pm revoke PACKAGE PERMISSION
    pm set-install-location [0/auto] [1/internal] [2/external]
    pm get-install-location
    pm set-permission-enforced PERMISSION [true|false]

    pm list packages: prints all packages, optionally only
    those whose package name contains the text in FILTER. Options:
    -f: see their associated file.
    -d: filter to only show disbled packages.
    -e: filter to only show enabled packages.
    -s: filter to only show system packages.
    -3: filter to only show third party packages.
    -i: see the installer for the packages.
    -u: also include uninstalled packages.

    pm list permission-groups: prints all known permission groups.

    pm list permissions: prints all known permissions, optionally only
    those in GROUP. Options:
    -g: organize by group.
    -f: print all information.
    -s: short summary.
    -d: only list dangerous permissions.
    -u: list only the permissions users will see.

    pm list instrumentation: use to list all test packages; optionally
    supply to list the test packages for a particular
    application. Options:
    -f: list the .apk file for the test package.

    pm list features: prints all features of the system.

    pm path: print the path to the .apk of the given PACKAGE.

    pm install: installs a package to the system. Options:
    -l: install the package with FORWARD_LOCK.
    -r: reinstall an exisiting app, keeping its data.
    -t: allow test .apks to be installed.
    -i: specify the installer package name.
    -s: install package on sdcard.
    -f: install package on internal flash.

    pm uninstall: removes a package from the system. Options:
    -k: keep the data and cache directories around after package removal.

    pm clear: deletes all data associated with a package.

    pm enable, disable, disable-user: these commands change the enabled state
    of a given package or component (written as „package/class“).

    pm grant, revoke: these commands either grant or revoke permissions
    to applications. Only optional permissions the application has
    declared can be granted or revoked.

    pm get-install-location: returns the current install location.
    0 [auto]: Let system decide the best location
    1 [internal]: Install on internal device storage
    2 [external]: Install on external media

    pm set-install-location: changes the default install location.
    NOTE: this is only intended for debugging; using this can cause
    applications to break and other undersireable behavior.
    0 [auto]: Let system decide the best location
    1 [internal]: Install on internal device storage
    2 [external]: Install on external media

    C:Program FilesAndroidadt-bundle-windows-x86-20131030sdkplatform-tools>pm s
    et-install-location 2
    ‘pm’ is not recognized as an internal or external command,
    operable program or batch file.
    mozes li mi pomoci sta treba da kucam da bi izabrao sd ili external, hvala

  • Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:Documents and SettingsVEJSILS>cd..

    C:Documents and Settings>cd..

    C:>cd Program FilesAndroidadt-bundle-windows-x86-20131030sdkplatform-tools

    C:Program FilesAndroidadt-bundle-windows-x86-20131030sdkplatform-tools>adb
    devices
    List of devices attached
    59EQR84TDQZSGE5T device

    C:Program FilesAndroidadt-bundle-windows-x86-20131030sdkplatform-tools>adb
    shell pm setInstallLocation 2
    Error: unknown command ‘setInstallLocation’
    usage: pm list packages [-f] [-d] [-e] [-s] [-3] [-i] [-u] [FILTER]
    pm list permission-groups
    pm list permissions [-g] [-f] [-d] [-u] [GROUP]
    pm list instrumentation [-f] [TARGET-PACKAGE]
    pm list features
    pm list libraries
    pm path PACKAGE
    pm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f]
    [–algo –key –iv ]
    PATH
    pm uninstall [-k] PACKAGE
    pm clear PACKAGE
    pm enable PACKAGE_OR_COMPONENT
    pm disable PACKAGE_OR_COMPONENT
    pm disable-user PACKAGE_OR_COMPONENT
    pm grant PACKAGE PERMISSION
    pm revoke PACKAGE PERMISSION
    pm set-install-location [0/auto] [1/internal] [2/external]
    pm get-install-location
    pm set-permission-enforced PERMISSION [true|false]

    pm list packages: prints all packages, optionally only
    those whose package name contains the text in FILTER. Options:
    -f: see their associated file.
    -d: filter to only show disbled packages.
    -e: filter to only show enabled packages.
    -s: filter to only show system packages.
    -3: filter to only show third party packages.
    -i: see the installer for the packages.
    -u: also include uninstalled packages.

    pm list permission-groups: prints all known permission groups.

    pm list permissions: prints all known permissions, optionally only
    those in GROUP. Options:
    -g: organize by group.
    -f: print all information.
    -s: short summary.
    -d: only list dangerous permissions.
    -u: list only the permissions users will see.

    pm list instrumentation: use to list all test packages; optionally
    supply to list the test packages for a particular
    application. Options:
    -f: list the .apk file for the test package.

    pm list features: prints all features of the system.

    pm path: print the path to the .apk of the given PACKAGE.

    pm install: installs a package to the system. Options:
    -l: install the package with FORWARD_LOCK.
    -r: reinstall an exisiting app, keeping its data.
    -t: allow test .apks to be installed.
    -i: specify the installer package name.
    -s: install package on sdcard.
    -f: install package on internal flash.

    pm uninstall: removes a package from the system. Options:
    -k: keep the data and cache directories around after package removal.

    pm clear: deletes all data associated with a package.

    pm enable, disable, disable-user: these commands change the enabled state
    of a given package or component (written as „package/class“).

    pm grant, revoke: these commands either grant or revoke permissions
    to applications. Only optional permissions the application has
    declared can be granted or revoked.

    pm get-install-location: returns the current install location.
    0 [auto]: Let system decide the best location
    1 [internal]: Install on internal device storage
    2 [external]: Install on external media

    pm set-install-location: changes the default install location.
    NOTE: this is only intended for debugging; using this can cause
    applications to break and other undersireable behavior.
    0 [auto]: Let system decide the best location
    1 [internal]: Install on internal device storage
    2 [external]: Install on external media

    C:Program FilesAndroidadt-bundle-windows-x86-20131030sdkplatform-tools>adb
    shell pm setInstallLocation 2
    Error: unknown command ‘setInstallLocation’
    usage: pm list packages [-f] [-d] [-e] [-s] [-3] [-i] [-u] [FILTER]
    pm list permission-groups
    pm list permissions [-g] [-f] [-d] [-u] [GROUP]
    pm list instrumentation [-f] [TARGET-PACKAGE]
    pm list features
    pm list libraries
    pm path PACKAGE
    pm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f]
    [–algo –key –iv ]
    PATH
    pm uninstall [-k] PACKAGE
    pm clear PACKAGE
    pm enable PACKAGE_OR_COMPONENT
    pm disable PACKAGE_OR_COMPONENT
    pm disable-user PACKAGE_OR_COMPONENT
    pm grant PACKAGE PERMISSION
    pm revoke PACKAGE PERMISSION
    pm set-install-location [0/auto] [1/internal] [2/external]
    pm get-install-location
    pm set-permission-enforced PERMISSION [true|false]

    pm list packages: prints all packages, optionally only
    those whose package name contains the text in FILTER. Options:
    -f: see their associated file.
    -d: filter to only show disbled packages.
    -e: filter to only show enabled packages.
    -s: filter to only show system packages.
    -3: filter to only show third party packages.
    -i: see the installer for the packages.
    -u: also include uninstalled packages.

    pm list permission-groups: prints all known permission groups.

    pm list permissions: prints all known permissions, optionally only
    those in GROUP. Options:
    -g: organize by group.
    -f: print all information.
    -s: short summary.
    -d: only list dangerous permissions.
    -u: list only the permissions users will see.

    pm list instrumentation: use to list all test packages; optionally
    supply to list the test packages for a particular
    application. Options:
    -f: list the .apk file for the test package.

    pm list features: prints all features of the system.

    pm path: print the path to the .apk of the given PACKAGE.

    pm install: installs a package to the system. Options:
    -l: install the package with FORWARD_LOCK.
    -r: reinstall an exisiting app, keeping its data.
    -t: allow test .apks to be installed.
    -i: specify the installer package name.
    -s: install package on sdcard.
    -f: install package on internal flash.

    pm uninstall: removes a package from the system. Options:
    -k: keep the data and cache directories around after package removal.

    pm clear: deletes all data associated with a package.

    pm enable, disable, disable-user: these commands change the enabled state
    of a given package or component (written as „package/class“).

    pm grant, revoke: these commands either grant or revoke permissions
    to applications. Only optional permissions the application has
    declared can be granted or revoked.

    pm get-install-location: returns the current install location.
    0 [auto]: Let system decide the best location
    1 [internal]: Install on internal device storage
    2 [external]: Install on external media

    pm set-install-location: changes the default install location.
    NOTE: this is only intended for debugging; using this can cause
    applications to break and other undersireable behavior.
    0 [auto]: Let system decide the best location
    1 [internal]: Install on internal device storage
    2 [external]: Install on external media

    C:Program FilesAndroidadt-bundle-windows-x86-20131030sdkplatform-tools>pm s
    et-install-location 2
    ‘pm’ is not recognized as an internal or external command,
    operable program or batch file.
    pomozi mi molim te

  • Igrom slucaja slucajno sam primetila da u opciji aps i neka aplikacija koja se otvori ne postoji opcija move to sd card. Da li neko ima slicnih problema? Hvala unapred! Pozdrav!

  • Pozdrav. Kada ukucam -adb devices- (imam windows 7 64bit) izbaci mi
    -6ho3c89c unauthorized- Kod vas lepo pise -device- a kod mene ovo
    -unauthorized-. To je problem jer posle kad ukucam -adb shell- on izbaci

    -error:device unauthorized. Please check the confirmation dialog on your
    device- Molim za pomoc!!! Ocigledno imam najgluplji telefon Experia e1,
    koji ne podrzava prebacivanje na sd karticu. hvala unapred