When I started researching about Samsung Pay, I was wondering how much data the app was storing in the device, and how critical or important could be for an attacker; specifically, my interest were databases/metadata.

I remember one CNET article/FAQ about Samsung Pay where  mentioned that “Samsung Pay does not store the account or credit card numbers of cards on the device, instead using tokenization for transactions. Each time a purchase is made, the Samsung Pay handset sends two pieces of data to the payment terminal. The first is a 16-digit token that represents the credit or debit card number, while the second piece is a one-time code or cryptogram that’s generated by the phone’s encryption key.” Which is partially correct depending of the perspective.

Not storing the original credit card does not mean that the stored information could not affect the customer integrity, from certificates to metadata relating financial information.

Some databases:

screen-shot-2016-12-22-at-5-44-34-pm

How can we corroborate that these databases exist? Let’s try to pull the “spay.db”

screen-shot-2016-12-22-at-6-18-57-pm

Some databases are in the spay folder and others at spayfw.

spay.db:

CREATE TABLE card ( enrollmentID TEXT PRIMARY KEY, tokenID TEXT, channel TEXT, cardLastFour TEXT, cardState TEXT, cardName TEXT, cardNickName TEXT, cardType TEXT, expireDate TEXT, tokenLastFour TEXT, issuerName TEXT, issuerMemberID TEXT, issuerCode TEXT, issuerContactNumber TEXT, issuerThumbUri TEXT, issuerPkgName TEXT, issuerEmail TEXT, issuerURL TEXT, companyID TEXT, reorderIndex INTEGER, cardAlias TEXT, cardSeq TEXT, defaultFlag TEXT, paymentAvailableType TEXT, agreedTermsFlag TEXT, termsCode TEXT, popupFlag TEXT, popupCode TEXT, isMasked INTEGER, cardBrand TEXT, cardHolderName TEXT, textColor TEXT, foregroundColor TEXT, backgroundColor TEXT, cardStateTimestamp TEXT, updatedDate TEXT, payReadyFlag INTEGER, privacyContent TEXT, privacyType TEXT, tncContent TEXT, tncType TEXT, privacyUrl TEXT, tncUrl TEXT, isIdvSelectedExceptOTP INTEGER, idvMaxRequest INTEGER, idvRequestCount INTEGER, idvMaxRetry INTEGER, idvRetryCount INTEGER, idvRetryExpiryTime TEXT, idvLastSelectedId TEXT, homeReorderIndex INTEGER, cardProductNameColor INTEGER, cardNumberColor INTEGER, needToAddToSimplePayWhenNoti INTEGER, notSupportOverseaTransaction INTEGER, cardPresentationMode INTEGER, paymentMethodIssuePathType TEXT, downloadFailedRetryCount INTEGER DEFAULT 0,networkCardBrandCode TEXT, cashAdvanceServiceType TEXT, cardSecurityCode TEXT, isLocked INTEGER DEFAULT 0, issuerSecondaryContactNumber TEXT, cardCategoryType TEXT, cardBalance TEXT, cardCurrencyCode TEXT, csAccountNumber TEXT);

CREATE TABLE receipt ( _id INTEGER PRIMARY KEY AUTOINCREMENT, tokenID TEXT, approvalDate DATE, approvalTime TIME, merchant TEXT, phoneNumber TEXT, amount TEXT, approvalNum TEXT, cardName TEXT, tokenNumber TEXT, transactionID TEXT, transactionType TEXT, currencyCode TEXT, transactionStatus TEXT, industryCatgCode TEXT, industryCatgName TEXT, industryCode INTEGER, industryName TEXT, stamp TEXT, paymentMethod TEXT, FOREIGN KEY(tokenID) REFERENCES card(enrollmentID) ON DELETE CASCADE);

CREATE TABLE user_profile ( _id INTEGER PRIMARY KEY, name TEXT, phoneNumber TEXT, mailingAddr1 TEXT, mailingAddr2 TEXT, mailingAddr3 TEXT, mailingCity TEXT, mailingState TEXT, mailingCountry TEXT, mailingZipcode TEXT, bilingIsSame TEXT, bilingAddr1 TEXT, bilingAddr2 TEXT, bilingAddr3 TEXT, bilingCity TEXT, bilingState TEXT, bilingCountry TEXT, bilingZipcode TEXT, email TEXT,kor_name TEXT);

CREATE TABLE idv ( _id INTEGER PRIMARY KEY AUTOINCREMENT, enrollmentId TEXT, idvId TEXT, type TEXT, value TEXT, mode TEXT, codePattern TEXT, extra1 TEXT, extra2 TEXT, extra3 TEXT, extra4 TEXT, extra5 TEXT);

CREATE TABLE cardArt ( _id INTEGER PRIMARY KEY AUTOINCREMENT, enrollmentId TEXT, cardArtType TEXT, cardArtUri TEXT, cardArtUrl TEXT, donwloadRetryCount INTEGER);

