MegaFox Posted March 10, 2019 Share Posted March 10, 2019 How to rewrite value of address in mainv1.scm (GTA SA Android)? It is necessary that it works in GTA SA Android (1.0.8). With cleo, I do this (CLEO Android opcode): 0DD9: write_mem_addr 0x00510D60 value 800000.0 size 4 add_ib 1 protect 1 and everything works fine. But in SCM there is no such opcode, and I tried it like this (from this guide) 0@ = 0x00510D60 0@ -= 0xA49960 0@ /= 4 1@ = 800000.0 008A: &0(0@,1i) = 1@ Game crashes. Still tried to remove 2 nulls in the address - became 0x510D60 And also write just 800000 instead of 800000.0 But game crashes. Starting a new game did not forget. Professionals, help me find a way to write memory addresses using mainV1.scm in GTA SA Android 1.0.8, architecture ARMV7/ARMV8. Link to comment Share on other sites More sharing options...
OrionSR Posted March 10, 2019 Share Posted March 10, 2019 (edited) . [email protected] = 0x00510D60 // (assumed) working Android address [email protected] -= 0xA49960 // offset to SCM on PC. Inappropriate for Android [email protected] /= 4 // ok here, but dividing integers can lead to incorrect offsets [email protected] = 800000.0 // either change to an int 008A: &0([email protected],1i) = [email protected] // or use the float version of this opcode add_ib 0 / add_ib 1 Android has two addressing schemes. I forget exactly how these are used, but you'll need to use the proper base address for add_ib 1 instead of the SCM offset on PC. I think ib 0 is the local game offsets and ib 0 addresses a "global" offset, but it's been a very long time since I've been working on this stuff. I haven't been having much luck with my recent ADMA strategies either. It seems to work as expect to a point but fails with larger values. I have yet to try negative addressing like you are using here. How are you replacing main.scm? That file seemed to be pretty well locked down the last time I looked. I'll see if I can dig up any old reference for the base addresses for ib 0 and ib 1. I had this info once, but for earlier versions than 1.08. Added: protect 1 this might be a problem. Does your code work without it? Edited March 10, 2019 by OrionSR Link to comment Share on other sites More sharing options...
MegaFox Posted March 10, 2019 Author Share Posted March 10, 2019 11 minutes ago, OrionSR said: . add_ib 0 / add_ib 1 Android имеет две схемы адресации. Я забыл, как именно они используются, но вам нужно будет использовать правильный базовый адрес для add_ib 1 вместо смещения SCM на ПК. Я думаю, что ib 0 - это локальные смещения игры, а ib 0 - это «глобальное» смещение, но с тех пор, как я работал над этим, прошло очень много времени. Мне не очень повезло с моими недавними стратегиями ADMA. Кажется, что работает, как и ожидалось, но терпит неудачу с большими значениями. Я еще не пробовал использовать отрицательную адресацию, как вы используете здесь. Как вы заменяете main.scm? Этот файл, казалось, был довольно хорошо заблокирован в последний раз, когда я смотрел. Я посмотрю, смогу ли я найти какую-нибудь старую ссылку на базовые адреса для ib 0 и ib 1. У меня была эта информация один раз, но для более ранних версий, чем 1.08. mainV1.scm and scriptv1.img are in APK/assets/data /script. Remove them. Using APK Editor, you need to clear this folder (APK/assets/data/script) and install a new APK. Then put these files in Android /data/com.rockstargames.gtasa/files/script. To decompile them, rename scriptv1.img to script.img. To compile, select the SA MOBILE mode in Sanny Builder. It works only with the new game. Link to comment Share on other sites More sharing options...
OrionSR Posted March 10, 2019 Share Posted March 10, 2019 2 minutes ago, user1592591 said: It works only with the new game. That's not strictly necessary. It depends on what you edit. If main and the other threads aren't edited there's a pretty good can the modified main will work on existing saves. Added: protect 1 this might be a problem. Does your code work without it? Link to comment Share on other sites More sharing options...
MegaFox Posted March 10, 2019 Author Share Posted March 10, 2019 22 minutes ago, OrionSR said: . add_ib 0 / add_ib 1 Android имеет две схемы адресации. Я забыл, как именно они используются, но вам нужно будет использовать правильный базовый адрес для add_ib 1 вместо смещения SCM на ПК. Я думаю, что ib 0 - это локальные смещения игры, а ib 0 - это «глобальное» смещение, но с тех пор, как я работал над этим, прошло очень много времени. ADMA. Кажется, что у меня есть терпение. Я использую здесь отрицательную адресацию. Как вы заменяете main.scm? Этот файл, казалось, был довольно хорошо заблокирован в последний раз. Ссылка на базовые адреса для ib 0 и ib 1. У меня была эта информация, но только для более ранних версий, чем 1.08. Добавлено: защита 1, это может быть проблемой. Ваш код работает без него? Not working with "protect 0", only with protect 1 4 minutes ago, OrionSR said: Это не обязательно. Это зависит от того, что вы редактируете. Если основной и другие потоки не редактируются, вполне возможно, что измененный основной будет работать с существующими сохранениями. Добавлено: защита 1 это может быть проблемой. Ваш код работает без него? Android/data/com.rockstargames.gtasa/files/data/script, not files/script, sorry OrionSR 1 Link to comment Share on other sites More sharing options...
OrionSR Posted March 10, 2019 Share Posted March 10, 2019 3 minutes ago, user1592591 said: Not working with "protect 0", only with protect 1 I would expect this conflict to crash the game even if everything else was done correctly. This complicates the problem beyond my experience. You might find useful information in early topics on memory management like you referenced above. Link to comment Share on other sites More sharing options...
MegaFox Posted March 10, 2019 Author Share Posted March 10, 2019 13 minutes ago, OrionSR said: Я ожидаю, что этот конфликт приведет к краху игры, даже если все остальное будет сделано правильно. Это усложняет проблему за пределами моего опыта. Вы можете найти полезную информацию в ранних темах по управлению памятью, как вы упоминали выше. I don't understand this at all. Wait your help 18 минут назад OrionSR сказал: Я ожидаю, что это будет сделано правильно. Это проблема за пределами моего опыта. Вы можете найти полезную информацию в управлении памятью, как вы упоминали выше. If that, that memory address is used for unlimited height on airplanes and helicopters Link to comment Share on other sites More sharing options...
OrionSR Posted March 10, 2019 Share Posted March 10, 2019 2 minutes ago, user1592591 said: I don't understand this at all. Wait your help I don't understand "virtual protect" or protected memory beyond, if protect 0 crashes then try protect 1. Your original question was on ADMA addressing. I suggest that you write with the cleoA opcode and read with ADMA to avoid conflicts with protected memory. &0([email protected],1i) I'm expecting this to address global variable $9765 if [email protected] = 9765 and add_ib = 0. $9765 is the start of Roulette's Cash Won array (151i) and should be a safe place to write data without breaking anything. add_ib 1: Read 4 dwords with add_ib 1 starting at offset 0. Use cleoA opcode to search through memory until a match is found for all 4 dwords. This should provide you will the appropriate offset required to calculate other addresses. Link to comment Share on other sites More sharing options...
MegaFox Posted March 10, 2019 Author Share Posted March 10, 2019 10 minutes ago, OrionSR said: Я не понимаю «виртуальную защиту» или защищенную память за ее пределами, если происходит сбой защиты 0, попробуйте защитить 1. Ваш первоначальный вопрос касался адресации ADMA. Я предлагаю вам писать с кодом операции cleoA и читать с ADMA, чтобы избежать конфликтов с защищенной памятью. & 0 ( 0 @ , 1i) Я ожидаю, что это будет обращаться к глобальной переменной $ 9765, если 0 @ = 9765 и add_ib = 0. $ 9765 - это начало массива Cash Won в рулетке (151i), и он должен быть безопасным местом для записи данных без прерывания что-нибудь. add_ib 1: читать 4 слова с add_ib 1, начиная со смещения 0. Используйте код операции cleoA для поиска в памяти, пока не будет найдено совпадение для всех 4 слов. Это должно предоставить вам соответствующее смещение, необходимое для расчета других адресов. I say that I do not know how to work with memory, and I do not understand what you are talking about. Some cleoA opcode, some 4 dwords that need to be found somehow with the help of some cleoA opcode. What is ADMA? What does it have to do with $9765? I not use $9765, use [email protected] And use this in external script, in isolated from main thread. I already tried cleo opcode with protect 1, but what does it have to do with it? We try to do without it, because it does not work without cleo, and I need to write to memory without cleo. I'm not such a professional as you, so either explain to me in detail what I should do, or try it yourself Link to comment Share on other sites More sharing options...
OrionSR Posted March 10, 2019 Share Posted March 10, 2019 (edited) I am not the expert you were hoping to find. Sanny Help: Data types Quote & - ADMA (Advanced Direct Memory Access). Reads/writes the values within the SCM even not in the variables block. Does not affect the second segment size. ADMA can be used the same as a global variable. I have only recently started working with ADMA again. I'm having problems with ADMA and would also like to find better reference for using it. There are cleoA opcodes for reading and writing memory. Look them up. I do not know how to write to protected memory (protect 1). I expect this strategy to fail unless a solution is found. (I'm not looking for a solution at this time.) Important variables are missing from the equation. You can wait for someone else to bring the answers to you, or you might be able to find reference to these key values or figure them out using the tools that are available. I was suggesting that you start with something simple, like reading the value of a global variable. $9765 should be a safe variable to use for an experiment. $9765 = 0xCCAAFFEE Can you read this variable using cleoA opcode 0DD8:? Can you read this using ADMA with add_ib 0? (Try [email protected] = &0([email protected],1i) when [email protected] = 9765) Can you read this using ADMA with add_ib 1? When the answer is yes to all three questions then you should have all the information you need to read from 0x510D60 using ADMA, Edited March 10, 2019 by OrionSR Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 H 6 hours ago, OrionSR said: Я не эксперт, которого вы надеялись найти. Sanny Help: Типы данных Я только недавно начал работать с ADMA снова. У меня проблемы с ADMA, и я также хотел бы найти лучшую ссылку для его использования. Существуют опкоды cleoA для чтения и записи в память. Ищите их. Я не знаю, как записать в защищенную память (защита 1). Я ожидаю, что эта стратегия потерпит неудачу, если решение не будет найдено. (Я не ищу решение в настоящее время.) Важные переменные отсутствуют в уравнении. Вы можете подождать, пока кто-нибудь другой предоставит вам ответы, или вы сможете найти ссылку на эти ключевые значения или выяснить их с помощью доступных инструментов. Я предлагал начать с чего-то простого, например, с чтения значения глобальной переменной. $ 9765 должна быть безопасной переменной для использования в эксперименте. $ 9765 = 0xCCAAFFEE Можете ли вы прочитать эту переменную, используя код операции cleoA 0DD8 :? Можете ли вы прочитать это с помощью ADMA с add_ib 0? (Попробуйте 0 @ = & 0 ( 1 @ , 1i), когда 1 @ = 9765) Можете ли вы прочитать это с помощью ADMA с add_ib 1? Если ответ на все три вопроса положительный, у вас должна быть вся информация, которую нужно прочитать с 0x510D60 с использованием ADMA, How do I log readed value? Without gxt Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 42 minutes ago, user1592591 said: H How do I log readed value? Without gxt I tried: 0DD8: 0@ = read_mem_addr 0xCCAAFFEE size 4 add_ib 1 But game crashed. 0DD8: 0@ = read_mem_addr 0xCCAAFFEE size 4 add_ib 0 With this game did not crash, but I do not know how to display this value. [email protected] = $9765 [email protected] = &0([email protected],1i) Sanny Builder writes that are incompatible, or an unknown type. [email protected] = 9765 [email protected] = &0([email protected],1i) Same error [email protected] = 0xCCAAFFEE [email protected] = &0([email protected],1i) Same error. Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 7 hours ago, OrionSR said: Я не эксперт, которого вы надеялись найти. Sanny Help: Типы данных Я только недавно начал работать с ADMA снова. У меня проблемы с ADMA, и я также хотел бы найти лучшую ссылку для его использования. Существуют опкоды cleoA для чтения и записи в память. Ищите их. Я не знаю, как записать в защищенную память (защита 1). Я ожидаю, что эта стратегия потерпит неудачу, если решение не будет найдено. (Я не ищу решение в настоящее время.) Важные переменные отсутствуют в уравнении. Вы можете подождать, пока кто-нибудь другой предоставит вам ответы, или вы сможете найти ссылку на эти ключевые значения или выяснить их с помощью доступных инструментов. Я предлагал начать с чего-то простого, например, с чтения значения глобальной переменной. $ 9765 должна быть безопасной переменной для использования в эксперименте. $ 9765 = 0xCCAAFFEE Можете ли вы прочитать эту переменную, используя код операции cleoA 0DD8 :? Можете ли вы прочитать это с помощью ADMA с add_ib 0? (Попробуйте 0 @ = & 0 ( 1 @ , 1i), когда 1 @ = 9765) Можете ли вы прочитать это с помощью ADMA с add_ib 1? Если ответ на все три вопроса положительный, у вас должна быть вся информация, которую нужно прочитать с 0x510D60 с использованием ADMA, 0DD8: 0@ = read_mem_addr 0xCCAAFFEE size 4 add_ib 1 Crash 0DD8: 0@ = read_mem_addr 0xCCAAFFEE size 4 add_ib 0 Not crash, but how to show this value on screen 008A: 1@ = 9765 008A: 0@ = &0(1@,1i) Crash. This is variable, not integer 008A: 1@ = $9765 008A: 0@ = &0(1@,1i) Crash 008A: 1@ = 0xCCAAFFEE 008A: 0@ = &0(1@,1i) Crash Link to comment Share on other sites More sharing options...
OrionSR Posted March 11, 2019 Share Posted March 11, 2019 (edited) Ah, good progress. I recommend that you file reports of your progress and failures in this topic. If an expert with answers finds this topic they are more likely to offer assistance if they see you are trying hard and are serious about the project. 1 hour ago, user1592591 said: How do I log readed value? Without gxt Use CleoA and whatever GXT options it has available for easy testing. Or reuse standard GXT for your own purpose. Sometimes you may need to remember that "Beefy Baron" means "Match Found" but a search through this All GXT for SA data can often find text a little closer to the correct meaning. GXT with numbers (~1~) can be used to display value even if the text is not appropriate. 0xCCAAFFEE, this is supposed to be data. I made up a number which I thought might be unique so you would be unlikely to find a match with normal data. If you want to avoid false positive, try writing to and reading from 4 unique numbers in a row as suggested in an earlier post. $9765 = 0xCCAAFFEE // in case it wasn't clear, this will write data to an address in memory for variable $9765. Finding this address provides data used to calculate addresses using different addressing schemes. 42 minutes ago, user1592591 said: 0@ = &0(1@,1i) Sanny can't tell if your variable are holding integers or floating point values when both sides of the equation are variables. Otherwise Sanny would put in the correct opcode for you. Look up the appropriate opcode to assign a local variable equal to a global variable (ADMA works like global variables). Use the integer version since the value doesn't really matter. Basically, if what you wrote equals (==, and evaluation, not an assignment) what you read then print Success. Other responses seem to be related to issues above. I'll look for other conceptual errors but you will probably need to rethink your experiments. 27 minutes ago, user1592591 said: 008A: 1@ = $9765 008A: 0@ = &0(1@,1i) This was very close. Fix opcode in second line for local = global // int version for a good test. Start with $9765 = unique data. Finish with real codes for If $9765 == [email protected] then print success, ring bell, play whistle. Correction: [email protected] = 9765. This is an address divided by 4. Not the value of global variable $9765. Edited March 11, 2019 by OrionSR Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 8 minutes ago, OrionSR said: Ah, good progress. I recommend that you file reports of your progress and failures in this topic. If an expert with answers finds this topic they are more likely to offer assistance if they see you are trying hard and are serious about the project. Use CleoA and whatever GXT options it has available for easy testing. Or reuse standard GXT for your own purpose. Sometimes you may need to remember that "Beefy Baron" means "Match Found" but a search through this All GXT for SA data can often find text a little closer to the correct meaning. GXT with numbers (~1~) can be used to display value even if the text is not appropriate. 0xCCAAFFEE, this is supposed to be data. I made up a number which I thought might be unique so you would be unlikely to find a match with normal data. If you want to avoid false positive, try writing to and reading from 4 unique numbers in a row as suggested in an earlier post. $9765 = 0xCCAAFFEE // in case it wasn't clear, this will write data to an address in memory for variable $9765. Finding this address provides data used to calculate addresses using different addressing schemes. Sanny can't tell if your variable are holding integers or floating point values when both sides of the equation are variables. Otherwise Sanny would put in the correct opcode for you. Look up the appropriate opcode to assign a local variable equal to a global variable (ADMA works like global variables). Use the integer version since the value doesn't really matter. Basically, if what you wrote equals (==, and evaluation, not an assignment) what you read then print Success. Other responses seem to be related to issues above. I'll look for other conceptual errors but you will probably need to rethink your experiments. This was very close. Fix opcode in second line for local = global // int version for a good test. Start with $9765 = unique data. Finish with real codes for If $9765 == [email protected] then print success, ring bell, play whistle. What opcode is needed in line 2? 0084=2,%1d% = %2d% ; (int) 0085=2,%1d% = %2d% ; (int) 0086=2,%1d% = %2d% ; (float) 0087=2,%1d% = %2d% ; (float) 0088=2,%1d% = %2d% ; (float) 0089=2,%1d% = %2d% ; (float) 008A=2,%1d% = %2d% ; (int) 008B=2,%1d% = %2d% ; (int) Link to comment Share on other sites More sharing options...
OrionSR Posted March 11, 2019 Share Posted March 11, 2019 (edited) 19 minutes ago, user1592591 said: What opcode is needed in line 2? I'm not familiar enough with this format to find the correct opcode. Try using Sanny's Tools, IDE tools, Opcode Search. Search for "@ = $ // int" and ignore anything with ==, +=, etc to find local equals global -- integer version. I have edited my comments above, and am likely to edit my commends while I'm active in this topic. Please refresh the page regularly for updates. It looks like a better explanation of arrays would be helpful. I'll update this post with information specific to this task but I recommend that you review documentation on the use of arrays in general. Notes: Sanny can figure out these opcodes if you leave them out because one side of the equation is a hard coded integer. 0004: $9765 = 0xCCAAFFEE // with proper opcode for set global equal to an integer. 0006: [email protected] = 9765 // with proper opcode for set local equal to an integer. Edited March 11, 2019 by OrionSR Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 8 minutes ago, OrionSR said: I'm not familiar enough with this format to find the correct opcode. Try using Sanny's Tools, IDE tools, Opcode Search. Search for "@ = $ // int" and ignore anything with ==, +=, etc to find local equals global -- integer version. I have edited my comments above, and am likely to edit my commends while I'm active in this topic. Please refresh the page regularly for updates. It looks like a better explanation of arrays would be helpful. I'll update this post with information specific to this task but I recommend that you review documentation on the use of arrays in general. This is my code: //-------------External script 20 (HOME_BRAINS)--------------- :HMLES 03A4: name_thread 'HMLES' 0001: wait 0 ms 0004: $9765 = 25636 //0004 example from SCM: 0004: $163 = 0 008B: 2@ = $9765 //008B example from SCM: 008B: 3@ = $15 // (int) 008A: 1@ = 0xCCAAFFEE //008A or 0004 or 0006? 008B: 0@ = &0(1@,1i) //008B example from SCM: 008B: 3@ = $15 // (int) 00D6: if 0038: $9765 == 0@ //compare value, getted from variable by standard method and by address 0001: wait 10000 ms //if true, freeze game to 10 seconds 004E: end_thread //-------------External script 21 (POOL_SCRIPT)--------------- All correct? 5 minutes ago, user1592591 said: This is my code: //-------------External script 20 (HOME_BRAINS)--------------- :HMLES 03A4: name_thread 'HMLES' 0001: wait 0 ms 0004: $9765 = 25636 //0004 example from SCM: 0004: $163 = 0 008B: 2@ = $9765 //008B example from SCM: 008B: 3@ = $15 // (int) 008A: 1@ = 0xCCAAFFEE //008A or 0004 or 0006? 008B: 0@ = &0(1@,1i) //008B example from SCM: 008B: 3@ = $15 // (int) 00D6: if 0038: $9765 == 0@ //compare value, getted from variable by standard method and by address 0001: wait 10000 ms //if true, freeze game to 10 seconds 004E: end_thread //-------------External script 21 (POOL_SCRIPT)--------------- All correct? Sorry if I do not understand something. I am Russian, and the translator does not convey the whole meaning of your sentences. Link to comment Share on other sites More sharing options...
OrionSR Posted March 11, 2019 Share Posted March 11, 2019 (edited) Home Brains? Are custom script with cleo an option for testing? It looks like all work must be done using only SCM. These modification have not been tested. I still need to write something about the basics of arrays. Um... this quote has been edited. 42 minutes ago, user1592591 said: :HMLES 03A4: name_thread 'HMLES' 0001: wait 0 ms $9765 = 0xCCAAFFEE // unique data to compare [email protected] = 9765 // index of array (each element of the array is 4 bytes in length) 008B: [email protected] = &0([email protected],1i) //008B example from SCM: 008B: [email protected] = $15 // (int) // On PC, an index of of 0 is the same as $0. 00D6: if 0038: $9765 == [email protected] //example: 003C: $1076([email protected],10i) == [email protected] // (int) [Good] 004D: jump_if_false @End // "else" always follows evaluation 00BB: show_text_lowpriority GXT 'FESZ_LS' time 2000 flag 1 // Load Successful. [should work on Android] 09F1: play_audio_at_actor $PLAYER_ACTOR event 1137 // SOUND_CHECKPOINT_AMBER [might work on Android] Bells and Whistles 0001: wait 10000 ms //if true, freeze game to 10 seconds // your thread will pause but everything else will continue without notice :End // a label used as the destination for the jump_if_false command 004E: end_thread Edited March 11, 2019 by OrionSR Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 11 минут назад OrionSR сказал: Домашние мозги? Является ли пользовательский скрипт с cleo опцией для тестирования? Похоже, что вся работа должна быть выполнена с использованием только SCM. Эти модификации не были проверены. Мне все еще нужно написать кое-что об основах массивов. Хм ... эта цитата была отредактирована. This works, sound plays. But I still do not understand what kind of array and where this memory address comes from ... Just now, user1592591 said: This works, sound plays. But I still do not understand what kind of array and where this memory address comes from ... Text displayed, sound plays. With your code 2 minutes ago, user1592591 said: This works, sound plays. But I still do not understand what kind of array and where this memory address comes from ... Text displayed, sound plays. With your code I use cleo script only for test opcodes 0DD6-8. Everything else in SCM Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 8 minutes ago, user1592591 said: This works, sound plays. But I still do not understand what kind of array and where this memory address comes from ... Text displayed, sound plays. With your code I use cleo script only for test opcodes 0DD6-8. Everything else in SCM External Script "HOME_BRAINS" used for compatibility with saves. If you want, I can public, how to setting main.scm for working with saves, without replacing any game scripts Just now, user1592591 said: External Script "HOME_BRAINS" used for compatibility with saves. If you want, I can public, how to setting main.scm for working with saves, without replacing any game scripts HOME_BRAINS - unused. Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 43 minutes ago, OrionSR said: Домашние мозги? Является ли пользовательский скрипт с cleo опцией для тестирования? Похоже, что вся работа должна быть выполнена с использованием только SCM. Эти модификации не были проверены. Мне все еще нужно написать кое-что об основах массивов. Хм ... эта цитата была отредактирована. What's next? Link to comment Share on other sites More sharing options...
OrionSR Posted March 11, 2019 Share Posted March 11, 2019 7 minutes ago, user1592591 said: This works, sound plays. But I still do not understand what kind of array and where this memory address comes from ... I think that I understand your confusion, but I'm not sure how to explain. However, congratulations on a successful script. A working example should help with further progress. This was just the first step. I wanted to suggest a test using cleoA opcodes to read addresses directly, instead of this array exploit trick. Is this an option for short term tests? Thanks, but I'll use cleo or edit my saves. Modifying the APKs is more than I'm ready to deal with at this time. Besides, I'm working towards strategies that will work on iOS, so I'm not expecting an APK strategy to be particularly useful in the long run. Arrays... this is tricky because arrays are a basic concept of programming. It's hard to explain how we are tricking the game into access information using arrays if you aren't familiar with how arrays are used normally. So I'm going to sleep on it, maybe I'll think of something. In the meantime, please review basic reference on arrays and take a look at how the game uses them in SCM. Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 4 minutes ago, OrionSR said: Я думаю, что понимаю ваше замешательство, но я не знаю, как объяснить. Однако поздравляю с успешным сценарием. Рабочий пример должен помочь в дальнейшем прогрессе. Это был только первый шаг. Я хотел предложить тест, использующий коды операций cleoA для непосредственного чтения адресов, вместо этого трюка с использованием массива. Это опция для краткосрочных тестов? Спасибо, но я буду использовать cleo или редактировать свои сейвы. Модификация APK - это больше, чем я готов сейчас иметь дело. Кроме того, я работаю над стратегиями, которые будут работать на iOS, поэтому я не ожидаю, что стратегия APK будет особенно полезной в долгосрочной перспективе. Массивы ... это сложно, потому что массивы являются основной концепцией программирования. Трудно объяснить, как мы вводим игру в доступ к информации, используя массивы, если вы не знакомы с тем, как массивы используются нормально. Так что я буду спать на нем, может быть, я что-нибудь придумаю. А пока просмотрите основные ссылки на массивы и посмотрите, как игра использует их в SCM. What is the option for short term tests? Script HOME_BRAINS? No, it can also be used for regular scripts, but you need to have a cycle there, otherwise the script will be restarted all the time. By default, it does not start from anywhere, you need to add a few lines yourself; and then align the size of the MAIN stream so that the saves work. The EXTERNAL SCRIPT size is not taken into account when checking the MAIN size, and I decided to use this workaround. 1 minute ago, user1592591 said: Какой вариант для краткосрочных тестов? Скрипт HOME_BRAINS? Нет, его также можно использовать для обычных скриптов, но вам нужно иметь цикл там, иначе скрипт будет перезапускаться все время. По умолчанию он не начинается с нуля, вам нужно добавить несколько строк самостоятельно; а затем выровняйте размер потока MAIN так, чтобы сохраненные данные работали. Размер ВНЕШНЕГО СКРИПТА не учитывается при проверке ОСНОВНОГО размера, и я решил использовать этот обходной путь. While I wait for the next tests, suddenly you will think up something. Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 49 minutes ago, OrionSR said: Я не знаю, как объяснить. Однако поздравляю с успешным сценарием. Рабочий пример должен помочь в дальнейшем прогрессе. Это был только первый шаг. Я хочу предложить тестирование с использованием кодов операций. Это опция для коротких тестов? Спасибо, но я буду использовать cleo или редактировать свои сейвы. Модификация APK - это больше, чем я готова сейчас иметь дело. Кроме того, я работаю над стратегией, которая будет работать на iOS. Массивы ... это сложно, потому что массивы являются основной концепцией программирования. Трудно объяснить, как мы обычно общаемся. Придумаю. А пока просмотрите основные ссылки на массивы и посмотрите, как игра использует их в SCM. mainV1.scm script is in the APK, and the only way to replace it is to rebuild the APK. On iOS, the same thing, only there is not an APK, but an IPA. Link to comment Share on other sites More sharing options...
OrionSR Posted March 11, 2019 Share Posted March 11, 2019 0DD7: [email protected] = get_image_base ; android 0DD8: [email protected] = read_mem_addr 0xFADE size 4 add_ib 0 ; android 0DD9: write_mem_addr 0xFADE value 1 size 1 add_ib 0 protect 1 ; android Can you use CleoA opcodes or not? I'm asking what you can do for a test, not what you want to do with your script. Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 (edited) I decided to switch from CLEO to SCM, because the author of CLEO Android stopped updating CLEO, and the libcleo.so library conflicts with SAMP Android and crash occurs. SAMP Android author refuses to do something about it. And SCM has one huge plus, it is supported on any platform. And now only through SCM can I run CLEO scripts in SAMP Android. It remains only to learn how to write memory adresses 3 minutes ago, OrionSR said: Вы можете использовать коды операций CleoA или нет? Я спрашиваю, что вы можете сделать для теста, а не то, что вы хотите сделать со своим сценарием. Can test, but not in SCM, this CLEO opcodes Edited March 11, 2019 by user1592591 Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 (edited) 14 minutes ago, OrionSR said: 0DD7: [email protected] = get_image_base ; android 0DD8: [email protected] = read_mem_addr 0xFADE size 4 add_ib 0 ; android 0DD9: write_mem_addr 0xFADE value 1 size 1 add_ib 0 protect 1 ; android Can you use CleoA opcodes or not? I'm asking what you can do for a test, not what you want to do with your script. I tested these opcodes, but the game crashes. Test in cleo script {$CLEO .csa} 03A4: name_thread 'UNLHA' 0001: wait 0 ms 0DD7: 0@ = get_image_base ; android 0DD8: 0@ = read_mem_addr 0xFADE size 4 add_ib 0 ; android 0DD9: write_mem_addr 0xFADE value 1 size 1 add_ib 0 protect 1 ; android end_thread Edited March 11, 2019 by user1592591 Link to comment Share on other sites More sharing options...
OrionSR Posted March 11, 2019 Share Posted March 11, 2019 Okay, can you provide contact information for the author of SAMP Android? Will these strategies be used to bypass SAMP security? Can this be used to cheat other players? Can all iOS and Android users use a custom main? My information on mobile modding strategies is out of date. I'm familiar with restrictions unless a device is rooted or... jailbroken? Please choose another goal. The current goal is not possible due to protected memory. If you work on something that works with protect 0 we might get it to work. Sorry, those codes were the examples pulled from opcode search in Sanny and are completely out of context with each other. These are the tools we need to use, not how to use them. However... 0DD7: $9765 = get_image_base ; android Run that, save, and upload the save to GTASnP.com. Send me the link and I'll dig out the image base. Or experiment with GXT keys to show text like High Score ~1~ to display the value of $9765. This should be a static address for a particular version. Maybe set an integer stat equal to $9765 so it's easy to read in the stat menu. Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 19 minutes ago, OrionSR said: Хорошо, можете ли вы предоставить контактную информацию для автора SAMP Android? Будут ли эти стратегии использоваться для обхода безопасности SAMP? Может ли это быть использовано для обмана других игроков? Могут ли все пользователи iOS и Android использовать собственную главную? Моя информация о мобильных моддинговых стратегиях устарела. Я знаком с ограничениями, если устройство не рутировано или ... не взломано? Пожалуйста, выберите другую цель. Текущая цель невозможна из-за защищенной памяти. Если вы работаете с чем-то, что работает с protect 0, мы можем заставить его работать. Извините, эти коды были примерами, извлеченными из поиска кода операции в Sanny, и полностью не совпадают друг с другом. Это инструменты, которые мы должны использовать, а не то, как их использовать. Тем не мение... Запустите его, сохраните и загрузите сохранение в GTASnP .com . Пришли мне ссылку и я выкопаю базу изображений. Или поэкспериментируйте с клавишами GXT, чтобы показать текст типа High Score ~ 1 ~, чтобы отобразить значение $ 9765. Это должен быть статический адрес для конкретной версии. Возможно, установите целочисленную статистику равную $ 9765, чтобы ее было легко прочитать в меню статистики. https://gtasnp.com/BVTEgJ Link to comment Share on other sites More sharing options...
MegaFox Posted March 11, 2019 Author Share Posted March 11, 2019 (edited) 1 hour ago, OrionSR said: Okay, can you provide contact information for the author of SAMP Android? Will these strategies be used to bypass SAMP security? Can this be used to cheat other players? Can all iOS and Android users use a custom main? My information on mobile modding strategies is out of date. I'm familiar with restrictions unless a device is rooted or... jailbroken? Please choose another goal. The current goal is not possible due to protected memory. If you work on something that works with protect 0 we might get it to work. Sorry, those codes were the examples pulled from opcode search in Sanny and are completely out of context with each other. These are the tools we need to use, not how to use them. However... 0DD7: $9765 = get_image_base ; android Run that, save, and upload the save to GTASnP.com. Send me the link and I'll dig out the image base. Or experiment with GXT keys to show text like High Score ~1~ to display the value of $9765. This should be a static address for a particular version. Maybe set an integer stat equal to $9765 so it's easy to read in the stat menu. Please define at least the start address of the SCM block for Android, and explain to me how you do it. I will be able to edit at least unprotected addresses. I will change other addresses using IDA Pro, patch libGTASA.so. Or make unprotected Edited March 11, 2019 by user1592591 Link to comment Share on other sites More sharing options...