1. Download our Official Android App: Forums for Android!

Root Mod a mod to add custom apks preinstalled?

Discussion in 'Android Devices' started by droidzone, Sep 30, 2010.

  1. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    Hi..

    I've had problems with Gmail and Maps applications previously with Neophyte ROMs. In that case one of the solutions was removing the apks for these apps from with the /system/app folder of the ROM zip.

    My question is:
    Is it possible to add our own apks to the custom ROM so that these apks come preinstalled on the ROM when someone flashes it..in a manner, a kind of 2nd generation mod?

    Is it possible to add our own system variables and settings files so that the ROM autoinstalls it on First Install? In particular, I'd like to preset my own APN file for the network.
     

    Advertisement

  2. SUroot

    SUroot Android Expert
    1,123

    May 25, 2010
    23,925
    5,304
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    These questions may need to be asked over at xda. In regards to question 1, I tried to replace android browser with the hTC one, but that failed. I believe some .apks can be just put in there though.
     
  3. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    I too tried with some Google apks-Didnt work at all. I'm guessing there are some config variables or files that need modification. I've opened a thread at xda.
     
  4. anoniemouse

    anoniemouse Android Expert
    153

    Jul 3, 2010
    1,514
    237
    153
    Button Moon
    Would that not be possible in the kitchen over at xda?
     
  5. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    Certainly,but I'd have to rely on Paul's kitchen. I'm trying to delve into the secrets myself. To understand how we cam mod it without waiting for a build from a dev.:)
     
  6. SUroot

    SUroot Android Expert
    1,123

    May 25, 2010
    23,925
    5,304
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
  7. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    Thanks! I had opened a thread too, but the response has been rather lukewarm and not with exhaustive inputs as I'd hoped.
     
  8. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    Was hoping for an easier solution! :)

    I will.

    To unravel this, I guess I need a more thorough understanding of the installation process..of how an API call for an installation is handled..what files/file entries are modified etc.
     
  9. SUroot

    SUroot Android Expert
    1,123

    May 25, 2010
    23,925
    5,304
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    The .zip on defrost sounds like it puts it into data/app

    There is some sort of script informing clockwork what to do. I will download it and have a look.
     
  10. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    Thanks..Waiting to hear ur inputs..
     
  11. SUroot

    SUroot Android Expert
    1,123

    May 25, 2010
    23,925
    5,304
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
  12. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    Just had a look..It seems like a directory framework with files included. But the included script doesnt look like much. Leads me to think the real script if any is coded into Defrost. So this file is to be included along with the ROM installation, and is not an addon update.zip?
     
  13. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    And the script is named 'showprogress', maybe that's all that it does?
     
  14. SUroot

    SUroot Android Expert
    1,123

    May 25, 2010
    23,925
    5,304
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    It is an add on, you just flash it via defrost setup or clockworkmod

    Script is Meta-Inf\com\google\android\update-script Where did you get "show progress"?
     
  15. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    Sorry, that was the code inside the script(update-script).

    Code (Text):
    1. show_progress 0.1 0
    2.   copy_dir PACKAGE:system SYSTEM:
    3.   show_progress 0.2 10


    Guess the script does what it says,Copy the included files to update the system according to the directory structure inside the zip. Simple and effective I guess. Wonder if it's a defrost feature or common to Android.
     
  16. SUroot

    SUroot Android Expert
    1,123

    May 25, 2010
    23,925
    5,304
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    It might only work on that framework but I have no idea. Do a nandroid backup then flash from clockwork... see of it works.... would be very interesting
     
  17. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    Will try it out.. :)
     
  18. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    Tried it out on AuraxTsense..Piece of cake..Removed all the apps from the zip from /system/app, added 11 of my own, and flash updated in recovery.

    On reboot, 9 of 11 apps were installed. 2 failed, though it is possible that they were incompatible with Froyo even from start. Next, to try flashing without the Google certificates and with a skeletal framework just including the apks and paths.
     
    SUroot likes this.
  19. SUroot

    SUroot Android Expert
    1,123

    May 25, 2010
    23,925
    5,304
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
  20. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    Isn't it? There were a few posts in Xda on this in the past. Found it just now that I have a clearer picture of what I'm searching for. Used the script file as the search term and look what it turned up..

    Check this out:
    [Courtesy: www.robmcghee.com]

    I played around the file a bit before finding this post. But I've found that the signing is not really necessary. I've toggled off my signature verification, so that's probably why I didnt need it. But if signature is included, apparently any apk can be installed! :)

    Edit: There's no need to manually sign each time. If the apks are just added to the file you found, they will install. I've uploaded it for future reference.
     
  21. SUroot

    SUroot Android Expert
    1,123

    May 25, 2010
    23,925
    5,304
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    You're a star. Clockwork doesn't need signed

    I wonder how we can work out how much space we have to play with in system/app?

    Where's teppic74?
     
  22. droidzone

    droidzone Android Enthusiast
    Thread Starter
    53

    Sep 24, 2010
    436
    58
    53
    Doc
    India
    My first guess would be that it must be unlimited
     
  23. SUroot

    SUroot Android Expert
    1,123

    May 25, 2010
    23,925
    5,304
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    Actually quick system info shows system storage. I have 148MB free. May see what I can do here
     
  24. Karlohumpy

    Karlohumpy Member
    36

    Jul 29, 2010
    32
    1
    36
    So would you be able to transfer the sense camera to defrost for example.

    I tried it and failed, but admittedly I know nothing about this sort of stuff. :eek:
     
  25. SUroot

    SUroot Android Expert
    1,123

    May 25, 2010
    23,925
    5,304
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    Doubtful. I think the HTC apps may rely on the HTC kernel?
     
Tags:

Share This Page

Loading...