CREATE TABLE partner ( _id INTEGER PRIMARY KEY AUTOINCREMENT, enrollmentID TEXT, type TEXT, name TEXT, imageUrl TEXT, imageUri TEXT, linkUrl TEXT, updatedDate TEXT, downloadRetryCount INTEGER);

CREATE TABLE userSign ( company TEXT PRIMARY KEY, uri TEXT);

CREATE TABLE IF NOT EXISTS inbox_message ( _id INTEGER PRIMARY KEY, utms INTEGER DEFAULT 0, rcv_via_push INTEGER DEFAULT 0, rcv_via_inbox INTEGER DEFAULT 0, st_delete INTEGER DEFAULT 0 );

CREATE TABLE IF NOT EXISTS push_message_eu ( _id INTEGER PRIMARY KEY, utms INTEGER DEFAULT 0, rcv_via_push INTEGER DEFAULT 0, rcv_via_inbox INTEGER DEFAULT 0, st_delete INTEGER DEFAULT 0, app_data TEXT DEFAULT , status INTEGER DEFAULT 0 );

CREATE TABLE IF NOT EXISTS company_service ( companyId TEXT PRIMARY KEY NOT NULL, companyCode TEXT, companyType TEXT, companyName TEXT, companyImgUrl TEXT, companyNumberFiledEncType TEXT, paymentAvailableType TEXT, bankPreregSprtCd TEXT, bankAcntVrfctnCd TEXT, bankAtmDwCd TEXT, bankChckSprtCd TEXT, bankAcntEncTypeCd TEXT, displayStep TEXT, displayYn TEXT, bnkVrfctnTypeList TEXT, prtnrCrdPasswdLmtCnt TEXT, bnkAcntPasswdLmtCnt TEXT );

CREATE TABLE consuptionPatterns ( enrollmentId TEXT, totalCount TEXT, totalAmount TEXT, totalCurrCount TEXT, pointTotalCount TEXT, pointTotalAmount TEXT, currentMonth TEXT);

CREATE TABLE issuerAccessKey ( productId TEXT PRIMARY KEY, accessKey TEXT);

GiftCardData.db

CREATE TABLE giftCardData (_id INTEGER PRIMARY KEY AUTOINCREMENT, id VARCHAR UNIQUE,expiryMonth VARCHAR,expiryYear VARCHAR,balance REAL,merchantId VARCHAR,merchantName VARCHAR,isGiftedCard INTEGER,cardArt VARCHAR,nickname VARCHAR,createTimestamp VARCHAR,orderIndex INTEGER,domainColor INTEGER,sequence VARCHAR,sequenceTimestamp VARCHAR,preferPayMode VARCHAR,iconUrl VARCHAR,isGiftedByFriend INTEGER,giftedBy VARCHAR,description VARCHAR,redemption VARCHAR,redemptionDetail VARCHAR,termAndCondition VARCHAR,lastDigits VARCHAR,type VARCHAR,initialBalance REAL,giftCardTabOrder INTEGER,giftProductId VARCHAR,giftProductName VARCHAR,tzEncData VARCHAR)

GiftedCardData.db

CREATE TABLE giftNotificationData (_id INTEGER PRIMARY KEY AUTOINCREMENT, id VARCHAR UNIQUE,giftId VARCHAR,status VARCHAR,cardName VARCHAR,balance REAL,cardArtUrl VARCHAR,cardIconUrl VARCHAR,merchantId VARCHAR,merchantName VARCHAR,productId VARCHAR,description VARCHAR,redemption VARCHAR,sender VARCHAR,senderMessage VARCHAR,isGiftedByFriend INTEGER,currency VARCHAR,createTimestamp VARCHAR)

loyaltyData.db

CREATE TABLE loyaltyCardData (_id INTEGER PRIMARY KEY AUTOINCREMENT, cardReferenceId VARCHAR UNIQUE,cardTokenId VARCHAR UNIQUE,tzEncData VARCHAR,cardNickName VARCHAR,cardAdditionalImageFrontFileLocation VARCHAR,cardAdditionalImageBackFileLocation VARCHAR,cardDefaultImageUrl VARCHAR,cardDefaultLogoUrl VARCHAR,retailerId VARCHAR,serviceInformation VARCHAR,merchantName VARCHAR,merchantLogoUrl VARCHAR,merchantCustomerNumber VARCHAR,merchantCustomerEmail VARCHAR,merchantCustomerWebsite VARCHAR,merchantTCUrl VARCHAR,merchantAppDownloadUrl VARCHAR,colorType INTEGER,cardNote VARCHAR,orderIndexForSimplePay INTEGER,orderIndexForCardList INTEGER,createTimeStamp VARCHAR,imageIV VARCHAR,clipOfferCount INTEGER,enrollmentId VARCHAR,merchantContactFacebook VARCHAR,merchantContactTwitter VARCHAR,merchantContactPinterest VARCHAR,merchantAppDownloadDescription VARCHAR,programName VARCHAR,activationMessage VARCHAR,pendingReason VARCHAR,cardSyncTimestamp VARCHAR)

