How to Hide & Protect API Keys in Your Android App (Reverse Engineering)

Поделиться
HTML-код
  • Опубликовано: 26 ноя 2024
  • To make sure only you can access your app's API keys, you need to follow some guidelines. In this video I'll show you what these are.
    ⭐ Get certificates for your future job
    ⭐ Save countless hours of time
    ⭐ 100% money back guarantee for 30 days
    ⭐ Become a professional Android developer now:
    pl-coding.com/...
    💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future:
    elopage.com/s/...
    🎓 Become an industry-ready developer in the Mobile Dev Campus:
    pl-coding.com/...
    🎁 Get my FREE 4.5h course "The Best Practice Guide to Android Architecture":
    pl-coding.com/...
    Read our weekly Android blog:
    pl-coding.com/...
    Join this channel to get access to perks:
    / @philipplackner
    Join my Discord server:
    / discord
    Regular programming advice on my Instagram page: / _philipplackner_
    Checkout my GitHub: github.com/phi...
    You like my free content? Here you can buy me a coffee:
    www.buymeacoff...

Комментарии • 163

  • @MarcosValenzuela-j6e
    @MarcosValenzuela-j6e Месяц назад +1

    Nice video, but when decompiling the apk you can still get those values ​​from the BuildConfig file

  • @atulkumar-bb7vi
    @atulkumar-bb7vi Год назад +2

    We can also Android NDK enviornment where we use c or c++ files, which are directly compiled to binary code. That is the best way to keep any confidential data on client side..

    • @ViktorYakunin
      @ViktorYakunin 9 месяцев назад +1

      like you want to write to file using C++, how is this even different from java? or maybe you think that hardcoding C++ value and providing interface for java is something really hard? Open that binary file with text editor and you will find your key in 5 seconds

  • @ABCABC-sw8mh
    @ABCABC-sw8mh 7 месяцев назад +2

    why using the api key directly in the code? you can just send a request to your own server that handles the api key and asks the api

    • @PhilippLackner
      @PhilippLackner  7 месяцев назад +2

      Because lots of APIs don't work that way. For example the Google maps sdk for Android expects the key to be merged into the manifest. Also you still need to protect the server then, since what would keep an attacker back from making the same request?

  • @karentechnologies3990
    @karentechnologies3990 Год назад +1

    Just keep appending new videos like this one to your android security playlist.

  • @PassionforTechnology
    @PassionforTechnology Год назад +4

    hey buddy please update this video as kotlin is introduced as buildgradle lang and it's not working thhere

  • @al1gned
    @al1gned 2 года назад +3

    Thank you soo much for this as I was actually looking for something like this like yesterday and see it come from you is really satisfying :))

  • @hdkloh6857
    @hdkloh6857 2 года назад +3

    Thanks for sharing, It is a common interview question...

  • @sharmpuneet
    @sharmpuneet 2 года назад

    Thanks for considering my comment and making the video

  • @augustocera574
    @augustocera574 2 года назад +2

    Thank you very much Philipp. I have struggled a lot with this issue. Now "we" solved it :P

  • @myfavourites6383
    @myfavourites6383 2 года назад +8

    Hey Mate,
    Protecting Api keys from server is better option that this since generated build config file will expose all the keys.
    One more option we have is using CMake

  • @ubersticks
    @ubersticks Год назад +3

    The "buildConfigField" causes an error with newer versions of Gradle and Android Studio: "Build Type contains custom BuildConfig fields, but the feature is disabled". You can fix this by adding
    android {
    ...
    buildFeatures {
    ...
    buildConfig = true
    }
    }

    • @LabGecko
      @LabGecko Год назад

      Just ran into this myself. To be clear for others, that code goes in the App level build.gradle file, listed in Android Studio Giraffe as build.gradle( :app)

  • @ahoangnguyen6745
    @ahoangnguyen6745 2 года назад +2

    I did a research on protecting the API key.
    with how on results you are very good. However, when the hacker gets your APK file, they will easily decompile the encrypted and get the API key easily.
    Currently, I find the best solution is to save the API key in a native C++ class or create a secure server that provides the API key

    • @PhilippLackner
      @PhilippLackner  2 года назад

      Option 1 can still be decompiled. Any api key can be found if someone really wants it

  • @raheemadamboev
    @raheemadamboev 2 года назад +3

    Thanks bro, much love❤

  • @ThEGeEeK
    @ThEGeEeK 2 года назад +1

    What you know I have done !! . The scarry part is that how easy is that !!! .Mailed to the concerned person.

  • @aurinkobay7118
    @aurinkobay7118 Год назад +4

    hey people does anyone know which import goes into 4:08? Properties properties = new Properties() thnx
    I get
    Properties properties = new Properties()
    1st Properties has error Classifier 'Properties' does not have a companion object, and thus must be initialized here
    equal sign has red underline
    new Properties() - Properties ()
    Properties properties = new Properties()
    properties.load(project.rootProject.file("local.properties").newDataInputStream())
    buildConfigField("String", "ARC_API_KEY", "\"${properties.getProperty("ARCMAP_API_KEY")}\""
    load is red -Unresolved reference: load
    newDataInputStream() - Unresolved reference: newDataInputStream
    properties.getProperty - getProperty is red underline
    I am so lost it is not even funny ... thanx!

    • @naveenshah8032
      @naveenshah8032 Год назад +1

      hey did you solved the error

    • @BCS_AAMIRASHRAF
      @BCS_AAMIRASHRAF 6 месяцев назад +2

      //protect api key
      val properties=Properties()
      properties.load(project.rootProject.file("local.properties").inputStream())
      buildConfigField ("String","API_KEY","\"${properties.getProperty("API_KEY")}\"")
      buildFeatures{
      viewBinding=true
      buildConfig = true
      }
      //hope the error got resolved

  • @harwinderbenipal5332
    @harwinderbenipal5332 Год назад +3

    Hi, How do we use this in manifest file?

  • @DominikSchulzNeristance
    @DominikSchulzNeristance 2 года назад +3

    One Addition, I think you stated it already in some comments this will just make it harder one that does want to find the key will find it for sure. However, even without decompiling an attacker will in first place just try to use a proxy e.g. Charles proxy maybe and check the requests if you do not use certificate pinning. I like your content but people may take it for the bulletproof solution because they may not listen carefully. And yes for 3rd party Apis its cool if you can have the key on your servers and enforce user authentication as well so no one unwanted may talk to your API 👍

    • @PhilippLackner
      @PhilippLackner  2 года назад +4

      I think I stressed out multiple times that keeping an api key in the app is not 100% safe 🤔

    • @dmitriymorozov2680
      @dmitriymorozov2680 Год назад

      ​@@PhilippLackner keeping your API keys on the server requires you to have some kind of jwt token to be obtained and stored locally. Isn't that an issue storing it in sharedPrefs, protoStore, sqlite? (Even using encrypted storage)

    • @dmitriymorozov2680
      @dmitriymorozov2680 Год назад +1

      You still have to store say sqlcipher password somewhere in your compiled app in order to encrypt and decrypt sqlite database. And decompiled app will show this password.
      Maybe we can obtain jwt+sqlcipher pass on login session and store sclcipher password in encrypted sharedprefs to read/write encrypted sql? As far as I know encrypted sharedPrefs store its keys in OS protected storage

    • @LabGecko
      @LabGecko Год назад

      It amazes me that Google has not yet implemented an encrypted storage standard into Android Studio. This issue shouldn't be an us problem if we're using Android Studio to build apps for Google's ecosystem.

  • @clarkkent1473
    @clarkkent1473 Год назад

    Additionally one could via smalli, painstakingly attempt to log every variable, function parameters, and return value (similar to strace), and thus attempt to locate api-key-like values by inspecting the output

  • @quantumgaming7
    @quantumgaming7 3 месяца назад

    Hi Phillip you can make updated version of this video with google security plugin

  • @pixamob8452
    @pixamob8452 2 года назад +11

    It's okay to use the application signature as an additional key and check it on the server side to ensure that the request is coming from my application

    • @PhilippLackner
      @PhilippLackner  2 года назад +3

      Exactly

    • @shlusiak
      @shlusiak 2 года назад +11

      What stops an attacker to just send the right signature from a modified version of your app? You can't trust the client.

    • @moustafaelsaghier8552
      @moustafaelsaghier8552 2 года назад

      Can you tell me more about this approach please?

    • @dmitriymorozov2680
      @dmitriymorozov2680 Год назад

      I would want to hear that approach too

    • @OlafJapp
      @OlafJapp Год назад +2

      If you use a application signature you can reuse that in a replay attack (sending the same signature from an attacker app).

  • @dev_jeongdaeri
    @dev_jeongdaeri 2 года назад +1

    Thanks!😍

  • @hansheng654
    @hansheng654 2 года назад +4

    Api key shouldn't be used as authentication anyway. They are for authorisation. You should still be authenticated otherwise like oauth and perhaps retrieve the key from server dynamically.

    • @llothar68
      @llothar68 Год назад

      How should this be a difference? Technically it’s the same problem

  • @haykmkrtchyan7093
    @haykmkrtchyan7093 2 года назад

    Great one, I do it in this way too, except I create my own properties file for that api key.

  • @deepakbisht4957
    @deepakbisht4957 2 года назад +2

    I hide my key in native c code as it contains garbage value and it's hard to access key from it. And I just don't put my key as it is... I always break the key in may parts and add some more symbols in it to make it harder after try to extract it from reverse engineered extracted APK...

  • @ekennechilex2390
    @ekennechilex2390 2 года назад +1

    What about in the case of SSL Pinning. How do you safe secure your certificate public key on the app since the app needs it to authenticate the data

  • @SurazVerma
    @SurazVerma 2 года назад +6

    Hey Phillip, I've been using this approach for saving the API keys, but in a modular architecture is there a way to pass these values to the specific module (let's say in layered modular architecture in where you set your network config in one of the layers).

    • @Koki-hq1yc
      @Koki-hq1yc 10 месяцев назад

      Did you solve this issue. I have same question

    • @SurazVerma
      @SurazVerma 10 месяцев назад

      @@Koki-hq1yc unfortunately I couldn’t find any solution yet

  • @sumit_soni
    @sumit_soni 2 года назад +1

    Thanks a lot Phillip ❤️💯💯

  • @Naresh-dev-angular-dotnet
    @Naresh-dev-angular-dotnet 2 года назад

    good one Phillippuh , make a video series for API integration in android

  • @sellychandan
    @sellychandan 5 месяцев назад

    Thanks for the video, I have two doubts about how we will handle The project is in CICD and when we are working as a team. in both cases we are not sharing the git ignore

    • @BillMote
      @BillMote Месяц назад

      You can set your keys as environment variables and include them in (almost) the same way as is shown in this video. That keeps them out of source control, works with local builds, but also allows you to set environment variables as configuration options in your CICD solution.

  • @MenaSamer
    @MenaSamer 2 года назад

    it will be good to add more videos about that topic

    • @PhilippLackner
      @PhilippLackner  2 года назад +1

      What is still unclear?

    • @MenaSamer
      @MenaSamer 2 года назад

      @@PhilippLackner everything is clear for me, I mean more tips about security as you mentioned at the end of the video

  • @alvarorafaelalcobamiranda6256
    @alvarorafaelalcobamiranda6256 Год назад

    i love the explication, one fan more :)

  • @tmjromao
    @tmjromao 2 года назад +3

    Hello Philipp L. Many thanks for the explanation. Excellent as always. Could you do video explaining how to load data from local JSON file? many thanks

  • @Realmoviesstudios
    @Realmoviesstudios 10 месяцев назад

    Thank you so much for this, but please how do I protect my web app,
    Like a WordPress website that I converted into an android app
    Is it protected as my website is protected?
    Please help me out, let me know, if I will need to protect the we app separately
    God bless you

  • @felipefuenzalida5492
    @felipefuenzalida5492 2 года назад

    yo bro, really thankya. Big respect

  • @moloodayat6039
    @moloodayat6039 10 месяцев назад

    Can you make a video about certificate pinning?

  • @GabrielXimenes-r8j
    @GabrielXimenes-r8j 7 месяцев назад

    Nice video! But made me think about CI, if i'm trying to use github actions and try to run a gradle action such as lintDebug, how would i do that if in the repository doesn't have the api_key explicitly

  • @manohar_reddy_anugu
    @manohar_reddy_anugu 2 года назад

    Hi it was me who gave the firebase suggestion on stack over flow. Too Sad that it is still the only way .

  • @葛蓉-x6u
    @葛蓉-x6u 8 месяцев назад

    thanks a lot. Could we save some secret keys in jenkins and got the value from app? if could , could you please help share it, thanks a lot

  • @nevardreik
    @nevardreik 2 года назад +8

    An even easier way of accessing local.properties is: val localProperties = gradleLocalProperties(rootDir) - then you can use localProperties["someKey"] to access its value.

    • @and70
      @and70 2 года назад

      Ty for wasting my time, its not even working.

    • @nevardreik
      @nevardreik 2 года назад +2

      @@and70 you’re welcome.

  • @hossamqandel5638
    @hossamqandel5638 2 года назад

    you don't know how long i waited for this video tutorial
    is it possible to make a project app to download youtube videos on local or full guied for paging 3?

  • @huseyintas9855
    @huseyintas9855 2 года назад

    Thank you for this informative video

  • @programmingwithjackchew903
    @programmingwithjackchew903 2 года назад

    hi Phillip can you do the tutorial regarding login and sign up using jetpack compose and room database thank you very much, I really need this course

  • @flowzk921
    @flowzk921 2 года назад

    thanks man, using the Jetpack security library do have any tutorial around using it with Datastore

  • @andrewdunbar828
    @andrewdunbar828 Год назад

    Is this using Groovy rather than Kotlin DSL? I'm having trouble following it. - Answer is yes by the way.

    • @OP-pv6un
      @OP-pv6un Год назад +1

      this using only Groovy (all old videos using Groovy) ,, Kotlin DSL is new 2023

    • @andrewdunbar828
      @andrewdunbar828 Год назад

      @@OP-pv6un Ah I only really started Android in 2023 so didn't realize it was so new. Thanks.

  • @grzegorzsamojedny
    @grzegorzsamojedny 2 года назад

    Cool 😎
    Thank you. I like this kind of movies.

  • @anaslakhani
    @anaslakhani 2 года назад

    Hey! I use Firebase Firestore to read The Base URL and API KEY's also how's that ? and with this approach I also change dynamic change things ??

  • @mustafaammar551
    @mustafaammar551 2 года назад

    very cool video
    thank you BRO 👍👍👍

  • @yeyaanshkit
    @yeyaanshkit 2 года назад +1

    Hi Brother Philipp can you please create a guide video for becoming an Android Developer using Kotlin...
    Specially for Students in College..
    Like where to follow the materiel...
    Please a New video on this topic will be lit 😊 Please...

    • @peeranpc4262
      @peeranpc4262 2 года назад

      Yaar you can start with Udacity courses. Trust me, they are free and top notch! I am speaking with experience because I asked the same question last year...

  • @divyanathanarul550
    @divyanathanarul550 2 года назад

    Hi Philip. We can use KMS to protect the Api Keys. Please make video on that.

  • @Rabbits_Tech
    @Rabbits_Tech Год назад

    If I put my API Key in my server, then my server also has a server token which validates requests from either app or hacker sites. But now the question is, the server token is still in my app !! Hackers can get it and use it to find the actual API key !!

  • @AndreyPushkarev-k5m
    @AndreyPushkarev-k5m Год назад

    be careful if you use multiple module structure. there is need to pay attention - which gradle to update

  • @diniconights
    @diniconights Месяц назад

    I Put everything together as you showed but as soon as i Push the minified APK on github IT revokes my github key, i build a Kind of App Store so i could easily Download newer Versions of my build Apps across my devices and IT pulles the Apps from github. Any Idea what i could Change so IT does Not revoke it? Do i need to make it Serverside?

  • @siddheshpalkar3986
    @siddheshpalkar3986 2 года назад

    Nice.. 👍 See if you can make video on hide api keys by using NDK CMake. Would be love to see it.. 😊

  • @NurAlam-xn6nx
    @NurAlam-xn6nx 3 месяца назад

    No can hide api key in client side as reverse engineers intercepts app traffic using proxy then then can find the api key from the request params

  • @OlafJapp
    @OlafJapp Год назад

    Its good to use API keys only on the server, but if someone is faking a client, then its possible to attack the server with replay attacks. So we need to secure also the communication with the server. And how can we tell the server that we are the original client? We still need an API key for our server?

    • @PhilippLackner
      @PhilippLackner  Год назад

      If the server uses it, the client can't abuse it though but only via the API the server exposes. If the server has a rate limit for example the client can't do anything about it since they still don't know the key. And if the server is really strict with incoming params the client can't get more info than a normal logged in user for example

  • @nitinpatil6235
    @nitinpatil6235 5 месяцев назад

    insightful

  • @go_better
    @go_better 2 года назад

    Helloooo! Little offtopic here. Could you suggest some good, comfy android developers / freelancers community in discord? I'm trying to go that route, but I tend to lose hope while being alone, you know? Thanks for your vids, btw! They're awesome!

  • @chienlichen6551
    @chienlichen6551 2 года назад

    Thanks bro, is very vedio.

  • @clarkkent1473
    @clarkkent1473 Год назад +2

    DO NOTE
    with smali editing, it is possible that someone could invoke Log.v on variables until an api key like value is reported
    if function chaining is done, eg
    FUNC(SECURE_GET());
    then one could unchain this to see what SECURE_GET returns

  • @mostafaelnagar900
    @mostafaelnagar900 2 года назад

    great great great
    if you could make a video about how to use Cmake to secure Api key
    it will be good

  • @chirantanbhakhar5241
    @chirantanbhakhar5241 9 месяцев назад

    Moral: We can only slow down the reverse engineering, Can't completely block third-party access to the API 🙂

  • @rahulkumar-td7pn
    @rahulkumar-td7pn 2 года назад

    i would rather put my api keys and keystore in my private app center account and access in my gradle file through build.gradle, in this it wont be exposed as plain text, whats ur say?

  • @VikramsinhChampavat
    @VikramsinhChampavat Год назад

    Will this approach stop Google Play team to give an error of "Leaked GCP API Keys"?

  • @AhmedAli-ld6en
    @AhmedAli-ld6en 2 года назад

    philip can you please make a video about paging 3 with rick and morty API and room caching

  • @youngtigersivateja
    @youngtigersivateja 2 года назад

    Hey Philipp, thanks for making this video, this might be helpful to secure API Keys to major extent. And Can you also help us secure different API Keys with same Key name for different builds?

  • @abhisheks2135
    @abhisheks2135 2 года назад +1

    Please make a video to secure api keys from NDK.

  • @taphoavuinhon1996
    @taphoavuinhon1996 2 года назад

    make jni folder and create file C to save the key and then use NDK to load the library, I think this is the best way.

    • @PhilippLackner
      @PhilippLackner  2 года назад

      Can still be found by reverse engineering

    • @sharmpuneet
      @sharmpuneet 2 года назад

      Decompiling APK won’t work with NDK but hacker can use deassembler and check .so files. NDK is still better than saving in build.gradle. It makes life of a hacker a little difficult

    • @AmirRaza1
      @AmirRaza1 2 года назад

      Do not put keys in plain string format in jni. Anyone can find .so file and extract that one.

  • @ayoubdev
    @ayoubdev 2 года назад

    is Same if you cerated in Build Type release ?? buildconfigfield

  • @rameswartarai8452
    @rameswartarai8452 2 года назад

    I like your videos. Can you create a video explaining how to prevent our app from rooted devices?

    • @maskedredstonerproz
      @maskedredstonerproz 2 года назад

      Prevent them being installed on rooted devices?? why would you want that??

  • @rvnareshkumar
    @rvnareshkumar 2 года назад

    Can You do a video on Securing webservices calls

  • @muhannddh
    @muhannddh 2 года назад

    How about to secure room DB and encryption the record inside the room

  • @rogercolque
    @rogercolque Год назад

    you said that i can get this key with other tools revers engineering?
    what aabout an API_KEY

  • @andrevini8099
    @andrevini8099 Год назад

    Hey guys, I have a doubt, If i put this apiKeys as local files how do you guys send them to github, or CD/CI softwares ?

    • @PhilippLackner
      @PhilippLackner  Год назад +1

      You'll need to create the local.properties file with your API key using a script step before building the project

  • @kingrajveer2885
    @kingrajveer2885 2 года назад

    Please make one video for firebase rulse for specific app.

  • @kishanpmevada
    @kishanpmevada 2 года назад

    Hello, Thank for the information, I just want to ask you a question, Can we store api key using native code with C++ ?? is that a legal way to put api keys in code ?

    • @dmytroberezhnyi717
      @dmytroberezhnyi717 2 года назад

      it a is legal way, and I think it is more safe to store it there. But you should not store your API key in native code just like that. Make some magic function that builds your API key, so it is really hard to read the assembler code with some confused logic and get your API key

  • @ahmedmudassir1035
    @ahmedmudassir1035 2 года назад

    what about the team member checks the data of the API file using debug mode? whats the purpose of hiding from team members?

  • @AjayChoudhary-on3uw
    @AjayChoudhary-on3uw 2 года назад

    Hi @philip,
    How about api key for Admob ads or fb ads?

  • @haykmkrtchyan7093
    @haykmkrtchyan7093 2 года назад

    Can I save it in EncryptedSharedPreferences? Or attackers can decrypt that?

    • @PhilippLackner
      @PhilippLackner  2 года назад

      How are you going to do that? You'll have a function call somewhere where you save the plain text api key in shared pref and therefore the key will be in memory once.

    • @haykmkrtchyan7093
      @haykmkrtchyan7093 2 года назад

      @@PhilippLackner oh right 😅

  • @totktonadafrakc5948
    @totktonadafrakc5948 2 года назад

    Downloading api key through firebase is meanless, as nothing prevents attackers from making app with the same package name and google-services and obtaining keys on launch.

  • @kamertonaudiophileplayer847
    @kamertonaudiophileplayer847 2 года назад

    I also used minSdk 21, but Android auto requires 23, so I bumped a little.

  • @sreeshtyraychoudhury2713
    @sreeshtyraychoudhury2713 7 месяцев назад

    what if we want to share across other dev

  • @rami8442
    @rami8442 2 года назад

    Hi,
    Can you create some videos about firebase function with firestore ?
    Thank you

    • @PhilippLackner
      @PhilippLackner  2 года назад

      Did already

    • @rami8442
      @rami8442 2 года назад

      @@PhilippLackner Sorry i mean "cloud firestore function triggers".

  • @haiderali7342
    @haiderali7342 2 года назад

    Sir Your video Help me Alot in Andorid development Thanks Alot to keep it simple

  • @valeriyo
    @valeriyo 2 года назад

    Why are you still using Groovy gradle scripts, not Kotlin DSL? 😒

  • @ahmednashwan8111
    @ahmednashwan8111 2 года назад

    This is so good, thanks a lot, but I think this solution is not the best, the attacker can access the key if he have experience on attacking, I think I have something more secure I wanna share that in next comment, and if that is good or not please discuss me about that, thanks a lot, have a nice day.

  • @muyassarabdullah1504
    @muyassarabdullah1504 7 месяцев назад

    why in my code Properties not resolved

  • @shmnysm7481
    @shmnysm7481 2 года назад

    Another solution is store api key inside an encrypted prepopulate local database

    • @PhilippLackner
      @PhilippLackner  2 года назад

      How do you want to pre-populate it? At some place in your code you'll have to do that and the API key will be the parameter for that function in clear text.

    • @shmnysm7481
      @shmnysm7481 2 года назад

      ​@@PhilippLackner prepopulate a Room database from a prepackaged database file that is located apk assets directory.

    • @PhilippLackner
      @PhilippLackner  2 года назад

      @@shmnysm7481 Then the key will be somewhere in your code to decrypt it. Again, you can make it harder of course, but if someone really wants it, they'll find it.

  • @noelgozon2454
    @noelgozon2454 2 года назад

    I am using NDK to secure my keys.

  • @alexjames1575
    @alexjames1575 2 года назад

    I need a little help from you sir
    How can we get to communicate with each other.
    I need a little help with something.

  • @MadManiacsam
    @MadManiacsam 2 года назад

    What if we make a cmake file and put api keys inside that ? Then use .gitignore.

  • @AmirRaza1
    @AmirRaza1 2 года назад

    Gradle in not the secure way to put keys. Anyone can find BuildConfig file after reverse engineer and extract that one easily.

    • @PhilippLackner
      @PhilippLackner  2 года назад

      Congrats for not fully watching the video

  • @khapp7821
    @khapp7821 2 года назад

    Please make the sound a little louder.

  • @peeranpc4262
    @peeranpc4262 2 года назад

    What's the difference between the approach you showed in your dictionary app series and this one??
    Please explain a bit.
    Thank you! ❤️❤️❤️

    • @PhilippLackner
      @PhilippLackner  2 года назад +1

      I don't remember what I did there haha

    • @peeranpc4262
      @peeranpc4262 2 года назад

      @@PhilippLackner What you did is :
      In app gradle
      buildConfig("String", "API_KEY", API_KEY) instead of properties etc
      Is this the same as new approach??

  • @hikmetqedirov8337
    @hikmetqedirov8337 2 года назад

    👌👍

  • @danishmehmood5375
    @danishmehmood5375 Год назад

    not useful, anyone can crack the key and API hit during the call, with network trace.

  • @alexjames1575
    @alexjames1575 2 года назад

    Hey bro

  • @breakeract796
    @breakeract796 2 года назад

    There is no secure by this way :D
    I think you never reverse app to get API key before :D
    This way just hide the key from source code, but when you build to apk file...the key must be provide and compress inside apk file :D

    • @PhilippLackner
      @PhilippLackner  2 года назад

      Oh, another one who didn't watch the video

    • @breakeract796
      @breakeract796 2 года назад

      @@PhilippLackner Yes I did. You can easy to retrieve the API key by RE

  • @ashar9327
    @ashar9327 2 года назад

    🌹🤗

  • @rajeshkanna9502
    @rajeshkanna9502 2 года назад

    This may sound childish. But wont keeping our own safe word for the variable name "API_KEY" to something like "AWOOGA" make it difficult for them🤣
    edit:
    oh nvm. I just reached the end of video, and already realised the minifyenabled does the job

    • @PhilippLackner
      @PhilippLackner  2 года назад +4

      Just call it ENCRYPTED_API_KEY, they'll think they can't use it and won't even try🌝

    • @rajeshkanna9502
      @rajeshkanna9502 2 года назад

      @@PhilippLackner 🤣🤣🤣🤣

  • @ssEACatt
    @ssEACatt 2 года назад

    This one felt a bit like click bait 😅"How to hide and protect" - "you can't", but only said after half the video content