Announcement

Collapse
No announcement yet.

App Injector by Petrus

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • App Injector by Petrus

    For those who want to use my AppInjector for their own needs, here is the new version.
    It will be included in next versions of "barebone" Roms made by Finless Bob and whover finds it useful.

    New version : AppInjector_v1.3.0.apk

    Here is the complete changelog :

    version 1.3.0 :

    * New app icon.
    * New Menu entry : select package file to load
    * New Menu entry : create a backup package from the currently installed apps (user and system)
    * Use zip binary for android
    * Added another menu entry (zip license) to print the included zip binary license

    version 1.2.3 :

    FileSystem Utils bug fix.

    version 1.2.2 :

    Updated "Root and FileSystem Utils Internal library" : mainly a bug fix.

    version 1.2.1 :

    With new versions of SU, /system seems to be remounted Read-Only from time to time, so some apps were injected, while others were not. This new version remounts /system Read-Write before injecting every system app.


    version 1.2.0 :

    * Menus :
    - About Menu
    - Help Menu
    - Changelog Menu
    - Exit Menu
    - Reboot Menu
    * Reboot : cleanly unmount filesystems before rebooting, to avoid data corruption

    * If library file (.so) is included for an app injected in /data/app, ignore it, as it should be extracted from the apk : it is only useful for apps that are injected in /system/app

    * Temp dir moved to internal storage, so if there is no sdcard, apps installed to /data can be extracted safely before installing

    * Remount /system in read/write mode if needed.

    * supporting new apps.xml file format, as well as old apps.csv file formats.

    version 1.1.0

    * new apps.csv file format :
    - if first line is "#1", switch to new file format for apps :
    app name, file name 1 with possible spaces, file 2, ..., destination
    - if first line is "#0" or doesn't begin with a "#" character, the old file format is used

    * General fixes, for new and old file format :
    - files injected in /system/app now receive permissions as follows : rw for root and read only for others (chmod 644)

    - for files injected in /system/app : if it is a "lib file" (ie ends with ".so", it is copied in /system/lib rather than /system/app

    - safer low level commands, that can now handle package.zip file names with spaces inside name, and files inside, in new file format are now "space-proof"


    version 1.0.1

    * bug fix : reboot function didn't work

    version 1.0.0

    This is the first version featuring everything I planned for a 1.0 version. There were other versions before but I didn't have a real changelog at that time. So here are the main features of the 1.0.0 :

    * search for a file named package.zip with an "apps.csv" file inside, which describes apps that can be installed with that package
    * if files are missing inside zip, stop before installing (prevents boot loop after installing incomplete app files)
    * many bug fixes : print a warning rather than force close
    * if package.zip not found in default location, browse for a valid zip file (containing an apps.csv file)
    * after installing, prompt for reboot (if you don't reboot some apps won't show or force close)
    * cleaner parsing of apps.csv inside package.zip file
    * when installing, you can use the "back button" to stop installation after the current application.
    * If you install over a previous application, it will be overwritten.


    More information :

    * Like previous version, 2 "apps.csv" file formats are supported :

    - the old one :

    first line that will be printed to the user
    "another line, that can have comma characters in it, if you put double quotes around it, but if you want to put double quotes inside, make it like this : \", with a backslash before the doublequote char first"
    application name 1 installed as a system app, file_1.apk file_1a.apk file_1.odex,/system/app
    application name 2 installed as a user app, file_2.apk file_2.apk file_2.odex,/data/app
    "application name 3 installed as a system app, with comma in its name", file_3.apk file_3a.apk file_3.odex,/system/app
    "application name 4 installed as a user app, with comma in its name", file_4.apk file_4.apk file_4.odex,"/data/app"
    application 5, app5.apk, /system/app

    - the new one (handles spaces inside of file names, which is not possible in first format)

    #1
    first line that will be printed to the user
    "another line, that can have comma characters in it, if you put double quotes around it, but if you want to put double quotes inside, make it like this : \", with a backslash before the doublequote char first"
    application name 1 installed as a system app, file 1.apk, file 1a.apk, file 1.odex,/system/app
    application name 2 installed as a user app, file_2.apk, file_2.apk, file_2.odex,/data/app
    "application name 3 installed as a system app, with comma in its name", file 3.apk, file_3a.apk, file_3.odex,/system/app
    "application name 4 installed as a user app, with comma in its name", file_4.apk, file 4a.apk, file_4.odex,"/data/app"
    application 5, app5.apk, /system/app

    * So if the first line is "#1" the apps.csv file is parsed as a "new file format"
    * If the first line is anything else, it is parsed in the old way.

    * In the old file format, file names are separated by " "(space character) and can't contain spaces
    * in the new file format, file names can contain spaces and are separated by "," (comma character)

    * There is a new file format supported : apps.xml. It has more possibilities. I'll simply put, as an example, the apps.xml I made to replace the apps.csv in Bob's Arnova 10 G2 Gingercomb 2.2a Pro :

    apps.xml

    That's it. If you have any question, feel free to ask in this thread.
    If you have any bug reports, or requests for next version, that is the right place too.
    Don't be shy. The tool is what it is thanks to Finless Bob bug reports and requests. Your requests will make it better too

    Petrus.
    Last edited by petrus; 11-20-2012, 10:45 AM. Reason: Files now hosted on dropbox

  • #2
    This app is so awesome that I will do a video explaining it in more detail just for Petrus

    You guys this is almost better than a backup! Trust me, when you change enough stuff, a backup can mess you up!. Although Titanium backup is pretty damn good, this tool gives you FAST and very clean setups after a ROM flash! You can then edit the CSV file and make your OWN custom install!!!!!! Totally cool and I do not believe I have seen any app like it!

    My video will also discuss and explain the pros and cons of /data/app vs /system/app Injection. The difference between the 2 on boot time will BLOW you away!

    Stay tuned I will try to do it this week.

    Petrus' is the MAN and worked long hard hours on this. I am picky too so he got my pushing on him for stuff ....

    Petrus all I can say is

    Bob
    "Przebacz im, bo nie wiedzą, co czynią"
    "Прости их, ибо не ведают, что творят"
    "Perdona loro perché non sanno quello che fanno"
    "Vergib ihnen, denn sie wissen nicht, was sie tun"
    "Vergeef hen want ze weten niet wat ze doen"
    "Pardonne-leur car ils ne savent pas ce qu'ils font"
    "Perdónalos porque no saben lo que hacen"
    "Oprosti im, jer ne znaju što čine"
    "Atyám, bocsásd meg nekik, mert nem tudják mit cselekszenek!"
    "Odpusť jim, neboť nevědí, co činí"
    "Πάτερ άφες αυτοίς, ού γάρ οίδασι τί ποιούσι"
    "Ojcze, przebacz im, bo nie wiedzą, co czynią"
    "Forgive them as they know not what they do"

    Comment


    • #3
      Originally posted by Finless View Post
      This app is so awesome that I will do a video explaining it in more detail just for Petrus

      You guys this is almost better than a backup! Trust me, when you change enough stuff, a backup can mess you up!. Although Titanium backup is pretty damn good, this tool gives you FAST and very clean setups after a ROM flash! You can then edit the CSV file and make your OWN custom install!!!!!! Totally cool and I do not believe I have seen any app like it!

      My video will also discuss and explain the pros and cons of /data/app vs /system/app Injection. The difference between the 2 on boot time will BLOW you away!

      Stay tuned I will try to do it this week.

      Petrus' is the MAN and worked long hard hours on this. I am picky too so he got my pushing on him for stuff ....

      Petrus all I can say is

      Bob
      Thankyou Petrus and Bob

      Going to re flash now

      Sent from my CUBE U9GT 2 using Tapatalk
      Please consider donating to purchase tablets for Finless Bob to continue his work. This will help in the creation of custom roms and build an even stronger development base for our community. Thank you for you support!

      PLEASE CLICK THE DONATE BUTTON BELOW






      Comment


      • #4
        Thanks bob
        So I see what my next app should be
        Maybe a backup to package.zip when I have time

        But before this I will need a proper way to pick files.

        Edit: might more difficult than I thought at first. Maybe not my next app

        Originally posted by Finless View Post
        This app is so awesome that I will do a video explaining it in more detail just for Petrus

        You guys this is almost better than a backup! Trust me, when you change enough stuff, a backup can mess you up!. Although Titanium backup is pretty damn good, this tool gives you FAST and very clean setups after a ROM flash! You can then edit the CSV file and make your OWN custom install!!!!!! Totally cool and I do not believe I have seen any app like it!

        My video will also discuss and explain the pros and cons of /data/app vs /system/app Injection. The difference between the 2 on boot time will BLOW you away!

        Stay tuned I will try to do it this week.

        Petrus' is the MAN and worked long hard hours on this. I am picky too so he got my pushing on him for stuff ....

        Petrus all I can say is

        Bob
        Last edited by petrus; 04-02-2012, 11:42 PM.

        Comment


        • #5
          Very impressive guys, you have done well here. Like Bob states this will reduce the time taken to get back up and running after a re-flash. Will give it a try the next time there is an update to my tab.

          Cheers for all you hard work people.

          Blinky

          Comment


          • #6
            Thanks for saying
            Glad it can help
            This rom is really awesome.
            Glad to be a part of it

            Originally posted by blinkydamo View Post
            Very impressive guys, you have done well here. Like Bob states this will reduce the time taken to get back up and running after a re-flash. Will give it a try the next time there is an update to my tab.

            Cheers for all you hard work people.

            Blinky

            Comment


            • #7
              how to customize the package zip for app injector

              Hi guys,
              is there any info on how to customize the package zip for app injector?
              Is this being discussed elsewhere?
              Cheers
              Craig

              Comment


              • #8
                At some point I planned on doing a tutorial video but here is a simple explaination.

                1) A line with no commas is a comment line or "header" line if you will.
                2) For setting up injection for an app it is in this format
                friendly app name,xxx.apk xxx.odex etc etc,path

                So what this means is in this example. Lets say you have a simple APK called clock with no support files like .odex files needed and you want to inject them as a system app.
                clock,clock.apk,/system/app

                OK you can also "install" apps. User apps go in /data/app. So lets say you want to install say google earth. The google erath app filename you have is com.google.earth.apk and you want this as a user app since it wont work as a system app. The line would say.

                Google Earth,com.google.earth.apk,/data/app

                Ok last example. Lets say you have and APK with a support odex file. Lets say it is called global time. It runs as a system app. So you would do:

                Global Time,globaltime.apk globaltime.odex,/system/app.

                All file names you specifiy in a line MUST be in the package.zip file.

                Now just some tips. App injected as system apps do not slow down boot time. Installed apps in /data/app do slow down boot time. BUT not all apps can run as system apps. So if you inject one as a system app and it wont work as a system app, you could on next boot have boot loops or no boot at all! Or you could get constant force close messages. So just be aware of this before you inject apps into system.

                Bob
                "Przebacz im, bo nie wiedzą, co czynią"
                "Прости их, ибо не ведают, что творят"
                "Perdona loro perché non sanno quello che fanno"
                "Vergib ihnen, denn sie wissen nicht, was sie tun"
                "Vergeef hen want ze weten niet wat ze doen"
                "Pardonne-leur car ils ne savent pas ce qu'ils font"
                "Perdónalos porque no saben lo que hacen"
                "Oprosti im, jer ne znaju što čine"
                "Atyám, bocsásd meg nekik, mert nem tudják mit cselekszenek!"
                "Odpusť jim, neboť nevědí, co činí"
                "Πάτερ άφες αυτοίς, ού γάρ οίδασι τί ποιούσι"
                "Ojcze, przebacz im, bo nie wiedzą, co czynią"
                "Forgive them as they know not what they do"

                Comment


                • #9
                  Cheers for this Bob, nice one
                  Craig

                  Comment


                  • #10
                    video will answer a lot of questions like your previous tutorials.

                    Sent from my ONDA MID using Tapatalk 2

                    Comment


                    • #11
                      Originally posted by jake608 View Post
                      video will answer a lot of questions like your previous tutorials.

                      Sent from my ONDA MID using Tapatalk 2

                      +1 Bob. I hope you can get back in video mode man. You guys have not seen Bob's biggest talent and that is making instructional videos.
                      Please donate to purchase tablets for Finless Bob to continue his work. This will help in the creation of custom roms and build an even stronger development base for our community. Thank you for you support!

                      PLEASE CLICK THE DONATE BUTTON BELOW






                      Comment


                      • #12
                        Error Package file not found:

                        Hi this question is for petrus or anyone else seeing this that could help. I just recently(today down loaded Bob's newest rom for the NB7 #1211 1.5b i was able to install the rom easy & smooth as silk how ever when i down loaded the two files for the app injector the problem began, well actually the app injector downloaded and installed just fine but when i tried to open it to access the APK files to install i received this message ERROR Package file not found: please put "package zip" file on sd card ("mnt/sdcard/external_sd") and retry. Now i know in the instruction video bob provided, he did inform that these file should be installed at the root of sd card, but call me knob cause i cant figure out how to get them there. i've opened the file explorer on the rom and it wont allow me to move the files. Maybe im doing something wrong with the file explorer, but can someone walk me through.
                        thanks
                        P.S. i just reflashed the 1.5b ROM so im at square one now whats my next step?

                        Comment


                        • #13
                          Originally posted by anthonycar9 View Post
                          Hi this question is for petrus or anyone else seeing this that could help. I just recently(today down loaded Bob's newest rom for the NB7 #1211 1.5b i was able to install the rom easy & smooth as silk how ever when i down loaded the two files for the app injector the problem began, well actually the app injector downloaded and installed just fine but when i tried to open it to access the APK files to install i received this message ERROR Package file not found: please put "package zip" file on sd card ("mnt/sdcard/external_sd") and retry. Now i know in the instruction video bob provided, he did inform that these file should be installed at the root of sd card, but call me knob cause i cant figure out how to get them there. i've opened the file explorer on the rom and it wont allow me to move the files. Maybe im doing something wrong with the file explorer, but can someone walk me through.
                          thanks
                          P.S. i just reflashed the 1.5b ROM so im at square one now whats my next step?
                          The easiest way is to download the files onto your pc and extract the zip file. Take out your memory card from your tablet. Copy the two files onto your memory card using your pc, remember don't put it into a folder just straight onto the card. Safely remove your memory card from pc. Put memory card back into your tablet. Turn on tablet, now install the app injector and try again. When you use the program to install the programs you want than you need to reboot your tablet

                          Sent from my SK17i using Tapatalk 2
                          Last edited by Damo; 04-14-2012, 11:04 PM.
                          Please consider donating to purchase tablets for Finless Bob to continue his work. This will help in the creation of custom roms and build an even stronger development base for our community. Thank you for you support!

                          PLEASE CLICK THE DONATE BUTTON BELOW






                          Comment


                          • #14
                            Error Package file not found:

                            Originally posted by Damo View Post
                            The easiest way is to download the files onto your pc and extract the zip file. Take out your memory card from your tablet. Copy the two files onto your memory card using your pc, remember don't put it into a folder just straight onto the card. Safely remove your memory card from pc. Put memory card back into your tablet. Turn on tablet, now install the app injector and try again. When you use the program to install the programs you want than you need to reboot your tablet

                            Sent from my SK17i using Tapatalk 2
                            Damo for the life of me i cant figure this one out , i tried the method that you gave me step by step, i copied both files to my SD card (I delete everything on the sd card earlier in anticipation for this)from my laptop ,once on the sd card, i used winzip to unzip package file safely, removed sd card and installed it in the tablet, turned on tablet, went into file explorer, installed app injector but i opened it ,(re-read your post and maybe me openening here did it)i still got the same error messase, im going to try your method again but im just going to install app injector,unzip package on sd card, (once i copy zip to sd after unziping do i leave zip file there of delete zipped file there along with unzipped files?) reboot then go in again and try it, ill give you update when its done, BTW thanks for taking the time out to help me here you guys here on this site are awesome, i've been on some of the other forums and it has left a bad taste in my mouth, so much arrogance, and non-sense anyway enough of my ranting, again thanks to you and if BOB ever reads this ,a special thanks to you BOB for all of your patience and enormous help hell i might as well go on ahead and thank the rest of the team and dev's you guy's restore my faith in the human race for the unselfish, selfless, contributions here. OK I'll be back with update!

                            Comment


                            • #15
                              I found injecting google+ prevented syncing photos to gallery. I had to remove it with titanium, reinstall through google play, then double check the account syncing in settings. Maybe it was just a bad first install... but letting you/others know just in case

                              Google+ worked fine other than the minor issue above. And i rebooted before injecting. All other apps appear to be fine

                              Sent from my NXM726HN using Tapatalk 2

                              Comment

                              Working...
                              X