CREATE TABLE loyaltyOfferData (_id INTEGER PRIMARY KEY AUTOINCREMENT, clipId VARCHAR UNIQUE,offerName VARCHAR,offerTitle VARCHAR,offerMessage VARCHAR,retailerName VARCHAR,retailerId VARCHAR,popularity VARCHAR,offerType VARCHAR,currencyCode VARCHAR,manufacturerName VARCHAR,brandName VARCHAR,brandLogoUrl VARCHAR,offerInformation VARCHAR,imageUrl VARCHAR,expiryOn REAL,displayBegin REAL,displayEnd REAL,ratingVotes REAL,offerId VARCHAR,loyaltyCardRefId VARCHAR,clipTimeStamp REAL,clipTo VARCHAR,redeemWith VARCHAR,presentationMode VARCHAR,redeemWhen VARCHAR,codeText VARCHAR,codeType VARCHAR,barcodeType INTEGER,codeData VARCHAR,barcodeHidden INTEGER,usageLimit REAL)

CREATE TABLE loyaltyMerchantData (_id INTEGER PRIMARY KEY AUTOINCREMENT, merchantRefId VARCHAR UNIQUE,name VARCHAR,description VARCHAR,logoUrl VARCHAR,membershipName VARCHAR,timestamp VARCHAR,cardArtUrl VARCHAR,merchantCachedOfferIds VARCHAR,popularity REAL)

CREATE TABLE loyaltyOfferServerCacheData (_id INTEGER PRIMARY KEY AUTOINCREMENT, offerId VARCHAR UNIQUE,offerName VARCHAR,offerTitle VARCHAR,offerMessage VARCHAR,retailerName VARCHAR,retailerId VARCHAR,popularity VARCHAR,offerType VARCHAR,currencyCode VARCHAR,manufacturerName VARCHAR,brandName VARCHAR,brandLogoUrl VARCHAR,offerInformation VARCHAR,imageUrl VARCHAR,expiryOn REAL,displayBegin REAL,displayEnd REAL,ratingVotes REAL,loyaltyCardRefId VARCHAR,clipTimeStamp REAL,clipTo VARCHAR,redeemWith VARCHAR,presentationMode VARCHAR,redeemWhen VARCHAR,codeText VARCHAR,codeType VARCHAR,barcodeType INTEGER,codeData VARCHAR,barcodeHidden INTEGER,syncTimeStamp REAL,usageLimit REAL)

LoyaltyDataManagerImpl

CREATE TABLE loyaltyMerchantData (_id INTEGER PRIMARY KEY AUTOINCREMENT, merchantRefId VARCHAR UNIQUE,name VARCHAR,description VARCHAR,logoUrl VARCHAR,membershipName VARCHAR,timestamp VARCHAR,cardArtUrl VARCHAR,merchantCachedOfferIds VARCHAR,popularity REAL)

CREATE TABLE loyaltyOfferServerCacheData (_id INTEGER PRIMARY KEY AUTOINCREMENT, offerId VARCHAR UNIQUE,offerName VARCHAR,offerTitle VARCHAR,offerMessage VARCHAR,retailerName VARCHAR,retailerId VARCHAR,popularity VARCHAR,offerType VARCHAR,currencyCode VARCHAR,manufacturerName VARCHAR,brandName VARCHAR,brandLogoUrl VARCHAR,offerInformation VARCHAR,imageUrl VARCHAR,expiryOn REAL,displayBegin REAL,displayEnd REAL,ratingVotes REAL,loyaltyCardRefId VARCHAR,clipTimeStamp REAL,clipTo VARCHAR,redeemWith VARCHAR,presentationMode VARCHAR,redeemWhen VARCHAR,codeText VARCHAR,codeType VARCHAR,barcodeType INTEGER,codeData VARCHAR,barcodeHidden INTEGER,syncTimeStamp REAL,usageLimit REAL)

loyaltySearchHistory

CREATE TABLE loyaltySearchHistoryTable (_id integer primary key autoincrement, searchHistory text UNIQUE ON CONFLICT REPLACE);

SUGGESTION_DB

CREATE TABLE SUGGESTION_TB (_id integer primary key autoincrement, suggestion text UNIQUE ON CONFLICT REPLACE);

notice.db

CREATE TABLE read_mark (_id INTEGER PRIMARY KEY AUTOINCREMENT,notice_id TEXT UNIQUE NOT NULL,notice_created_time DATETIME DEFAULT CURRENT_TIMESTAMP )

