Mod a mod to add custom apks preinstalled?


Last Updated:

  1. droidzone

    droidzone Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    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 Well-Known Member Developer

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,304
    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 Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    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 Well-Known Member

    Joined:
    Jul 3, 2010
    Messages:
    1,514
    Likes Received:
    237
    Would that not be possible in the kitchen over at xda?
     
  5. droidzone

    droidzone Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    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 Well-Known Member Developer

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,304
  7. droidzone

    droidzone Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    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 Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    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 Well-Known Member Developer

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,304
    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 Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    Thanks..Waiting to hear ur inputs..
     
  11. SUroot

    SUroot Well-Known Member Developer

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,304
  12. droidzone

    droidzone Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    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 Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    And the script is named 'showprogress', maybe that's all that it does?
     
  14. SUroot

    SUroot Well-Known Member Developer

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,304
    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 Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    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 Well-Known Member Developer

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,304
    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 Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    Will try it out.. :)
     
  18. droidzone

    droidzone Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    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 Well-Known Member Developer

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,304
    Cool
     
  20. droidzone

    droidzone Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    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 Well-Known Member Developer

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,304
    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 Well-Known Member This Topic's Starter

    Joined:
    Sep 24, 2010
    Messages:
    436
    Likes Received:
    58
    My first guess would be that it must be unlimited
     
  23. SUroot

    SUroot Well-Known Member Developer

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,304
    Actually quick system info shows system storage. I have 148MB free. May see what I can do here
     
  24. Karlohumpy

    Karlohumpy Active Member

    Joined:
    Jul 29, 2010
    Messages:
    32
    Likes Received:
    1
    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 Well-Known Member Developer

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,304
    Doubtful. I think the HTC apps may rely on the HTC kernel?
     

Share This Page

Loading...