CREATE TRIGGER auto_delete_old_read_mark AFTER INSERT ON read_mark BEGIN    DELETE FROM read_mark WHERE notice_created_time <     (SELECT MIN(notice_created_time) FROM           ( SELECT notice_created_time FROM read_mark            ORDER BY notice_created_time DESC LIMIT 50)); END;

serverCertData.db

CREATE TABLE serverCertData (_id INTEGER PRIMARY KEY AUTOINCREMENT, usage VARCHAR UNIQUE,id VARCHAR,alias VARCHAR,content VARCHAR)

MyAddressInfoDB.db

CREATE TABLE MyAddressInfo(_id INTEGER PRIMARY KEY,mAddressPosition INTEGER,mMailingAddr1 TEXT,mMailingAddr2 TEXT,mMailingCity TEXT,mMailingState TEXT,mMailingCountry TEXT,mMailingZipcode TEXT,mDefaultBillingAddr INTEGER,mDefaultShippingAddr INTEGER,mReceivedName TEXT,mReceivedPhoneNumber TEXT,mReceivedEmailAddress TEXT)

ConsumptionPatternsInfoVO

CREATE TABLE consuptionPatterns ( enrollmentId TEXT, totalCount TEXT, totalAmount TEXT, totalCurrCount TEXT, pointTotalCount TEXT, pointTotalAmount TEXT, currentMonth TEXT);

InboxMessageEUVO

CREATE TABLE IF NOT EXISTS push_message_eu ( _id INTEGER PRIMARY KEY, utms INTEGER DEFAULT 0, rcv_via_push INTEGER DEFAULT 0, rcv_via_inbox INTEGER DEFAULT 0, st_delete INTEGER DEFAULT 0, app_data TEXT DEFAULT , status INTEGER DEFAULT 0 );

spayEuFw.db

CREATE TABLE issuerDetails ( issuerID TEXT PRIMARY KEY, issuerVersion TEXT, issuerName TEXT, issuerDescription TEXT, logoUri TEXT, contactNumber TEXT, binRangeStart TEXT, binRangeEnd TEXT, businessEmail TEXT, cardCipherChoice TEXT, businessHomePage TEXT, webIDVURLInfo TEXT, cipher TEXT, txncount TEXT, idvCodePattern TEXT);

CREATE TABLE cardproductdetail ( cardProductID TEXT PRIMARY KEY, cardType TEXT, scheme TEXT, displayName TEXT, issuerID TEXT, customerCareContact TEXT, largeCardArtUri TEXT, smallCardArtUri TEXT, tcOption TEXT, tcType TEXT, activationMessage TEXT, version TEXT, FOREIGN KEY(issuerID) REFERENCES issuerDetails(issuerID));

CREATE TABLE carddetail ( cardRefID TEXT PRIMARY KEY, tsmRefID TEXT, cardType TEXT, cardName TEXT, cardlast4digit TEXT, cardEnrolmentStatus TEXT, cardState TEXT, cardProdcutID TEXT, issuerID TEXT, tncAcceptStatus TEXT, cardProductVersion TEXT, bin TEXT, FOREIGN KEY(issuerID) REFERENCES issuerDetails(issuerID), FOREIGN KEY(cardProdcutID) REFERENCES cardproductdetail(cardProductID));

CREATE TABLE virtualcarddetail ( virtualCardRefID TEXT PRIMARY KEY, virtualtsmRefID TEXT, CardRefID TEXT, productID TEXT, virtualCardStatus TEXT, virtualcardAid TEXT, virtualcardOtpstatus TEXT, virtualcardPayReadyState TEXT, vCardAppletVersion TEXT, vCardAppletType TEXT, FOREIGN KEY(CardRefID) REFERENCES carddetail(cardRefID), FOREIGN KEY(productID) REFERENCES cardproductdetail(cardProductID));

CREATE TABLE idvmethod ( idvMethodID INTEGER PRIMARY KEY AUTOINCREMENT DEFAULT 1, idvType TEXT, idvOptChannel TEXT, idvCode TEXT, cardProductId TEXT, virtualCardRefID TEXT, FOREIGN KEY(cardProductId) REFERENCES cardproductdetail(cardProductID), FOREIGN KEY(virtualCardRefID) REFERENCES virtualcarddetail(virtualCardRefID));

CREATE TABLE issuercertificate ( certificateID TEXT PRIMARY KEY, certificateFormat TEXT, certificateValue TEXT, issuerID TEXT, FOREIGN KEY(issuerID) REFERENCES issuerDetails(issuerID));

CREATE TABLE issuermobileapp ( issuerAppID INTEGER PRIMARY KEY AUTOINCREMENT DEFAULT 1, appDownloadUrl TEXT, issuerAppLogoUrl TEXT, issuerAppDisplayName TEXT, issuerAppSignature TEXT, issuerAppPackageName TEXT, issuerID TEXT, FOREIGN KEY(issuerID) REFERENCES issuerDetails(issuerID));

HistoryInfoVO

CREATE TABLE history ( enrollmentId TEXT, paymentType TEXT, totalAmount TEXT, transactionDate TEXT, transactionDateShow TEXT, merchantName TEXT, transactionNumber TEXT, companyName TEXT, balance TEXT, approvalType TEXT, currAmount TEXT, currCode TEXT, transactionRegionCode TEXT, PRIMARY KEY (enrollmentId,transactionNumber));

collector_enc.db

CREATE TABLE IF NOT EXISTS fcard (id integer NOT NULL  PRIMARY KEY AUTOINCREMENT,account_id varchar(64) NOT NULL,account_creation_time integer,account_ondevice_time integer,four_digits varchar(64) NOT NULL,brand integer NOT NULL,first_name varchar(2),last_name varchar(2),last_name_hash varchar(128),avsaddr text,avszip varchar(10),country varchar(255),attempt_time integer NOT NULL,result integer NOT NULL,geo_x double,geo_y double,device_name varchar(255),token_id integer)

CREATE TABLE IF NOT EXISTS ftoken (id integer NOT NULL  PRIMARY KEY AUTOINCREMENT,token_ref_key varchar(64) NOT NULL,status integer NOT NULL,card_id integer NOT NULL,CONSTRAINT token_ak_1 UNIQUE (token_ref_key,card_id),FOREIGN KEY (card_id) REFERENCES fcard (id) ON DELETE RESTRICT  ON UPDATE RESTRICT)

CREATE TABLE IF NOT EXISTS ftoken_transaction_details (id integer NOT NULL  PRIMARY KEY AUTOINCREMENT,time integer NOT NULL,method varchar(30),amount varchar(30),currency varchar(5),transaction_id varchar(255),transaction_result integer NOT NULL DEFAULT 0,token_id integer NOT NULL,FOREIGN KEY (token_id) REFERENCES ftoken (id) ON DELETE CASCADE  ON UPDATE CASCADE)

CREATE TABLE IF NOT EXISTS ftoken_transaction_statistics (token_id integer NOT NULL  PRIMARY KEY,approve_count integer NOT NULL DEFAULT 0,decline_count integer NOT NULL DEFAULT 0,refund_count integer NOT NULL DEFAULT 0,FOREIGN KEY (token_id) REFERENCES ftoken (id))

CREATE TABLE IF NOT EXISTS ftoken_status_history (id integer NOT NULL  PRIMARY KEY AUTOINCREMENT,token_id integer NOT NULL,status integer NOT NULL,time integer NOT NULL,FOREIGN KEY (token_id) REFERENCES ftoken (id))

CREATE TABLE IF NOT EXISTS fcounter (id integer NOT NULL  PRIMARY KEY AUTOINCREMENT,enroll_id TEXT,time integer NOT NULL)

create table knownmachines(    machineid text,    primary key(machineid)  );

create table modelinfo(    modelid text,    modelbase text,    modelparams blob,    lastaccesstime real default current_timestamp,    primary key(modelid)  );

create table activemodels(    machineid text,    modelid text,    modelIndex integer,    foreign key(machineid) references knownmachines(machineid)  );

SdlFraudDBHelper

CREATE TABLE IF NOT EXISTS fcard (id integer NOT NULL  PRIMARY KEY AUTOINCREMENT,account_id varchar(64) NOT NULL,account_creation_time integer,account_ondevice_time integer,four_digits varchar(64) NOT NULL,brand integer NOT NULL,first_name varchar(2),last_name varchar(2),last_name_hash varchar(128),avsaddr text,avszip varchar(10),country varchar(255),attempt_time integer NOT NULL,result integer NOT NULL,geo_x double,geo_y double,device_name varchar(255),token_id integer)

CREATE TABLE IF NOT EXISTS ftoken_transaction_details (id integer NOT NULL  PRIMARY KEY AUTOINCREMENT,time integer NOT NULL,method varchar(30),amount varchar(30),currency varchar(5),transaction_id varchar(255),transaction_result integer NOT NULL DEFAULT 0,token_id integer NOT NULL,FOREIGN KEY (token_id) REFERENCES ftoken (id) ON DELETE CASCADE  ON UPDATE CASCADE)

CREATE TABLE IF NOT EXISTS ftoken_transaction_statistics (token_id integer NOT NULL  PRIMARY KEY,approve_count integer NOT NULL DEFAULT 0,decline_count integer NOT NULL DEFAULT 0,refund_count integer NOT NULL DEFAULT 0,FOREIGN KEY (token_id) REFERENCES ftoken (id))

CREATE TABLE IF NOT EXISTS ftoken_status_history (id integer NOT NULL  PRIMARY KEY AUTOINCREMENT,token_id integer NOT NULL,status integer NOT NULL,time integer NOT NULL,FOREIGN KEY (token_id) REFERENCES ftoken (id))

CREATE TABLE IF NOT EXISTS fcounter (id integer NOT NULL  PRIMARY KEY AUTOINCREMENT,enroll_id TEXT,time integer NOT NULL)

cbp_jan_enc.db

CREATE TABLE tbl_enhanced_token_info (_id INTEGER PRIMARY KEY AUTOINCREMENT, vPanEnrollmentID TEXT, vProvisionedTokenID TEXT, token_requester_id TEXT, encryption_metadata TEXT, tokenStatus TEXT, payment_instrument_last4 TEXT, payment_instrument_expiration_month TEXT, payment_instrument_expiration_year TEXT, token_expirationDate_month TEXT, token_expirationDate_year TEXT, appPrgrmID TEXT, static_params TEXT, dynamic_key BLOB, mac_left_key BLOB, mac_right_key BLOB, enc_token_info BLOB, dynamic_dki TEXT, token_last4 TEXT, mst_cvv TEXT, mst_svc_code TEXT, nic INTEGER, locate_sad_offset INTEGER, sdad_sfi INTEGER, sdad_rec INTEGER, sdad_offset INTEGER, sdad_length INTEGER, car_data_offset INTEGER, decimalized_crypto_data BLOB, bouncy_submarine BLOB, sugar BLOB, UNIQUE (vProvisionedTokenID) ON CONFLICT FAIL)

CREATE TABLE tbl_data_group(_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, token_key INTEGER, dgi TEXT NOT NULL, dgi_data BLOB NOT NULL, FOREIGN KEY(token_key) REFERENCES tbl_enhanced_token_info (_id) ON DELETE CASCADE, UNIQUE (token_key,dgi) ON CONFLICT REPLACE)

CREATE TABLE tbl_settings (_id INTEGER PRIMARY KEY, access_token_adv_warning_percent INTEGER, access_token_adv_warning_time INTEGER, check_status_period INTEGER, select_card INTEGER, cvm_entity TEXT, cvm_type TEXT, cvm_verified INTEGER, end_point TEXT, environment TEXT, thm_enabled INTEGER, bouncy_airplane BLOB, max_tvl INTEGER DEFAULT 100)

CREATE TABLE tbl_tvl (_id INTEGER PRIMARY KEY AUTOINCREMENT, token_key INTEGER, timestamp NUMERIC, unpredictable_number TEXT, atc INTEGER, transaction_type TEXT, api TEXT, cryptogram TEXT, FOREIGN KEY(token_key) REFERENCES tbl_enhanced_token_info (_id) ON DELETE CASCADE )

vasdata.db

CREATE TABLE feedback (id INTEGER PRIMARY KEY AUTOINCREMENT, type INTEGER , method INTEGER , addr STRING , param STRING , header STRING , body STRING , ctime LONG)

CREATE TABLE advertisement (id INTEGER PRIMARY KEY AUTOINCREMENT, aid STRING , ad_type INTEGER , display_type INTEGER , image_url STRING , app_link STRING , web_link STRING , download_link STRING , expire STRING)

personalcard.db

CREATE TABLE personalCard (_id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR,created_time VARCHAR,home_reorder_index INTEGER  DEFAULT 0,image_front VARCHAR,note VARCHAR)

transit.db

CREATE TABLE transit_card(_id INTEGER PRIMARY KEY AUTOINCREMENT, card_default TEXT NOT NULL, name_tag TEXT NOT NULL, image_url TEXT NOT NULL, card_type TEXT, card_name TEXT, card_number TEXT, teen TEXT, auto_charge TEXT, card_payment_method TEXT, charged_card_name TEXT, card_payment_method_id TEXT, card_payment_method_charged TEXT, amount_auto_charge TEXT, min_balance TEXT, service_type TEXT, user_transport_method_id TEXT);

CREATE TABLE transit_company(_id INTEGER PRIMARY KEY AUTOINCREMENT, card_number TEXT NOT NULL, phone_number TEXT, homepage TEXT, tax_adjustment TEXT, merchant_info TEXT);

dc_provider.db

CREATE TABLE CardMaster (_id INTEGER PRIMARY KEY AUTOINCREMENT,tokenId TEXT,status TEXT,dpanSuffix TEXT,fpanSuffix TEXT,tokenProvisionStatus INTEGER NOT NULL,sessionKeys BLOB,paginationTS INTEGER,remainingOtpkCount INTEGER,replenishmentThreshold INTEGER,number1 INTEGER,number2 INTEGER,data1 TEXT,data2 TEXT,data3 TEXT,blob1 BLOB,blob2 BLOB,blob3 BLOB )

CREATE TABLE CardDetails (_id INTEGER PRIMARY KEY AUTOINCREMENT,cardMasterId INTEGER NOT NULL,dataId INTEGER NOT NULL,data BLOB NOT NULL, FOREIGN KEY(cardMasterId) REFERENCES CardMaster(_id) ON DELETE CASCADE,UNIQUE (cardMasterId, dataId)  )

CREATE TABLE PaymentProfiles (_id INTEGER PRIMARY KEY AUTOINCREMENT,cardMasterId INTEGER NOT NULL,payProfileId INTEGER NOT NULL,ctq BLOB,auc BLOB,pru BLOB,aip BLOB,afl BLOB,cpr BLOB,arm BLOB,cvm BLOB,cl BLOB,data1 TEXT,data2 TEXT,blob1 BLOB,blob2 BLOB, FOREIGN KEY(cardMasterId) REFERENCES CardMaster(_id) ON DELETE CASCADE,UNIQUE (cardMasterId, payProfileId)  )

CREATE TABLE MetaData (_id INTEGER PRIMARY KEY AUTOINCREMENT,dataId INTEGER NOT NULL,data1 TEXT,data2 TEXT,data3 TEXT,num1 INTEGER,num2 INTEGER,num3 INTEGER,blob1 BLOB,blob2 BLOB,blob3 BLOB )

mc_enc.db

CREATE TABLE CARD_MASTER (_id INTEGER PRIMARY KEY AUTOINCREMENT,tokenUniqueReference TEXT,mpaInstanceId TEXT,status TEXT,suspendedBy TEXT,tokenPanSuffix TEXT,accountPanSuffix TEXT,isProvisioned INTEGER NOT NULL,rgkDerivedKeys TEXT,tokenExpiry TEXT )

CREATE TABLE CARD_PROVISION_DATA (_id INTEGER PRIMARY KEY AUTOINCREMENT,cardMasterId INTEGER NOT NULL,dataId INTEGER NOT NULL,data BLOB NOT NULL, FOREIGN KEY(cardMasterId) REFERENCES CARD_MASTER(_id) ON DELETE CASCADE )

CREATE TABLE TDS_METADATA (_id INTEGER PRIMARY KEY AUTOINCREMENT,cardMasterId INTEGER NOT NULL,tdsUrl TEXT,tdsRegisterUrl TEXT,paymentAppInstanceId TEXT,hash TEXT,authCode TEXT,lastUpdateTag, FOREIGN KEY(cardMasterId) REFERENCES CARD_MASTER(_id) ON DELETE CASCADE )

CREATE TABLE CERTIFICATES (_id INTEGER PRIMARY KEY,publicCertPem TEXT NOT NULL,publicCertAlias TEXT NOT NULL,cardInfoCertPem TEXT NOT NULL,cardInfoCertAlias TEXT NOT NULL )

PlccCardData_enc.db

CREATE TABLE entry (_id INTEGER PRIMARY KEY AUTOINCREMENT, providerKey VARCHAR UNIQUE,tokenStatus VARCHAR,merchantID VARCHAR,defaultSequenceConfig VARCHAR,trTokenId VARCHAR,timeStamp VARCHAR,tzData VARCHAR)

statistics.db

CREATE TABLE fdevice_info (id integer NOT NULL  PRIMARY KEY AUTOINCREMENT,time integer NOT NULL,reason varchar(255) NOT NULL,external_id varchar(255),extras varchar(255),overflow integer NOT NULL DEFAULT 0)

CREATE TABLE IF NOT EXISTS  fcount (id integer NOT NULL  PRIMARY KEY,username_count integer NOT NULL DEFAULT 0,token_count integer NOT NULL DEFAULT 0,zip_count integer NOT NULL DEFAULT 0,brand_count integer NOT NULL DEFAULT 0,fraud_count integer NOT NULL DEFAULT 0)

context.db

CREATE TABLE IF NOT EXISTS cacheindex ( _id INTEGER PRIMARY KEY AUTOINCREMENT, cacheid TEXT UNIQUE, cachegeohash TEXT UNIQUE NOT NULL, empty BOOL NOT NULL, updateat TEXT, expireat TEXT, data_1 INTEGER, data_2 INTEGER, data_3 DOUBLE, data_4 DOUBLE, data_5 TEXT, data_6 TEXT, data_7 BLOB, data_8 BLOB  )

CREATE TABLE IF NOT EXISTS caches ( _id INTEGER PRIMARY KEY AUTOINCREMENT, cacheid TEXT, cachegeohash TEXT, updatedat INTEGER, expireat INTEGER, geohash TEXT, poiid TEXT, poiname TEXT, poiradius DOUBLE, poipurpose TEXT, poistatus TEXT, lat DOUBLE, lon DOUBLE, alt DOUBLE, wifi TEXT, visitedtimes INTEGER DEFAULT 0, lastvisit INTEGER DEFAULT 0, poi TEXT, other TEXT, data_1 INTEGER, data_2 DOUBLE, data_3 TEXT, data_4 BLOB, UNIQUE(poiid, poipurpose), FOREIGN KEY (cachegeohash) REFERENCES cacheindex(cachegeohash) ON DELETE CASCADE  )

CREATE TABLE IF NOT EXISTS policies ( _id INTEGER PRIMARY KEY AUTOINCREMENT, policyid TEXT UNIQUE, version TEXT, content BLOB, data_1 INTEGER, data_2 INTEGER, data_3 DOUBLE,  data_4 DOUBLE, data_5 TEXT, data_6 TEXT, data_7 BLOB, data_8 BLOB  )

clo.db

CREATE TABLE clo_campaign (_id INTEGER PRIMARY KEY AUTOINCREMENT, campaign_id TEXT, company_id TEXT, title TEXT, sub_title TEXT, card_id TEXT, registration TEXT, offer_type INTEGER DEFAULT 0, start_date TEXT, end_date TEXT, discount_rate TEXT, suit_score TEXT, link_url TEXT, new INTEGER DEFAULT 0, UNIQUE(campaign_id));

membership.db

CREATE TABLE membership_card (_id INTEGER PRIMARY KEY AUTOINCREMENT, membership_id TEXT, card_id TEXT, partner_id TEXT, name TEXT, card_image_url TEXT, card_color TEXT, card_number TEXT, card_pin TEXT, card_barcode_type TEXT, card_grade_code TEXT, start_time INTEGER DEFAULT 0, issue_time INTEGER DEFAULT 0, detail_update_time INTEGER DEFAULT 0, point_update_time INTEGER DEFAULT 0, status TEXT, preference_order_index INTEGER DEFAULT -1, simple_pay_order_index INTEGER DEFAULT -1, recommendation_order_index INTEGER DEFAULT -1, issue_count INTEGER, point TEXT, transaction_notice TEXT, transaction_sub_tabs TEXT, benefit TEXT, brands TEXT, mode TEXT, settings TEXT, customer_service TEXT, issuable_membership_id TEXT, UNIQUE(membership_id));

CREATE TABLE membership_transaction (_id INTEGER PRIMARY KEY AUTOINCREMENT, card_id TEXT, date TEXT, description TEXT, type TEXT, value TEXT,sub_tab_id TEXT);

visa_token_group

CREATE TABLE IF NOT EXISTS visa_token_group(_id INTEGER PRIMARY KEY AUTOINCREMENT, tr_token_id TEXT NOT NULL UNIQUE, max_pmts INTEGER, replenish_pmts INTEGER, key_exp_ts INTEGER, key_replenish_ts INTEGER, provider_token_key TEXT NOT NULL UNIQUE, data_1 TEXT, data_2 INTEGER DEFAULT 0, data_3 INTEGER, data_4 TEXT, data_5 BLOB, data_6 BLOB )

server_certs_group

CREATE TABLE IF NOT EXISTS server_certs_group(_id INTEGER, card_type TEXT NOT NULL, content TEXT NOT NULL, usage TEXT NOT NULL, alias TEXT NOT NULL, PRIMARY KEY (card_type, usage, alias) )

token_group

CREATE TABLE IF NOT EXISTS token_group ( _id INTEGER PRIMARY KEY AUTOINCREMENT, enrollment_id TEXT NOT NULL UNIQUE, tr_token_id TEXT UNIQUE, user_id TEXT, app_id TEXT, provider_token_key TEXT, token_status TEXT, token_status_reason TEXT, card_brand TEXT, card_type TEXT, card_product TEXT, card_present_mode INTEGER, tnc_acceptance_time INTEGER, transaction_count INTEGER, transaction_url TEXT, data_1 TEXT, data_2 INTEGER, data_3 TEXT,  data_4 TEXT, data_5 TEXT, data_6 TEXT, data_7 BLOB, data_8 BLOB )

ConfigStorage

CREATE TABLE IF NOT EXISTS config (key TEXT PRIMARY KEY, value TEXT NOT NULL)

MstConfigurationStorage

CREATE TABLE IF NOT EXISTS rsc_cache_meta_data (id TEXT NOT NULL, type TEXT NOT NULL, href TEXT NOT NULL, updated_at TEXT NOT NULL, PRIMARY KEY (id, type) )

CREATE TABLE IF NOT EXISTS rsc_cache_wifi_scan (cache_id TEXT NOT NULL, scan_id TEXT NOT NULL, store_name TEXT NOT NULL, bssid TEXT NOT NULL, ssid TEXT NOT NULL, rssi INTEGER, frequency INTEGER, distance REAL, mst_sequence_id TEXT NOT NULL )

CREATE TABLE IF NOT EXISTS rsc_cache_mst_sequence (key TEXT NOT NULL, mst_sequence_id TEXT PRIMARY KEY, transmit INTEGER, idle INTEGER, config TEXT NOT NULL, cache_id TEXT NOT NULL, scan_id TEXT NOT NULL )